Skip to main content

collect_from_effect

Function collect_from_effect 

Source
pub fn collect_from_effect<P: EffectProvider + ?Sized>(
    ctx: &BattleCtx<'_, P>,
    eff: &'static Effect<P>,
    ev: Event,
    target: BattlerRef,
    source: BattlerRef,
    out: &mut Vec<CollectedHandler<P>>,
)
Expand description

Collect, from a single known effect, the hooks that subscribe to ev, wrapping each with its host’s speed and effect_order from the arena.

Scoping note (design §1.3): the POC collects from the one effect explicitly passed by the driver (the move’s effect, the host’s status effect) rather than synthesizing OnAny/OnFoe/OnSource/OnAlly prefix variants across every live effect — no Gen-1 effect registers a prefixed hook, so that seam stays present-but-inert. This keeps the slice minimal per the doc’s explicit permission while preserving the comparator’s full shape.