Programming Pokémon Showdown Damage Calculator

Plague von Karma

Gadewch i ni osod mentor, a gawn ni?
is a Site Content Manageris a Forum Moderatoris a Community Contributoris a Pokemon Researcheris a Contributor to Smogon
Moderator
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
 
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

Banned deucer.
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 Site Content Manageris a Forum Moderatoris a Tiering Contributoris 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.

EDIT 4:

I have now come to the conclusion after a few months and more analysis that the entire ability is completely bugged on Calculator, when changing a pokemon's ability to Dauntless Shield, it only adds the text +1 to the calc but doesn't actually change the damage as seen below:


252 Atk Zamazenta Close Combat vs. 0 HP / 0 Def Garchomp: 205-243 (57.4 - 68%) -- guaranteed 2HKO
252 Atk Zamazenta Close Combat vs. +1 0 HP / 0 Def Garchomp: 205-243 (57.4 - 68%) -- guaranteed 2HKO
 
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:

SparksBlade

is a Forum Moderatoris a Community Contributoris a Battle Simulator Driver
Moderator
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.
 
When importing sets for Calyrex-Ice or Calyrex-Shadow the Calculator imports 2 Custom Sets with the exact same moves, nature, EV spread and IVs, only difference being that one of those sets is for Glastrier/Spectrier respectively, instead of the Calyrex forms. Not that big of a deal, but certainly really annoying for someone who tries to keep his custom sets in order.
 
The new DLC 2 Pokémon (Slowking-Galar, Calyrex, Glastrier, Spectrier, and the rider forms) aren't in the random battle damage calculator
 
Silver Powder appears not to be working (not boosting bug type moves). I tested this on heracross, yanma and yanmega in gens 3, 4, and 8; none seem to be working.
 

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

Top