Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace C_Sharp_Junior
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Вы – теневой маг и у вас в арсенале есть несколько заклинаний, \n" +
- "которые вы можете использовать против Босса. Вы должны уничтожить босса\n" +
- "и только после этого будет вам покой.\n" +
- "Босс - здаравенный орк!!!!!\nПора убить эту тварь!");
- int healthUser = 1000;
- int healthOrc = 1000;
- int damageSpell = 100;
- int minDamageOrc = 40;
- int maxDamageOrc = 80;
- int minDamageUser = 20;
- int maxDamageUser = 45;
- Random random = new Random();
- int damageOrc = random.Next(minDamageOrc, maxDamageOrc);
- int damageUser = random.Next(minDamageUser, maxDamageUser);
- bool isRashamonCast = false;
- while (healthUser > 0 && healthOrc > 0)
- {
- Console.WriteLine("Ваше ХП:" + healthUser + "\nХП орка:" + healthOrc + "\nВыбирите заклянание:\n" +
- "1 - Крик души – обычный удар палкой\n" +
- "2 - Рашамон – призывает теневого духа для нанесения атаки (Отнимает 100 хп игроку)\n" +
- "3 - Хуганзакура (Может быть выполнен только после призыва теневого духа), наносит 100 ед. урона\n" +
- "4 - Межпространственный разлом – позволяет скрыться в разломе и восстановить 250 хп. Урон босса по вам не проходит");
- string userInpyt = Console.ReadLine();
- switch (userInpyt)
- {
- case "1":
- healthUser -= damageOrc;
- healthOrc -= damageUser;
- break;
- case "2":
- isRashamonCast = true;
- healthUser = healthUser - damageSpell;
- healthUser = healthUser - damageOrc;
- break;
- case "3":
- if (isRashamonCast == true)
- {
- healthOrc = healthOrc - damageSpell;
- healthUser = healthUser - damageOrc;
- isRashamonCast = false;
- }
- else if (isRashamonCast == false)
- {
- Console.WriteLine("Сначало озвучте заклинание <<Рашамон>>");
- }
- break;
- case "4":
- int RestoreHealthOrc = 50;
- int RestoreHealthUser = 250;
- healthUser = healthUser + RestoreHealthUser;
- healthOrc = healthOrc + RestoreHealthOrc;
- break;
- }
- }
- if (healthUser <= 0 && healthOrc <= 0)
- {
- Console.WriteLine("Итог битвы: НИЧЬЯ");
- }
- else if (healthUser <= 0)
- {
- Console.WriteLine("Итог битвы: ОРК ПОБЕДИЛ");
- }
- else if (healthOrc <= 0)
- {
- Console.WriteLine("Итог битвы: МАГ ПОБЕДИЛ");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement