예제 #1
0
        public static double CalculatePokemonPerfection(PokemonData poke)
        {
            if (poke.CpMultiplier + poke.AdditionalCpMultiplier == 0)
            {
                return((poke.IndividualAttack * 2 + poke.IndividualDefense + poke.IndividualStamina) / (4.0 * 15.0) * 100.0);
            }

            BaseStats baseStats = GetBaseStats(poke.PokemonId);
            var       max_cp    = CalculateMaxCPMultiplier(poke);
            var       min_cp    = CalculateMinCPMultiplier(poke);
            var       cur_cp    = CalculateCPMultiplier(poke);

            return(((cur_cp - min_cp) / (max_cp - min_cp)) * 100.0);
        }
예제 #2
0
        public static double CalculateCPMultiplier(PokemonData poke)
        {
            BaseStats baseStats = GetBaseStats(poke.PokemonId);

            return((baseStats.BaseAttack + poke.IndividualAttack) * Math.Sqrt(baseStats.BaseDefense + poke.IndividualDefense) * Math.Sqrt(baseStats.BaseStamina + poke.IndividualStamina));
        }
예제 #3
0
        public static double CalculateMaxCPMultiplier(PokemonData poke)
        {
            BaseStats baseStats = GetBaseStats(poke.PokemonId);

            return((baseStats.BaseAttack + 15) * Math.Sqrt(baseStats.BaseDefense + 15) * Math.Sqrt(baseStats.BaseStamina + 15));
        }