public static void Attack() { CIO.Print("Which NPC?"); string input = CIO.ReadLine(); if (wannaExit(input)) { return; } Character enemy = Program.currentRoom.getNPCByName(input); Fight f = new Fight(enemy); f.startFight(); }
public static void GiveXP() { int amount = -1; while (amount == -1) { CIO.Print("How much?"); string input = CIO.ReadLine(); if (wannaExit(input)) { return; } Int32.TryParse(input, out amount); } Player.getInstance().GiveXP(amount); }
public static void GiveGold() { CIO.StartNewContext(new Handlers.IO.Context("How much?")); int amount = -1; while (amount == -1) { CIO.Print("How much?"); string input = CIO.ReadLine(); if (wannaExit(input)) { return; } Int32.TryParse(input, out amount); } Player.getInstance().AddGold(amount); CIO.EndContextWithoutReEnter(); }