Thread: RNG Research
View Single Post
Old Aug 5th, 2011, 12:23:04 AM   #772
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

BW Battle RNG p6

Code:
Damage Random Value / Damage Variation
R = ((SEED>>32)*16>>32 == (0-15)

Inversely related to 85-100, 
  whereas 0 --> 100% damage
  and    15 -->  85% damage
This is not what the onsite article says about battle damage chances. Even though it was written for D/P, I find it difficult to believe this aspect of the article to be correct.

Gen 3's Damage Random Value was calculated as follows, which is documented by FractalFusion here.
Code:
In battle: Damage variation
For almost all attacks, the amount of damage that an attack does varies
between about 85% and 100%. The game determines damage variation 
three frames after it checks for critical hit.
When the game rolls for damage variation, the game will cycle the 
RNG 3 times on that frame.

  xxxxxxxx
  xxxxxxxx
  xxxaxxxx    Damage variation, max: a==0   min: a==15
The lower the number, the more damage the attack does.
my test pad

Last edited by Kaphotics; Aug 5th, 2011 at 12:48:07 AM.
Kaphotics is offline   Reply With Quote