Advertisement
TargeTPoweR

Untitled

Mar 23rd, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Tasks
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int playerHealth = 100;
  14. int enemyHealth = 100;
  15. int round = 0;
  16. string playerName = "Бомж Аркадий";
  17. string enemyName = "Бомж Иннокентий";
  18. Random rand1 = new Random();
  19. Console.WriteLine("Восстали машины из пепла ядерного огня!");
  20. Console.WriteLine("И началась война за помойки на районе.");
  21.  
  22. while (round >= 0)
  23. {
  24. round++;
  25. int playerCast = rand1.Next(1, 8);
  26. int playerDamage = 4;
  27. int enemyDamage = rand1.Next(5, 10);
  28.  
  29. if(round % 6 ==0)
  30. {
  31. Console.WriteLine($"{playerName} озверел и включил <Режим Берсерка>");
  32. playerDamage += 10;
  33. }
  34.  
  35. if (playerCast == 1)
  36. {
  37. Console.WriteLine($"{playerName} применил способность <С вертухана в ебасосину>");
  38. playerDamage = 15;
  39. }
  40. else if (playerCast == 3)
  41. {
  42. Console.WriteLine($"{playerName} применил способность <Похмелиться>");
  43. playerHealth += 10;
  44. Console.WriteLine("Ваши жизни увеличились на 10.");
  45. }
  46. else if (playerCast == 5)
  47. {
  48. Console.WriteLine($"{playerName} применил способность <Подскользнуться на кожуре>");
  49. playerDamage = 0;
  50.  
  51. }
  52. else if ( playerCast == 7)
  53. {
  54. Console.WriteLine($"{playerName} применил способность <Спрятаться за угол>");
  55. enemyDamage = 0;
  56. }
  57.  
  58. playerHealth -= enemyDamage;
  59. enemyHealth -= playerDamage;
  60. Console.WriteLine($"Бомж {enemyName} ударил вас на {enemyDamage}.");
  61. Console.WriteLine($"Бомж {playerName} ударил врага на {playerDamage}.");
  62. Console.WriteLine($"У бомжа {playerName} осталось{playerHealth} здоровья.");
  63. Console.WriteLine($"У бомжа {enemyName} осталось{enemyHealth} здоровья.");
  64. Console.WriteLine("______________");
  65.  
  66. if (playerHealth <= 0)
  67. {
  68. Console.WriteLine($"Победил {enemyName}.");
  69. break;
  70.  
  71. }
  72. if (enemyHealth <= 0)
  73. {
  74. Console.WriteLine($"Победил {playerName}.");
  75. break;
  76. }
  77. }
  78. }
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement