Calculating IVs
I'm trying to create my own IV calculator and I can't quite get it to work. I think my equations are right so I'm wondering if there's something wrong with my base stats or CPm values.
I have a 1157CP Raichu with 80hp. I can tell through it's appraisal that it's got perfect IVs so I'm using it to check my calculations. It says it requires 2500 stardust to be powered up, so I know it's somewhere from level 19-20.5.
Based on the GamePress CPm table:
Level 19, CPm=.582279
Level 19.5, CPm=.589888
Level 20, CPm=.597400
Level 20.5, CPm=.604819
Using the equation: HP=(STA_BASE+STA_IV)*CPm, I can calculate STA_IV=(HP/CPm)-STA_BASE. Raichu's base stamina is 120 so:
Level 19, STA_IV=17.39
Level 19.5, STA_IV=15.62
Level 20, STA_IV=13.91
Level 20.5, STA_IV=12.27
Now, from here the only possible level is 19.5 assuming the IVs are truncated. However, I'm pretty sure I've never powered up this Raichu AND when I use the GamePress IV calculator it says it should be level 20.
So what am I doing wrong here?
Answers
Seems like it. And IVs have to be integers so it can't be level 19.5 as 15 stamina IV would be too low.
13.91 and 12.27 stamina IV means that the IV is either 14-15 if level 20 or 13 if 20.5 as 14 results in 81 HP.
So then you find all the IV permutations with those stamina IV values and then work out which ones also result in the CP entered.