Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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();
        }