- Thread starter X-Act
- Start date

Damage Formula = (((((((Level × 2 ÷ 5) + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def) × Mod1) + 2) × CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3

Damage Formula = ((Level × 2 ÷ 5 + 2) × BasePower × [Sp]Atk ÷ 50 ÷ [Sp]Def × Mod1 + 2) × CH × Mod2 × R ÷ 100 × STAB × Type1 × Type2 × Mod3

I don't really think they add anything except a lot of arbitrary nesting. Feel free to disagree.

The reason why I added all those brackets is because the answer should be rounded down after performing any division, so I decided to add a pair of brackets for every division that is performed to emphasize this fact(although, admittedly, the bracket following Mod1 is redundant). I could have maybe said in the guide that every division operator performs integer division and not normal division and would have ended up with what you wrote, but I thought that not too many Smogoners are familiar with the concept of 'integer division', so I wrote it that way. (For example, I'm sure that STAB is actually performed by multiplying by 3 and then integer dividing by 2... but that would confuse a few people so I stuck with x1.5 and then rounding down.)

Bottom line - I think the following way has not too many brackets while still explaining what I said above:

Damage Formula = ((((Level × 2 ÷ 5 + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def × Mod1 + 2) × CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3

This way, I'd have a bracket around each division sign.

Damage=((((((((((((((((level * 2 / 5 + 2) * power * atk / 50) / def) / BRN) / RL) * TVT) * weather) * FF + 2) * CH * ITM) * TL * MF) * (R * 100 / 255) / 100) * STAB) * Type1) * Type2) * AEM) * IEM)

level = Attacker's level

power = Power of the move

atk = Attacking stat

def = Defending stat

BRN = Whether the attacker is Burned

RL = Reflect / Light Screen

TVT = 2v2 modifier

weather = Sunny Day / Rain Dance

FF = Flash Fire

CH = Critical Hit

ITM = Life Orb or Metronome

TL = Tinted Lens

MF = Me First

R = Random integer between 217 and 255 inclusive

STAB = STAB (heh)

Type1 = Effectiveness of first type

Type2 = Effectiveness of second type

AEM = Ability Effectiveness Modifier (Solid Rock and Filter, but excluding Tinted Lens)

IEM = Item Effectiveness Modifier (for instance, Expert Belt or Chople Berry)

Round down after each set of parentheses

What is the order of the defense modifiers? For instance, if you Skill Swap Marvel Scale a Ditto and get it statused, which comes first? Same for Camouflaging / Color Changing / whatever Lati@s into a Rock type during a Sandstorm and similar situations.

/edit: I left out the 2v2 modifier

About the other question, the only reason this would matter is for Deepseascale Clamperl, since all the other defense modifiers are x1.5, and hence the order of the multiplication doesn't make a difference. Quoting from the guide, if there are two simultaneous boosts in Mod, first apply the ability boost, and then the item boost. Sandstorm's multiplier position is thus the only one we are not sure of.

Frankly, after around 1 and a half months testing relentlessly, me and Peterko got bored of it. When we asked for help at around last August, we didn't get any. We were extremely disappointed because of that. I don't really know why nobody offered to do anything to help. Maybe they saw it as boring? (It sure as hell is.) Maybe they saw it as useless? (It sure as hell ISN'T.) Seeing all this lethargy, we decided to stop giving a fuck and just release the damage formula with what we knew, which proved to be extremely accurate anyway, but not 100%.

To give you an idea, it took us around three hours to confirm where the Me First multiplier is. During that time, all that Peterko did is attack every Pokemon he could with Me First. At one point, Peterko told me "this is the very last Pokemon I'm going to hit with Me First". Lo and behold, the damage he did there proved to be the one we needed to find the whereabouts of the Me First multiplier.

I don't know why Peterko wanted to research the damage formula perfectly, but, speaking for myself, I did it so that Competitor would be perfect in its damage calculation. When you calculate damage roughly, you can go wrong by 1% and it wouldn't matter, but for Competitor it's a completely different story. I really don't want to be OHKOed when really I should have survived, and vice-versa. To be even more perfect, I even suggested once that we implement the Pokemon games' RNG for accuracy checking and the damage generation, but the suggestion wasn't upheld.

You might have noticed that I never tested anything else from my DS from last August till now. I just thought "if they want to find out about their ability/move/damage/whatever, just let them find it themselves if they REALLY want the answer to it." I was so disappointed, and still am.

Anyway, I didn't vent this frustration at anyone in particular. I just wanted to spit this out of my mouth so that everyone knows what happened.

Is this all the remains to be tested? It's all I've found so far. I haven't finished checking through the whole thing for ambiguity yet, so there may still be something as obscure as the DeepSeaScale + Rock type + Sandstorm modifier order.

Many thanks to X-Act and Peterko for relentlessly pursuing as accurate a formula as they could; it has helped me a lot :)

I wish I had a DS so I could help you test, but I don't, so all I can do is make this a shout out to how useful your efforts have been.

Thanks again.

EDIT: OK, so I actually have a question regarding Dual Types and the Type 1 and Type 2. Let's take Bronzong for example. I calculate that the range for an attack on Bronzong is 87-103, and then I get to the Type 1 part. The attack is a Ghost type; is Type 1 Steel or Psychic? If it is Steel, my range goes from 87-103 to 86-102, because 87 * .5 = 43.5 or 43, and 43*2 = 86. However, if Type 1 is Psychic then it is still 87-103. I can't find this in the post, I apologize if you have it in there >_<

Damage = (((((((((((((((((level * 2 / 5 + 2) * power * atk / 50) / def) / BRN) / RL) * weather) * FF + 2) * CH * item) * TL * MF) * (R * 100 / 255)) / 100) * STAB) * Type1) * Type2) * AEM) * EB) / RB)

Where

power = move's power

atk = attacking stat

def = defending stat

BRN = burn modifier

RL = Reflect / Light Screen

weather = weather modifier

FF = Flash Fire

CH = Critical Hit

item = Life Orb or Metronome

TL = Tinted Lens

MF = Me First

R = random number between 217 and 255, inclusive

STAB = Same-Type Attack Bonus (STAB)

Type1 = effectiveness on the defender's first type

Type2 = effectiveness on the defender's second type

AEM = Ability Effectiveness Multiplier (Solid Rock, Filter)

EB = Expert Belt

RB = Resistance Berries (including Chilan Berry, the "Normal resist" Berry)

All parenthesis are optional if you just follow as the guide says and round down after each step, except those surrounding the random number portion. You need to round the random portion to get a number between 85 and 100, then multiply that by the previous number and divide by 100 (and round down). Other than that, it's rounded in the order it's written.

I was going to HTMLise this but Obi said he would, so I didn't. I wouldn't mind if ryubahamut did the HTMLising though.

You can also do it as Obi says, but I preferred using Mod1, Mod2 and Mod3 to simplify the equation slightly.