Пример #1
0
        /// <summary>
        /// Print the enter-message
        /// </summary>
        public virtual Boolean OnEnter()
        {
            /// This function gets called when the Room is Entered
            /// The magic stuff happens here: sub classes implement their story in this Func
            CIO.Print("you entered " + name);

            return true;
        }
Пример #2
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();
        }
Пример #3
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);
        }
Пример #4
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();
        }
Пример #5
0
 public override void onFailure()
 {
     CIO.Print("the guard doesnt accept your bribe");
 }
Пример #6
0
 public override void onNotAvailable()
 {
     CIO.Print("Not Enough money");
 }
Пример #7
0
 /// <summary>
 /// Print the leave-message
 /// </summary>
 public virtual void OnExit()
 {
     // This function gets called when the Room is Exited
     CIO.Print("you left " + name);
 }