pub enum MoveGate<P: BattleProvider + ?Sized> {
Acts,
Prevented(EffectResult),
ForcedAction(BattleAction<P>),
}Expand description
Result of BattleProvider::before_move: the pre-move status gate.
The game owns every Gen-1 quirk here — sleep counter decremented before the move, freeze, the full-paralysis roll, flinch, Hyper Beam recharge, confusion self-hit, and partial-trap continuation — and reports the outcome to the engine, which only sequences it.
Variants§
Acts
The battler may act with its chosen action.
Prevented(EffectResult)
The battler is prevented from acting; the carried EffectResult
(e.g. Miss, NoEffect) is surfaced as a TurnEvent.
ForcedAction(BattleAction<P>)
The chosen action is replaced by a forced one (confusion self-hit, thrash/petal-dance continuation, …). The engine executes the forced action instead.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for MoveGate<P>
impl<P> RefUnwindSafe for MoveGate<P>where
<P as BattleProvider>::Move: RefUnwindSafe,
<P as BattleProvider>::Item: RefUnwindSafe,
P: ?Sized,
impl<P> Send for MoveGate<P>
impl<P> Sync for MoveGate<P>
impl<P> Unpin for MoveGate<P>
impl<P> UnsafeUnpin for MoveGate<P>where
<P as BattleProvider>::Move: UnsafeUnpin,
<P as BattleProvider>::Item: UnsafeUnpin,
P: ?Sized,
impl<P> UnwindSafe for MoveGate<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more