private void viewMoveOptions() { int choice = Helper.getChoice("Which direction?", new string[] { "Forward", "Back", "Left", "Right", "ForwardLeft", "ForwardRight", "BackLeft", "BackRight", "Go Back" }); switch (choice) { case 1: ActionHandler.MoveForward(player, arena.arenaXPlus); break; case 2: ActionHandler.MoveBackward(player, arena.arenaYMinus); break; case 3: ActionHandler.MoveLeft(player, arena.arenaXMinus); break; case 4: ActionHandler.MoveRight(player, arena.arenaXPlus); break; case 5: ActionHandler.MoveForwardLeft(player, arena.arenaXMinus, arena.arenaYPlus); break; case 6: ActionHandler.MoveForwardRight(player, arena.arenaXPlus, arena.arenaYPlus); break; case 7: ActionHandler.MoveBackLeft(player, arena.arenaXMinus, arena.arenaYMinus); break; case 8: ActionHandler.MoveBackRight(player, arena.arenaXPlus, arena.arenaYMinus); break; case 9: viewCombatOptions(); break; } }
private int processCombatOption(int choice) { switch (choice) { case 1: viewMoveOptions(); break; case 2: Character t = selectTarget(); if (ActionHandler.inAttackRange(player, t)) { ActionHandler.Attack(player, t); } else { goto default; } break; case 3: player.addEffect(new Effect(player.defense, 10, 1)); break; case 4: if (!ActionHandler.Cast(player, selectTarget())) { goto default; } break; default: choice = viewCombatOptions(); break; } return(choice); }