You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you load a fresh version of the calculator (whether by going to the page for the first time or refreshing the page) and input a set of IVs, check the "Lock Median" option, and click "Calculate Hidden Power", the calculation never finishes, with the status display showing only "Calculating Hidden Power..."
If you follow the same steps with the GenIII-V calculator, the calculation does finish and you get Hidden Power's type and power for those IVs.
The calculation finishes on the modern (XY) calculator only if the IVs were generated by inputting a Pokémon's stat values.
After doing some tests, I believe the problem is caused by p.sortnum(); on line 915, a remnant of the pre-GenVI code for calculating Hidden Power's base power. When the function display_hp() is called at line 927, p is undefined, causing p.sortnum(); in display_hp() to fail and as a result display_hp() never completes. However, when display_hp() is called at line 962, p is defined (on line 931), allowing display_hp() to complete.
I've found two potential fixes:
Uncommenting line 926, giving p a value of [60]
p.sortnum(); could be commented out in display_hp() since the value of p is no longer used
The text was updated successfully, but these errors were encountered:
If you load a fresh version of the calculator (whether by going to the page for the first time or refreshing the page) and input a set of IVs, check the "Lock Median" option, and click "Calculate Hidden Power", the calculation never finishes, with the status display showing only "Calculating Hidden Power..."
If you follow the same steps with the GenIII-V calculator, the calculation does finish and you get Hidden Power's type and power for those IVs.
The calculation finishes on the modern (XY) calculator only if the IVs were generated by inputting a Pokémon's stat values.
After doing some tests, I believe the problem is caused by
p.sortnum();
on line 915, a remnant of the pre-GenVI code for calculating Hidden Power's base power. When the functiondisplay_hp()
is called at line 927,p
is undefined, causingp.sortnum();
indisplay_hp()
to fail and as a resultdisplay_hp()
never completes. However, whendisplay_hp()
is called at line 962,p
is defined (on line 931), allowingdisplay_hp()
to complete.I've found two potential fixes:
p
a value of[60]
p.sortnum();
could be commented out indisplay_hp()
since the value ofp
is no longer usedThe text was updated successfully, but these errors were encountered: