Programming Pokémon Showdown Damage Calculator

jetou

is a Programmeris a Forum Moderatoris a Battle Simulator Moderatoris a Community Contributor Alumnus
Moderator
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.
 

jetou

is a Programmeris a Forum Moderatoris a Battle Simulator Moderatoris a Community Contributor Alumnus
Moderator
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.
 

jetou

is a Programmeris a Forum Moderatoris a Battle Simulator Moderatoris a Community Contributor Alumnus
Moderator
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
 
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

Assist Skitty was banned from NatDex Ubers
is a Site Content Manageris a Forum Moderatoris 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

Assist Skitty was banned from NatDex Ubers
is a Site Content Manageris a Forum Moderatoris 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.
 
Protosynthesis and Quark drive do not correctly add damage. In this scenario we have a Great Tusk vs. alomomola, and when I change the ability from Protosynthesis attack to Propeller Tail (without disabling Protosynthesis first) the damage numbers do not change:

252 Atk Great Tusk Headlong Rush vs. 4 HP / 252+ Def Alomomola: 165-195 (34.9 - 41.3%) -- guaranteed 3HKO

252 Atk Protosynthesis Great Tusk Headlong Rush vs. 4 HP / 252+ Def Alomomola: 213-252 (45.1 - 53.3%) -- 34.4% chance to 2HKO

252 Atk Propeller Tail Great Tusk Headlong Rush vs. 4 HP / 252+ Def Alomomola: 213-252 (45.1 - 53.3%) -- 34.4% chance to 2HKO

As a mobile user, I’ve tried my best to add some screenshots, although they are in parts:

IMG_1730.png
IMG_1731.png

IMG_1726.png

IMG_1727.png

IMG_1728.png

IMG_1729.png
 
Hey, I'm trying to set up my own version of the https://github.com/smogon/damage-calc, but the gh-pages branch only includes mons up to gen 8, and trying to use the master branch to build the site gives me this error:

-Site contained a symlink that should be dereferenced: /calc/LICENSE.

How would I correctly set this up so I have all gen 9 mons included too?

Edit: I tried simply removing those files, and then the site just became the root directory's README file. Is it even possible to build the master branch into an actual site, or would I need to manually move all gen 9 mons and features over to the gh-pages branch?
 
Last edited:

RSB

Dreaming of a shore bordering another world
is a member of the Battle Simulator Staff
Punching Glove doesn't seem to reflect the correct amount of damage in the calc when attacking a pokemon with fluffy despite also seemingly affecting the roll?

https://replay.pokemonshowdown.com/gen9nationaldexag-2017164174
In the above battle a user had the set below yet does much more damage than what the calc says it would.

252+ Atk Punching Glove Urshifu-Rapid-Strike Surging Strikes (3 hits) vs. 248 HP / 0 Def Fluffy Bewear on a critical hit: 138-162 (31.1 - 36.5%) -- approx. 4HKO after Leftovers recovery
252+ Atk Urshifu-Rapid-Strike Surging Strikes (3 hits) vs. 248 HP / 0 Def Fluffy Bewear on a critical hit: 126-147 (28.4 - 33.1%) -- approx. 91.1% chance to 4HKO after Leftovers recovery
 

ArnavChawla

formerly Hexer003
idk if its just me but whenever i use the calc (inputing evs,ivs,weather etc) , it puts no change to the stats and damage done,.
 
Not sure if this has ever been suggested, or if it's even worth the time and effort to implement, but could unique fields be added to further query sets and mons into a more manageable format for team-building purposes?

For instance, adding a unique field to identify the tier (OU, UU, etc.) a mon is in could further filter just the tier you're interested in (and below ideally, so clicking OU would show all below tiers as well since they're legal). Something that has multiple sets used in multiple tiers would always identify as the lowest tier it's legal in (think Skeledirge in Ubers and UU due to Unaware niche).

This new Tier field would be one unique field and another (or multiple) would be a rough classification of the roles the mon has.

This unique field(s) would summarize the types of sets into things such as Physical / Special Attacker, Defense / Special Defense Wall, Fast Pivot, Hazard Stacker, etc. to allow for further filtering in the damage calculator. Something with multiple sets would ideally have multiple fields to query from (some mons can be both offensive and defensive, for instance). This could apply to the mon or to a sample set but ideally the mon so you can see what sets are available / common.

The purposes of this would be:
I want to build a physically defensive wall in PU and need to know what threats to expect and build around as I typically play RU. I build my sample set using 'X' mon and import it into the calculator like normal.
I then choose from multiple drop downs such as Tier and Role (PU and Physical Attacker, for instance). Using these would then populate the highest damage calculation from each individual mon in that category rather than the current manually clicking one mon with 4 attacks (new interface for this perhaps, or have an additional column to the right of the current damage calculation table that specifies the mon used for each attack so it can query the top 4 without changing much of the layout). This could also be an importable text document that just queries the top calculation and sorts it from high to low ('Y' does 47-54%, 'Z' does 41-50%, etc.).

This would obviously require a lot of additional data management in updating the tiers and roles as things change but would only really be a few additional unique fields in a table that's already probably pretty expansive. If this is something that seems feasible (whether updating the current interface for additional drop downs or creating an importable with the queried calculations) I can definitely explain further or create samples for visualization!
 

Sabelette

from the river to the sea
is a Site Content Manageris a Community Contributoris a Top Contributoris a Forum Moderator Alumnus
The calc seems to have these weird sets that have never existed - for example, in RBY there's a bunch of random stuff like this for mons that have never had analyses and certainly aren't viable in these tiers:
1704335096794.png
 
Whenever I change a Pokemon's status condition and then change it's item afterwards, the status condition is kept when changing to another Pokemon.
Example: I change Abomasnow's condition to Burned and then change its Item. I then select Absol whose status condition is then already Burned instead of Healthy like one would expect.
 
Not sure if this is the thread for this. Using the One vs All or All vs One on mobile, the calculation sheet’s header blocks me from selecting all the tiers for calculating. Irregardless of Safari vs Google app or selecting “request desktop version”.
 

Attachments

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

Top