Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Boss
- {
- class Program
- {
- static void Main(string[] args)
- {
- const string SpellCardamon = "кардамон";
- const string SpellCurkuma = "куркума";
- const string SpellSunely = "сунели";
- const string SpellPaprika = "паприка";
- int DurationWetLand = 3;
- int FlashDamage = 200;
- int KappaDamage = 300;
- int HealthRestore = 50;
- int bossAttackMin = 100;
- int bossAttackMax = 200;
- int bossAttack = 0;
- int bossHealth = 1000;
- int heroHealth = 800;
- int heroAttack;
- int wetLandCount = 0;
- bool shieldPlaced = false;
- bool shieldRecharging = false;
- bool isSpellWrong = true;
- string heroSpell;
- Random random = new Random();
- Console.WriteLine($"{SpellCardamon} - проливает дождь над врагом, земля под ногами цели становится сырой на {DurationWetLand - 1} хода\n" +
- $"{SpellCurkuma} - удар молний - по всем бойцам {FlashDamage}хр, стоящим на сырой земле - двойной урон\n" +
- $"{SpellSunely} - призыв каппы (только в сырую погоду, в течение хода после дождя) наносит урон врагу {KappaDamage}хр\n" +
- $"{SpellPaprika} - устанавливает огненный щит - неуязвимость в течение хода, восстановление здоровья на {HealthRestore}хр (время перезарядки - 1 ход)");
- Console.WriteLine($"Герой: {heroHealth}. Босс: {bossHealth}.");
- while ((heroHealth > 0) && (bossHealth > 0))
- {
- if (wetLandCount != 0)
- {
- wetLandCount--;
- }
- if (shieldRecharging)
- {
- shieldRecharging = false;
- }
- if (shieldPlaced)
- {
- shieldPlaced = false;
- shieldRecharging = true;
- }
- heroAttack = 0;
- bossAttack = 0;
- isSpellWrong = true;
- while (isSpellWrong)
- {
- Console.Write("Введите заклинание: ");
- heroSpell = Console.ReadLine();
- switch (heroSpell)
- {
- case SpellCardamon:
- wetLandCount = DurationWetLand;
- isSpellWrong = false;
- break;
- case SpellCurkuma:
- heroAttack += FlashDamage;
- bossAttack += FlashDamage;
- isSpellWrong = false;
- if (wetLandCount != 0)
- heroAttack += FlashDamage;
- break;
- case SpellSunely:
- if (wetLandCount == 0)
- {
- break;
- }
- heroAttack += KappaDamage;
- isSpellWrong = false;
- break;
- case SpellPaprika:
- if (shieldRecharging)
- {
- break;
- }
- shieldPlaced = true;
- heroHealth += HealthRestore;
- isSpellWrong = false;
- break;
- }
- }
- bossAttack += random.Next(bossAttackMin, bossAttackMax);
- if (shieldPlaced)
- bossAttack = 0;
- heroHealth -= bossAttack;
- bossHealth -= heroAttack;
- Console.WriteLine($"Герой: {heroHealth}. Босс: {bossHealth}.");
- }
- if ((heroHealth <= 0) && (bossHealth <= 0))
- {
- Console.WriteLine("Герой погиб, но защитил мир ценой своей жизни!");
- }
- else if (heroHealth <= 0)
- {
- Console.WriteLine("Герой погиб, Владыка демонов захватил мир!");
- }
- else
- {
- Console.WriteLine("Владыка демонов повержен!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement