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)
- {
- string inputUser = "";
- string password = "";
- string name = "";
- string secretMessang = "НАРУТОООО!!!!";
- while(inputUser != "выход")
- {
- Console.WriteLine("1 - Задать имя.\n2 - Задать пароль.\n" +
- "3 - Вывести секретное сообщение (Что бы Получить секретное сообщение надо задать имя и пароль)" +
- "\n4 - Сыграть в игру \"Убей босса.\"\n5 - Поменять цвет шрифта.");
- Console.WriteLine("Что бы выйти из программы введите \"выход\"");
- Console.WriteLine("Ваше имя: " + name + "\nВаш пароль: ******");
- inputUser = Console.ReadLine();
- if (inputUser == "1")
- {
- Console.Write("Введите имя: ");
- name = Console.ReadLine();
- Console.Clear();
- }
- else if (inputUser == "2")
- {
- Console.Write("Введите пароль: ");
- password = Console.ReadLine();
- Console.Clear();
- }
- else if (inputUser == "3")
- {
- Console.Write("Введите имя: ");
- inputUser = Console.ReadLine();
- if (inputUser == name)
- {
- Console.Write("Ведите пароль: ");
- inputUser = Console.ReadLine();
- if (inputUser == password)
- {
- Console.WriteLine(secretMessang);
- Console.WriteLine("Нажмите любую кнопку что бы продолжить");
- Console.ReadLine();
- Console.Clear();
- }
- }
- }
- else if (inputUser == "4")
- {
- 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 хп. Урон босса по вам не проходит");
- inputUser = 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.WriteLine("Нажмите любую кнопку что бы продолжить");
- Console.ReadLine();
- Console.Clear();
- }
- else if (inputUser == "5")
- {
- Console.WriteLine("1 - Красный\n2 - Зеленый\n3 - Голубой");
- inputUser = Console.ReadLine();
- switch (inputUser)
- {
- case "1":
- Console.ForegroundColor = ConsoleColor.Red;
- break;
- case "2":
- Console.ForegroundColor = ConsoleColor.Green;
- break;
- case "3":
- Console.ForegroundColor = ConsoleColor.Blue;
- break;
- }
- Console.Clear();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment