Files
gen1recomp/tests/engine
Shane McGovern 58dfc00538 Extract FRLG gEggMoves so Gen 3 mods see egg moves
The Gen 3 extractor emitted eggCycles/eggGroups but never egg moves, so the
gen3_dexnav hidden-mon roll was inert on FireRed: a hidden mon kept its
level-up moves and could never gain an egg move.

Decode the ROM's own gEggMoves table (pokefirered/src/data/pokemon/
egg_moves.h) into pokemon/egg_moves.lua and expose it the same way as
learnsets/tmhm:

- Versions: EGG_MOVES = 0x25EF0C plus the 20000 species offset, the 0xFFFF
  run terminator and a defensive per-species cap.  The table is one flat u16
  stream of `{ species + 20000, move..., 0xFFFF }` runs with no final
  terminator, so the first word that is neither a header nor a plausible move
  id ends the scan.
- PokemonExtract: extract_egg_moves + write_egg_moves_lua, written to the
  cache by run(), required by ready() so a stale cache re-extracts, and
  returned as pack.eggMoves.  FORMAT_VERSION 3 -> 4.
- Pokemon.eggMoves(species): runtime accessor with the same species coercion
  as Pokemon.learnset; nil for a species with no egg move.
- Schemas: eggMoves on monTables/monRecord/writeMon and the Gen 3 species
  field list, so a mod reads record.eggMoves as move ids and writes names back.
- Versions.CACHE_VERSION 98 -> 99 to force re-extraction.

The table is sparse: species without egg moves are absent rather than an
empty list, all the way from the ROM to the mod record.

Validated against a supported FireRed USA 1.0 dump: 165 species, 973 moves,
<=8 per species, Bulbasaur {113,130,219,204,80,345,320,174}, Mankey
{157,193,96,68,179,251,279,265} (no Toxic), Mew nil.

Tests: new tests/engine/game3_egg_moves.lua (31 checks ROM-free, 39 with a
ROM), gate_gen3_mod_api 734/734, engine tier 587/587, modkit tier 37/37,
lint --gate clean.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-19 10:45:52 +01:00
..
2026-08-28 10:14:44 -04:00
2026-08-18 09:51:22 -04:00
2026-08-18 09:20:07 -04:00
2026-08-18 09:20:07 -04:00
2026-08-18 09:20:07 -04:00
2026-08-24 07:52:05 -04:00
2026-08-24 07:52:05 -04:00
2026-08-24 07:52:05 -04:00
2026-08-24 09:02:56 -04:00
2026-08-28 10:14:44 -04:00
2026-08-31 08:41:02 -04:00
2026-07-19 16:18:18 -04:00
2026-09-02 10:02:32 -04:00
2026-09-11 09:11:34 -04:00
2026-07-19 16:18:18 -04:00
2026-08-28 10:14:44 -04:00
2026-09-18 17:19:05 -04:00
2026-08-11 11:53:30 -04:00
2026-09-18 15:42:32 -04:00
2026-07-19 16:18:18 -04:00
2026-09-18 15:42:32 -04:00
2026-07-19 16:18:18 -04:00
2026-08-28 10:14:44 -04:00
2026-08-31 07:56:27 -04:00
2026-08-28 10:14:44 -04:00
2026-09-11 09:11:34 -04:00
2026-09-18 15:42:32 -04:00
2026-08-06 09:57:31 -04:00
2026-07-30 11:35:57 -04:00
2026-08-28 10:14:44 -04:00
2026-09-09 12:23:55 -04:00
2026-08-25 09:21:33 -04:00
2026-08-06 09:57:31 -04:00
2026-08-21 14:03:25 -04:00
2026-08-28 10:14:44 -04:00
2026-08-24 07:52:05 -04:00
2026-08-28 10:14:44 -04:00
2026-09-03 07:11:31 -04:00
2026-09-16 16:42:59 -04:00
2026-09-18 17:19:05 -04:00
2026-09-18 15:42:32 -04:00
2026-08-18 11:29:50 -04:00
2026-08-18 09:51:22 -04:00
2026-08-10 14:27:00 -04:00
2026-08-28 10:14:44 -04:00
2026-08-28 10:14:44 -04:00
2026-08-28 10:14:44 -04:00
2026-08-28 10:14:44 -04:00
2026-08-26 12:04:06 -04:00
2026-07-25 15:21:49 -04:00
2026-07-25 15:21:49 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 16:55:06 +02:00
2026-08-12 11:38:17 +02:00
2026-08-24 13:07:11 -04:00
2026-08-06 14:36:01 -04:00
2026-08-25 09:16:59 -04:00
2026-08-19 06:41:10 -04:00
2026-08-21 16:36:55 -04:00
2026-08-21 14:38:54 -04:00
2026-08-21 16:36:55 -04:00
2026-09-16 16:42:59 -04:00
2026-08-18 09:20:07 -04:00
2026-09-09 09:46:27 -04:00
2026-08-20 20:36:23 -04:00
2026-09-09 09:46:27 -04:00
2026-09-09 09:46:27 -04:00
2026-08-20 20:07:10 -04:00
2026-07-31 10:45:12 -04:00
2026-08-14 17:07:06 -04:00
2026-08-20 20:07:10 -04:00
2026-08-26 12:04:06 -04:00