pub enum TurnEvent<P: EffectProvider + ?Sized> {
MoveUsed {
actor: BattlerRef,
move_: P::Move,
},
Missed {
actor: BattlerRef,
},
Blocked {
actor: BattlerRef,
},
Crit {
actor: BattlerRef,
},
Damaged {
target: BattlerRef,
amount: u16,
cause: Option<HpChangeCause<P>>,
},
Healed {
target: BattlerRef,
amount: u16,
cause: Option<HpChangeCause<P>>,
},
StatusInflicted {
target: BattlerRef,
status: P::Status,
},
StatusCured {
target: BattlerRef,
status: P::Status,
},
StatChanged {
target: BattlerRef,
stat: P::Stat,
delta: i8,
},
Fainted {
who: BattlerRef,
},
}Expand description
One structural event observed during a stack-driven turn (see module docs).
Generic over the game’s BattleProvider associated types; the engine never
interprets the move/status/stat values — it only records them, in order.
Variants§
MoveUsed
actor began executing move_ (it passed the BeforeMove gate + cost).
Fields
actor: BattlerRefThe battler whose move executed.
Missed
actor’s move missed (the accuracy / immunity miss branch).
Fields
actor: BattlerRefThe battler whose move missed.
Blocked
actor’s move was PREVENTED before it executed — a BeforeMove gate aborted
it (e.g. asleep / frozen / fully paralyzed / a confusion self-hit) or it could
not pay its resource cost. No MoveUsed is logged for a blocked move. The
engine reports only THAT the move was prevented; the game derives the reason
from the battler’s status / volatiles (e.g. “is fast asleep!”).
Fields
actor: BattlerRefThe battler whose move was prevented.
Crit
actor’s move landed a critical hit.
Fields
actor: BattlerRefThe battler who landed the crit.
Damaged
target lost amount HP this step.
Fields
target: BattlerRefThe battler that lost HP.
cause: Option<HpChangeCause<P>>Why the HP was lost — None for move damage; Some(..) for a residual
tick (burn/poison/toxic/leech). See HpChangeCause.
Healed
target recovered amount HP this step.
Fields
target: BattlerRefThe battler that gained HP.
cause: Option<HpChangeCause<P>>Why the HP was gained — None for a move heal (drain/Recover); Some(..)
for a residual drain-to-source (Leech Seed’s seeder gain).
StatusInflicted
target gained the non-volatile status.
Fields
target: BattlerRefThe battler that gained a status.
StatusCured
target’s non-volatile status was cleared / cured.
Fields
target: BattlerRefThe battler whose status was cleared.
StatChanged
target’s stat stage changed by delta signed steps.
Fields
target: BattlerRefThe battler whose stat stage changed.
Fainted
who fainted (HP reached 0 this step).
Fields
who: BattlerRefThe battler that fainted.