Search in sources :

Example 6 with PokemonSettings

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);
}
Also used : PokemonSettings(POGOProtos.Settings.Master.PokemonSettingsOuterClass.PokemonSettings) StatsAttributes(POGOProtos.Settings.Master.Pokemon.StatsAttributesOuterClass.StatsAttributes)

Example 7 with PokemonSettings

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());
}
Also used : PokemonSettings(POGOProtos.Settings.Master.PokemonSettingsOuterClass.PokemonSettings) StatsAttributes(POGOProtos.Settings.Master.Pokemon.StatsAttributesOuterClass.StatsAttributes)

Aggregations

PokemonSettings (POGOProtos.Settings.Master.PokemonSettingsOuterClass.PokemonSettings)7 StatsAttributes (POGOProtos.Settings.Master.Pokemon.StatsAttributesOuterClass.StatsAttributes)4 ItemTemplate (POGOProtos.Networking.Responses.DownloadItemTemplatesResponseOuterClass.DownloadItemTemplatesResponse.ItemTemplate)3 BadgeSettings (POGOProtos.Settings.Master.BadgeSettingsOuterClass.BadgeSettings)2 ItemSettings (POGOProtos.Settings.Master.ItemSettingsOuterClass.ItemSettings)2 MoveSettings (POGOProtos.Settings.Master.MoveSettingsOuterClass.MoveSettings)2 PokemonId (POGOProtos.Enums.PokemonIdOuterClass.PokemonId)1 DownloadItemTemplatesResponse (POGOProtos.Networking.Responses.DownloadItemTemplatesResponseOuterClass.DownloadItemTemplatesResponse)1 PlayerLevelSettings (POGOProtos.Settings.Master.PlayerLevelSettingsOuterClass.PlayerLevelSettings)1 Evolutions (com.pokegoapi.api.pokemon.Evolutions)1 NoSuchItemException (com.pokegoapi.exceptions.NoSuchItemException)1 FileOutputStream (java.io.FileOutputStream)1