Skip to main content

build_spell_ability

Function build_spell_ability 

Source
pub fn build_spell_ability(
    game: &GameState,
    card_id: CardId,
    ability_text: &str,
    player: PlayerId,
) -> SpellAbility
Expand description

Build a spell ability for an API-based spell. Mirrors Java’s SpellApiBased constructor which creates a Spell with an associated SpellAbilityEffect.

In the Rust engine, this delegates to ability_factory::build_spell_ability since the effect dispatch is centralized.