• 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

The damage calculator is bugged for generation 4 when calculating pursuit damage from technician scizor.

When 'switching out' is selected, the damage for pursuit is actually reduced when scizor has technician, compared to when it has a different ability. The damage on showdown is the correct (higher) damage.
Additionally, the 'switching' message is not displayed in the output of the calculation.


Example: (switching out was selected in both cases)
252+ Atk Choice Band Technician Scizor Pursuit vs. 64 HP / 0 Def Gengar: 326-384 (117.6 - 138.6%) -- guaranteed OHKO
252+ Atk Choice Band Scizor switching boosted Pursuit vs. 64 HP / 0 Def Gengar: 438-516 (158.1 - 186.2%) -- guaranteed OHKO

Relevant Screenshots:
technician.png not technician.png
 
Multi-hit attacks work incorrectly in the "One vs All" and "All vs One" mode in the calculator, returning a much higher damage percentage than expected yet the KO chance is the same as usual. The apparent cause of this bug is that the damage total is multiplied again by the number of hits.
Multi-hit moves still show correct behavior in the "One vs One" and "Random Battles" modes, however.
Below there are some images to showcasing this bug:

1 vs 1 mode:
Breloom vs Cresselia 1v1.PNG


All vs 1 mode:
Breloom vs Cresselia All vs 1.PNG


1 vs 1:
Mamoswine vs Buzzwole 1v1.PNG


1 vs all mode:
Mamoswine vs Buzzwole 1vsAll.PNG

I am surprised nobody else has reported this bug yet. As someone who creates fakemon for fun but tries to balance them somewhat (unlike many fakemon creators), it's specially annoying for me because i use the Damage Calculator to know how well they would perform competitively.

These screenshots were taken from Google Chrome on Windows 10, because this info might be helpful.
(Sorry if this post has any grammar mistakes)
 
I'm actually not so sure if this implementation is proper due to Intrepid Sword (and Dauntless Shield) only triggering once per battle, meaning there's a good chance you see Zacian/Zamazenta switch in and not gain a boost.
That's true. I think I'll make it a checkbox (like Intimidate) when I'm done with the new set importer.
 
bumping this and am wondering if it's a fixable issue, as almost all non-arceus meta-relevant mons like mega mewtwo x, mega diancie, primal kyogre, kartana, mega steelix, ho-oh, and more are either not importing in the calc correctly or are simply missing altogether.
The new set importer is live and these sets should be present in the calc now.
 

Colin

formerly BeardedDrakon
is a Tiering Contributor
LCPL Champion
Many, maybe all Little Cup sets in the S/V damage calculator default to level 100, instead of level 5.

1699562381461.png
,
1699562426454.png

Setting all levels to level 5 also does not change the default level after you pull up a different set

1699562686739.png
 
Last edited:
Setting all levels to level 5 also does not change the default level after you pull up a different set

1699562686739.png
This is intended behavior. If you pull up a new set while a different level is selected, then the set's level is taken priority over the selected level.

Many, maybe all Little Cup sets in the S/V damage calculator default to level 100, instead of level 5.

1699562381461.png
,
1699562426454.png
jetou literally just fixed this. jetou was rewriting how the sets get imported on the calc's end, and levels hadn't been implemented yet. It should work now.
 
Hi I want to use the baseline of this project (damage-calc) as a npm package and bind it into my hobby react-app. Therefore I have 3 questions, which I hope someone could answer me.
1. The license should allow me to this right?
2. Can I use the package in a typescript enviroment or do I need to create a @types project first
3. Is there any interest on a project with a different UI (because then I would maybe just make a PR of this project)

Thanks a lot !

EDIT: If this is not the right place for this, I am sorry, first time posting.
 
1. The license should allow me to this right?
2. Can I use the package in a typescript enviroment or do I need to create a @types project first
3. Is there any interest on a project with a different UI (because then I would maybe just make a PR of this project)
1. Yes, as long as you follow the terms of the MIT License
2. No, @smogon/calc ships with the TypeScript definitions needed
3. I've thought of re-designing the UI but haven't had any concrete ideas. We can discuss what the new UI would entail over at #calc-dev in the Smogon Development Discord server, I'll likely be busier soon so I don't know how much time I can commit to it though
 

SetsuSetsuna

is a Community Leaderis a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a member of the Battle Simulator Staffis a Team Rater Alumnus
OU Forum Leader
Noticed a few OU sets dont show in the calc at all. For example Great Tusk only has Offensive Bulk Up and Iron Valiant only has Swords Dance

1700064152968.png
1700064172251.png
 

UberSkitty

28 on Smogon in cat years
is a Community Contributoris a Contributor to Smogon
Hello, not a bug but a suggestion, but would it be possible for the calc sets to prioritize attacks over support moves in a mon's default moves? As someone who does a lot of pointless calcs, it can be a pain to have to add a commonly run move on a mon every time.

I've been told the default sets are added manually added based on the analysis sets, and I'm not asking for the entire analysis to be read. But if an attack is slashed in the sample set, even if with another attack, I'd prefer it over an irrelevant calc move like Stealth Rock. Here's an example with Klawf (PU Defensive):

Defensive Klawf's current default calc moves:
1700076860918.png

And Defensive Klawf's analysis moves:
1700076976348.png

My suggested default move calc moves:
1700077243379.png

This would be replacing Stealth Rock+Swords Dance with Stomping Tantrum and High Horsepower.

Again, not asking to actually read the analysis to find four attacks to put, but if a mon has another attack slashed in the sample, it'd be more useful/convenient than an undamaging move. Thanx in advance.
 
Hi, minor bug here. The "Expected KO" ranges seem to be incorrect in the damage calc. Earthquake deals 48-58 out of 182, and would be a guaranteed 4HKO, not a chance to 2HKO as the calc says. For people who just look at the KO ranges, this could be misleading. It seems to be present in other generations as well, not just X/Y.

1700977457840.png
 
This isnt really a bug or anything, more of a suggestion but help room suggested I leave this here since there isnt really anywhere else to leave this, Please ignore this or correct me on where to go if this does not belong here, I was wondering if there could be a tera raid calculation added to the damage calculator as I do know some people use these for ingame sets, There could perhaps be a toggle where you make it a 1-7 star tera raid on the opposing side to calculate the best sets for a tera raid, Weither this is added or not, have a nice day!
 
This isnt really a bug or anything, more of a suggestion but help room suggested I leave this here since there isnt really anywhere else to leave this, Please ignore this or correct me on where to go if this does not belong here, I was wondering if there could be a tera raid calculation added to the damage calculator as I do know some people use these for ingame sets, There could perhaps be a toggle where you make it a 1-7 star tera raid on the opposing side to calculate the best sets for a tera raid, Weither this is added or not, have a nice day!
There exists a fork of the damage calculator that includes the Tera raid Pokemon, so you could just use that: https://davbou.github.io/
 

UberSkitty

28 on Smogon in cat years
is a Community Contributoris a Contributor to Smogon
Hi, minor bug here. The "Expected KO" ranges seem to be incorrect in the damage calc. Earthquake deals 48-58 out of 182, and would be a guaranteed 4HKO, not a chance to 2HKO as the calc says. For people who just look at the KO ranges, this could be misleading. It seems to be present in other generations as well, not just X/Y.

View attachment 574162
1701211958376.png


This worked fine for me, I think you accidentally had Steelix below 100% HP:

1701212057221.png

1701212086999.png


Tho this does bring up the idea of specifying the HP percent somewhere in the calc if it's below 100%.
 
https://www.smogon.com/forums/threa...amage-calculator.3593546/page-13#post-8465554

What is the current status of improving custom IVs & Hidden Power? I am making my own spreadsheet calculator out of frustration with alternative IV spreads not just overwriting custom spreads, but merging with them & changing the HP type & seemingly leaving latent assumptions that corrupt other imported sets depending on the order they are selected. I've been trying to make sets to work around these issues but have not succeeded. For example, I've found some EV spreads for 30 SpD / 30 Spe Signal Beam that are equivalent to 30 SpD / 30 Spe HP Bug, but even without HP in the moveset, the calculator often bungles the IVs. I've tried to compile examples but there don't seem to be any patterns to the bugs & I can't find any verifiable repeatable errors, I would have to record myself to get data.
 

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

Top