use of POGOProtos.Settings.Master.PokemonSettingsOuterClass.PokemonSettings in project PokeGOAPI-Java by Grover-c13.
the class PokemonDetails method getMaxCpFullEvolveAndPowerup.
/**
* Calculated the max cp of this pokemon, if you upgrade it fully with your current player level
*
* @param playerLevel the current player level
* @param highestEvolution the full evolution path
* @return Max cp of this pokemon
*/
private int getMaxCpFullEvolveAndPowerup(int playerLevel, PokemonId highestEvolution) {
PokemonSettings settings = api.itemTemplates.getPokemonSettings(highestEvolution);
StatsAttributes stats = settings.getStats();
int attack = getIndividualAttack() + stats.getBaseAttack();
int defense = getIndividualDefense() + stats.getBaseDefense();
int stamina = getIndividualStamina() + stats.getBaseStamina();
return PokemonCpUtils.getMaxCpForPlayer(api, attack, defense, stamina, playerLevel);
}
use of POGOProtos.Settings.Master.PokemonSettingsOuterClass.PokemonSettings in project PokeGOAPI-Java by Grover-c13.
the class PokemonDetails method getCpAfterEvolve.
/**
* Calculate the CP after evolving this Pokemon
*
* @param evolution the pokemon evolving into
* @return New CP after evolve
*/
public int getCpAfterEvolve(PokemonId evolution) {
PokemonSettings settings = api.itemTemplates.getPokemonSettings(evolution);
StatsAttributes stats = settings.getStats();
int attack = getIndividualAttack() + stats.getBaseAttack();
int defense = getIndividualDefense() + stats.getBaseDefense();
int stamina = getIndividualStamina() + stats.getBaseStamina();
return PokemonCpUtils.getCp(attack, defense, stamina, getCombinedCpMultiplier());
}
Aggregations