public class TempBattlePokemonLevel extends PokemonLevel
Modifier and Type | Field and Description |
---|---|
protected int |
exp |
protected int |
level |
expToNextLevel, lastLevelType, pixelmon
Constructor and Description |
---|
TempBattlePokemonLevel(DelegateLink p,
int level)
Initializes a pokemonLevel.
|
Modifier and Type | Method and Description |
---|---|
void |
awardEXP(int experience,
ExperienceGainType type) |
boolean |
canLevelUp()
Checks if the Pokémon can pokemonLevel up.
|
int |
getExp()
Gets the amount of experience the Pokémon has.
|
int |
getPokemonLevel()
Gets the Pokémon's pokemonLevel.
|
protected void |
onLevelUp(PixelmonStatsData stats)
Updates the Pokémon's stats upon leveling up.
|
void |
recalculateXP()
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 |
updateExpToNextLevel()
Updates the amount of experience between the current and next levels.
|
awardEXP, awardEXP, getExpForLevel, getExpForNextLevelClient, getExpFraction, getExpFraction, getLastLevelType, readFromNBT, updateStats, writeToNBT
public TempBattlePokemonLevel(DelegateLink p, int level)
p
- The Pokémon who has this pokemonLevel.public int getPokemonLevel()
PokemonLevel
getPokemonLevel
in class PokemonLevel
public void setLevel(int i)
PokemonLevel
setLevel
in class PokemonLevel
i
- The new pokemonLevel.public void updateExpToNextLevel()
PokemonLevel
updateExpToNextLevel
in class PokemonLevel
public int getExp()
PokemonLevel
getExp
in class PokemonLevel
public void setExp(int experience)
PokemonLevel
setExp
in class PokemonLevel
experience
- The Pokémon's experience.public boolean canLevelUp()
PokemonLevel
canLevelUp
in class PokemonLevel
protected void onLevelUp(PixelmonStatsData stats)
PokemonLevel
onLevelUp
in class PokemonLevel
stats
- The stats to update.public void awardEXP(int experience, ExperienceGainType type)
awardEXP
in class PokemonLevel
public void recalculateXP()
PokemonLevel
recalculateXP
in class PokemonLevel