Class TempBattlePokemonLevel
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.stats.PokemonLevel
com.pixelmonmod.pixelmon.api.pokemon.stats.TempBattlePokemonLevel
Created by Jay113355 on 3/4/2019.
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.pokemon.stats.PokemonLevel
expToNextLevel, lastLevelType, pixelmon
-
Constructor Summary
ConstructorDescriptionTempBattlePokemonLevel
(DelegateLink p, int level) Initializes a pokemonLevel. -
Method Summary
Modifier and TypeMethodDescriptionvoid
awardEXP
(int experience, ExperienceGainType type) boolean
Checks if the Pokémon can pokemonLevel up.int
getExp()
Gets the amount of experience the Pokémon has.int
Gets the Pokémon's pokemonLevel.protected void
onLevelUp
(PixelmonStatsData stats) Updates the Pokémon's stats upon leveling up.void
Resets the Pokémon experience to the beginning of the pokemonLevel.void
setExp
(int experience) Sets the Pokémon's experience.void
setLevel
(int i) Sets the Pokémon's pokemonLevel and updates its health proportionally.void
Updates the amount of experience between the current and next levels.Methods inherited from class com.pixelmonmod.pixelmon.api.pokemon.stats.PokemonLevel
awardEXP, awardEXP, getExpForLevel, getExpForNextLevelClient, getExpFraction, getExpFraction, getLastLevelType, readFromNBT, updateStats, writeToNBT
-
Field Details
-
level
protected int level -
exp
protected int exp
-
-
Constructor Details
-
TempBattlePokemonLevel
Initializes a pokemonLevel.- Parameters:
p
- The Pokémon who has this pokemonLevel.
-
-
Method Details
-
getPokemonLevel
public int getPokemonLevel()Description copied from class:PokemonLevel
Gets the Pokémon's pokemonLevel.- Overrides:
getPokemonLevel
in classPokemonLevel
- Returns:
- The Pokémon's pokemonLevel.
-
setLevel
public void setLevel(int i) Description copied from class:PokemonLevel
Sets the Pokémon's pokemonLevel and updates its health proportionally.- Overrides:
setLevel
in classPokemonLevel
- Parameters:
i
- The new pokemonLevel.
-
updateExpToNextLevel
public void updateExpToNextLevel()Description copied from class:PokemonLevel
Updates the amount of experience between the current and next levels.- Overrides:
updateExpToNextLevel
in classPokemonLevel
-
getExp
public int getExp()Description copied from class:PokemonLevel
Gets the amount of experience the Pokémon has.- Overrides:
getExp
in classPokemonLevel
- Returns:
- The amount of experience the Pokémon has
-
setExp
public void setExp(int experience) Description copied from class:PokemonLevel
Sets the Pokémon's experience.- Overrides:
setExp
in classPokemonLevel
- Parameters:
experience
- The Pokémon's experience.
-
canLevelUp
public boolean canLevelUp()Description copied from class:PokemonLevel
Checks if the Pokémon can pokemonLevel up.- Overrides:
canLevelUp
in classPokemonLevel
- Returns:
- Whether the Pokémon can pokemonLevel up.
-
onLevelUp
Description copied from class:PokemonLevel
Updates the Pokémon's stats upon leveling up.- Overrides:
onLevelUp
in classPokemonLevel
- Parameters:
stats
- The stats to update.
-
awardEXP
- Overrides:
awardEXP
in classPokemonLevel
-
recalculateXP
public void recalculateXP()Description copied from class:PokemonLevel
Resets the Pokémon experience to the beginning of the pokemonLevel.- Overrides:
recalculateXP
in classPokemonLevel
-