Mechanic · rpg
Damage formula
The arithmetic that turns level, move power, and stats into damage, and the order of its modifiers.
On this page
A damage formula turns an attack into hit points lost. The atlas has read only the Pokémon disassemblies so far.
#Pokémon, Generations 1–3
Pokémon Red and Blue, Pokémon Crystal, and Pokémon Emerald apply STAB and type effectiveness to base damage, then the random factor1,2,3. Red/Blue’s base damage is , ≤997, +24. The random factor is ×217–255 / 2555 in Red/Blue and Crystal6, and ×85–100 / 1007 in Emerald.
Type also picks the stats: in all three games, a move’s type makes it physical or special8,9,10.
References
- ^In Red and Blue, a damaging move runs
CriticalHitTest,CalculateDamage(base formula),AdjustDamageForMoveType(STAB, then type rows),RandomizeDamage, and thenMoveHitTest(accuracy). T3pret/pokered · engine/battle/core.asm L3140–3150, L5531–5543 - ^A plain damaging move runs critical, damagestats, damagecalc (base formula, item boosts, and critical ×2), stab (weather, badges, STAB, and type rows), damagevariation, and then checkhit (accuracy). T3pret/pokecrystal · data/moves/effects.asm L5–14, engine/battle/effect_commands.asm L2983–3023
- ^A plain damaging move runs critcalc, damagecalc (base damage), typecalc (STAB, then type rows), and then adjustnormaldamage (random factor). T3pret/pokeemerald · data/battle_scripts_1.s L249–252
- ^
CalculateDamagecomputes , caps it at 997, and adds 2, so the type step receives 2–999. T3pret/pokered · engine/battle/core.asm L4343–4459 - ^
RandomizeDamagemultiplies damage by a random byte, 217–255, and integer-divides by 255, leaving 0 or 1 damage untouched. T3pret/pokered · engine/battle/core.asm L5420–5454, macros/data.asm L3 - ^The random factor is unchanged from Red/Blue, a random byte from 217 to 255 over 255. T3pret/pokecrystal · engine/battle/effect_commands.asm L1496–1544
- ^The random factor changes form: damage × (100 − rand % 16) / 100, i.e. 85–100 %, raised to 1 if that gives 0. T3pret/pokeemerald · src/battle_script_commands.c L1639–1651
- ^Type picks the stats: Fire, Water, Grass, Electric, Psychic, Ice, and Dragon (
SPECIALupward) use Special on both sides; the rest use Attack against Defense. T3pret/pokered · engine/battle/core.asm L4040–4042, constants/type_constants.asm L19–26 - ^Type still picks the stats: Steel is physical (below
SPECIAL); Dark is special, using Special Attack against Special Defense. T3pret/pokecrystal · engine/battle/effect_commands.asm L2543–2545, constants/type_constants.asm L9–35 - ^Type still decides physical or special in Emerald, by its position relative to
TYPE_MYSTERY. T3pret/pokeemerald · include/battle.h L466–467
Sources
Code
- pret contributors. 2026. “pokered: disassembly of Pokémon Red and Blue.” pret. Commit af51989. pret/pokered @ af51989 · licence, all uses
- pret contributors. 2026. “pokecrystal: disassembly of Pokémon Crystal.” pret. Commit 97187cd. pret/pokecrystal @ 97187cd · licence, all uses
- pret contributors. 2026. “pokeemerald: decompilation of Pokémon Emerald.” pret. Commit 731ad5b. pret/pokeemerald @ 731ad5b · licence, all uses