Ejemplo n.º 1
0
 public void CleanTrash(ActionDice dice)
 {
     if (dice.IsUsed == false)
     {
         var colony = (Colony)StateController.Instance.Locations.Find(l => l.GetType() == typeof(Colony));
         colony.Clean();
         dice.Use();
     }
     else
     {
         throw new InvalidActionException();
     }
 }
Ejemplo n.º 2
0
        public void Search(Survivor survivor, ActionDice die)
        {
            Card card = survivor.Search(die);

            if (card != null)
            {
                Hand.Add(card);
            }
            else
            {
                throw new InvalidActionException();
            }
        }
Ejemplo n.º 3
0
        public Card Search(ActionDice die)
        {
            var  canSearch = die.Value >= AttackAbility;
            Card card      = null;

            if (canSearch)
            {
                card = CurrentLocation.SearchCard();
                die.Use();
            }
            else
            {
                throw new InvalidActionException();
            }

            return(card);
        }
Ejemplo n.º 4
0
        public void Attack(ActionDice die)
        {
            var canAttack = die.Value >= AttackAbility;

            if (canAttack && CurrentLocation.OutsideArea.Zombies > 0)
            {
                die.Use();
                CurrentLocation.RemoveImage(CurrentLocation.ZombieImage);
                StateController.Instance.RollExposureDice(this);
                if (Health <= 0)
                {
                    CanMove = true;
                    Move(StateController.Instance.Locations.Find(l => l.Name == "Graveyard"));
                }
            }
            else
            {
                throw new InvalidActionException();
            }
        }
Ejemplo n.º 5
0
 public void Attack(Survivor survivor, ActionDice die)
 {
     survivor.Attack(die);
 }