Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Test
- {
- class Program
- {
- static void Main(string[] args)
- {
- int userInput;
- float bossHealth = 200;
- float playerHealth = 75;
- float bossDamage = 15;
- int scaleDmage = 2;
- int spellCharge = 0;
- int spellPoint;
- int spellCost;
- bool canCast = true;
- Console.WriteLine($"**Boss Health - {bossHealth} | Boss Damage - {bossDamage}\n**Player Health - {playerHealth}");
- while (playerHealth > 0 && bossHealth > 0)
- {
- Console.WriteLine();
- Console.WriteLine("Выберите заклинание:\n1 - Staff Shot(25 dmg/ x2 boss dmg) | 2 - Dismember[(25 heal/dmg) (spell cost - 1)]\n" +
- "3 - Cold Embrace(35 heal / 0 dmg) | 4 - Laguna[(50 dmg) (spell cost - 2)]");
- userInput = Convert.ToInt32(Console.ReadLine());
- switch (userInput)
- {
- case 1:
- Console.WriteLine("Вы использовали Staff Shot");
- spellPoint = 25;
- bossHealth -= spellPoint;
- playerHealth -= bossDamage * scaleDmage;
- spellCharge++;
- break;
- case 2:
- if (spellCharge >= 1)
- {
- Console.WriteLine("Вы использовали Dismember");
- spellCost = 1;
- spellCharge -= spellCost;
- spellPoint = 25;
- bossHealth -= spellPoint;
- playerHealth -= bossDamage - spellPoint;
- }
- else
- {
- Console.WriteLine("Недостаточно заряда для использования способности");
- playerHealth -= bossDamage;
- }
- break;
- case 3:
- if (canCast)
- {
- Console.WriteLine("Вы использовали Cold Embrace");
- spellPoint = 25;
- playerHealth += spellPoint;
- }
- else
- {
- Console.WriteLine("Вы не можете использовать эту способность два раза подряд!");
- }
- break;
- case 4:
- if (spellCharge >= 2)
- {
- Console.WriteLine("Вы использовали Laguna");
- spellCost = 1;
- spellCharge -= spellCost;
- spellPoint = 50;
- bossHealth -= spellPoint;
- playerHealth -= bossDamage;
- }
- else
- {
- Console.WriteLine("Недостаточно заряда для использования способности");
- playerHealth -= bossDamage;
- }
- break;
- default:
- Console.WriteLine("Неверно выбранное заклинание. Попробуйте ещё раз.");
- break;
- }
- if(userInput == 3 || userInput > 4)
- {
- canCast = false;
- }
- else
- {
- canCast = true;
- }
- Console.WriteLine($"\nBoss Health - {bossHealth} | Player Health - {playerHealth} Spell Charge - {spellCharge}");
- }
- if (playerHealth < 0 && bossHealth < 0)
- {
- Console.WriteLine("Ничья");
- }
- else if (playerHealth > 0)
- {
- Console.WriteLine("Вы Победили!");
- }
- else
- {
- Console.WriteLine("Вы проиграли.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment