pub fn get_attack_cost(
cards: &[Card],
attacker: &Card,
defender: DefenderId,
) -> i32Expand description
Compute the total generic mana cost required for attacker to attack defender.
Returns the accumulated cost as a generic mana amount, or 0 if no cost.
Scans all battlefield permanents for Mode$ CantAttackUnless statics.
Card script example (Propaganda):
S:Mode$ CantAttackUnless | ValidCard$ Creature | Target$ You | Cost$ 2