Open Route 32 to Route 34, the Ruins of Alph and Azalea Town (#32)

Enable Route 32 and its Pokémon Center, the Ruins of Alph with the four
chambers, item and word rooms, inner chamber and research center, Union
Cave, Route 33, Azalea Town with Kurt's house, the kiln and Bugsy's gym,
the Slowpoke Well, Ilex Forest and Route 34.

Port what their scripts need: saved WRAM bytes by label (readmem,
writemem, loadmem: wFarfetchdPosition, wKurtApricornQuantity),
VAR_UNOWNCOUNT and VAR_KURT_APRICORNS, SelectApricornForKurt and
verbosegiveitemvar, Unown letters (GetUnownLetter, per-letter pictures,
CheckUnownLetter's redraw, UpdateUnownDex, wFirstUnownSeen), the chamber
puzzles (_UnownPuzzle), DisplayUnownWords, HoOhChamber and
OmanyteChamber.

Minigames and specials that draw a whole screen in tiles now share a
tile screen effect with ROM graphics, palettes and sprites, answered
with buttons; the standard font and textbox frame load for them.

The playthrough continues through Kurt's Slowpoke Well, Bugsy, the rival
and the Farfetch'd to the Route 34 gate; its helpers move to
tests/playthrough-driver.ts. New tests solve the Kabuto puzzle through
the world, catch Unown and make Kurt's balls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kawaandClaude Opus 5.5 committed 2026-10-06 15:35:27 +02:00
1 parent 15a31f95e4
commit f4ef244fc7
31 files changed
+2334 -528

No files matched your search

+21 -1
View File
@@ -1,4 +1,4 @@
import type { PokemonData } from "../rom/pokemon";
import { PokemonData } from "../rom/pokemon";
import type { Mail } from "./mail";
/** A party Pokémon with the fields of the original party_struct. */
@@ -34,6 +34,26 @@ export interface PartyMon {
}
export const PARTY_LENGTH = 6;
/** wUnownDex and wFirstUnownSeen, kept with the game. */
export interface UnownRecord {
unownDex: number[];
firstUnownSeen: number;
}
/** UpdateUnownDex: an Unown's letter (GetUnownLetter) is added to the
* Unown Dex the first time it joins the party or a box. TryAddMonToParty
* also records the first letter seen, when none was. */
export function updateUnownDex(
record: UnownRecord,
mon: { species: number; dvs: number },
party = true,
) {
if (mon.species !== UNOWN_SPECIES) return;
const letter = PokemonData.unownLetter(mon.dvs);
if (!record.unownDex.includes(letter) && record.unownDex.length < 26)
record.unownDex.push(letter);
if (party && !record.firstUnownSeen) record.firstUnownSeen = letter;
}
const UNOWN_SPECIES = 201;
const STATUS_NAMES: [number, string][] = [
[0x08, " PSN"],