• 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

There seems to be a bug with Gorilla Tactics relating to weather when it shouldn't:
252 Atk Gorilla Tactics Darmanitan-Galar Icicle Crash vs. 0 HP / 0 Def Mew in Hail: 220-259 (64.5 - 75.9%) -- guaranteed 2HKO after hail damage
252 Atk Gorilla Tactics Darmanitan-Galar Icicle Crash vs. 0 HP / 0 Def Mew: 220-259 (64.5 - 75.9%) -- guaranteed 2HKO


Gets especially weird when you try to add terrain boosts.
252 Atk Gorilla Tactics Darmanitan-Galar Zen Headbutt vs. 0 HP / 0 Def Mew in Psychic Terrain: 90-106 (26.3 - 31%) -- guaranteed 4HKO
252 Atk Gorilla Tactics Darmanitan-Galar Zen Headbutt vs. 0 HP / 0 Def Mew: 90-106 (26.3 - 31%) -- 24.6% chance to 3HKO after hail damage
(this is with both Hail and Psychic Terrain, but the Psychic Terrain boost isn't shown despite being accounted for in the damage %)
 
Bug: Rising Voltage has its base power doubled in electric terrain, but this only applies when the target is touching the ground. The damage calc however shows that the boost always applies, even if the target isn't grounded.

Example: (Turn 26) https://replay.pokemonshowdown.com/automatthic-gen8ipl-1514

Calc shows: 252+ SpA Magnet Raichu-Alola Rising Voltage (140 BP) vs. 252 HP / 0 SpD Togekiss in Electric Terrain: 560-660 (149.7 - 176.4%) -- guaranteed OHKO

I believe in this instance it should only receive the regular boost that electric terrain gives the electric type moves.
 
Hello! I've found that Dauntless Shield isn't implemented correctly on the damage calculator. When Zamazenta has Dauntless Shield, the calculation shows that it's at +1, but it doesn't actually take that into account. I noticed this because I was discussing Urshifu with someone and its Close Combat was doing exactly twice as much as its Wicked Blow:

252+ Atk Choice Band Urshifu Wicked Blow vs. 0 HP / 4 Def Zamazenta on a critical hit: 143-168 (44 - 51.6%) -- 11.7% chance to 2HKO
Possible damage amounts: (143, 144, 146, 148, 150, 151, 153, 155, 156, 158, 159, 162, 163, 165, 166, 168)

252+ Atk Choice Band Urshifu Close Combat vs. +1 0 HP / 4 Def Zamazenta: 286-337 (88 - 103.6%) -- 25% chance to OHKO
Possible damage amounts: (286, 289, 292, 297, 300, 303, 306, 310, 313, 316, 319, 324, 327, 330, 333, 337)

On changing Zamazenta's Ability to something else (I did this with Clear Body) and manually giving it +1, I got this calc instead, which compares to Wicked Blow the way I expected:
252+ Atk Choice Band Urshifu Close Combat vs. +1 0 HP / 4 Def Zamazenta: 190-225 (58.4 - 69.2%) -- guaranteed 2HKO
Possible damage amounts: (190, 193, 195, 198, 199, 202, 204, 207, 208, 211, 213, 216, 217, 220, 222, 225)

Notably, while the first Close Combat calc still claims to be against a +1 Zamazenta, it's identical to the calc against a +0 Zamazenta without Dauntless Shield:
252+ Atk Choice Band Urshifu Close Combat vs. 0 HP / 4 Def Zamazenta: 286-337 (88 - 103.6%) -- 25% chance to OHKO
Possible damage amounts: (286, 289, 292, 297, 300, 303, 306, 310, 313, 316, 319, 324, 327, 330, 333, 337)

This suggests that Dauntless Shield doesn't actually do anything except cause the calculation to misreport Zamazenta's stat stages - it has no bearing on its actual damage.
On investigating further, it looks like this was also reported here and here as well, but those were some time ago, so I hope it's okay to report this again!
 
I was playing with the calc a bit and I found that multi-hit move KO chances are calculated incorrectly.


^The original intention was seeing the chances that one of dragapult's subs can take 4 shuriken hits from specs greninja. However, 22.7-27.7% doesn't seem to match 87.5% chance given by the calc. I did some math and found that the chance is actually ~63.65% (assuming equal probability of each outcome).




^That doesn't make much sense considering the mean damage of 4 shuriken hits is 80.25, with 81 and 82 both being above the mean.

^I made dragapult fire/ghost in the above case.

I computed the exact damage ranges and KO chances in the scenario shown above and I disagree with your numbers
I did it by computing all 16^4 damage combinations.
Actually let me show you what I found
Water Shuriken (4 hits) vs 79 hp Dragapult : KO chance = 77.73% (calc says 87.5) (I don't know how you got your ~63.65% here)
Water Shuriken (4 hits) vs 81 hp Dragapult : KO chance = 47.15% (calc says 37.5)
Water Shuriken (4 hits) vs 82 hp Dragapult : KO chance = 30.52% (calc says 37.5)
(I don't understand why you think that 37.5% to KO doesn't make sense in these 2 cases, it's not very accurate but still in the good range of values)
Water Shuriken (4 hits) vs 317 hp Dragapult but weak to Water instead : KO chance = 82.97% (calc says 87.5)

I don't know how the calculator computes the KO chances in this case or why it always show them in multiples of 1/16 (which explains why the smallest proba is 6.3% (1/16) and not 1/16^4).
The calculator doesn't give the exact chances anyway (but it says "approx" so I guess they are aware that the method used is an approximation). It also seems to perform the calculations differently than when using a move several times (like Fleur Cannon over 2 turns, this kind of things) so I don't really know how it gets this result.
 

Earthworm

is a member of the Site Staffis a Community Leaderis a Community Contributoris a Contributor to Smogonis a Tournament Director Alumnusis a Super Moderator Alumnusis a Tiering Contributor Alumnusis a Smogon Media Contributor Alumnusis the Smogon Tour Season 6 Championis a Past SPL and WCoP Champion
RoA Leader
Oops, I cleverly accounted for the expected HP DV if you selected a set with Hidden Power, but didn't have it update (properly) if you selected Hidden Power as a move after the fact. Fixed, thanks!
Unfortunately the HP DV still isn't updating correctly. It seems to change to the correct value if you modify the DVs directly, but if you are on a 15 DV set and choose certain Hidden Powers it isn't updating correctly. Examples of the incorrect values include: Hidden Power Dragon should give a HP DV of 11 because it makes the Defense DV even, but it is staying at 15. HP Grass requires an even Attack and Defense DV meaning the maximum DV should be 3 but it is staying 15 in the calc currently.
 
Water Shuriken (4 hits) vs 79 hp Dragapult : KO chance = 77.73% (calc says 87.5) (I don't know how you got your ~63.65% here)
I made a mistake with my code. I used >79 over >=79.

Water Shuriken (4 hits) vs 81 hp Dragapult : KO chance = 47.15% (calc says 37.5)
Water Shuriken (4 hits) vs 82 hp Dragapult : KO chance = 30.52% (calc says 37.5)
(I don't understand why you think that 37.5% to KO doesn't make sense in these 2 cases, it's not very accurate but still in the good range of values)
Water Shuriken (4 hits) vs 317 hp Dragapult but weak to Water instead : KO chance = 82.97% (calc says 87.5)
I said it didn't make sense because the values resemble a normal distribution, and the mean damage output is 80.25
 
Levitate isn't making pokemon non-grounded in regards to rising voltage
4 SpA Pincurchin Rising Voltage (140 BP) vs. 0 HP / 0 SpD Rotom-Mow in Electric Terrain: 42-50 (17.4 - 20.7%) -- possible 7HKO after Leftovers recovery
If you take away levitate you get the same calc
 
Last edited:
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.
 
So I had this weird moment in an gen 7 Ag match where my lvl 1 magnemite got hit by a critical hit precipice blades from primal groundon and sturdy did not get triggered. It did not go to 1 hp instead it took 72%. I tried replicating it in a friendly but without succes. I am assuming it was a bug, but I have heard similar things happen in the real games. So I am really sorry if this is not relevant. I saved the battle so the link wil be below this, thanks for checking it out.
https://replay.pokemonshowdown.com/gen7anythinggoes-1166391156-o6i7hayqnf4wa1ip2ne31zec043hoabpw
 
So I had this weird moment in an gen 7 Ag match where my lvl 1 magnemite got hit by a critical hit precipice blades from primal groundon and sturdy did not get triggered. It did not go to 1 hp instead it took 72%. I tried replicating it in a friendly but without succes. I am assuming it was a bug, but I have heard similar things happen in the real games. So I am really sorry if this is not relevant. I saved the battle so the link wil be below this, thanks for checking it out.
https://replay.pokemonshowdown.com/gen7anythinggoes-1166391156-o6i7hayqnf4wa1ip2ne31zec043hoabpw
Sorry forgot to mention the battle is very long, skip to turn 169
 
So I had this weird moment in an gen 7 Ag match where my lvl 1 magnemite got hit by a critical hit precipice blades from primal groundon and sturdy did not get triggered. It did not go to 1 hp instead it took 72%. I tried replicating it in a friendly but without succes. I am assuming it was a bug, but I have heard similar things happen in the real games. So I am really sorry if this is not relevant. I saved the battle so the link wil be below this, thanks for checking it out.
https://replay.pokemonshowdown.com/gen7anythinggoes-1166391156-o6i7hayqnf4wa1ip2ne31zec043hoabpw
I did a damage calc

252+ Atk Groudon-Primal Precipice Blades vs. Lvl 1 0 HP / 36 Def Magnemite on a critical hit: 8-64780 (72.7 - 588909%) -- guaranteed OHKO
Possible damage amounts: (64780, 8, 768, 1532, 2292, 3056, 3816, 4580, 5340, 6104, 6864, 7628, 8388, 9152, 9912, 10680)

Because of the modulo 65536, damage can become very small if it becomes a bit too large (for instance if you get 66000 damage, it becomes 464 (66000 - 65536) instead).
In this case, it can indeed do 8 damage and not ohko Magnemite (I don't know if these were the precise spreads of the involved Pokémon but it shows it is possible)
 

Ropalme1914

Ace Poker Player
is a member of the Site Staffis a Forum Moderatoris a Contributor to Smogonis a Smogon Media Contributor
Moderator
The G-Max effects that deal damage per turn (Wildfire, Vine Lash, Cannonade, and Volcalith) are not working: when the move has no chance to OHKO, they appear on the calc description, but don't do anything even when the base move could deal 99%:
Wildfire.png
In addition to this, if the move has a chance to OHKO, they simply don't appear on the calc at all (and still don't change anything on the damage itself
Wildfire 2.png

On another note, would it be possible to add trap damage such as from Fire Spin and Infestation? This would be useful mainly due to Binding Band changing its damage and the possibility of it being knocked off, so we would need to keep switching between Leech Seed and Volcalith as substitutes for them
 

RottenInfernape

I COULD BE BANNED!
I think Unburden is not implemented correctly on the calculator. If a Pokemon is holding no item, their speed will not be doubled, as shown below:
Screenshot (107).png

This is the set for Hawlucha. Normally it would be about 670 Speed after an Unburden boost. Of course, it's only 335 speed with an item, so I think this deserves a refix.

EDIT: Already resolved
 
Last edited:

MAMP

mamp
is a Pre-Contributor
I think Unburden is not implemented correctly on the calculator. If a Pokemon is holding no item, their speed will not be doubled, as shown below:
View attachment 268536
This is the set for Hawlucha. Normally it would be about 670 Speed after an Unburden boost. Of course, it's only 335 speed with an item, so I think this deserves a refix.
unburden doesn't give you a speed boost for not having an item, it boosts your speed when you lose your item until you switch out. there's a check box next to the ability that applies the speed boost for unburden
 

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

Top