• The moderator of this forum is Austin.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon.

Programming Pokémon Showdown Damage Calculator

xJoelituh

is a member of the Site Staffis a Community Leaderis a Live Chat Contributoris a Battle Simulator Moderator
Discord Leader
Facade should be 140 BP in ADV when getting a status, basically working the same as in gen4 and 5(something weird is going on in bw too because damage changes slightly, cant figure out what tho)

ADV:
96 Atk Snorlax Facade vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 60.1% chance to 3HKO
Possible damage amounts: (99, 100, 101, 102, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 117)
96 Atk burned Snorlax Facade vs. 0 HP / 0 Def Moltres: 51-60 (15.8 - 18.6%) -- possible 6HKO <------------- this is wrong
Possible damage amounts: (51, 51, 52, 52, 53, 54, 54, 55, 55, 56, 57, 57, 58, 58, 59, 60) <-------------------- ^

DPP:
96 Atk Snorlax Facade vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 55.1% chance to 3HKO
Possible damage amounts: (99, 100, 100, 102, 103, 105, 105, 106, 108, 109, 111, 111, 112, 114, 115, 117)
96 Atk burned Snorlax Facade (140 BP) vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 55.1% chance to 3HKO
Possible damage amounts: (99, 100, 100, 102, 103, 105, 105, 106, 108, 109, 111, 111, 112, 114, 115, 117)

BW:
96 Atk Snorlax Facade vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 55.1% chance to 3HKO
Possible damage amounts: (99, 100, 100, 102, 103, 105, 105, 106, 108, 109, 111, 111, 112, 114, 115, 117)
96 Atk burned Snorlax Facade (140 BP) vs. 0 HP / 0 Def Moltres: 97-115 (30.2 - 35.8%) -- 40.9% chance to 3HKO <---------- this is slightly wrong Possible damage amounts: (97, 99, 99, 101, 102, 103, 105, 105, 107, 108, 109, 110, 111, 112, 114, 115) <----------------- ^

Because there was some confusing(mostly from my part though here):
https://www.smogon.com/forums/posts/8625938/
https://www.smogon.com/forums/posts/8625994/
 
Facade should be 140 BP in ADV when getting a status, basically working the same as in gen4 and 5(something weird is going on in bw too because damage changes slightly, cant figure out what tho)

ADV:
96 Atk Snorlax Facade vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 60.1% chance to 3HKO
Possible damage amounts: (99, 100, 101, 102, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 117)
96 Atk burned Snorlax Facade vs. 0 HP / 0 Def Moltres: 51-60 (15.8 - 18.6%) -- possible 6HKO <------------- this is wrong
Possible damage amounts: (51, 51, 52, 52, 53, 54, 54, 55, 55, 56, 57, 57, 58, 58, 59, 60) <-------------------- ^

DPP:
96 Atk Snorlax Facade vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 55.1% chance to 3HKO
Possible damage amounts: (99, 100, 100, 102, 103, 105, 105, 106, 108, 109, 111, 111, 112, 114, 115, 117)
96 Atk burned Snorlax Facade (140 BP) vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 55.1% chance to 3HKO
Possible damage amounts: (99, 100, 100, 102, 103, 105, 105, 106, 108, 109, 111, 111, 112, 114, 115, 117)

BW:
96 Atk Snorlax Facade vs. 0 HP / 0 Def Moltres: 99-117 (30.8 - 36.4%) -- 55.1% chance to 3HKO
Possible damage amounts: (99, 100, 100, 102, 103, 105, 105, 106, 108, 109, 111, 111, 112, 114, 115, 117)
96 Atk burned Snorlax Facade (140 BP) vs. 0 HP / 0 Def Moltres: 97-115 (30.2 - 35.8%) -- 40.9% chance to 3HKO <---------- this is slightly wrong Possible damage amounts: (97, 99, 99, 101, 102, 103, 105, 105, 107, 108, 109, 110, 111, 112, 114, 115) <----------------- ^

Because there was some confusing(mostly from my part though here):
https://www.smogon.com/forums/posts/8625938/
https://www.smogon.com/forums/posts/8625994/

According to this smogon post about the BW damage formula https://www.smogon.com/bw/articles/bw_complete_damage_formula, when afflicted by a status, Facade base power is doubled (it's a base power modifier) whereas Burn is a damage modifier (it's applied after computing the base damage).
Because of rounding these two factors don't cancel each other out, because they are not applied at the same stage of the damage calculation.
It works the same way in generations 6, 7 and 8 (I don't know how the damage formula worked precisely in older generations, like DPP where your damage calcs are the same).
So I don't think there is any mistake other than Facade not doubling power when the user is statused in ADV.
 
When the damage calculator is considering an ability, can it please display that ability in the "Ability" dropdown menu?
ability.png
 

Plague von Karma

Diolch am eich amser!
is a Community Contributoris a Pokemon Researcher
Not sure if these have been discussed before, but I thought I'd drop in.

Is it possible to have RBY and GSC allow modification of Stat Exp? While it's not the most relevant thing in the world, Confusion damage among other bits are. Mewtwo in RBY Ubers also uses very specific Stat Exp distributions to prevent rollovers in the event its Special is dropped post-Amnesia. It's also somewhat relevant in a few side formats (eg. Hackmons with L255s to avoid rollovers, level-limited formats where getting Stat Exp isn't really possible).

On a side note, is it possible to add calculation for potential Confusion damage as well?
 

Lauriane

formerly Kei Kikuno
Light Ball does not work if you select any non-base Pikachu.

This is an issue mostly when trying to calc G-Max Volt Crash as only the gmax one can technically use it, or older gen Pikachus which each had a precise move.

0 Atk Pikachu-Belle Icicle Crash vs. 76 HP / 0 Def Abomasnow: 49-58 (14.4 - 17%)
0 Atk Light Ball Pikachu Icicle Crash vs. 76 HP / 0 Def Abomasnow: 96-114 (28.2 - 33.5%)
 
There's no reason to include status moves in the default 4 attacks when most random movesets include multiple options for damaging moves. It's kinda annoying for the default Mew set to be Swords Dance, Dragon Dance, Flare Blitz, Close Combat when only 2 of those attacks are damaging and none are STAB
 
This is the correct thread for calculator suggestions.
Anyways people like having status moves taken from importable sets. It tells people the possibility for a boosting move which is good for general play. As for clutter, you can just import or type the full name of the move (and idt its that bad). Esp with relatively guaranteed moves like geomancy xern.
 
This is the correct thread for calculator suggestions.
Anyways people like having status moves taken from importable sets. It tells people the possibility for a boosting move which is good for general play. As for clutter, you can just import or type the full name of the move (and idt its that bad). Esp with relatively guaranteed moves like geomancy xern.
I'm not saying to remove the status moves, I'm saying they shouldn't be the default 4 attacks. It's a damage calculator so damaging moves should take precedent over status moves. It's also weird that most of the default 4 don't include stab, just the random coverage moves they run
 
From what I can tell, the listed sets are just ripped directly from the strategy dex.

I suppose a way to get around this problem without hardcoding filler moves for every Pokemon would be to have a set called "most used" or something, which would be like a blank set but the moves would be the four most used non-status moves from the most recent usage stats, though accounting for multiple formats might be a hassle, if not for the coder than for the user who suddenly has to deal with a much longer list of sets.
 
The damage calc does not take into consideration the grounding effects of the item iron ball.

ex 1: A flying/levitate mon holding an iron ball in psychic terrain will not take damage from a priority attack, but the calc says it will.

ex 2: A flying/levitate mon using an electric move under electric terrain will gain the terrain boost if holding an iron ball. This is not considered in the damage calc.
 
Last edited:
Hi, I think I've found a problem with the calculator - when I lower the base defence stat and DVs sometimes the pokemon takes less damage from physical attacks even though it's defence has been lowered. Unless there's some mechanic regarding DVs I don't know about this must be wrong - as the defence stat is reduced physical attacks should do more damage.

For context, I'm using the gen 1 calculator. I lower pokemon's defence stat to make counter more effective. It would actually be really useful if you could directly change the defence stat, instead of having to mess around with the base/dvs :)
 

Hamlette

Just a lonely pig
is a Live Chat Contributor
The multiple hits feature seems to be bugged when the mon has nonzero stage changes.
Tested with Superpower on Regirock (with Sturdy) at various stages.
At +0 the damage displayed for two hits is, as expected, 1.67 times the damage displayed for 1 hit ((1+0.67)/1 = 1.67)
At +1 the damage displayed for two hits is twice the damage for 1 hit, even though it should be 1.67 ((1.5+1)/1.5=1.67)
etc.,refer to chart
The error grows as stages grow to ridiculous levels (at +6, the damage displayed for two hits is 4.5 times the one hit damage, when it should be 1.875)

I have not tested with other moves than Superpower, but I suspect the same error occurs

Screenshot comparison for damage at +6 with one and two hits
 

Ropalme1914

Ace Poker Player
is a member of the Site Staffis a Forum Moderatoris a Contributor to Smogonis a Smogon Media Contributor
Moderator
1604862475875.png
Utility Umbrella is broken for rain. It still works fine for sun tho (although I would suggest that it appears on the calc: currently it just doesn't mention weather instead of saying, for example, "Utility Umbrella Blissey in Rain")
 
Not a bug, but a suggestion.

Suggest giving knock off the over "x" turns effect, such as stat lowering moves like Leaf Storm and Overheat.
This would be used to calculate if the move 2hkos or 3hkos with the difference in power after the opponent losing their item.
any updates? this would be really helpful, currently you have to calc the first use, write it down, remove opponents item, calc the second use and add it together. Adding the once/twice button reduces the process to one click. Sticky Hold should be taken into account.
 
There seems to be a bug with Zamazenta's damage calculation, i am unsure which one is correct but it doesn't seem to account for the Defense boost when calculating as seen by the damage calcs below, you can test this yourself on the calculator


252 Atk Garchomp Earthquake vs. 64 HP / 0 Def Zamazenta-Crowned: 236-282 (69.2 - 82.6%) -- guaranteed 2HKO

252 Atk Garchomp Earthquake vs. +1 64 HP / 0 Def Zamazenta-Crowned: 236-282 (69.2 - 82.6%) -- guaranteed 2HKO

EDIT: You can replicate this by moving the toggle on Zamazenta's defense from -- to -1
screenshots for proof below.
1605132889315.png

1605132941718.png

EDIT 2:
This also seems to work on regular Zamazenta or any Pokemon which has the ability Dauntless Shield so it is a problem with the ability itself.

EDIT 3:

https://replay.pokemonshowdown.com/gen8customgame-1221678901-h302w1asyyr1scy4j9rxe7kmng63novpw

Damage seems to work properly on PS so its just an error with calc.
 
Last edited:
Flail and Reversal calculations are wrong for gen2, gen3 and gen4. The calculator is currently applying the formula for gen5+ to all generations.

These are the correct formulas:

For gen2-4, compute floor(64*(current HP)/(max HP)) and read the following table:
0-1 --> power 200
2-5 --> power 150
6-12 --> power 100
13-21 --> power 80
22-42 --> power 40
43-64 --> power 20

For gen5+, compute floor(48*(current HP)/(max HP)) and read the following table:
0-1 --> power 200
2-5 --> power 150
6-12 --> power 100
13-21 --> power 80
22-42 --> power 40
43-48 --> power 20
 
Flail and Reversal calculations are wrong for gen2, gen3 and gen4. The calculator is currently applying the formula for gen5+ to all generations.

These are the correct formulas:

For gen2-4, compute floor(64*(current HP)/(max HP)) and read the following table:
0-1 --> power 200
2-5 --> power 150
6-12 --> power 100
13-21 --> power 80
22-42 --> power 40
43-64 --> power 20

For gen5+, compute floor(48*(current HP)/(max HP)) and read the following table:
0-1 --> power 200
2-5 --> power 150
6-12 --> power 100
13-21 --> power 80
22-42 --> power 40
43-48 --> power 20

https://www.smogon.com/dp/articles/damage_formula
https://www.smogon.com/bw/articles/bw_complete_damage_formula
https://www.trainertower.com/dawoblefets-damage-dissertation/#custom-bp

I don't have the data for generations 2 and 3 but the table you wrote for gen5+ disagrees with the links I posted above.
The numbers for gen 4 are correct though
According to the articles above, the table for gen5+ is

0-1 --> power 200
2-4 --> power 150
5-9 --> power 100
10-16 --> power 80
17-32 --> power 40
33-48 --> power 20

In the source code of the calculator, the gen 5 formula is indeed used for all generations.
 
Last edited:
I know randbats sets aren't the highest priority compared to the other stuff, but can Luxray and Heracross be updated so that they don't have flame orb+non-guts ability? Currently Luxray shows as intimidate+flame orb, and Heracross as moxie+flame orb.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top