v0.1 ⌊ALPHA⌉
Cite as
pret/pokecrystal
Original
https://github.com/pret/pokecrystal
Pinned
pret/pokecrystal @ 97187cd21b15e9a266a786318c851848f2fac24b
Accessed
2026-10-20
Licence
none stated (no LICENSE file; GitHub reports no license)
Credit
The pret community, about 92 GitHub contributors (2026-10-20), led in commit count by yenatch, Rangi42, kanzure, roukaour and PikalaxALT. See https://github.com/pret/pokecrystal/graphs/contributors. Its docs/bugs_and_glitches.md catalogues known bugs with fixes.
Notes
Builds the English (UE) Crystal ROMs v1.0 and v1.1 and the Australian release (README, roms.sha1), not Gold/Silver (pret/pokegold is a separate project, not read here).

Cited on

Claims (19)

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.data/types/type_matchups.asm L1–118constants/type_constants.asm L7–37T3
Multipliers are unchanged from Red/Blue: scaled by 10, with SUPER_EFFECTIVE 20, NOT_VERY_EFFECTIVE 05, NO_EFFECT 00, and EFFECTIVE 10.constants/battle_constants.asm L20–25T3
Crystal's type constants add STEEL (physical), DARK (special), and an unused CURSE_TYPE named “???”; BIRD remains, still with no rows.constants/type_constants.asm L9–37data/types/names.asm L37T3
BattleCommand_Stab applies weather and badge type boosts, then STAB (damage+⌊damage/2⌋ if either attacker type matches), then the type chart.engine/battle/effect_commands.asm L1251–1288T3
A comment in pokecrystal's BattleCommand_Stab expands STAB as “Same Type Attack Bonus”.engine/battle/effect_commands.asm L1214–1215T3
Struggle returns from BattleCommand_Stab at once, so it skips weather, badge boosts, STAB, and the type chart.engine/battle/effect_commands.asm L1216–1219T3
Each matching row computes damage×value; a nonzero product becomes ⌊product/10⌋, raised to 1 if that truncates to 0.engine/battle/effect_commands.asm L1312–1386T3
A ×0 row now marks the attack as missed outright, instead of relying on the damage reaching 0.engine/battle/effect_commands.asm L1329–1336T3
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.engine/battle/effect_commands.asm L1361–1373T4
Against an identified (Foresight) target, the loop stops at the -2 marker, skipping the Normal→Ghost and Fighting→Ghost immunities after it.engine/battle/effect_commands.asm L1302–1310data/types/type_matchups.asm L112–116T3
After the loop, CheckTypeMatchup's combined value (m=⌊m×row/10⌋ from 10) replaces the effectiveness byte, so the text reflects every row: ×4 is 40, ×¼ is 2, and ½ with 2× is 10.engine/battle/effect_commands.asm L1388–1396engine/battle/effect_commands.asm L1405–1471engine/battle/effect_commands.asm L2324–2333engine/battle/effect_commands.asm L2197–2202T3
An Ice move against Water/Flying (½ at L35, 2× at L39) prints no effectiveness text: the combined value goes 10 → 5 → 10.data/types/type_matchups.asm L35–39T4
Row order still matters: an Ice move against Water/Flying takes 3 damage to 1, then 2 (½ row at L35, 2× at L39).data/types/type_matchups.asm L35–39T4
Crystal's type chart makes Ghost-type moves super effective on Psychic types.data/types/type_matchups.asm L94T3
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–118T4
Type still picks the stats: Steel is physical (below SPECIAL); Dark is special, using Special Attack against Special Defense.engine/battle/effect_commands.asm L2543–2545constants/type_constants.asm L9–35T3
A plain damaging move runs critical, damagestats, damagecalc (base formula, item boosts, and critical ×2), stab (weather, badges, STAB, and type rows), damagevariation, and then checkhit (accuracy).data/moves/effects.asm L5–14engine/battle/effect_commands.asm L2983–3023T3
The random factor is unchanged from Red/Blue, a random byte from 217 to 255 over 255.engine/battle/effect_commands.asm L1496–1544T3
Emerald's table holds the same 110 rows as Crystal's, in the same order: no new type and no changed matchup.data/types/type_matchups.asm L1–118T4