data/claims/pokecrystal.yamlPokémon Crystal (pret/pokecrystal)
Game: Pokémon Crystal. Concept: Type effectiveness.
Crystal's type chart has 108 non-neutral rows over 17 types, then a -2 marker, Normal→Ghost and Fighting→Ghost ×0, and a -1 end. pokecrystal/type-chart
Value
{
"kind": "type-chart",
"types": [
"Normal",
"Fighting",
"Flying",
"Poison",
"Ground",
"Rock",
"Bug",
"Ghost",
"Steel",
"Fire",
"Water",
"Grass",
"Electric",
"Psychic",
"Ice",
"Dragon",
"Dark"
],
"matchups": [
[
"Normal",
"Rock",
5,
3
],
[
"Normal",
"Steel",
5,
4
],
[
"Fire",
"Fire",
5,
5
],
[
"Fire",
"Water",
5,
6
],
[
"Fire",
"Grass",
20,
7
],
[
"Fire",
"Ice",
20,
8
],
[
"Fire",
"Bug",
20,
9
],
[
"Fire",
"Rock",
5,
10
],
[
"Fire",
"Dragon",
5,
11
],
[
"Fire",
"Steel",
20,
12
],
[
"Water",
"Fire",
20,
13
],
[
"Water",
"Water",
5,
14
],
[
"Water",
"Grass",
5,
15
],
[
"Water",
"Ground",
20,
16
],
[
"Water",
"Rock",
20,
17
],
[
"Water",
"Dragon",
5,
18
],
[
"Electric",
"Water",
20,
19
],
[
"Electric",
"Electric",
5,
20
],
[
"Electric",
"Grass",
5,
21
],
[
"Electric",
"Ground",
0,
22
],
[
"Electric",
"Flying",
20,
23
],
[
"Electric",
"Dragon",
5,
24
],
[
"Grass",
"Fire",
5,
25
],
[
"Grass",
"Water",
20,
26
],
[
"Grass",
"Grass",
5,
27
],
[
"Grass",
"Poison",
5,
28
],
[
"Grass",
"Ground",
20,
29
],
[
"Grass",
"Flying",
5,
30
],
[
"Grass",
"Bug",
5,
31
],
[
"Grass",
"Rock",
20,
32
],
[
"Grass",
"Dragon",
5,
33
],
[
"Grass",
"Steel",
5,
34
],
[
"Ice",
"Water",
5,
35
],
[
"Ice",
"Grass",
20,
36
],
[
"Ice",
"Ice",
5,
37
],
[
"Ice",
"Ground",
20,
38
],
[
"Ice",
"Flying",
20,
39
],
[
"Ice",
"Dragon",
20,
40
],
[
"Ice",
"Steel",
5,
41
],
[
"Ice",
"Fire",
5,
42
],
[
"Fighting",
"Normal",
20,
43
],
[
"Fighting",
"Ice",
20,
44
],
[
"Fighting",
"Poison",
5,
45
],
[
"Fighting",
"Flying",
5,
46
],
[
"Fighting",
"Psychic",
5,
47
],
[
"Fighting",
"Bug",
5,
48
],
[
"Fighting",
"Rock",
20,
49
],
[
"Fighting",
"Dark",
20,
50
],
[
"Fighting",
"Steel",
20,
51
],
[
"Poison",
"Grass",
20,
52
],
[
"Poison",
"Poison",
5,
53
],
[
"Poison",
"Ground",
5,
54
],
[
"Poison",
"Rock",
5,
55
],
[
"Poison",
"Ghost",
5,
56
],
[
"Poison",
"Steel",
0,
57
],
[
"Ground",
"Fire",
20,
58
],
[
"Ground",
"Electric",
20,
59
],
[
"Ground",
"Grass",
5,
60
],
[
"Ground",
"Poison",
20,
61
],
[
"Ground",
"Flying",
0,
62
],
[
"Ground",
"Bug",
5,
63
],
[
"Ground",
"Rock",
20,
64
],
[
"Ground",
"Steel",
20,
65
],
[
"Flying",
"Electric",
5,
66
],
[
"Flying",
"Grass",
20,
67
],
[
"Flying",
"Fighting",
20,
68
],
[
"Flying",
"Bug",
20,
69
],
[
"Flying",
"Rock",
5,
70
],
[
"Flying",
"Steel",
5,
71
],
[
"Psychic",
"Fighting",
20,
72
],
[
"Psychic",
"Poison",
20,
73
],
[
"Psychic",
"Psychic",
5,
74
],
[
"Psychic",
"Dark",
0,
75
],
[
"Psychic",
"Steel",
5,
76
],
[
"Bug",
"Fire",
5,
77
],
[
"Bug",
"Grass",
20,
78
],
[
"Bug",
"Fighting",
5,
79
],
[
"Bug",
"Poison",
5,
80
],
[
"Bug",
"Flying",
5,
81
],
[
"Bug",
"Psychic",
20,
82
],
[
"Bug",
"Ghost",
5,
83
],
[
"Bug",
"Dark",
20,
84
],
[
"Bug",
"Steel",
5,
85
],
[
"Rock",
"Fire",
20,
86
],
[
"Rock",
"Ice",
20,
87
],
[
"Rock",
"Fighting",
5,
88
],
[
"Rock",
"Ground",
5,
89
],
[
"Rock",
"Flying",
20,
90
],
[
"Rock",
"Bug",
20,
91
],
[
"Rock",
"Steel",
5,
92
],
[
"Ghost",
"Normal",
0,
93
],
[
"Ghost",
"Psychic",
20,
94
],
[
"Ghost",
"Dark",
5,
95
],
[
"Ghost",
"Steel",
5,
96
],
[
"Ghost",
"Ghost",
20,
97
],
[
"Dragon",
"Dragon",
20,
98
],
[
"Dragon",
"Steel",
5,
99
],
[
"Dark",
"Fighting",
5,
100
],
[
"Dark",
"Psychic",
20,
101
],
[
"Dark",
"Ghost",
20,
102
],
[
"Dark",
"Dark",
5,
103
],
[
"Dark",
"Steel",
5,
104
],
[
"Steel",
"Fire",
5,
105
],
[
"Steel",
"Water",
5,
106
],
[
"Steel",
"Electric",
5,
107
],
[
"Steel",
"Ice",
20,
108
],
[
"Steel",
"Rock",
20,
109
],
[
"Steel",
"Steel",
5,
110
]
],
"foresightOnly": [
[
"Normal",
"Ghost",
0,
115
],
[
"Fighting",
"Ghost",
0,
116
]
],
"foresightMarkerLine": 112
}data/types/type_matchups.asm#L1-L118 db -2 ; end (with Foresight)
; Foresight removes Ghost's immunities.
db NORMAL, GHOST, NO_EFFECT
db FIGHTING, GHOST, NO_EFFECTpokecrystal: disassembly of Pokémon Crystal · constants/type_constants.asm#L7-L37 — type order used for `types` (constants that appear in at least one row)Checked by claude-agent, 2026-10-20 — read every row of data/types/type_matchups.asm L1–L118 and the type constants at the pinned commit; probes/pokemon-types/type-charts.mjs re-parses the table and diffs it against this valueChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Rows are [attacking, defending, stored multiplier, line]; foresightOnly holds the rows after the -2 marker (pokecrystal/foresight).
Cited by: Pokémon Crystal, Type effectiveness
Multipliers are unchanged from Red/Blue: scaled by 10, with 20 for “super effective”, 05 for “not very effective”, 00 for no effect, and 10 for effective. pokecrystal/multiplier-encoding
Value: kind multiplier-encoding · neutral 10 · super 20 · not very 5 · none 0
Codepokecrystal: disassembly of Pokémon Crystal ·constants/battle_constants.asm#L20-L25; type effectiveness factors, scaled by 10
DEF SUPER_EFFECTIVE EQU 20Checked by claude-agent, 2026-10-20 — read the constants at the pinned commitChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Cited by: Pokémon Crystal, Type effectiveness
Crystal's type constants add Steel (physical), Dark (special), and an unused curse type named “???”; the Bird type remains, still with no rows. pokecrystal/new-types
constants/type_constants.asm#L9-L37 const STEEL
…
const CURSE_TYPE
…
const DARKpokecrystal: disassembly of Pokémon Crystal · data/types/names.asm#L37CurseType: db "???@"Checked by claude-agent, 2026-10-20 — read the constants and names; the probe lists the type constants with no table rows (Bird, Curse)Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Probe: probes/pokemon-types/type-charts.mjsCited by: Pokémon Crystal, Type effectiveness
The STAB battle command applies weather and badge type boosts, then STAB ( if either attacker type matches), then the type chart. pokecrystal/stab
About: Pokémon Crystal Same-type attack bonus
Value: kind stab · form half-add
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L1251-L1288 farcall DoWeatherModifiers
…
farcall DoBadgeTypeBoosts
…
srl b
rr c
add hl, bcChecked by claude-agent, 2026-10-20 — read BattleCommand_Stab L1214–L1396 at the pinned commitChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Cited by: Pokémon Crystal, Same-type attack bonus, Type effectiveness
A comment in pokecrystal's STAB battle command expands STAB as “Same Type Attack Bonus”. pokecrystal/stab-name
About: Pokémon Crystal Same-type attack bonus
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L1214-L1215BattleCommand_Stab:
; STAB = Same Type Attack BonusChecked by claude, 2026-10-20 — read the routine's first lines at the pinned commitChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.The comment is the disassemblers', not the game's. No source here says who coined the term.
Cited by: Same-type attack bonus
Struggle returns from the STAB battle command at once, so it skips weather, badge boosts, STAB, and the type chart. pokecrystal/struggle-skips
engine/battle/effect_commands.asm#L1216-L1219 ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
cp STRUGGLE
ret zChecked by claude-agent, 2026-10-20 — read the routine entryChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Cited by: Same-type attack bonus, Type effectiveness
Each type chart row matching the move's type and either defender type computes ; a nonzero product becomes , raised to 1 if that truncates to 0, and a zero product stays 0. pokecrystal/type-step
Value: kind type-step · div 10 · zero min1 · immune miss
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L1291-L1379 — b is the move's type and d, e the defender's two types (set at L1221–L1241); a zero product skips the divide, and only a zero quotient is raised to 1 ld a, BATTLE_VARS_MOVE_TYPE
call GetBattleVar
ld b, a
…
.SkipForesightCheck:
cp b
jr nz, .SkipType
ld a, [hl]
cp d
jr z, .GotMatchup
cp e
jr z, .GotMatchup
…pokecrystal: disassembly of Pokémon Crystal · ram/hram.asm#L66-L82 — the buffers overlap, so hMultiplicand + 1 and + 2 are the bytes of hProduct + 2, + 3 and hQuotient + 2, + 3: the stored damage is the quotient, or the zero productUNION
; inputs to Multiply
ds 1
hMultiplicand:: ds 3
hMultiplier:: db
NEXTU
; result of Multiply
hProduct:: ds 4
…
NEXTU
; results of Divide
hQuotient:: ds 4Checked by claude, 2026-11-04 — read the type loop from the move-type load through .ok (effect_commands.asm L1291–L1379) and the math buffers' union (ram/hram.asm L66–L82) at the pinned commitChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The row compares, multiply, divide and the raise-to-1 test are quoted.Cited by: Pokémon Crystal, Type effectiveness
In Crystal, a ×0 type chart row makes the move miss as soon as it matches, where Red and Blue mark a miss only when the damage reaches 0. pokecrystal/immunity-miss
engine/battle/effect_commands.asm#L1329-L1336; If the target is immune to the move, treat it as a miss and calculate the damage as 0
ld a, [hl]
and a
jr nz, .NotImmune
inc a
ld [wAttackMissed], apokecrystal: disassembly of Pokémon Crystal · constants/battle_constants.asm#L25DEF NO_EFFECT EQU 00Under two ½ rows (×¼), 2 or 3 damage truncates to 0 and the move misses; 4 damage gives 1. Code — Red/Blue: the miss flag is set only when a row's step leaves the damage at 0Checked by claude, 2026-11-04 — read the .GotMatchup code (effect_commands.asm L1329–L1336) and NO_EFFECT at the pinned commit; the Red side is pokered/zero-damage-miss (core.asm L5150–L5176)Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: Red's behavior is cited and NO_EFFECT's value quoted.Cited by: Pokémon Crystal, Type effectiveness
A ×¼ hit no longer truncates to a miss: 2 damage through two ½ rows gives ⌊2 × 5 / 10⌋ = 1, then ⌊1 × 5 / 10⌋ = 0, raised to 1. pokecrystal/quarter-min-one
engine/battle/effect_commands.asm#L1361-L1373ld a, 10
ldh [hDivisor], a
ld b, 4
call Divide
ldh a, [hQuotient + 2]
ld b, a
ldh a, [hQuotient + 3]
or b
jr nz, .ok
ld a, 1
ldh [hMultiplicand + 2], apokecrystal: disassembly of Pokémon Crystal · constants/battle_constants.asm#L24DEF NOT_VERY_EFFECTIVE EQU 05Each type chart row matching the move's type and either defender type computes ; a nonzero product becomes , raised to 1 if that truncates to 0, and a zero product stays 0. Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5162-L5176 — Red/Blue: a quotient of 0 marks the move missedcall Divide
…
or b ; is damage 0?
jr nz, .skipTypeImmunity
…
inc a
ld [wMoveMissed], aChecked by claude, 2026-11-04 — read Crystal's per-row step (effect_commands.asm L1361–L1373: divide by 10, and a zero quotient is set to 1; the whole step is pokecrystal/type-step), NOT_VERY_EFFECTIVE (battle_constants L24), and Red's (core.asm L5162–L5176: a zero quotient sets wMoveMissed) at the pinned commitsChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-25.Revised after a check by a second AI model, 2026-11-04: The ½ value is quoted and type-step cited.Probe: probes/pokemon-types/type-charts.mjsComputed: 2 × 5 = 10, ⌊10/10⌋ = 1; then 1 × 5 = 5, a nonzero product, ⌊5/10⌋ = 0, raised to 1.
Cited by: Type effectiveness
Against a target hit by Foresight, the type chart is read only up to an end marker placed before the Normal-against-Ghost and Fighting-against-Ghost immunities, so those two rows are skipped. pokecrystal/foresight
engine/battle/effect_commands.asm#L1302-L1310 — at the −2 marker, an identified target ends the loop; otherwise it reads on ; foresight
cp -2
jr nz, .SkipForesightCheck
ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVar
bit SUBSTATUS_IDENTIFIED, a
jr nz, .endpokecrystal: disassembly of Pokémon Crystal · data/types/type_matchups.asm#L112-L118 db -2 ; end (with Foresight)
; Foresight removes Ghost's immunities.
db NORMAL, GHOST, NO_EFFECT
db FIGHTING, GHOST, NO_EFFECT
db -1 ; endpokecrystal: disassembly of Pokémon Crystal · engine/battle/move_effects/foresight.asm#L1-L14 — Foresight sets the flag on its targetBattleCommand_Foresight:
…
ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVarAddr
bit SUBSTATUS_IDENTIFIED, [hl]
jr nz, .failed
set SUBSTATUS_IDENTIFIED, [hl]Checked by claude, 2026-11-04 — read the loop's −2 check (effect_commands.asm L1302–L1310), the table tail (type_matchups.asm L112–L118), and BattleCommand_Foresight (foresight.asm L1–L14) at the pinned commitChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: "The -2 marker" is now an end marker; the table tail and Foresight are quoted.Cited by: Pokémon Crystal, Type effectiveness
After the loop, the type matchup check's combined value ( from 10) replaces the effectiveness byte, so the text reflects every row: ×4 is 40, ×¼ is 2, and ½ with 2× is 10. pokecrystal/effectiveness-message
Value: kind message · rule combined
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L1388-L1396 call BattleCheckTypeMatchup
ld a, [wTypeMatchup]
ld b, a
ld a, [wTypeModifier]
and STAB_DAMAGE
or b
ld [wTypeModifier], apokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L1405-L1471 — CheckTypeMatchup seeds wTypeMatchup with EFFECTIVE and folds each row in with Multiply / Divide by 10pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2324-L2333 — BattleCommand_SuperEffectiveText compares the masked byte with EFFECTIVEpokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2197-L2202 — GetFailureResultText picks DoesntAffectText when the masked byte is 0Checked by claude-agent, 2026-10-20 — read the end of BattleCommand_Stab, CheckTypeMatchup, BattleCommand_SuperEffectiveText and GetFailureResultTextChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Cited by: Pokémon Crystal, Type effectiveness
An Ice move against a Water/Flying Pokémon prints no effectiveness message in Crystal: the message reads a combined value that starts at 10 and is multiplied by each matching row's value and divided by 10, here 10 → 5 → 10. pokecrystal/message-net-neutral
data/types/type_matchups.asm#L35-L39db ICE, WATER, NOT_VERY_EFFECTIVE
…
db ICE, FLYING, SUPER_EFFECTIVEpokecrystal: disassembly of Pokémon Crystal · constants/battle_constants.asm#L21-L24DEF SUPER_EFFECTIVE EQU 20
…
DEF EFFECTIVE EQU 10
DEF NOT_VERY_EFFECTIVE EQU 05pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L1416-L1464 — the combined value starts at 10 and folds in each matching rowld a, EFFECTIVE
ld [wTypeMatchup], a
…
ld a, [wTypeMatchup]
ldh [hMultiplier], a
call Multiply
ld a, 10
…
call Divide
…
ldh a, [hQuotient + 3]
ld [wTypeMatchup], apokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L1388-L1395 — at the type loop's end, the combined value (with the same-type bonus bit) is stored where the text check reads it.end
call BattleCheckTypeMatchup
ld a, [wTypeMatchup]
ld b, a
ld a, [wTypeModifier]
and STAB_DAMAGE
or b
ld [wTypeModifier], apokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2324-L2328 — no text when the combined value is 10ld a, [wTypeModifier]
and EFFECTIVENESS_MASK
cp EFFECTIVE
ret zChecked by claude, 2026-11-04 — read the Ice rows (type_matchups.asm L35 and L39), the constants (battle_constants L21–L24), CheckTypeMatchup's fold (effect_commands.asm L1416–L1464), the loop's end that stores it in wTypeModifier (L1388–L1395), and BattleCommand_SuperEffectiveText (L2324–L2328) at the pinned commitChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-25.Revised after a check by a second AI model, 2026-11-04: The store the text check reads and the constants are quoted.Probe: probes/pokemon-types/type-charts.mjsComputed: 10 × 5 / 10 = 5 for the ½ row, then 5 × 20 / 10 = 10 for the 2× row.
Cited by: Type effectiveness
As in Red and Blue, row order matters: an Ice move against a Water/Flying Pokémon takes 3 damage to ⌊3 × 5 / 10⌋ = 1 at the ½ row, then to ⌊1 × 20 / 10⌋ = 2 at the 2× row, not 3. pokecrystal/truncation-order
data/types/type_matchups.asm#L35-L39 db ICE, WATER, NOT_VERY_EFFECTIVE
…
db ICE, FLYING, SUPER_EFFECTIVEpokecrystal: disassembly of Pokémon Crystal · constants/battle_constants.asm#L21-L24DEF SUPER_EFFECTIVE EQU 20
…
DEF NOT_VERY_EFFECTIVE EQU 05Each type chart row matching the move's type and either defender type computes ; a nonzero product becomes , raised to 1 if that truncates to 0, and a zero product stays 0. CodeTruncating after each row can cost a hit that nets ×1 damage when its ½ row comes first: Ice against Water/Flying takes 3 to ⌊3 × 5 / 10⌋ = 1, then ⌊1 × 20 / 10⌋ = 2, not 3. Code — Red/Blue: the same rows in the same order give the same 3 → 1 → 2Checked by claude, 2026-11-04 — read the two Ice rows and the constants at the pinned commit; the step is pokecrystal/type-step and the Red case pokered/truncation-order; the probe replays itChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The constants are quoted, type-step and Red's claim cited.Probe: probes/pokemon-types/type-charts.mjsComputed from the per-row step (pokecrystal/type-step): 3 × 5 = 15, ⌊15/10⌋ = 1; 1 × 20 = 20, ⌊20/10⌋ = 2. The rows apply in table order, L35 before L39.
Cited by: Type effectiveness
Crystal's type chart makes Ghost-type moves super effective on Psychic types. pokecrystal/ghost-psychic
Value: 2 ×
Codepokecrystal: disassembly of Pokémon Crystal ·data/types/type_matchups.asm#L94db GHOST, PSYCHIC_TYPE, SUPER_EFFECTIVEChecked by claude-agent, 2026-10-20 — read L94 at the pinned commitChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-11-04.Cited by: Type effectiveness
Crystal's table adds Steel and Dark and changes four Red/Blue matchups: Poison→Bug ×2 → ×1, Bug→Poison ×2 → ×½, Ghost→Psychic ×0 → ×2, and Ice→Fire ×1 → ×½. pokecrystal/chart-diff
Value
{
"kind": "chart-diff",
"from": "pokered",
"newTypes": [
"Steel",
"Dark"
],
"changed": [
[
"Poison",
"Bug",
20,
10
],
[
"Bug",
"Poison",
20,
5
],
[
"Ghost",
"Psychic",
0,
20
],
[
"Ice",
"Fire",
10,
5
]
]
}data/types/type_matchups.asm#L1-L85db POISON, BUG, SUPER_EFFECTIVE
…
db BUG, POISON, SUPER_EFFECTIVE
…
db GHOST, PSYCHIC_TYPE, NO_EFFECTpokered: disassembly of Pokémon Red and Blue · constants/battle_constants.asm#L61-L65DEF SUPER_EFFECTIVE EQU 20
…
DEF EFFECTIVE EQU 10
DEF NOT_VERY_EFFECTIVE EQU 05
DEF NO_EFFECT EQU 00pokecrystal: disassembly of Pokémon Crystal · data/types/type_matchups.asm#L1-L118db ICE, FIRE, NOT_VERY_EFFECTIVE
…
db BUG, POISON, NOT_VERY_EFFECTIVE
…
db GHOST, PSYCHIC_TYPE, SUPER_EFFECTIVE
…
db DARK, DARK, NOT_VERY_EFFECTIVE
…
db STEEL, STEEL, NOT_VERY_EFFECTIVEpokecrystal: disassembly of Pokémon Crystal · constants/battle_constants.asm#L21-L25 — ×2, ×1, ×½, and ×0 are the values 20, 10, 5, and 0 over 10DEF SUPER_EFFECTIVE EQU 20
…
DEF EFFECTIVE EQU 10
DEF NOT_VERY_EFFECTIVE EQU 05
DEF NO_EFFECT EQU 00In table order, each type chart row matching the move's type and either defender type sets damage to ; 0 marks a miss. CodeEach type chart row matching the move's type and either defender type computes ; a nonzero product becomes , raised to 1 if that truncates to 0, and a zero product stays 0. CodeType/Type chart · Changes: Between Generations I and IIThe Dark and Steel types were introduced.
Bug was made ½× against Poison instead of 2×.
Poison was made 1× against Bug instead of 2×.
Ghost was made 2× against Psychic instead of 0×.
Ice was made ½× against Fire instead of 1×.Checked by claude, 2026-11-04 — Read both tables and both constant blocks at the pinned commits: Red's has Poison→Bug and Bug→Poison as SUPER_EFFECTIVE (L48, L70), Ghost→Psychic as NO_EFFECT (L78), and no Ice→Fire row; Crystal's has no Poison→Bug row, Bug→Poison NOT_VERY_EFFECTIVE (L80), Ghost→Psychic SUPER_EFFECTIVE (L94), Ice→Fire NOT_VERY_EFFECTIVE (L42), and Dark and Steel rows; the full cell-by-cell comparison is the probe's.Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-25.Revised after a check by a second AI model, 2026-11-04: Both games' constants are quoted; absent rows rest on the tables as read.Probe: probes/pokemon-types/type-charts.mjsRow order also changed: Red/Blue's table is loosely grouped, and Crystal's is grouped by attacking type. A pair with no row is ×1, since both games' steps change damage only on a matching row (pokered/type-step, pokecrystal/type-step). The two missing rows (Ice→Fire in Red/Blue, Poison→Bug in Crystal) and the count of four rest on reading both tables whole at the pinned commits and on Bulbapedia's list of changes; no line can show a row's absence. The probe compares stored values and counts the Foresight rows as active.
Cited by: Pokémon Crystal, Type effectiveness
Type still picks the stats: Steel is physical (numbered below the first special type); Dark is special, using Special Attack against Special Defense. pokecrystal/physical-special-by-type
About: Pokémon Crystal Damage formula
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L2543-L2545 cp SPECIAL
jr nc, .specialpokecrystal: disassembly of Pokémon Crystal · constants/type_constants.asm#L9-L35Checked by claude-agent, 2026-10-20 — read PlayerAttackDamage and the type constantsChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Cited by: Damage formula, Physical/special split, Type effectiveness
A plain damaging move takes these steps in order: the critical-hit roll; loading the attacking and defending stats; the base damage formula, then held-item type boosts and the critical ×2; then weather, badge type boosts, the same-type ×1.5, and the type chart rows; then the random factor; and last the accuracy check. pokecrystal/damage-order
About: Pokémon Crystal Damage formula
Codepokecrystal: disassembly of Pokémon Crystal ·data/moves/effects.asm#L5-L14NormalHit:
checkobedience
usedmovetext
doturn
critical
damagestats
damagecalc
stab
damagevariation
checkhitpokecrystal: disassembly of Pokémon Crystal · data/battle/effect_command_pointers.asm#L12-L16 — the routines for commands $05–$09 (macros/scripts/battle_commands.asm L12–L16 lists them on the same lines); damagecalc, $62, is BattleCommand_DamageCalc on L105 of both files dw BattleCommand_Critical
dw BattleCommand_DamageStats
dw BattleCommand_Stab
dw BattleCommand_DamageVariation
dw BattleCommand_CheckHitpokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L1201-L1205 — the critical-hit roll call BattleRandom
cp [hl]
ret nc
ld a, 1
ld [wCriticalHit], apokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2525-L2533BattleCommand_DamageStats:
ldh a, [hBattleTurn]
and a
jp nz, EnemyAttackDamage
…
PlayerAttackDamage:
; Return move power d, player level e, enemy defense c and player attack b.pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2943-L3023; Level * 2
…
; / 5
…
; + 2
…
; * bp
…
; * Attack
…
; / Defense
…
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L3108-L3116.CriticalMultiplier:
ld a, [wCriticalHit]
and a
ret z
; x2
ldh a, [hQuotient + 3]
add a
ldh [hQuotient + 3], apokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L1251-L1296 — weather, badges, then damage plus half of it when the move's type is one of the user's, then the type rows (pokecrystal/type-step) farcall DoWeatherModifiers
…
farcall DoBadgeTypeBoosts
…
ld a, [wCurType]
cp b
jr z, .stab
cp c
jr z, .stab
…
.stab
…
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/misc.asm#L147-L181DoBadgeTypeBoosts:
…
ld hl, BadgeTypeBoosts
…
ld a, [wCurType]
cp [hl]
jr z, .ApplyBoostpokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L1496-L1497 — the random factor (pokecrystal/random-factor)BattleCommand_DamageVariation:
; Modify the damage spread between 85% and 100%.pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L1546 — the accuracy check (pokecrystal/hit-test)BattleCommand_CheckHit:Crystal's Rain Dance, Sunny Day, and weather tables match Gold's: Rain Dance and Sunny Day set rain or sun for 5 turns, and in rain a Water move does ×1.5 and a Fire move ×½, in sun the reverse. CodeAs in Red and Blue, damage is multiplied by a random byte from 217 to 255 and divided by 255, and 0 or 1 damage is left untouched. CodeThe hit-check battle command scales the accuracy byte by the accuracy and evasion stages, subtracts 20 if the target holds a BrightPowder, and then hits on a random byte below it; an accuracy of 255 always hits. CodeChecked by claude, 2026-11-04 — read the NormalHit effect script, the command pointer table, and the routines each command runs (BattleCommand_Critical's roll, BattleCommand_DamageStats, BattleCommand_DamageCalc with .CriticalMultiplier, BattleCommand_Stab, DoBadgeTypeBoosts, BattleCommand_DamageVariation) at the pinned commit; the accuracy check is pokecrystal/hit-testChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: Rewritten as plain steps without command names, each step quoted or cited.Cited by: Damage formula, Hit chance, Type effectiveness
As in Red and Blue, damage is multiplied by a random byte from 217 to 255 and divided by 255, and 0 or 1 damage is left untouched. pokecrystal/random-factor
About: Pokémon Crystal Damage formula
Value: 217, 255
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L1503-L1536; No point in reducing 1 or 0 damage.
ld hl, wCurDamage
ld a, [hli]
and a
jr nz, .go
ld a, [hl]
cp 2
ret c
…
.loop
call BattleRandom
rrca
…pokecrystal: disassembly of Pokémon Crystal · macros/data.asm#L23DEF percent EQUS "* $ff / 100"The damage-randomizing routine multiplies damage by a random byte, 217–255, and integer-divides by 255, leaving 0 or 1 damage untouched. CodeChecked by claude, 2026-11-04 — read BattleCommand_DamageVariation (effect_commands.asm L1503–L1536) and macros/data.asm L23 at the pinned commit; Red's is pokered/random-factorChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The percent macro, compare and multiply are quoted; Red's claim cited.Computed: 85 percent + 1 is 85 × 255 / 100 = 216 in integer math, + 1 = 217, and the loop rerolls any byte below it, leaving 217–255; 100 percent is 255. The random byte is rotated right one bit first, which keeps it uniform.
Cited by: Damage formula, Type effectiveness
The critical-hit battle command sums a critical level, +1 for Focus Energy, +2 for a high-critical move, and +1 for a Scope Lens, then rolls against 17, 32, 64, 85, or 128 in 256 for levels 0 to 4; Chansey with a Lucky Punch and Farfetch'd with a Stick get level 2 and skip the other bonuses. pokecrystal/critical-chance
About: Pokémon Crystal Critical hit
Value: by level 17, 32, 64, 85, 128 · of 256
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L1120-L1207cp LUCKY_PUNCH
jr nz, .FocusEnergy
; +2 critical level
ld c, 2
jr .Tally
…
bit SUBSTATUS_FOCUS_ENERGY, a
jr z, .CheckCritical
; +1 critical level
inc c
…
; +2 critical level
…pokecrystal: disassembly of Pokémon Crystal · data/battle/critical_hit_chances.asm#L1-L8CriticalHitChances:
db 1 out_of 15 ; 0
db 1 out_of 8 ; +1
db 1 out_of 4 ; +2
db 1 out_of 3 ; +3
db 1 out_of 2 ; +4pokecrystal: disassembly of Pokémon Crystal · data/moves/critical_hit_moves.asm#L1-L9CriticalHitMoves:
db KARATE_CHOP
db RAZOR_WIND
db RAZOR_LEAF
db CRABHAMMER
db SLASH
db AEROBLAST
db CROSS_CHOPpokecrystal: disassembly of Pokémon Crystal · macros/data.asm#L25-L26; e.g. 1 out_of 2 == 50 percent + 1 == $80
DEF out_of EQUS "* $100 /"Checked by claude-agent, 2026-10-20 — read BattleCommand_Critical; 1 out_of 15 is 256 / 15 = 17 in integer math, then 32, 64, 85, and 128; the highest reachable level is 4 (Focus Energy, a high-critical move, and Scope Lens), so the table's +5 and +6 rows are never readChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Base Speed no longer matters, and Focus Energy now raises the chance.
A critical hit doubles the damage after held-item boosts and before the cap at 997 and the final +2. Unless the attacker's attacking-stat stage is higher than the defender's defending-stat stage, it also uses both Pokémon's stats without stages, which drops Reflect and Light Screen; pret's comment asks for the defender's stage to be higher, but the code takes this path at equal stages too. pokecrystal/critical-effect
About: Pokémon Crystal Critical hit
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L2983-L3028; Item boosts
call GetUserItem
…
.DoneItem:
; Critical hits
call .CriticalMultiplier
; Update wCurDamage. Max 999 (capped at 997, then add 2).
DEF MAX_DAMAGE EQU 999
DEF MIN_DAMAGE EQU 2
DEF DAMAGE_CAP EQU MAX_DAMAGE - MIN_DAMAGEpokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L3087-L3098.Cap:
ld a, HIGH(DAMAGE_CAP)
ld [hli], a
ld a, LOW(DAMAGE_CAP)
ld [hld], a
.dont_cap_3
; Add back MIN_DAMAGE (capping at 999).
inc hl
ld a, [hl]
add MIN_DAMAGE
ld [hld], apokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L3108-L3120.CriticalMultiplier:
ld a, [wCriticalHit]
and a
ret z
…
; x2
ldh a, [hQuotient + 3]
add a
ldh [hQuotient + 3], a
…
ldh a, [hQuotient + 2]
rl a
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2660-L2701 — carry, the boosted path, needs the defender's stage below the attacker's; equal or higher takes the unboosted pathCheckDamageStatsCritical:
; Return carry if boosted stats should be used in damage calculations.
; Unboosted stats should be used if the attack is a critical hit,
; and the stage of the opponent's defense is higher than the user's attack.
ld a, [wCriticalHit]
and a
scf
ret z
…
; physical
ld a, [wPlayerAtkLevel]
…A different reading: The code returns carry, for boosted stats, only when the defender's stage is lower than the attacker's, so equal stages also take the unboosted stats.pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2548-L2592 — the unboosted path reloads both stats, replacing the Reflect- or Light Screen-doubled defense ld hl, wEnemyMonDefense
…
ld a, [wEnemyScreens]
bit SCREENS_REFLECT, a
jr z, .physicalcrit
sla c
rl b
.physicalcrit
ld hl, wBattleMonAttack
call CheckDamageStatsCritical
jr c, .thickclub
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L2797-L2835 — the same for the opponent's attacks ld a, [wPlayerScreens]
bit SCREENS_REFLECT, a
…
ld hl, wEnemyMonAttack
call CheckDamageStatsCritical
jr c, .thickclub
ld hl, wPlayerDefense
…
ld hl, wEnemyAttack
…
ld a, [wPlayerScreens]
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/core.asm#L6688-L6694 — the battle stats are the stored stats scaled by their stages, so the stored stats the unboosted path reads carry no stages ld hl, wBattleMonAttack
ld de, wPlayerStats
ld bc, wPlayerAtkLevel
jr z, .got_pointers
ld hl, wEnemyMonAttack
ld de, wEnemyStats
ld bc, wEnemyAtkLevelChecked by claude, 2026-11-04 — read BattleCommand_DamageCalc's item boost, .CriticalMultiplier, and cap (effect_commands.asm L2983–L3120), CheckDamageStatsCritical (L2660–L2701), PlayerAttackDamage (L2548–L2592), EnemyAttackDamage (L2797–L2835), and ApplyStatLevelMultiplier's pointers (core.asm L6688–L6694) at the pinned commitChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The 997 cap and the compare are quoted; equal stages also skip the stages, against pret's comment.Computed: the cap is 999 − 2 = 997 before the +2. Because the comparison is cp b with the defender's stage in a and the attacker's in b, equal stages give no carry and take the unboosted path, against pret's comment.
Cited by: Critical hit, Damage formula
The hit-check battle command scales the accuracy byte by the accuracy and evasion stages, subtracts 20 if the target holds a BrightPowder, and then hits on a random byte below it; an accuracy of 255 always hits. pokecrystal/hit-test
About: Pokémon Crystal Hit chance
Value: numerator 33, 36, 43, 50, 60, 75, 1, 133, 166, 2, 233, 133, 3 · denominator 100, 100, 100, 100, 100, 100, 1, 100, 100, 1, 100, 50, 1 · BrightPowder subtracts 20
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L1584-L1608.BrightPowder:
…
cp HELD_BRIGHTPOWDER
…
sub c
…
.skip_brightpowder
ld a, b
cp -1
jr z, .Hit
call BattleRandom
cp b
…pokecrystal: disassembly of Pokémon Crystal · data/battle/accuracy_multipliers.asm#L1-L17AccuracyLevelMultipliers:
; -6 = 33%
…
; 0 = 100%
…
; +6 = 300%pokecrystal: disassembly of Pokémon Crystal · data/items/attributes.asm#L15-L16item_attribute 10, HELD_BRIGHTPOWDER, 20, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSEPokemon - Crystal Version (USA, Europe) (Rev 1) · 0x34eb2-0x34ecb — AccuracyLevelMultipliersChecked by claude-agent, 2026-10-20 — read BattleCommand_CheckHit and its .StatModifiers helper (L1758-L1847); the stage step truncates, keeps at least 1, and caps at 255, as in Red and BlueChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-10-28.Checked by a second AI model, 2026-10-28.Checked by a second AI model, 2026-11-18.Accuracy is still stored as (db \5 percent ; accuracy in data/moves/moves.asm), so a 100% move at even stages skips the roll. Lock-On, X Accuracy, and the always-hit effect return before the roll.
Cited by: Hit chance
The battle command that ends a multi-hit loop gives 2–5 hits with Red and Blue's odds and Triple Kick 1–3 hits, 1/3 each, and jumps back to the critical-hit command, so every hit rolls its own critical and damage; the hit check sits before the loop and runs once. pokecrystal/multi-hit
About: Pokémon Crystal Multi-hit attack
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/effect_commands.asm#L5203-L5284BattleCommand_EndLoop:
; Loop back to 'critical'.
…
.reject_triple_kick_sample
call BattleRandom
and $3
jr z, .reject_triple_kick_sample
…
.not_triple_kick
call BattleRandom
and $3
cp 2
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L5320-L5328.loop_back_to_critical
…
cp critical_commandpokecrystal: disassembly of Pokémon Crystal · data/moves/effects.asm#L842-L851MultiHit:
checkobedience
usedmovetext
doturn
startloop
lowersub
checkhit
critical
damagestats
damagecalcChecked by claude-agent, 2026-10-20 — read EndLoop; the count stored is the number of extra hits, 1–4 (or 1 for Double Kick), and each later pass decrements it; Triple Kick rejects a 0 and keeps 1, 2, or 3Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Double Kick and Bonemerang (EFFECT_DOUBLE_HIT) and Twineedle hit twice. Triple Kick's power rises with each hit (triplekick in its script).
Cited by: Critical hit, Hit chance, Multi-hit attack
Crystal's random-number routine is Red and Blue's generator, adding the divider register (with carry) to one byte and subtracting it (with borrow) from a second, but it returns the second where Red and Blue's returns the first; pret's comment says the divider counts at 16,384 Hz. pokecrystal/rng
About: Pokémon Crystal Random number generator
Codepokecrystal: disassembly of Pokémon Crystal ·home/random.asm#L1-L29Random::
…
; The divider is a register that increments at a rate of 16384Hz.
…
ldh a, [rDIV]
ld b, a
ldh a, [hRandomAdd]
adc b
ldh [hRandomAdd], a
ldh a, [rDIV]
ld b, a
…Our readingadd ← add + divider + carry16–20sub ← sub − divider − borrow22–26return with sub in the result28–29pokered: disassembly of Pokémon Red and Blue · engine/math/random.asm#L1-L13Random_::
…
ldh a, [rDIV]
ld b, a
ldh a, [hRandomAdd]
adc b
ldh [hRandomAdd], a
ldh a, [rDIV]
ld b, a
ldh a, [hRandomSub]
sbc b
ldh [hRandomSub], a
…Our readingadd ← add + divider + carry3–7sub ← sub − divider − borrow8–12pokered: disassembly of Pokémon Red and Blue · home/random.asm#L1-L12Random::
…
farcall Random_
ldh a, [hRandomAdd]Our readingcall the generator7result ← add8Checked by claude, 2026-10-25 — read Crystal's Random (home/random.asm L1-L29) and Red's Random_ (engine/math/random.asm L1-L13) side by side: the same adc and sbc on rDIV; Crystal's leaves A at hRandomSub, Red's Random wrapper then loads hRandomAddChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-25.Checked by a second AI model, 2026-10-28.Checked by a second AI model, 2026-10-28._BattleRandom (engine/battle/core.asm L6886) keeps Red and Blue's link-battle list of 10 seeds stepped as .
Cited by: Random number generator
On each step, the wild encounter check starts a battle when a random byte is below the map's rate for the time of day (morning, day, or night) or its water rate; the Pokémon March or Ruins of Alph radio doubles the rate, and the Pokémon Lullaby or a Cleanse Tag in the party halves it. pokecrystal/encounter-rate
About: Pokémon Crystal Random encounter
Codepokecrystal: disassembly of Pokémon Crystal ·engine/overworld/wildmons.asm#L195-L250.EncounterRate:
call GetMapEncounterRate
call ApplyMusicEffectOnEncounterRate
call ApplyCleanseTagEffectOnEncounterRate
call Random
cp b
ret
…
; Pokemon March and Ruins of Alph signal double encounter rate.
; Pokemon Lullaby halves encounter rate.
…
; Cleanse Tag halves encounter rate.pokecrystal: disassembly of Pokémon Crystal · data/wild/johto_grass.asm#L1237-L1238def_grass_wildmons ROUTE_29
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/niteChecked by claude-agent, 2026-10-20 — read TryWildEncounter, GetMapEncounterRate, and both modifiers; 10 percent is 25 in 256Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Cited by: Random encounter, Time of day, Wild encounters
A second random number from 1 to 100 picks one of a grass area's 7 slots, at 30, 30, 20, 10, 5, 4, and 1 percent, or one of 3 water slots at 60, 30, and 10 percent. pokecrystal/encounter-slots
About: Pokémon Crystal Random encounter
Value: 30, 30, 20, 10, 5, 4, 1
Codepokecrystal: disassembly of Pokémon Crystal ·data/wild/probabilities.asm#L6-L21GrassMonProbTable:
…
mon_prob 30, 0 ; 30% chance
…
mon_prob 100, 6 ; 1% chance
…
WaterMonProbTable:
…
mon_prob 60, 0 ; 60% chancepokecrystal: disassembly of Pokémon Crystal · engine/overworld/wildmons.asm#L274-L278.randomloop
call Random
cp 100
jr nc, .randomloop
inc a ; 1 <= a <= 100Checked by claude-agent, 2026-10-20 — read ChooseWildEncounter and the two tablesChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.In an ordinary wild battle Crystal keeps Red and Blue's escape formula. With the player's Pokémon's Speed and the foe's, escapes; otherwise the player escapes when a random byte is at most plus 30 for each earlier attempt, or at once when the divisor is 0 or the sum passes 255. A held Smoke Ball always escapes, and the foe's Mean Look or a trapping move holding the player prevents it. pokecrystal/run
About: Pokémon Crystal Fleeing
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/core.asm#L3680-L3710 — special battle types, link battles, and trainer battles are settled first; the ordinary wild battle goes onTryToRunAwayFromBattle:
; Run away from battle, with or without item
ld a, [wBattleType]
cp BATTLETYPE_DEBUG
jp z, .can_escape
cp BATTLETYPE_CONTEST
jp z, .can_escape
cp BATTLETYPE_TRAP
jp z, .cant_escape
cp BATTLETYPE_CELEBI
jp z, .cant_escape
cp BATTLETYPE_FORCESHINY
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/core.asm#L3714-L3728 ld a, [wBattleMonItem]
…
callfar GetItemHeldEffect
ld a, b
cp HELD_ESCAPE
…
jr nz, .no_flee_item
…
jp .can_escapepokecrystal: disassembly of Pokémon Crystal · data/items/attributes.asm#L221-L222; SMOKE_BALL
item_attribute 200, HELD_ESCAPE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSEpokecrystal: disassembly of Pokémon Crystal · engine/battle/core.asm#L3730-L3791 — the low byte of ⌊E/4⌋ is the divisor; a quotient above 255, or an overflow while adding 30, escapes.no_flee_item
ld a, [wNumFleeAttempts]
inc a
ld [wNumFleeAttempts], a
ld a, [hli]
ldh [hMultiplicand + 1], a
ld a, [hl]
ldh [hMultiplicand + 2], a
ld a, [de]
inc de
ldh [hEnemyMonSpeed + 0], a
ld a, [de]
…pokecrystal: disassembly of Pokémon Crystal · engine/battle/core.asm#L5310-L5312 — P is the player's Pokémon's Speed and E the foe's ld hl, wBattleMonSpeed
ld de, wEnemyMonSpeed
call TryToRunAwayFromBattlepokecrystal: disassembly of Pokémon Crystal · home/compare.asm#L1-L7 — no carry when the first differing byte of P is not below E's, or when they matchCompareBytes::
; Compare c bytes at de and hl.
; Return z if they all match.
.loop
ld a, [de]
cp [hl]
ret nzpokecrystal: disassembly of Pokémon Crystal · data/moves/moves.asm#L228move MEAN_LOOK, EFFECT_MEAN_LOOK, 0, NORMAL, 100, 5, 0pokecrystal: disassembly of Pokémon Crystal · data/moves/effects.asm#L1452-L1456 — EFFECT_MEAN_LOOK's entry in the effect pointer table (data/moves/effects_pointers.asm L110) is MeanLookMeanLook:
checkobedience
usedmovetext
doturn
arenatrappokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L6285-L6300 — sets the flag on the user's own status, so the foe's Mean Look sets the foe's flag the run check readsBattleCommand_ArenaTrap:
…
ld a, BATTLE_VARS_SUBSTATUS5
call GetBattleVarAddr
bit SUBSTATUS_CANT_RUN, [hl]
jr nz, .failed
…
set SUBSTATUS_CANT_RUN, [hl]pokecrystal: disassembly of Pokémon Crystal · data/moves/moves.asm#L51move WRAP, EFFECT_TRAP_TARGET, 15, NORMAL, 85, 20, 0pokecrystal: disassembly of Pokémon Crystal · engine/battle/effect_commands.asm#L5612-L5638 — a trapping move used by the foe sets the player's wrap count; TrapTarget's script ends with this command (data/moves/effects.asm L1216–L1234)BattleCommand_TrapTarget:
…
ld hl, wEnemyWrapCount
ld de, wEnemyTrappingMove
ldh a, [hBattleTurn]
and a
jr z, .got_trap
ld hl, wPlayerWrapCount
ld de, wPlayerTrappingMove
…
ld [hl], aIn a wild battle, the run routine lets the player escape when their Pokémon's Speed is at least the foe's ; otherwise it computes , adds 30 for each earlier attempt, and escapes when a random byte is at most the result, or at once when the result passes 255. CodeChecked by claude, 2026-11-04 — read TryToRunAwayFromBattle (core.asm L3680–L3791), its caller (L5310–L5312), CompareBytes, the Smoke Ball's attribute line, Mean Look's move line, script, and BattleCommand_ArenaTrap, and Wrap's line and BattleCommand_TrapTarget at the pinned commit, and compared the formula with pokered/run step by stepChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: P and E are defined, and each step and Mean Look's flag are quoted.Crystal ranks moves by priority: 3 for Protect, Detect, and Endure, 2 for Quick Attack, Mach Punch, and ExtremeSpeed, 1 for most moves, and 0 for Roar, Whirlwind, Counter, Mirror Coat, and Vital Throw; at equal priority a held Quick Claw goes first on a random byte below 60, then higher Speed, then a coin flip. pokecrystal/turn-order
About: Pokémon Crystal Turn order
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/core.asm#L477-L555.use_move
ld a, [wBattlePlayerAction]
and a ; BATTLEPLAYERACTION_USEMOVE?
jp nz, .player_first
call CompareMovePriority
jr z, .equal_priority
…
cp HELD_QUICK_CLAW
…
call BattleRandom
cp e
jr nc, .speed_check
…Our readingthe player not using a move: player first478–480compare priorities (by its label)481 equal: on to the item check482 the player's higher: player first (not quoted)483 else: enemy first (not quoted)484the two held items (not quoted)487–491the player's Quick Claw492–494 the enemy's too: to both (not quoted)495–497 random at least its value: speed check498–500 else: player first (not quoted)501no player Quick Claw: no enemy one: speed check (not quoted)504–506 random at least its value: speed check (not quoted)507–509 else: enemy first (not quoted)510both Quick Claws, not the internal clock (not quoted)513–515 enemy's roll below its value: enemy first (not quoted)516–518 player's roll below its value: player first (not quoted)519–521 else: speed check (not quoted)522internal clock: the player's roll, then the enemy's (not quoted)525–531speed check: compare the two Speeds534–537 equal: to the tie538 the player's higher: player first539 else: enemy first540tie: the internal clock: to its roll (not quoted)543–545 random below 50% + 1 (128 of 256): player first546–548 else: enemy first549the internal clock's roll below 128: enemy first (not quoted)551–554 else: player first (not quoted)555pokecrystal: disassembly of Pokémon Crystal · engine/battle/core.asm#L829-L854GetMovePriority:
; Return the priority (0-3) of move a.
…
; Vital Throw goes last.
cp VITAL_THROW
ld a, 0
ret z
call GetMoveEffect
ld hl, MoveEffectPriorities
…
ld a, [hli]
cp b
…Our readingVital Throw: 0835–837the move's effect (by its label)839each table pair until −1: the effect's: to done840–847not found: base priority849–850done: the pair's priority852–853pokecrystal: disassembly of Pokémon Crystal · data/moves/effects_priorities.asm#L1-L8MoveEffectPriorities:
db EFFECT_PROTECT, 3
db EFFECT_ENDURE, 3
db EFFECT_PRIORITY_HIT, 2
db EFFECT_FORCE_SWITCH, 0
db EFFECT_COUNTER, 0
db EFFECT_MIRROR_COAT, 0pokecrystal: disassembly of Pokémon Crystal · data/items/attributes.asm#L155-L156item_attribute 100, HELD_QUICK_CLAW, 60, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSEpokecrystal: disassembly of Pokémon Crystal · macros/data.asm#L23-L23DEF percent EQUS "* $ff / 100"pokecrystal: disassembly of Pokémon Crystal · constants/battle_constants.asm#L17-L18; default move priority
DEF BASE_PRIORITY EQU 1pokecrystal: disassembly of Pokémon Crystal · data/moves/moves.asm#L14-L267Moves:
…
move WHIRLWIND, EFFECT_FORCE_SWITCH, 0, NORMAL, 100, 20, 0
…
move ROAR, EFFECT_FORCE_SWITCH, 0, NORMAL, 100, 20, 0
…
move COUNTER, EFFECT_COUNTER, 1, FIGHTING, 100, 20, 0
…
move QUICK_ATTACK, EFFECT_PRIORITY_HIT, 40, NORMAL, 100, 30, 0
…
move PROTECT, EFFECT_PROTECT, 0, NORMAL, 100, 10, 0
move MACH_PUNCH, EFFECT_PRIORITY_HIT, 40, FIGHTING, 100, 30, 0
…Checked by claude-agent, 2026-11-04 — read DetermineMoveOrder through the speed tie (L477-L555), CompareMovePriority, and GetMovePriority through its .done load (L829-L854); BASE_PRIORITY is 1 (constants/battle_constants.asm L18), the percent macro makes 50 percent + 1 equal 128 (macros/data.asm L23), and a switch or item (a nonzero wBattlePlayerAction) puts the player first. Searched the move table (data/moves/moves.asm) for each effect in the priority table: Whirlwind and Roar force a switch, Counter and Mirror Coat are their effects' only moves, Protect and Detect share Protect's effect, and Quick Attack, Mach Punch and ExtremeSpeed are the priority hitsChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04.Cited by: Turn order
Crystal's Rain Dance, Sunny Day, and weather tables match Gold's: Rain Dance and Sunny Day set rain or sun for 5 turns, and in rain a Water move does ×1.5 and a Fire move ×½, in sun the reverse. pokecrystal/weather
About: Pokémon Crystal Weather
Value: turns 5
Codepokecrystal: disassembly of Pokémon Crystal ·engine/battle/move_effects/rain_dance.asm#L1-L5BattleCommand_StartRain:
ld a, WEATHER_RAIN
ld [wBattleWeather], a
ld a, 5
ld [wWeatherCount], apokecrystal: disassembly of Pokémon Crystal · engine/battle/move_effects/sunny_day.asm#L1-L5BattleCommand_StartSun:
ld a, WEATHER_SUN
ld [wBattleWeather], a
ld a, 5
ld [wWeatherCount], apokecrystal: disassembly of Pokémon Crystal · data/battle/weather_modifiers.asm#L1-L5WeatherTypeModifiers:
db WEATHER_RAIN, WATER, MORE_EFFECTIVE
db WEATHER_RAIN, FIRE, NOT_VERY_EFFECTIVE
db WEATHER_SUN, FIRE, MORE_EFFECTIVE
db WEATHER_SUN, WATER, NOT_VERY_EFFECTIVEpokecrystal: disassembly of Pokémon Crystal · constants/battle_constants.asm#L22-L24DEF MORE_EFFECTIVE EQU 15
…
DEF NOT_VERY_EFFECTIVE EQU 05pokecrystal: disassembly of Pokémon Crystal · engine/battle/misc.asm#L52-L120 — a matching row multiplies the damage by its value and divides by 10: 15 gives ×1.5 and 5 gives ×½DoWeatherModifiers:
ld de, WeatherTypeModifiers
ld a, [wBattleWeather]
ld b, a
ld a, [wCurType]
ld c, a
…
.ApplyModifier:
…
inc de
ld a, [de]
ldh [hMultiplier], a
…pokegold: disassembly of Pokémon Gold and Silver · engine/battle/move_effects/rain_dance.asm#L1-L5BattleCommand_StartRain:
ld a, WEATHER_RAIN
ld [wBattleWeather], a
ld a, 5
ld [wWeatherCount], apokegold: disassembly of Pokémon Gold and Silver · engine/battle/move_effects/sunny_day.asm#L1-L5BattleCommand_StartSun:
ld a, WEATHER_SUN
ld [wBattleWeather], a
ld a, 5
ld [wWeatherCount], apokegold: disassembly of Pokémon Gold and Silver · data/battle/weather_modifiers.asm#L1-L10WeatherTypeModifiers:
db WEATHER_RAIN, WATER, MORE_EFFECTIVE
db WEATHER_RAIN, FIRE, NOT_VERY_EFFECTIVE
db WEATHER_SUN, FIRE, MORE_EFFECTIVE
db WEATHER_SUN, WATER, NOT_VERY_EFFECTIVE
db -1 ; end
WeatherMoveModifiers:
db WEATHER_RAIN, EFFECT_SOLARBEAM, NOT_VERY_EFFECTIVE
db -1 ; endpokegold: disassembly of Pokémon Gold and Silver · constants/battle_constants.asm#L22-L24DEF MORE_EFFECTIVE EQU 15
…
DEF NOT_VERY_EFFECTIVE EQU 05Checked by claude, 2026-11-04 — read Rain Dance, Sunny Day, the weather tables, the constants, and DoWeatherModifiers at the pokecrystal pin, and the same three files and constants at the pokegold pin; `diff` reports the three files identical. DoWeatherModifiers' code differs slightly between the two (how it loads the damage), which the statement doesn't cover.Revised after a check by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: Narrowed to Gold, which was the only game read; the tables are quoted.Cited by: Weather