Closed Shock3600 closed 2 years ago
Yikes, that's not good :o
Thanks for the bug report, I'll look into this!
Its actually much worse than that. Its not just hidden power. I had a calc for max attack adamnt cb ttar eq on my starmie, showing it doing like 10% less than the actual damage. Don't have a picture unfortunately
Hey, so I tried to reproduce this issue on my end by first calculating your matchup on the official calc.ps. (That way, I can see if it's an issue on my end or the calculator itself.) From your first screenshot, I can see that you must be in gen 3, 4 or 5 since Aurora Veil and Terrain are disabled.
I was able to reproduce the exact damage outputs in gen 3:
Since I was able to reproduce the same HP Bug damage range on calc.ps, it appears to be an issue with the calculator itself. (Showdex uses the same code for damage calculations as calc.ps, so any bugs with calc.ps will also be present in Showdex.)
Seems to be an ongoing issue with calc.ps, where Hidden Power's BP doesn't change based on the DVs/IVs. The above damage for HP Bug was based on 70 BP, which is the default BP when you select it from the dropdown. Showdex currently doesn't recalculate Hidden Power's BP.
Just to double-check, based on Bulbapedia's entry for Hidden Power calculations in gen 3, we can calculate the actual BP of HP Bug with the formula:
HP_power = floor(
((
HP_lsb2
+ (2 * ATK_lsb2)
+ (4 * DEF_lsb2)
+ (8 * SPE_lsb2)
+ (16 * SPA_lsb2)
+ (32 * SPD_lsb2)
) * 40) / 63
) + 30
*_lsb2
is the 2nd least significant bit (LSB) of the specified stat's IV.For Hariyama, since it has 31 IVs across the board, the 2nd LSB can be derived as follows:
( 31 )_10 = ( 0001 1111 )_2
^ 2nd LSB = 1
Then plugging 1
for each *_lsb2
in the aforementioned formula:
HP_power
= floor(
((
1
+ (2 * 1)
+ (4 * 1)
+ (8 * 1)
+ (16 * 1)
+ (32 * 1)
) * 40) / 63
) + 30
= floor(((1 + 2 + 4 + 8 + 16 + 32) * 40) / 63) + 30
= floor((63 * 40) / 63) + 30
= floor(40) + 30
= 40 + 30
= 70
I suppose in the case for Hariyama, 70 BP for HP Bug would be correct based on its 31 IVs for gen 3, but I can see this being an issue for Pokémon w/ not all 31 IVs, since the resulting BP wouldn't be 70.
Luckily, I can override the BP of any move (as you can do on calc.ps as well), so I'll translate all of this nerdy math into code to make sure Hidden Power moves have the correct BP for gens < 6 (since in gens 6+, all Hidden Power moves have 60 BP).
As for HP Bug's OHKO, you have critical damages enabled, which results in the range 112.6-132.6%. Otherwise, it would've been 56.1-66.3% against a 252 HP / 252+ DEF Celebi, which is a 2HKO. (But at Celebi's current HP of 55%, the calculator would report a guaranteed OHKO.)
Finally, for the 10% less damage on the EQ, do you know for sure that your opponent's Tyranitar had 252 ATK? Since the calc doesn't know the exact set your opponent is running (e.g., they could've had 80 ATK), there could be discrepancies in the calculations compared to the actual damages. But if so, do you remember what gen and format that battle was in? I'd like to reproduce this issue on my end.
Thanks!
Not sure the exact scenario that causes this, but hidden power is often calculated incorrectly. An example is hidden power bug on hariyama saying it will OHKO max defensive celebi when this is in fact not the case. (Chrome)