Skip to main content

execute_effect

Function execute_effect 

Source
pub fn execute_effect(
    effect: &EffectRef,
    source: Option<CardId>,
    controller: PlayerId,
    _state: &GameState,
    scripting: Option<&RhaiEngine>,
) -> Result<Vec<Command>, CardinalError>
Expand description

Execute an effect and return commands to apply its results This handles three types of effects:

  1. Builtin effects (damage, draw, gain_life, pump) - parsed from effect string
  2. Data-driven effects - future: loaded from TOML params
  3. Scripted effects - executed via Rhai