Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Random rand = new Random();
- string boss = "Неуязвимый вепрь";
- string name;
- string userInput;
- string ability = "Крутящий - вертящий";
- string contra = "Смертельный захват";
- string recovery = "ВременНое кольцо";
- float healthboss = 2500;
- int damegeboss = rand.Next(50, 100);
- float health = 500;
- float damege1 = 100;
- float damege2 = 200;
- float hill = 300;
- Console.Write("Назови себя могучий воин.\nВаш ник - ");
- name = Console.ReadLine();
- Console.WriteLine(name + ", герой ты или глупец, предстоит ещё выяснить. " +
- "Освободи нашу деревушку\nдеревушку, от " + boss + " докажи своё происхождение!");
- Console.WriteLine(name + " у тебя есть две способности. Первая и\nосновная: "
- + ability + " и вторая мощнее: " + contra + ". Да начнётся битва!!!");
- Console.WriteLine(boss + " у него " + healthboss + "хп. И мощность удара " + damegeboss + ".");
- Console.WriteLine("Твой удар " + damege1 + " это основной. " +
- "После его использования используй второй удар, его мощность " + damege2 + ", и твой " +
- "запас жизни " + health + ".\nУспехов!!!");
- Console.WriteLine("Начни бой используя навыки.");
- Console.Write(" 1 " + ability + ":");
- Console.Write(" 2 " + contra + ":");
- Console.WriteLine(" Так же ты можешь спрятаться во " + recovery + " чтобы\n пополнить запас жизни.");
- Console.Write(" 8 " + recovery + ".");
- userInput = Console.ReadLine();
- while (health >= 0 && healthboss >= 0 && health > 150)
- {
- Console.WriteLine(boss + healthboss);
- Console.WriteLine(name + health);
- switch (userInput)
- {
- case "1":
- if (health >= 0)
- {
- healthboss -= damege1;
- health -= rand.Next(damegeboss);
- Console.WriteLine(boss + healthboss);
- Console.WriteLine(name + health);
- }
- break;
- case "2":
- if (health >= 0)
- {
- healthboss -= damege2;
- health -= rand.Next(damegeboss);
- Console.WriteLine(boss + healthboss);
- Console.WriteLine(name + health);
- }
- break;
- case "8":
- if (health > 150)
- {
- health += hill;
- Console.WriteLine("Вы скрылись во " + recovery + ". ");
- Console.WriteLine("Вы пополнили жизни на " + hill + ".");
- Console.WriteLine(boss + healthboss);
- Console.WriteLine(name + health);
- }
- break;
- default:
- Console.WriteLine("Вы не использовали ещё основной навык.");
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement