Class Pokemon
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.PokemonBase
com.pixelmonmod.pixelmon.api.pokemon.Pokemon
- All Implemented Interfaces:
ITranslatable
Default implementation of a Pokemon
-
Field Summary
Modifier and TypeFieldDescriptionstatic final EnumUpdateType[]
protected BonusStats
protected net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
protected Ribbon
protected boolean
protected int
static final net.minecraft.network.chat.MutableComponent
protected Integer
static final EnumUpdateType[]
protected int
protected int
protected ExtraStats
static final EnumUpdateType[]
protected int
protected boolean
protected EnumGrowth
protected boolean
protected int
protected net.minecraft.world.item.ItemStack
int
protected int
protected Nature
protected Moveset
protected Nature
protected net.minecraft.network.chat.MutableComponent
protected String
protected UUID
protected PermanentStats
protected net.minecraft.nbt.CompoundTag
protected PokemonLevel
protected Pokerus
protected StoragePosition
protected int
static final EnumUpdateType[]
protected StatusPersist
protected PokemonStorage
static final DataSync<? extends AbstractBaseEntity,
Optional<UUID>> static final DataSync<? extends AbstractBaseEntity,
Integer> static final DataSync<? extends AbstractBaseEntity,
String[]> static final DataSync<? extends AbstractBaseEntity,
EnumGrowth> static final DataSync<? extends AbstractBaseEntity,
Float> static final DataSync<? extends AbstractBaseEntity,
Integer> static final DataSync<? extends AbstractBaseEntity,
net.minecraft.network.chat.Component> static final DataSync<? extends AbstractBaseEntity,
Ribbon> protected UUID
Fields inherited from class com.pixelmonmod.pixelmon.api.pokemon.PokemonBase
ball, eggCycles, form, gender, palette, species, SYNC_POKEMON_BASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEggSteps
(int steps, int cycleMultiplier) void
boolean
Adds a ribbon to this Pokémon and sets it as the displayed ribbon.boolean
Adds a ribbon to this Pokémon.boolean
addRibbon
(RibbonType ribbonType) boolean
addRibbon
(RibbonType ribbonType, boolean displayRibbon) boolean
boolean
void
changeDynamaxLevel
(int dynamaxLevel) void
decreaseFriendship
(int amount) boolean
void
int
Gets the Pokemon's selected (displayed) ribbon If this returns null it means there is no displayed ribbonnet.minecraft.network.chat.MutableComponent
net.minecraft.network.chat.Component
int
Gets the PokéChecker description translation key of an Egg.int
int
getEvolutions
(Class<T> type) getEVs()
int
float
int
<T extends ExtraStats>
Optional<T>getExtraStats
(Class<T> type) getFlags()
int
int
float
net.minecraft.world.item.ItemStack
Gets the ItemHeld type of the item the Pokémon is holding.int
getIVs()
int
double
getMoveSkillCooldownRatio
(MoveSkill moveSkill) int
getMoveSkillCooldownTicks
(MoveSkill moveSkill) Gives the active nature of this pokemon, Use eithergetBaseNature()
orgetMintNature()
if you need a specific value.net.minecraft.network.chat.Component
Gets the formatted nickname of the PokemongetOrCreatePixelmon
(net.minecraft.world.entity.Entity parent) getOrCreatePixelmon
(net.minecraft.world.level.Level world, double x, double y, double z) getOrCreatePixelmon
(net.minecraft.world.level.Level world, double x, double y, double z, float rotationYaw, float rotationPitch) Gets the entity attached to this Pokémon, or spawns it if it does not exist in the given world.getOrSpawnPixelmon
(net.minecraft.world.entity.Entity parent) getOrSpawnPixelmon
(net.minecraft.world.level.Level world, double x, double y, double z) getOrSpawnPixelmon
(net.minecraft.world.level.Level world, double x, double y, double z, float rotationYaw, float rotationPitch) Gets the entity attached to this Pokémon, or spawns it if it does not exist in the given world.net.minecraft.network.chat.MutableComponent
net.minecraft.server.level.ServerPlayer
Gets the palette of the pokemonnet.minecraft.nbt.CompoundTag
Deprecated.Use {@link this#getPixelmonWrapper()}int
Gets an unmodifiable list of the ribbons that this pokemon has managed to collectnet.minecraft.resources.ResourceLocation
Gets the relevant sprite for thePokemonBase
int
getStat
(BattleStatsType stat) getStats()
net.minecraft.util.Tuple<PokemonStorage,
StoragePosition> getUUID()
net.minecraft.world.level.Level
getWorld()
boolean
boolean
boolean
boolean
boolean
If the Pokemon has a nicknameboolean
Checks if the Pokemon has no dropsvoid
hatchEgg()
void
hatchEgg
(boolean force) void
heal()
boolean
ifEntityExists
(Consumer<PixelmonEntity> action) Executes code if the entity representing this Pokémon exists.void
increaseFriendship
(int amount) initialize
(InitializeCategory... initializeCategories) boolean
Checks if the Pokemon has faintedboolean
boolean
boolean
isLegendary
(boolean excludeMythicals) boolean
isMega()
boolean
isMoveSkillCoolingDown
(MoveSkill moveSkill) boolean
boolean
isNearlyIdenticalTo
(Pokemon secondPokemon) Checks if this Pokémon is nearly identical to the Pokémon passed in.boolean
isOriginalTrainer
(net.minecraft.world.entity.player.Player player) boolean
boolean
Checks if the Pokemon is unbattleable Quick redirect forhasFlag(String)
boolean
Checks if the Pokemon is unbreedable Quick redirect forhasFlag(String)
boolean
Checks if the Pokemon is uncatchable Quick redirect forhasFlag(String)
boolean
Checks if the Pokemon is untradeable Quick redirect forhasFlag(String)
makeEgg()
Turns the pokemon into an eggvoid
markDirty
(EnumUpdateType... dataTypes) void
Ignores the previously found ability slot for the Pokémon and finds the new onereadFromByteBuffer
(net.minecraft.network.FriendlyByteBuf buf, EnumUpdateType... data) void
readFromNBT
(net.minecraft.nbt.CompoundTag nbt) void
recordAbilitySlot
(Ability ability) Finds the ability slot used for the Pokémon to persist through ability lossesvoid
removeFlag
(String key) void
Removes the Pokemon's current nicknameboolean
removeRibbon
(Ribbon ribbon) Removes a ribbon from this Pokémon.void
void
Sets a random ability and records the ability slot for future evolutions.void
void
setAbility
(RegistryValue<Ability> ability) void
setAbility
(Ability ability) void
setAbility
(Optional<Ability> ability) void
setAbilitySlot
(int abilitySlot) void
Sets the ball the pokemon is invoid
setBonusStats
(BonusStats bonusStats) void
setDisplayedRibbon
(Ribbon ribbon) Sets the ribbon that will be displayed on this Pokemon.void
setDoesLevel
(boolean doesLevel) void
setDynamaxLevel
(int dynamaxLevel) void
setEggCycles
(Integer eggCycles, boolean event) Sets the egg cycles of the pokemonvoid
setEggSteps
(Integer eggSteps) void
setExperience
(int experience) void
boolean
void
setFriendship
(int friendship) void
void
setGigantamaxFactor
(boolean gigantamaxFactor) void
setGrowth
(EnumGrowth growth) void
setHA
(boolean isHiddenAbility) void
setHealth
(int health) void
setHealthCache
(int health) void
setHealthPercentage
(float healthPercentage) boolean
setHeldItem
(net.minecraft.world.item.ItemStack stack) Sets the Pokémon's held item after firingHeldItemChangedEvent
.void
setLevel
(int level) void
setLevelNum
(int level) void
setMintNature
(Nature nature) void
setMoveset
(Moveset moveset) void
setMoveSkillCooldown
(MoveSkill moveSkill, int cooldownTicks) void
void
setNickname
(String nickname) Sets the Pokemon's nickname to the newComponent
void
setNickname
(net.minecraft.network.chat.Component nickname) Sets the Pokemon's nickname to the newComponent
void
setOriginalTrainer
(UUID originalTrainerUUID, String originalTrainerName) void
setOriginalTrainer
(net.minecraft.world.entity.player.Player player) boolean
setPalette
(PaletteProperties paletteProperties) Sets the palette properties for the Pokemonboolean
setPalette
(String palette) boolean
setPalette
(String palette, boolean sync) void
setPokerus
(Pokerus pokerus) boolean
setShiny()
boolean
setShiny
(boolean shiny) void
setSpecies
(RegistryValue<Species> species, boolean doSpeciesInitialization) void
setSpecies
(Species species, boolean doSpeciesInitialization) void
setStatus
(StatusPersist status) void
setStorage
(PokemonStorage storage, StoragePosition position) void
Quick way to swamp male Pokémon to female and vice versa.void
startEvolution
(Evolution evolution, String cause) Starts the Pokémon's evolution.toString()
void
Attempts to evolve the Pokémon if possible.void
updateDimensionAndEntityID
(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, int entityID) void
writeToByteBuffer
(net.minecraft.network.FriendlyByteBuf buf, EnumUpdateType... data) net.minecraft.nbt.CompoundTag
writeToNBT
(net.minecraft.nbt.CompoundTag nbt) Writes the values of this class into anCompoundTag
Methods inherited from class com.pixelmonmod.pixelmon.api.pokemon.PokemonBase
fromNBT, getBall, getEggCycles, getForm, getGender, getGenderProperties, getSpecies, getTranslationKey, hasChild, hasPalette, invalidate, isDefaultForm, isDefaultPalette, isEgg, isPalette, isPokemon, isPokemon, isPokemonOptional, isPokemonOptional, isPokemonOptional, isPokemonValue, isShiny, setEggCycles, toPokemon
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getLocalizedName, getTranslatedName
-
Field Details
-
SYNC_GROWTH
-
SYNC_LEVEL
-
SYNC_EXP
-
SYNC_ENTITY_UUID
-
SYNC_NICK_NAME
public static final DataSync<? extends AbstractBaseEntity,net.minecraft.network.chat.Component> SYNC_NICK_NAME -
SYNC_RIBBON
-
SYNC_HEALTH
-
SYNC_FLAGS
-
STATS
-
ABILITY
-
FORM
-
EMPTY
-
EGG
public static final net.minecraft.network.chat.MutableComponent EGG -
uuid
-
moveset
-
nature
-
slot
protected int slot -
ha
protected boolean ha -
mintNature
-
growth
-
friendship
protected int friendship -
pokemonLevelContainer
-
level
protected int level -
experience
protected int experience -
dynamaxLevel
protected int dynamaxLevel -
gigantamaxFactor
protected boolean gigantamaxFactor -
permanentStats
-
bonusStats
-
eggSteps
-
heldItem
protected net.minecraft.world.item.ItemStack heldItem -
status
-
extraStats
-
nickname
protected net.minecraft.network.chat.MutableComponent nickname -
originalTrainerName
-
originalTrainerUUID
-
pokerus
-
health
protected int health -
doesLevel
protected boolean doesLevel -
moveSkillCooldownData
-
flags
-
ribbons
-
displayedRibbon
-
persistentData
protected net.minecraft.nbt.CompoundTag persistentData -
lastBattleCrits
public int lastBattleCrits -
dimension
protected transient net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension -
entityID
protected transient int entityID -
storage
-
position
-
-
Constructor Details
-
Pokemon
protected Pokemon()This constructor is STRONGLY discouraged, and exists only for JSON deserialization. -
Pokemon
-
Pokemon
-
-
Method Details
-
getPixelmonEntity
-
getPixelmonWrapper
- Returns:
- The battle wrapper for the entity, if one exists
-
getPixelmonWrapperFromPlayer
Deprecated.Use {@link this#getPixelmonWrapper()}- Returns:
- The battle wrapper for the entity, if one exists via the owner
-
getOrSpawnPixelmon
public PixelmonEntity getOrSpawnPixelmon(net.minecraft.world.level.Level world, double x, double y, double z, float rotationYaw, float rotationPitch) Gets the entity attached to this Pokémon, or spawns it if it does not exist in the given world.Caveats:
- If the entity exists but in a different world to that given, it will be killed and a new entity will be spawned in the appropriate world.
- If the given world is null, then it won't do the above and instead just return the Pokémon wherever it may be.
- In addition to the previous behaviour, a null world argument and nonexistent entity will result in the new entity being created in the zero dimension world.
- Parameters:
world
- The world the entity is needed in.- Returns:
- An entity in the given world, or in the overworld if
world
is null.
-
getOrSpawnPixelmon
public PixelmonEntity getOrSpawnPixelmon(net.minecraft.world.level.Level world, double x, double y, double z) -
getOrSpawnPixelmon
-
getOrCreatePixelmon
public PixelmonEntity getOrCreatePixelmon(net.minecraft.world.level.Level world, double x, double y, double z, float rotationYaw, float rotationPitch) Gets the entity attached to this Pokémon, or spawns it if it does not exist in the given world.Caveats:
- If the entity exists but in a different world to that given, it will be killed and a new entity will be spawned in the appropriate world.
- If the given world is null, then it won't do the above and instead just return the Pokémon wherever it may be.
- In addition to the previous behaviour, a null world argument and nonexistent entity will result in the new entity being created in the zero dimension world.
- Parameters:
world
- The world the entity is needed in.- Returns:
- An entity in the given world, or in the overworld if
world
is null.
-
getOrCreatePixelmon
public PixelmonEntity getOrCreatePixelmon(net.minecraft.world.level.Level world, double x, double y, double z) -
getOrCreatePixelmon
-
getOrCreatePixelmon
-
updateDimensionAndEntityID
public void updateDimensionAndEntityID(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, int entityID) -
getEntityID
public int getEntityID() -
getWorld
public net.minecraft.world.level.Level getWorld() -
ifEntityExists
Executes code if the entity representing this Pokémon exists.- Parameters:
action
- The action to carry out if the entity exists.- Returns:
- true if the entity existed, otherwise false.
-
initialize
-
makeEgg
Description copied from class:PokemonBase
Turns the pokemon into an egg- Overrides:
makeEgg
in classPokemonBase
- Returns:
- Itself
-
makeEggAndKeepCurrentLevel
-
evolve
-
getUUID
-
setUUID
-
getOwnerTrainerUUID
-
getOwnerTrainer
-
getOwnerPlayerUUID
-
getOwnerPlayer
@Nullable public net.minecraft.server.level.ServerPlayer getOwnerPlayer() -
getDisplayName
public net.minecraft.network.chat.MutableComponent getDisplayName() -
getDisplayNameWithRibbon
public net.minecraft.network.chat.Component getDisplayNameWithRibbon() -
getNickname
public net.minecraft.network.chat.Component getNickname()Gets the formatted nickname of the Pokemon- Returns:
- The formatted nickname
-
hasNickname
public boolean hasNickname()If the Pokemon has a nickname- Returns:
- If the Pokemon has a nickname
-
removeNickname
public void removeNickname()Removes the Pokemon's current nickname -
setNickname
Sets the Pokemon's nickname to the newComponent
- Parameters:
nickname
- The new nickname
-
setNickname
public void setNickname(net.minecraft.network.chat.Component nickname) Sets the Pokemon's nickname to the newComponent
- Parameters:
nickname
- The new nickname
-
getOwnerName
public net.minecraft.network.chat.MutableComponent getOwnerName() -
setSpecies
-
setSpecies
-
setForm
- Overrides:
setForm
in classPokemonBase
-
setForm
- Overrides:
setForm
in classPokemonBase
-
setGender
-
setToOppositeGender
public void setToOppositeGender()Quick way to swamp male Pokémon to female and vice versa. Does nothing with to Pokémon with no gender. -
setEggCycles
Description copied from class:PokemonBase
Sets the egg cycles of the pokemon- Overrides:
setEggCycles
in classPokemonBase
- Parameters:
eggCycles
- The new egg cycles number
-
getEggSteps
public int getEggSteps() -
setEggSteps
-
addEggSteps
public void addEggSteps(int steps, int cycleMultiplier) -
hatchEgg
public void hatchEgg() -
hatchEgg
public void hatchEgg(boolean force) -
getEggDescription
Gets the PokéChecker description translation key of an Egg.- Returns:
- The PokéChecker description translation key of the Egg.
-
getHeldItem
@Nonnull public net.minecraft.world.item.ItemStack getHeldItem() -
getHeldItemAsItemHeld
Gets the ItemHeld type of the item the Pokémon is holding.- Returns:
- The type of the item the Pokémon is holding. Will be
NoItem
if this is not holding anything.
-
setHeldItem
public boolean setHeldItem(net.minecraft.world.item.ItemStack stack) Sets the Pokémon's held item after firingHeldItemChangedEvent
. For out-of-battle use only; use thePixelmonWrapper
version for in-battle.- Parameters:
stack
- The held item to set. Null or ItemStack.EMPTY to remove.- Returns:
- true if the held item was set, otherwise false.
-
getGrowth
-
setGrowth
-
getNature
Gives the active nature of this pokemon, Use eithergetBaseNature()
orgetMintNature()
if you need a specific value.- Returns:
- The active nature, if the pokemon has a mint it will be the mint nature.
-
getBaseNature
-
getMintNature
-
setNature
-
setMintNature
-
getPokerus
-
setPokerus
-
getAbility
-
getAbilityName
-
setAbility
-
setAbility
-
setAbility
-
getIVs
-
getEVs
-
getBonusStats
-
setBonusStats
-
getHighestOffensiveStat
public int getHighestOffensiveStat() -
getStat
-
getStats
-
getExtraStats
-
getExtraStats
-
setExperience
public void setExperience(int experience) -
getExperience
public int getExperience() -
getExperienceToLevelUp
public int getExperienceToLevelUp() -
getExperienceFraction
public float getExperienceFraction() -
getStatus
-
setStatus
-
getPokemonLevel
public int getPokemonLevel() -
getPokemonLevelContainer
-
setLevelNum
public void setLevelNum(int level) -
setLevel
public void setLevel(int level) -
getDynamaxLevel
public int getDynamaxLevel() -
setDynamaxLevel
public void setDynamaxLevel(int dynamaxLevel) -
changeDynamaxLevel
public void changeDynamaxLevel(int dynamaxLevel) -
hasGigantamaxFactor
public boolean hasGigantamaxFactor() -
canGigantamax
public boolean canGigantamax() -
setGigantamaxFactor
public void setGigantamaxFactor(boolean gigantamaxFactor) -
canBattle
public boolean canBattle() -
isLegendary
public boolean isLegendary() -
isLegendary
public boolean isLegendary(boolean excludeMythicals) -
isMythical
public boolean isMythical() -
isUltraBeast
public boolean isUltraBeast() -
isMega
public boolean isMega() -
setPalette
Description copied from class:PokemonBase
Sets the palette properties for the Pokemon- Overrides:
setPalette
in classPokemonBase
- Parameters:
paletteProperties
- The new palette properties- Returns:
- Successful (always true)
-
setPalette
-
setPalette
-
setShiny
public boolean setShiny() -
setShiny
public boolean setShiny(boolean shiny) -
getMoveset
-
setHA
public void setHA(boolean isHiddenAbility) -
setAbilitySlot
public void setAbilitySlot(int abilitySlot) -
getFriendship
public int getFriendship() -
setFriendship
public void setFriendship(int friendship) -
increaseFriendship
public void increaseFriendship(int amount) -
decreaseFriendship
public void decreaseFriendship(int amount) -
isFriendshipHighEnoughToEvolve
public boolean isFriendshipHighEnoughToEvolve() -
getOriginalTrainer
-
getOriginalTrainerUUID
-
setOriginalTrainer
-
setOriginalTrainer
public void setOriginalTrainer(net.minecraft.world.entity.player.Player player) -
isOriginalTrainer
public boolean isOriginalTrainer(net.minecraft.world.entity.player.Player player) -
setBall
Description copied from class:PokemonBase
Sets the ball the pokemon is in- Overrides:
setBall
in classPokemonBase
- Parameters:
caughtBall
- The new pokeball
-
getHealth
public int getHealth() -
getHealthPercentage
public float getHealthPercentage() -
hasFullHealth
public boolean hasFullHealth() -
heal
public void heal() -
setHealthCache
public void setHealthCache(int health) -
setHealth
public void setHealth(int health) -
setHealthPercentage
public void setHealthPercentage(float healthPercentage) -
getMaxHealth
public int getMaxHealth() -
doesLevel
public boolean doesLevel() -
setDoesLevel
public void setDoesLevel(boolean doesLevel) -
getRelearnableMoves
-
getEvolutions
-
tryEvolution
public void tryEvolution()Attempts to evolve the Pokémon if possible. -
getPersistentData
public net.minecraft.nbt.CompoundTag getPersistentData() -
retrieve
-
setStorage
-
getStorage
-
getPosition
-
getStorageAndPosition
-
isMoveSkillCoolingDown
-
getMoveSkillCooldownTicks
-
getMoveSkillCooldownRatio
-
setMoveSkillCooldown
-
addFlag
-
removeFlag
-
hasFlag
-
markDirty
-
getRibbons
Gets an unmodifiable list of the ribbons that this pokemon has managed to collect- Returns:
- An unmodifiable list of this Pokemon's ribbons.
- See Also:
-
getDisplayedRibbon
Gets the Pokemon's selected (displayed) ribbon If this returns null it means there is no displayed ribbon- Returns:
- The currently displayed ribbon
-
setDisplayedRibbon
Sets the ribbon that will be displayed on this Pokemon.- Parameters:
ribbon
- The ribbon to set.
-
addRibbon
-
addRibbon
-
addRibbon
Adds a ribbon to this Pokémon and sets it as the displayed ribbon.- Parameters:
ribbon
- The ribbon type to add.- Returns:
true
if this ribbon was added,false
if it already had the ribbon or could not be added.
-
addRibbon
Adds a ribbon to this Pokémon.- Parameters:
ribbon
- The ribbon type to add.shouldDisplayRibbon
- If the ribbon added should be immediately displayed. (defaults = true)- Returns:
true
if this ribbon was added,false
if it already had the ribbon or could not be added.
-
removeRibbon
Removes a ribbon from this Pokémon.- Parameters:
ribbon
- The ribbon type to remove.- Returns:
true
if the ribbon was removed,false
if this Pokémon did not have the ribbon.
-
getSprite
public net.minecraft.resources.ResourceLocation getSprite()Description copied from class:PokemonBase
Gets the relevant sprite for thePokemonBase
- Overrides:
getSprite
in classPokemonBase
- Returns:
- The
ResourceLocation
of the sprite
-
getPalette
Description copied from class:PokemonBase
Gets the palette of the pokemon- Overrides:
getPalette
in classPokemonBase
- Returns:
- The palette
-
isFainted
public boolean isFainted()Checks if the Pokemon has fainted- Returns:
- If their health is less than or equal to 0
-
isUnbreedable
public boolean isUnbreedable()Checks if the Pokemon is unbreedable Quick redirect forhasFlag(String)
- Returns:
- True if the pokemon cannot be bread
-
isUntradeable
public boolean isUntradeable()Checks if the Pokemon is untradeable Quick redirect forhasFlag(String)
- Returns:
- True if the pokemon cannot be traded
-
isUncatchable
public boolean isUncatchable()Checks if the Pokemon is uncatchable Quick redirect forhasFlag(String)
- Returns:
- True if the pokemon cannot be caught
-
isUnbattleable
public boolean isUnbattleable()Checks if the Pokemon is unbattleable Quick redirect forhasFlag(String)
- Returns:
- True if the pokemon cannot be battled
-
hasNoDrops
public boolean hasNoDrops()Checks if the Pokemon has no drops- Returns:
- True if the Pokemon doesn't drop anything
-
writeToByteBuffer
-
readFromByteBuffer
public Pokemon readFromByteBuffer(net.minecraft.network.FriendlyByteBuf buf, EnumUpdateType... data) -
readFromNBT
public void readFromNBT(net.minecraft.nbt.CompoundTag nbt) -
writeToNBT
public net.minecraft.nbt.CompoundTag writeToNBT(net.minecraft.nbt.CompoundTag nbt) Description copied from class:PokemonBase
Writes the values of this class into anCompoundTag
- Overrides:
writeToNBT
in classPokemonBase
- Parameters:
nbt
- The nbt being written to- Returns:
- The nbt with updated content
-
toString
-
hasHiddenAbility
public boolean hasHiddenAbility() -
getAbilitySlot
public int getAbilitySlot() -
recordAbilitySlot
Finds the ability slot used for the Pokémon to persist through ability losses- Parameters:
ability
- The ability to find
-
overrideAbilitySlot
public void overrideAbilitySlot()Ignores the previously found ability slot for the Pokémon and finds the new one -
resetAbility
public void resetAbility()Sets a random ability and records the ability slot for future evolutions. -
setMoveset
-
rerollMoveset
public void rerollMoveset() -
getFlags
-
startEvolution
Starts the Pokémon's evolution.- Parameters:
evolution
-cause
-
-
isNearlyIdenticalTo
Checks if this Pokémon is nearly identical to the Pokémon passed in.This doesn't check if the two Pokémon have identical UUIDs, identical originalTrainers, or identical Persistent Stats.
- Parameters:
secondPokemon
- The Pokémon to be compared to.- Returns:
- True if nearly identical.
-