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
Modifier and TypeClassDescriptionstatic class
Event fired after Pixelmon calculates the critical hit multiplier for this attack.static class
Event fired after all damage calculations have taken place for an attack.static class
Event fired after recoil damage has been taken.static class
Event fired after Pixelmon calculates the STAB multiplier for this attack.static class
Event fired when calculating move effectiveness.static class
Event 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
Modifier and TypeFieldDescriptionfinal PixelmonWrapper
The target of the attack.final PixelmonWrapper
The user of the attack.Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
battleController
-
Constructor Summary
ModifierConstructorDescriptionprotected
AttackEvent
(BattleController battleController, PixelmonWrapper user, PixelmonWrapper target) -
Method Summary
Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
getBattleController
Methods 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.
-