pub enum HpChangeCause<P: EffectProvider + ?Sized> {
Status(P::Status),
Volatile(P::EffectStateKind),
}Expand description
Why a battler’s HP changed — carried on TurnEvent::Damaged / TurnEvent::Healed
so a game can narrate residual ticks distinctly (“hurt by POISON!”, “sapped by LEECH
SEED!”). None (the default) means ordinary move damage/heal — today’s behaviour,
unchanged. The engine records only what it holds at the residual fire site: the
non-volatile Status, or the volatile’s opaque
EffectStateKind for a volatile-hosted residual —
the game maps that token back to the concrete volatile (Toxic / Leech Seed / …).
Engine-agnostic: the engine stores the token but never interprets it (symmetric with
the Status variant).
Variants§
Status(P::Status)
A non-volatile status residual (Gen-1 burn / poison chip).
Volatile(P::EffectStateKind)
A volatile-effect residual, carrying the game’s opaque per-volatile token
(EffectStateKind) so the game can tell
WHICH volatile ticked — Toxic ramp vs Leech Seed sap vs Bide unleash.