v0.1 ⌊ALPHA⌉
Cite as
pret/pokered
Original
https://github.com/pret/pokered
Pinned
pret/pokered @ af519899719f0754965776faac0e836a3b906e6d
Accessed
2026-10-20
Licence
none stated (no LICENSE file; GitHub reports no license)
Credit
The pret community, about 78 GitHub contributors (2026-10-20), led in commit count by kanzure, dannye, Rangi42, iimarckus and yenatch. See https://github.com/pret/pokered/graphs/contributors. The labels and comments quoted in claims (e.g. "bug: should be EFFECTIVE (10)") are theirs.
Notes
Builds the English (UE) Pokémon Red and Blue ROMs (README, roms.sha1: Red ea9bcae6…, Blue d7037c83…), not the Japanese Red/Green. Line numbers in claims refer to the pinned commit.

Cited on

Claims (19)

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 → ×½.data/types/type_matchups.asm L1–85T4
Red and Blue's type chart (TypeEffects) has 82 non-neutral (attacker, defender, multiplier) rows over 15 types, ended by -1; unlisted pairs are neutral.data/types/type_matchups.asm L1–85constants/type_constants.asm L1–28T3
Multipliers are integers scaled by 10 (SUPER_EFFECTIVE 20, NOT_VERY_EFFECTIVE 05, and NO_EFFECT 00); the table never uses EFFECTIVE (10) or MORE_EFFECTIVE (15).constants/battle_constants.asm L60–65T3
AdjustDamageForMoveType applies STAB before any type row: damage+⌊damage/2⌋ when the move's type matches either attacker type.engine/battle/core.asm L5101–5125T3
In table order, each TypeEffects row matching the move's type and either defender type sets damage to ⌊damage×value/10⌋; 0 marks a miss.engine/battle/core.asm L5127–5185T3
Under two ½ rows (×¼), 2 or 3 damage truncates to 0 and the move misses; 4 damage gives 1.engine/battle/core.asm L5171–5176data/types/type_matchups.asm L14T4
Truncating after each row costs a net-neutral hit damage when its ½ row comes first: Ice against Water/Flying takes 3 to ⌊3 × 5 / 10⌋ = 1, then ⌊1 × 20 / 10⌋ = 2.data/types/type_matchups.asm L33–36T4
The Red/Blue type chart gives Ghost-type moves no effect on Psychic types.data/types/type_matchups.asm L78T3
In Red and Blue, a Saffron Gym trainer's after-battle line contradicts the table: “Psychic #MON fear only ghosts and bugs!”text/SaffronGym.asm L135–139T3
Each matching row overwrites the byte wDamageMultipliers, 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.engine/battle/core.asm L5147–5153engine/battle/display_effectiveness.asm L1–10engine/battle/core.asm L3718–3733engine/battle/core.asm L3218–3229T3
Since the text follows the last row, an Ice move against Water/Flying, net ×1 (½ row at L33, then 2× at L36), prints “It's super effective!”.data/types/type_matchups.asm L33–36T4
A Ground move against Rock/Flying (×0 row at L9, then ×2 at L55) does 0 damage and prints the plain miss text, not “doesn't affect”: the byte holds the last row's 20.data/types/type_matchups.asm L9data/types/type_matchups.asm L55T4
SetDamageEffects moves (Sonic Boom, Seismic Toss, Dragon Rage, Night Shade, Psywave, and Super Fang) jump to the hit test, skipping CalculateDamage and AdjustDamageForMoveType, the only damage routine that reads TypeEffects.engine/battle/core.asm L3134–3139data/battle/set_damage_effects.asm L1–6data/moves/moves.asm L62T3
The trainer AI's AIGetTypeEffectiveness stops at the first row matching either defender type, ignoring dual-type products.engine/battle/core.asm L5187–5223engine/battle/trainer_ai.asm L207–216T3
The type constants still define BIRD ($06), with a name string, but no TypeEffects row names it.constants/type_constants.asm L11data/types/names.asm L40T3
Type picks the stats: Fire, Water, Grass, Electric, Psychic, Ice, and Dragon (SPECIAL upward) use Special on both sides; the rest use Attack against Defense.engine/battle/core.asm L4040–4042constants/type_constants.asm L19–26T3
In Red and Blue, a damaging move runs CriticalHitTest, CalculateDamage (base formula), AdjustDamageForMoveType (STAB, then type rows), RandomizeDamage, and then MoveHitTest (accuracy).engine/battle/core.asm L3140–3150engine/battle/core.asm L5531–5543T3
CalculateDamage computes ⌊⌊(⌊2×Level/5⌋+2)×Power×Attack/Defense⌋/50⌋, caps it at 997, and adds 2, so the type step receives 2–999.engine/battle/core.asm L4343–4459T3
RandomizeDamage multiplies damage by a random byte, 217–255, and integer-divides by 255, leaving 0 or 1 damage untouched.engine/battle/core.asm L5420–5454macros/data.asm L3T3