| Type effectiveness | - 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. T3 - 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). T3 - In table order, each
TypeEffects row matching the move's type and either defender type sets damage to ; 0 marks a miss. T3 - Under two ½ rows (×¼), 2 or 3 damage truncates to 0 and the move misses; 4 damage gives 1. T4
- 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. T4
- The Red/Blue type chart gives Ghost-type moves no effect on Psychic types. T3
- In Red and Blue, a Saffron Gym trainer's after-battle line contradicts the table: “Psychic #MON fear only ghosts and bugs!” T3
- Bulbapedia reports that the Gen 1 Ghost → Psychic ×0 “may have been an error”, citing Nintendo strategy guides, two anime episodes, and the Saffron Gym line. T1
- 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. T3 - 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!”. T4
- 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. T4
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. T3- The trainer AI's
AIGetTypeEffectiveness stops at the first row matching either defender type, ignoring dual-type products. T3 - The type constants still define
BIRD ($06), with a name string, but no TypeEffects row names it. T3
| - Crystal's type chart (
TypeMatchups) has 108 non-neutral rows over 17 types, then a -2 marker, Normal→Ghost and Fighting→Ghost ×0, and a -1 end. T3 - Multipliers are unchanged from Red/Blue: scaled by 10, with
SUPER_EFFECTIVE 20, NOT_VERY_EFFECTIVE 05, NO_EFFECT 00, and EFFECTIVE 10. T3 - Crystal's type constants add
STEEL (physical), DARK (special), and an unused CURSE_TYPE named “???”; BIRD remains, still with no rows. T3 - Struggle returns from
BattleCommand_Stab at once, so it skips weather, badge boosts, STAB, and the type chart. T3 - Each matching row computes ; a nonzero product becomes , raised to 1 if that truncates to 0. T3
- A ×0 row now marks the attack as missed outright, instead of relying on the damage reaching 0. T3
- 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. T4
- Against an identified (Foresight) target, the loop stops at the -2 marker, skipping the Normal→Ghost and Fighting→Ghost immunities after it. T3
- After the loop,
CheckTypeMatchup'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. T3 - An Ice move against Water/Flying (½ at L35, 2× at L39) prints no effectiveness text: the combined value goes 10 → 5 → 10. T4
- Row order still matters: an Ice move against Water/Flying takes 3 damage to 1, then 2 (½ row at L35, 2× at L39). T4
- Crystal's type chart makes Ghost-type moves super effective on Psychic types. T3
- 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 → ×½. T4
| - Emerald's type chart,
gTypeEffectiveness, is a flat u8 array of 108 non-neutral (attacker, defender, multiplier) rows over 17 types, then a TYPE_FORESIGHT marker, two Ghost immunities, and TYPE_ENDTABLE. T3 - Emerald keeps the Game Boy encoding, now named
TYPE_MUL_*: 20 super effective, 10 normal, 5 not effective, and 0 no effect. T3 - Emerald's table holds the same 110 rows as Crystal's, in the same order: no new type and no changed matchup. T4
TYPE_MYSTERY (9), named "???", sits between the physical and special types and has no rows. T3- For each row of the move's type,
ModulateDmgByType runs once per distinct target type it matches: , raised from 0 to 1 unless the multiplier is 0. T3 - The text comes from flags
ModulateDmgByType sets per row: a 2× row cancels an earlier not-very-effective flag, a ½ row an earlier super-effective one, and ×0 sets "doesn't affect", clearing both. T3 - Against a Foresight target, the loop breaks at the
TYPE_FORESIGHT row, skipping the Normal→Ghost and Fighting→Ghost immunities after it. T3 - Struggle skips
Cmd_typecalc entirely, so neither STAB nor the type chart touches it. T3 Cmd_typecalc flags a Ground move against a Levitate target as missed and “doesn't affect”, and walks no type row. T3- After the rows, a Wonder Guard target makes a damaging move miss on the turn it attacks, unless the move carries the super-effective flag without the not-very-effective one. T3
- Row order still matters: an Ice move against Water/Flying takes 3 damage to 1, then 2 (½ row at L369, 2× at L373). T4
|