Beispiel #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;
        }
Beispiel #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();
        }
Beispiel #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);
        }
Beispiel #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();
        }
Beispiel #5
0
 public override void onFailure()
 {
     CIO.Print("the guard doesnt accept your bribe");
 }
Beispiel #6
0
 public override void onNotAvailable()
 {
     CIO.Print("Not Enough money");
 }
Beispiel #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);
 }