Programming Pokémon Showdown Damage Calculator

Vileman

Actually a Nice Fella
is a Tournament Director Alumnusis a Forum Moderator Alumnusis a Tiering Contributor Alumnusis a Former Old Generation Tournament Circuit Champion
UPL Champion
Oh also this is probably a known one but can we pls pls pls have the random hidden power thing fixed? Often when you import a set that has, for example, Hidden Power [Fire], it will then have set another hidden power type in the custom set. It would be neat if it actually had the hidden power type you import into the calc ty!!
 
I use the Damage Calculator for a pokemon TTRPG I'm running with my friends, but I realized pretty quickly that because the region has new pokemon with original base stats, that setting up fights with 6 pokemon took forever. Everytime they switched, I would have to manually add everything about that pokemon.

Thank god for the import feature, right? Well, it can't import types or (and most importantly) base stats. So I still have to have a whole excel sheet out everytime.

My question is/feature request, is to make the import feature allow for the importing and exporting of custom base stats. If this is currently possible, please tell me how!
 
Seems your calculator is a bit off.

https://replay.pokemonshowdown.com/gen8randombattle-1496082351

Your calc shows this as a 119-140% chance of a KO. But it survived and i'm 90% sure Randoms pulls from OU Sets and it does not have a defense set I know of. (Weavile vs Regidrago)
Randbats sets always have 85 EVs in every stat (possibly with exceptions for Gyro Ball and Trick Room users). There is a "Random Battles" option at the top that will automatically set EVs and levels for any given Pokemon in Randbats. Without a boosting item, Weavile's Triple Axel will usually fail to OHKO Regidrago.
Lvl 79 84 Atk Weavile Triple Axel (40 BP) (3 hits) vs. Lvl 78 84 HP / 84 Def Regidrago: 396-468 (90 - 106.3%) -- approx. 12.5% chance to OHKO
(The KO chance is not perfectly accurate for multi-hit moves but the point still stands that it is possible for Regidrago to survive the attack.)
 
Randbats sets always have 85 EVs in every stat (possibly with exceptions for Gyro Ball and Trick Room users). There is a "Random Battles" option at the top that will automatically set EVs and levels for any given Pokemon in Randbats. Without a boosting item, Weavile's Triple Axel will usually fail to OHKO Regidrago.
Lvl 79 84 Atk Weavile Triple Axel (40 BP) (3 hits) vs. Lvl 78 84 HP / 84 Def Regidrago: 396-468 (90 - 106.3%) -- approx. 12.5% chance to OHKO
(The KO chance is not perfectly accurate for multi-hit moves but the point still stands that it is possible for Regidrago to survive the attack.)
Thanks for the clarification I was playing under wrong assumptions.
 

clerica

fly me up to Jupiter
is a Smogon Discord Contributoris a Community Leader Alumnusis a Community Contributor Alumnusis a Top Tiering Contributor Alumnusis a Battle Simulator Moderator Alumnus
oki so im not 100% sure what's going on here but i asked a couple people and it looks like a bug
1642908852843.png


so in this first calc we see necrozma at full hp and the entei will supposedly take 15.4-18.3% in recoil damage if it uses flare blitz

1642908912539.png


however, in this 2nd calc the necrozma's hp is at 50% and the minimum recoil the entei is supposed to take is 17.6% despite it having the same minimum roll and possible damage amounts. Shouldnt the minimum recoil roll be the same in both calcs?
I tested it in this replay as well and the entei took 15.5% in recoil damage when the necrozma was at 50% so im almost positive this is a bug
1642909706245.png


and no this isnt because of doubles i checked in the screenshot below
1642909739535.png
sorry if im posting this in the wrong place, im not overly familiar with these things but this looked like the right place when i was trying to find where to submit this
 
Bug: Damage calculator does not handle Psywave properly

Intended behavior of Psywave between generations (L - user's level, ~ - randomly in range):
  • RBY: floor(1 ~ 1.5L)
  • Stadium, GSC: max(floor(1 ~ 1.5L), 1)
  • ADV, DPP: max(floor(L*(10*(0 ~ 10)+50)/100), 1)
  • BW+: max(floor(L*((0 ~ 100)+50)/100), 1)
The damage should still become 0 if the target is immune.
opera_Y7gDPS01CX.png
opera_lupDtx1xUb.png
 
Hello together, i am here to report an issue me and a friend found regarding eviolith-mons and their damage-received in "Gen 8 Nat Dex AG".
To make it short: Sometimes the damage is just... wrong. It acts like the Pokemon receiving the damage did not hold an eviolith despiteit holding that item. Or the damage just didnt made sense at all.
We first did a testfight to confirm the problem we found was reproducable and indeed we succeeded in reproducing it. Unfortanetly we didnt do !showteam in battle, so i had to do another fight with a Showdown-Mod to prove the sets that are used really are with items etc.
So, on to the Test-Fight with the moderator:
https://replay.pokemonshowdown.com/gen8nationaldexag-1500934664-u5nruxgyce9j3yot6cdlg7s4epd3l1lpw

For the first two rounds nothing special happens. At first i thought the problem would be solved or may not have been there in the first place. As the Choice Specs Hydro Pump of Greninja did 21% to a physical-defense blissey (you can see both exact sets in the replay) and 37% to a special defensive Electabuzz. But then the first anomaly happened: The hydro pump did over 80% to a physically defense Floette. This only makes sense if the damage is calculated without the eviolith being brought into the equasion, as it should only do max 58.9% according to the calculator . Then the same situation again, this time a Non-Mega-Latias using psyshock on a physical defense Floette dealing around 37%, again only possible without the eviolith beingput into the damage-equasion.
The Calculator i used for calcing:
https://calc.pokemonshowdown.com/index.html
I hope my explanation is good enough for you guys to understand this issue and i hope it helps solving this.
Greetings
S0toMoto
Edit:
After some further testing we limited the mons that are affected by this are those, who are not available in sword and shield and only in Net Dex AG, i.e. Murkrow, Servine, Floette and Gligar:
https://replay.pokemonshowdown.com/gen8nationaldexag-1501213775-rir9dd0mo33l6fas5bq2ctfct508dywpw
I will repost this into the ps-bug segment as well as this seems to be a problem with psd and not the calculator
Edit 2:
I did some more Testing and can now say that this problem also applies to
Gen 8 Nat Dex: https://replay.pokemonshowdown.com/gen8nationaldex-1501258609-30adfl5vdqjrhhmolqhta3hzh92yjndpw
Gen 8 Nat Dex UU: https://replay.pokemonshowdown.com/gen8nationaldexuu-1501253623-v6ydgaz7cxzwd5ban561kgwetxhc6eypw
 
Last edited:
In doubles, Expanding Force hits both pokemon and applies the doubles damage reduction, but changing between singles and doubles with an expanding force mon in the calculator does not reflect this.
problem-singles.JPG

problem-doubles.JPG
 
Moves with the selected option for "over multiple turns" (Superpower, Draco etc.) show completely unrealistic damage numbers when used by a Pokemon with any atk stat boosts/drops. Most easily noticeable at +6:

+6 252+ Atk Huge Power Azumarill Superpower vs. 252 HP / 252+ Def Toxapex: 169-199 (55.5 - 65.4%) -- guaranteed 2HKO
+6 252+ Atk Huge Power Azumarill Superpower over 2 turns vs. 252 HP / 252+ Def Toxapex: 759-894 (249.6 - 294%) -- guaranteed KO in 2 turns

It seems like the second Superpower gets calculated as 87.5% of the original hit, which would be correct, but then afterwards the +6 is applied again resulting in "the original damage + 4*the second turn damage" as the damage output.
I have not tested that at every stat boost level for every move, but the problem seems to be very consistent.
 

Isa

I've never felt better in my life
is a Tournament Director Alumnusis a Social Media Contributor Alumnusis a Community Leader Alumnusis a Community Contributor Alumnus
would it be possible to implement a Nightmare button, similar to the Leech Seed one? drains 25% of your HP per turn

asking because this move is frequently competitively seen in gen 2 so it's not just a "100% completion" addition im requesting

thanks in advance
 

TrRizzo09

formerly Pkmn trainer Rizzo
Is it possible to import the rest of your team to be more precise when calculating moves like a beat up?


1647868007099.png
 
The damage calculator shows Technician as working on Pursuit while its power is doubled from the opponent switching out, but that's not the case in actual battle.

252+ Atk Technician Scizor-Mega switching boosted Pursuit (80 BP) vs. 0 HP / 0 Def Jirachi: 320-378 (93.8 - 110.8%) -- 62.5% chance to OHKO

https://replay.pokemonshowdown.com/...-1538004509-dhu5hyg6zmggnlueozhlg3wwls3vxgjpw
In this battle, I have an Adamant 252 Atk EV Mega Scizor use Pursuit on a 0 HP, 0 Def EV Jirachi that switches out. It dealt damage in the range of
252+ Atk Scizor-Mega switching boosted Pursuit (80 BP) vs. 0 HP / 0 Def Jirachi: 214-252 (62.7 - 73.9%) -- guaranteed 2HKO
 
Light That Burns the Sky doesn't turn physical if attack is greater than special attack. Irritating when calculating physical Ultra Necrozma for Nat Dex.
 
this is an odd calc i ran into. not sure if its a bug or not but still odd.


0- SpA Technician Ambipom Grass Knot (80 BP) vs. 252 HP / 4 SpD Quagsire: 292-344 (74.1 - 87.3%) -- guaranteed 2HKO


i tested it and it was an oddity.
https://pokepast.es/2c0619a5abfee221 the sets i used. is this a bug or just an oversite?
https://replay.pokemonshowdown.com/gen8nationaldexag-1537214769
Let me do out the Math a bit
(42*80*140)=470,400
Floor(470,400/167)=2,816
Floor(2,816/50)+2=58
58*4=232
The weird part is that if Ambipom has 0 SpA IVs, then that is the lowest damage roll.
0- SpA Technician Ambipom Grass Knot (80 BP) vs. 252 HP / 4 SpD Quagsire: 232-276 (58.8 - 70%) -- guaranteed 2HKO after Leftovers recovery
Possible damage amounts: (232, 236, 240, 240, 244, 248, 248, 252, 256, 256, 260, 264, 264, 268, 272, 276)
Also, it’s very close to being 2/3rds (or un-technician boosted) of what the final damage is
0- SpA Technician Ambipom Grass Knot (80 BP) vs. 252 HP / 4 SpD Quagsire: 292-344 (74.1 - 87.3%) -- guaranteed 2HKO after Leftovers recovery
Possible damage amounts: (292, 292, 296, 300, 304, 308, 312, 316, 316, 320, 324, 328, 332, 336, 340, 344)
Lastly, giving Ambipom another ability gives the correct calculation.
0- SpA Ambipom Grass Knot (80 BP) vs. 252 HP / 4 SpD Quagsire: 196-232 (49.7 - 58.8%) -- 67.6% chance to 2HKO after Leftovers recovery
Possible damage amounts: (196, 196, 200, 204, 204, 208, 208, 212, 212, 216, 220, 220, 224, 224, 228, 232)

So basically the Calculator is incorrectly giving a technician boost to Grass Knot when Ambipom shouldn’t be.

Here is Low Kick as well;
252+ Atk Ambipom Low Kick (80 BP) vs. 252 HP / 252+ Def Quagsire: 64-76 (16.2 - 19.2%) -- possible 8HKO after Leftovers recovery
Possible damage amounts: (64, 65, 66, 66, 67, 68, 69, 69, 70, 71, 72, 72, 73, 74, 75, 76)
252+ Atk Technician Ambipom Low Kick (80 BP) vs. 252 HP / 252+ Def Quagsire: 96-114 (24.3 - 28.9%) -- possible 5HKO after Leftovers recovery
Possible damage amounts: (96, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 114)
Same problem. And for control.
0- SpA Ambipom Shadow Ball vs. 252 HP / 4 SpD Quagsire: 49-58 (12.4 - 14.7%) -- possibly the worst move ever
Possible damage amounts: (49, 49, 50, 51, 51, 52, 52, 53, 53, 54, 55, 55, 56, 56, 57, 58)
252+ Atk Ambipom Anchor Shot vs. 252 HP / 252+ Def Quagsire: 32-38 (8.1 - 9.6%) -- possibly the worst move ever
Possible damage amounts: (32, 32, 33, 33, 33, 34, 34, 34, 35, 35, 36, 36, 36, 37, 37, 38)
(255 Base Speed Ambipom)
0- SpA Technician Ambipom Electro Ball (150 BP) vs. 252 HP / 4 SpD Quagsire: 272-320 (69 - 81.2%) -- guaranteed 2HKO
Possible damage amounts: (272, 274, 278, 280, 284, 288, 290, 294, 296, 300, 304, 306, 310, 312, 316, 320)
(255 Base Speed Quagsire)
252+ Atk Technician Ambipom Gyro Ball (150 BP) vs. 252 HP / 252+ Def Quagsire: 90-106 (22.8 - 26.9%) -- 36.7% chance to 4HKO
Possible damage amounts: (90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 106)

Lastly is this.
29D6E068-E9E9-46DC-A9EA-5620F82B2848.jpeg

If you change the BP of the moves to 61, the damage calculator works fine.

Clearly this is a problem with Technician using the value in the BP Box instead of the real BP.
 
1649246585413.png

So I zoomed in the damage calc, refreshed, zoom out, refreshed, changed the gen and pokemon(and refreshed) but the damage calc is still like this. My device is a laptop
 

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

Top