Exemplo n.º 1
0
        public override void Interact(LivingCreature lc)
        {
            //if you are interacting with the player you are a monster
            MazeMonster monsterParty = (MazeMonster) lc;

            //Battle
            if (!lc.Dead)
            {
                BattleWindow theBattle = new BattleWindow(monsterParty.GetParty());

                MainWindow.PauseHive();
                theBattle.ShowDialog();

                if (this.Dead)
                {
                    Restart();
                }

                MainWindow.StartHive();

                this.GetInventory().AddItemList(lc.GetInventory());
                lc.Die();
            }
        }
Exemplo n.º 2
0
        public override void Interact(LivingCreature creature)
        {
            if (!Dead)
            {

                if (creature.GetInteractionType() == EnumMazeObject.Monster)
                {
                    MazeMonster killer = (MazeMonster)creature;

                    if (killer.PartySize() + this.PartySize() <= MaxPartySize)
                    {
                        killer.AddMonsters(_monsterParty);
                        killer.TakeLoot(_creatureInventory.GetItems());
                        this.Die();
                    }
                }

                else
                {
                    //enter battle arena
                    BattleWindow theBattle = new BattleWindow(_monsterParty);

                    MainWindow.PauseHive();
                    theBattle.ShowDialog();

                    if (creature.Dead)
                    {
                        Restart();
                    }

                    MainWindow.StartHive();
                    //exit BA

                    creature.TakeLoot(_creatureInventory.GetItems());
                    this.Die();
                }

            }
        }