Programming Pokémon Showdown Damage Calculator

Hello i'm consfused, the calc says that triple axel on 252+ Atk Life Orb Technician Hitmontop Triple Axel (3 hits) vs. 0 HP / 0 Def Togekiss: 243-288 (78.1 - 92.6%) -- approx. 2HKO after Leftovers recovery Possible damage amounts: (81, 81, 83, 83, 83, 86, 86, 88, 88, 88, 91, 91, 91, 94, 94, 96), it just adding 2 to de next attack but the move says, "Triple Axel inflicts damage, hitting the target up to three times per use. Its base power will increase by 20 with each successive strike, so the first, second, and third strikes have powers of 20, 40, and 60, respectively. Each of Triple Axel's strikes has a separate accuracy check. If any strike fails, the move ends".
 

Attachments

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus


Can we get a button for Analytic to add the 1.3x boost for moving last / vs switching out mons? The switching out button in the middle doesn't add a boost. Main thing is just saving time from dropping Starmie's base speed or increasing the opponents speed. Alternatively making the switching out button apply to Analytic would also work. Thanks
ok if you have analytic on your attacking mon and use the "switching out" button you will also get the boost
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
How long does it generally take the calc to publicaly update?

Also, I wanted to add another feature about the utility umbrella, fire moves in rain will keep their regular power when used against a pokemon with utility umbrella, and water moves used in sun will also keep their normal power.
That should have also been fixed when I made the change, if the calc isn't live yet I'll bug an admin. Thanks
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Hello i'm consfused, the calc says that triple axel on 252+ Atk Life Orb Technician Hitmontop Triple Axel (3 hits) vs. 0 HP / 0 Def Togekiss: 243-288 (78.1 - 92.6%) -- approx. 2HKO after Leftovers recovery Possible damage amounts: (81, 81, 83, 83, 83, 86, 86, 88, 88, 88, 91, 91, 91, 94, 94, 96), it just adding 2 to de next attack but the move says, "Triple Axel inflicts damage, hitting the target up to three times per use. Its base power will increase by 20 with each successive strike, so the first, second, and third strikes have powers of 20, 40, and 60, respectively. Each of Triple Axel's strikes has a separate accuracy check. If any strike fails, the move ends".
I think this should be fixed
 
I was trying to figure out if a (physical) Water move would 2HKO Palossand through Water Compaction and I think it would be really nice if there was an equivalent to the Draco Meteor "twice" button for this. Also relevant for Stamina and Weak Armor.

Thanks for all the work on the calculator!
 
Calcing for stat-dropping moves across multiple turns gives weird results if the Pokemon starts out with stat changes.
+1 252 SpA Latias Draco Meteor over 2 turns vs. 0 HP / 4 SpD Latias: 750-884 (249.1 - 293.6%) (Max roll is 884)
+1 252 SpA Latias Draco Meteor vs. 0 HP / 4 SpD Latias: 450-530 (149.5 - 176%) (Max roll is 530)
-1 252 SpA Latias Draco Meteor vs. 0 HP / 4 SpD Latias: 200-236 (66.4 - 78.4%) (Max roll is 236)

The given max roll far exceeds the sum of the max rolls of the individual attacks, which is 766. The number given here appears to be the sum of a +1 roll and a +0 roll (530 + 356 = 886).
+1 252 Atk Mold Breaker Haxorus Superpower over 2 turns vs. 0 HP / 4 Def Haxorus: 466-550 (159 - 187.7%) (Max roll is 550)
+1 252 Atk Mold Breaker Haxorus Superpower vs. 0 HP / 4 Def Haxorus: 233-275 (79.5 - 93.8%) (Max roll is 275)
252 Atk Mold Breaker Haxorus Superpower vs. 0 HP / 4 Def Haxorus: 156-184 (53.2 - 62.7%) (Max roll is 184)

The given max roll far exceeds the sum of the max rolls of the individual attacks, which is 459 The number given here appears to be the sum of a +1 roll and a +1 roll (275 + 275 = 550).
 

termi

bike is short for bichael
is a Community Contributoris a Top Tiering Contributor
hi ive been having a certain problem with the calc lately where it calculates false odds, for example calling a "guaranteed OHKO" on a move that does, say, 93% damage at maximum and there are no hazards on the field. the calc usually works normally for me but will sometimes randomly start doing this when i change what pokemon im doing the calc on or when i check or uncheck a damage modifier like stealth rock. once it gets like this i have to refresh the page to get the calc to do normal calcs again. it's hard to tell what the origin of the issue is but it's been a persistent issue for several weeks now so if this is happening for anyone else it should probably be looked into
 

Ehmcee

A Spoopy Ghost
is a Pre-Contributor
Weakness berries don't properly work with multi hit moves, they currently reduce damage from both hits.

Ex: A togekiss with Babiri Berry will take 1/2 damage from Double Iron bash instead of 3/4.
 
The Rivalry ability does not work properly on the damage calculator, no matter what the opposing gender is it decreases your damage.

Without Rivalry:
252 Atk Haxorus Outrage vs. 0 HP / 0 Def Abomasnow: 271-321 (84.4 - 100%) -- 6.3% chance to OHKO

With Rivalry and different gender:
252 Atk Rivalry nerfed Haxorus Outrage vs. 0 HP / 0 Def Abomasnow: 219-258 (68.2 - 80.3%) -- guaranteed 2HKO
Approximately a 20% decrease, it should be a 25% decrease.

With Rivalry and the same gender:
252 Atk Rivalry buffed Haxorus Outrage vs. 0 HP / 0 Def Abomasnow: 204-241 (63.5 - 75%) -- guaranteed 2HKO
Approximately a 25% decrease, it should be a 25% increase.
 
I have found 2 issues when calculating damage over multiple turns
First when the opposing Pokémon is holding Leftovers, the calc doesn't account for Leftovers recovery when calculating KO odds
The image below shows Magearna hitting 2 Fleur Cannon on a Gastrodon and doing barely over 100% with two min rolls
It still says guaranteed ohko although the threshold should be 106.25% with Leftovers recovery
1594923303077.png


My second point is also about the KO odds (and damage ranges in general)
When calculating the damage ranges when using a move several times, the calculator just adds up the possible damage rolls from each move
For instance, again with Fleur Cannon from Magearna against Gastrodon, at +0, the possible damage rolls are :
(286, 289, 292, 297, 300, 303, 306, 310, 313, 316, 319, 324, 327, 330, 333, 337)
At -2 (for the second hit), the possible damage rolls are :
(144, 145, 147, 148, 150, 151, 153, 154, 157, 159, 160, 162, 163, 165, 166, 169)
You can see the damage rolls for the 2 consecutive hits on the image and see that they are just the sum of these 2 lists of damage
I can understand that this gives approximately the good range of values (the min and max are correct) but the actual damage distribution of the 2 hits is different
I was trying to calculate the chance to KO Gastrodon after Leftovers recovery so I artificially gave Gastrodon 26 more HP to account for that
1594923882406.png

As you can see I modified the base HP stat to get 26 more hp and it tells me 68.8% chance to KO (= 11/16 which is consistent with how it computes damage ranges)
But if I take the damage ranges from each individual hit and compute all damage combinations to get the exact chance to KO in 2 hits, I find that 200 out of the 256 combinations lead to more than 452 damage in total
So the actual KO chance is actually 200/256 which is around 78%, much higher than what the calc currently indicates.

I understand that computing all possibilities can take some time, especially if using a move 5 times in a row (about 1 million combinations to compute) but for 2 or 3 times, it's very reasonable to compute all of them exactly.
 
Last edited:
It is not really important but weight based moves used against a Duraludon with (other) selected as the ability assume Light Metal in the damage calculation. With any actual ability selected it works as intended.
 
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 %)
 
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.
 
Would it be possible to make it so that if you used /calc in a battle room for a past generation format the link it gave was with the calc set to that generation?
 
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
 

Ehmcee

A Spoopy Ghost
is a Pre-Contributor
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.
 

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

Top