Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 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. bool notused = damege1 >= damege2;
  15. bool itslife = health < 150;
  16.  
  17. Console.Write("Назови себя могучий воин.\nВаш ник - ");
  18. name = Console.ReadLine();
  19. Console.WriteLine(name + ", герой ты или глупец, предстоит ещё выяснить. " +
  20. "Освободи нашу\nдеревушку, от " + boss + " докажи своё происхождение!");
  21. Console.WriteLine(name + " у тебя есть две способности. Первая и\nосновная: "
  22. + ability + " и вторая мощнее: " + contra + ". Да начнётся битва!!!");
  23. Console.WriteLine(boss + " у него " + healthboss + "хп. И мощность удара " + damegeboss + ".");
  24. Console.WriteLine("Твой удар " + damege1 + " это основной. " +
  25. "После его использования используй второй удар, его мощность " + damege2 + ", и твой " +
  26. "запас жизни " + health + ".\nУспехов!!!");
  27. Console.WriteLine("Начни бой используя навыки.");
  28. Console.Write(" 1 " + ability + ":");
  29. Console.Write(" 2 " + contra + ":");
  30. Console.WriteLine(" Так же ты можешь спрятаться во " + recovery + " чтобы\n пополнить запас жизни.");
  31. Console.Write(" 8 " + recovery + ".");
  32. userInput = Console.ReadLine();
  33.  
  34. while (health >= 0 && healthboss <= 0 || health <= 0 && healthboss >= 0 || damege1 >= damege2 || health > 150 || health < 150)
  35. {
  36. healthboss -= damege1;
  37. health -= rand.Next(damegeboss);
  38. healthboss -= damege2;
  39. health -= rand.Next(damegeboss);
  40. health += hill;
  41. Console.WriteLine((health <= 0 && healthboss <= 0) + " О вас не будут слагать легенды!");
  42. Console.WriteLine((health <= 0 || healthboss >= 0) + "Вы растоптаны " + boss);
  43. Console.WriteLine((health >= 0 && healthboss <= 0) + "Вам поставят памятник " + name + ". Тебе удалось склонить " +
  44. "\nчудище \"" + boss + "\" к твоим ногам.");
  45.  
  46. switch (userInput)
  47.  
  48. {
  49. case "1":
  50. if (health >= 0 && healthboss <= 0 || health <= 0 && healthboss >= 0|| health == 0 && healthboss == 0)
  51. {
  52. Console.WriteLine(boss + healthboss);
  53. Console.WriteLine(name + health);
  54. Console.WriteLine((health <= 0 && healthboss <= 0) + " О вас не будут слагать легенды!");
  55. }
  56. break;
  57.  
  58. case "2":
  59. if ((damege1 >= damege2))
  60.  
  61. Console.WriteLine(notused + " не использовано умение " + ability);
  62.  
  63. if ((damege1 <= damege2))
  64. {
  65. Console.WriteLine(boss + healthboss);
  66. Console.WriteLine(name + health);
  67. }
  68. break;
  69.  
  70. case "8":
  71. if (health > 150)
  72. {
  73. Console.WriteLine("У вас ещё всё хорошо!");
  74. Console.WriteLine(boss + healthboss);
  75. Console.WriteLine(name + health);
  76. }
  77. if (health < 150)
  78. {
  79. Console.WriteLine("Вы скрылись во " + recovery + ". ");
  80. Console.WriteLine("Вы пополнили жизни на " + hill + ".");
  81. Console.WriteLine(boss + healthboss);
  82. Console.WriteLine(name + health);
  83. }
  84. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement