Open Goldenrod City, Whitney's gym and the Radio Tower quiz (#32)
Enable Goldenrod City and its buildings, the department store with its elevator and rooftop, the Underground and its rooms, the Radio Tower floors and the Route 35 gate. Port what their scripts need: the herb shop, bargain shop, pharmacy and rooftop sale marts with ROM stock, prices and text; the Name Rater; the haircut brothers' happiness tables; the Lucky Number show over the party and boxes with its saved number and Friday countdown (RTC day timers with the 140-day wrap); coin and money balance boxes; Game Corner prize registration through NewPokedexEntry; gift Pokémon to the box when the party is full, with OT, nickname and MAIL (Kenya's 15-letter first line now stores). Saves gain hallOfFame, timers and luckyNumber, with defaults for older saves, and wUndergroundSwitchPositions joins the saved script bytes. The playthrough continues to the Bicycle, Whitney, the PLAINBADGE and the radio card. SlotMachine and CardFlip are still refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f4ef244fc7
commit
0930b780fc
19 files changed
+1596
-126
No files matched your search
@@ -45,6 +45,8 @@ These paths refer to the pinned [PRET source](https://github.com/pret/pokecrysta
|
||||
| `game/scripts/screen.ts`, `game/rendering/tile-screen.ts`, `game/rom/font.ts` | `home/tilemap.asm`, `engine/gfx/load_font.asm` (`_LoadStandardFont`, `LoadFrame`) | Tile screens: a 20x18 tilemap with background palettes and sprites over it, built by a minigame or special from ROM graphics and answered with buttons. Blinking sprites follow bit 4 of the frame counter. Overlay screens (a menu box) leave the map visible around them. The standard font and the option's textbox frame load as 2bpp tiles. |
|
||||
| `game/scripts/unown-puzzle.ts` | `engine/games/unown_puzzle.asm`, `engine/events/specials.asm` (`UnownPuzzle`), `engine/gfx/cgb_layouts.asm` (`_CGB_UnownPuzzle`) | `_UnownPuzzle`: `InitUnownPuzzlePiecePositions` with Random, the d-pad rules, picking up and placing pieces, `CheckSolvedUnownPuzzle`, and the graphics (`ConvertLoadedPuzzlePieces`' doubling, the piece borders, the cursor and START/CANCEL, the OAM layouts) and palettes from the ROM. Sounds are not played. |
|
||||
| `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. |
|
||||
| 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.
|
||||
|
||||
+15
-3
@@ -16,6 +16,7 @@ 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) |
|
||||
| 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 |
|
||||
@@ -362,11 +363,11 @@ The numbered sections below keep their full scope. Each one opens with a checkli
|
||||
- The pack's TM/HM pocket holds counts by number: TMs and HMs are received, listed with their moves, given (TMs) and taught with ABLE/NOT ABLE, the compatibility and "already knows" checks and LearnMove. A TM is used up and makes the Pokémon happier; an HM stays.
|
||||
- The Johto badges raise the battle Pokémon's stats (BadgeStatBoosts, with the PlainBadge/MineralBadge swap and the Glacier Badge register bug), compared against the unmodified routine for all 256 badge bytes in `tests/reference-badges.spec.ts`.
|
||||
- `tests/playthrough.test.ts` now continues to Route 31 (Mom's call), Sprout Tower (Elder Li's Flash), Falkner (the ZEPHYRBADGE, TM31 and the aide's call), the Togepi Egg, Kyle's Onix, Flash in Dark Cave, Wade's number and Earl's blackboard. `tests/violet.test.ts` covers the other answers.
|
||||
- Kenya's MAIL is checked as the original does, but it is given at the Route 35 gate, which is closed; its text (a 15-letter first line) is one the port's MAIL model cannot yet store. Wade's calls, rematches and gifts come with the phone (board #30).
|
||||
- Kenya's MAIL is checked as the original does; the Goldenrod increment below opens the Route 35 gate and adds storage of its gift text. Wade's calls, rematches and gifts come with the phone (board #30).
|
||||
|
||||
## Implemented: Route 32 to Route 34, the Ruins of Alph and Azalea Town (board #32)
|
||||
|
||||
- Route 32 with its Pokémon Center, the Ruins of Alph (outside, the four chambers, their item and word rooms, the inner chamber and the research center) and both gates, Union Cave's three floors, Route 33, Azalea Town with its Pokémon Center, Mart, Kurt's house, the charcoal kiln and the gym, the Slowpoke Well, the Ilex Forest gates and forest, Route 34 and the Day-Care are open. Goldenrod City, Route 36 and the Pokémon Centers' second floor stay closed.
|
||||
- Route 32 with its Pokémon Center, the Ruins of Alph (outside, the four chambers, their item and word rooms, the inner chamber and the research center) and both gates, Union Cave's three floors, Route 33, Azalea Town with its Pokémon Center, Mart, Kurt's house, the charcoal kiln and the gym, the Slowpoke Well, the Ilex Forest gates and forest, Route 34 and the Day-Care are open. Goldenrod City opens in the next increment below; Route 36 and the Pokémon Centers' second floor stay closed.
|
||||
- The story runs: the Miracle Seed, Kurt's run to the Slowpoke Well, the Rocket grunts there, the Lure Ball, Bugsy and the HIVEBADGE, the rival at Azalea's west end, the Farfetch'd herding in Ilex Forest (`wFarfetchdPosition`), HM01 from the charcoal master and the Cut tree.
|
||||
- Saved WRAM bytes that scripts read and write directly (`readmem`, `writemem`, `loadmem`) are kept by PRET label in the save's `memory` (`SAVED_WRAM`, verified by `check:reference`): so far `wFarfetchdPosition` and `wKurtApricornQuantity`.
|
||||
- Kurt makes balls: `SelectApricornForKurt` lists the apricorns in `ApricornBalls` order with their counts, asks how many with the mart's 1-99 stepper and takes them; `verbosegiveitemvar` hands over the balls the next day (`VAR_KURT_APRICORNS`, `ENGINE_KURT_MAKING_BALLS` cleared by the daily reset).
|
||||
@@ -376,11 +377,22 @@ The numbered sections below keep their full scope. Each one opens with a checkli
|
||||
- `tests/playthrough.test.ts` continues through Route 32, Union Cave, Azalea Town, the Slowpoke Well, Bugsy, the rival and Ilex Forest to the Route 34 gate; its helpers now live in `tests/playthrough-driver.ts`, and `PLAYTHROUGH_SAVES` keeps each stage's save. `tests/ruins.test.ts` solves the Kabuto puzzle through the world and catches Unown; `tests/azalea.test.ts` covers Kurt's apricorns.
|
||||
- Still closed or refused here: the Day-Care's deposits and Eggs (board #29), the radios' `MapRadio` and trainers' rematch counts (board #30), the research center's `UnownPrinter` (it needs all 26 letters), the Pokédex's Unown mode, the GS Ball and Celebi shrine (not reachable without the mobile event), and sound.
|
||||
|
||||
## Implemented: Goldenrod City (board #32, increment B)
|
||||
|
||||
- Goldenrod City and its buildings, the department store and elevator, the Underground and its connecting rooms, the Radio Tower and the Route 35 gate are open. The continuous playthrough gets the Bicycle, trains on Route 34, beats Whitney, collects the PLAINBADGE and TM45, and answers the radio card quiz.
|
||||
- The herb shop, bargain shop, pharmacy and rooftop sale use their ROM stock, prices and dialogue. Bargain stock sells once per visit and a purchase closes the shop for the day; the rooftop sale changes stock after the Hall of Fame.
|
||||
- The Name Rater checks the Pokémon's OT and ID. The haircut brothers use the ROM happiness tables. The Lucky Number show checks the party and all boxes, keeps the first winner in a prize tier, and saves its number and Friday countdown with the RTC's 140-day wrap.
|
||||
- Kenya arrives with Randy's name, ID and MAIL. Gift Pokémon can go to the current box when the party is full. Coin vendors and prize menus show the balance; a newly owned prize species shows both Pokédex entry pages before the nickname prompt. An already caught species skips registration.
|
||||
- Saves gain `hallOfFame`, `timers` and `luckyNumber`, with defaults for older saves. `wUndergroundSwitchPositions` joins the saved script bytes. Goldenrod's Pokémon Center handles the GS Ball availability check; other Battle Tower actions remain refused.
|
||||
- `tests/goldenrod.test.ts` covers shops, naming, Kenya and save reload, prize registration, Lucky Number party/box winners, save validation and boxed gifts. `tests/day-timers.test.ts` covers countdown expiry and rollover without a ROM. The 20-stage playthrough reaches Whitney and the radio card.
|
||||
- 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.
|
||||
|
||||
## 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 Violet City and Falkner'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 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.
|
||||
|
||||
## 1. Complete the overworld foundation
|
||||
|
||||
|
||||
Reference in new issue
Block a user