vinnymac / PokeNurse

💉 A tool for Pokémon Go to aid in transferring and evolving Pokémon
283 stars 48 forks source link

#27 Max Candy and Stardust #63

Closed vinnymac closed 8 years ago

vinnymac commented 8 years ago

@Wrexial and @mackhankins let me know what you think of this so far. It is doing what I wanted it to, but I don't think I am getting the right costs yet, which may have something to do with the functions from Blossom. If you look at http://pokemongo.gamepress.gg/power-up-costs It seems a bit off from those numbers.

I am sure that iterating with numOfUpgrades works properly. I just think that calculated costs for stardust and candies is off somehow.

Some Test Results

Charmander

(max level, current level, numberOfUpgrades)
Candy Stats: 22 20 4
(level, index, total candy)
20.5 0 2
21 1 4
21.5 2 7
22 3 10

(max level, current level, numberOfUpgrades)
Stardust Stats: 22 20 4
(level, index, total dust)
20.5 0 2500
21 1 5000
21.5 2 8000
22 3 11000

Bulbasaur

(max level, current level, numberOfUpgrades)
Candy Stats: 22 17 10
(level, index, total candy)
17.5 0 2
18 1 4
18.5 2 6
19 3 8
19.5 4 10
20 5 12
20.5 6 14
21 7 16
21.5 8 19
22 9 22

(max level, current level, numberOfUpgrades)
Stardust Stats: 22 17 10
(level, index, total dust)
17.5 0 2200
18 1 4400
18.5 2 6600
19 3 8800
19.5 4 11300
20 5 13800
20.5 6 16300
21 7 18800
21.5 8 21800
22 9 24800

If you look at the first result, you can see the candies go from 2 to 4 to 7 to 10 (2 + 2 + 3 + 3). From levels 20.5-22. So in just 4 levels it calculates 10 candies. But based on the power up costs site from 20.5 to 22 it should be 2 to 5 to 8 to 11 (2 + 3 + 3 + 3). I am not sure who is right or wrong here since we are pinning Blossoms code vs the Power Up Costs from gamepress. Let me know your thoughts.

Wrexial commented 8 years ago

Im not sure which is your bit and which is the test result from the site?

vinnymac commented 8 years ago

@Wrexial both test results are from the pull request methods. I will display the ones from the site below. I am certain they would be different right now. I am pretty sure the blossom code considers existing powerups num_upgrades, but both of these pokemon have 0.

These are the methods I ran. First param is the trainer level, second is num_upgrades, third is the pokemon's cp_multiplier

utils.getMaxCandyCostsForPowerup(20, 0, 0.5974000096321106)
utils.getMaxStardustCostsForPowerup(20, 0, 0.5974000096321106)

utils.getMaxCandyCostsForPowerup(20, 0, 0.5507926940917969)
utils.getMaxStardustCostsForPowerup(20, 0, 0.5507926940917969)

Charmander (20-22) 4 Upgrades

Methods

10 candies | 11,000 stardust

GamePress Power Up Cost

11 candies | 11,500 stardust

Bulbasaur (17.5-22) 10 Upgrades

Methods

22 candies | 24,800 stardust

GamePress Power Up Cost

23 candies | 25,600 stardust

vinnymac commented 8 years ago

@Wrexial gave me this sheet https://docs.google.com/spreadsheets/d/118FlgG9YMrU6Ae74cwuhl_AXyEv0QEw9A7Pfvo8MJYI/edit#gid=0

I updated the blossom methods with it and hopefully that will make the costs more accurate now.