using System.Collections.Generic;
public List<string> spells = new List<string>();
public string spellSelect;
public wizard(string _name)
spells.Add("Magic Bullet");
if (spellSlots > 0 && dead == false)
Console.WriteLine("Choose a spell by pressing the numbers:");
for (var i = 0; i < spells.Count; i++)
Console.WriteLine(' ' + Convert.ToString(i + 1) + ' ' + spells[i] + ';');
spellSelect = Console.ReadLine();
Console.Write(name + " has cast " + spells[Convert.ToInt32(spellSelect) - 1]);
Console.WriteLine("; spell slots are now at " + spellSlots);
healthCap = healthCap + 2;
Console.WriteLine(name + " have leveled up. you are now level " + level);
Console.WriteLine(name + " is out of spell slots");
Console.WriteLine(name + " has rested; their spell slots are at " + spellSlots);
public void damage(int damageTaken)
health = health - damageTaken;
Console.WriteLine(name + " has taken " + damageTaken + " damage. Health at " + health);
Console.WriteLine(name + " has died");
if (health <= healthCap && health >= 0)
Console.WriteLine("Input a number 1-3 to use a potion\n1:small 2:medium 3:big");
string answer = Console.ReadLine();
Console.WriteLine(potionPoints + "potion points remaining");
potionPoints = potionPoints - 2;
Console.WriteLine(potionPoints + "potion points remaining");
potionPoints = potionPoints - 3;
Console.WriteLine(potionPoints + "potion points remaining");
Console.WriteLine("health is now at " + health);
Console.WriteLine("you ded");
Console.WriteLine("already at max");
public static void Main()
Console.WriteLine("what is your wizards name?");
string userName = Console.ReadLine();
wizard wizard01 = new wizard(userName);
Random rndom = new Random();
string[] enemies = {"zombie", "skeleton", "spider"};
while (wizard01.dead == false)
Console.WriteLine("Press the numbers to make decisions.\n1.shop 2.Fight 3.introspect");
Console.WriteLine(wizard01.name + " is at level " + wizard01.level + " and " + wizard01.exp + " XP." + "\nThey also have an HP of " + wizard01.health + ", " + wizard01.potionPoints + " potion points and " + wizard01.Gold + " gold" + "\n1.shop 2.Fight 3.introspect");
int outPut = Convert.ToInt32(Console.ReadLine());
if (outPut == 1 && fight == false)
Console.WriteLine("1, 2 gold: 1 point\n2, 4 gold: 2 points\n3, 6 gold: 3 points");
string answer = Console.ReadLine();
if (answer == "1" && wizard01.Gold >= 2)
wizard01.Gold = wizard01.Gold - 2;
else if (answer == "2" && wizard01.Gold >= 4)
wizard01.potionPoints = wizard01.potionPoints + 3;
wizard01.Gold = wizard01.Gold - 4;
else if (answer == "3" && wizard01.Gold >= 6)
wizard01.potionPoints = wizard01.potionPoints + 5;
wizard01.Gold = wizard01.Gold - 6;
Console.WriteLine("Not enough gold");
else if (outPut == 3 && fight == false)
Console.WriteLine("an enemy has appeared");
float EnemHp = wizard01.level + 5;
int EnemDg = wizard01.level;
while (EnemHp > 0 & wizard01.dead == false)
Console.WriteLine("What do you want to do? \n1: Spell \n2: rest \n3: potion \n4: introspect");
int fightUI = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(wizard01.name + " is at level " + wizard01.level + " and " + wizard01.exp + " XP." + "\nThey also have an HP of " + wizard01.health + ", " + wizard01.potionPoints + " potion points and " + wizard01.Gold + " gold");
if (Convert.ToInt32(wizard01.spellSelect) == 1 && fightUI == 1 && wizard01.spellSlots >= 1)
if (rndom.Next(0,2) == 0)
EnemHp = EnemHp - 3 * (wizard01.level * 0.8f);
Console.WriteLine("Critical Hit!!");
EnemHp = EnemHp - 2 * (wizard01.level * 0.8f);
else if (Convert.ToInt32(wizard01.spellSelect) == 2 && fightUI == 1 && wizard01.spellSlots >= 1)
if (rndom.Next(0,2) == 1)
EnemHp = EnemHp - 3 * (wizard01.level * 0.8f);
Console.WriteLine("Critical Hit!!");
EnemHp = EnemHp - 2 * (wizard01.level * 0.8f);
if (introspect == false) {
if (wizard01.dead == false)
Console.WriteLine("The " + enemies[rndom.Next(0,3)] + " has died. YAY");
wizard01.Gold = wizard01.Gold + rndom.Next(2,6);
Console.WriteLine("You gained " + wizard01.Gold + " gold\n ");