/// <summary> /// Lets the user choose what they want to do when entering the field /// </summary> static void BattleChoice() { //writes out where the player is Console.BackgroundColor = ConsoleColor.Red; Console.WriteLine(Player.location); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine(); Console.WriteLine("You see a grizzly monster infront of you!"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("What will you do?"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("1. Attack"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("2. Potion"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("3. View Map/Inventory"); //makes sure that the input was a number do { Console.BackgroundColor = ConsoleColor.Red; Console.WriteLine("Please enter a number"); Console.BackgroundColor = ConsoleColor.Black; //gets the input Console.ForegroundColor = ConsoleColor.Green; input = Console.ReadLine(); Console.ForegroundColor = ConsoleColor.White; } while (!Int32.TryParse(input, out ninput)); switch (ninput) { case 1: Attack(); break; case 2: Potion(); break; case 3: Texts.Map(); break; } }
/// <summary> /// The sequence for entering battle field 5 /// </summary> public static void B5() { //sets up the player "location" and the index variable Player.location = "B5"; arrayNumber = 3; do { //there are always two different options if if (!fields[arrayNumber].MonsterDead()) { //lets the user choose what to do when confronted by the monster BattleChoice(); } else { //Gives the user the money if (!fields[1].itemPickedUp) { Player.money += fields[1].awardMoney; Player.d1Key = true; } Console.WriteLine("A large monster lays infront of you"); Console.WriteLine("The only option left is to go to a new area"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("You can go in three directions"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("1. Battle Field 3"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("2. Dungeon 3"); Thread.Sleep(Numbers.shortWait); Console.WriteLine("3. View Map/Inventory"); Thread.Sleep(Numbers.shortWait); //makes sure that the input was a number do { Console.BackgroundColor = ConsoleColor.Red; Console.WriteLine("Please enter a number"); Console.BackgroundColor = ConsoleColor.Black; //gets the input Console.ForegroundColor = ConsoleColor.Green; input = Console.ReadLine(); Console.ForegroundColor = ConsoleColor.White; } while (!Int32.TryParse(input, out ninput)); switch (ninput) { case 1: Texts.TravelTo("B3"); B3(); break; case 2: //say you cant go and have press key to continue break; case 3: Texts.Map(); break; } } } while (true); }
/// <summary> /// Asks the user what they want to do once in the lobby /// </summary> static public void Choice() { Player.location = "Base"; //keeps asking for an input until there is a correct input do { //asks the what the next move should be Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("You are in the base"); Console.WriteLine("What do you want to do now?"); Thread.Sleep(Numbers.longWait); Console.WriteLine("1. Go to the shop"); Thread.Sleep(Numbers.longWait); Console.WriteLine("2. Go to the battle field"); Thread.Sleep(Numbers.longWait); Console.WriteLine("3. View Map/Inventory"); Thread.Sleep(Numbers.longWait); Console.WriteLine("4. Re-read intro"); //makes sure that the input was a number do { Console.BackgroundColor = ConsoleColor.Red; Console.WriteLine("Please enter a number"); Console.BackgroundColor = ConsoleColor.Black; //gets the input Console.ForegroundColor = ConsoleColor.Green; input = Console.ReadLine(); Console.ForegroundColor = ConsoleColor.White; } while (!Int32.TryParse(input, out ninput)); switch (ninput) { case 1: Console.Write("Traveling to shop"); Thread.Sleep(Numbers.shortWait); Console.Write("."); Thread.Sleep(Numbers.shortWait); Console.Write("."); Thread.Sleep(Numbers.shortWait); Console.WriteLine("."); Console.Clear(); Shop.Choice(); break; case 2: Console.Write("Traveling to battlefield"); Thread.Sleep(Numbers.shortWait); Console.Write("."); Thread.Sleep(Numbers.shortWait); Console.Write("."); Thread.Sleep(Numbers.shortWait); Console.WriteLine("."); Console.Clear(); Texts.Tutorial(); break; case 3: Console.Clear(); Texts.Map(); break; case 4: Console.Clear(); Texts.Intro(); break; default: //clears out the console Console.Clear(); Console.BackgroundColor = ConsoleColor.Red; Console.WriteLine("Please enter one of the numbers stated above"); Console.BackgroundColor = ConsoleColor.Black; break; } } while (true); }