Programming Pokémon Showdown Damage Calculator

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
For some reason Specs Ash Greninja before it gets the Ash Form is not listed in the damagecalc (Regular Greninja with Battle Bond and Choice Specs, probably should be included with water shuriken hydro dark pulse and ice beam since no reason to calc spikes)

This sets incredibly common in OU and one of the top 5 best sets in the tier, so its a real issue whenever someone needs to calc they need to manually enter the set

hopefully this can get added

Also Protean Greninja's sets have the ability set to other by default instead of Protean (Such as Choice Scarf Greninja, which exclusive runs Protean)

This messes up several calcs as if the user forgets to input protean manually the calc is wrong
Fixed
 

Austin

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

Calculator now shows HP regained from life-draining moves like giga drain. However, the figures it quotes don't work for >100% damage dealt. For example, Lvl 100 mon uses giga drain against a level 1 mon with 12Hp. The move obviously kills and the attacking mon regains 6 HP. However, the calc currently bases the regained Hp on the damage roll calculated. As this is like 1000000%, it quotes the HP regained by the attacking mon as 700%+.

Whilst this isn't a huge issue, it occurred to me that someone might be tracking and fixing little things like this. Hope I helped :]

View attachment 90791
this was already fixed, you must be using an older version of the calc, try clearing your cache
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
So when testing a Mega Sceptile Nature Power vs a standard Specially Defensive Toxapex, I ran into an inconsistency and what myself and mods within the PS OverUsed chatroom suspect to be an error within the damage calculator. Nature Power in Electric Terrain is supposed to calculate as Thunderbolt with the 1.5x boost due to terrain. Same goes for Psychic Terrain except it uses Psychic, not Thunderbolt. After testing further we discovered the calc uses Extrasensory when converting Nature Power and not Psychic. PS has the damage correct and the two do not match in rolls.

Below I have two examples of this error within the damage calculator. Hope this can be fixed soon! Thank you!
I'm pretty sure that Revelation Dance is not working properly on the calculator. Look at these calcs, for instance:

252 SpA Oricorio-Sensu Revelation Dance vs. 0 HP / 4 SpD Aggron: 30-36 (10.6 - 12.8%) -- possible 8HKO
252 SpA Oricorio-Sensu Shadow Ball vs. 0 HP / 4 SpD Aggron: 183-216 (65.1 - 76.8%) -- guaranteed 2HKO (edited to 90 BP on this calc)

These two calcs should be the same. Basically, Revelation Dance is treated as a Normal type move when it shouldn't be.
I think I fixed these, try again Nature Power + Revelation Dance
 

Austin

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

Calculator now shows HP regained from life-draining moves like giga drain. However, the figures it quotes don't work for >100% damage dealt. For example, Lvl 100 mon uses giga drain against a level 1 mon with 12Hp. The move obviously kills and the attacking mon regains 6 HP. However, the calc currently bases the regained Hp on the damage roll calculated. As this is like 1000000%, it quotes the HP regained by the attacking mon as 700%+.

Whilst this isn't a huge issue, it occurred to me that someone might be tracking and fixing little things like this. Hope I helped :]

View attachment 90791
This actually wasn’t fixed, but I got it now. A different dev made what I thought was a fix before mb
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Has anyone else been having trouble with the "All vs One" mode of the calculator? It hasn't been loading for me when I click Honkalculate for the last few days now. The tab just freezes and I have to close it. I've tried waiting like 20-30 minutes and nothing ever shows up.
Can you paste your console log?
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Has anyone else been having trouble with the "All vs One" mode of the calculator? It hasn't been loading for me when I click Honkalculate for the last few days now. The tab just freezes and I have to close it. I've tried waiting like 20-30 minutes and nothing ever shows up.
Was fixed
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Another minor suggestion: Can the (whatever number)HKO be calculated based on the defending Pokemon's remaining HP instead of max HP? For example, if a Pokemon has 3 max HP but only 2 HP remaining, then an attack that does 1 damage should say "Guaranteed 2HKO" instead of "Guaranteed 3HKO".

By the way, thanks for making the calculator automatically calculate recoil damage.
No problem, I’ll look into this, it’s a very easy fix, so don’t expect to be waiting too long.
 
Some time ago I suggested to allow inputting multiple calcs, and output the chance to KO at the end.

I have written a small demo: https://hidden50.github.io/dpd/console.html

Since this is only a demo for what the calc could do, you have to copy the possible damage amounts from the actual calc.

It takes misses and crits into account, and allows you to answer questions like "What is the chance for Bisharp to 2hko Quagsire with Knock off + Z-Sucker Punch?". It currently doesn't take additional effects into account, like the 10% chance to burn on fire blast, or paralysis / flinch / stat drops / etc.

There is also a (bad) attempt at visualization: https://hidden50.github.io/dpd/
(The first link is probably more useful.)
 
Last edited:

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
I think that Battle Bond should affect Water Shuriken's base power. Like if I take away Battle Bond then Shuriken should become weaker (20 base power - - -> 15 base power). This isn't the case right now, regardless of having the Battle Bond ability, Ash-Ninja with or without Battle Bond gets a Shuriken boost, non-Ash Battle Bond dosen't.
Fixed
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Works for Ash-Gren Battle Bond water shuriken, but not Regular Gren Battle Bond water shuriken. Close enough and satisfied.
As far as I know regular greninja will never get a BB boost, it only gets boosted in its ash gren form
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
252 Atk Fist Plate Primeape All-Out Pummeling (190 BP) vs. 252 HP / 0 Def Eelektross: 385-454 (102.9 - 121.3%) -- guaranteed OHKO after Stealth Rock

252 Atk Poison Barb Primeape Acid Downpour (190 BP) vs. 252 HP / 4 Def Eviolite Clefairy: 508-598 (147.6 - 173.8%) -- guaranteed OHKO

Seems that the Z-moves ignore most boosting items when calcing (ex.: Expert Belt, Life Orb), but when said boosting item boosts moves of a certain type (ex.: Plates, Charcoal, Mystic Water, etc.), they are factored in. Not just a Primeape thing, works with other mons as well.
Correct that’s intended
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Photon Geyser dosen't ignore unaware, fur coat, multiscale and shadow shield in the calculator when it should ignore the abilities of opposing pokemon:

+2 252+ Atk Necrozma Photon Geyser vs. 252 HP / 252+ Def Unaware Quagsire: 126-148 (31.9 - 37.5%) -- 0.2% chance to 3HKO after Leftovers recovery
+2 252+ Atk Necrozma Photon Geyser vs. 252 HP / 252+ Def Quagsire: 250-295 (63.4 - 74.8%) -- guaranteed 2HKO after Leftovers recovery

+2 252+ Atk Necrozma Photon Geyser vs. 0 HP / 0 Def Fur Coat Furfrou: 237-280 (81.4 - 96.2%) -- guaranteed 2HKO after Leftovers recovery
+2 252+ Atk Necrozma Photon Geyser vs. 0 HP / 0 Def Furfrou: 474-558 (162.8 - 191.7%) -- guaranteed OHKO

+2 252+ Atk Necrozma Photon Geyser vs. 0 HP / 4 Def Multiscale Dragonite: 162-192 (50.1 - 59.4%) -- guaranteed 2HKO
+2 252+ Atk Necrozma Photon Geyser vs. 0 HP / 4 Def Dragonite: 325-384 (100.6 - 118.8%) -- guaranteed OHKO

+2 252+ Atk Necrozma Photon Geyser vs. 0 HP / 4 Def Shadow Shield Lunala: 85-101 (20.4 - 24.3%) -- guaranteed 5HKO
+2 252+ Atk Necrozma Photon Geyser vs. 0 HP / 4 Def Lunala: 171-202 (41.2 - 48.6%) -- guaranteed 3HKO
I think it ignores everything that mold breaker ignores. Based on these two replays, it doesn't ignore opponent-affecting abilities like pressure, and it doesn't ignore the signature abilities of Solgaleo, Lunala, and Necrozma.
Fixed
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Changing forme to Zygarde 10%/50% to its Complete Forme will not change its HP stat:
View attachment 109640View attachment 109641

Also, the sandstorm damage is not counted:
64+ Atk Technician Scizor-Mega Bullet Punch vs. 0 HP / 0 Def Whimsicott: 242-288 (92.7 - 110.3%) -- 56.3% chance to OHKO
64+ Atk Technician Scizor-Mega Bullet Punch vs. 0 HP / 0 Def Whimsicott: 242-288 (92.7 - 110.3%) -- 56.3% chance to OHKO after sandstorm damage
I’ll fix the forme thing but your first calc doesn’t show sandstorm damage because your move already has a high chance to OHKO without it
 

david0895

Mercy Main Btw
I’ll fix the forme thing but your first calc doesn’t show sandstorm damage because your move already has a high chance to OHKO without it
I mean that the sandstorm has to raise the ko chance, but this is not happening
 
I’ll fix the forme thing but your first calc doesn’t show sandstorm damage because your move already has a high chance to OHKO without it
If this happens for sandstorm damage, then why does the calculator still sometimes say "some % chance to OHKO after Leftovers recovery"? If it's an OHKO, then why do leftovers matter?
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
If this happens for sandstorm damage, then why does the calculator still sometimes say "some % chance to OHKO after Leftovers recovery"? If it's an OHKO, then why do leftovers matter?
It doesn’t display leftover recovery when the recovery amount doesn’t matter
 
It doesn’t display leftover recovery when the recovery amount doesn’t matter
titled.png

How does the leftovers recovery matter in this case? The Landorus was at full health when the attack hits, and it either gets OHKO'd or 2HKO'd regardless of whether or not it's holding a leftovers.
 
titled.png

It's definitely not only multi-hit moves.

By the way, why do some blank sets have default abilities and others default to "(other)"? This varies even among Pokemon with one possible ability.
 

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

Top