1. Welcome to Smogon Forums! Please take a minute to read the rules.
2. Click here to ensure that you never miss a new SmogonU video upload!

# Programming Damage Calculator

Discussion in 'Technical Projects' started by DougJustDoug, Dec 24, 2009.

1. ### RBGTrying to get my Smods back D:

Joined:
Jan 27, 2008
Messages:
3,407
Leftovers does not effect how much damage is done.

For torrent, you need to lower your HP to a point where the ability is activated.

And for Anger Point, we can't assume the boost is active, even if it has hat ability.
2. ### jc104Humblest person ever

Joined:
Aug 27, 2009
Messages:
1,779
This seems to have been ignored.
3. ### david stoneFast-moving, smart, sexy and alarming.

Joined:
Aug 3, 2005
Messages:
5,152
It would be helpful in some cases if the calculator could be forced to output all legal damages, not just the range of damages. In other words, r = 85, 86, ... 99, 100. They should probably show the probability of each occurring, because I'm assuming anyone who wants enough of a level of detail to show every legal damage probably also wants to know the probability weighting of each.
4. ### DarkmaliceLevel 2

Joined:
Aug 11, 2008
Messages:
1,794
This is a very small issue, but in the damage calculator, Ho-Oh is missing the second capital.
5. ### Diesel

Joined:
Aug 6, 2007
Messages:
1,945
I'm guessing this has been suggested before, but I didn't see it in this thread, so...

It'd be awesome if this calculated the probability of a #HKO, maybe even up to 4 or 5 (for the sake of thoroughness, if nothing else). A lot of the time you can "eyeball" it, but it would be really useful for finding specific EV spreads that achieve or prevent 2HKOes, etc. That's the only thing I still have to hop on Libelldra for, everything else is amazing.
6. ### david stoneFast-moving, smart, sexy and alarming.

Joined:
Aug 3, 2005
Messages:
5,152
There's really no reason to limit it to 4 or 5HKO. You might as well make it actually NHKO. Type in the number of hits you want.
7. ### WichuKittens

Joined:
May 30, 2007
Messages:
1,547
There's no way to take into account a Flower Gift boost for either attacker or defender. I guess it probably works for Cherrim itself, but I can't see a way to select it for Cherrim's partner... If Helping Hand (a doubles-only move) is included, shouldn't Flower Gift's partner supporting effect also be there?

Oh, and I don't know whether this is a bug in the damage calculator or the defense EVs applet, but the results of them are inconsistent.
I used the defense EVs applet to calculate the best EVs for a lv50 Mr. Mime, focusing only on Sp. Def (with 290 EVs available), and it suggested I use 212 HP and 76 Sp. Def. However, using the damage calculator, I found that 220 HP and 68 Sp. Def is actually slightly more effective.
So clearly, there's a flaw in either the damage calculator or the defense EVs applet...
8. ### david stoneFast-moving, smart, sexy and alarming.

Joined:
Aug 3, 2005
Messages:
5,152
For a given calculation a different spread might be slightly more effective. However, Pokemon rounds down at every point in the calculation, so another calculation would lead to slightly different optimal spreads.
9. ### jormungand201

Joined:
Jan 29, 2009
Messages:
42
Don't know if this was mentioned, but Beat Up doesn't seem to register. Seeing that the damage is affected by the amount of remaining pokemon on your side, you'll have to create a section where you input the number of pokes that aren't KO'd. Seems like an awful waste of time for a move thats hardly used :/
10. ### Ferrouswheel

Joined:
Jun 15, 2009
Messages:
805
I have a bug to report:

When you use keep preferences under in the preference window, it remembers the level that you set as default in the textbox, but it doesn't actually change the level of the actual pokes when you reload the calculator later, you have to manually hit enter again to get it to change.

Edit:

Also, the default level preference doesn't modify the pokemon aside from the first two.

And I'm using Google Chrome, and have cookies on, just to make that clear. I might not be using the calculator right, but I don't believe it's my browser.
11. ### eric the espeonmaybe I just misunderstood

Joined:
Aug 7, 2007
Messages:
3,694
Natural Gift does not show up in the move listings, which may or may not be intentional.
12. ### NixHexONE YEAR Seizure Free!! God bless keppra.

Joined:
Oct 6, 2009
Messages:
2,932
Mold Breaker

I tried calculating damage from a Rampardos' Earthquake to Levitate Bronzong which did 0 - 0%. Next I checked "Ability Effect" but no dice. Finally, I changed Bronzong's ability to Heatproof, then tried no immunity, which worked. This is a rather round-about way of doing it.

"Edit" While I was typing this I read the first page and saw that you mentioned Mold Breaker being a problem, so I was wondering if you had made any progress with this? And from a programming standpoint, this sounds like a HUGE pain in the ass.
13. ### RBGTrying to get my Smods back D:

Joined:
Jan 27, 2008
Messages:
3,407
You could click the no Immunity button under "Options" for simplier way around.
14. ### DougJustDougKnows the great enthusiasmsCAP Leader

Joined:
Jun 26, 2007
Messages:
3,491
Read the Help for "Shared Options". Mold Breaker is mentioned specifically there, and it describes how to handle it.
15. ### VKCA(Virtual Circus Kareoky Act)

Joined:
Jan 8, 2009
Messages:
3,694
Hippopotas is listed twice in the list to select you're pokemon from.
edit: Actually it looks like every first form pokemon is listed twice. Is this intentional? It doesn't matter which one you select the moveset options are exactly the same.
16. ### Ray Jay"Jump first, ask questions later, oui oui!"

Joined:
May 20, 2010
Messages:
1,743
I was wondering if there's anyway to implement a Power Trick boost into the calculation. I played around with it a bit, and still couldn't get it. Is there a way around this, or does it need to be implemented?
17. ### TylerNo Longer Live

Joined:
Jan 22, 2009
Messages:
630
Calculating a Blizzard and a Grass Knot from the same Abomasnow against the same Palkia results in one damage higher for max for Grass Knot over Blizzard despite both being 120 bp stab attacks.

species=Abomasnow
ability=Snow Warning
nature=Quiet
heldItem=Focus Sash
level=50
attackEV=4
spAttackEV=252
speedEV=252
moveName=Grass Knot
---
species=Palkia
ability=Pressure
nature=Timid
heldItem=Haban Berry
level=50
hpEV=4

species=Abomasnow
ability=Snow Warning
nature=Quiet
heldItem=Focus Sash
level=50
attackEV=4
spAttackEV=252
speedEV=252
moveName=Blizzard
---
species=Palkia
ability=Pressure
nature=Timid
heldItem=Haban Berry
level=50
hpEV=4

Im guessing it has something to do with finding Grass Knot's base power.
18. ### DougJustDougKnows the great enthusiasmsCAP Leader

Joined:
Jun 26, 2007
Messages:
3,491
Palkia is Water/Dragon.

Blizzard is NVE on Water, then it is SE on Dragon.
Grass Knot is SE on Water, then it is NVE on Dragon.

Most people think both moves are neutral on Palkia. That's true enough for casual conversation, but it is not technically true. In the damage formula, both multipliers are applied in sequence, rounding down between each operation. In most cases, the two multipliers effectively "nullify" each other perfectly. But depending on the exact numbers involved in the calc, the two moves actually can have a very slight difference in the final damage, due to the order of the damage calc and the rounding applied between each step.

This is not a mistake or bug in the Damage Calculator. It is the correct implementation of the damage formula.