Class AttackEvent.CriticalHit
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
com.pixelmonmod.pixelmon.api.events.battles.AttackEvent
com.pixelmonmod.pixelmon.api.events.battles.AttackEvent.CriticalHit
- Enclosing class:
- AttackEvent
Event fired after Pixelmon calculates the critical hit multiplier for this attack. This event
will fire even if the Pokémon was not going to crit, and from this method it is possible to change
the multiplier directly.
- Since:
- June 18, 2019
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.battles.AttackEvent
AttackEvent.CriticalHit, AttackEvent.Damage, AttackEvent.Recoil, AttackEvent.Stab, AttackEvent.TypeEffectiveness, AttackEvent.Use
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
Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.AttackEvent
target, user
Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
battleController
-
Constructor Summary
ConstructorDescriptionCriticalHit
(BattleController battleController, PixelmonWrapper user, PixelmonWrapper target, double critMultiplier) -
Method Summary
Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.AttackEvent
getAttack, isSelf
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
-
critMultiplier
public double critMultiplierThe multiplier for damage.
-
-
Constructor Details
-
CriticalHit
public CriticalHit(BattleController battleController, PixelmonWrapper user, PixelmonWrapper target, double critMultiplier)
-
-
Method Details
-
isCrit
public boolean isCrit()Returnstrue
if this attack will receive a STAB. -
setCrit
public void setCrit(boolean crit)
-