Class AttackEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
com.pixelmonmod.pixelmon.api.events.battles.AttackEvent
- Direct Known Subclasses:
AttackEvent.CriticalHit,AttackEvent.Damage,AttackEvent.Recoil,AttackEvent.Stab,AttackEvent.TypeEffectiveness,AttackEvent.Use
Collection of events fired relating to Pokémon moves in battle.
Subclasses:
Subclasses:
AttackEvent.Use, AttackEvent.CriticalHit, AttackEvent.Stab, AttackEvent.Damage, AttackEvent.TypeEffectiveness. - Since:
- June 18, 2019
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEvent fired after Pixelmon calculates the critical hit multiplier for this attack.static classEvent fired after all damage calculations have taken place for an attack.static classEvent fired after recoil damage has been taken.static classEvent fired after Pixelmon calculates the STAB multiplier for this attack.static classEvent fired when calculating move effectiveness.static classEvent fired after any attack is used.Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal PixelmonWrapperThe target of the attack.final PixelmonWrapperThe user of the attack.Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
battleController -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAttackEvent(BattleController battleController, PixelmonWrapper user, PixelmonWrapper target) -
Method Summary
Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
getBattleControllerMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
user
The user of the attack. -
target
The target of the attack. This might be the same as the user.
-
-
Constructor Details
-
AttackEvent
protected AttackEvent(BattleController battleController, PixelmonWrapper user, PixelmonWrapper target)
-
-
Method Details
-
getAttack
The attack being used. This is just a shortcut touser.attack. -
isSelf
public boolean isSelf()Whether or not the user is the target.
-