Author

Topic: Damage Tests of the NEW Damage Formula

Porcupine
Farting Nudist
Member # 46
Member Rated:

posted 05022000 09:54 PM
I've done some preliminary tests on the new BDF, from TeamPA. Please check my results if anyone has time. I'm quite sure formula works PERFECTLY for reasonable damages, and I tested it in the extreme cases where the attacks would do 1  4 damage because the attacking pokemon is pitifully weak. In all my tests, I used an attacking pokemon with 1 Attack and 1 Special, and a defending pokemon with 500 Defense and 500 Special. All pokemon are L100.1) Charizard using Bubble to hit Charizard  SUCCESS!!! Each time, the attack does EXACTLY 3 damage. I proceeded to hit with Bubble again and again, and on my 26th Bubble, it did 4 damage instead of 3. Then it did 3 damage again for some more Bubbles. This correlates EXACTLY with the new BDF...it illustrates that weird quirk I mention in the other BDF topic. According to new BDF, the damage should be: ((0 + 2) x 2) x Z / 255, where 217<=Z<=255, and the answer truncates the decimals The 0 is there because the attacking pokemon is so pathetically weak he does 0 damage in that part of the formula. This formula gives 4 damage when Z = 255, and 3 damage otherwise. Meaning that 97.4% of the time you get 3 damage, but the rest of the time you get 4 damage. 2) Parasect using Flamethrower to hit Charizard  FAILURE (the only failure of this formula I know of)
Each time, the attack did 1 damage. I did this attack about 10 times and it always did 1 damage. I do not know if doing this attack a hundred times would occasionally give 2 damage (how the BDF works), I didn't test. However, the new BDF says the damage should be ZERO most of the time, and 1 on that really rare occasion. ((0 + 2) x 0.5) x Z / 255 This gives 1 damage when Z = 255, and 0 damage otherwise. 3) Parasect using Vine Whip to hit Charizard  SUCCESS
The BDF says it should do 0 damage no matter what, even if Z = 255. I didn't do this enough times to make sure it never equals to 1 on that very rare occasion, but in about 20 Vine Whips it always did 0 damage. Note: when an attack does 0 damage in Pokemon it will say "The Attack Missed..." instead of showing it hit. Probably the new BDF needs some very minor correction or reinterpretation/refinement for this extreme case. I'll figure it out later.

From: Honolulu, HI, USA  Registered: Feb 2000
 IP: Logged




Porcupine
Farting Nudist
Member # 46
Member Rated:

posted 05032000 09:42 PM
I have done much more lowdamage testing on the new BDF. Here are the updated data and new data:2) Parasect using Flamethrower to hit Charizard  FAILURE (the only one so far) Same result as before, it always does 1 damage. In addition, I did this test 66 times, and it always did 1 damage. So POSSIBLY it will never do 2 or 0 damage, and thus is exempt from the "max damage quirk." 3) Parasect using Vine Whip to hit Charizard  SUCCESS
Still does 0 damage. In addition I did this test 55 times and it always did 0 damage. The BDF does say that for this one case, there should be no "max damage quirk." 4) Lickitung using Scratch to hit Charizard  SUCCESS
I did this attack about 10 times. 9 times I got 2 damage, and 1 time I got 3 damage. This agrees with the new BDF. I got lucky to see the RARE 3 damage so early. 5) Charizard using Scratch to hit Charizard  SUCCESS
Each time, the attack did 1 damage. This agrees with the new BDF. The BDF also says that 1/39th of the time I should get 2 damage from the "max damage quirk." After 73 scratches, I finally saw it do 2 damage once.  I can think of two ways to easily fix the BDF to show that one FAILURE. One, possibly how "Not Very Effective..." works in the formula is where the modifications need to be made. We could test for this by testing for the EXACT range of damages, for any attack of any damage, where the "Not Very Effective..." actually happens. No one tests for this stuff naturally. Two (the explanation I currently favor), there is a special case that occurs when determining Z (the randomness variable). Let's call the damage we calculate from the new BDF before doing the Z multiplication, MaxPossibleDamage. To determine Z, the game does, in pseudocode: if (MaxPossibleDamage > 1) then Z = random number between 217 and 255 otherwise Z = 255 Dunno why they would do this. If MaxPossibleDamage comes out to be 0 (my test case 3) whether you use this new code or just generate a random number anyway, makes no difference, you'll just get 0 always. 
From: Honolulu, HI, USA  Registered: Feb 2000
 IP: Logged


RagingTauros
Orangutan Spouse
Member # 340
Rate Member

posted 05032000 09:47 PM
So, What is the actual formula?
From: Belle Mead, NJ, USA  Registered: Apr 2000
 IP: Logged







White Cat
Nobody knows why I'm an admin.
Member # 42
Member Rated:

posted 05052000 01:48 AM
Is there a message board on Pojo.com where we can point out this "coincidence?" >:
From: Calgary  Registered: Feb 2000
 IP: Logged









Porcupine
Farting Nudist
Member # 46
Member Rated:

posted 05112000 04:48 PM
Gandalf exactly right. Also, all the divisons are integer divisions so you throw away the remainder. If you think about it, that means you'll only get the max possible damage of an attack when R = 255, which is a weird thing but I determined to be true experimentally.PA refers to a Japanese WWW site by someone (a group?) called TeamPA. katsura I wonder that question too. I think the answer is that the OLD formula WAS inaccurate. The New and Old formulas always agree with each other roughly (a few HP or so difference) but don't quite match up. In addition, the two formulas are totally incompatible. If one is right the other has to be wrong, and not even in a similar mathematical form. So, the strange thing that really bothers me is, why is the Old damage formula so much simpler and elegant looking than the New one, matches up with the New one to within a few HP, yet the programmers decided to use the New formula instead? 
From: Honolulu, HI, USA  Registered: Feb 2000
 IP: Logged



Porcupine
Farting Nudist
Member # 46
Member Rated:

posted 05122000 09:28 PM
That could be, White Cat. After all, through guessing we would be more likely to think up simple, elegant formulas, right?But, the fact that the old simple formula is SO close (to within 2 HP almost always), and even uses computerish numbers (128), is what bothers me. It's not even a close approximation, it's a SUPER close approximation. And wasn't that formula supposedly given out by Nintendo employees? (true or false, can anyone confirm this) Maybe what happened was, in the game design phase, they wrote down a simple formula which WAS the old damage formula. Then, as they were actually programming Pokemon, some (possibly foolish) programmers did it a slightly different way, which became the new damage formula. There's no reason I can see for the formula to be as complex as the new BDF...the old one would actually be faster, better, and simpler to program in I think. 
From: Honolulu, HI, USA  Registered: Feb 2000
 IP: Logged



Givera
Farting Nudist
Member # 234
Member Rated:

posted 05132000 05:53 PM
quote: Originally posted by Porcupine: NeoSyrex, a critical hit multiplies L by 2, not A. Same goes for Light Screen and Reflect (divides L by 2). Some of the damage tests I did show this. It rarely matters though, and at most makes a few points of HP difference.
So when stat modifiers come into play (E.G. Amnesia, Growth, Acid Armor, etc) Do they affect L before it's plugged into the formula or does it affect A and D?? I would think L to follow suit w/ Critical Hits but then nothing stops stats from going over 999... and if CH's are adjusted at L and stat modifiers at A/D then 1 Swords Dance or Amnesia could be better/worse than Focus Energy... Givera P.S.  If we know where Z is stored why don't you just use Game Shark and hack it to 255 for one attack and 217 for another??  "My staff is complaining about the rats in the kitchen; I want to hire a new staff" Lunchlady Doris on how to spend the School's oil money "If any punka** Charmander tries to mount my Koffing, I'll have Wiggly crack his spine and Lee will throw him in a vat of Psyduck Surf!" Mr. K on different species ability to breed "Heh.....ditto is a G** D*** pimp in g/s....he gets all the a**.." Argo on Ditto's ability to breed with anything/one "My Mewtwo's slower than yours because he just had his way with that cute eevee over there, and now he's tired" CFalcon making a pun on how sex (gender) affects stats [This message has been edited by Givera (edited 05132000).] [This message has been edited by Givera (edited 05132000).]
From: Plano, Tx  Registered: Apr 2000
 IP: Logged


Givera
Farting Nudist
Member # 234
Member Rated:

posted 05182000 06:40 PM
quote: Originally posted by Porcupine: That could be, White Cat. After all, through guessing we would be more likely to think up simple, elegant formulas, right?But, the fact that the old simple formula is SO close (to within 2 HP almost always), and even uses computerish numbers (128), is what bothers me. It's not even a close approximation, it's a SUPER close approximation. . . .
If you really look at the two formulas they are almost identical... Here's the old one (BTW  I'm only comparing the CORE of the two formulas at the moment): [(ABLF/D128E) + 1] A = attacker's Attack stat (or Special) B = base damage for the move L = attacker's Level F = offensive stat modifier D = defender's Defense stat (or Special) E = defensive stat modifier Now let's simplify A*F and D*E into Atk and Def (Respectively) because we now it's plugged in prior to the calculation (I'm also going to rename L to Lvl and B to Pwr)... here's the "New" OLD formula: [((Atk * Pwr * Lvl)/(128*Def)) + 1] Atk = attacker's Attack stat (or Special) * offensive stat modifier Pwr = base damage for the move Lvl = attacker's Level Def = defender's Defense stat (or Special Finally let's multiply by 1.09 so that it's at the max to match the NEW formula (The NEW formula is already at the max) here it is (I rounded everything down...): [((Atk * Pwr * Lvl)/(117*Def)) + 1] Now doesn't that look familiar? Let's look at the NEW formula... (((2L/5+2)*A*P/D)/50)+2 L = level A = attack or special P = ability's power D = defense or special Now I was simpifying the formula after I finished my exam today and it started to look VERY similar to the "New" OLD formula... ((Pwr * Atk * (Lvl + 5))/(125 * Def))+2 Now if we compare that to the "New" OLD formula the only differences are you add 5 to the Level before multiplying, 117 instead of 125 and you add 2 not 1 to the end... VERY CLOSE! (The differences SORT OF cancel out...) Now both formulas BASICLY use the same STAB and Effectiveness formulas (Except the NEW one truncates every operation where as the OLD one truncates only at the end...) Finally is the matter of a random variance to the damage... the OLD formula says to multiply by 1.09 for the max and divide by 1.09 for the min while the NEW is already at the max and you just multiply by 217/255 to get the min... let's TRY to compare these... now we've (Well I have at least ) decided the two simplified formulas are very similar so ... (How do I explain this?? :confused since they're both at the max we don't need to compare that but we DO need to compare the minimums... Since the OLD formula was multiplied by 1.09 we need to divide by that then divide by 1.09 AGAIN to get the minimum which is 84.16% (1/1.1881) while 217/255 is 85.09% (217/255) again VERY similar... So we (Again at least *I*) can understand why they match up so well... WHEW I'm glad that post is done... (WOW! AOL didn't crash once the whole time!! ) Givera  "My staff is complaining about the rats in the kitchen; I want to hire a new staff" Lunchlady Doris on how to spend the School's oil money "If any punka** Charmander tries to mount my Koffing, I'll have Wiggly crack his spine and Lee will throw him in a vat of Psyduck Surf!" Mr. K on different species ability to breed "Heh.....ditto is a G** D*** pimp in g/s....he gets all the a**.." Argo on Ditto's ability to breed with anything/one "My Mewtwo's slower than yours because he just had his way with that cute eevee over there, and now he's tired" CFalcon making a pun on how sex (gender) affects stats [This message has been edited by Givera (edited 05182000).] [This message has been edited by Givera (edited 05182000).] [This message has been edited by Givera (edited 05192000).]
From: Plano, Tx  Registered: Apr 2000
 IP: Logged







