Open Routes 35 to 37, the National Park and Ecruteak to the Fog Badge (#32)
Enable Route 35, Route 36, Route 37, the National Park and its gates, Ecruteak City and its buildings, the Tin Tower entrance, the Wise Trio's room and both floors of the Burned Tower. The story runs from Floria, the SquirtBottle and Sudowoodo through the Kimono Girls' HM03 Surf, the rival in the Burned Tower and the beasts' release to Ecruteak Gym, Morty, the FOGBADGE and TM30. Port roaming Pokémon (InitRoamMons, UpdateRoamMons, JumpRoamMons, CheckEncounterRoamMon) with their state in the save; only Continue moves them on restore, so a failed import's rollback keeps them in place. Port the Bug-Catching Contest: registration on contest days, Park Balls, contestants, the timer, QUIT, the catch-and-swap prompt, judging from the ROM's contestant table, prizes and the saved contest state. Port the Game Corner's SlotMachine and CardFlip on a new realtime tile screen that advances two frames per tick with buffered buttons: reel strips and scrolling, bias tables, the seven streak, Golem and Chansey, payouts, the Card Flip board, cursor and navigation. Their tilemaps are checked against the ROM's own data. Also port getnum, a plain warp that continues its script on the new map, and PokemonNames' EGG entry. A trainer whose script is ObjectEvent (the Burned Tower rival) is no longer sighted once its own flag is set, as the original's read of bit 1 of wNumKeyItems gives with the usual key items. The playthrough walks through the National Park and continues to Morty; its driver chooses moves by type matchup, buys at Marts and uses Super Potions and Awakenings in trainer battles. New tests cover roaming, the contest, the Game Corner and Ecruteak's side content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0930b780fc
commit
2640fa2725
31 files changed
+4743
-91
No files matched your search
@@ -47,6 +47,10 @@ These paths refer to the pinned [PRET source](https://github.com/pret/pokecrysta
|
||||
| `game/scripts/ruins.ts` | `engine/events/unown_walls.asm`, `data/events/unown_walls.asm` | `DisplayUnownWords` as an overlay screen with the chamber tileset's Unown letters, `HoOhChamber` and `OmanyteChamber`. |
|
||||
| `game/scripts/goldenrod.ts`, `game/world/day-timers.ts` | `engine/events/name_rater.asm`, `haircut.asm`, `lucky_number.asm`, `engine/overworld/time.asm`, `engine/menus/intro_menu.asm` | Name Rater ownership checks, ROM haircut happiness tables, Lucky Number party and box matching with first-winner ties, saved number and Friday countdown with 140-day rollover. |
|
||||
| Goldenrod shops, gifts and prizes | `engine/items/mart.asm`, `engine/pokemon/move_mon.asm` (`GivePoke`), `engine/events/specials.asm` (`GameCornerPrizeMonCheckDex`), `engine/pokedex/new_pokedex_entry.asm` | All five mart types, gift OT/nickname and MAIL, full-party gifts to the box, coin commands and balance boxes, and first-owned prize registration with two A/B pages. Boxed gifts approximate an unspecified stale enemy held item as zero. SlotMachine and CardFlip remain refused. |
|
||||
| Route 35, Route 36, Route 37, Ecruteak and Burned Tower | `home/trainers.asm` (`_CheckTrainerBattle`), `mobile/mobile_41.asm` (`CheckMobileAdapterStatusSpecial`), `engine/overworld/overworld.asm` (`LoadUsedSpritesGFX`, `RefreshSprites`) | These maps' scripts (Floria and the Sudowoodo Squirtbottle battle, Arthur, Sunny, the Itemfinder house, the Kimono Girls and HM03 Surf, Eusine and the rival's Burned Tower cutscene) run on already-ported primitives. `checkTrainers` skips a map trainer whose script is `ObjectEvent` (the Burned Tower rival) once its own flag is set: the original reads `ObjectEvent`'s bytes as flag $f251, bit 1 of `wNumKeyItems` through echo RAM, which is set with the usual two or three key items; the other case is unverified. `CheckMobileAdapterStatusSpecial` is unused outside the Japanese release and always clears its result; `LoadUsedSpritesGFX`/`RefreshSprites` are VRAM sprite tile loading, presentation only. |
|
||||
| `game/world/roam-mons.ts` | `engine/overworld/wildmons.asm` (`InitRoamMons`, `CheckEncounterRoamMon`, `UpdateRoamMons`, `JumpRoamMons`), `data/wild/roammon_maps.asm` | Raikou and Entei roam from `InitRoamMons`; Suicune's slot is kept but not started. `UpdateRoamMons` runs on connections, door and pit warps and after one wild battle in sixteen; `JumpRoamMons` on Fly, Teleport and Continue. A roaming beast can take a grass encounter, and the battle writes its HP back or clears the slot. |
|
||||
| Bug-Catching Contest | `engine/events/bug_contest/*.asm`, `maps/Route35NationalParkGate.asm`, `maps/Route36NationalParkGate.asm`, `engine/menus/start_menu.asm` | Registration, Park Balls, contestant selection, the timer on the game clock, out of balls, QUIT, judging from `BugContestantPointers` with ties to the earlier entry, prizes and `CheckPartyFullAfterContest`. The contest state saves. The status box is a text page above the start menu. No sound. |
|
||||
| `game/scripts/slot-machine.ts`, `game/scripts/card-flip.ts` | `engine/games/slot_machine.asm`, `engine/games/card_flip.asm`, `engine/gfx/cgb_layouts.asm` | Both on a realtime tile screen (two frames per tick, buffered buttons). Slots: reel strips, spin rates and scrolling, bias tables with the lucky machine and seven streak, reel 3's Golem and Chansey replay with their sprites, payouts. Card Flip: deck, 12×11 board, cursor sprites and `ChooseCard_HandleJoypad`, paytable. Tilemaps are checked against the ROM. Golem's walk uses two ROM frames with flips; no sound. |
|
||||
| Text interpreter | `macros/scripts/text.asm`, `constants/charmap.asm`, `home/text.asm` | Literal/far text, RAM names and string buffers from native state, numbers of dots, and sound or pause cues (consumed). `text_asm` and other RAM reads are refused. |
|
||||
|
||||
Supported event opcodes are explicit in the interpreter switch. Audio commands consume their operands, but sound sequencing is pending; those opcodes do not imply complete audiovisual behavior. `pause` holds the current text or waits the original number of overworld ticks.
|
||||
|
||||
+14
-2
@@ -16,7 +16,8 @@ The emulator-backed prototype is now at `/reference.html`. The default applicati
|
||||
| Opening story: New Bark Town to Mr. Pokémon, the rival and the return to Elm | Done |
|
||||
| Route 29, Cherrygrove City, Route 30 and their buildings | Done |
|
||||
| Route 31, Violet City, Sprout Tower and Falkner's gym | Done (Dark Cave: Violet entrance only) |
|
||||
| Goldenrod City, Whitney and local shops and gifts | Done (Game Corner minigames pending) |
|
||||
| Goldenrod City, Whitney and local shops and gifts | Done |
|
||||
| Routes 35–37, the National Park, Ecruteak and Morty | Done (Tin Tower closed) |
|
||||
| Wild and trainer battles, capture and the catching tutorial | Done for the areas that are open |
|
||||
| 1. Complete the overworld foundation | Done |
|
||||
| 2. Opening story and first battle slice | Mostly done |
|
||||
@@ -388,11 +389,22 @@ The numbered sections below keep their full scope. Each one opens with a checkli
|
||||
- Local validation (2026-10-06): 676 unit tests passed, 3 skipped (scratch tests excluded); without a ROM, 163 passed and 516 skipped. Both builds, reference/profile checks, vendor integrity and release isolation passed. Browser checks: 157 passed, 21 skipped, 12 known WebKit menu failures (#70). CI and physical-device acceptance were not run.
|
||||
- Remaining: SlotMachine and CardFlip, radio broadcasts and rematches (#30), breeding (#29), the later Rocket takeover, routes beyond the Route 35 gate, mobile/link features and audio. This increment does not complete #32 or start #33. Boxed gifts still approximate the original stale enemy held-item byte as zero when no item is specified.
|
||||
|
||||
## Implemented: Routes 35–37, the National Park and Ecruteak to the Fog Badge (board #32, increment C)
|
||||
|
||||
- Route 35, Route 36, Route 37, the National Park and both of its gates, Ecruteak City with its Pokémon Center, Mart, gym, Dance Theater and houses, the Tin Tower entrance, the Wise Trio's room and the Burned Tower's two floors are open. Tin Tower itself and the Route 38 and Route 42 gates stay closed.
|
||||
- The story runs: Floria and the SquirtBottle, Sudowoodo, the Kimono Girls and HM03 Surf, Eusine and the rival in the Burned Tower, the beasts' release (`ReleaseTheBeasts`, `InitRoamMons`), Ecruteak Gym opening, its trainers and Morty, the FOGBADGE and TM30.
|
||||
- Roaming Pokémon (`game/world/roam-mons.ts`): `InitRoamMons`, `UpdateRoamMons` on connections, door and pit warps and one wild battle in sixteen, `JumpRoamMons` on Fly, Teleport and Continue, and `CheckEncounterRoamMon` in the grass. Suicune's slot is kept but not started, as the ROM leaves it. Saves gain `roamMons` and `roamMonsMap`. A rollback restore (a failed import) keeps the beasts in place; only Continue moves them.
|
||||
- The Bug-Catching Contest: the gates on contest days, `GiveParkBalls`, `SelectRandomBugContestContestants`, `ContestDropOffMons`/`ContestReturnMons`, the timer on the game clock, running out of balls, QUIT in the start menu, the catch-and-swap prompt, `BugContestJudging` with the ROM's contestant table and prizes, and `CheckPartyFullAfterContest`. The contest state saves. The start menu's balls and catch status shows as a text page above the menu.
|
||||
- The Game Corner: `SlotMachine` (reels with their spin rates and scrolling, the normal and lucky bias tables, the seven streak, Golem and Chansey with the egg, payouts, the 9999-coin cap) and `CardFlip` (deck, board, cursor and group navigation, paytable). They run on a realtime tile screen, which advances two frames per world tick with the buffered button. The Card Flip board and slot frame are checked tile by tile against the ROM's own tilemaps.
|
||||
- Engine fixes found on the way: `getnum`, a plain `warp` that continues its script on the new map, `PokemonNames`' EGG entry, and a map trainer whose script is `ObjectEvent` (the Burned Tower rival) is no longer sighted once its own flag is set. In the original, its "beaten" check reads `ObjectEvent`'s bytes as flag $f251, bit 1 of `wNumKeyItems` through echo RAM, which is set with the usual two or three key items; the other case has not been checked against the original.
|
||||
- Tests: `tests/roaming.test.ts`, `tests/bug-contest.test.ts`, `tests/game-corner.test.ts` and `tests/ecruteak.test.ts`. The playthrough continues through the National Park to Floria, Sudowoodo, the Kimono Girls, the Burned Tower and Morty; its driver now chooses moves by type matchup, buys at Marts, and uses Super Potions and Awakenings in trainer battles.
|
||||
- Remaining: Tin Tower and the Clear Bell, Suicune's appearances, the Game Corner's Golem walk cycle (two ROM frames with flips), the contest status box layout, radio and rematches (#30), breeding (#29), routes beyond Ecruteak and the gyms after Morty, mobile and link features, and audio.
|
||||
|
||||
## Native battles: current state
|
||||
|
||||
The battle core, ROM tables, encounter hooks, battle UI and whiteout hooks are present. Unit tests cover wins, escape, loss, experience, move learning and capture; reference tests compare damage, type effectiveness, stat calculation and experience curves. Browser tests drive a test-only wild encounter through the real UI: victory with level-up and move learning, escape, whiteout, catching with a nickname, keyboard and on-screen D-pad menu navigation, mid-battle backup restore, rollback of unsupported effects, switching through the party menu and a Potion from the Items pocket. Real Route 29 encounters now use the ROM's encounter tables. Every ball can be thrown; only the contest's Park Ball handling remains.
|
||||
|
||||
This is still not a complete new game. The Pokégear's radio, the Pokédex's area view, search and other modes, story progression beyond Goldenrod City and Whitney's gym, and audio remain unfinished. The start menu opens the party menu and the pack, and Select uses the registered item, such as the Bicycle; the PCs store Pokémon, items and decorations. Surfing and terrain animation now have native implementations; later maps remain gated. Save slots, online Link, friends and real-world steps come later.
|
||||
This is still not a complete new game. The Pokégear's radio, the Pokédex's area view, search and other modes, story progression beyond Ecruteak City and Morty's gym, and audio remain unfinished. The start menu opens the party menu and the pack, and Select uses the registered item, such as the Bicycle; the PCs store Pokémon, items and decorations. Surfing and terrain animation now have native implementations; later maps remain gated. Save slots, online Link, friends and real-world steps come later.
|
||||
|
||||
## 1. Complete the overworld foundation
|
||||
|
||||
|
||||
Reference in new issue
Block a user