Programming sulcalc - another pokemon damage calc

It has gen 1-7 mechanics. I don't know gen 7 much/at all so if anyone notices mechanics that are incorrect/absent let me know.

Why use this over Honko's calc?
  • Chance to KO includes: current HP, berries, weather, etc.
  • Moves can be chained with "set hp".
  • It's available offline at the same url.
  • It only downloads files when something has changed.
The whole thing is built with webpack+node so you can build just the calc api without UI components and use it in some other javascript/node project. Link for those interested: https://github.com/sulcata/sulcalc/

gib likes pls thx
 
Last edited:
The idea of calculating the chance to KO of a sequence of moves is good, and something Honko's calculator should have as well.

Now, the interface is too bright IMO, and there's little contrast - you can barely notice the text and dropdown fields.

Something weird I noticed is that when you click on "set HP", it sets up ALL possible HP values, instead of either the lowest one or the highest one. An option to set which one you want (or at least default to picking highest possible remaining HP) could work.

Other than that, it seems good.
 
Picking the highest HP by default defeats the point of figuring out the chance to KO for a sequence of moves though. I think it's easy enough to type in the HP value/copy it over for the few cases that you'd want to do that anyway.

As for the contrast and overall UI design, I know it's not particularly good. I'm not very good at designing UIs, so I just copied the overall layout of honko's calc and used Bootstrap for styling. If anyone actually has an eye for design (i.e. knows what they're doing) and knows how to work with Bootstrap I'm open to PRs.
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Very nice :) feel free to contribute to the actual calc PS uses if you desire, you have a lot of cool features in your github code (+1)
 
Picking the highest HP by default defeats the point of figuring out the chance to KO for a sequence of moves though. I think it's easy enough to type in the HP value/copy it over for the few cases that you'd want to do that anyway.
I was thinking on the idea of EV-tweaking offensive Pokemon for the worst case (dealing the lowest damage in the first move of a sequence).

But now I realize I wasn't looking at the defensive Pokemon's POV, where the worst case is ending with the lowest possible HP.
 
Yeah, the whole point is to not assume any case and let the user do that on their own, since they don't know how much their attack will do until after they've clicked it. It lets the user plan out a sequence of moves based on how likely it'll end in their favor (assuming predictions are correct).

For example, in GSC Double-Edge + Thunder is a pretty common way for Snorlax to take out Cloyster early in the game. Not factoring in accuracy, chance to para, chance to crit, etc., I can find out from my calc that it has a 65.7% chance to KO after a Double-Edge:
Leftovers Snorlax Thunder vs. Leftovers Cloyster: 211 - 248 (69.6 - 81.8%) -- 65.7% chance to OHKO after Leftovers
Assuming Cloyster took minimum or maximum damage from Double-Edge wouldn't let me know how effective Thorlax is at taking out Cloyster. You could do the same for figuring out how likely DE+Thunder+Thunder is at KOing Skarmory, etc.


As for contributing to PS' calc maybe in the future, but I've still got a lot of stuff I want to do on my own calc and I don't have free time like I used to :(
 
Added in data for usum.

Implemented Neuroforce as a multiplier on base power for super effective attacks. For some reason PS's calc seems to be multiplying for stabs instead, while showdown is multiplying for SE damage. Someone will tell me what's right later I guess.

Searing Sunraise Smash and Menacing Moonraze Maelstrom should ignore abilities.

Photon Geyser is using whichever attacking stat is larger after modifiers. Currently it will not be affected by burn. Need to know if the move is like Foul Play or if it actually changes the category.
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
Added in data for usum.

Implemented Neuroforce as a multiplier on base power for super effective attacks. For some reason PS's calc seems to be multiplying for stabs instead, while showdown is multiplying for SE damage. Someone will tell me what's right later I guess.

Searing Sunraise Smash and Menacing Moonraze Maelstrom should ignore abilities.

Photon Geyser is using whichever attacking stat is larger after modifiers. Currently it will not be affected by burn. Need to know if the move is like Foul Play or if it actually changes the category.
Uhm Neuroforce shouldn’t be doing that, it goes off the defenders type not the attackers so it 100% shouldn’t be stab.
Also idk if you mean SSS and MMM should be doing that but aren’t or if you’re talking about how you still need to do it? It should be working
 

Austin

Schismatic
is a Programmeris a Community Contributoris a Forum Moderator Alumnusis a Battle Simulator Moderator Alumnus
No, just saying that it should be working with regard to sss and mmm.

I guess I misread the initial implementation as looking at the attacker's types instead of the defender's types, but something is still wrong with one of the implementations:
Neuroforce: https://github.com/Zarel/Pokemon-Sh...7cf65fb0a83e12c28dec8/data/abilities.js#L2126
Being super effective and being the same type as the defender are two different things.
Ah I see what you mean, fixed ty for pointing that out
 
I am not sure wether or not it comes from me, but it seems like the calc does not know the base power of Ultra Necrozma's Z-move
Capture.PNG
 
yeah, there's a big problem with all the z-moves that require a specific pokemon and move, and by big problem i mean they just arent implemented lol. hopefully i'll get around to it today. doesn't look like too hard of a thing to do.
 
i just ripped the relevant info from PS's databases and hooked things together, should be working now. at the very least the calcs don't look wrong.
 
Remove the item. Unselecting things is kind of not so nice to do right now, since you'd have to scroll down and unselect the item currently selected. I'll try looking into making that more usable at some point.
 
Added in usage sets for all gens (they can be disabled under options).
Not sure how good they actually are for ADV and beyond, but for RBY and GSC they're great since they cut out all the useless status moves.
 
ever find yourself dying in a natural disaster without internet, and in your final moments wonder how much hippowdon takes from lumineon's bubble? you can do that now, the app should work offline if you've got a newish/updated internet browser. now you can finally lay such worries to rest.

poor as a peasant and can't afford home internet or unlimited data? now the app will try to load local copies of everything first. it should transfer less(ish) data overall.

tl;dr: visit calc website once with internet, turn internet off, refresh page, it still works!!! it uses less data on reload too!!!

i just used google's workbox to auto-generate a service worker. since the db files are > 1 MB and github's cache control is only 10 minutes, it seemed worth it to force long-term caching by saving the app. i don't actually think people want to use this offline, but workbox adds it for free along with the better caching, so there's no reason not to lol.
 

Inspirited

There is usually higher ground.
is a Contributor Alumnus
I haven't done much testing to isolate the issue, but this damage range just isn't correct (this is gen 3). I'll do more fiddling with it later and see if I can narrow down the issue. Love this calc btw.

Screen Shot 2020-07-23 at 12.23.17 PM.png
 

Shellnuts

Rustiest Player Around
is a Community Contributor
I haven't done much testing to isolate the issue, but this damage range just isn't correct (this is gen 3). I'll do more fiddling with it later and see if I can narrow down the issue. Love this calc btw.

View attachment 263654
After comparing the damage of Self Destruct and Explosion to the Pokemon Showdown damage calculator, I think I figured out that the issue is that it halves defence twice, doing double the Normal damage. This also occurs in the Gen 4 Self Destruct/Explosion calculation as well.
1606936050166.png
1606936086461.png

1606936411922.png
1606936378047.png
I really like the calculator by the way, very useful for planning out lines which require multiple hits from different mons and attacks to get a KO.
 
Last edited:

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

Top