pub trait EffectHandler<P: BattleProvider + ?Sized> {
// Required method
fn handle_effect(
&self,
effect: MoveEffect,
user: &mut BattlerState<P>,
target: &mut BattlerState<P>,
provider: &P,
) -> EffectResult;
}Expand description
Handles move effects on battler state.
After damage has been dealt, the effect handler applies additional effects such as status infliction, stat modification, healing, and field changes.
Required Methods§
Sourcefn handle_effect(
&self,
effect: MoveEffect,
user: &mut BattlerState<P>,
target: &mut BattlerState<P>,
provider: &P,
) -> EffectResult
fn handle_effect( &self, effect: MoveEffect, user: &mut BattlerState<P>, target: &mut BattlerState<P>, provider: &P, ) -> EffectResult
Apply a move effect to the user and/or target.
effect— The category of effect to apply.user— The battler that used the move.target— The battler being targeted.provider— The battle data provider for lookups.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".