generated from admin/template
Исправление оформления
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace stage2
|
||||
{
|
||||
class Stage2
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Введите имя покемона: ");
|
||||
string name = Console.ReadLine();
|
||||
Console.WriteLine("Введите название первой атаки покемона: ");
|
||||
string attack1Name = Console.ReadLine();
|
||||
Console.WriteLine("Введите название второй атаки покемона: ");
|
||||
string attack2Name = Console.ReadLine();
|
||||
Console.WriteLine("Введите очки здоровья покемона: ");
|
||||
int hp = int.Parse(Console.ReadLine());
|
||||
Console.WriteLine("Введите базовый урон второй атаки покемона: ");
|
||||
int attack2BaseDamage = int.Parse(Console.ReadLine());
|
||||
Console.WriteLine("Введите базовый урон входящей атаки противника: ");
|
||||
int incomingDamage = int.Parse(Console.ReadLine());
|
||||
|
||||
Console.WriteLine("Введите результат броска монеты (1 — Орёл, 0 — Решка)");
|
||||
int cointoss = int.Parse(Console.ReadLine());
|
||||
int cointoss1 = int.Parse(Console.ReadLine());
|
||||
Console.WriteLine("======================================================================");
|
||||
switch (cointoss)
|
||||
{
|
||||
case 1:
|
||||
int Weakness = incomingDamage * 2;
|
||||
Console.WriteLine("Расчёт: Боевой тип! Урон удваивается (x2).");
|
||||
break;
|
||||
case 2:
|
||||
int Resistance = incomingDamage - 20;
|
||||
Console.WriteLine("Расчёт: Стальной тип! Урон уменьшается на 20 (Resistance: -20).");
|
||||
break;
|
||||
case 3:
|
||||
Console.WriteLine("Расчёт: Обычный тип! Урон наносится без изменений. ");
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("Ошибка: Выбран неизвестный тип атаки!");
|
||||
break;
|
||||
}
|
||||
Console.WriteLine("[Атака 1: Электроудар]");
|
||||
if (cointoss == 1)
|
||||
{
|
||||
Console.WriteLine($"Бросок монеты (1 - Орёл, 0 - Решка): {cointoss}");
|
||||
Console.WriteLine("Результат: Активный Покемон противника парализован!");
|
||||
}
|
||||
else Console.WriteLine("Результат: Эффект паралича не сработал.");
|
||||
|
||||
Console.WriteLine("[Атака 2: Быстрая Атака]");
|
||||
if (cointoss1 == 1)
|
||||
{
|
||||
cointoss1 = attack2BaseDamage + 10;
|
||||
Console.WriteLine($"Бросок монеты (1 - Орёл, 0 - Решка): {cointoss}");
|
||||
Console.WriteLine($"Результат: Выпал орёл! Итоговый урон: {cointoss1}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"Результат: Выпала решка! Итоговый урон:{cointoss1}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user