• The moderator of this forum is jetou.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

Programming Pokémon Showdown Damage Calculator

What type of bug are you reporting? Unsure

What is the bug?
In the damage calc, when calcing damage against a Poison Heal pokemon the healing from poison heal is disabled by mold breaker. I discovered this while calcing oras pure hackmons, and it worked in usum too but couldn't recreate it. In SV the bug is not present, and I did not check the other gens.

Are you able to replicate it? If so, how?
Simply put a mold breaker pokemon against a poison heal pokemon in the oras damage calc, like below.

252+ Atk Rayquaza-Mega Dragon Ascent vs. 252 HP / 252+ Def Gyarados-Mega: 186-220 (47.2 - 55.8%) -- guaranteed 3HKO after Poison Heal

252+ Atk Mold Breaker Rayquaza-Mega Dragon Ascent vs. 252 HP / 252+ Def Gyarados-Mega: 186-220 (47.2 - 55.8%) -- guaranteed 2HKO after toxic damage

The only change I made was removing Mold Breaker. I was able to get the bug to work in the usum calc too but could not recreate it.

edit: this works with mold breaker excadrill and gliscor too.
252 Atk Excadrill Iron Head vs. 248 HP / 0 Def Gliscor: 111-132 (31.4 - 37.3%) -- 50.6% chance to 4HKO after Poison Heal

252 Atk Mold Breaker Excadrill Iron Head vs. 248 HP / 0 Def Gliscor: 111-132 (31.4 - 37.3%) -- guaranteed 3HKO after toxic damage
 
Mold Breaker and clones disable some inappropriate abilities in the calc, such as Rain Dish and Protosynthesis.
Ql1UQUE.png

aHUQGhi.png
Sample showing these abilities aren't affected: https://replay.pokemonshowdown.com/gen9ubers-2185918742

What type of bug are you reporting? Unsure

What is the bug?
In the damage calc, when calcing damage against a Poison Heal pokemon the healing from poison heal is disabled by mold breaker. I discovered this while calcing oras pure hackmons, and it worked in usum too but couldn't recreate it. In SV the bug is not present, and I did not check the other gens.

Are you able to replicate it? If so, how?
Simply put a mold breaker pokemon against a poison heal pokemon in the oras damage calc, like below.

252+ Atk Rayquaza-Mega Dragon Ascent vs. 252 HP / 252+ Def Gyarados-Mega: 186-220 (47.2 - 55.8%) -- guaranteed 3HKO after Poison Heal

252+ Atk Mold Breaker Rayquaza-Mega Dragon Ascent vs. 252 HP / 252+ Def Gyarados-Mega: 186-220 (47.2 - 55.8%) -- guaranteed 2HKO after toxic damage

The only change I made was removing Mold Breaker. I was able to get the bug to work in the usum calc too but could not recreate it.

edit: this works with mold breaker excadrill and gliscor too.
252 Atk Excadrill Iron Head vs. 248 HP / 0 Def Gliscor: 111-132 (31.4 - 37.3%) -- 50.6% chance to 4HKO after Poison Heal

252 Atk Mold Breaker Excadrill Iron Head vs. 248 HP / 0 Def Gliscor: 111-132 (31.4 - 37.3%) -- guaranteed 3HKO after toxic damage
Fixed
 
Alluring Voice appears to be counted as a contact move in the calculator despite not making contact.

0 SpA Wigglytuff Alluring Voice vs. 0 HP / 0 SpD Bewear: 228-270 (59.8 - 70.8%) -- guaranteed 2HKO

0 SpA Tough Claws Wigglytuff Alluring Voice vs. 0 HP / 0 SpD Bewear: 296-350 (77.6 - 91.8%) -- guaranteed 2HKO

0 SpA Wigglytuff Alluring Voice vs. 0 HP / 0 SpD Fluffy Bewear: 114-135 (29.9 - 35.4%) -- 22.9% chance to 3HKO
 
Leftovers and Black Sludge are no longer mentioned in calcs for 'possible 5HKO' or more (not less). If the item is removed, the calc does change to a % to 4HKO. Also happens in past gens (see samples).

Probably result of a recent change (I was calcing yesterday and didn't notice anything off). I checked with someone else to make sure this wasn't intended, if it was, I apologize.
Screenshot at 2024-10-23 18-59-08.png

Here are the calcs in text, showing various outcomes (this is in gen 9):
252+ SpA Vikavolt Bug Buzz vs. 252 HP / 252+ SpD Togedemaru: 77-91 (23 - 27.2%) -- possible 5HKO
252+ SpA Vikavolt Burning Jealousy vs. 252 HP / 252+ SpD Togedemaru: 160-190 (47.9 - 56.8%) -- 41% chance to 2HKO after Leftovers recovery
252+ SpA Vikavolt Origin Pulse vs. 252 HP / 252+ SpD Togedemaru: 125-148 (37.4 - 44.3%) -- guaranteed 3HKO after Leftovers recovery
252+ SpA Vikavolt Scald vs. 252 HP / 252+ SpD Togedemaru: 91-108 (27.2 - 32.3%) -- 65.3% chance to 4HKO after Leftovers recovery

---
Compare the current behavior to the screenshot in this older post showing an ADV calc:
Before: https://www.smogon.com/forums/threads/pokémon-showdown-damage-calculator.3593546/post-9946601
After: 12 SpA Gengar Fire Punch vs. 76 HP / 0 SpD Jolteon: 72-85 (24.8 - 29.3%) -- possible 5HKO
 
Alluring Voice appears to be counted as a contact move in the calculator despite not making contact.

0 SpA Wigglytuff Alluring Voice vs. 0 HP / 0 SpD Bewear: 228-270 (59.8 - 70.8%) -- guaranteed 2HKO

0 SpA Tough Claws Wigglytuff Alluring Voice vs. 0 HP / 0 SpD Bewear: 296-350 (77.6 - 91.8%) -- guaranteed 2HKO

0 SpA Wigglytuff Alluring Voice vs. 0 HP / 0 SpD Fluffy Bewear: 114-135 (29.9 - 35.4%) -- 22.9% chance to 3HKO
Fixed
 
The Calc registers Jet Punch as being boosted by Sheer Force. If I recall correctly this WAS a reported bug either in-game or in Showdown itself, but I've tested it personally and can confirm that Jet Punch is no longer treated as having a secondary effect, at least within Showdown itself (can't test in-game)

252+ Atk Sheer Force Kingler Jet Punch vs. 252 HP / 252+ Def Weezing-Galar: 90-106 (26.9 - 31.7%) -- guaranteed 4HKO
252+ Atk Kingler Jet Punch vs. 252 HP / 252+ Def Weezing-Galar: 69-82 (20.6 - 24.5%) -- guaranteed 5HKO

(No item for these tests)

Replay showing Sheer Force / Jet Punch damage on two GWeezings, one with Levitate, one with Neutralizing Gas: https://replay.pokemonshowdown.com/gen9customgame-2231467734
- Both damage rolls fall within the 20.6 - 24.5% of no-Sheer Force Jet Punch

Sets for clarity, using Custom Game* to allow for Jet Punch to be used to be used:

Kingler
Ability: Sheer Force
Tera Type: Water
EVs: 252 Atk
Adamant Nature
- Jet Punch

Weezing-Galar @ Eject Button
Ability: Levitate
Tera Type: Poison
EVs: 252 HP / 252 Def
Bold Nature
IVs: 0 Atk
- Defog

Neut (Weezing-Galar)
Ability: Neutralizing Gas
Tera Type: Poison
EVs: 252 HP / 252 Def
Bold Nature
IVs: 0 Atk
- Defog
 
The Calc registers Jet Punch as being boosted by Sheer Force. If I recall correctly this WAS a reported bug either in-game or in Showdown itself, but I've tested it personally and can confirm that Jet Punch is no longer treated as having a secondary effect, at least within Showdown itself (can't test in-game)

252+ Atk Sheer Force Kingler Jet Punch vs. 252 HP / 252+ Def Weezing-Galar: 90-106 (26.9 - 31.7%) -- guaranteed 4HKO
252+ Atk Kingler Jet Punch vs. 252 HP / 252+ Def Weezing-Galar: 69-82 (20.6 - 24.5%) -- guaranteed 5HKO

(No item for these tests)

Replay showing Sheer Force / Jet Punch damage on two GWeezings, one with Levitate, one with Neutralizing Gas: https://replay.pokemonshowdown.com/gen9customgame-2231467734
- Both damage rolls fall within the 20.6 - 24.5% of no-Sheer Force Jet Punch

Sets for clarity, using Custom Game* to allow for Jet Punch to be used to be used:

Kingler
Ability: Sheer Force
Tera Type: Water
EVs: 252 Atk
Adamant Nature
- Jet Punch

Weezing-Galar @ Eject Button
Ability: Levitate
Tera Type: Poison
EVs: 252 HP / 252 Def
Bold Nature
IVs: 0 Atk
- Defog

Neut (Weezing-Galar)
Ability: Neutralizing Gas
Tera Type: Poison
EVs: 252 HP / 252 Def
Bold Nature
IVs: 0 Atk
- Defog
Fixed
 
Would it be possible to get a feature where you could input two moves in a row? There's already a feature where you can calc two of the same stat-lowing moves (such as draco/leaf storm etc) in a row, but not two different moves in a row.
 
Is there any way that multi-hit moves could be programmed so that the 2nd hit onward ignore the damage reduction of Multiscale and Tera Shell?
the damage calc already accounts for multiscale breaking during multi-hit moves

0 Atk Aggron Rock Blast (2 hits) vs. 0 HP / 0 Def Multiscale Dragonite: 93-111 (28.7 - 34.3%) -- approx. 3.3% chance to 3HKO
0 Atk Aggron Rock Blast (2 hits) vs. 0 HP / 0 Def Dragonite: 124-148 (38.3 - 45.8%) -- approx. 3HKO

if multiscale was treated as active for the second hit of rock blast you would expect the damage calc vs a multiscale dragonite to be half that of one vs a non-multiscale dragonite. since the actual calc shows that a multiscale dragonite receives ~75% of the damage that a non-multiscale dragonite does from a 2 hit rock blast, you can infer that the second hit is doing full damage. the calcs are corroborated by the sim as well
https://replay.pokemonshowdown.com/gen8ou-2259460713-aszxu2wa99m85vpzjtnzxm9u7wzuec6pw
https://replay.pokemonshowdown.com/gen8ou-2259462126-xlmklb9nfapxu96skvmry73g1ash5d2pw
 
Not sure if this has been posted before, but the damage calculator currently does not take into account the types that resist flying (rock, electric, and steel), and lists their damage % and numbers as if it is a neutral matchup.
 
Sure this is a long time request, a function to calculate Beat Up without having to manually input everything?
We actually implemented this with Showdex (you can thank our awesome contributor Dastardlydwarf for that)! You can use it in Honkdex (out of battle damage calc) or Calcdex (during the battle). Our code is open source if they'd like to copy it for the Smogon damage calc, we're happy to help if they need it.
 
Use this thread for feature requests and bug reports
FAQ:
Where do I go if I want to contribute? Damage Calculator Open Source
What if I don't see new features? Try clearing your cache. It usually takes a bit for Zarel to sync the github version with the live version please wait a few days before clearing your cache.
What's new? Changelog
IF YOUR POST WAS DELETED IT WAS DEALT WITH
Use this thread for feature requests and bug reports
FAQ:
Where do I go if I want to contribute? Damage Calculator Open Source
What if I don't see new features? Try clearing your cache. It usually takes a bit for Zarel to sync the github version with the live version please wait a few days before clearing your cache.
What's new? Changelog
IF YOUR POST WAS DELETED IT WAS DEALT WITH
When importing or exporting a custom set, it doesn't seem to remember the type or stats correctly.
 
Screenshot 2024-12-20 091148.png

It's Calculating the damage of it without the +5 sp. def when i click crit for some reason and i dont even know if its calculating the crit damage theres def a glitch and it also ignored light screen. this isnt that major i believe cuz i dont usually calc the crit damage but here i just lost because of a crit against the lando and i just wanted to see if its a bad roll or if it was just a 6.25% for me to lose the game
 

Attachments

  • Screenshot 2024-12-20 091716.png
    Screenshot 2024-12-20 091716.png
    184.5 KB · Views: 54
  • Screenshot 2024-12-20 091849.png
    Screenshot 2024-12-20 091849.png
    170.7 KB · Views: 43
View attachment 696751
It's Calculating the damage of it without the +5 sp. def when i click crit for some reason and i dont even know if its calculating the crit damage theres def a glitch and it also ignored light screen. this isnt that major i believe cuz i dont usually calc the crit damage but here i just lost because of a crit against the lando and i just wanted to see if its a bad roll or if it was just a 6.25% for me to lose the game
Critical hits ignore positive stat boosts and screens of the opponent when doing damage calculation.
 
What type of bug are you reporting? Incorrect calculation

What is the bug?
In the damage calc, in regular SV calc, Attack+ Nature Kingdra with Flip Turn, 0 EVs with mystic water shows as a guaranteed OHKO against Mega Camerupt with 0 Def EVs. However, when testing in Pokemon, camerupt has lived twice in a row on a small amount of health. Potentially the bonus from the item is bugging with the quad weakness or something? Not sure what else it might be but in showdown camerupt lives.

(As a side note, other factors include changing the levels to 59 and increasing mega camerupts base defence to 110 which maybe affect things? But changing the level and the def to normal values still gives the ohko calc)

Are you able to replicate it? If so, how?
Calc shows the same ohko regardless of base stat mods in line with changes, or other items like expert belt. Yet showdown still doesnt have a guaranteed ohko.
 

Attachments

  • Screenshot 2024-12-20 215657.png
    Screenshot 2024-12-20 215657.png
    113.7 KB · Views: 68
  • Screenshot 2024-12-20 220144.png
    Screenshot 2024-12-20 220144.png
    203.6 KB · Views: 62
What type of bug are you reporting? Incorrect calculation

What is the bug?
In the damage calc, in regular SV calc, Attack+ Nature Kingdra with Flip Turn, 0 EVs with mystic water shows as a guaranteed OHKO against Mega Camerupt with 0 Def EVs. However, when testing in Pokemon, camerupt has lived twice in a row on a small amount of health. Potentially the bonus from the item is bugging with the quad weakness or something? Not sure what else it might be but in showdown camerupt lives.

(As a side note, other factors include changing the levels to 59 and increasing mega camerupts base defence to 110 which maybe affect things? But changing the level and the def to normal values still gives the ohko calc)

Are you able to replicate it? If so, how?
Calc shows the same ohko regardless of base stat mods in line with changes, or other items like expert belt. Yet showdown still doesnt have a guaranteed ohko.
it would be good to note to debuggers that you have modified camerupt's base defense in the main section of the bug report rather than the side note. a showdown screenshot of the pokemons' effective stats would be good to have.
97.6% of 169 HP is 165 damage.
 
Back
Top