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 + "\nhave leveled up. you are now level!!!\n" + 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();
if (answer == "1" && potionPoints >= 1)
Console.WriteLine(potionPoints + " potion points remaining");
else if (answer == "2" && potionPoints >= 2)
potionPoints = potionPoints - 2;
Console.WriteLine(potionPoints + " potion points remaining");
else if (answer == "3" && potionPoints >= 3)
potionPoints = potionPoints - 3;
Console.WriteLine(potionPoints + " potion points remaining");
Console.WriteLine("\nNot enough potion points!\n");
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);
int nameLength = userName.Length;
playerChange = playerChange + 2;
playerChange = playerChange + 1;
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 4.tutorial");
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");
Console.WriteLine("PlayerChange is " + playerChange);
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;
playerChange = playerChange + 2;
else if (answer == "3" && wizard01.Gold >= 6)
wizard01.potionPoints = wizard01.potionPoints + 5;
wizard01.Gold = wizard01.Gold - 6;
Console.WriteLine("Not enough gold");
playerChange = playerChange + 2;
else if (outPut == 3 && fight == false)
playerChange = playerChange + 2;
else if (outPut == 4 && fight == false && first == true)
playerChange = playerChange + 1;
Console.WriteLine("To play you press the number keys that correspond to an action. For example, pressing \"3\" in the home screen lets you see your stats,\nincluding health, level, and potion points. To drink a potion, you use potion points. small uses 1, medium uses 2, and big uses 3. \nYou also have spell slots. You start with 2, but get more the higher your level is. If you run out of spell slots you can't use spells\nSpells do damage to your enemy\nTRY USING INTROSPECT NOW!\n");
Console.WriteLine("PlayerChange is " + playerChange);
else if (outPut == 5 && fight == false)
Console.WriteLine("Debug mode activated");
int DebugMode = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Chose nothing");
wizard01.exp = wizard01.exp - wizard01.level;
wizard01.healthCap = wizard01.healthCap + 2;
Console.WriteLine("\n" + wizard01.name + " has leveled up. you are now level " + wizard01.level + "!!!!\n");
wizard01.exp = wizard01.exp + 0.3f;
Console.WriteLine("xp " + wizard01.exp);
playerChange = playerChange + 2;
dungeon = rndom.Next(1,3);
Console.WriteLine("Dungeon mode activated");
playerChange = playerChange + 2;
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());
playerChange = playerChange + 2;
playerChange = playerChange + 2;
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");
Console.WriteLine("PlayerChange is " + playerChange);
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);
playerChange = playerChange + 2;
if (wizard01.cancel == false)
wizard01.damage(EnemDg * dungeon);
if (wizard01.dead == false)
Console.WriteLine("The " + enemies[rndom.Next(0, 3)] + " has died. YAY");
wizard01.Gold = wizard01.Gold + 1;
if (wizard01.Gold % 2 == 1)
wizard01.Gold = wizard01.Gold + 1;
wizard01.Gold = wizard01.Gold + 2;
if (wizard01.Gold % 2 == 1)
wizard01.Gold = wizard01.Gold + 1;
if (wizard01.Gold % 2 == 1)
wizard01.Gold = wizard01.Gold + 1;
wizard01.Gold = wizard01.Gold + 2;
wizard01.Gold = wizard01.Gold + 2;
Console.WriteLine("You gained " + wizard01.Gold + " gold\n ");