public void GymPoke(Gym fight) { Console.WriteLine("Choose the pokemon that you would like to switch to:"); for (int i = 0; i < x.PETS.Count; i++) { Pokemon tmp = x.PETS[i]; Console.WriteLine("{6}.{0} Lv:{1} HP:{2}/{3} ATK:{4} DEF:{5}", tmp.NAME, tmp.LV, tmp.HP, tmp.MAXHP, tmp.ATK, tmp.DEF, (char)(i + 'A')); } Console.WriteLine("Q.Quit pokeon Menu"); int target; bool quit = false; char input; while (!quit) { Console.ForegroundColor = ConsoleColor.Yellow; input = Console.ReadKey().KeyChar; Console.ResetColor(); Console.WriteLine(); switch (input) { case 'Q': case 'q': quit = true; break; default: if (input >= 'a' && input <= (char)('a' + x.PETS.Count - 1) || input >= 'A' && input <= (char)('A' + x.PETS.Count - 1)) { if (input <= 'Z') { target = input - 'A'; } else { target = input - 'a'; } bool tf = x.SwitchPoke(x.PETS[target]); GymDiagDisplay(fight.dialogue(Gym.diag.poke, tf)); quit = true; GymStatus(fight); } break; } } }
public void GymItem(Gym fight) { if (x.ITEMS["HPHealer"] > 0) { Console.WriteLine("You can use the following item:"); Console.WriteLine("H.HPHealer X{0}", x.ITEMS["HPHealer"]); } Console.WriteLine("Q.Quit item menu"); bool quit = false; char input; while (!quit) { Console.ForegroundColor = ConsoleColor.Red; input = Console.ReadKey().KeyChar; Console.ResetColor(); Console.WriteLine(); switch (input) { case 'h': case 'H': GymDiagDisplay(fight.dialogue(Gym.diag.heal, x.POKENOW.heal(x))); GymStatus(fight); quit = true; break; case 'q': case 'Q': GymStatus(fight); quit = true; break; default: break; } } }
public void GymBattle(Gym fight) { Console.WriteLine("Choose a skill to attack!!"); for (int i = 0; i < x.POKENOW.SKILLS.Count; i++) { Console.WriteLine("{0}.{1}", (char)(i + 'A'), x.POKENOW.SKILLS[i]); } Console.WriteLine("Q.Quit skill menu"); int target; int result; bool quit = false; char input; while (!quit) { Console.ForegroundColor = ConsoleColor.Yellow; input = Console.ReadKey().KeyChar; Console.ResetColor(); Console.WriteLine(); switch (input) { case 'Q': case 'q': quit = true; break; default: if (input >= 'a' && input <= (char)('a' + x.POKENOW.SKILLS.Count - 1) || (input >= 'A' && input <= (char)('A' + x.POKENOW.SKILLS.Count - 1))) { if (input <= 'Z') { target = input - 'A'; } else { target = input - 'a'; } string atk = x.POKENOW.SKILLS[target]; int dmg = x.POKENOW.Attack(atk, fight.POKENOW); GymDiagDisplay(fight.dialogue(dmg, atk)); result = fight.statusUpdate(); if (result == 2) { GymDiagDisplay(fight.dialogue(Gym.diag.startend, false)); world.ResetGym(fight.NATURE); x.GymVictory(); } else { if (result == 1) { GymDiagDisplay(fight.dialogue(Gym.diag.ko, result == 1)); } else { GymDiagDisplay(fight.dialogue(Gym.diag.ko, result == 1)); } GymStatus(fight); } quit = true; } break; } } }