Programming Pokémon Showdown Damage Calculator

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)

Also this calc shows something else : it shows guaranteed OHKO because the first value of the damage range is high enough to KO Magnemite but the minimum value isn't in first place because of the modulo 65536.
 
Last edited:

Ropalme1914

Ace Poker Player
is a Tiering Contributoris a Contributor to Smogonis a Smogon Media Contributoris a Site Content Manager Alumnusis a Social Media Contributor Alumnusis a Forum Moderator Alumnus
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
 

MAMP

MAMP!
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
 

pre

pkmn.cc
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.
This was a bug (was relying on the past sets DVs instead of the updated one), thanks for pointing it out.

Kind of annoying that [Zarude] that appears in random battles isn't in the random battle calculator
Random calc sets have been updated.

Struggle does not affect ghost type pokemon, even though it should.
Fixed, thanks (though Gen 1 still correctly has it not affecting Ghosts).
 
Zamazenta's ability (Dauntless Shield) does not reflect stat boost on Damage Calculator (basically no effect).

With Dauntless Shield:

252 Atk Choice Band Urshifu Close Combat vs. +1 0 HP / 4 Def Zamazenta: 261-307 (80.3 - 94.4%) -- guaranteed 2HKO (notice the +1)

With Dauntless Shied.JPG


Without Dauntless Shield (using Drizzle as Zamazenta's ability):

252 Atk Choice Band Urshifu Close Combat vs. 0 HP / 4 Def Zamazenta: 261-307 (80.3 - 94.4%) -- guaranteed 2HKO (Same damage as above)

Without Dauntless Shied.JPG


What it should actually show:

252 Atk Choice Band Urshifu Close Combat vs. +1 0 HP / 4 Def Zamazenta: 174-205 (53.5 - 63%) -- guaranteed 2HKO

Dauntless Shield is being counted as +1 despite not showing the effect
 
BUG : i can't calculate anymore...refresh, clean the cookies, try others gens, others pokemons...it's always locked on Abomasnow's mooves
1597927748414.png
 
Could you add trick or treat/forest curse to the effects?
Edit: The calculator also lacks the difference between physical and contact (example: eq is physical but doesn't make contact, even though the calculator treats it as a contact move.
Another Edit: It calculates correctly for moves that normally don't make contact, it's just for the sake of testing (mainly because of Fluffy, that only affect contact moves, not physical moves in general).
 
Last edited:
Rising Voltage's power appears to be increased against airborne targets like Rotom. This should not be the case as the move checks against the target, not the user, unlike Expanding Force and Grassy Glide.
4 SpA Pincurchin Rising Voltage (140 BP) vs. 248 HP / 0 SpD Rotom-Heat in Electric Terrain: 85-101 (28 - 33.3%) -- 0% chance to 3HKO
 
Hello. There seems to be an error with the damage calculation for the move Nature Power. I can attach a screenshot. It is supposed to become the exact move it replicates, but the calculator shows it doing way less. I was mainly trying it for terrains, but even misty terrain nature power does less than Moonblast so the terrains aren't affecting the core damage in the Calc. please fix
 

Attachments

Hello. There seems to be an error with the damage calculation for the move Nature Power. I can attach a screenshot. It is supposed to become the exact move it replicates, but the calculator shows it doing way less. I was mainly trying it for terrains, but even misty terrain nature power does less than Moonblast so the terrains aren't affecting the core damage in the Calc. please fix
I think I know what the issue is.
Nature Power is considered as a variable power physical move by default.
The power is correctly updated on various terrains but not the category of the move.
So for instance in Misty Terrain, the calculator essentially computes the damage from a physical Moonblast, hence the difference in the results.
 
Last edited:
I think I know what the issue is.
Nature Power is considered as a variable power physical move by default.
The power is correctly updated on various terrains but not the category of the move.
So for instance in Misty Terrain, the calculator essentially computes the damage from a physical Moonblast, hence the difference in the results.
Oh that makes sense! I could just input the morphed moves for my calcs in that case. Would it be alright on showdown though? Damage-wise I mean. I have not tested it, but I've always been unsure if the two were directly linked.
 

steelskitty

you deserve so much more than this
is a Tutor Alumnusis a Site Content Manager Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Tiering Contributor Alumnusis a Past WCoP Champion
weather ball doesn't seem to output the correct damage in dpp:

252+ SpA Life Orb Victreebel Weather Ball (100 BP Fire) vs. 252 HP / 116 SpD Dialga in Sun: 85-101 (21 - 25%) -- possible 5HKO after Leftovers recovery
252+ SpA Life Orb Victreebel Flamethrower vs. 252 HP / 116 SpD Dialga in Sun: 164-193 (40.5 - 47.7%) -- guaranteed 3HKO after Leftovers recovery

it looks like the calc should be displaying twice the amount of damage that it currently does for dpp weather ball.

edit: the lovely and talented SparksBlade has an example of weather ball vs flamethrower damage on ps! https://replay.pokemonshowdown.com/gen4customgame-1183478326
 
Last edited:
To add onto the message above, when changing the power of Weather Ball to a custom value, the calculator uses this value to compute the damage and displays "Weather Ball ([twice the custom value] BP Fire)".
So the display part understands that the bp is doubled when a weather like sun is active but the calc part doesn't acquire the correct base power for the move and always uses the custom / default value instead (without doubling it when appropriate).
In recent generations, it always uses 50 (no boost from weather) or 100 (boosted by weather) base power regardless of the custom input base power.
 

roxie

https://www.youtube.com/@noxiousroxie
is a Tutoris a Dedicated Tournament Hostis a Site Content Manager Alumnusis a Team Rater Alumnusis a Social Media Contributor Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnus
damage calc doesnt seem to apply weight damaged move reduction on mons wearing float stones
 
Bug: Nature power defaults to physical when selected -> should be special (BP and type seems correct though), though should convert to the corresponding move, and show in the calc (Like weather ball?/knock off do with bp), depending on terrain
 
Don't know if this is the right place to post this, but the damage calculator doesn't accurately show Aura Wheel's damage. Changing the type has no effect, which is annoying considering Aura Wheel changes type. Setting Rapid Spin to dark type and the same base power as Aura Wheel shows it should be doing much more damage than what the calculator shows.
 

Attachments

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

Top