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

            int flipDirection = -1 * (int)interactDirection;

            interactDirection = (EnumDirection)flipDirection;

            MazeMover.move(interactDirection, this);
        }
Exemplo n.º 3
0
 public override void interact(LivingCreature l)
 {
 }
Exemplo n.º 4
0
 public void Interact(LivingCreature creature)
 {
     _interaction.Interact(creature);
 }
Exemplo n.º 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());
            }
        }
Exemplo n.º 8
0
 public override void Interact(LivingCreature l)
 {
     l.Die();
 }
Exemplo n.º 9
0
 public abstract void interact(LivingCreature creature);
 public new abstract void Interact(LivingCreature lc);
 public void Interact(LivingCreature creature)
 {
     _myColor = Brushes.BurlyWood;
 }
Exemplo n.º 12
0
 public override void Interact(LivingCreature lc)
 {
     this.Die();
     // do nothing
 }
Exemplo n.º 13
0
 public void Refresh(LivingCreature changed)
 {
     _displayer.Refresh(changed);
 }
Exemplo n.º 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();
                }

            }
        }
Exemplo n.º 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
 }
Exemplo n.º 18
0
 public override void interact(LivingCreature creature)
 {
     //do nothing, you are a wall
 }
Exemplo n.º 19
0
 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();
 }