public bool CanBeDestroyedByTopSpell(Card card, bool targetOnly = false) { if (IsEmpty) { return(false); } if (card.CanBeDestroyed == false) { return(false); } if (TopSpell.HasTag(EffectTag.Destroy)) { return(TopSpell.HasEffectTargets() ? TopSpell.HasEffectTarget(card) : !targetOnly); } if (card.Is().Creature == false) { return(false); } return(CanThougnessBeReducedToLeathalByTopSpell(card) || CanBeDealtLeathalDamageByTopSpell(card)); }
private void PutToZoneAfterResolve(Card card, Effect.Context ctx) { if (card.Is().Sorcery || card.Is().Instant) { card.PutToGraveyard(); return; } if (card.Is().Aura) { var attachedCardController = card.GetControllerOfACardThisIsAttachedTo(); attachedCardController.PutCardToBattlefield(card); return; } card.PutToBattlefield(); }
public void PutOnBottomOfLibrary(Card card) { if (card.Is().Token) { PutCardToExile(card); return; } _library.PutOnBottom(card); }
public void PutCardToHand(Card card) { if (card.Is().Token) { PutCardToExile(card); return; } _hand.Add(card); }
public void PutCardToGraveyard(Card card) { if (card.Is().Token) { PutCardToExile(card); return; } _graveyard.AddToEnd(card); }
public void PutCardIntoLibraryAtPosition(int positionFromTop, Card card) { if (card.Is().Token) { PutCardToExile(card); return; } _library.InsertAt(positionFromTop, card); }
public bool CanBeDealtLeathalDamageByTopSpell(Card card, bool targetOnly = false) { if (!card.Is().Creature) { return(false); } var dealtAmount = GetDamageTopSpellWillDealToCreature(card, targetOnly); return(card.Life <= dealtAmount); }
private void PutToZoneAfterResolve(Card card) { if (card.Is().Sorcery || card.Is().Instant) { card.PutToGraveyard(); return; } if (card.Is().Aura) { var attachedCardController = card.GetControllerOfACardThisIsAttachedTo(); attachedCardController.PutCardToBattlefield(card); return; } card.PutToBattlefield(); }
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 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; }