Kenkaster001

Untitled

Aug 8th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.74 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 Sevilla
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int choice, choice1, hp = 100, hp1 = 100;
  14. Console.WriteLine("Welcome to L'amour");
  15. Console.ReadKey();
  16. Console.WriteLine("1. Character 1");
  17. Console.WriteLine("2. Character 2");
  18. Console.WriteLine("3. Character 3");
  19. Console.WriteLine("4. Character 4");
  20. Console.Write("Choose your character. . .");
  21. choice = int.Parse(Console.ReadLine());
  22. if (choice == 1)
  23. {
  24. hp = 100;
  25. Console.WriteLine("You have picked player 1");
  26. Console.WriteLine("Player 1 has " + hp + "HP");
  27. Console.ReadKey();
  28. }
  29. else if (choice == 1)
  30. {
  31. hp = 120;
  32. Console.WriteLine("You have picked player 2");
  33. Console.WriteLine("Player 1 has " + hp + "HP");
  34. Console.ReadKey();
  35. }
  36. else if (choice == 1)
  37. {
  38. hp = 90;
  39. Console.WriteLine("You have picked player 2");
  40. Console.WriteLine("Player 1 has " + hp + "HP");
  41. Console.ReadKey();
  42. }
  43. else if (choice == 1)
  44. {
  45. hp = 80;
  46. Console.WriteLine("You have picked player 2");
  47. Console.WriteLine("Player 1 has " + hp + "HP");
  48. Console.ReadKey();
  49. }
  50.  
  51. Console.Write("Choose another character. . . ");
  52. choice1 = int.Parse(Console.ReadLine());
  53. if (choice1 == 1)
  54. {
  55. hp1 = 100;
  56. Console.WriteLine("You have picked player 1");
  57. Console.WriteLine("Player 1 has " + hp + "HP");
  58. Console.ReadKey();
  59. }
  60. else if (choice1 == 1)
  61. {
  62. hp1 = 120;
  63. Console.WriteLine("You have picked player 2");
  64. Console.WriteLine("Player 1 has " + hp + "HP");
  65. Console.ReadKey();
  66. }
  67. else if (choice1 == 1)
  68. {
  69. hp1 = 90;
  70. Console.WriteLine("You have picked player 2");
  71. Console.WriteLine("Player 1 has " + hp + "HP");
  72. Console.ReadKey();
  73. }
  74. else if (choice1 == 1)
  75. {
  76. hp1 = 80;
  77. Console.WriteLine("You have picked player 2");
  78. Console.WriteLine("Player 1 has " + hp + "HP");
  79. Console.ReadKey();
  80. }
  81. bool game = true;
  82.  
  83. while (game)
  84. {
  85. int move;
  86. Console.WriteLine("Player 1 Move. . .");
  87. Console.WriteLine("Attack 1");
  88. Console.WriteLine("Attack 2");
  89. Console.WriteLine("Attack 3");
  90. Console.WriteLine("Attack 4");
  91. Console.Write("What is your move?: ");
  92. move = int.Parse(Console.ReadLine());
  93. if (move == 1)
  94. {
  95. hp1 -= 10;
  96. Console.WriteLine("10 damage to player 2");
  97. Console.ReadKey();
  98. }
  99. else if (move == 2)
  100. {
  101. hp1 -= 15;
  102. Console.WriteLine("15 damage to player 2");
  103. Console.ReadKey();
  104. }
  105. else if (move == 3)
  106. {
  107. hp1 -= 20;
  108. Console.WriteLine("20 damage to player 2");
  109. Console.ReadKey();
  110. }
  111. else if (move == 4)
  112. {
  113. hp1 -= 25;
  114. Console.WriteLine("25 damage to player 2");
  115. Console.ReadKey();
  116. }
  117.  
  118. if (hp1 <= 0)
  119. {
  120. Console.WriteLine("Player 2 loses. . . ");
  121. Console.ReadKey();
  122. break;
  123. }
  124.  
  125. int move1;
  126. Console.WriteLine("Player 2 move. . .");
  127. Console.WriteLine("Attack 1");
  128. Console.WriteLine("Attack 2");
  129. Console.WriteLine("Attack 3");
  130. Console.WriteLine("Attack 4");
  131. move1 = int.Parse(Console.ReadLine());
  132. if (move1 == 1)
  133. {
  134. hp -= 10;
  135. Console.WriteLine("10 damage to player 1");
  136. Console.ReadKey();
  137. }
  138. else if (move1 == 2)
  139. {
  140. hp -= 15;
  141. Console.WriteLine("15 damage to player 1");
  142. Console.ReadKey();
  143. }
  144. else if (move1 == 3)
  145. {
  146. hp -= 20;
  147. Console.WriteLine("20 damage to player 1");
  148. Console.ReadKey();
  149. }
  150. else if (move1 == 4)
  151. {
  152. hp -= 25;
  153. Console.WriteLine("25 damage to player 1");
  154. Console.ReadKey();
  155. }
  156.  
  157. if (hp <= 0)
  158. {
  159. Console.WriteLine("Player 1 loses. . . ");
  160. Console.ReadKey();
  161. break;
  162. }
  163. }
  164.  
  165. Console.WriteLine("Thank you for playing our game. . . ");
  166. Console.ReadKey();
  167. }
  168. }
  169. }
Add Comment
Please, Sign In to add comment