Thread: Programming Mass Damage Calculators
View Single Post
Old Sep 10th, 2011, 1:56:12 PM   #36
Honko
pronounced "Honko"
is a Tiering Contributoris a Contributor to Smogon
 
Honko's Avatar
 
Join Date: Dec 2009
Posts: 1,042
Default

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!

Quote:
Originally Posted by Fat Crux View Post
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.

Quote:
Originally Posted by Fat whitefag View Post
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.
__________________
Honko is offline   Reply With Quote