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)); }
public int GetDamageTopSpellWillDealToCreature(Card card, bool targetOnly = false) { if (TopSpell == null) { return(0); } if (!TopSpell.HasEffectTargets() && targetOnly) { return(0); } var total = TopSpell.CalculateCreatureDamage(card); var prevented = card.CalculatePreventedDamageAmount(total, TopSpell.Source.OwningCard); return(total - prevented); }