Skip to main content

Module cast_from_effect

Module cast_from_effect 

Source
Expand description

Shared “cast from effect” pipeline.

Provides infrastructure for effects that cast cards without paying mana cost (Discover, Cascade, Suspend, etc.) or with alternate costs.

Mirrors Java’s:

  • AbilityUtils.getBasicSpellsFromPlayEffect()
  • SpellAbility.copyWithNoManaCost()
  • PlayerControllerHuman.playSaFromPlayEffect()

Functions§

cast_card_from_effect
Cast a card from a play effect, optionally without paying its mana cost.
get_basic_spells
Get the list of basic spell abilities from a card that can be cast via a play effect.
offer_cast_or_alternative
Offer the player a choice: cast a card or put it somewhere else.