Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Бой_с_боссом
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Добро пожаловать. Выберите желаемое действие цифрой");
- Console.WriteLine("1)Слабый удар - не потребляет ману");
- Console.WriteLine("2)Средний удар - потребляет 15 единиц маны");
- Console.WriteLine("3)Ульта - сильная атака. Требуется поставить печать силы. Потребляет 50 единиц маны");
- Console.WriteLine("4)Печать силы - сила удара повышается на 5 единиц. Открывает доступ к ульте. Потребляет 40 единиц маны");
- Console.WriteLine("5)Зелье маны");
- Console.WriteLine("6)Зелье лечения");
- string commands;
- int healthPotion = 3;
- int manaPotion = 3;
- bool printPermission = true;
- bool ultimateAbilityPermission = false;
- bool increaseInImpactForce = false;
- Random rand = new Random();
- int healthBoss = rand.Next(150, 201);
- int healthMage = rand.Next(100, 151);
- int damageBoss = rand.Next(20, 35);
- int weakStrikeWizard = rand.Next(0, 10);
- int middleStrikeWizard = rand.Next(0, 15);
- int ultimateAbility = rand.Next(30, 50);
- int treatment = rand.Next(30, 101);
- int mana = rand.Next(100, 201);
- int manaReplenishment = rand.Next(30, 101);
- Console.WriteLine("Здоровье мага = " + healthMage + "единиц");
- Console.WriteLine("Мана мага = " + mana + "единиц");
- Console.WriteLine("Здоровье босса =" + healthBoss + "единиц");
- while (healthBoss > 0 && healthMage > 0)
- {
- commands = Console.ReadLine();
- switch (commands)
- {
- case "1":
- if (increaseInImpactForce)
- {
- weakStrikeWizard += 5;
- }
- healthBoss -= weakStrikeWizard;
- break;
- case "2":
- if (increaseInImpactForce)
- {
- middleStrikeWizard += 5;
- }
- if (mana > 15)
- {
- healthBoss -= middleStrikeWizard;
- mana -= 15;
- }
- else
- {
- Console.WriteLine("Не хвататет маны");
- }
- break;
- case "3":
- if (ultimateAbilityPermission && mana > 50)
- {
- healthBoss -= ultimateAbility;
- Console.WriteLine("Вы использовали ультимативный удар");
- mana -= 50;
- }
- else
- {
- Console.WriteLine("Не хватает маны, либо не поставлена печать силы");
- }
- break;
- case "4":
- if (printPermission && mana > 40)
- {
- Console.WriteLine("Вы поставили печать силы. Сила атаки увеличена на 5 единиц. Доступна ульта");
- printPermission = false;
- ultimateAbilityPermission = true;
- increaseInImpactForce = true;
- mana -= 40;
- }
- else
- {
- Console.WriteLine("Действие отменено. Печать силы уже поставлена");
- }
- break;
- case "5":
- if (manaPotion > 0)
- {
- Console.WriteLine("Вы пополнили ману на " + manaReplenishment + " единиц");
- mana += manaReplenishment;
- manaPotion -= 1;
- Console.WriteLine("Осталось " + manaPotion + " зелий маны");
- }
- else
- {
- Console.WriteLine("Действие отменено. Зелий маны больше не осталось");
- }
- break;
- case "6":
- if (healthPotion > 0)
- {
- Console.WriteLine("Вы подлечились на " + treatment + " единиц");
- healthMage += treatment;
- healthPotion -= 1;
- Console.WriteLine("Осталось " + healthPotion + " зелий здоровья");
- }
- else
- {
- Console.WriteLine("Действие отменено. Зелий здоровья больше не осталось");
- }
- break;
- }
- healthMage -= damageBoss;
- Console.WriteLine("Здоровье мага = " + healthMage);
- Console.WriteLine("Мана мага = " + mana + " единиц");
- Console.WriteLine("Здоровье босса = " + healthBoss);
- }
- if (healthBoss < 0 && healthMage < 0)
- {
- Console.WriteLine("Оба погибли. Ничья");
- }
- else if (healthMage < 0)
- {
- Console.WriteLine("Вы проиграли");
- }
- else if (healthBoss < 0)
- {
- Console.WriteLine("Вы победили");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment