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 egor
- {
- class Program
- {
- static void Main(string[] args)
- }
- int heroHealth = 500;
- int bossHealth = 1000;
- int heroDamage = 85;
- int bossDamage = 132;
- int shadowSpirit = 0;
- int heroSpell = 0;
- Console.WriteLine("Легенда: Вы – теневой маг и у вас в арсенале есть несколько заклинаний," +
- " которые вы можете использовать против босса." +
- " Вы должны уничтожить босса и только после этого будет вам покой.");
- while (heroHealth > 0 && bossHealth > 0)
- {
- Console.WriteLine("Ваше здоровье: " + heroHealth + ". Здоровье босса: " + bossHealth + " урон босса: " + bossDamage );
- Console.WriteLine("Что - бы использовать заклятие введите номер закленнания");
- Console.WriteLine("№1. Обычная Атака (наносит " + heroDamage + " урона).\n" +
- "№2. Рашамон – призывает теневого духа для нанесения атаки (Отнимает 100 хп игроку, дух призывается на 3 раза использование закленания)\n" +
- "№3. Хуганзакура (Может быть выполнен только после призыва теневого духа), наносит 100 ед. урона\n" +
- "№4. Межпространственный разлом – позволяет скрыться в разломе и восстановить 250 хп. Урон босса по вам не проходит");
- int inputUser = Convert.ToInt32(Console.ReadLine());
- if (inputUser == 1)
- {
- bossHealth -= heroDamage;
- heroSpell = 1;
- }
- else if (inputUser == 2)
- {
- heroHealth -= 100;
- shadowSpirit = 3;
- heroSpell = 2;
- }
- else if (inputUser == 3 && shadowSpirit > 0)
- {
- bossHealth -= 170;
- heroSpell = 3;
- shadowSpirit -= 1;
- }
- else if (inputUser == 3 && shadowSpirit == 0)
- {
- Console.WriteLine("вы не можете использовать это заклятие");
- heroSpell = 0;
- }
- else if (inputUser == 4)
- {
- heroHealth += 200;
- heroSpell = 4;
- }
- else
- {
- heroSpell = 0;
- Console.WriteLine("выберети атаку");
- }
- if (heroSpell != 0 && heroSpell != 4)
- {
- heroHealth -= bossDamage;
- }
- }
- if (heroHealth < 0)
- {
- Console.WriteLine("Вы погибли");
- }
- else if(bossHealth < 0)
- {
- Console.WriteLine("Вы победили");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment