Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. Random rand = new Random();
  2. string boss = "Неуязвимый вепрь";
  3. string name;
  4. string userInput;
  5. string ability = "Крутящий - вертящий";
  6. string contra = "Смертельный захват";
  7. string recovery = "ВременНое кольцо";
  8. float healthboss = 2500;
  9. int damegeboss = rand.Next(50, 100);
  10. float health = 500;
  11. float damege1 = 100;
  12. float damege2 = 200;
  13. float hill = 300;
  14.  
  15. Console.Write("Назови себя могучий воин.\nВаш ник - ");
  16. name = Console.ReadLine();
  17. Console.WriteLine(name + ", герой ты или глупец, предстоит ещё выяснить. " +
  18. "Освободи нашу деревушку\nдеревушку, от " + boss + " докажи своё происхождение!");
  19. Console.WriteLine(name + " у тебя есть две способности. Первая и\nосновная: "
  20. + ability + " и вторая мощнее: " + contra + ". Да начнётся битва!!!");
  21. Console.WriteLine(boss + " у него " + healthboss + "хп. И мощность удара " + damegeboss + ".");
  22. Console.WriteLine("Твой удар " + damege1 + " это основной. " +
  23. "После его использования используй второй удар, его мощность " + damege2 + ", и твой " +
  24. "запас жизни " + health + ".\nУспехов!!!");
  25. Console.WriteLine("Начни бой используя навыки.");
  26. Console.Write(" 1 " + ability + ":");
  27. Console.Write(" 2 " + contra + ":");
  28. Console.WriteLine(" Так же ты можешь спрятаться во " + recovery + " чтобы\n пополнить запас жизни.");
  29. Console.Write(" 8 " + recovery + ".");
  30.  
  31. userInput = Console.ReadLine();
  32.  
  33. while (health >= 0 && healthboss >= 0 && health > 150)
  34. {
  35. Console.WriteLine(boss + healthboss);
  36. Console.WriteLine(name + health);
  37. switch (userInput)
  38. {
  39.  
  40. case "1":
  41. if (health >= 0)
  42. {
  43. healthboss -= damege1;
  44. health -= rand.Next(damegeboss);
  45. Console.WriteLine(boss + healthboss);
  46. Console.WriteLine(name + health);
  47. }
  48. break;
  49. case "2":
  50. if (health >= 0)
  51. {
  52. healthboss -= damege2;
  53. health -= rand.Next(damegeboss);
  54. Console.WriteLine(boss + healthboss);
  55. Console.WriteLine(name + health);
  56. }
  57. break;
  58. case "8":
  59. if (health > 150)
  60. {
  61. health += hill;
  62. Console.WriteLine("Вы скрылись во " + recovery + ". ");
  63. Console.WriteLine("Вы пополнили жизни на " + hill + ".");
  64. Console.WriteLine(boss + healthboss);
  65. Console.WriteLine(name + health);
  66. }
  67. break;
  68. default:
  69. Console.WriteLine("Вы не использовали ещё основной навык.");
  70. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement