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)); }
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)); }
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)); }
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); }
public bool OwningCardHas(Static ability) { return(_owningCard.Has().Has(ability)); }
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; }