Class EVGainEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.EVGainEvent
- Direct Known Subclasses:
EVGainEvent.DoubleYieldEvent
,EVGainEvent.Post
,EVGainEvent.Pre
public class EVGainEvent
extends net.neoforged.bus.api.Event
All events relating to when EVs are gained, or are about to be gained,
by a Pokémon typically after winning a battle, or knocking out an opponent.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
These events are fired before the EVs are given to the Pokémon.static class
static class
Cancelling this will prevent the yields from being given at all. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
EVGainEvent
(Pokemon pokemon, Pokemon faintedPokemon, EVYields originalEVYields, EVYields evYields) protected
EVGainEvent
(Pokemon pokemon, EVYields evYields) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionWhen used viaEVGainEvent.DoubleYieldEvent.Pre
, returns the EVs that will be doubled.The Pokémon responsible for giving the initial amount of EVs.The EVs that the Pokémon would receive assuming that they had zero EVs.The Pokémon receiving the EVs.
-
Field Details
-
pokemon
-
faintedPokemon
-
originalEVYields
-
evYields
-
-
Constructor Details
-
EVGainEvent
@Deprecated(since="9.2.11", forRemoval=true) protected EVGainEvent(Pokemon pokemon, EVYields evYields) Deprecated, for removal: This API element is subject to removal in a future version. -
EVGainEvent
-
-
Method Details
-
getPokemon
The Pokémon receiving the EVs. -
getFaintedPokemon
The Pokémon responsible for giving the initial amount of EVs. -
getOriginalEVYields
The EVs that the Pokémon would receive assuming that they had zero EVs. -
getEvYields
When used viaEVGainEvent.DoubleYieldEvent.Pre
, returns the EVs that will be doubled. When used viaEVGainEvent.DoubleYieldEvent.Post
, returns the EVs that have been doubled. When used viaEVGainEvent.Pre
, returns the original EVs that the Pokémon is expected to gain, along with any modfications made via theEVGainEvent.Pre.setYield(EVYields)
function. When used viaEVGainEvent.Post
, returns the EVs that the Pokémon actually gained after accounting for the max limit on each stat and the max limit of EVs in total.
-