Claim set · data/claims/pokered.yaml

Pokémon Red and Blue (pret/pokered)

Game: Pokémon Red and Blue. Concept: Type effectiveness.

Red and Blue's type chart has 82 non-neutral (attacker, defender, multiplier) rows over 15 types, ended by -1; unlisted pairs are neutral. pokered/type-chart

Value
{
 "kind": "type-chart",
 "types": [
  "Normal",
  "Fighting",
  "Flying",
  "Poison",
  "Ground",
  "Rock",
  "Bug",
  "Ghost",
  "Fire",
  "Water",
  "Grass",
  "Electric",
  "Psychic",
  "Ice",
  "Dragon"
 ],
 "matchups": [
  [
   "Water",
   "Fire",
   20,
   3
  ],
  [
   "Fire",
   "Grass",
   20,
   4
  ],
  [
   "Fire",
   "Ice",
   20,
   5
  ],
  [
   "Grass",
   "Water",
   20,
   6
  ],
  [
   "Electric",
   "Water",
   20,
   7
  ],
  [
   "Water",
   "Rock",
   20,
   8
  ],
  [
   "Ground",
   "Flying",
   0,
   9
  ],
  [
   "Water",
   "Water",
   5,
   10
  ],
  [
   "Fire",
   "Fire",
   5,
   11
  ],
  [
   "Electric",
   "Electric",
   5,
   12
  ],
  [
   "Ice",
   "Ice",
   5,
   13
  ],
  [
   "Grass",
   "Grass",
   5,
   14
  ],
  [
   "Psychic",
   "Psychic",
   5,
   15
  ],
  [
   "Fire",
   "Water",
   5,
   16
  ],
  [
   "Grass",
   "Fire",
   5,
   17
  ],
  [
   "Water",
   "Grass",
   5,
   18
  ],
  [
   "Electric",
   "Grass",
   5,
   19
  ],
  [
   "Normal",
   "Rock",
   5,
   20
  ],
  [
   "Normal",
   "Ghost",
   0,
   21
  ],
  [
   "Ghost",
   "Ghost",
   20,
   22
  ],
  [
   "Fire",
   "Bug",
   20,
   23
  ],
  [
   "Fire",
   "Rock",
   5,
   24
  ],
  [
   "Water",
   "Ground",
   20,
   25
  ],
  [
   "Electric",
   "Ground",
   0,
   26
  ],
  [
   "Electric",
   "Flying",
   20,
   27
  ],
  [
   "Grass",
   "Ground",
   20,
   28
  ],
  [
   "Grass",
   "Bug",
   5,
   29
  ],
  [
   "Grass",
   "Poison",
   5,
   30
  ],
  [
   "Grass",
   "Rock",
   20,
   31
  ],
  [
   "Grass",
   "Flying",
   5,
   32
  ],
  [
   "Ice",
   "Water",
   5,
   33
  ],
  [
   "Ice",
   "Grass",
   20,
   34
  ],
  [
   "Ice",
   "Ground",
   20,
   35
  ],
  [
   "Ice",
   "Flying",
   20,
   36
  ],
  [
   "Fighting",
   "Normal",
   20,
   37
  ],
  [
   "Fighting",
   "Poison",
   5,
   38
  ],
  [
   "Fighting",
   "Flying",
   5,
   39
  ],
  [
   "Fighting",
   "Psychic",
   5,
   40
  ],
  [
   "Fighting",
   "Bug",
   5,
   41
  ],
  [
   "Fighting",
   "Rock",
   20,
   42
  ],
  [
   "Fighting",
   "Ice",
   20,
   43
  ],
  [
   "Fighting",
   "Ghost",
   0,
   44
  ],
  [
   "Poison",
   "Grass",
   20,
   45
  ],
  [
   "Poison",
   "Poison",
   5,
   46
  ],
  [
   "Poison",
   "Ground",
   5,
   47
  ],
  [
   "Poison",
   "Bug",
   20,
   48
  ],
  [
   "Poison",
   "Rock",
   5,
   49
  ],
  [
   "Poison",
   "Ghost",
   5,
   50
  ],
  [
   "Ground",
   "Fire",
   20,
   51
  ],
  [
   "Ground",
   "Electric",
   20,
   52
  ],
  [
   "Ground",
   "Grass",
   5,
   53
  ],
  [
   "Ground",
   "Bug",
   5,
   54
  ],
  [
   "Ground",
   "Rock",
   20,
   55
  ],
  [
   "Ground",
   "Poison",
   20,
   56
  ],
  [
   "Flying",
   "Electric",
   5,
   57
  ],
  [
   "Flying",
   "Fighting",
   20,
   58
  ],
  [
   "Flying",
   "Bug",
   20,
   59
  ],
  [
   "Flying",
   "Grass",
   20,
   60
  ],
  [
   "Flying",
   "Rock",
   5,
   61
  ],
  [
   "Psychic",
   "Fighting",
   20,
   62
  ],
  [
   "Psychic",
   "Poison",
   20,
   63
  ],
  [
   "Bug",
   "Fire",
   5,
   64
  ],
  [
   "Bug",
   "Grass",
   20,
   65
  ],
  [
   "Bug",
   "Fighting",
   5,
   66
  ],
  [
   "Bug",
   "Flying",
   5,
   67
  ],
  [
   "Bug",
   "Psychic",
   20,
   68
  ],
  [
   "Bug",
   "Ghost",
   5,
   69
  ],
  [
   "Bug",
   "Poison",
   20,
   70
  ],
  [
   "Rock",
   "Fire",
   20,
   71
  ],
  [
   "Rock",
   "Fighting",
   5,
   72
  ],
  [
   "Rock",
   "Ground",
   5,
   73
  ],
  [
   "Rock",
   "Flying",
   20,
   74
  ],
  [
   "Rock",
   "Bug",
   20,
   75
  ],
  [
   "Rock",
   "Ice",
   20,
   76
  ],
  [
   "Ghost",
   "Normal",
   0,
   77
  ],
  [
   "Ghost",
   "Psychic",
   0,
   78
  ],
  [
   "Fire",
   "Dragon",
   5,
   79
  ],
  [
   "Water",
   "Dragon",
   5,
   80
  ],
  [
   "Electric",
   "Dragon",
   5,
   81
  ],
  [
   "Grass",
   "Dragon",
   5,
   82
  ],
  [
   "Ice",
   "Dragon",
   20,
   83
  ],
  [
   "Dragon",
   "Dragon",
   20,
   84
  ]
 ]
}
Codepokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L1-L85TypeEffects: ; attacker, defender, *= db WATER, FIRE, SUPER_EFFECTIVE … db -1 ; endpokered: disassembly of Pokémon Red and Blue · constants/type_constants.asm#L1-L28 — 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–L85 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.

Each row is [attacking, defending, stored multiplier, line]. Stored multipliers are scaled by 10 (pokered/multiplier-encoding).

Cited by: Pokémon Crystal, Pokémon Red and Blue, Type effectiveness

Multipliers are integers scaled by 10 (20 for “super effective”, 05 for “not very effective”, and 00 for no effect); the table never uses 10 (effective) or 15 (more effective). pokered/multiplier-encoding

Value: kind multiplier-encoding · neutral 10 · super 20 · not very 5 · none 0

Codepokered: disassembly of Pokémon Red and Blue · constants/battle_constants.asm#L60-L65; type effectiveness factors, scaled by 10 DEF SUPER_EFFECTIVE EQU 20 DEF MORE_EFFECTIVE EQU 15 DEF EFFECTIVE EQU 10 DEF NOT_VERY_EFFECTIVE EQU 05 DEF NO_EFFECT EQU 00Checked by claude-agent, 2026-10-20 — read the constants; the probe confirms the table uses only 20, 5 and 0Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Cited by: Pokémon Crystal, Type effectiveness

The type-adjustment routine applies STAB before any type row: damage+⌊damage/2⌋ when the move's type matches either attacker type. pokered/stab

About: Pokémon Red and Blue Same-type attack bonus

Value: kind stab · form half-add

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5101-L5125 srl b rr c ; bc = floor(0.5 * damage) add hl, bc ; hl = floor(1.5 * damage)Checked by claude-agent, 2026-10-20 — read AdjustDamageForMoveType from the type comparison (L5102–L5107) to the STAB flag (L5125)Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Cited by: Damage modifier, Pokémon Crystal, Same-type attack bonus, Type effectiveness

In table order, each type chart row matching the move's type and either defender type sets damage to ⌊damage×value/10⌋; 0 marks a miss. pokered/type-step

Value: kind type-step · div 10 · zero miss

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5127-L5185 call Multiply ld a, 10 ldh [hDivisor], a ld b, 4 call DivideChecked by claude-agent, 2026-10-20 — read the .loop / .matchingPairFound / .skipTypeImmunity code at the pinned commitChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

The loop compares each row's defending type with type 1, then type 2 of the defender and applies the row once on either match. Single-type Pokémon store the same type twice (e.g. data/pokemon/base_stats/charmander.asm#L6: db FIRE, FIRE ; type), so they take one step per row. A dual type therefore gets the product of two rows, truncated after each.

Cited by: Damage modifier, Pokémon Crystal, Pokémon Red and Blue, Type effectiveness

Under two ½ rows (×¼), 2 or 3 damage truncates to 0 and the move misses; 4 damage gives 1. pokered/zero-damage-miss

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5150-L5176ld a, [hl] ; a = damage multiplier ldh [hMultiplier], a … call Multiply ld a, 10 ldh [hDivisor], a ld b, 4 call Divide … or b ; is damage 0? jr nz, .skipTypeImmunity ; if damage is 0, make the move miss …pokered: disassembly of Pokémon Red and Blue · constants/battle_constants.asm#L64DEF NOT_VERY_EFFECTIVE EQU 05pokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L14db GRASS, GRASS, NOT_VERY_EFFECTIVEpokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L30 — with L14, the ×¼ case the probe replays (a Grass move against a Grass/Poison defender)db GRASS, POISON, NOT_VERY_EFFECTIVEChecked by claude, 2026-11-04 — read the row step (core.asm L5150–L5176: multiply by the row's value, divide by 10, a zero result sets wMoveMissed), NOT_VERY_EFFECTIVE (battle_constants L64), and the Grass/Grass and Grass/Poison rows at the pinned commit; the probe replays 2, 3, 4 damage (→ 0 miss, 0 miss, 1)Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The multiply, divide and constants are quoted.Probe: probes/pokemon-types/type-charts.mjs

Computed, each row multiplying by 5 and dividing by 10 with the remainder dropped: 2 → 1 → 0; 3 → 1 → 0; 4 → 2 → 1. A result of 0 sets the miss flag.

Cited by: Type effectiveness

Truncating 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. pokered/truncation-order

Codepokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L33-L36 db ICE, WATER, NOT_VERY_EFFECTIVE … db ICE, FLYING, SUPER_EFFECTIVEpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5150-L5170 — each matching row multiplies the stored damage by its value and divides by 10, storing the quotientld a, [hl] ; a = damage multiplier ldh [hMultiplier], a … call Multiply ld a, 10 ldh [hDivisor], a ld b, 4 call Divide ldh a, [hQuotient + 2] ld [hli], a ld b, a ldh a, [hQuotient + 3] …pokered: disassembly of Pokémon Red and Blue · constants/battle_constants.asm#L61-L64DEF SUPER_EFFECTIVE EQU 20 … DEF NOT_VERY_EFFECTIVE EQU 05Checked by claude, 2026-11-04 — read the two Ice rows, the row step's multiply, divide by 10 and store (core.asm L5150–L5170), and the 20 and 5 constants (battle_constants L61, L64) at the pinned commit; the probe replays it and lists every attacker × type pair whose ½ row precedes its 2× rowRevised after a check by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The multiply, divide and constants are quoted.Probe: probes/pokemon-types/type-charts.mjs

Computed: ⌊3 × 5 / 10⌋ = 1, then ⌊1 × 20 / 10⌋ = 2. The rows apply in table order, so the ½ row (L33) comes before the 2× row (L36).

Cited by: Damage modifier, Type effectiveness

The Red/Blue type chart gives Ghost-type moves no effect on Psychic types. pokered/ghost-psychic

Value: 0 ×

Codepokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L78db GHOST, PSYCHIC_TYPE, NO_EFFECTType/Type chart · Changes: Between Generations I and IIGhost was made 2× against Psychic instead of 0×.Checked by claude-agent, 2026-10-20 — read L78 at the pinned commit; Bulbapedia agreesChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-11-04.

Cited by: Pokémon Red and Blue, Type effectiveness

In Red and Blue, a Saffron Gym trainer's after-battle line, “Psychic #MON fear only ghosts and bugs!”, contradicts the game's own type chart, under which Ghost-type moves have no effect on Psychic types. pokered/ghost-psychic-dialogue

Codepokered: disassembly of Pokémon Red and Blue · text/SaffronGym.asm#L135-L139_SaffronGymYoungster1AfterBattleText:: text "Psychic #MON" line "fear only ghosts" cont "and bugs!"The Red/Blue type chart gives Ghost-type moves no effect on Psychic types. CodeChecked by claude, 2026-11-04 — read the text file at the pinned commit (pointed there by Bulbapedia's Ghost (type) trivia) and the Ghost → Psychic row (type_matchups L78, cited as pokered/ghost-psychic)Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: Says the line contradicts the game's own type chart, and cites it.

Cited by: Type effectiveness

Bulbapedia reports that “an abundance of evidence suggests” the Gen 1 Ghost → Psychic ×0 “may have been an error”. pokered/ghost-psychic-reported-error

WikiGhost (type) · TriviaIn Generation I, Ghost-type moves have no effect on Psychic-type Pokémon, though an abundance of evidence suggests that this may have been an error.Revised after a check by a second AI model, 2026-10-21.Checked by a second AI model, 2026-11-06.

A report of intent, not evidence of it. No developer statement has been found (see the gap on the type-effectiveness page).

Cited by: Type effectiveness

Each matching row overwrites one damage-multiplier byte, so the text follows the last row: above 10 is “super effective”, below 10 “not very effective”, and a miss reads “doesn't affect” only at 0. pokered/effectiveness-message

Value: kind message · rule last-row

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5147-L5153 ld a, [hl] ; a = damage multiplier ldh [hMultiplier], a add b ld [wDamageMultipliers], apokered: disassembly of Pokémon Red and Blue · engine/battle/display_effectiveness.asm#L1-L10 ld a, [wDamageMultipliers] and $7F cp EFFECTIVEpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3718-L3733 — PrintMoveFailureText picks DoesntAffectMonText only when the masked byte is 0pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3218-L3229 — a missed move goes to PrintMoveFailureText, a hit to DisplayEffectivenessChecked by claude-agent, 2026-10-20 — read the row loop, DisplayEffectiveness, PrintMoveFailureText and the call site in ExecutePlayerMoveChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Bit 7 of the byte is the STAB flag (constants/battle_constants.asm: BIT_STAB_DAMAGE EQU 7), masked off before the comparison. ExecutePlayerMove seeds the byte with EFFECTIVE (core.asm#L3084-L3085), so a move with no matching row prints nothing.

Cited by: Pokémon Crystal, Pokémon Red and Blue, Type effectiveness

An Ice move against a Water/Flying Pokémon nets ×1 damage, a ½ row and then a 2× row, yet prints “It's super effective!”, since the message reads only the last matching row's value, 20, and compares it with 10. pokered/message-net-neutral

Codepokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L33-L36db ICE, WATER, NOT_VERY_EFFECTIVE … db ICE, FLYING, SUPER_EFFECTIVEpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5147-L5153 — each matching row overwrites the byte with its value, keeping only the same-type bonus bitld a, [wDamageMultipliers] and 1 << BIT_STAB_DAMAGE ld b, a ld a, [hl] ; a = damage multiplier ldh [hMultiplier], a add b ld [wDamageMultipliers], apokered: disassembly of Pokémon Red and Blue · constants/battle_constants.asm#L61-L63DEF SUPER_EFFECTIVE EQU 20 … DEF EFFECTIVE EQU 10pokered: disassembly of Pokémon Red and Blue · engine/battle/display_effectiveness.asm#L1-L8 — the text compares the last row's value, without the bonus bit, with 10: above it, the super-effective textDisplayEffectiveness: ld a, [wDamageMultipliers] and $7F cp EFFECTIVE ret z ld hl, SuperEffectiveText jr nc, .done ld hl, NotVeryEffectiveTextpokered: disassembly of Pokémon Red and Blue · data/text/text_2.asm#L1319-L1321_SuperEffectiveText:: text "It's super" line "effective!"Checked by claude, 2026-11-04 — read the Ice rows (type_matchups.asm L33 and L36), the row loop's store (core.asm L5147–L5153: each matching row overwrites wDamageMultipliers), the 20 and 10 constants (battle_constants L61, L63), DisplayEffectiveness (L1–L8), and the text (text_2.asm L1319–L1321) at the pinned commit: the 2× row comes last, so the byte is 20 and the super-effective text printsChecked 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 constants 10 and 20 are quoted.Probe: probes/pokemon-types/type-charts.mjs

Cited by: Type effectiveness

Earthquake against a Rock/Flying Pokémon does 0 damage and prints that the attack missed, not “It doesn't affect”: the Ground-against-Flying row (×0) zeroes the damage and makes the move miss, but the message reads the last matching row's value, Ground against Rock's ×2, and only a 0 there picks “doesn't affect”. pokered/message-immune-miss

Codepokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L102move EARTHQUAKE, NO_ADDITIONAL_EFFECT, 100, GROUND, 100, 10pokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L9db GROUND, FLYING, NO_EFFECTpokered: disassembly of Pokémon Red and Blue · data/types/type_matchups.asm#L55db GROUND, ROCK, SUPER_EFFECTIVEpokered: disassembly of Pokémon Red and Blue · constants/battle_constants.asm#L61-L65DEF SUPER_EFFECTIVE EQU 20 … DEF NO_EFFECT EQU 00pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5150-L5176 — each matching row overwrites the multiplier byte; × 0 / 10 leaves 0, which sets the miss flag, and the later 2× row keeps it 0ld a, [hl] ; a = damage multiplier ldh [hMultiplier], a add b ld [wDamageMultipliers], a … call Multiply ld a, 10 ldh [hDivisor], a ld b, 4 call Divide … or b ; is damage 0? …pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3218-L3221ld a, [wMoveMissed] and a jr z, .moveDidNotMiss call PrintMoveFailureTextpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3725-L3733 — the flag holds $ff only after a failed one-hit KO move (engine/battle/move_effects/one_hit_ko.asm), which Earthquake isn'tld hl, DoesntAffectMonText ld a, [wDamageMultipliers] and EFFECTIVENESS_MASK jr z, .gotTextToPrint ld hl, AttackMissedText ld a, [wCriticalHitOrOHKO] cp $ff jr nz, .gotTextToPrint ld hl, UnaffectedTextpokered: disassembly of Pokémon Red and Blue · data/text/text_2.asm#L1122-L1140_AttackMissedText:: text "<USER>'s" line "attack missed!" … _DoesntAffectMonText:: text "It doesn't affect" line "<TARGET>!"Checked by claude, 2026-11-04 — read Earthquake's line, the two Ground rows, the constants, the row step and its zero test (core.asm L5150–L5176), the miss branch into PrintMoveFailureText (L3218–L3221) and its text choice (L3725–L3733), and the two texts, at the pinned commit; the only writer of $ff to wCriticalHitOrOHKO is one_hit_ko.asm (git grep); the probe replays the row loop and the text choice; not yet observed in an emulatorChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: Narrowed to Earthquake (a failed one-hit-KO move prints "unaffected!"); the text choice is quoted.Probe: probes/pokemon-types/type-charts.mjs

Cited by: Type effectiveness

Moves on the set-damage list (Sonic Boom, Seismic Toss, Dragon Rage, Night Shade, Psywave, and Super Fang) jump to the hit test, skipping the base-damage routine and the type-adjustment routine, the only damage routine that reads the type chart. pokered/set-damage-skips-chart

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3134-L3139 jp c, .moveHitTest ; SetDamageEffects moves (e.g. Seismic Toss and Super Fang) skip damage calculationpokered: disassembly of Pokémon Red and Blue · data/battle/set_damage_effects.asm#L1-L6 db SUPER_FANG_EFFECT db SPECIAL_DAMAGE_EFFECTpokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L62 — SONICBOOM; also L82 SEISMIC_TOSS, L95 DRAGON_RAGE, L114 NIGHT_SHADE, L162 PSYWAVE (SPECIAL_DAMAGE_EFFECT) and L175 SUPER_FANGChecked by claude-agent, 2026-10-20 — read both call sites (player L3134–L3139, enemy L5526–L5530) and grepped the repo for TypeEffects (only core.asm L5129 and L5202 read it)Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Cited by: Type effectiveness

The trainer AI's type-effectiveness lookup stops at the first row matching either defender type, ignoring dual-type products. pokered/ai-first-row

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5187-L5223; this doesn't take into account the effects that dual types can have ; (e.g. 4x weakness / resistance, weaknesses and resistances canceling) … .loop ld a, [hli] cp $ff ret z cp d ; match the type of the move jr nz, .nextTypePair1 ld a, [hli] cp b ; match with type 1 of pokemon jr z, .done …pokered: disassembly of Pokémon Red and Blue · engine/battle/trainer_ai.asm#L207-L216 ld a, [wTypeEffectiveness] cp $10Checked by claude, 2026-10-25 — read the routine and its one caller, AIMoveChoiceModification3; AIGetTypeEffectiveness (L5192-L5223) returns at the first TypeEffects row whose move type matches and whose defender type is either of the twoChecked 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.

pret marks the routine's neutral seed ld a, $10 as "bug: should be EFFECTIVE (10)"; the caller also compares with $10, so the seed still reads as neutral there.

Cited by: Type effectiveness

The type constants still define a Bird type ($06), with a name string, but no type chart row names it. pokered/bird-type

Codepokered: disassembly of Pokémon Red and Blue · constants/type_constants.asm#L11 const BIRD ; $06pokered: disassembly of Pokémon Red and Blue · data/types/names.asm#L40.Bird: db "BIRD@"Checked by claude-agent, 2026-10-20 — read the constants and the full table; the probe lists type constants with no rows (Bird only)Checked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.Probe: probes/pokemon-types/type-charts.mjs

No file under data/pokemon/base_stats/ names BIRD (grep at the pinned commit).

Cited by: Pokémon Red and Blue, Type effectiveness

Type picks the stats: Fire, Water, Grass, Electric, Psychic, Ice, and Dragon (the first special type upward) use Special on both sides; the rest use Attack against Defense. pokered/physical-special-by-type

About: Pokémon Red and Blue Damage formula

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4040-L4042 cp SPECIAL ; types >= SPECIAL are all special jr nc, .specialAttackpokered: disassembly of Pokémon Red and Blue · constants/type_constants.asm#L19-L26Checked by claude-agent, 2026-10-20 — read GetDamageVarsForPlayerAttack through .specialAttackCritCheck (L4030–L4099)Checked 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

In Red and Blue, a damaging move runs the critical-hit test, the base formula, the type adjustment (STAB, then type rows), the random factor, and then the hit test (accuracy). pokered/damage-order

About: Pokémon Red and Blue Damage formula

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3140-L3150 call CalculateDamage … call AdjustDamageForMoveType call RandomizeDamage .moveHitTest call MoveHitTestpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5531-L5543 — same order on the enemy's turnChecked by claude-agent, 2026-10-20 — read ExecutePlayerMove and ExecuteEnemyMove at the pinned commitChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Cited by: Damage formula, Damage modifier, Hit chance, Type effectiveness

The base-damage routine computes ⌊⌊(⌊2×Level/5⌋+2)×Power×Attack/Defense⌋/50⌋, caps it at 997, and adds 2, so the type step receives 2–999. For a move with the explode effect it halves Defense first (to at least 1). pokered/base-damage

About: Pokémon Red and Blue Damage formula

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4299-L4318CalculateDamage: ; input: ; b: attack ; c: opponent defense ; d: base power ; e: level … cp EXPLODE_EFFECT jr nz, .ok srl c jr nz, .ok inc c ; ...with a minimum value of 1 (used as a divisor later on)Our readingthe attacker's move effect (not quoted)4306–4310not the explode effect: on4314–4315defense ÷ 24316 0: 14317–4318pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4343-L4459 ld a, e ; level add a … ld a, 5 ld [hld], a push bc ld b, 4 call Divide pop bc … inc [hl] inc [hl] …Our readinglevel × 24344–4345 carry into the high byte (not quoted)4346–4353÷ 54356–4361+ 24364–4365× power4370–4371× attack4374–4375÷ defense4378–4380÷ 504383–4385quotient's low byte + the damage's high byte4389–4392back into the quotient (not quoted)4393 a carry: next byte + 1; it wraps: cap (not quoted)4394–4400quotient's second byte not 0: cap (not quoted)4403–4407quotient 998 or more: cap (not quoted)4409–4418add the quotient into the damage (not quoted)4421–4431 a carry out: cap (not quoted)4432damage 998 or more: cap (not quoted)4434–4444cap: 9974446–4450+ 24454–4457 a carry: high byte + 1 (not quoted)4458–4459pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4030-L4034 — wDamage is zero when CalculateDamage adds the quotient to itGetDamageVarsForPlayerAttack: xor a ld hl, wDamage ; damage to eventually inflict, initialise to zero ld [hli], a ld [hl], aOur readingdamage ← 04031–4034pokered: disassembly of Pokémon Red and Blue · constants/battle_constants.asm#L53-L54DEF MIN_NEUTRAL_DAMAGE EQU 2 DEF MAX_NEUTRAL_DAMAGE EQU 999Checked by claude, 2026-10-25 — read CalculateDamage L4299-L4465: level doubled, divided by 5, plus 2, times power (d), times attack (b), divided by defense (c), divided by 50; the quotient is added to wDamage, which GetDamageVarsForPlayerAttack (L4030) zeroes, the sum capped at MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE, then MIN_NEUTRAL_DAMAGE addedChecked 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-10-28.Checked by a second AI model, 2026-10-28.

Critical hits, Reflect/Light Screen, and stat stages change the inputs first (GetDamageVarsForPlayerAttack); this claim doesn't cover them.

Cited by: Damage formula

The damage-randomizing routine multiplies damage by a random byte, 217–255, and integer-divides by 255, leaving 0 or 1 damage untouched. pokered/random-factor

About: Pokémon Red and Blue Damage formula

Value: 217, 255

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5420-L5454; loop until a random number greater than or equal to 217 is generated cp 85 percent + 1pokered: disassembly of Pokémon Red and Blue · macros/data.asm#L3 — 85 × 255 / 100 = 216 in integer math, + 1 = 217DEF percent EQUS "* $ff / 100"Checked by claude-agent, 2026-10-20 — read RandomizeDamage and the percent macroChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Cited by: Damage formula, Type effectiveness

The critical-hit test makes a hit critical when a random byte is below a threshold set by the attacker's base Speed S: ⌊S/2⌋ for most moves, and min⁡(255,8⌊S/2⌋) for Karate Chop, Razor Leaf, Crabhammer, and Slash. pokered/critical-chance

About: Pokémon Red and Blue Critical hit

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4478-L4544ld a, [wMonHBaseSpeed] ld b, a srl b ; (effective (base speed/2)) … srl b ; /2 for regular move (effective (base speed / 2)) … sla b ; *4 for high critical move (effective (base speed/2)*8)) … call BattleRandom ; generates a random value, in "a" … cp b ; check a against calculated crit rate ret nc ; no critical hit if no borrowpokered: disassembly of Pokémon Red and Blue · data/battle/critical_hit_moves.asm#L1-L6HighCriticalMoves: db KARATE_CHOP db RAZOR_LEAF db CRABHAMMER db SLASHChecked by claude-agent, 2026-10-20 — read CriticalHitTest; without Focus Energy the threshold is doubled (never past 254) and then halved for a normal move, or doubled twice more for a high-critical move with a cap at 255 after each shiftChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

The random byte is rotated left three bits before the comparison, which keeps it uniform. A move with 0 power returns before the test. The table of high-critical moves appears twice in core.asm; the copy labeled UnusedHighCriticalMoves has no reader.

Without Focus Energy, a Pokémon with base Speed 115, such as Persian, lands a critical hit on 57 of 256 rolls with most moves and on 255 of 256 with Slash. pokered/critical-example

About: Pokémon Red and Blue Critical hit

Value: base speed 115 · normal 57 · high 255

Codepokered: disassembly of Pokémon Red and Blue · data/pokemon/base_stats/persian.asm#L3-L4; hp atk def spd spcpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4489-L4539ld a, [wMonHBaseSpeed] ld b, a srl b ; (effective (base speed/2)) … bit GETTING_PUMPED, a ; test for focus energy jr nz, .focusEnergyUsed ; bug: using focus energy causes a shift to the right instead of left, … sla b ; (effective (base speed/2)*2) jr nc, .noFocusEnergyUsed ld b, $ff ; cap at 255/256 jr .noFocusEnergyUsed .focusEnergyUsed …pokered: disassembly of Pokémon Red and Blue · data/battle/critical_hit_moves.asm#L1-L6HighCriticalMoves: … db SLASH db -1 ; endPokemon - Red Version (USA, Europe) (SGB Enhanced) · 0x3898f-0x38993Checked by claude, 2026-11-04 — read Persian's base stats and CriticalHitTest (core.asm L4489–L4539) at the pinned commit, tracing both the regular and high-critical paths without Focus Energy, and Slash's entry in HighCriticalMovesChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The whole threshold path and Slash's table entry are quoted.Checked by a second AI model, 2026-11-18.

Computed: ⌊115/2⌋ = 57, doubled to 114 (no carry), then halved back to 57 for a regular move; for Slash, 114 doubles to 228, and doubling again overflows a byte, so the cap sets 255. A rotated random byte below the threshold is a critical hit: 57 or 255 of its 256 values.

Focus Energy cuts the critical-hit chance to about a quarter instead of raising it: for most moves the threshold becomes ⌊S/8⌋ in 256, where S is the attacker's base Speed, against ⌊S/2⌋ without it, because the code halves a value it should double; a comment in pret's disassembly marks this as a bug. pokered/focus-energy-bug

About: Pokémon Red and Blue Critical hit

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4489-L4524ld a, [wMonHBaseSpeed] ld b, a srl b ; (effective (base speed/2)) … bit GETTING_PUMPED, a ; test for focus energy jr nz, .focusEnergyUsed ; bug: using focus energy causes a shift to the right instead of left, ; resulting in 1/4 the usual crit chance sla b ; (effective (base speed/2)*2) … .focusEnergyUsed srl b .noFocusEnergyUsed …The critical-hit test makes a hit critical when a random byte is below a threshold set by the attacker's base Speed S: ⌊S/2⌋ for most moves, and min⁡(255,8⌊S/2⌋) for Karate Chop, Razor Leaf, Crabhammer, and Slash. CodeChecked by claude, 2026-11-04 — read CriticalHitTest (core.asm L4489–L4524) at the pinned commit and traced both branches: ⌊S/2⌋ halved twice gives ⌊S/8⌋ for a regular move; a high-critical move gets 4⌊S/4⌋Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: S is the base Speed; the later halving is quoted.Checked by a second AI model, 2026-11-18.

Computed: with Focus Energy, ⌊S/2⌋ is halved twice more, to ⌊S/8⌋; without it, it is doubled and halved, back to ⌊S/2⌋ (pokered/critical-chance). A high-critical move gets 4⌊S/4⌋ with Focus Energy.

Cited by: Critical hit

A critical hit doubles the attacker's level in the damage formula and ignores stat stages, Reflect, and Light Screen: the player's Pokémon's attacking or defending stat comes from its party data, and the opponent's is recomputed from its base stat, level, and DVs, without stat experience, or read from its party data in a link battle. pokered/critical-effect

About: Pokémon Red and Blue Critical hit

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4044-L4072 — the player attacks: on a critical, the Reflect-doubled defense in bc is replaced by the recomputed one, and the attack is read from the party data instead of the battle statld hl, wEnemyMonDefense … bit HAS_REFLECT_UP, a ; check for Reflect jr z, .physicalAttackCritCheck ; if the enemy has used Reflect, double the enemy's defense sla c rl b .physicalAttackCritCheck ld hl, wBattleMonAttack ld a, [wCriticalHitOrOHKO] and a ; check for critical hit jr z, .scaleStats …pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4074-L4099ld hl, wEnemyMonSpecial … bit HAS_LIGHT_SCREEN_UP, a ; check for Light Screen jr z, .specialAttackCritCheck ; if the enemy has used Light Screen, double the enemy's special sla c rl b … .specialAttackCritCheck ld hl, wBattleMonSpecial ld a, [wCriticalHitOrOHKO] and a ; check for critical hit …pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4131-L4136ld a, [wBattleMonLevel] ld e, a ; e = level ld a, [wCriticalHitOrOHKO] and a ; check for critical hit jr z, .done sla e ; double level if it was a critical hitpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4162-L4216 — the opponent attacks: the same swap, the player's defending stat from the party data and the opponent's attacking stat recomputedbit HAS_REFLECT_UP, a ; check for Reflect jr z, .physicalAttackCritCheck ; if the player has used Reflect, double the player's defense sla c rl b .physicalAttackCritCheck ld hl, wEnemyMonAttack ld a, [wCriticalHitOrOHKO] and a ; check for critical hit jr z, .scaleStats ; in the case of a critical hit, reset the player's defense and the enemy's attack to their base values ld hl, wPartyMon1Defense …pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4244-L4249ld a, [wEnemyMonLevel] ld e, a ld a, [wCriticalHitOrOHKO] and a ; check for critical hit jr z, .done sla e ; double level if it was a critical hitpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4258-L4295 — in a link battle, the stat from the opponent's party data; otherwise recomputed from the species' base stats, the level, and the DVs, with b = 0GetEnemyMonStat: … ld a, [wLinkState] cp LINK_STATE_BATTLING jr nz, .notLinkBattle ld hl, wEnemyMon1Stats … .notLinkBattle ld a, [wEnemyMonLevel] ld [wCurEnemyLevel], a ld a, [wEnemyMonSpecies] ld [wCurSpecies], a …pokered: disassembly of Pokémon Red and Blue · home/move_mon.asm#L54-L71 — b = 0 skips stat experienceCalcStat:: … ld a, b ld d, a … ld a, [hl] ; read base value of stat … ld a, d and a jr z, .statExpDone ; consider stat exp?pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6382-L6443 — the battle stats a non-critical hit reads are the unmodified stats scaled by the stage ratiosld hl, wBattleMonAttack ld de, wPlayerMonUnmodifiedAttack ld bc, wPlayerMonStatMods jr z, .next ld hl, wEnemyMonAttack ld de, wEnemyMonUnmodifiedAttack ld bc, wEnemyMonStatMods … ld hl, StatModifierRatios … call Multiply … …Checked by claude, 2026-11-04 — read GetDamageVarsForPlayerAttack and GetDamageVarsForEnemyAttack (core.asm L4044–L4136, L4162–L4249), GetEnemyMonStat (L4258–L4295), CalcStat's stat-exp test (home/move_mon.asm L54–L71), and CalculateModifiedStat (L6382–L6443) at the pinned commit: on a critical, the Reflect- or Light Screen-doubled defending stat and the stage-scaled battle stat are both replacedChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The opponent's stat is recomputed from base, level and DVs, not party data, outside link battles.

With the level doubled, the formula's first factor becomes ⌊4L/5⌋+2 instead of ⌊2L/5⌋+2 (base-damage), close to ×2 at high levels and ×1.5 at level 5.

Cited by: Critical hit, Damage modifier

Red and Blue store a move's accuracy as a byte, ⌊255p/100⌋ for p percent, so 100% is 255 and 85% is 216. pokered/accuracy-encoding

About: Pokémon Red and Blue Hit chance

Codepokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L1-L8db \5 percent ; accuracypokered: disassembly of Pokémon Red and Blue · macros/data.asm#L3DEF percent EQUS "* $ff / 100"Checked by claude-agent, 2026-10-20 — read the move macro and the percent macro; 85 × 255 / 100 = 216 in integer mathChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-11-04.

Cited by: Hit chance

The hit test lands a move when a random byte is below its accuracy byte, so even a 100% move misses 1 time in 256. pokered/hit-test

About: Pokémon Red and Blue Hit chance

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5321-L5327; if the random number generated is greater than or equal to the scaled accuracy, the move misses ; note that this means that even the highest accuracy is still just a 255/256 chance, not 100% call BattleRandom cp b jr nc, .moveMissedChecked by claude-agent, 2026-10-20 — read MoveHitTest from .calcHitChance to .moveMissedChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Cited by: Hit chance, Random number generator

The hit-chance routine multiplies the accuracy byte by the attacker's accuracy-stage ratio and then by the defender's evasion-stage ratio, read in reverse; it truncates after each step, keeps at least 1, and caps the result at 255. pokered/accuracy-stages

About: Pokémon Red and Blue Hit chance

StageNumeratorDenominator
-625100
-528100
-433100
-340100
-250100
-166100
011
11510
221
32510
431
53510
641
Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5348-L5418ld c, a ; c = 14 - EVASIONMOD (this "reflects" the value over 7, so that an increase in the target's evasion … ; make sure the result is always at least one … ld a, $ff ; set the hit chance to 0xFFpokered: disassembly of Pokémon Red and Blue · data/battle/stat_modifiers.asm#L1-L15StatModifierRatios: ; first byte is numerator, second byte is denominator ; 0.25 … ; 1.00 … ; 4.00Pokemon - Red Version (USA, Europe) (SGB Enhanced) · 0x3f6cb-0x3f6e4 — StatModifierRatiosChecked by claude-agent, 2026-10-20 — read CalcHitChance's two-pass loop and the ratio tableChecked 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.

The code counts the stages 1 to 13, so its stage 7, the table's 0, is neutral (1/1). The same table scales the other stats, so a move at +6 accuracy against −6 evasion reaches ×16, capped at 255.

Cited by: Hit chance

Swift returns from the hit test before any check, so it never misses, even against a Pokémon in the air from Fly or underground from Dig; other moves always miss such a target, and X Accuracy skips only the roll. pokered/hit-test-exemptions

About: Pokémon Red and Blue Hit chance

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5247-L5261cp SWIFT_EFFECT ret z ; Swift never misses (this was fixed from the Japanese versions) … bit INVULNERABLE, [hl] jp nz, .moveMissedpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L5287-L5290bit USING_X_ACCURACY, a ; is the player using X Accuracy? ret nz ; if so, always hit regardless of accuracy/evasionChecked by claude-agent, 2026-10-20 — read MoveHitTest from .dreamEaterCheck to .calcHitChanceChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-27.Checked by a second AI model, 2026-10-28.

pret's comment says Swift could miss in the Japanese versions.

Cited by: Hit chance

Doubleslap, Comet Punch, Fury Attack, Pin Missile, Spike Cannon, Barrage, and Fury Swipes hit 2 or 3 times with probability 3/8 each, and 4 or 5 times with 1/8 each; Double Kick, Bonemerang, and Twineedle always hit twice. pokered/multi-hit-count

About: Pokémon Red and Blue Multi-hit attack

Value: hits 2, 3, 4, 5 · weights 3, 3, 1, 1 · of 8

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/effects.asm#L944-L966cp TWINEEDLE_EFFECT jr z, .twineedle cp ATTACK_TWICE_EFFECT ld a, $2 ; number of hits it's always 2 for ATTACK_TWICE_EFFECT jr z, .saveNumberOfHits ; for TWO_TO_FIVE_ATTACKS_EFFECT 3/8 chance for 2 and 3 hits, and 1/8 chance for 4 and 5 hits call BattleRandom and $3 cp $2 jr c, .gotNumHits ; if the number of hits was greater than 2, re-roll again for a lower chance call BattleRandom …pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L16-L17move DOUBLESLAP, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 10 move COMET_PUNCH, TWO_TO_FIVE_ATTACKS_EFFECT, 18, NORMAL, 85, 15pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L37move DOUBLE_KICK, ATTACK_TWICE_EFFECT, 30, FIGHTING, 100, 30pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L44-L55move FURY_ATTACK, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20 … move TWINEEDLE, TWINEEDLE_EFFECT, 25, BUG, 100, 20 move PIN_MISSILE, TWO_TO_FIVE_ATTACKS_EFFECT, 14, BUG, 85, 20pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L144move SPIKE_CANNON, TWO_TO_FIVE_ATTACKS_EFFECT, 20, NORMAL, 100, 15pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L153move BARRAGE, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L167-L168move FURY_SWIPES, TWO_TO_FIVE_ATTACKS_EFFECT, 18, NORMAL, 80, 15 move BONEMERANG, ATTACK_TWICE_EFFECT, 50, GROUND, 90, 10Twineedle hits twice because its branch stores the value of a poison side-effect constant, which is 2, as the hit count, along with making it the move's effect. CodeChecked by claude, 2026-11-04 — read TwoToFiveAttacksEffect (effects.asm L944–L966) and the ten move lines (moves.asm L16, L17, L37, L44, L54, L55, L144, L153, L167, L168) at the pinned commit; the first byte's two low bits give 0 or 1 half the time, else a second byte's two low bits give 0–3Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: All ten moves' lines are quoted.

Computed: P(2) = 1/4 + 1/2 × 1/4 = 3/8, likewise P(3); P(4) = P(5) = 1/2 × 1/4 = 1/8. Twineedle's count comes from twineedle-count.

Cited by: Multi-hit attack

A multi-hit move runs the critical test, the damage formula, and the accuracy roll once; every later hit repeats the first hit's damage, and a first hit that misses ends the move. pokered/multi-hit-repeat

About: Pokémon Red and Blue Multi-hit attack

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3140-L3159 — the critical test, the damage steps, and the hit test all come before the animation stepcall CriticalHitTest … call GetDamageVarsForPlayerAttack call CalculateDamage … call AdjustDamageForMoveType call RandomizeDamage .moveHitTest call MoveHitTest HandleIfPlayerMoveMissed: ld a, [wMoveMissed] and a …pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3218-L3237 — a missed first hit ends the turn before the effect that sets the hit count runsld a, [wMoveMissed] and a jr z, .moveDidNotMiss call PrintMoveFailureText ld a, [wPlayerMoveEffect] cp EXPLODE_EFFECT ; even if Explosion or Selfdestruct missed, its effect still needs to be activated jr z, .notDone jp ExecutePlayerMoveDone ; otherwise, we're done if the move missed .moveDidNotMiss call ApplyAttackToEnemyPokemon … .notDone …pokered: disassembly of Pokémon Red and Blue · data/battle/always_happen_effects.asm#L1-L7AlwaysHappenSideEffects: … db TWO_TO_FIVE_ATTACKS_EFFECTpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L3246-L3253 — each later hit jumps back to the animation step, past the critical test, damage steps, and hit testbit ATTACKING_MULTIPLE_TIMES, [hl] jr z, .executeOtherEffects ld a, [wPlayerNumAttacksLeft] dec a ld [wPlayerNumAttacksLeft], a jp nz, GetPlayerAnimationType ; for multi-hit moves, apply attack until PlayerNumAttacksLeft hits 0 or the enemy faints. ; damage calculation and accuracy tests only happen for the first hitpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L4678-L4695 — each hit subtracts the stored damage, which no step on the repeat path recomputesApplyDamageToEnemyPokemon: ld hl, wDamage … ; subtract the damage from the pokemon's current HP … sub b ld [wEnemyMonHP + 1], aChecked by claude, 2026-11-04 — read ExecutePlayerMove (core.asm L3140–L3253) at the pinned commit: the hit count is set after the first ApplyAttackToEnemyPokemon (the effect is in AlwaysHappenSideEffects), the loop jumps to GetPlayerAnimationType, past CriticalHitTest, CalculateDamage, and MoveHitTest, and ApplyDamageToEnemyPokemon (L4678–L4695) subtracts wDamage each time; a missed first hit jumps to ExecutePlayerMoveDone before the effect runsChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The skipped steps, the miss exit and the stored damage are quoted.

A critical first hit therefore makes every hit critical, at the same damage.

Cited by: Critical hit, Hit chance, Multi-hit attack

Twineedle hits twice because its branch stores the value of a poison side-effect constant, which is 2, as the hit count, along with making it the move's effect. pokered/twineedle-count

About: Pokémon Red and Blue Multi-hit attack

Value: 2

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/effects.asm#L962-L969.saveNumberOfHits ld [de], a ld [bc], a ret .twineedle ld a, POISON_SIDE_EFFECT1 ld [hl], a ; set Twineedle's effect to poison effect jr .saveNumberOfHitspokered: disassembly of Pokémon Red and Blue · constants/move_effect_constants.asm#L9const POISON_SIDE_EFFECT1 ; $02Checked by claude-agent, 2026-10-20 — read the .twineedle branch; a still holds POISON_SIDE_EFFECT1 when .saveNumberOfHits writes the countsChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Cited by: Multi-hit attack

The random-number update routine adds the hardware divider register to one byte with carry and subtracts it from a second byte with borrow; the VBlank handler calls it every frame, and the routine games call to get a random number returns the first byte. pokered/rng

About: Pokémon Red and Blue Random number generator

Codepokered: disassembly of Pokémon Red and Blue · engine/math/random.asm#L1-L13Random_:: ; Generate a random 16-bit value. 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], aOur readingadd byte ← add byte + the divider + carry3–7sub byte ← sub byte − the divider − borrow8–12return (not quoted)13pokered: disassembly of Pokémon Red and Blue · home/random.asm#L1-L8Random:: ; Return a random number in a. ; For battles, use BattleRandom. … farcall Random_ ldh a, [hRandomAdd]Our readingsave hl, de, bc (not quoted)4–6Random_7A ← the add byte8pokered: disassembly of Pokémon Red and Blue · home/vblank.asm#L37call RandomOur readingRandom, each VBlank (by its label)37Checked by claude-agent, 2026-10-20 — read Random_, Random, and VBlank; rDIV is $FF04 (constants/hardware.inc L150)Checked 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-11-04.

The divider counts up on its own, so the bytes depend on the exact cycle each call lands on as well as on how many frames have passed.

Cited by: Random number generator, RNG manipulation

A step, or a turn in place, that can meet a wild Pokémon finds one when a random byte is below the map's encounter rate, out of 256: Route 1's grass rate is 25, so a step in its grass finds one 25 times in 256. pokered/encounter-rate

About: Pokémon Red and Blue Random encounter

Value: route 1 25 · of 256

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/wild_encounters.asm#L26-L53; determine if wild pokemon can appear in the half-block we're standing in … ld a, [wGrassRate] jr z, .CanEncounter … ; compare encounter chance with a random number to determine if there will be an encounter ld b, a ldh a, [hRandomAdd] cp b jr nc, .CantEncounter2Our readingthe step's tile picks the rate (not all quoted)26–33a random byte not below the rate: no battle50–53pokered: disassembly of Pokémon Red and Blue · data/wild/maps/Route1.asm#L1-L2Route1WildMons: def_grass_wildmons 25 ; encounter rateIn caves, Pokémon Tower, the Power Plant, and Pokémon Mansion every step off water can start a wild battle; on routes, in Viridian Forest, and in the Safari Zone only a step in grass or on water can. A turn rolls as a step does: pressing a direction other than the last one walked, from standing, first turns the player in place, and the same check runs on the tile the player stands on, before any step. The tile decides: the tileset's grass tile rolls against the map's grass rate and a water tile ($14) against its water rate. Any other tile rolls against the grass rate on an indoor map, by map number, unless the map uses the forest tileset, as Viridian Forest and the four Safari Zone areas do; outdoors it doesn't roll. Only the overworld, forest, and plateau tilesets have a grass tile. CodeChecked by claude, 2026-10-28 — read TryDoWildEncounter and its caller DetermineWildOpponent (core.asm L6653-L6665); indoor maps with wild Pokémon, except Viridian Forest and the Safari Zone, allow encounters on any tile. Re-read on 2026-10-28 for the statement's rewrite; which tiles roll is in pokered-wild/step-tiles.Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-10-28.

Across data/wild/maps, nonzero grass rates run from 8 to 30; the two nonzero water rates are 5.

Cited by: Fleeing, Pokémon Red and Blue, Random encounter, Random number generator, Wild encounters

A second random byte, which the generator updates along with the first, then picks one of the map's 10 slots, which have 51, 51, 39, 25, 25, 25, 13, 13, 11, and 3 chances in 256. pokered/encounter-slots

About: Pokémon Red and Blue Random encounter

Value: 51, 51, 39, 25, 25, 25, 13, 13, 11, 3

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/wild_encounters.asm#L54-L62ldh a, [hRandomSub] ld b, a ld hl, WildMonEncounterSlotChancesOur readingb ← the second random byte54–55read the slot table (pokered-wild/slot-pick)56pokered: disassembly of Pokémon Red and Blue · data/wild/probabilities.asm#L11-L28wild_chance 51 ; 51/256 = 19.9% chance of slot 0 … wild_chance 3 ; 3/256 = 1.2% chance of slot 9The random-number update routine adds the hardware divider register to one byte with carry and subtracts it from a second byte with borrow; the VBlank handler calls it every frame, and the routine games call to get a random number returns the first byte. CodeChecked by claude, 2026-10-28 — read the slot loop and the wild_chance tableChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-10-28.

Cited by: Random encounter, Random number generator, Wild encounters

After any battle, including one that ends in a blackout, the first two steps once the map reloads can't start a wild battle and the third can (computed). Every battle's end sets a cooldown flag; the map then reloads (after a blackout, at the place the warp sends the player), and a map load with the flag set sets a counter of 3. Each step not taken under scripted movement counts it down while the flag is set, clearing the flag when it reaches 0, and a wild battle can't start while it is above 0. A step's countdown runs before that step's encounter check. pokered/encounter-cooldown

About: Pokémon Red and Blue Random encounter

Value: 3

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/end_of_battle.asm#L46-L70.resetVariables xor a ld [wLowHealthAlarm], a ;disable low health alarm ld [wChannelSoundIDs + CHAN5], a ld [wIsInBattle], a ld [wBattleType], a ld [wMoveMissed], a ld [wCurOpponent], a ld [wForcePlayerToChooseMon], a ld [wNumRunAttempts], a ld [wEscapedFromBattle], a ld hl, wPartyAndBillsPCSavedMenuItem …Our readingclear the low-health alarm and channel 5's sound47–49clear the in-battle value, the battle type, and other values50–62clear the battle status block, a byte at a time63–68set the encounter cooldown flag69–70pokered: disassembly of Pokémon Red and Blue · home/overworld.asm#L341-L358ld hl, wStatusFlags4 set BIT_BATTLE_OVER_OR_BLACKOUT, [hl] ld a, [wCurMap] cp OAKS_LAB jp z, .noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab callfar AnyPartyAlive ld a, d and a jr z, .allPokemonFainted .noFaintCheck ld c, 10 call DelayFrames …Our readingset the battle-over-or-blackout flag341–342if the map is Oak's lab: skip the fainting check343–345if the party-alive test (its lines not quoted) returns 0: black out346–349no fainting check: wait 10 frames (the delay's lines not quoted)351–352 load the map (EnterMap, below)353black out: in-battle value ← lost355–356 run the map's script (its lines not quoted)357 go to the blackout routine (below)358pokered: disassembly of Pokémon Red and Blue · home/overworld.asm#L756-L770HandleBlackOut:: ; For when all the player's pokemon faint. ; Does not print the "blacked out" message. call GBFadeOutToBlack ld a, $08 call StopMusic ld hl, wStatusFlags4 res BIT_BATTLE_OVER_OR_BLACKOUT, [hl] ld a, BANK(ResetStatusAndHalveMoneyOnBlackout) ; also BANK(PrepareForSpecialWarp) and BANK(SpecialEnterMap) ldh [hLoadedROMBank], a ld [rROMB], a call ResetStatusAndHalveMoneyOnBlackout …Our readingfade to black and stop the music (their lines not quoted)759–761clear the battle-over-or-blackout flag762–763switch to the reset routine's ROM bank (by the comment, the warp's too)764–766call routines (their lines not quoted) named for: resetting status and halving the money767 preparing the special warp768 the map's music769go to the warp's map load (SpecialEnterMap, below)770pokered: disassembly of Pokémon Red and Blue · engine/menus/main_menu.asm#L327-L341SpecialEnterMap:: xor a ldh [hJoyPressed], a ldh [hJoyHeld], a ldh [hJoy5], a ld [wCableClubDestinationMap], a ld hl, wStatusFlags6 set BIT_GAME_TIMER_COUNTING, [hl] call ResetPlayerSpriteData ld c, 20 call DelayFrames ld a, [wEnteringCableClub] …Our readingclear the button bytes and the Cable Club destination328–332start the game timer counting333–334reset the player's sprite (its lines not quoted); wait 20 frames335–337if the entering-Cable-Club flag is set: return338–340load the map (EnterMap, below)341pokered: disassembly of Pokémon Red and Blue · home/overworld.asm#L6-L17EnterMap:: ; Load a new map. ld a, PAD_BUTTONS | PAD_CTRL_PAD ld [wJoyIgnore], a call LoadMapData farcall ClearVariablesOnEnterMap ld hl, wStatusFlags2 bit BIT_WILD_ENCOUNTER_COOLDOWN, [hl] jr z, .skipGivingThreeStepsOfNoRandomBattles ld a, 3 ; minimum number of steps between battles ld [wNumberOfNoRandomBattleStepsLeft], a .skipGivingThreeStepsOfNoRandomBattlesOur readingignore all buttons8–9load the map's data, clear the map-entry values (their lines not quoted)10–11if the cooldown flag is set: no-battle steps ← 312–16pokered: disassembly of Pokémon Red and Blue · home/overworld.asm#L291-L320; walking animation finished ld a, [wStatusFlags5] bit BIT_SCRIPTED_MOVEMENT_STATE, a jr nz, .doneStepCounting ; if button presses are being simulated, don't count steps ; step counting ld hl, wStepCounter dec [hl] ld a, [wStatusFlags2] bit BIT_WILD_ENCOUNTER_COOLDOWN, a jr z, .doneStepCounting ld hl, wNumberOfNoRandomBattleStepsLeft dec [hl] …Our readingif the movement is scripted (simulated button presses): skip the counting292–294step counter (a separate one) − 1296–297if the cooldown flag is set:298–300 no-battle steps − 1301–302 if that reaches 0: clear the cooldown flag303–305in the Safari Zone:307–308 check its step limit (its lines not quoted)309 if the Safari game is over: warp out310–312if the in-battle value isn't 0: go to the warp check314–316apply poison damage outside battle (its lines not quoted)317if the out-of-battle blackout flag is set: black out318–320pokered: disassembly of Pokémon Red and Blue · home/overworld.asm#L321-L340.newBattle call NewBattle ld hl, wMovementFlags res BIT_STANDING_ON_WARP, [hl] jp nc, CheckWarpsNoCollision ; check for warps if there was no battle .battleOccurred ld hl, wStatusFlags3 res BIT_TALKED_TO_TRAINER, [hl] ld hl, wStatusFlags7 res BIT_TRAINER_BATTLE, [hl] ld hl, wCurrentMapScriptFlags set BIT_CUR_MAP_LOADED_1, [hl] …Our readingtry a battle (NewBattle, below)322clear the standing-on-warp flag323–324if no battle happened (carry clear): go to the warp check325after a battle: clear the talked-to-trainer and trainer-battle flags327–330 set the two map-loaded flags; clear the held buttons331–335 in Cinnabar Gym: set event $2A7 (unnamed upstream)336–339pokered: disassembly of Pokémon Red and Blue · home/overworld.asm#L362-L371NewBattle:: ld a, [wStatusFlags3] bit BIT_ON_DUNGEON_WARP, a jr nz, .noBattle call IsPlayerCharacterBeingControlledByGame jr nz, .noBattle ; no battle if the player character is under the game's control ld a, [wStatusFlags4] bit BIT_NO_BATTLES, a jr nz, .noBattle farjp InitBattleOur readingif the player is on a dungeon warp: no battle363–365if the game is moving the player (its test's lines not quoted): no battle366–367if the no-battles flag is set: no battle368–370go to the battle setup (InitBattle, below)371pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6642-L6645InitBattle:: ld a, [wCurOpponent] and a jr z, DetermineWildOpponentOur readingif the opponent byte is 0 (no set opponent): pick a wild one (below)6643–6645pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6653-L6664DetermineWildOpponent: ld a, [wStatusFlags6] bit BIT_DEBUG_MODE, a jr z, .notDebugMode ldh a, [hJoyHeld] bit B_PAD_B, a ; disable wild encounters ret nz .notDebugMode ld a, [wNumberOfNoRandomBattleStepsLeft] and a ret nz callfar TryDoWildEncounterOur readingif debug mode is on and B is held: return, no wild battle6654–6659if the no-battle steps aren't 0: return, no wild battle6661–6663try a wild encounter (its lines not quoted)6664pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6676jp c, InitWildBattleOur readingif the subtraction before it (not quoted) set carry: go to the wild battle's setup6676pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6693jp _InitBattleCommonOur readinggo to the shared battle setup (below)6693pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6733-L6735; common code that executes after init battle code specific to trainer or wild battles _InitBattleCommon:pokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6763-L6764call StartBattle callfar EndOfBattleOur readingrun the battle (its lines not quoted)6763then the end of battle (EndOfBattle, the first entry)6764Checked by claude, 2026-10-27 — read EndOfBattle, whose every path reaches the flag (.resetVariables, L46-L70); the overworld loop's return to EnterMap after a battle and its jump to HandleBlackOut when every Pokémon fainted (L321-L358); HandleBlackOut's warp into SpecialEnterMap, which ends in EnterMap unless the player is entering the Cable Club; EnterMap's counter; the step counting (L291-L306) ahead of the call to NewBattle (L321-L322), with nothing between that loops back (L307-L320); NewBattle's jump to InitBattle and DetermineWildOpponent's test of the counter. Only the step counting clears the flag (the flag's name occurs nowhere else in engine/ or home/); counted the steps: 3, 2, 1, then 0 on the third step before its check; the battle setup's shared tail, which runs the battle and then calls EndOfBattle (core.asm L6763-L6764), reached by the trainer setup's jump (L6693) and by the wild setup, which falls into it (L6676, L6733-L6735)Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-10-27.Revised after a check by the editor, 2026-10-27: The countdown wasn't quoted; quoting it showed the blackout exclusion was wrong, since every battle sets the cooldown.Checked by a second AI model, 2026-10-28.Checked by the editor, 2026-10-28.

EndOfBattle has one caller, the battle setup's shared tail (engine/battle/core.asm L6764): a search of the whole repository finds the name only there and at its own label (end_of_battle.asm L1).

Cited by: Random encounter, Wild encounters

In a wild battle, the run routine lets the player escape when their Pokémon's Speed P is at least the foe's E; otherwise it computes Q=⌊32P/(⌊E/4⌋mod256)⌋, 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. pokered/run

About: Pokémon Red and Blue Fleeing

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L1496-L1578jp z, .canEscape ; jump if it's a ghost battle … jp z, .canEscape ; jump if it's a safari battle … jr nz, .trainerBattle ; jump if it's a trainer battle ld a, [wNumRunAttempts] inc a ld [wNumRunAttempts], a … jr nc, .canEscape ; jump if player speed greater than enemy speed … ld a, 32 …Checked by claude-agent, 2026-10-20 — read TryRunningFromBattle and its callers (L1078, L2452); the loop adds 30 once per attempt after the first, and an overflow of the byte escapes; equal Speeds escape too, since StringCmp leaves no carryChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Q is about 128P/E. Choosing FIGHT resets the attempt counter (L2159-L2161), and a trainer battle prints "No! There's no running from a trainer battle!" instead. Ghost battles, Safari Zone battles, and link battles always let the player go.

Cited by: Fleeing, Random encounter

Quick Attack moves first and Counter last unless both sides chose the same one; otherwise the Pokémon with higher Speed moves first, and a tie goes either way with probability 1/2. pokered/turn-order

About: Pokémon Red and Blue Turn order

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L370-L412ld a, [wPlayerSelectedMove] cp QUICK_ATTACK jr nz, .playerDidNotUseQuickAttack ld a, [wEnemySelectedMove] cp QUICK_ATTACK jr z, .compareSpeed ; if both used Quick Attack jp .playerMovesFirst ; if player used Quick Attack and enemy didn't .playerDidNotUseQuickAttack ld a, [wEnemySelectedMove] cp QUICK_ATTACK jr z, .enemyMovesFirst ; if enemy used Quick Attack and player didn't ld a, [wPlayerSelectedMove] …pokered: disassembly of Pokémon Red and Blue · macros/data.asm#L3DEF percent EQUS "* $ff / 100"Checked by claude, 2026-11-04 — read MainInBattleLoop from .noLinkBattle to .invertOutcome (core.asm L370–L412) and the percent macro (macros/data.asm L3) 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 tie branches and the percent macro are quoted.

Computed: 50 percent + 1 is 50 × $ff / 100 + 1 = 127 + 1 = 128 in integer math, so a random byte below it is 128 of 256 values. The player's item, switch, or run attempt happens in the battle menu (L304), before either move, and ExecutePlayerMove then skips the player's turn (L3086-L3088).

Cited by: Turn order

Of the 165 moves in the move table, Struggle included, 104 are listed at 100% accuracy and 61 below it; the lowest are the three one-hit KO moves at 30%. pokered/move-accuracy-distribution

About: Pokémon Red and Blue Hit chance

Value
{
 "moves": 165,
 "byPercent": {
  "30": 3,
  "55": 4,
  "60": 1,
  "65": 1,
  "70": 4,
  "75": 11,
  "80": 5,
  "85": 15,
  "90": 11,
  "95": 6,
  "100": 104
 }
}
Codepokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L11-L178Moves: ; Characteristics of each move. table_width MOVE_LENGTH move POUND, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35 … move STRUGGLE, RECOIL_EFFECT, 50, NORMAL, 100, 10pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L25move GUILLOTINE, OHKO_EFFECT, 1, NORMAL, 30, 5Checked by claude-agent, 2026-10-21 — counted the fifth argument of all 165 `move` lines (L14-L178); the 30% moves are Guillotine, Horn Drill, and FissureChecked by a second AI model, 2026-10-21.Checked by a second AI model, 2026-10-28.

Counts are of the percent as written, before the byte conversion (accuracy-encoding). Moves that act on the user, such as Swords Dance and Double Team, are listed at 100 as well; 65% is Rock Throw and 60% Hypnosis.

Bulbasaur and Squirtle start with Tackle, 35 power at 95% accuracy, and Charmander with Scratch, 40 power at 100%: the starter arrives at level 5 with the moves its base data lists, plus learned moves up to its level, and none of the three learns one before level 7. pokered/starter-moves

About: Pokémon Red and Blue Hit chance

Value
{
 "starters": {
  "Bulbasaur": "Tackle",
  "Squirtle": "Tackle",
  "Charmander": "Scratch"
 },
 "Tackle": {
  "power": 35,
  "accuracy": 95
 },
 "Scratch": {
  "power": 40,
  "accuracy": 100
 }
}
Codepokered: disassembly of Pokémon Red and Blue · scripts/OaksLab.asm#L927-L931ld a, 5 ld [wCurEnemyLevel], a … call AddPartyMonpokered: disassembly of Pokémon Red and Blue · engine/pokemon/add_mon.asm#L173-L193 — the four moves from the base data, then the learnset's moves up to the levelld hl, wMonHMoves ld a, [hli] … predef WriteMonMovespokered: disassembly of Pokémon Red and Blue · engine/pokemon/evos_moves.asm#L409-L415ld a, [hli] ; read level of next move in learnset … ld a, [wCurEnemyLevel] cp b jp c, .done ; mon level < move level (assumption: learnset is sorted by level)pokered: disassembly of Pokémon Red and Blue · data/pokemon/base_stats/bulbasaur.asm#L13db TACKLE, GROWL, NO_MOVE, NO_MOVE ; level 1 learnsetpokered: disassembly of Pokémon Red and Blue · data/pokemon/base_stats/squirtle.asm#L13db TACKLE, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnsetpokered: disassembly of Pokémon Red and Blue · data/pokemon/base_stats/charmander.asm#L13db SCRATCH, GROWL, NO_MOVE, NO_MOVE ; level 1 learnsetpokered: disassembly of Pokémon Red and Blue · data/pokemon/evos_moves.asm#L1753-L1758BulbasaurEvosMoves: … ; Learnset db 7, LEECH_SEEDpokered: disassembly of Pokémon Red and Blue · data/pokemon/evos_moves.asm#L1985-L1990CharmanderEvosMoves: … ; Learnset db 9, EMBERpokered: disassembly of Pokémon Red and Blue · data/pokemon/evos_moves.asm#L1998-L2003SquirtleEvosMoves: … ; Learnset db 8, BUBBLEpokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L23move SCRATCH, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L46move TACKLE, NO_ADDITIONAL_EFFECT, 35, NORMAL, 95, 35Checked by claude, 2026-11-04 — read the starter gift in scripts/OaksLab.asm (L927–L931), _AddPartyMon's move copy and WriteMonMoves call (add_mon.asm L173–L193), WriteMonMoves' level test (evos_moves.asm L409–L415), the three base-stat move lines, the first learnset entries (levels 7, 9, 8), and the two move lines 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 level-5 gift and learnset copy are quoted.

Growl and Tail Whip, their other moves, deal no damage. The rival's first team is the starter that beats the player's, at level 5 (data/trainers/parties.asm L487-L490).

Four 120-power moves trade accuracy for power against a 95-power, 100%-accurate move of the same type: Thunder (70%) against Thunderbolt, Blizzard (90%) against Ice Beam, Fire Blast (85%) against Flamethrower, and Hydro Pump (80%) against Surf. Sing, Hypnosis, Sleep Powder, Lovely Kiss, and Spore put the target to sleep at 55%, 60%, 75%, 75%, and 100%, and Guillotine, Horn Drill, and Fissure knock out in one hit at 30%. pokered/named-moves

About: Pokémon Red and Blue Hit chance

Value
{
 "Thunder": {
  "power": 120,
  "accuracy": 70,
  "effect": "may paralyze"
 },
 "Thunderbolt": {
  "power": 95,
  "accuracy": 100,
  "effect": "may paralyze"
 },
 "Blizzard": {
  "power": 120,
  "accuracy": 90,
  "effect": "may freeze"
 },
 "Ice Beam": {
  "power": 95,
  "accuracy": 100,
  "effect": "may freeze"
 },
 "Fire Blast": {
  "power": 120,
  "accuracy": 85,
  "effect": "may burn"
 },
 "Flamethrower": {
  "power": 95,
  "accuracy": 100,
  "effect": "may burn"
 },
 "Hydro Pump": {
  "power": 120,
  "accuracy": 80
 },
 "Surf": {
  "power": 95,
  "accuracy": 100
 },
 "Mega Kick": {
  "power": 120,
  "accuracy": 75
 },
 "Hyper Beam": {
  "power": 150,
  "accuracy": 90
 },
 "Body Slam": {
  "power": 85,
  "accuracy": 100,
  "effect": "may paralyze"
 },
 "Earthquake": {
  "power": 100,
  "accuracy": 100
 },
 "Sing": {
  "effect": "sleep",
  "accuracy": 55
 },
 "Hypnosis": {
  "effect": "sleep",
  "accuracy": 60
 },
 "Sleep Powder": {
  "effect": "sleep",
  "accuracy": 75
 },
 "Lovely Kiss": {
  "effect": "sleep",
  "accuracy": 75
 },
 "Spore": {
  "effect": "sleep",
  "accuracy": 100
 },
 "Guillotine": {
  "effect": "one-hit KO",
  "accuracy": 30
 },
 "Horn Drill": {
  "effect": "one-hit KO",
  "accuracy": 30
 },
 "Fissure": {
  "effect": "one-hit KO",
  "accuracy": 30
 }
}
Codepokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L98-L103move THUNDERBOLT, PARALYZE_SIDE_EFFECT1, 95, ELECTRIC, 100, 15 … move THUNDER, PARALYZE_SIDE_EFFECT1, 120, ELECTRIC, 70, 10 … move EARTHQUAKE, NO_ADDITIONAL_EFFECT, 100, GROUND, 100, 10 move FISSURE, OHKO_EFFECT, 1, GROUND, 30, 5pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L66-L72move FLAMETHROWER, BURN_SIDE_EFFECT1, 95, FIRE, 100, 15 … move HYDRO_PUMP, NO_ADDITIONAL_EFFECT, 120, WATER, 80, 5 move SURF, NO_ADDITIONAL_EFFECT, 95, WATER, 100, 15 move ICE_BEAM, FREEZE_SIDE_EFFECT1, 95, ICE, 100, 10 move BLIZZARD, FREEZE_SIDE_EFFECT1, 120, ICE, 90, 5pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L139move FIRE_BLAST, BURN_SIDE_EFFECT2, 120, FIRE, 85, 5pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L38-L47move MEGA_KICK, NO_ADDITIONAL_EFFECT, 120, NORMAL, 75, 5 … move HORN_DRILL, OHKO_EFFECT, 1, NORMAL, 30, 5 … move BODY_SLAM, PARALYZE_SIDE_EFFECT2, 85, NORMAL, 100, 15pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L25move GUILLOTINE, OHKO_EFFECT, 1, NORMAL, 30, 5pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L76move HYPER_BEAM, HYPER_BEAM_EFFECT, 150, NORMAL, 90, 5pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L60move SING, SLEEP_EFFECT, 0, NORMAL, 55, 15pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L92move SLEEP_POWDER, SLEEP_EFFECT, 0, GRASS, 75, 15pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L108move HYPNOSIS, SLEEP_EFFECT, 0, PSYCHIC_TYPE, 60, 20pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L155-L160move LOVELY_KISS, SLEEP_EFFECT, 0, NORMAL, 75, 10 … move SPORE, SLEEP_EFFECT, 0, GRASS, 100, 15Checked by claude, 2026-11-04 — read each move's line for power and accuracy at the pinned commit; each effect is its second argument, such as `PARALYZE_SIDE_EFFECT1`; the statement names only the moves quotedChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: Narrowed from "the strongest special moves of each type" to the four pairs quoted.

The chance of a side effect differs between the …_EFFECT1 and …_EFFECT2 constants; no claim reads those routines yet.

Sand-Attack and Smokescreen (100%), Kinesis (80%), and Flash (70%) lower the target's accuracy by one stage; Double Team and Minimize (100%) raise the user's evasion by one stage. pokered/accuracy-evasion-moves

About: Pokémon Red and Blue Hit chance

Value
{
 "Sand-Attack": {
  "accuracy": 100,
  "stage": {
   "target": "accuracy",
   "change": -1
  }
 },
 "Smokescreen": {
  "accuracy": 100,
  "stage": {
   "target": "accuracy",
   "change": -1
  }
 },
 "Kinesis": {
  "accuracy": 80,
  "stage": {
   "target": "accuracy",
   "change": -1
  }
 },
 "Flash": {
  "accuracy": 70,
  "stage": {
   "target": "accuracy",
   "change": -1
  }
 },
 "Double Team": {
  "accuracy": 100,
  "stage": {
   "user": "evasion",
   "change": 1
  }
 },
 "Minimize": {
  "accuracy": 100,
  "stage": {
   "user": "evasion",
   "change": 1
  }
 }
}
Codepokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L41move SAND_ATTACK, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 15pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L117-L121move DOUBLE_TEAM, EVASION_UP1_EFFECT, 0, NORMAL, 100, 15 … move MINIMIZE, EVASION_UP1_EFFECT, 0, NORMAL, 100, 20 move SMOKESCREEN, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 20pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L147move KINESIS, ACCURACY_DOWN1_EFFECT, 0, PSYCHIC_TYPE, 80, 15pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L161move FLASH, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 70, 20pokered: disassembly of Pokémon Red and Blue · constants/move_effect_constants.asm#L17-L30const ATTACK_UP1_EFFECT ; $0A … const EVASION_UP1_EFFECT ; $0F … const ATTACK_DOWN1_EFFECT ; $12 … const ACCURACY_DOWN1_EFFECT ; $16 const EVASION_DOWN1_EFFECT ; $17pokered: disassembly of Pokémon Red and Blue · ram/wram.asm#L568-L574 — the player's block, wPlayerMonStatMods (L546–L552), has the same orderwEnemyMonStatMods:: wEnemyMonAttackMod:: db wEnemyMonDefenseMod:: db wEnemyMonSpeedMod:: db wEnemyMonSpecialMod:: db wEnemyMonAccuracyMod:: db wEnemyMonEvasionMod:: dbpokered: disassembly of Pokémon Red and Blue · engine/battle/effects.asm#L351-L377 — the user's own stat mods; an evasion +1 effect indexes byte $0F − $0A = 5, the evasion mod, and steps it onceStatModifierUpEffect: ld hl, wPlayerMonStatMods ld de, wPlayerMoveEffect ldh a, [hWhoseTurn] and a jr z, .statModifierUpEffect ld hl, wEnemyMonStatMods ld de, wEnemyMoveEffect .statModifierUpEffect ld a, [de] sub ATTACK_UP1_EFFECT cp EVASION_UP1_EFFECT + $3 - ATTACK_UP1_EFFECT ; covers all +1 effects …pokered: disassembly of Pokémon Red and Blue · engine/battle/effects.asm#L539-L598 — the target's stat mods; an accuracy −1 effect indexes byte $16 − $12 = 4, the accuracy mod, and steps it onceStatModifierDownEffect: ld hl, wEnemyMonStatMods ld de, wPlayerMoveEffect ld bc, wEnemyBattleStatus1 ldh a, [hWhoseTurn] and a jr z, .statModifierDownEffect ld hl, wPlayerMonStatMods … ld a, [de] sub ATTACK_DOWN1_EFFECT cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers all -1 effects …Checked by claude, 2026-11-04 — read the six move lines, the effect constants (L17–L30), the stat-mod layout (wram.asm L546–L552, L568–L574), and StatModifierUpEffect and StatModifierDownEffect at the pinned commit, which step a +1 or −1 effect's stat mod once and only the …2 effects twice; no line in moves.asm uses ACCURACY_DOWN2, ACCURACY_UP2, EVASION_UP2, or EVASION_DOWN2Checked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: "No move changes either stat by two" is cut (it rested on a search); the stat order is quoted.

A stage's effect on the hit chance is accuracy-stages: one evasion stage up scales the accuracy byte by 66/100. No Pokémon learns Kinesis by level in data/pokemon/evos_moves.asm or starts with it in its base stats.

Outside link battles, an enemy's stat-lowering effect first fails when a random byte is below 64, 1 time in 4; the player's moves skip that roll. A move whose main effect lowers a stat, such as Sand-Attack or Smokescreen, then faces the normal accuracy test, while a damaging move's side effect instead takes hold only on a byte below 85, 85 times in 256. pokered/enemy-stat-down-miss

About: Pokémon Red and Blue Hit chance

Value: miss below 64 · side effect below 85 · of 256

Codepokered: disassembly of Pokémon Red and Blue · engine/battle/effects.asm#L539-L571StatModifierDownEffect: … jr z, .statModifierDownEffect ld hl, wPlayerMonStatMods … ld a, [wLinkState] cp LINK_STATE_BATTLING jr z, .statModifierDownEffect call BattleRandom cp 25 percent + 1 ; chance to miss by in regular battle jp c, MoveMissed … …pokered: disassembly of Pokémon Red and Blue · macros/data.asm#L3DEF percent EQUS "* $ff / 100"pokered: disassembly of Pokémon Red and Blue · constants/move_effect_constants.asm#L25-L78 — every main stat-lowering effect sits below the first side effect, $44, so only the side effects take the 85-in-256 branchconst ATTACK_DOWN1_EFFECT ; $12 … const EVASION_DOWN1_EFFECT ; $17 … const ATTACK_DOWN2_EFFECT ; $3A … const EVASION_DOWN2_EFFECT ; $3F … const ATTACK_DOWN_SIDE_EFFECT ; $44 … const SPECIAL_DOWN_SIDE_EFFECT ; $47pokered: disassembly of Pokémon Red and Blue · data/moves/moves.asm#L158 — a damaging move (20 power) with a stat-lowering side effectmove BUBBLE, SPEED_DOWN_SIDE_EFFECT, 20, WATER, 100, 30Sand-Attack and Smokescreen (100%), Kinesis (80%), and Flash (70%) lower the target's accuracy by one stage; Double Team and Minimize (100%) raise the user's evasion by one stage. CodeChecked by claude, 2026-11-04 — read StatModifierDownEffect from its entry to the MoveHitTest call, the effect constants' order (L25–L78), and Bubble's line at the pinned commit; on the player's turn (hWhoseTurn 0) it jumps past the first roll; a side-effect move (effect $44 or above) branches before MoveHitTest to its own roll; 25 * $ff / 100 + 1 is 64 and 33 * $ff / 100 + 1 is 85 in integer mathRevised after a check by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: The effect constants' order and Bubble's line are quoted.

Pidgey learns Sand-Attack at level 5, and a wild or trainer Pokémon knows the moves its learnset gives up to its level; so the level-5 Pidgey on Route 1 (the last of its 10 grass slots, 3 encounters in 256) and on Route 2 (the fifth slot, 25 in 256), and the rival's level-9 Pidgey on Route 22, can use it. pokered/early-sand-attack

About: Pokémon Red and Blue Hit chance

Value
{
 "learnLevel": 5,
 "route1": {
  "slot": 9,
  "level": 5,
  "chance": 3,
  "of": 256
 },
 "route2": {
  "slot": 4,
  "level": 5,
  "chance": 25,
  "of": 256
 },
 "rivalRoute22": {
  "level": 9
 }
}
Codepokered: disassembly of Pokémon Red and Blue · data/pokemon/evos_moves.asm#L596-L601PidgeyEvosMoves: … ; Learnset db 5, SAND_ATTACKpokered: disassembly of Pokémon Red and Blue · engine/battle/core.asm#L6083-L6102.copyStandardMoves ; for a wild mon, first copy default moves from the mon header … predef WriteMonMoves ; get moves based on current levelpokered: disassembly of Pokémon Red and Blue · engine/pokemon/evos_moves.asm#L409-L472 — each learnset move at or below the level is written into a free slot, or after shifting out the oldestld a, [hli] ; read level of next move in learnset and a jp z, .done ; end of list ld b, a ld a, [wCurEnemyLevel] cp b jp c, .done ; mon level < move level (assumption: learnset is sorted by level) … ; try to find an empty move slot … ; no empty move slots found … …pokered: disassembly of Pokémon Red and Blue · data/wild/maps/Route1.asm#L1-L12Route1WildMons: def_grass_wildmons 25 ; encounter rate db 3, PIDGEY db 3, RATTATA db 3, RATTATA db 2, RATTATA db 2, PIDGEY db 3, PIDGEY db 3, PIDGEY db 4, RATTATA db 4, PIDGEY db 5, PIDGEYpokered: disassembly of Pokémon Red and Blue · data/wild/maps/Route2.asm#L1-L7Route2WildMons: def_grass_wildmons 25 ; encounter rate db 3, RATTATA db 3, PIDGEY db 4, PIDGEY db 4, RATTATA db 5, PIDGEYpokered: disassembly of Pokémon Red and Blue · data/wild/probabilities.asm#L21-L26 — slots count from 0, so slot 4 is the fifth and slot 9 the tenthwild_chance 25 ; 25/256 = 9.8% chance of slot 4 … wild_chance 3 ; 3/256 = 1.2% chance of slot 9A second random byte, which the generator updates along with the first, then picks one of the map's 10 slots, which have 51, 51, 39, 25, 25, 25, 13, 13, 11, and 3 chances in 256. Codepokered: disassembly of Pokémon Red and Blue · data/trainers/parties.asm#L487-L494Rival1Data: … ; Route 22 db $FF, 9, PIDGEY, 8, SQUIRTLE, 0pokered: disassembly of Pokémon Red and Blue · engine/battle/read_trainer_party.asm#L64-L78 — a $FF party gives each Pokémon its own level, then adds it to the trainer's party.SpecialTrainer … ld a, [hli] and a ; have we reached the end of the trainer data? jr z, .AddLoneMove ld [wCurEnemyLevel], a ld a, [hli] ld [wCurPartySpecies], a … call AddPartyMonpokered: disassembly of Pokémon Red and Blue · engine/pokemon/add_mon.asm#L190-L193predef WriteMonMovesChecked by claude, 2026-11-04 — read Pidgey's learnset, LoadEnemyMonData's wild-move path into WriteMonMoves, WriteMonMoves' level test and move write (L409–L472), the two route tables, the slot chances (probabilities.asm L21–L26), the rival's Route 22 party, and ReadTrainer's per-level path into AddPartyMon, whose _AddPartyMon calls WriteMonMoves, at the pinned commitChecked by a second AI model, 2026-10-21.Revised after a check by a second AI model, 2026-11-04: Slot numbers are now the last of 10 slots (3 in 256) and the fifth (25 in 256), quoted.

Route 1's other Pidgey are levels 2–4 and know only Gust. Rattata and Spearow, the other early wild Pokémon, learn no accuracy or evasion move.