Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PokemonInfo to API for BaseStats,Level,MaxCP,Perfection. Fixed proto for cpMultipliers(int->float) #139

Merged
merged 4 commits into from
Jul 23, 2016

Conversation

5andr0
Copy link
Contributor

@5andr0 5andr0 commented Jul 23, 2016

The CalculatePokemonPerfection function now calculates the perfect MaxCP
percentage based on BaseStats. I also had to fix the protocol to change
the cpMulitplier values from int to float values

…proto for cpMultipliers(int->float)

The CalculatePokemonPerfection function now calculates the perfect MaxCP
percentage based on BaseStats. I also had to fix the protocol to change
the cpMulitplier values from int to float values
@AdnanCukur
Copy link
Contributor

what was wrong with the way it calculated perfection earlier ?

@UgaBugaBoo
Copy link

What's the difference between the two commits ?

@5andr0
Copy link
Contributor Author

5andr0 commented Jul 23, 2016

First some background info: TheSilphRoad Pokemon CP formula
Max CP = 0.1* ((BaseAtk + IV) * (BaseDef + IV)^0.5 * (BaseSta + IV)^0.5 * (CpM+ACpM)^2)
As you can see the AttackIndividualValue has a greater impact on the CP than def/sta. The CP will also increase more with pokemons having high attack values. It'll be less for Pokemons whos CP is based on a high def base value. That's why we have to take the base stats into consideration. The previous function was just a little bit off, now its 100% accurate!

@OverlordQ
Copy link
Contributor

OverlordQ commented Jul 23, 2016

You'll need to compile the proto file to generate a new Payloads.cs, otherwise it'll have no effect.

gitweb was hiding the diff.

@tensei
Copy link

tensei commented Jul 23, 2016

he changed the payload.cs if you would look at the changes
and ofc it's tested and works

@NecronomiconCoding NecronomiconCoding merged commit 35ed758 into NecronomiconCoding:master Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants