Skip to content
This repository was archived by the owner on Jul 22, 2019. It is now read-only.
This repository was archived by the owner on Jul 22, 2019. It is now read-only.

CP perfect percent is more accurate than IV perfect #469

@alawing

Description

@alawing

CP is caculate by CP = (BaseAtk + IndAtk) * (BaseDef + IndDef)^0.5 * (BaseSta + IndSta)^0.5 * (ECpM)^2 / 10

which IndAtk, IndDef and IndSta are IVs
and BaseAtk BaseDef BaseSta are in this link
https://github.com/justinleewells/pogo-optimizer/blob/master/data/game/pokemon.json
which different pokemon's have different base value
ECpM is here
https://github.com/justinleewells/pogo-optimizer/blob/master/data/game/level-to-cpm.json
which all pokemons are same

For that formula we know attack plays an important role in CP, and different pokemons have different base value, that's means 15/14/15 is better than 14/15/15 for lot of pokemons, and if one pokemon's base def is more than base sta, 15/15/14 is better than 15/14/15.

One result is we could calculate the worst CP, perfect CP, and we have current CP
worst CP = BaseAtk * BaseDef^0.5 * BaseSta^0.5 * (ECpM)^2 / 10
perfect CP = (BaseAtk + 15) * (BaseDef + 15)^0.5 * (BaseSta + 15)^0.5 * (ECpM)^2 / 10
current CP = (BaseAtk + IndAtk) * (BaseDef + IndDef)^0.5 * (BaseSta + IndSta)^0.5 * (ECpM)^2 / 10

so perfect percent = (current CP - worst CP) / (perfect CP - worst CP) =
((BaseAtk + IndAtk) * (BaseDef + IndDef)^0.5 * (BaseSta + IndSta)^0.5 -
BaseAtk * BaseDef^0.5 * BaseSta^0.5) /
((BaseAtk + 15) * (BaseDef + 15)^0.5 * (BaseSta + 15)^0.5 -
BaseAtk * BaseDef^0.5 * BaseSta^0.5)

Which we need introduce the first table from justinleewells/pogo-optimizer

so this perfect calculate is more accurate than just (IVatk + IVdef + IVsta) / 45

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions