Ejemplo n.º 1
0
        public override LocationDefinition DoAction()
        {
            LocationDefinition returnData = GameState.CurrentLocation;

            this.ClearScreen(false);

            if (GameState.Hero.gold < GameState.Hero.maxGold)
            {
                GameState.Hero.gold += this._gold;
                if (GameState.Hero.gold > GameState.Hero.maxGold)
                {
                    GameState.Hero.gold = GameState.Hero.maxGold;
                }
            }

            Console.WriteLine("You take {0} gold and now have {1} gold.", this._gold, GameState.Hero.gold);

            _GoldResults = PickUpGoldResults.Taken;

            PickUpGoldEventArgs goldEventArgs = new PickUpGoldEventArgs();

            goldEventArgs.GoldResults = _GoldResults;

            OnPostTake(goldEventArgs);

            this.ClearScreen();

            return(returnData);
        }
Ejemplo n.º 2
0
 public virtual void OnPostTake(PickUpGoldEventArgs goldEvenArgs)
 {
     if (PostItem != null)
     {
         PostItem(this, goldEvenArgs);
     }
 }
Ejemplo n.º 3
0
        public void RoomTwoGold(object sender, PickUpGoldEventArgs goldEventArgs)
        {
            if (goldEventArgs.GoldResults == PickUpGoldResults.Taken)
            {
                LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.TOOK_GOLD_KEY, true);

                // Reload
                LocationHandler.ResetLocation(ROOM_TWO_KEY);
            }
        }
        public void StorageRoomGold(object sender, PickUpGoldEventArgs goldEventArgs)
        {
            if (goldEventArgs.GoldResults == PickUpGoldResults.Taken)
            {
                LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenInconspicousCave.STORAGE_ROOM_GOLD, true);

                //Reload
                LocationHandler.ResetLocation(STORAGE_ROOM_KEY);
            }
        }
        public void RoomFiveGold(object sender, PickUpGoldEventArgs goldEventArgs)
        {
            if (goldEventArgs.GoldResults == PickUpGoldResults.Taken)
            {
                LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownBanditHouse.TOOK_ROOM_FIVE_GOLD, true);

                // Reload
                LocationHandler.ResetLocation(ROOM_FIVE_KEY);
            }
        }
Ejemplo n.º 6
0
        public void EastGold(object sender, PickUpGoldEventArgs goldEventArgs)
        {
            if (goldEventArgs.GoldResults == PickUpGoldResults.Taken)
            {
                LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.EAST_GOLD, true);

                //Reload
                LocationHandler.ResetLocation(EAST_TENTS_KEY);
            }
        }