• The moderator of this forum is Austin.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

Programming Pokémon Showdown Damage Calculator

Hello, if this has been stated before, you're more than welcome to delete this.

I've been calculating sweeping sets for gen 2 OU and for some odd reason, whenever I change a move on Marowak, the calc gets weird. I changed HP Bug to hyper beam to see if it really did the same damage to Suicune as earthquake, but when I scrolled back up earthquake suddenly went from a max of 97% to 1,4% at +2. if I change the move back everything goes back to normal and I even tried reloading the site and nothing changed. it happened every time. Then I tried a blank set and the damage at least looked realistic, but low, so I added a thick club and the it went back to saying I did like 1% with every move at +2. I think the thick club is the problem area that needs to be dealt with in the calc. hopefully I can properly calc my damage ranges next time
 
Hello, if this has been stated before, you're more than welcome to delete this.

I've been calculating sweeping sets for gen 2 OU and for some odd reason, whenever I change a move on Marowak, the calc gets weird. I changed HP Bug to hyper beam to see if it really did the same damage to Suicune as earthquake, but when I scrolled back up earthquake suddenly went from a max of 97% to 1,4% at +2. if I change the move back everything goes back to normal and I even tried reloading the site and nothing changed. it happened every time. Then I tried a blank set and the damage at least looked realistic, but low, so I added a thick club and the it went back to saying I did like 1% with every move at +2. I think the thick club is the problem area that needs to be dealt with in the calc. hopefully I can properly calc my damage ranges next time
In Gen 2, Marowak will actually lower its own stats since Thick Club+Sword Dance would otherwise make its Atk so high that it loops back around.
When you change it from HP Bug to Hidden Power, it sets the Atk DVs to 15 instead of 13.
 
Pokemon Showdown Damage Calculator doesn't import mega evolutions with items correctly.
1653875220939.png

The set that was imported was this:
PH Mold Breaker (Diancie-Mega) @ Pixie Plate
Ability: Mold Breaker
EVs: 252 SpA / 4 SpD / 252 Spe
Modest Nature
IVs: 0 Atk
- Spore
- Shell Smash
- Judgment
- Steam Eruption

Diancie-Mega did not keep its item.

EDIT: You can click on the image to load a higher resolution one in another tab.
 
hi, I'm playing a pokemon mmo with some bosses exceeding Lv100 and I'd like to do some calcs for em
therefore I wanted to know if it possible to remove the level cap of 100 or at least increase to 150-200
secondly a option for 2x helping hand in triple battles would be nice
we use smogon for inspiration for our pvp pokemon and this calc helped already in lots of pvp matches
 
Last edited:
I was looking at "One vs. All" and "All vs. One" and was wondering if we could add Monotype to the formats. I'd be happy to help work on that update and work out details as well.

Under the 'Monotype' tier filter it would list a set of filters by type. It could exclude LC or we could work on a custom list of the few NFEs that are used if it's easier to only display fully evolved.

Example:
I want to calc outgoing damage for Belly Drum Azumarill against types I'm weak to. I'd select the Belly Drum Azumarill set and increase Attack to +6. Then I'd choose the "Monotype" filter and select "Steel" first to see what damage I do to all Steel types.

The reverse would be to see what on a Steel team would possibly be able to OHKO/prevent Azumarill from setting up Belly Drum by seeing the damage they do to Azumarill.
I just wanted check in on this since I don't think I got a response. I'm not sure if this is possible or worth the effort for the devs but I think it'd be a helpful addition for the Monotype community.
 
hey so the showdown damage calculator does not count big root in the amount drained. i was originally calculating chansey drain punch on a -6 def chansey and the amount drained stayed the same whether or not i changed big root as the item, so i swapped mons and it still didnt changem
 
Expanding force doesn't account for it becoming double target in psychic terrain (as in, when selecting doubles the damage stays as it was single target)
 
Hi, I was wondering if there were any plans to include the new mons introduced in PLA in the calc, since they are already playable on Showdown.
I'm currently playing in a draft league where they are legal, and it's honestly a pain to calc ^^'
No worries if it's more of a hustle than I imagine it to be tho
 
Last edited:
Quick question to the damage calculation formula, since I always get slightly wrong results. Attached below is a screenshot of the damage calculation.
These are my manual calculations:
((((((((2*72)%5)+2)*120*(280/166))%50)+2))/275) * 100 = 46.067
((((((((2*72)%5)+2)*120*(280/166))%50)+2))/275) * 85= 39.15

I always get slight differences of 1~3% between the manual calculation and the website and therefor wanted to ask if someone knows what is wrong.
Thanks in advance.
 

Attachments

Quick question to the damage calculation formula, since I always get slightly wrong results. Attached below is a screenshot of the damage calculation.
These are my manual calculations:
((((((((2*72)%5)+2)*120*(280/166))%50)+2))/275) * 100 = 46.067
((((((((2*72)%5)+2)*120*(280/166))%50)+2))/275) * 85= 39.15

I always get slight differences of 1~3% between the manual calculation and the website and therefor wanted to ask if someone knows what is wrong.
Thanks in advance.
In the games, the decimal component is removed at every step of the calculation. For the base damage formula in particular, all instance of division will truncate the output. This means that you can't simply treat it like an arithmetic equation. There's an overview here that describes the process (should still be mostly accurate for new gens).

i.e.
BaseDamage = ((((2 × Level) ÷ 5 + 2) * BasePower * [Sp]Atk) ÷ [Sp]Def) ÷ 50 + 2
a = (2 × Level) ÷ 5 = 2 * 72 ÷ 5 = 28.8 -> 28
b = ((a + 2) * BasePower * [Sp]Atk) ÷ [Sp]Def) = ((28 + 2) * 120 * 280) ÷ 166) = 6072.289 -> 6072
c = b ÷ 50 = 6072 ÷ 50 = 121.44 -> 121
BaseDamage = c + 2 = 123


and then the minimum roll is calculated as
D' = (D * (100-R)) ÷ 100 = (123 * (100 - 15)) ÷ 100 = 104.55 -> 104
 
In the games, the decimal component is removed at every step of the calculation. For the base damage formula in particular, all instance of division will truncate the output. This means that you can't simply treat it like an arithmetic equation. There's an overview here that describes the process (should still be mostly accurate for new gens).

i.e.
BaseDamage = ((((2 × Level) ÷ 5 + 2) * BasePower * [Sp]Atk) ÷ [Sp]Def) ÷ 50 + 2
a = (2 × Level) ÷ 5 = 2 * 72 ÷ 5 = 28.8 -> 28
b = ((a + 2) * BasePower * [Sp]Atk) ÷ [Sp]Def) = ((28 + 2) * 120 * 280) ÷ 166) = 6072.289 -> 6072
c = b ÷ 50 = 6072 ÷ 50 = 121.44 -> 121
BaseDamage = c + 2 = 123


and then the minimum roll is calculated as
D' = (D * (100-R)) ÷ 100 = (123 * (100 - 15)) ÷ 100 = 104.55 -> 104
Ty for the quick reply. My code works fine now.
 
Another question to the damage calculation.

a = (2 × 80) ÷ 5 = 32
b = (32 + 2) * 100 * (233 ÷ 203) = 3902.4630 -> 3902
c = 3902 ÷ 50 = 78.04 -> 78
BaseDamage = 78 + 2 = 80
Stab = 80 * 1.5 = 120

Showdown calculator gets a max damage of 118 as seen in the attached screenshot. Can someone point out my mistake?
Thanks in advance.
 

Attachments

Piloswine's GSC UU RestTalk set is glitched; it will not load in the top section of the calc when set, and in the bottom section, will load a set of Rest / Sleep Talk / Earthquake / (No Move). Piloswine's most common set is Ice Beam / Earthquake / Rest / Sleep Talk, so this should be added in its place.

Untitled.png
 
hey Austin, i hope all is well. i'm just making a quick post about how the ability technician interacts with weight based moves like low kick and grass knot. there was a previous post in this thread about grass knot on ambipom, but there is a relevant and commonly occurring example in ss ubers especially. the standard marshadow set currently has low kick and applies a technician boost on top of the 120 base power low kick naturally has most of the time in a tier with all the heavy weights.



as you can see low kick does significantly more than close combat, despite both moves being 120 base power fighting-type attacks against yveltal. could this be fixed? it's quite tedious to have to edit low kick to close combat manually every time for an accurate number, while a target like ferrothorn requires the move jump kick for 100 base power, for example. it'd be great if something could be done about this. thank you for reading!
 
Random calc should show mons with no odds of rolling physical attacks as 0 Atk IVs and EVs so foul play isnt wrong in those situations, im not sure if that is possible tho but im posting anyway thanks !
 

Vileman

Work is over
is a Tournament Director Alumnusis a Forum Moderator Alumnusis a Tiering Contributor Alumnusis a former Tournament Circuit 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!!
1657809792019.png

1657809800977.png


i can promise you i am not using hp dragon! If someone could look over this that'd be great
 

Neko

. . .
is a Site Content Manageris an official Team Rateris a Social Media Contributoris a Forum Moderatoris a Contributor to Smogon
Moderator
I just wanted check in on this since I don't think I got a response. I'm not sure if this is possible or worth the effort for the devs but I think it'd be a helpful addition for the Monotype community.
Supporting his suggestion of adding one vs all / all vs one support for Monotype. Aside from making it a bit easier to check possible threats for teams, it also massively helps Monotype C&C too so that we don't have to keep on checking back multiple targets when fine-tuning stuff ;w;
Thank you in advance :blobnom:
 
I am currently working on an implementation of the calculator from the 'smogon/calc' npm installation, but I noticed the last publishment is 2 years ago. I was wondering if there is an alternative to using this type of installation and/or if there is a new publishment scheduled soon. Thanks in advance!
 
In a gen 8 random battle earlier today, I went to calc how much damage my Coalossal would do... and I think Coalossal is just missing from the list of inputs?

You can see what I'm talking about here: https://imgur.com/a/x93FvME

Coalossal-Gmax shows up, and you can see in the second picture that both base- and Gmax-forms for other mons (e.g. Copperajah) are listed, so I think it's a Coalossal-specific issue, not a widespread one. It's also entirely possible I was just doing something wrong (still relatively new to competitive and don't have a ton of experience with the calculator) but I was very confused
I believe that the calc referrs to the Coalossol set where g-maxing is an option. If that is the only form of coalossol showing up, that means all coalossol are gigantamaxable. Snorlax, for example, has two sets. A cb set where your dynamax is normal, and a curse set with gigantamax available. In the calc, the two options will be shown, on as gmax and the other as cb.
 
I believe triple axel in the damage calculator is wrong
The damage calculator does 40 40 40 for the 3 hits, when it should be 20 40 60
This fails because of rounding


252 Atk Weavile Triple Axel (40 BP) (3 hits) vs. 0 HP / 0 Def Metagross-Mega: 63-78 (20.9 - 25.9%) -- approx. 0.1% chance to 4HKO Possible damage amounts: (21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25, 26)
thats 3 triple axel hits with 40 40 40, does 63 hp damage min


252 Atk Weavile Ice Punch vs. 0 HP / 0 Def Metagross-Mega: 11-13 (3.6 - 4.3%) -- possibly the worst move ever Possible damage amounts: (11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13) (20 base power axel)
252 Atk Weavile Ice Punch vs. 0 HP / 0 Def Metagross-Mega: 21-26 (6.9 - 8.6%) -- possibly the worst move ever Possible damage amounts: (21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25, 26) (40 base power axel)
252 Atk Weavile Ice Punch vs. 0 HP / 0 Def Metagross-Mega: 33-39 (10.9 - 12.9%) -- possible 8HKO Possible damage amounts: (33, 33, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 38, 39) (60 base power axel)
min roll is 11+21+33, which is 65, not 63
 
Is there an error with Low Kick on the damage calculator, or am I doing something wrong? By comparing the Smogon Damage Calc with the Pikalytics damage calc, it looks like Low Kick's damage is receiving a hidden +1 boost (slightly more, maybe due to rounding):

Smogon damage calc for level 50 mons, doubles, no field effects other than sun, no boosts applied to any stats:

252 Atk Life Orb Technician Marshadow Low Kick (120 BP) vs. 252 HP / 4 Def Groudon: 146-173 (70.5 - 83.5%) -- guaranteed 2HKO
Possible damage amounts: (146, 148, 149, 152, 153, 156, 156, 157, 160, 161, 164, 165, 168, 169, 172, 173)

252 Atk Life Orb Marshadow Spectral Thief vs. 252 HP / 4 Def Groudon: 74-87 (35.7 - 42%) -- guaranteed 3HKO
Possible damage amounts: (74, 74, 75, 75, 78, 78, 78, 79, 79, 82, 82, 83, 83, 86, 86, 87)

Pikalytics damage calc for same sets and conditions:

252 Atk Life Orb Marshadow Low Kick (120 BP) vs. 252 HP / 4 Def Groudon: 99-117 (47.8 - 56.5%) -- 80.9% chance to 2HKO
(99, 99, 101, 101, 103, 105, 105, 107, 107, 109, 110, 110, 113, 113, 114, 117)

252 Atk Life Orb Marshadow Spectral Thief vs. 252 HP / 4 Def Groudon: 74-87 (35.7 - 42%) -- guaranteed 3HKO
(74, 74, 75, 75, 78, 78, 78, 79, 79, 82, 82, 83, 83, 86, 86, 87)

Note that the amounts for Spectral Thief match, but Low Kick does not.

Pikalytics damage calc for same sets but giving Marshadow a +1 Attack boost:

+1 252 Atk Life Orb Marshadow Low Kick (120 BP) vs. 252 HP / 4 Def Groudon: 144-172 (69.5 - 83%) -- guaranteed 2HKO
(144, 146, 148, 149, 152, 153, 156, 156, 157, 160, 161, 164, 165, 168, 169, 172)

+1 252 Atk Life Orb Marshadow Spectral Thief vs. 252 HP / 4 Def Groudon: 109-130 (52.6 - 62.8%) -- guaranteed 2HKO
(109, 110, 113, 113, 114, 117, 117, 118, 121, 121, 122, 125, 125, 126, 129, 130)

The Low Kick calcs are now closer to the Smogon Damage Calc (although they differ by 1 damage point).

As much as I'd love for Marshadow to be able to chunk ~75% of Groudon's health with low kick, in an in-game test it only did a little bit less than 50%, more consistent with the Pikalytics calc than Smogon's. (The test was with lvl 100 mons and Groudon maybe had 0 def, but this wouldn't account for the difference).
 

jay

the balance
is a Tiering Contributor Alumnus
Is there an error with Low Kick on the damage calculator, or am I doing something wrong? By comparing the Smogon Damage Calc with the Pikalytics damage calc, it looks like Low Kick's damage is receiving a hidden +1 boost (slightly more, maybe due to rounding):

Smogon damage calc for level 50 mons, doubles, no field effects other than sun, no boosts applied to any stats:

252 Atk Life Orb Technician Marshadow Low Kick (120 BP) vs. 252 HP / 4 Def Groudon: 146-173 (70.5 - 83.5%) -- guaranteed 2HKO
Possible damage amounts: (146, 148, 149, 152, 153, 156, 156, 157, 160, 161, 164, 165, 168, 169, 172, 173)

252 Atk Life Orb Marshadow Spectral Thief vs. 252 HP / 4 Def Groudon: 74-87 (35.7 - 42%) -- guaranteed 3HKO
Possible damage amounts: (74, 74, 75, 75, 78, 78, 78, 79, 79, 82, 82, 83, 83, 86, 86, 87)

Pikalytics damage calc for same sets and conditions:

252 Atk Life Orb Marshadow Low Kick (120 BP) vs. 252 HP / 4 Def Groudon: 99-117 (47.8 - 56.5%) -- 80.9% chance to 2HKO
(99, 99, 101, 101, 103, 105, 105, 107, 107, 109, 110, 110, 113, 113, 114, 117)

252 Atk Life Orb Marshadow Spectral Thief vs. 252 HP / 4 Def Groudon: 74-87 (35.7 - 42%) -- guaranteed 3HKO
(74, 74, 75, 75, 78, 78, 78, 79, 79, 82, 82, 83, 83, 86, 86, 87)

Note that the amounts for Spectral Thief match, but Low Kick does not.

Pikalytics damage calc for same sets but giving Marshadow a +1 Attack boost:

+1 252 Atk Life Orb Marshadow Low Kick (120 BP) vs. 252 HP / 4 Def Groudon: 144-172 (69.5 - 83%) -- guaranteed 2HKO
(144, 146, 148, 149, 152, 153, 156, 156, 157, 160, 161, 164, 165, 168, 169, 172)

+1 252 Atk Life Orb Marshadow Spectral Thief vs. 252 HP / 4 Def Groudon: 109-130 (52.6 - 62.8%) -- guaranteed 2HKO
(109, 110, 113, 113, 114, 117, 117, 118, 121, 121, 122, 125, 125, 126, 129, 130)

The Low Kick calcs are now closer to the Smogon Damage Calc (although they differ by 1 damage point).

As much as I'd love for Marshadow to be able to chunk ~75% of Groudon's health with low kick, in an in-game test it only did a little bit less than 50%, more consistent with the Pikalytics calc than Smogon's. (The test was with lvl 100 mons and Groudon maybe had 0 def, but this wouldn't account for the difference).
I think the first calc has the technician boost applied even though low kick exceeds 60 BP
 

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

Top