public void Interact(LivingCreature creature)
 {
     if (!_looted)
     {
         _myColor = Brushes.BurlyWood;
         creature.TakeLoot( _loot.GetItems() ); // <------------- NEWLY ADDED
         _looted = true;
     }
 }
예제 #2
0
        public override void interact(LivingCreature creature)
        {
            EnumDirection interactDirection = creature.getLastMove();

            int flipDirection = -1 * (int)interactDirection;

            interactDirection = (EnumDirection)flipDirection;

            MazeMover.move(interactDirection, this);
        }
예제 #3
0
 public override void interact(LivingCreature l)
 {
 }
예제 #4
0
 public void Interact(LivingCreature creature)
 {
     _interaction.Interact(creature);
 }
예제 #5
0
        public override void Interact(LivingCreature lc)
        {
            if (lc.GetInteractionType() == EnumMazeObject.Monster)
            {
                Monster killer = (Monster)lc;

                if (killer.PartySize() + this.PartySize() <= _maxPartySize)
                {
                    killer.AddMonsters(_monsterParty);
                    this.Die();
                }
            }

            else
            {
                //enter battle arena
                this.Die();
            }

            // do nothing
        }
 public void Interact(LivingCreature creature)
 {
     creature.Exit();
 }
        public void Refresh(LivingCreature refresher)
        {
            MazeObjectRefresh(refresher);

            //try to make very large maze's more efficient
            if (refresher.GetLastMove() == EnumDirection.Left || refresher.GetLastMove() == EnumDirection.Right)
            {
                MazeObjectRefresh(refresher.getSurroundings().GetLeft());
                MazeObjectRefresh(refresher.getSurroundings().GetRight());
            }

            else
            {
                MazeObjectRefresh(refresher.getSurroundings().GetDown());
                MazeObjectRefresh(refresher.getSurroundings().GetUp());
            }
        }
예제 #8
0
 public override void Interact(LivingCreature l)
 {
     l.Die();
 }
예제 #9
0
 public abstract void interact(LivingCreature creature);
 public new abstract void Interact(LivingCreature lc);
 public void Interact(LivingCreature creature)
 {
     _myColor = Brushes.BurlyWood;
 }
예제 #12
0
 public override void Interact(LivingCreature lc)
 {
     this.Die();
     // do nothing
 }
예제 #13
0
 public void Refresh(LivingCreature changed)
 {
     _displayer.Refresh(changed);
 }
예제 #14
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();
                }

            }
        }
예제 #15
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();
            }
        }
 public void Interact(LivingCreature creature)
 {
 }
 public void Interact(LivingCreature creature)
 {
     //do nothing, you are a wall
 }
예제 #18
0
 public override void interact(LivingCreature creature)
 {
     //do nothing, you are a wall
 }
 public void Interact(LivingCreature creature)
 {
     creature.Move();
 }
 //public void DebugDisplay(MazeObject head)
 //{
 //    //Console.Clear();
 //    MazeObject displayCol = head;
 //    bool hadNull = false;
 //    while (displayCol != null)//for (int x = 0; x < maze.Length; x++)
 //    {
 //        MazeObject displayRow = displayCol;
 //        while (displayRow != null)
 //        {
 //            if (displayRow.getSurroundings().IsDownNull() && displayRow.ToString().Equals("a"))
 //            {
 //                Console.Write("x");
 //                hadNull = true;
 //            }
 //            else
 //                Console.Write(displayRow);
 //            displayRow = displayRow.getSurroundings().GetRight();
 //        }
 //        displayCol = displayCol.getSurroundings().GetDown();
 //        Console.WriteLine();
 //    }
 //    if(hadNull)
 //        Console.WriteLine("There was a null down reference");
 //}
 public void Refresh(LivingCreature changed)
 {
     throw new NotImplementedException();
 }