public static void Main()
Console.WriteLine("Welcome to my text based game, it's an action adventure game with turn-based combat created out of simple boredom. \r\n ");
Console.WriteLine("You begin with 50 gold and 100 health, you will go through a bunch of battles and you can select how to attack.\r\n However if your health is damaged you can heal with 5 gold per 10 health and if your health goes to 0 you are taken out of battle and it costs 50 gold to pay for hopstial treatment and most importantly to keep playing. \r\n");
Console.WriteLine("If you do not have enough to pay for the bills then you die and the game is over, doctors dont work for free \r\n");
Console.WriteLine("Spare gold can be used to buy new weapons, weapon upgrades, new armour and upgrades and healing.\r\n Buying new weapons come with a random upgrade which can increase the damage you give. Armour gives you increase survivablilty by reducing damage and increasing overall health if you get lucky with a mod. \r\n");
Console.WriteLine("Now that the boring part is over please enter your heros name.\r\n");
string name = Console.ReadLine();
Console.WriteLine("Hello there {0} you begin your quest outside Castle Rathuum\r\n", name);
Console.WriteLine("Its been a long night but the bandits have been relentless in their pursuit to break down the gate to enter the city.\r\n");
Console.WriteLine("While on patrol you spot a squad of 3 bandits\r\n");
Console.WriteLine("You have to engage them to protect the city, any hesitation and you will be branded as a coward\r\n");
while (amountofenemies > 0 && health > 0)
Console.WriteLine("You and your enemies ready for battle\r\n{0} enemies stand before you\r\nBandit 1 has {1} health\r\nBandit 2 has {2} health\r\nBandit 3 has {3} health\r\nYou stand at {4} health", amountofenemies, enemy1, enemy2, enemy3, health);
Console.WriteLine("You draw your sword out of your sheath\r\n ");
Console.WriteLine("0===[===========-");
Console.WriteLine("\r\nWhich enemy do you wish to attack? If you wish to attack either enemy type in 1 for Bandit 1 and 2 for Bandit 2 and so on ");
string input = Console.ReadLine();
if (input == "1" && enemy1 > 0)
Random dmg = new Random();
attack = dmg.Next(9, 15);
enemy1 = (enemy1 - attack);
Console.WriteLine("You dealt {0} damage to Bandit 1!", attack);
Console.WriteLine("Urah! You defeated Bandit 1! Now only {0} enemies remain!", amountofenemies);
else if (input == "2" && enemy2 > 0)
Random dmg = new Random();
attack = dmg.Next(9, 15);
enemy2 = (enemy2 - attack);
Console.WriteLine("You dealt {0} damage to Bandit 2!", attack);
Console.WriteLine("Urah! You defeated Bandit 2! Now only {0} enemies remain!", amountofenemies);
else if (input == "3" && enemy3 > 0)
Random dmg = new Random();
attack = dmg.Next(9, 15);
enemy3 = (enemy3 - attack);
Console.WriteLine("You dealt {0} damage to Bandit 3!", attack);
Console.WriteLine("Urah! You defeated Bandit 3! Now only {0} enemies remain!", amountofenemies);
else if (input == "1" && enemy1 <= 0)
Console.WriteLine("You attacked Bandit 1's dead body, why? Now it's your enemie's turn");
else if (input == "2" && enemy2 <= 0)
Console.WriteLine("You attacked Bandit 2's dead body, why? Now it's your enemie's turn");
else if (input == "3" && enemy3 <= 0)
Console.WriteLine("You attacked Bandit 3's dead body, why? Now it's your enemie's turn");
Console.WriteLine("Input not recognised please try again");
Console.WriteLine("The enemy attacks you back!");
Random rnd = new Random();
attack = (attack * amountofenemies);
health = (health - attack);
Console.WriteLine("The enemy took {0} health off you, you are now left on {1} health", attack, health);
if (amountofenemies == 0)
Console.WriteLine("Woohoo you won the battle, you have done well. Time to retreat back to the city to rest");
Random rwd = new Random();
int reward = rwd.Next(30, 60);
Console.WriteLine("You earned some gold ! use this to heal yourself or make yourself stronger. You earned {0} gold and now you have a total of {1} gold!", reward, gold);
Console.WriteLine("Oh no you died, that will be 50 gold to pay for your health to be restored back to 100");
Console.WriteLine("You now have {0} gold left, be more careful next time.", gold);
Console.WriteLine("Welcome back to the city, guards salute you for your bravery and skill on the battlefield.\r\n You currently have {0} health and {1} gold. Do you want to go to the doctors to heal (input 1)\r\nTo the blacksmith for a weapon upgrade?(input 2)\r\n Or do you want to head back out to fight and to protect the city from what danger lurks outside the castle walls. (input 3) ", health, gold);
input = Console.ReadLine();
if (input == "1" && health < 100)
Console.WriteLine("You walk into the doctor's shack.\r\n");
Console.WriteLine("The doctor struggles to see any wounds. He wonders why you are here in such fine health\r\n");
else if (health >= 35 && health < 80)
Console.WriteLine("The doctor gives a concerned look. He doesn't like to see you being hurt even though you give him business when you are\r\n");
Console.WriteLine("The doctor quickly hurries over to you, he is suprised you are even alive with the shape you are in\r\n");
int cost = (100 - health * 2);
Console.WriteLine("That will cost {0} gold to treat your wounds, you currently have {1} gold\r\n", cost, gold);
Console.WriteLine("Please input y for yes or n for no");
input = Console.ReadLine();
Console.WriteLine("You have been healed to 100 health, now get back out there! You now have left {0} gold", gold);
health = (health + gold * 2);
Console.WriteLine("You currently do not have enough to heal you to full health so I will heal you to {0} health ", health);
Console.WriteLine("Well whatever you say");
Console.WriteLine("All I asked was for a yes or no answer.");