Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- enum Skills
- {
- HolyElixir = 1,
- Friends,
- SecretWeapon,
- UnusuaHit
- }
- static void Main(string[] args)
- {
- Console.WriteLine("МАГИЧЕСКИЙ УЛИЧНЫЙ КЛУБ\n" +
- " ( 0_0) (0_0 )\n" +
- " ( ง )ง ୧( ୧ )\n" +
- " / \\ / \\\n");
- Random random = new Random();
- int maxhealth = 130;
- int minhealth = 80;
- int maxEnemyDamage = 40;
- int minEnemyDamage = 15;
- int maxUserDamage = 35;
- int minUserDamage = 10;
- int maxArmor = 75;
- int minArmor = 25;
- bool isUsedSkill = false;
- float userHealth = random.Next(minhealth, maxhealth);
- int userDamage = random.Next(minUserDamage, maxUserDamage);
- int userArmor = random.Next(minArmor, maxArmor);
- int userInput;
- float enemyHealth = random.Next(minhealth, maxhealth);
- int enemyDamage = random.Next(minEnemyDamage, maxEnemyDamage);
- int enemyArmor = random.Next(minArmor, maxArmor);
- int percentages = 100;
- int maxCountOfElixirs = 2;
- int countOfElixirsInventory = maxCountOfElixirs;
- int countOfUsedElixirs = 0;
- int countOfElixirsForUseSkillFriends = 2;
- int countWarriors = 2;
- bool isActiveFriends = false;
- bool isActiveSecretWeapon = false;
- int recoveryPercentage = 10;
- int friendsDamage = 20;
- int secretWeaponDamage = 6;
- int reductionDamage = 3;
- Console.WriteLine($"Ваше обмундирование:\n\tHealth - {userHealth}\n\tArmor - {userArmor}\n\tDamage - {userDamage}");
- Console.WriteLine($"Обмундирование властелина помойки №38:\n\tHealth - {enemyHealth}\n\tArmor - {enemyArmor}\n\tDamage - {enemyDamage}");
- Console.WriteLine("Нажмите любую кнопку для начала боя.");
- Console.ReadLine();
- while (enemyHealth > 0 && userHealth > 0)
- {
- Console.WriteLine("Статистика:\n" +
- $"Ваше здоровье - {userHealth}\tЗдоровье врага - {enemyHealth}");
- float damage;
- damage = Convert.ToSingle(random.Next(0, enemyDamage)) / percentages * userArmor;
- userHealth -= damage;
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine("Урон врага - " + damage);
- Console.ForegroundColor = ConsoleColor.White;
- while (isUsedSkill == false)
- {
- Console.WriteLine($"{(int)Skills.HolyElixir}) Святой элексир \"Алтус\"- элексир жизни. (У вас {countOfElixirsInventory} шт.)\n" +
- "Эффекты:\n" +
- "+\n" +
- $"\t* Восстанавливает жизни герою на {recoveryPercentage}% от вашего здоровья на момет использования. \n" +
- "-\n" +
- $"\t* Уменьшается урон по врагу на {reductionDamage}.\n\n" +
- $"{(int)Skills.Friends}) Братва - к вашему сражению присоединяются пьяные собутыльники Колька и Джамал.\n" +
- "Условия: У вас должны быть 2 элексира жизни \"Алтус\" для привлечения внимания союзников\n" +
- "Эффекты:\n" +
- "+\n" +
- "\t* Наносят урон врагу. \n" +
- "-\n" +
- "\t* Могут увидеть врага в вас.\n\n" +
- $"{(int)Skills.SecretWeapon}) Секретное химическое оружие – вы отрыгиваете облако газа.\n" +
- "Условия: Употребите все элексиры жизни \"Алтус\"\n" +
- "Эффекты:\n" +
- "+\n" +
- "\t* Наносит одинаковый урон врагу. \n" +
- $"{(int)Skills.UnusuaHit}) Необычный удар - обычный удар с необычным прошлым.");
- Console.Write("Выберите способность:");
- userInput = Convert.ToInt32(Console.ReadLine());
- if (userInput == (int)Skills.HolyElixir && countOfElixirsInventory > 0)
- {
- Console.WriteLine("Умение \"Святой элексир \"Алтус\"\" применено");
- float addHealth = userHealth / percentages * recoveryPercentage;
- userHealth += addHealth;
- countOfElixirsInventory--;
- countOfUsedElixirs++;
- userDamage -= reductionDamage;
- isUsedSkill = true;
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine($"Вы востановили здоровья на {addHealth}");
- Console.ForegroundColor = ConsoleColor.White;
- }
- else if (userInput == (int)Skills.Friends && countOfElixirsInventory >= countOfElixirsForUseSkillFriends)
- {
- Console.WriteLine("Умение \"Братва\" применено");
- isUsedSkill = true;
- isActiveFriends = true;
- countOfElixirsInventory -= countOfElixirsForUseSkillFriends;
- }
- else if (userInput == (int)Skills.SecretWeapon && countOfUsedElixirs == maxCountOfElixirs)
- {
- Console.WriteLine("Умение \"Секретное химическое оружие\" применено");
- isUsedSkill = true;
- isActiveSecretWeapon = true;
- }
- else if (userInput == (int)Skills.UnusuaHit)
- {
- Console.WriteLine("Умение \"Необычный удар\" применено");
- damage = Convert.ToSingle(random.Next(0, userDamage)) / percentages * enemyArmor;
- enemyHealth -= damage;
- isUsedSkill = true;
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine("Вы нанесли - " + damage);
- Console.ForegroundColor = ConsoleColor.White;
- }
- else
- {
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine("В применение данной способности отказано. Проверти условия использования.");
- Console.ForegroundColor = ConsoleColor.White;
- }
- }
- if (isActiveFriends == true)
- {
- bool attackingYou = Convert.ToBoolean(random.Next(0, countWarriors));
- if (attackingYou)
- {
- damage = Convert.ToSingle(random.Next(0, friendsDamage)) / percentages * userArmor;
- userHealth -= damage;
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine("Урон вам от Кольки и Джамала - " + damage);
- Console.ForegroundColor = ConsoleColor.White;
- }
- else
- {
- damage = Convert.ToSingle(random.Next(0, userDamage)) / percentages * enemyArmor;
- enemyHealth -= damage;
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine("Урон врагу от Кольки и Джамала - " + damage);
- Console.ForegroundColor = ConsoleColor.White;
- }
- }
- if (isActiveSecretWeapon == true)
- {
- damage = Convert.ToSingle(secretWeaponDamage) / percentages * enemyArmor;
- userHealth -= damage;
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine("Урон от газа - " + damage);
- Console.ForegroundColor = ConsoleColor.White;
- }
- isUsedSkill = false;
- }
- Console.Clear();
- if (userHealth <= 0 && enemyHealth <= 0)
- {
- Console.WriteLine("Вы и ваш враг потеряли район");
- }
- else if (userHealth <= 0)
- {
- Console.WriteLine("Вы потеряли район");
- }
- else
- {
- Console.WriteLine("Вы отбили атаку врага и захватили его район.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement