Programming Pokémon Showdown Damage Calculator

anaconja

long day at job
is a Community Contributoris a Tiering Contributor
Photon Geyser targets Special Defense when the attack is physical
+1 252 Atk Zacian-Crowned Photon Geyser vs. 252 HP / 252 SpD Eternatus: 328-386 (67.7 - 79.7%) -- guaranteed 2HKO after Black Sludge recovery

edit: Photon Geyser also seems to suppress abilities that aren't suppressed by Photon Geyser
+1 252 Atk Zacian-Crowned Earthquake vs. 252 HP / 252 Def Zekrom: 280-330 (69.3 - 81.6%) -- guaranteed 2HKO after Poison Heal
+1 252 Atk Zacian-Crowned Photon Geyser vs. 252 HP / 252 SpD Zekrom: 158-186 (39.1 - 46%) -- guaranteed 3HKO after toxic damage
 
Last edited:

Fc

Waiting for something to happen?
is a Site Content Manageris a Top Team Rateris a Social Media Contributoris a Community Leaderis a Community Contributoris a Smogon Discord Contributoris a Tiering Contributoris a Top Contributoris a defending SCL Champion
Ubers Leader
SM OU has Zard Y special attack listed as 109, it should be 159. Please fix :)
Charizard-Y has the correct special attack stat for me, it's likely you clicked the mega charizard set for regular charizard pre mega.
Non-Mega Choice.PNGNon-Mega.PNG
Mega.PNGMega Choice.PNG
 

DugZa

Carpe Diem
is a Top Tiering Contributoris a Top Dedicated Tournament Hostis a Site Content Manager Alumnusis a Social Media Contributor Alumnusis a Community Leader Alumnusis a Community Contributor Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Former Smogon Metagame Tournament Circuit Champion
NUPL Champion
Currently the damage calculator is coded to halve the damage for every hit for multi strike moves vs Pokemon that hold a damage reducing berry but realistically damage is only halved for the first hit.

Damage for 2 hits without berry: 252+ Atk Venusaur Bullet Seed (2 hits) vs. 4 HP / 0 Def Azumarill: 160-192 (46.7 - 56.1%) -- approx. 73% chance to 2HKO

Damage for 2 hits with berry: 252+ Atk Venusaur Bullet Seed (2 hits) vs. 4 HP / 0 Def Rindo Berry Azumarill: 80-96 (23.3 - 28%) -- approx. 83.1% chance to 4HKO

So exactly half of the damage is dealt for both hits, with the berry according to the damage calculator. In practice it should be 1/2 damage for the first hit + full damage for the successive hits. Would be cool to see that fixed, thanks.
 
Last edited:
Currently the damage calculator is coded to halve the damage for every hit for multi strike moves vs Pokemon that hold a damage reducing berry but realistically damage is only halved for the first hit.

Damage for 2 hits without berry: 252+ Atk Venusaur Bullet Seed (2 hits) vs. 4 HP / 0 Def Azumarill: 160-192 (46.7 - 56.1%) -- approx. 73% chance to 2HKO

Damage for 2 hits with berry: 252+ Atk Venusaur Bullet Seed (2 hits) vs. 4 HP / 0 Def Rindo Berry Azumarill: 80-96 (23.3 - 28%) -- approx. 83.1% chance to 4HKO

So exactly half of the damage is dealt for both hits, with the berry according to the damage calculator. In practice it should be 1/2 damage for the first hit + full damage for the successive hits. Would be cool to see that fixed, thanks.
It also applies to Multiscale.
You could even argue that the chance to nhko becomes irrelevant for regular moves in these cases, and also with Gems but that's another issue.
 
Oh you're right. But why the heck is that "Charizard Y" for non-mega charizard? I don't get it.
The set is named OU Drought Wallbreaker Y because it's a set used on Mega Charizard Y.
They list the sets for Charizard under both its base and mega form because before mega evolving your Charizard will be in its base form and you may want to calc some situations without mega evolving.
 
The ability "Rivalry" doesn't seem to be working as intended. When I set two Luxrays against each other with rivalry, they do more damage to each other if one is female and one is male than if they are both male.
(Included pics for reference)
 

Attachments

252+ Atk Choice Band Tapu Bulu Wood Hammer vs. 0 HP / 0 Def Dragapult in Grassy Terrain: 266-313 (83.9 - 98.7%) -- 75% chance to OHKO

Something's not right.
 
252+ Atk Choice Band Tapu Bulu Wood Hammer vs. 0 HP / 0 Def Dragapult in Grassy Terrain: 266-313 (83.9 - 98.7%) -- 75% chance to OHKO

Something's not right.
You should check if the HP of Dragapult is at 100% and not lower for some reason.
If you changed it during a previous calc, it will keep the same percentage of HP left for the new Pokémon.
 
You should check if the HP of Dragapult is at 100% and not lower for some reason.
If you changed it during a previous calc, it will retain this value even when changing Pokémon (more precisely, it keeps the amount of damage, not health).
Thanks. It was at 88% for some reason, despite me never touching the HP even in a previous Pokemon.
 
Just had a game where my precipice blades did more damage than it was supposed to, according to the calc.

108+ Atk Groudon-Primal Precipice Blades vs. 212 HP / 36 Def Groudon: 97-115 (48 - 56.9%) -- 90.6% chance to 2HKO

This calc was done in the exact scenario that happened in the game (Single target, level 50), and we have the same set in in the calc. However, in the game, this did 65-70% without a crit. Wasnt sure if this belonged in the PS bug reports or here, so im reporting here.

Replay: https://replay.pokemonshowdown.com/gen7vgc2019-1201736893
You're calculating against non-Primal Groudon. Precipice Blades always does more than 70% to Primal Groudon under those circumstances.

108+ Atk Groudon-Primal Precipice Blades vs. 212 HP / 36 Def Groudon-Primal: 330-390 (83.7 - 98.9%)
 

Sijih

game show genius
is a Forum Moderatoris a Community Contributor
I know that doing calculations for multi-hit moves is pretty involved, but could there be a few basic checks for some simpler stuff, like the minimum number of turns to KO 100% and maximum number of turns to live 100%?

The attacker is guaranteed to get a KO in ceiling(100/min_roll) turns, and the defender is guaranteed to live at least floor(100/max_roll) turns.


In the scenario in the spoiler, for 3 hits, the calculator correctly determines the lowest possible roll (63.4%) and highest possible roll (76.6%).

If we know that the lowest amount of damage is 63.4%, then we are guaranteed to get a KO after 2 hits.
ceiling(100/min_roll) = ceiling(100/63.4) = ceiling(1.5772870662) = 2 hits will always kill

If we know that the highest amount of damage is 76.7%, then we are guaranteed to live at least 1 hit.
floor(100/max_roll) = floor(100/76.6) = floor(1.3054830287) = 1 hits

So maybe the calc could say something like:
252 SpA Choice Specs Greninja-Ash Water Shuriken (20 BP) (3 hits) vs. 0 HP / 0 SpD Zeraora: 201-243 (63.4 - 76.6%) -- approx. 2HKO, Will always KO in 2 Uses, Will never KO in 1 Use

Or is there something that I'm overlooking here? I just realized that this is what the calc probably does for normal moves, and the calc intentionally didn't want to be too certain about multi-hits...
 
I know that doing calculations for multi-hit moves is pretty involved, but could there be a few basic checks for some simpler stuff, like the minimum number of turns to KO 100% and maximum number of turns to live 100%?

The attacker is guaranteed to get a KO in ceiling(100/min_roll) turns, and the defender is guaranteed to live at least floor(100/max_roll) turns.


In the scenario in the spoiler, for 3 hits, the calculator correctly determines the lowest possible roll (63.4%) and highest possible roll (76.6%).

If we know that the lowest amount of damage is 63.4%, then we are guaranteed to get a KO after 2 hits.
ceiling(100/min_roll) = ceiling(100/63.4) = ceiling(1.5772870662) = 2 hits will always kill

If we know that the highest amount of damage is 76.7%, then we are guaranteed to live at least 1 hit.
floor(100/max_roll) = floor(100/76.6) = floor(1.3054830287) = 1 hits

So maybe the calc could say something like:
252 SpA Choice Specs Greninja-Ash Water Shuriken (20 BP) (3 hits) vs. 0 HP / 0 SpD Zeraora: 201-243 (63.4 - 76.6%) -- approx. 2HKO, Will always KO in 2 Uses, Will never KO in 1 Use

Or is there something that I'm overlooking here? I just realized that this is what the calc probably does for normal moves, and the calc intentionally didn't want to be too certain about multi-hits...

When you ask for a multi hit move, unless the number of hits you specified has a chance to ohko, the calc starts doing approximate calculations.
Even if 2 hits from Water Shuriken is a 2hko (which makes it a total of 4 hits), the calculator will not compute the exact 4 hits distribution (I think it assumes that most of the time it will exceed 5 hits and at this point, even for regular moves, it does approximate calculations to save time.
(Note that there is a way to compute precisely distributions for large numbers of hits but they proably can't do it with their current implementation)

Basically they deduce a distribution consisting in 16 damage rolls which approximates the sum of the N hits you specified.
Then they use this distribution to compute ko chances.
Since the distribution is an approximation, it adds the "approx." prefix.
So in your example it is indeed clearly a guaranteed 2hko and it knows it. It should maybe not include this prefix in this case though (if the min roll and the max roll of the approximate distribution are the same as the exact distribution for the sum of the N hits, then an "approx 2hko" is in fact a guaranteed 2hko).
If it's not guaranteed, it will display a % chance to 2hko (up to 4hko, as usual).
 

xJoelituh

Banned deucer.
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

Banned deucer.
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?
 
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
 

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

Top