Programming Pokémon Showdown Damage Calculator

i dont know how to prove this but i was getting some bugs this week where i changed a pokemons status to burned, and then when i changed the pokemon (it was a stunky that i switched into an abra) it kept the burn toggle on, even when i turned it off if i switched the pokemon it would turn on again
 
252 Atk Rockruff Crunch vs. Lvl 96 252 HP 15 IVs / 252 Def 14 IVs Eviolite Fluffy Greavard: 45-54 (16.3 - 19.5%) -- possible 6HKO
Possible damage amounts: (45, 46, 46, 47, 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 53, 54)

But here it did 68
You can see the Greavard's stats in the video a bit before the move, and here are the stats of the Rockruff
https://cdn.discordapp.com/attachme...3a66bbf276f407411ddb97d5c9b1ab0d8e97f2132abd&

Here's a screenshot of the calc I did, and my friend double checked that I didnt miss anything. Both Rockruff and Greavar are Jolly so it doesnt matter for the calc and I didnt put it. The Rockruff is Own Tempo and has a sash, so same, those don't matter. Levels are correct. I'd be glad if someone proved me wrong but I think the information I gave to the calculator is correct and yet the result is wrong.
1741385900688.png
 
252 Atk Rockruff Crunch vs. Lvl 96 252 HP 15 IVs / 252 Def 14 IVs Eviolite Fluffy Greavard: 45-54 (16.3 - 19.5%) -- possible 6HKO
Possible damage amounts: (45, 46, 46, 47, 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 53, 54)

But here it did 68
You can see the Greavard's stats in the video a bit before the move, and here are the stats of the Rockruff
https://cdn.discordapp.com/attachme...3a66bbf276f407411ddb97d5c9b1ab0d8e97f2132abd&

Here's a screenshot of the calc I did, and my friend double checked that I didnt miss anything. Both Rockruff and Greavar are Jolly so it doesnt matter for the calc and I didnt put it. The Rockruff is Own Tempo and has a sash, so same, those don't matter. Levels are correct. I'd be glad if someone proved me wrong but I think the information I gave to the calculator is correct and yet the result is wrong.
View attachment 719834
i dont speak french but i think in your video crunch was a critical hit?
 
https://replay.pokemonshowdown.com/gen9ou-2298525448
0 SpA Mew Psychic Noise vs. 0 HP / 0 SpD Ludicolo: 82-97 (27.2 - 32.2%) -- 58.7% chance to 4HKO after Rain Dish recovery

Psychic Noise does block effects such as Rain Dish, but Psychic noise doesn't block Rain Dish recovery in the damage calc (likely applies to Ice Body and stuff like that too).

PS: the damage from what I calced doesn't match up with what is shown in the replay, that Ludicolo had 252 HP EVs but I had to increase the damage for Rain Dish recovery to be relevant for the calc
https://replay.pokemonshowdown.com/gen9ou-2298527882
0 SpA Mew Psychic Noise vs. 252 HP / 252 SpD Payapa Berry Toxicroak: 168-198 (45.4 - 53.5%) -- guaranteed 3HKO after Dry Skin recovery
0 SpA Mew Psychic Noise vs. 4 HP / 0 SpD Glaceon: 84-100 (30.8 - 36.7%) -- guaranteed 4HKO after Ice Body recovery

Ice Body and Dry Skin are also affected, but they still show up in the calc
Fixed (sorry for reping)
 
My Umbreon was at 85/394 (21.5736...%) HP, log called that 21.6%.

I saw this calc:
" 252+ SpA Lanturn Thunderbolt vs. 252 HP / 252+ SpD Umbreon: 72-85 (18.2 - 21.5%) -- possible 7HKO "
and was abashed when I got KO'd.

I hate entering %s into the calc, especially with it only allowing integer percents.
I would love for the log to show exact HP values, but idk if it's feasible to implement & keep private info from each other.

Can the rounding at least be consistent? the log rounded the percent of 85/394 up, while the calc truncated? that same percentage.

https://replay.pokemonshowdown.com/gen3uubl-2316786526
 
OHKO percentages are wrong for multi-hit moves
For example:
Showdown calc: 252+ Atk Mystic Water Urshifu-Rapid-Strike Surging Strikes (3 hits) vs. 0 HP / 4 Def Ogerpon-Cornerstone on a critical hit: 153-180 (98.7 - 116.1%) -- approx. 81.3% chance to OHKO
Nimbasa city post calc: 252+ Atk Mystic Water Urshifu-Rapid Strike Surging Strikes (3 hits) vs. 0 HP / 4 Def Ogerpon-Cornerstone on a critical hit: 153-180 (98.7 - 116.1%) -- 98.02% chance to OHKO

I checked myself by going through all 4096 possibilities in excel and the showdown calc doesn't take the different rolls from the multiple hits into account when working out the probability for OHKOs ect.
 
Request:
In the calc there is an option to change a mons current hp, either by number or by percentage. This does not get reset when switching sets and the only way to reset it to full hp is to manually change either field.

My suggestions are:

  1. Reset this value to default (100%) as is done with other fields such as stat changes and status.
  2. Add a button to reset hp to 100% to the right of the field in the calc
 
Request:
In the calc there is an option to change a mons current hp, either by number or by percentage. This does not get reset when switching sets and the only way to reset it to full hp is to manually change either field.

My suggestions are:

  1. Reset this value to default (100%) as is done with other fields such as stat changes and status.
  2. Add a button to reset hp to 100% to the right of the field in the calc
still manual, but you can just click the box & spam numbers, it will cap at the max
 
Back
Top