Pokemon Red, Blue, and Yellow - Damage Calculation
Damage Formula
int(int(int(2×L ÷ 5+2)×A×P ÷ D)/50)+2
where:
- L = Attacker's Level
- A = Attacker's current Attack/Special Attack value
- P = Attack's base damage
- D = Defender's current Defense/Special Defense
For physical attack types (Normal, Fighting, Flying, Poison, Ground, Rock, Bug, Ghost), use the Attack and Defense values. For special attack types (Fire, Water, Electric, Grass, Ice, Psychic, Dragon), use the Special Attack and Special Defense values.
Damage Calculation in Detail
- In internal battles, the badges have the appropriate stat multiplied by 9 and divided by 8.
- Stat stage modifying attacks modify the appropriate stat (Attack or Defense).
- If the attacker is burned, halve the Attack value.
- Selfdestruct and Explosion halve the opponent's Defense.
- If the Attack or Defense stat exceeds 255, both stats are equal to ((((X/2)%255)/2)%255). (The "%" means "modulo." X means Attack or Defense.)
- If the opponent had used Reflect, Defense equals ((Orig. value*2)/4) and Attack equals (Orig. value/4).
- If the opponent had used Light Screen, opponent's Special equals ((Orig. value*2)/4) and attacker's Special equals (Orig. value/4).
- If the Attack and/or Defense is 0, it becomes 1.
- Now calculate the damage using the formula above (except the +2 at the end).
- When the attack does a Critical Hit, the calculated damage is doubled.
- The damage calculated cannot exceed 997. If it does, the damage becomes 997.
- Add 2 to the calculated damage.
- If the attack type shares a type with one of the user's types, then the damage is multiplied by 1.5. (This is called Same Type Attack Bonus.)
- The damage calculated is multiplied by the number that is extracted based on the types of the attacker and the opponent (see the Battle Chart).
- Finally, in a process called "damage weighting", a random number from 217 through 255 is multiplied in the currently calculated damage, and divided by 255.
If the final damage is 768 or more, the damage is not weighted with a random number.
The badges that increase a Pokemon's stats in internal battles are the Boulder Badge (Attack), the Thunder Badge (Speed), the Soul Badge (Defense), and the Volcano Badge (Special).
Each time the attacker uses a stat stage increasing move, the respective stat increase from the badges is applied again; this is known as "stat bleeding".
Critical Hits
X = max(255,int(int(S/2)*N))
- S = Pokémon's base Speed
- N = Modifier: N starts at 1. If the attacker has used Focus Energy, divide N by 4.* If the attacker is using Karate Chop, Slash, Razor Leaf, or Crabhammer, multiply N by 8.
If a random number, from 0 to 255, is less than X, the attack is a critical hit.
Pokémon Gold and Silver uses a different Critical Hit formula.
* It is known that Focus Energy reduces the chances of a critical hit. This problem has been fixed in Stadium (in which N should be multiplied, instead of divided, by 4).
When an attack does a critical hit, multiply the level by 2 and use the attacker's and defender's original, unmodified stats for the damage formula.