• Check out the relaunch of our general collection, with classic designs and new ones by our very own Pissog!
  • The moderator of this forum is jetou.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

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
 
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
 
can anything be done about this?
at the middle pic i clicked rest. the tooltip hover overlay told me the 24% was actually 23.3% exactly 100 hp, but i wagered he may see the % in the log & do something other than toss.
most hariyama in adv uubl are thick fat with rest since heal bell dnite is s tier, so spending a turn clicking toss just to have the damage rested away is a turn he could go for a crit with a different move; if the 23% he saw was reliable, fishing for a full para would take 2 turns anyway.
i'm not upset that my wager didn't pay off; consistency is all i ask. if the 1st hit had been called 24%, i wouldn't have gone for that gambit.
23.PNG
24l.PNG
24.PNG

https://replay.pokemonshowdown.com/gen3uubl-2327150762-v7mc2ca25mow3anx9d4rpsiajw29eo5pw


idk if this is the right thread for this, but it is related to my earlier post:
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
 
Last edited:
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
252+ SpA Lanturn Thunderbolt vs. 252 HP / 252+ SpD Umbreon: 72-85 (18.2 - 21.5%) -- possible 7HKO Possible damage amounts: (72, 73, 73, 74, 75, 76, 77, 78, 79, 79, 80, 81, 82, 83, 84, 85)

The 85 roll is included so I don't think this is an issue in the calc.

can anything be done about this?
at the middle pic i clicked rest. the tooltip hover overlay told me the 24% was actually 23.3% exactly 100 hp, but i wagered he may see the % in the log & do something other than toss.
most hariyama in adv uubl are thick fat with rest since heal bell dnite is s tier, so spending a turn clicking toss just to have the damage rested away is a turn he could go for a crit with a different move; if the 23% he saw was reliable, fishing for a full para would take 2 turns anyway.
i'm not upset that my wager didn't pay off; consistency is all i ask. if the 1st hit had been called 24%, i wouldn't have gone for that gambit.
View attachment 725432View attachment 725436View attachment 725433
https://replay.pokemonshowdown.com/gen3uubl-2327150762-v7mc2ca25mow3anx9d4rpsiajw29eo5pw


idk if this is the right thread for this, but it is related to my earlier post:

I don't understand what this has to do with the calc.
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.

Should be fully accurate now thanks to StaraptorOP. More specifically, multihit move hit KO percentages are fully accurate if they are < 4 hits and off by less than 1% if they are > 3 hits.
 
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
I cannot seem to reproduce this.
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
Fixed. It resets to 100% now.
 
might just be an issue on my end w/ how firefox works but while selecting stat stage changes the numbers are impossible to see unless you hover over it

1743641398548.png
 

Attachments

  • 1743641383556.png
    1743641383556.png
    29.7 KB · Views: 29
Some of the toggles for OMs disappeared with the new patch (e.g. there should be a toggle for Mix and Mega somewhere under Field)
1743647236076.png
Also echoing above report but the dropdowns are extremely difficult to see on Dark Mode, Chrome browser.
1743647323779.png
1743647342017.png
1743647353409.png
Also I'm not sure if this has been brought up before (couldn't find anything from a quick search) but right now after selecting an existing set, changing fields like the ability, the forme (to my knowledge only these two?), and then changing the item will immediately revert both previous fields which makes it annoying when modifying sets while calcing.
 
Some of the toggles for OMs disappeared with the new patch (e.g. there should be a toggle for Mix and Mega somewhere under Field)
Fixed

might just be an issue on my end w/ how firefox works but while selecting stat stage changes the numbers are impossible to see unless you hover over it


Also echoing above report but the dropdowns are extremely difficult to see on Dark Mode, Chrome browser.
Also I'm not sure if this has been brought up before (couldn't find anything from a quick search) but right now after selecting an existing set, changing fields like the ability, the forme (to my knowledge only these two?), and then changing the item will immediately revert both previous fields which makes it annoying when modifying sets while calcing.

Fixed by jetou
 
1. salt cure shows up in the calc for every gen
2. most of the dropdown menus are much harder to read than they were before
3. the solid black for selected options looks out of place next to the gradients of the other buttons
 
1744923410706.png
1744923418446.png


Hello so my damage calc has been stuck like this ever since the new ui update. The right mon is just always on the bottom, even if zoomed in or out. Pretty sure it can be recreated by zooming out, but mine stays like this no matter what anyways. On opera gx browser btw.
 
i can't recreate it, but i had the damage calc open & the burn status got stuck on for the right side. adv, 6 imported sets shown only on the left. selecting a different status for the right side, it still changes to burned when i choose a different set on the right. changing gens it was still stuck on. refreshing made it go away.

also, can light screen & reflect be set to auto turn off unless double-clicked to be highlighted?
 
Last edited:
Screenshot-20250420-025141-Chrome.jpg

Screenshot-20250420-025106-Chrome.jpg


I guess this is considered a mistake. If you put Sticky Barb on Clefable, it counts the damage of this item, completely ignoring Magic Guard. However, the same is not true for LO. I'm aware that this is not that big of a deal, but bugs are there to be fixed.
 
Bug report:

The "over two turns" option seems to be correctly identifying leftovers, but not applying it in the sequential calculation:

+1 80 Def Zamazenta Body Press over 2 turns vs. 252 HP / 4 Def Ting-Lu: 516-612 (100.3 - 119%) -- guaranteed KO in 2 turns after Leftovers recovery

+1 80 Def Zamazenta Body Press vs. 252 HP / 4 Def Ting-Lu: 258-306 (50.1 - 59.5%) -- 76.6% chance to 2HKO after Leftovers recovery

The first calc should not be guaranteed if the second one is not a guaranteed 2hko. However it still flags it as "after leftovers recovery." I think it is the lack of calculating leftovers that is causing this because if i give my zama less defense so it can deal >50% on a roll, that is when it begins to show not guaranteed sequentially:

+1 76 Def Zamazenta Body Press over 2 turns vs. 252 HP / 4 Def Ting-Lu: 508-604 (98.8 - 117.5%) -- 98.8% chance to 2HKO after Leftovers recovery

+1 76 Def Zamazenta Body Press vs. 252 HP / 4 Def Ting-Lu: 254-302 (49.4 - 58.7%) -- 66.8% chance to 2HKO after Leftovers recovery
 
Analytic in the Damage Calculator is currently only implemented if the attacker's speed is lower than the defender's. However, in a real battle, Analytic could activate in other situations, like if the defender was switched in that turn or if the defender has used a priority move first. To account for these possibilities and make it more convenient for people who want to calculate damage when considering Analytic, I propose that a checkmark be added for Analytic, similar to Intimidate (checking Intimidate makes the Pokémon with Intimidate take damage as if the attacker has had its Attack stat lowered by one stage) where if Analytic is checked, all moves that the Pokémon with Analytic uses will deal 1.3x more damage. (excluding cases of neutralizing gas i guess)
 
Last edited:
Back
Top