/** * Get the absolute maximum CP for pokemons with their PokemonId. * * @param id The {@link PokemonIdOuterClass.PokemonId} of the Pokemon to get CP for. * @return The absolute maximum CP * @throws NoSuchItemException If the PokemonId value cannot be found in the {@link PokemonMeta}. */ public static int GetAbsoluteMaxCp(PokemonId id, int level = 40) { PokemonSettings settings = PokemonMeta.GetPokemonSettings(id); if (settings == null) { throw new Exception("Cannot find meta data for " + id); } StatsAttributes stats = settings.Stats; int attack = 15 + stats.BaseAttack; int defense = 15 + stats.BaseDefense; int stamina = 15 + stats.BaseStamina; return(GetMaxCpForPlayer(attack, defense, stamina, level)); }
public IVScore(StatsAttributes stats) { attack = stats.base_attack; defense = stats.base_defense; stamina = stats.base_stamina; }