Smogon Community [on site] The Complete Damage Formula for Diamond & Pearl
 Register FAQ Social Groups Calendar Search Today's Posts Mark Forums Read

Dec 23rd, 2008, 5:29:28 PM   #151
MetalKid

Join Date: Aug 2005
Posts: 226
Green Bay, Wisconsin

Quote:
 Originally Posted by Fat RB Golbat You floor after every operation.
Damage Formula = (((((((Level × 2 ÷ 5) + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def) × Mod1) + 2) ×
CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3

You would floor after each call, like BasePower, Att/def stat, etc... You would not floor within something like BasePower during

BasePower = HH × BP × IT × CHG × MS × WS × UA × FA
right? It would make no sense here because if you did Helping Hand, which is 1.5 and floored that, it would always be 1.0, resulting in no bonus ever.

Thus, when you look at this:

[Sp]Def = Stat × SM × Mod × SX

It mentions that: If there are two simultaneous boosts in Mod, first apply the ability boost, then the item boost, and finally the Sandstorm boost.

However, you would multiply everything out in for that Mod, returning the result, without flooring, then calculate the total stat (no flooring inside), and when you finally return the result for the def stat, you would floor right before it. Right?
__________________
MetalKid's Gaming Resources
http://www.metalkid.info

Last edited by MetalKid; Dec 23rd, 2008 at 5:32:47 PM.

Dec 23rd, 2008, 5:52:56 PM   #152
RBG*
It's only after we've lost everything that we're free to do anything.

Super Moderator
Join Date: Jan 2008
Posts: 3,230
Home: Goshen Scout Reservation

Quote:
 Originally Posted by Fat MetalKid Damage Formula = (((((((Level × 2 ÷ 5) + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def) × Mod1) + 2) × CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3 You would floor after each call, like BasePower, Att/def stat, etc... You would not floor within something like BasePower during BasePower = HH × BP × IT × CHG × MS × WS × UA × FA right? It would make no sense here because if you did Helping Hand, which is 1.5 and floored that, it would always be 1.0, resulting in no bonus ever. Thus, when you look at this: [Sp]Def = Stat × SM × Mod × SX It mentions that: If there are two simultaneous boosts in Mod, first apply the ability boost, then the item boost, and finally the Sandstorm boost. However, you would multiply everything out in for that Mod, returning the result, without flooring, then calculate the total stat (no flooring inside), and when you finally return the result for the def stat, you would floor right before it. Right?
The Mods are just there so the formula isn't longer and biigeer than it has to look.

Quote:
 Originally Posted by Fat Damage Formula Article It should be immediately mentioned that after successfully performing an operator (an operator being +, -, × or ÷), you need to "round down" the number to the nearest whole number before performing the next one. In simple terms, this means to remove all the numbers to the right of the decimal point every time the answer is a decimal before proceeding with the next arithmetic operation.
__________________
Alder: N, even if we don't understand each other, that's not a reason to reject each other. There are two sides to an argument. Is there one point of view that has all the answers? Give it some thought.

 Dec 23rd, 2008, 6:09:13 PM #153 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin Oh, I see... I would floor (helping hand * base power) then take that result and multiply by the item, flooring that result, etc. Right? __________________ MetalKid's Gaming Resources http://www.metalkid.info
 Dec 23rd, 2008, 6:12:48 PM #154 RBG* It's only after we've lost everything that we're free to do anything.     Super Moderator Join Date: Jan 2008 Posts: 3,230 Home: Goshen Scout Reservation Exactly __________________ Alder: N, even if we don't understand each other, that's not a reason to reject each other. There are two sides to an argument. Is there one point of view that has all the answers? Give it some thought.
 Dec 27th, 2008, 12:39:09 PM #155 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin The move Me First looks like it makes things very complicated. When figuring out the bonuses of things like Ability and Item modifiers for various parts of the formula, should Me First be used or should the Defending Pokemon's attack be used instead? Thanks! For example, Me First is a Normal move... If the opponent used Bite, which is Dark, and Absol used Me First, would the move now get STAB, too? __________________ MetalKid's Gaming Resources http://www.metalkid.info Last edited by MetalKid; Dec 27th, 2008 at 12:41:51 PM.
Dec 27th, 2008, 1:00:31 PM   #156
X-Act
np: Biffy Clyro - Shock Shock

Join Date: Feb 2006
Posts: 4,679
Malta

Quote:
 Originally Posted by Fat MetalKid The move Me First looks like it makes things very complicated. When figuring out the bonuses of things like Ability and Item modifiers for various parts of the formula, should Me First be used or should the Defending Pokemon's attack be used instead? Thanks! For example, Me First is a Normal move... If the opponent used Bite, which is Dark, and Absol used Me First, would the move now get STAB, too?
Yes, it would. The on battle text would go something like this:

Lucario used Me First!
Lucario used Hammer Arm!
It's super effective!
Lucario's Speed fell!
Rhydon fainted!

Hence it's as if Lucario used the move Hammer Arm with x1.5 power, with the speed drop and all. Since Lucario is a Fighting-type Pokemon, it boosts the move also due to STAB. So it gets a x1.5 boost due to STAB and a x1.5 boost due to Me First.
__________________
http://users.smogon.com/X-Act

For all your Pokemon needs (and more!) including: the Defensive EVs applet, the Probabilities of Breeding IVs in Pokemon applet, and the Ratings of Pokemon Base Stats applet (now Version 2.0!). And also the IV to PID applet!

 Dec 27th, 2008, 1:31:47 PM #157 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin Holy crap... That makes my programming even harder now... Dammit... Oh wait, I can just put a checkbox in to say that you used that move instead, which just gives the 1.5x bonus automatically. Hey, I'm getting close to finishing the code up for this thing... Are there some situations you have for the damage it causes so I have something to test against? Thanks! Edit: It looks like you are missing a few things when it comes to abilities. You never mentioned how to apply any of these abilities: Levitate Volt Absorb Water Absorb Motor Drive I don't remember exactly, but I thought there was something that overrides the Levitate ability? I would assume, though, that these are supposed to be applied during the Mod3 phase? __________________ MetalKid's Gaming Resources http://www.metalkid.info Last edited by MetalKid; Dec 27th, 2008 at 9:11:37 PM.
 Dec 28th, 2008, 5:19:25 AM #158 X-Act np: Biffy Clyro - Shock Shock     Join Date: Feb 2006 Posts: 4,679 Malta Gravity overrides Levitate ability, but it also overrides the Flying typing. Those 4 abilities would negate damage completely for Ground, Electric, Water, and Electric moves respectively. __________________ http://users.smogon.com/X-Act For all your Pokemon needs (and more!) including: the Defensive EVs applet, the Probabilities of Breeding IVs in Pokemon applet, and the Ratings of Pokemon Base Stats applet (now Version 2.0!). And also the IV to PID applet!
 Dec 28th, 2008, 12:28:54 PM #159 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin Forgot to mention Wonder Guard, the Type changing plates of Arceus, Air Lock & Cloude Nine override weather, Battle Armor negates Critical Hits, etc... Lots of abilties affect the damage dealt, but they are not metioned... Is this on purpose? __________________ MetalKid's Gaming Resources http://www.metalkid.info Last edited by MetalKid; Dec 28th, 2008 at 12:40:34 PM.
 Dec 29th, 2008, 5:45:26 AM #160 X-Act np: Biffy Clyro - Shock Shock     Join Date: Feb 2006 Posts: 4,679 Malta Well, if they override things, you just don't multiply or multiply the relevant thing? Why should they be mentioned? __________________ http://users.smogon.com/X-Act For all your Pokemon needs (and more!) including: the Defensive EVs applet, the Probabilities of Breeding IVs in Pokemon applet, and the Ratings of Pokemon Base Stats applet (now Version 2.0!). And also the IV to PID applet!
 Dec 29th, 2008, 4:08:55 PM #161 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin If they aren't mentioned, people who are trying to apply the formula are not going to know about those things that automatically override everything unless they specifically look for them on their own. __________________ MetalKid's Gaming Resources http://www.metalkid.info
 Jan 4th, 2009, 5:46:55 PM #162 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin (Since no one responded, I can't edit or no one will respond) Where would Intimidate get placed in the order of things? During the Ability Modifier? If so, would it come before or after the Attacker's Ability? Thanks! __________________ MetalKid's Gaming Resources http://www.metalkid.info
Jan 4th, 2009, 7:31:11 PM   #163
RBG*
It's only after we've lost everything that we're free to do anything.

Super Moderator
Join Date: Jan 2008
Posts: 3,230
Home: Goshen Scout Reservation

Quote:
 Originally Posted by Fat MetalKid (Since no one responded, I can't edit or no one will respond) Where would Intimidate get placed in the order of things? During the Ability Modifier? If so, would it come before or after the Attacker's Ability? Thanks!
Intimidate is a stat modifier, so it falls in the -1, -2, -3 ect for attack
__________________
Alder: N, even if we don't understand each other, that's not a reason to reject each other. There are two sides to an argument. Is there one point of view that has all the answers? Give it some thought.

 Jan 4th, 2009, 11:18:14 PM #164 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin Oh my god, I feel stupid... Thanks... __________________ MetalKid's Gaming Resources http://www.metalkid.info
 Mar 6th, 2009, 6:25:24 PM #165 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin I have a question on the move Me First. It says that it uses the opponent's move... If that is the case, should the base attack power be calculated based on the Opponent's move instead of Me First's AP? Me first is not mentioned in Section 2. Thanks! Edit: Also, when applying effectiveness, do I use Me First's type or the attacker's move type? Thanks! Last edited by MetalKid; Mar 6th, 2009 at 6:56:25 PM.
Mar 7th, 2009, 1:00:07 AM   #166
Archer

Join Date: Dec 2007
Posts: 101

Quote:
 Originally Posted by Fat hhjj Also, does Rain and Sunlight provide the additional 1.5x boost? Edit: I remember testing this with Smeargle in Netbattle (Eruption VS Weather Ball under Sunny Day), and found that Eruption did more Power in the Sunlight. So I guess, Sunny Day and Rain Dance do not provide an additional 1.5x boost, but then again, that was for the ADV Generation. I can't test the DPP gen. due to Shoddy/NBS not working for me. It may be a good idea to provide this information.
Eruption is 150 Power at full health, whereas Weather Ball is 100.
So if they have the same type, and get the weather boost...

150*1.5 > 100*1.5, no?

 Mar 20th, 2009, 6:17:54 PM #167 david stone Fast-moving, smart, sexy and alarming.     Join Date: Aug 2005 Posts: 5,152 Moreover, you can never use Netbattle / Shoddybattle to test things. The developers don't have any extra information we don't have; in fact, they often use Smogon's dexes to find how to code things. __________________ Previously obi. Technical Machine, a Pokemon AI. "Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat." - Sun Tzu
 Apr 13th, 2009, 11:12:46 PM #168 MetalKid     Join Date: Aug 2005 Posts: 226 Green Bay, Wisconsin Which ability will end up taking precedence? Wonder Guard or Mold Breaker? Would Mold Breaker cause Wonder Guard to not function? Thanks!
Apr 13th, 2009, 11:16:16 PM   #169
Veedrock

Join Date: Oct 2008
Posts: 2,777
Location: Alaska, USA Occupation: Gamer Gamerscore: 84319

Mold Breaker negates Wonder Guard.

Quote:
 Originally Posted by Fat Mold Breaker Page If this Pokémon attacks and the target's ability would prevent the effects of the attack from taking place, or hinder the effects of the move, the ability is temporarily nullified while the attack is in progress. Abilities nullified are: Battle Armor, Clear Body, Damp, Dry Skin, Filter, Flash Fire, Flower Gift, Heatproof, Hyper Cutter, Immunity, Inner Focus, Insomnia, Keen Eye, Leaf Guard, Levitate, Lightningrod, Limber, Magma Armor, Marvel Scale, Motor Drive, Oblivious, Own Tempo, Sand Veil, Shell Armor, Shield Dust, Simple, Snow Cloak, Solid Rock, Soundproof, Sticky Hold, Storm Drain, Sturdy, Suction Cups, Tangled Feet, Thick Fat, Unaware, Vital Spirit, Volt Absorb, Water Absorb, Water Veil, White Smoke, Wonder Guard. Dry Skin's increase in damage when hit by a Fire move is also ignored.
Also from Shedinja's analysis:

Quote:
 Originally Posted by Fat Shedinja's Analysis Let’s go through the complete list of everything that can kill Shedinja. Fire / Flying / Dark / Ghost / Rock moves, non-Fighting / Normal attacks from a Mold Breaker Pokémon, Poison, Burn, Leech Seed, Confusion damage, Sandstorm, Hail, Spikes / Stealth Rock, Nightmare, Darkrai’s Bad Dreams, Life Orb recoil, Double-Edge recoil, Struggle, Struggle recoil, Destiny Bond, Perish Song, Aftermath, Rough Skin, Future Sight / Doom Desire, Ghost-type Curse, Jaboca/Rowap Berry recoil, and absorbing health against a Pokémon with Liquid Ooze.
__________________
Now playing: Minecraft, Street Fighter x Tekken

Smogon Community