using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace practic
{
class Program
{
public class Skill
{
public string Name, Enemy, Character;
public double Damage, AddArmor, ManaCost, Evasion, Heal, AddDamage;
public string ChanceToUse;
List<Skill> Spells = new List<Skill>
{
new Skill { Name = "Fireball" , Character = "User" , Damage = 250, ManaCost = 150 , ChanceToUse = "30% (0.7)"},
new Skill { Name = "Unbreakable" , Character = "User" , AddArmor = +20, ManaCost = 250 , ChanceToUse = "70% (0.3) if HP <=300 "},
new Skill { Name = "Grandma's Pies" , Character = "User" , Heal = +270, ManaCost = 300 , ChanceToUse = "30%(0.7)"},
new Skill { Name = "Beast Inside" , Character = "User" , AddDamage = +100, ManaCost = 250 , ChanceToUse = "20%(0.8)"},
new Skill { Name = "Team #7" , Character = "Enemy" , AddDamage = +100, ManaCost = 250 , ChanceToUse = "30%(0.7)"},
new Skill { Name = "Human Friend" , Character = "Enemy" , Damage = 250, ManaCost = 250 , ChanceToUse = "70%(0.3)"},
new Skill { Name = "Like a shadow" , Character = "Enemy" , Evasion = +5, ManaCost = 300 , ChanceToUse = "20%(0.8)"},
new Skill { Name = "Mother Killer" , Character = "Enemy" , Damage = 350, ManaCost = 400 , ChanceToUse = "30%(0.7)"}
};
static void Main(string[] args)
{
Random randomStats = new Random();
string userName = "Dreamer";
double userHP = 2000;
double userDamage = randomStats.Next(150, 170);
double userArmor = 80;
double userMana = 1200;
double randomChance = randomStats.Next(100);
string enemyName = "Dingo";
double enemyHP = 2000;
double enemyDamage = randomStats.Next(150, 170);
double enemyEvasion = 90;
double enemyMana = 1200;
Console.WriteLine(userName + " vs " + enemyName);
Console.WriteLine("\n" + userName + " имеет " + userHP + " HP ," + userArmor + " брони ," + userDamage + " физического урона и " + userMana + " маны.");
Console.WriteLine(enemyName + " имеет " + enemyHP + " HP ," + enemyEvasion + " уклонения ," + enemyDamage + " физического урона и " + enemyMana + " маны.");
Console.Write("\nPress Enter to start...");
Console.ReadLine();
Random ChanceToSpell = new Random();
float RandomValue = ChanceToSpell.Next(0, 2);
int FireballDamage = 250;
int FireballManaCost = 150;
float FireballChance = 0.7f;
int UnbreakableArmor = 20;
int UnbreakableManaCost = 250;
float UnbreakableChance = 0.3f;
float Grandma_PiesChance = 0.7f;
int Grandma_PiesHeal = 300;
float Grandma_PiesManaCost = 270;
int BeastInsideAddDamage = 100;
int BeastInsideManaCost = 250;
float BeastInsideChance = 0.8f;
int TeamAddDamage = 100;
int TeamManaCost = 250;
float TeamChance = 0.7f;
int HumanFriendDamage = 250;
int HumanFriendManaCost = 250;
float HumanFriendChance = 0.3f;
double Like_A_ShadowAddEvasion = 5;
int Like_A_ShadowManaCost = 300;
float Like_A_ShadowChance = 0.8f;
int MotherKillerDamage = 350;
int MotherKillerManaCost = 400;
float MotherKillerChance = 0.7f;
ExploreIf();
void ExploreIf()
{
while (userHP > 0 && enemyHP > 0)
{
userHP = userHP - ((enemyDamage) / 100 * userArmor);
if (randomChance <= enemyEvasion)
{
enemyHP = enemyHP - userDamage;
Console.WriteLine("\n" + userName + " получает урон в размере - " + enemyDamage + ".");
Console.WriteLine(enemyName + " получает урон в размере - " + userDamage + ".");
Console.WriteLine(userName + " have " + userHP + " HP and " + enemyName + " have " + enemyHP + " HP.");
}
else if (randomChance > enemyEvasion)
{
Console.WriteLine("\n" + userName + " промахнулся.");
Console.WriteLine(userName + " получает урон в размере - " + enemyDamage + ".");
Console.WriteLine(enemyName + " получает урон в размере - " + 0 + ".");
Console.WriteLine(userName + " have " + userHP + " HP and " + enemyName + " have " + enemyHP + " HP.");
}
if (RandomValue >= UnbreakableChance && userMana >= UnbreakableManaCost && userHP <= 300)
{
Console.WriteLine("\nDreamer: Ебать Жиррр!!");
userArmor = userArmor - UnbreakableArmor;
userMana = userMana - UnbreakableManaCost;
Console.WriteLine(userName + " получает + " + UnbreakableArmor + " брони. \nБроня " + userName + " составляет " + userArmor + ". Остаток маны = " + userMana + ".");
if (RandomValue >= BeastInsideChance && userMana >= BeastInsideManaCost)
{
Console.WriteLine("\nDreamer: I'm a ghoul , I'm a ghoul , I'm a ghoul!!");
userDamage = userDamage + BeastInsideAddDamage;
userMana = userMana - BeastInsideManaCost;
Console.WriteLine(userName + " получает + " + BeastInsideAddDamage + " дополнительного урона. \nУрон " + userName + " составляет " + userDamage + ". Остаток маны = " + userMana + ".");
if (RandomValue >= FireballChance && userMana >= FireballManaCost)
{
Console.WriteLine("\nDreamer: Fireball ёпта!!");
enemyHP = enemyHP - FireballDamage;
userMana = userMana - FireballManaCost;
Console.WriteLine(enemyName + " получает " + FireballDamage + " урона.");
Console.WriteLine("\n" + userName + " have " + userHP + " HP and " + enemyName + " have " + enemyHP + " HP. Остаток маны = " + userMana + ".");
if (RandomValue >= Grandma_PiesChance && userMana >= Grandma_PiesManaCost)
{
Console.WriteLine("\nDreamer: Хилимся живем Никита!");
userHP = userHP + Grandma_PiesHeal;
userMana = userMana - Grandma_PiesManaCost;
Console.WriteLine(userName + " получает + " + Grandma_PiesHeal + " здоровья.");
Console.WriteLine("\n" + userName + " have " + userHP + " HP and " + enemyName + " have " + enemyHP + " HP. Остаток маны = " + userMana + ".");
}
}
}
}
if (RandomValue >= TeamChance && enemyMana >= TeamManaCost)
{
Console.WriteLine("\nDingo: Братки подьехали.");
enemyDamage = enemyDamage + TeamAddDamage;
enemyMana = enemyMana - TeamManaCost;
Console.WriteLine(enemyName + " теперь сражается не в одиночку и имеет + " + TeamAddDamage + " дополнительного урона. \nУрон " + enemyName + " составялет " + enemyDamage + ". Остаток маны = " + enemyMana + ".");
if (RandomValue >= HumanFriendChance && enemyMana >= HumanFriendManaCost && enemyDamage >= 250)
{
Console.WriteLine("\nDingo: Животных в загон!");
userHP = userHP - HumanFriendDamage;
enemyMana = enemyMana - HumanFriendManaCost;
Console.WriteLine(userName + " получает " + HumanFriendDamage + " урона из-за командной атаки.");
Console.WriteLine("\n" + userName + " have " + userHP + " HP and " + enemyName + " have " + enemyHP + " HP. Остаток маны = " + enemyMana + ".");
if (RandomValue >= Like_A_ShadowChance && userMana >= Like_A_ShadowAddEvasion)
{
Console.WriteLine("\nDingo: Ну давай, покажи мне свои финты и пируэты. А я посмотрю.");
enemyEvasion = enemyEvasion - Like_A_ShadowAddEvasion;
enemyMana = enemyMana - Like_A_ShadowManaCost;
Console.WriteLine(enemyName + " получает + " + Like_A_ShadowAddEvasion + " дополнительного уклонения. \nУклонение " + enemyName + " составляет " + enemyEvasion + ". Остаток маны = " + enemyMana + ".");
if (RandomValue >= MotherKillerChance && userMana >= MotherKillerManaCost)
{
Console.WriteLine("\nDingo: Мать жива ??");
userHP = userHP - MotherKillerDamage;
enemyMana = enemyMana - MotherKillerManaCost;
Console.WriteLine(userName + " получает " + MotherKillerDamage + " урона из-за смерти матери.");
Console.WriteLine("\n" + userName + " have " + userHP + " HP and " + enemyName + " have " + enemyHP + " HP. Остаток маны = " + enemyMana + ".");
}
}
}
}
if (userHP <= 0 && enemyHP <= 0)
{
Console.WriteLine("Оба мертвы");
Console.WriteLine("\n" + userName + " have " + userHP + " HP and " + userMana + " маны" + "\n" + enemyName + " have " + enemyHP + " HP and " + enemyMana + " mana.");
}
else if (userHP <= 0)
{
Console.WriteLine("\n" + userName + " пал смертью храбрых!");
Console.WriteLine("\n" + userName + " have " + userHP + " HP and " + userMana + " маны " + "\n" + enemyName + " have " + enemyHP + " HP and " + enemyMana + "mana.");
}
else if (enemyHP <= 0)
{
Console.WriteLine("\n" + enemyName + " пал смертью храбрых!");
Console.WriteLine("\n" + userName + " have " + userHP + " HP and " + userMana + " маны" + "\n" + enemyName + " have " + enemyHP + " HP and " + enemyMana + " mana.");
}
}
}
}
}
}
}