Skip to main content

interpret

Function interpret 

Source
pub fn interpret<P: RulesProvider>(
    ctx: &mut BattleCtx<'_, P>,
    relay: RelayVar,
    target: BattlerRef,
    source: BattlerRef,
    source_effect: EffectId,
) -> HandlerResult
Expand description

THE bridge (doc 11 §2): the single zero-capture fn every data hook’s call points at. Keyed entirely off source_effect — the engine already threads it to every handler (dispatch.rs:128). Looks the compiled hook up in the game’s &'static RulesHost, applies the chance gate (the only RNG), then folds the op-list.

Signature matches HandlerFn<P> exactly so it is a valid call field.