Programming Pokémon Showdown Damage Calculator

So I've discovered when trying to use the dmg calculator in regards to OM's it's rather frustrating having to type out the base stats of mons (for OMs that allow you to do this) especially when doing multiple pokemon. So I think it would be handy if there was an option that you can click on at the top, that had OM and then the various OMs that allow base stats to be changed (such as godly gift and re-evolution) and then when you select or input a mon it has the correct base stats. Sort of like how you can go /reevo to see the correct stats of mons for that format in showdown. Could do it via a command instead of a drop down option. Would love to see something like this be implemented, thanks.

p.s. could also do something like when you import/export the teams it has the changed base stats as another line above the ev spreads if that works better.
 
Hi!

The Metronome item does nothing in the damage calculator in the DPP section. It's also only allowing you to select only up to 5 consecutive uses, which makes sense if it's trying to use the Black/White version of the item. I think it is because if you switch the calc to BW the item works as you think it would.

Steps to reproduce:
1. Open up damage calc
2. Switch to DPP at the top
3. Change the item of either Abomasnow to Metronome
4. Adjust any of the "how many times was this used before and consecutively" dropdowns
5. Notice no amount of fiddling with the settings for the Metronome causes damage calc differences.

I thought this was a bug related to having protect on the set. I removed protect from both Abomanow, but no change arose.
 
Expanding force does not take into account non-grounded Pokemon. Either with the flying type, levitate or air balloon
 

sharpclaw

is a Top Artistis a Community Leaderis a Community Contributoris a member of the Battle Simulator Staffis a Dedicated Tournament Host
Community Leader
When clicking the Dynamax button for Urshifu-Rapid-Strike-Gmax, the Crit button for Surging Strikes persists as On, even though G-Max Rapid Flow isn't an auto-crit move. Thanks!
 
Hi !
I have one request that I'm sure many will agree: Adding a dark theme option in damage calculator !

Due to low vision and being prone to eye inflamation (which cause photophobia during flareups), light themes are uncomfortable for me, so I use dark mode everywhere when possible: cellphone settings, discord, twitch, facebook, youtube, showdown, etc. Even people with no vision issue find dark themes easier to read than light theme.

I hope this feature is planned to be added because it's the main reason why I don't use the calculator often.

Regards
Gardevoir Queen Ishimaru
 
Apparently black sludge and leftovers are ignored in the process of calculating probablity that involves offensive stat changing moves that is used for over 2 turns.

22nd September 2022: added 2 more calcs because i thought stealth rock was the cause of this chaos but nope it was just these moves as a whole that needs repairing in the calc

252 SpA Contrary Serperior Leaf Storm over 2 turns vs. 252 HP / 152+ SpD Toxapex: 268-316 (88.1 - 103.9%) -- guaranteed KO in 2 turns after Stealth Rock and Black Sludge recovery

252 SpA Contrary Serperior Leaf Storm over 2 turns
vs. 252 HP / 152+ SpD Toxapex: 268-316 (88.1 - 103.9%) -- guaranteed KO in 2 turns after Stealth Rock and Leftovers recovery

252 SpA Contrary Serperior Leaf Storm over 2 turns
vs. 252 HP / 152+ SpD Toxapex: 268-316 (88.1 - 103.9%) -- 25% chance to 2HKO after Black Sludge recovery

252 SpA Contrary Serperior Leaf Storm over 2 turns
vs. 252 HP / 152+ SpD Toxapex: 268-316 (88.1 - 103.9%) -- 25% chance to 2HKO after Leftovers recovery

26th September 2022: i didn't want to double post so this bug is edited in
Utility umbrella is ignored in the calculation process
1664158979243.png
 
Last edited:

Bobsican

Powerscaler at heart
is a Top Tiering Contributor
Knock Off should have its BP changed after the first hit for the purpose of 2HKOs and above, namely as the move is no longer boosted if the opponent has no held item anymore, although exceptions exist like targets with Sticky Hold and a otherwise removable item.
 
Last edited:
Hello, just created an account after witnessing something weird on the calculator.

Playing randoms, I just noticed that when doing calcs for Urshifu (on my match a Dark Urshifu), the calculator will always activate the flag for critical hit on Wicked Blow. If you then do the calculations for G-Max One Blow, the crit flag will still be on, and in my case missed to OHKO the opposing pokémon (it didn't matter).

Dunno if here is the people that maintain the calculators, but would be nice that the trigger that activates the crit flag on Wicked Blow/Surging Strikes/all other 100% crit attacks probably, also deactivates the flag in case of dynamax.

Hope it helps, cheers.
 

The one and only buck

Banned deucer.
This is correct. Utility Umbrella only affects moves used by the holder, not moves targeted at the holder. If Kyogre were to hold the Utility Umbrella then it wouldn't receive the damage boost from rain.
no ur wrong! In the game (pokemon showdown-wise) utility umbrella ignores the effect of both. It reduces the power of a water spout regardless of who holds it between blissey and kyogre. thats a fact.
 

Karthik

time heals all
is a Programmeris a Battle Simulator Moderator
I was actually the one to submit a fix for this a year ago funnily enough. Just hasn't been merged yet.
 

The one and only buck

Banned deucer.
oh yeah you are right my bad lol, I had it mixed up. I know for sure that it won't affect the damage for both though, should only affect the defender.
Wut I meant by “affect both” was the fact that — let’s assume a Kroger has an umbrella and is vs a groudon in the normal sun. The water attacks kyogre will unleash won’t have thei power diminished by the sun as it normally would. And the fire attacks groudon might launched on kyogre wont be boosted by the sun. That is how the utility umbrella works.
 

Karthik

time heals all
is a Programmeris a Battle Simulator Moderator
let’s assume a Kroger has an umbrella and is vs a groudon in the normal sun. The water attacks kyogre will unleash won’t have thei power diminished by the sun as it normally would.
This part is not true. As seen in this replay, Kyogre deals the same damage with and without the umbrella. Here's the calc to show that the sun is reducing the damage in both hits of scald

0 SpA Kyogre Scald vs. 0 HP / 0 SpD Groudon in Sun: 134-158 (39.2 - 46.3%) -- guaranteed 3HKO
 
i was shown a calc of zacian-crowned not being ohkod by a timid life orb miraidon's electro drift in terrain, and i thought to myself "wait a second, that seems wrong!". so i calculated with another pokemon, (max hp 4 spd blissey) using choice specs instead with a modest nature and that also seemed very wrong! how is a pokemon that has 2 effective life orbs on a choice specs boost off of 135 spa doing this little damage?

and then i realized the legendary abilities arent implemented yet. im not sure if this is a bug or if theyre just weirdly hard to implement, but the (temporary) fix ive come up with is to adjust their base attacking stats to 190, which replicates the boost they get from their respective abilities (the math used is multiplying the effective stat by 1.3 then converting to a base stat number). heres the old calc:

252+ SpA Choice Specs Miraidon Electro Drift vs. 252 HP / 4 SpD Blissey in Electric Terrain: 276-325 (38.6 - 45.5%) -- guaranteed 3HKO

and the fixed calc for comparison:

252+ SpA Choice Specs Miraidon Electro Drift vs. 252 HP / 4 SpD Blissey in Electric Terrain: 358-423 (50.1 - 59.2%) -- guaranteed 2HKO

along with 8 trial games ran to see if the rolls were right (i failed to replicate a low roll but it never went higher than 58)

https://replay.pokemonshowdown.com/gen9ubers-1721497276-plpheiut2ez39yays1s61muws6imt0qpw
https://replay.pokemonshowdown.com/gen9ubers-1721499284-uhqhyx1iztv27jm6omt7s78hcw1a5i5pw
https://replay.pokemonshowdown.com/gen9ubers-1721499785-g6sklymm1exc6mggu5q1hg5hlyout2upw
https://replay.pokemonshowdown.com/gen9ubers-1721500040-ymoc31zgdjrw1ewhlspqjoxj07uzi7opw
https://replay.pokemonshowdown.com/gen9ubers-1721500246-zxlz2o3lol4r7b2jxsuj8up78v68fzapw
https://replay.pokemonshowdown.com/gen9ubers-1721500462-z7aju22ouhzkh51zajawoaev0tsiqmmpw
https://replay.pokemonshowdown.com/gen9ubers-1721500735-u4ypknfs8wf7qy9luoorpfv67123vr1pw
https://replay.pokemonshowdown.com/gen9ubers-1721501018-xs53brd482qm0tebe9tdh0awudubhmcpw
 
I just noticed it works fine if I entered Mimikyu vs. Espeon, but when I put Dondozo vs. Espeon, any boosts to the Sp. Attack "levels" don't show a change in calculated damage, so maybe its specifically because its calculating against a new pokemon?
Dondozo has the ability unaware which ignores stat changes
 

Greybaum

GENTLEMAN, THIS IS DEMOCRACY MANIFEST
is a Community Contributoris a Tiering Contributoris a Contributor to Smogon
Probably already known and considered low priority but - all SV NFEs show as Abomasnow and are not compatible with Eviolite. Primeape/Bisharp/Ursaring/Basculin-H also need to be flagged for Eviolite compatibility.
 
Type ordering, when computing type effectiveness multipliers, seems wrong in gen 4 (possibly in gen 2 and gen 3 as well).

How does the game compute it (source: https://wiki.xn--rckteqa2e.com/wiki/ダメージ#.E7.9B.B8.E6.80.A7.E8.A3.9C.E6.AD.A3 thanks decsy for pointing it out): the game multiplies the type effectivenesses according to this type ordering: Normal > Fire > Water > Electric > Grass > Ice > Fighting > Poison > Ground > Flying > Psychic > Bug > Rock > Ghost > Dragon > Dark > Steel, with one exception: if the move is Ice-type, and the defensive type includes Fire, then Fire appears last in the calculation.

How does Showdown's calculator compute it: it multiplies the type effectivenesses according to the primary/secondary type order of the defending Pokémon.

Example:
Jynx (Modest, 252 SpA, Choice Specs, 12 IV) uses Shadow Ball on Bronzong (Steel/Psychic, Adamant, 252 HP / 0 SpD, 12 IV) and does 137 damage. This is only possible if Psychic's x2 multiplier is computed before Steel's x0.5 multiplier, otherwise the damage would always be an even integer. However, Showdown's calculator doesn't include 137 among the possible damage rolls (and indeed only shows even integers). When Bronzong's type is manually changed to Psychic/Steel, then Showdown's calculator correctly includes 137 among the possible damage rolls. See attachments.
 

Attachments

Last edited:
There is a bug with booster energy where it'll doesn't take stat boosts into account when deciding the type of boost (jolly +0 = speed boost, jolly +2 = attack boost). This also happens with stat drops. This happens with both protosynthesis and quark drive.

1670841727342.png
1670841938680.png
 
Just poking this in here. When using the Terastalize function on the damage calculator, it removes your previous STABs and treats you as only being your Tera type.
(IE: Toxtricity Tera Normal removes its original Electric/Poison STABs from the calculations, showing lower damage numbers.)
 

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

Top