Programming Mass Damage Calculators

Crux

Banned deucer.
This is actually incredible. My only suggestion is that you perhaps make the results c/p'able within the table.
 
Modest Choice Specs Solar Power Charizard, after being baton passed a Nasty Plot, with the moveset
- Fire Blast
- Solar Beam
- HP Ice
- Focus Blast
0HKO's everything in the game after stealth rock :D
Chandelure (Choice Specs)
SolarBeam 74.19 - 87.45%
HP Ice 43.36 - 51.25%

nice try, but Chandy has a 0.81% chance of surviving... :P
 
man this is awesome
I'll go and recommend my friend using this as well
and we don't have to spend more than a minute to calc what is the best option when we're in battle
 

Blue Kirby

Never back down.
is a Top Tutor Alumnusis a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Smogon Discord Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnusis a Past SPL Championis a Three-Time Past WCoP Champion
This is a pretty brilliant initiative. Thanks for pouring time into this, it's going to be incredibly handy to all walks of the Pokemon community.
 
By the time I learned that IE has stricter standards
Not stricter, stupid own standarts that are supported only by Microsoft.

I suggest a possibility to add own sets for opponents. There are, well, sets that aren't on smogon database. I think you can also use statistics for that.

And I think you can merge getUserOptions() and getTargets() into one function (or an object so you can generate json with whatever generates that code) to save some traffic and avoid writing same code twice.
 
this is truly awe-some great job dude great job with the PO Re-player and this Smogon MIGHT become the international facebook of pokemon (even more of what it is now)
 
It says that Specs Heatran and Chandelure KO +1 CM Reuniclus with Overheat while they don't /:
I think what happens is Overheat ignores boosts for some weird reason; the calcs seem to be correct for Kyurem's Specs DM.
 

Honko

he of many honks
is a Site Content Manager Alumnusis a Programmer Alumnusis a Top Contributor Alumnus
It says that Specs Heatran and Chandelure KO +1 CM Reuniclus with Overheat while they don't /:
I think what happens is Overheat ignores boosts for some weird reason; the calcs seem to be correct for Kyurem's Specs DM.
Good catch. Looks like the calculator is assuming Flash Fire is activated. I'll fix that soon.

Not stricter, stupid own standarts that are supported only by Microsoft.

I suggest a possibility to add own sets for opponents. There are, well, sets that aren't on smogon database. I think you can also use statistics for that.

And I think you can merge getUserOptions() and getTargets() into one function (or an object so you can generate json with whatever generates that code) to save some traffic and avoid writing same code twice.
Thanks for the tips, I will look into json. As for adding custom sets, I'm hesitant to do that, mostly for simplicity. In the long run, Smogon should eventually have most of the noteworthy sets. If there's a really popular set that Smogon doesn't have for some reason, I can always add it manually.
 
Well, I meant manual input, when building a pokemon one usually want to ensure KO against certain threat no mater what set it runs (and people usually use own sets, even stupid ones sometimes) which will need calculations with least beneficial circumstances (e.g. +Def nature, max HP/Def IVs and EVs when calclating coverage).

And I have one more question: why do you store all the data (moves, their effects, pokemon, etc) in js executables? You could store it in, say, some SQL db and retrieve it with server-side script, this will significally reduce scripts size.
It's just a question, I'm curious a bit)
 

Honko

he of many honks
is a Site Content Manager Alumnusis a Programmer Alumnusis a Top Contributor Alumnus
Good news! I've added LC Pokemon to the calculator, and their silly single digit stats give some amusing damage %s when you forget to change tiers (CB Guts Heracross Megahorn vs Choice Scarf Abra: 145610.52 - 171315.78%). I also fixed the Flash Fire bug (it now shows that the attacker has Flash Fire activated, and there's another entry for when it isn't). Enjoy!

My only suggestion is that you perhaps make the results c/p'able within the table.
If you mean being able to copy-paste them into Excel, you can. Just select it all and copy it into Notepad or some other text editor first to get the tabs and newlines in, then copy that into Excel.

Well, I meant manual input, when building a pokemon one usually want to ensure KO against certain threat no mater what set it runs (and people usually use own sets, even stupid ones sometimes) which will need calculations with least beneficial circumstances (e.g. +Def nature, max HP/Def IVs and EVs when calclating coverage).

And I have one more question: why do you store all the data (moves, their effects, pokemon, etc) in js executables? You could store it in, say, some SQL db and retrieve it with server-side script, this will significally reduce scripts size.
It's just a question, I'm curious a bit)
I actually had an earlier version of the calculator where you can customize both sides, I just stopped working with it at a certain point, so it would need some fixes now. I'll try to get that up relatively soon.

There's two reasons I'm using js executables instead of a db. The first is that I built this thing without a clear plan; I just took AMF's old calculator and added things on in pieces until I wound up with what we have now. The second is that I'm not really doing enough with the data to make the abstraction of a db valuable. It runs fast enough now, and I can't think of any other queries I'd need to make, so there's not much practical gain in swapping in some MySQL+PHP. But you're right that what I'm doing right now isn't exactly best practice, and if I was doing this for work or a class I'd definitely be using a more elegant solution.
 
this is very awesome, and i wount be able to stress that enough, but can you add in some option selects?

for instance, for the one vs all calculator, can you add in things like
"ignore all that dont get ohko'd/2hko'd"
"ignore air balloon"
"ignore intimidate" (in case something is behind a sub)
"assume stealth rocks" (which would basically be "ignore multiscale", i guess)

or maybe, if you can do something more general, add a check box beside each name which would hide it on clicking it, in case I'd only like to care about some pokemon in a tier (i dont particularly care what alomomola walls, but i'd certainly like to see quagsire in my results, for instance)? then add an "unhide all" check box, or undo all hides whena new calculation is performed.
 

Honko

he of many honks
is a Site Content Manager Alumnusis a Programmer Alumnusis a Top Contributor Alumnus
Added Hyper Beam.

Now that Pokemon can have analyses for multiple tiers on-site, the calculator will use the tier the set is meant for, rather than just the tier the Pokemon is in. So for example, Milotic's OU bulky water set will show up in OU, but only her UU sets will show up in UU. The same will be true for Uber Pokemon once those analyses get uploaded. Hopefully this will make the calculator even more useful for specific tiers.

As for additional features, like more filters, copypastable damage calcs, and the version where you can customize both sides: I will get to those eventually, but I'm very busy for the next several months, so it probably won't happen for a while.
 

Pocket

be the upgraded version of me
is a Site Content Manager Alumnusis a Team Rater Alumnusis a Community Leader Alumnusis a Community Contributor Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnus
Thank you for this great resource, Honko! Just one problem though - I think the Grass Knot calculations are off.

For instance:
Sash Alakazam's Grass Knot vs Physically Defensive Milotic (252 HP / 0 SDef):
~ Honko's Spread Calc: 37-44%
~ Real Damage: 47-55%

Sash Alakazam's Grass Knot vs CroCune (252 HP / 4 SDef):
~ Honko's Spread Calc: 39-46%
~ Real Damage: 49-58%
 

Honko

he of many honks
is a Site Content Manager Alumnusis a Programmer Alumnusis a Top Contributor Alumnus
Thank you for this great resource, Honko! Just one problem though - I think the Grass Knot calculations are off.

For instance:
Sash Alakazam's Grass Knot vs Physically Defensive Milotic (252 HP / 0 SDef):
~ Honko's Spread Calc: 37-44%
~ Real Damage: 47-55%

Sash Alakazam's Grass Knot vs CroCune (252 HP / 4 SDef):
~ Honko's Spread Calc: 39-46%
~ Real Damage: 49-58%
Yeah I was lazy and just set Grass Knot/Low Kick to 80 power and Gyro Ball/Heavy Slam to 100 instead of actually checking the weight. I have some time off later this week so I'm planning on improving a few things, including this.
 

Honko

he of many honks
is a Site Content Manager Alumnusis a Programmer Alumnusis a Top Contributor Alumnus
They're back up now. My account got taken down with no warning for some reason...I guess that's what I get for using shady freehosting!

I'm on winter break now, so hopefully I'll be able to make some cool changes/additions over the next couple weeks.
 
hmmm
the question is: who's wrong?

via http://masara.byethost15.com/SilverlightDmgCalcTestPage.html
252 Atk Terrakion Stone Edge vs 0 HP/0 Def Multiscale Dragonite: 52.32% - 62.23%
169, 172, 174, 175, 178, 180, 181, 184, 186, 187, 190, 192, 193, 196, 198, 201

via http://www.honko.freehosting.com/manly_calc.html
Stone Edge: 170-204 (52.63 - 63.15%)
170, 174, 176, 176, 180, 182, 182, 186, 188, 188, 192, 194, 194, 198, 200, 204

===

Masara: 252 Atk Terrakion Stone Edge vs 0 HP/0 Def Dragonite: 104.95% - 124.46%
339, 345, 348, 351, 357, 360, 363, 369, 372, 375, 381, 384, 387, 393, 396, 402

Honko: Stone Edge: 338-402 (104.64 - 124.45%)
338, 344, 348, 350, 356, 360, 362, 368, 372, 374, 380, 384, 386, 392, 396, 402

===

Masara: 252 Atk Life Orb Terrakion Stone Edge vs 0 HP/0 Def Multiscale Dragonite: 68.73% - 80.8%
222, 223, 226, 229, 232, 234, 237, 240, 243, 244, 247, 250, 252, 255, 258, 261

Honko: Stone Edge: 222-264 (68.73 - 81.73%)
222, 224, 228, 230, 234, 236, 240, 240, 242, 246, 248, 252, 254, 258, 260, 264

===

Masara: 252 Atk Life Orb Terrakion Stone Edge vs 0 HP/0 Def Dragonite: 137.46% - 161.61%
444, 447, 453, 459, 465, 468, 474, 480, 486, 489, 495, 501, 504, 510, 516, 522

Honko: Stone Edge: 440-522 (136.22 - 161.6%)
440, 446, 452, 458, 462, 468, 474, 480, 482, 488, 494, 500, 504, 510, 516, 522
 

shnen

שוני
is a Battle Simulator Moderator Alumnus
the NU part of all vs one seems to not work at all for me, and I think someone else on #neverused encountered the same problem. It is down on both my iPad and my old Mac btw.
 
the NU part of all vs one seems to not work at all for me, and I think someone else on #neverused encountered the same problem. It is down on both my iPad and my old Mac btw.
Well, no NU analysis are done yet, at least i think so, so we'll have to wait
 

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

Top