Ejemplo n.º 1
0
        public void AddAttacker(Card card, Card planeswalker)
        {
            var attacker = CreateAttacker(card, planeswalker);

            _attackers.Add(attacker);

            if (!card.Has().Vigilance)
            {
                card.Tap();
            }

            Publish(new AttackerJoinedCombatEvent(attacker));
        }
Ejemplo n.º 2
0
        public void JoinAttack(Card card, bool wasDeclared = false)
        {
            var attacker = CreateAttacker(card);

            _attackers.Add(attacker);

            if (!card.Has().Vigilance)
            {
                card.Tap();
            }

            Publish(new AttackerJoinedCombatEvent(attacker, wasDeclared));
        }
Ejemplo n.º 3
0
        public void JoinAttack(Card card, bool wasDeclared = false)
        {
            var attacker = CreateAttacker(card);
              _attackers.Add(attacker);

              if (!card.Has().Vigilance)
            card.Tap();

              Publish(new AttackerJoinedCombatEvent(attacker, wasDeclared));
        }
Ejemplo n.º 4
0
        public bool CanBeBlockedBy(Card card)
        {
            if (card.IsTapped)
            {
                return(false);
            }

            if (Has().Unblockable)
            {
                return(false);
            }

            if (Has().Flying&& !card.Has().Flying&& !card.Has().Reach)
            {
                return(false);
            }

            if (Has().CanOnlyBeBlockedByCreaturesWithFlying&& !card.Has().Flying)
            {
                return(false);
            }

            if (Has().Fear&& !card.HasColor(CardColor.Black) && !card.Is().Artifact)
            {
                return(false);
            }

            if (HasProtectionFrom(card))
            {
                return(false);
            }

            if (Has().Swampwalk&&
                card.Controller.Battlefield.Any(x => x.Is("swamp")))
            {
                return(false);
            }

            if (Has().Islandwalk&&
                card.Controller.Battlefield.Any(x => x.Is("island")))
            {
                return(false);
            }

            if (Has().Mountainwalk&&
                card.Controller.Battlefield.Any(x => x.Is("mountain")))
            {
                return(false);
            }

            if (Has().Forestwalk&&
                card.Controller.Battlefield.Any(x => x.Is("forest")))
            {
                return(false);
            }

            if (Has().UnblockableIfDedenderHasArtifacts&&
                card.Controller.Battlefield.Any(x => x.Is().Artifact))
            {
                return(false);
            }

            if (Has().UnblockableIfDedenderHasEnchantments&&
                card.Controller.Battlefield.Any(x => x.Is().Enchantment))
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 5
0
 public bool OwningCardHas(Static ability)
 {
     return(_owningCard.Has().Has(ability));
 }
Ejemplo n.º 6
0
        public bool CanBeBlockedBy(Card card)
        {
            if (card.IsTapped)
            return false;

              if (Has().Unblockable)
            return false;

              if (Has().Flying && !card.Has().Flying && !card.Has().Reach)
            return false;

              if (Has().CanOnlyBeBlockedByCreaturesWithFlying && !card.Has().Flying)
            return false;

              if (Has().Fear && !card.HasColor(CardColor.Black) && !card.Is().Artifact)
            return false;

              if (HasProtectionFrom(card))
            return false;

              if (Has().Swampwalk &&
            card.Controller.Battlefield.Any(x => x.Is("swamp")))
              {
            return false;
              }

              if (Has().Islandwalk &&
            card.Controller.Battlefield.Any(x => x.Is("island")))
              {
            return false;
              }

              if (Has().Mountainwalk &&
            card.Controller.Battlefield.Any(x => x.Is("mountain")))
              {
            return false;
              }

              if (Has().Forestwalk &&
            card.Controller.Battlefield.Any(x => x.Is("forest")))
              {
            return false;
              }

              if (Has().UnblockableIfDedenderHasArtifacts &&
            card.Controller.Battlefield.Any(x => x.Is().Artifact))
              {
            return false;
              }

              if (Has().UnblockableIfDedenderHasEnchantments &&
            card.Controller.Battlefield.Any(x => x.Is().Enchantment))
              {
            return false;
              }

              return true;
        }