• The moderators of this forum are Austin and pre.
  • 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

Austin

Schismatic
is a Programmeris a Forum Moderatoris a Community Contributoris a Battle Simulator Moderator Alumnus
Moderator
Posted this the other day but it still seems to be broken.

I think the "doubles" button is bugged for max moves. All other things equal, if you toggle the singles/doubles button and look at the damage for a max move (which of course is single target), the damage changes. I don't understand how this is possible.
Will look Into. You should not be waiting long fwiw
 

Austin

Schismatic
is a Programmeris a Forum Moderatoris a Community Contributoris a Battle Simulator Moderator Alumnus
Moderator
Posted this the other day but it still seems to be broken.

I think the "doubles" button is bugged for max moves. All other things equal, if you toggle the singles/doubles button and look at the damage for a max move (which of course is single target), the damage changes. I don't understand how this is possible.
fixed
 
Something might be wrong with Dauntless Shield, doesn't seem to be applying Defense buff in Damage Calc

+3 252 Atk Zacian-Crowned Close Combat vs. +1 252 HP / 180+ Def Zamazenta-Crowned: 464-546 (119.5 - 140.7%) -- guaranteed OHKO
Possible damage amounts: (464, 468, 474, 480, 484, 490, 496, 502, 506, 512, 518, 524, 528, 534, 540, 546)

This is with Dauntless Shield

+3 252 Atk Zacian-Crowned Close Combat vs. +1 252 HP / 180+ Def Zamazenta-Crowned: 308-364 (79.3 - 93.8%) -- guaranteed 2HKO

This is without Dauntless Shield, but +1 Defense
 

eden

laid to rest
is a Tiering Contributor Alumnusis a Past SPL Champion
1589950312673.png


think the calculator for adv mistakenly applies lefties before giving the odds for a one hit
the move here should OHKO for all rolls over 341

1589950564645.png


sand comes before leftovers in adv so this should actually be an assured 2hko, 47.3*2 = 94.6+6.25>100%
attack from the gar/attack from the dol
sand and lefties
attack from the gar/attack from the dol
sand(now gar dies)

don't know if this is the right place to be posting it though
 
Neutralizing Gas is not being taken into account
0 Atk Technician Marshadow Shadow Sneak vs. 0 HP / 0 Def Weezing-Galar: 67-81 (24.7 - 29.8%) -- 100% chance to 4HKO (with Neutralizing Gas)
0 Atk Technician Marshadow Shadow Sneak vs. 0 HP / 0 Def Weezing-Galar: 67-81 (24.7 - 29.8%) -- 100% chance to 4HKO (without Neutralizing Gas)
 
I noticed there was a "switching out" button, presumably just for Pursuit. However, there are a few things that change damage when the target is switching in, like Fishious Rend, Bolt Beak, Stakeout, and Gen 4 Payback. I think there should either also be a "switching in" button, or just have a single "switching" button that automatically applies switching out or in based on context.
 

Finchinator

IT'S FINK DUMBASS
is a Smogon Social Media Contributoris a Super Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Smogon Media Contributoris a Battle Simulator Moderatoris a Past WCoP Championis a former Tournament Circuit Champion
OU & NU Leader
Is there any chance Silvally can take itemless damage from Knock Off without having to manually remove the item? This interaction is possible to come up in NU battles currently and the damage it takes in the calc is as if it has an item equipped when the item is not knockable, so damage is as if it is itemless.
 

Austin

Schismatic
is a Programmeris a Forum Moderatoris a Community Contributoris a Battle Simulator Moderator Alumnus
Moderator
Is there any chance Silvally can take itemless damage from Knock Off without having to manually remove the item? This interaction is possible to come up in NU battles currently and the damage it takes in the calc is as if it has an item equipped when the item is not knockable, so damage is as if it is itemless.
Do you just mean Silvally with a memory item?
 

Finchinator

IT'S FINK DUMBASS
is a Smogon Social Media Contributoris a Super Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Smogon Media Contributoris a Battle Simulator Moderatoris a Past WCoP Championis a former Tournament Circuit Champion
OU & NU Leader
Do you just mean Silvally with a memory item?
Yes, for example:


252 Atk Mold Breaker Sawk Knock Off (97.5 BP) vs. 0 HP / 0 Def Silvally-Dark: 53-63 (16 - 19%) -- possible 6HKO

This says 16-19%, but that is the damage it would take with 97.5 BP (as the calc indicates). A player could notice this and simply adjust the calc accordingly, but if the default where to be itemless damage, that would save that step and avoid possible confusion
 

Austin

Schismatic
is a Programmeris a Forum Moderatoris a Community Contributoris a Battle Simulator Moderator Alumnus
Moderator
Yes, for example:


252 Atk Mold Breaker Sawk Knock Off (97.5 BP) vs. 0 HP / 0 Def Silvally-Dark: 53-63 (16 - 19%) -- possible 6HKO

This says 16-19%, but that is the damage it would take with 97.5 BP (as the calc indicates). A player could notice this and simply adjust the calc accordingly, but if the default where to be itemless damage, that would save that step and avoid possible confusion
When I test silvally with a memory item it is getting the same damage result as silvally with no item? Which is what it should be doing when looking at the code
 

Finchinator

IT'S FINK DUMBASS
is a Smogon Social Media Contributoris a Super Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Smogon Media Contributoris a Battle Simulator Moderatoris a Past WCoP Championis a former Tournament Circuit Champion
OU & NU Leader
When I test silvally with a memory item it is getting the same damage result as silvally with no item? Which is what it should be doing when looking at the code
https://replay.pokemonshowdown.com/smogtours-gen8nu-503196

Maybe it's impossible to fix in the calculator then? What I am trying to say is that Silvally forms with the memory equipped are always taking itemless damage as it is impossible to knock them, but the calc defaults to normal, item equipped damage. This replay shows it taking 12%, but this is impossible for item equipped damage and the item cannot be removed from Silvally.

They're both my teams being used, so I know for a fact the 12% damage is only accurate if itemless damage is being done:

252 Atk Mold Breaker Sawk Knock Off (97.5 BP) vs. 0 HP / 0 Def Silvally-Dark: 53-63 (16 - 19%) -- possible 6HKO
252 Atk Mold Breaker Sawk Knock Off vs. 0 HP / 0 Def Silvally-Dark: 36-43 (10.8 - 12.9%) -- possible 8HKO
 
Can we review the levels of Pokémon as they appear in rands and in calc? I just lost a battle because I selected a move based on this:

+3 Lvl 84 84 Atk Lycanroc Close Combat vs. Lvl 80 84 HP / 84 Def Noctowl: 342-403 (117.5 - 138.4%) -- guaranteed OHKO

But in rands Noctowl is level 88 not level 80, it lived on 1% defeated me (my last Pokémon was itself sitting on 1%). EDIT: Just to be clear: this was rands singles. I know for dubs the levels are not configured and I always remember to change them manually.
 

pre

shaving yaks and herding cats
is a Battle Simulator Administratoris a Programmeris a Super Moderator
Builder
Can we review the levels of Pokémon as they appear in rands and in calc? I just lost a battle because I selected a move based on this:

+3 Lvl 84 84 Atk Lycanroc Close Combat vs. Lvl 80 84 HP / 84 Def Noctowl: 342-403 (117.5 - 138.4%) -- guaranteed OHKO

But in rands Noctowl is level 88 not level 80, it lived on 1% defeated me (my last Pokémon was itself sitting on 1%). EDIT: Just to be clear: this was rands singles. I know for dubs the levels are not configured and I always remember to change them manually.
I just deployed an update which should have the current levels, however:

Random Battle formats change implementations very often and the calc will never be a source of truth. If we're lucky we get notified when a change goes in and is hotpatched and we can get updated within a few hours, but at its core this is never going to be exact. You should not blindly trust the levels (or moves etc) in the calc, they were only correct at one point and may have been changed. The description helpfully includes the levels in the output so you can verify that the levels are what they say they are, it is merely a convenience, you should still expect to have to change the levels if the Random Battles implementation changes.

Random Doubles levels are a whole other can of worms and pretty much fundamentally will not work with the calc.
 
I just deployed an update which should have the current levels, however:

Random Battle formats change implementations very often and the calc will never be a source of truth. If we're lucky we get notified when a change goes in and is hotpatched and we can get updated within a few hours, but at its core this is never going to be exact. You should not blindly trust the levels (or moves etc) in the calc, they were only correct at one point and may have been changed. The description helpfully includes the levels in the output so you can verify that the levels are what they say they are, it is merely a convenience, you should still expect to have to change the levels if the Random Battles implementation changes.

Random Doubles levels are a whole other can of worms and pretty much fundamentally will not work with the calc.
Thanks for the reply. I appreciate that you can't trust it blindly, but unfortunately sometimes there's not enough time to factor in or review the levels/items/abilities as a vast majority of users turn on the timer prematurely.

Anyway, hopefully the update will resolve the level based issues.
 
I noticed somthing interesting. If you check the Dynamax checkbox in the SS calculator, then you change to another generation (e.g. gen 7) the Dynamax status is somehow preserved, and the calc shows results like this:
bugged__calc.PNG

It seems the chance of KO is still good, but the percentage of damage done is bugged.
 
Keldeo doesn't appear in the rands calc. This is probably because it's Keldeo-Resolute, not Keldeo, which has sets in random battles. Also, Darmanitan-Galar should have two sets, one for its zen form and one for the normal form (this matters because if it gets Zen Mode it's level 80, not level 72).
 
If a Pokemon's type is manually changed from what it usually is, could the calc make a note of it?

0 SpA Choice Specs Sheer Force Mewtwo Flamethrower vs. 0 HP / 0 SpD Assault Vest Dry Skin Mew: 153-180 (44.8 - 52.7%) -- 25.8% chance to 2HKO

0 SpA Choice Specs Sheer Force Psychic Fire Mewtwo Flamethrower vs. 0 HP / 0 SpD Assault Vest Dry Skin Dragon Mew: 114-135 (33.4 - 39.5%) -- guaranteed 3HKO

This is mostly relevant for defensive Protean/Libero calcs, as well as generic strength comparisons where the usual target is a typeless Mew or something, though Soak (and Magic Powder lol) is also a situation where it could be useful.

On the topic of types, could there also be toggles for Forest's Curse and Trick-or-Treat? They're almost exclusively useful for stacking weaknesses to get crazy calcs, but hey.
 
Idk if this has been suggested, but would love to see calcs for random battles added in. Just each mon with its rand bats level and 84 evs in every slot, no items or moves.

This would be more of a convenience thing than anytting for those people who tryhard in rand bats
 

pre

shaving yaks and herding cats
is a Battle Simulator Administratoris a Programmeris a Super Moderator
Builder
Idk if this has been suggested, but would love to see calcs for random battles added in. Just each mon with its rand bats level and 84 evs in every slot, no items or moves.

This would be more of a convenience thing than anytting for those people who tryhard in rand bats
This already exists. Look for the selector in the top right.
 

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

Top