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
I spat out random numbers from frame 2 of the seed (Crit->Damage), and added 85 to the calc shown above.
I also did the same, but instead spat out numbers 85-100 with the article's method.
This only has to make sense for me. (It shows that the higher the number, the less damage it deals). Going back to my calc (before the +85), the lower the number, the more damage it deals.
Code:
Initial Seed
D196918F998EDAF9
Deerling attacks! Breloom
33 Atk 1 Defense
26 SpA 999 HP
Faint Attack used. Revive used (to no effect).
CBC8A8D6B8DE8B26 ==> 89 for both
790 HP Remained
B4DC555B11814400 ==> 90 for both
792 HP Remained
D196918F998EDAF9 ==> 92 for both
796 HP Remained
7D674084F18A72C3 ==> 100 for both
814 HP Remained
923DDE8F 3EA5A594 ==> 97 for both
807 HP Remained
# Theory Tested
89 790
90 792
91 794
92 796
93 799
94 801
95 803
96 805
97 807
98 810
99 812
100 814
64CCFE6D DE74DAC1 ==> 91 on mine, 90 on "DP"
794 HP Remained