Open Route 42 to Mahogany, the Lake of Rage, the Rocket Hideout and Pryce (#32)

Route 42, Mt. Mortar, Mahogany Town, Route 43 and its gates, the Lake of
Rage and its houses, the Rocket Hideout and Route 44 are open. The story
plays through the toll, the red Gyarados, Lance, the hideout and Pryce's
GLACIERBADGE, which starts the Radio Tower takeover.

The fishing guru measures Magikarp (CheckMagikarpLength,
MagikarpHouseSign, FindPartyMonThatSpecies); the record is saved.
takemoney now leaves a short account at zero as TakeMoney does, and
setmapscene/setscene on a map without scenes consume the byte instead of
refusing. The playthrough's path search slides on ice and the run gains
five stages to Pryce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kawaandClaude Opus 5.5 committed 2026-10-13 13:35:58 +02:00
1 parent 62fe4bf664
commit 061ca4d59d
11 files changed
+578 -43

No files matched your search

+161
View File
@@ -143,6 +143,35 @@ const GOOD_ROD = 0x3b,
EVENT_GOT_TM23_IRON_TAIL = 0xd,
ENGINE_MINERALBADGE = 31,
ENGINE_STORMBADGE = 32;
const ROUTE_42_GATE = "2:4",
MAHOGANY = "2:7",
MAHOGANY_CENTER = "2:3",
MAHOGANY_GYM = "2:2",
MAHOGANY_SHOP = "3:48",
ROCKET_HIDEOUT = ["3:49", "3:50", "3:51"],
ROUTE_43_MAHOGANY_GATE = "9:3",
ROUTE_43_GATE = "9:4",
ROUTE_43 = "9:5",
LAKE_OF_RAGE = "9:6";
const RED_SCALE = 0x42,
EVENT_BEAT_POKEMANIAC_SHANE = 0x4e7,
EVENT_LAKE_OF_RAGE_RED_GYARADOS = 0x751,
EVENT_DECIDED_TO_HELP_LANCE = 0x60,
EVENT_UNCOVERED_STAIRCASE_IN_MAHOGANY_MART = 0x2e2,
EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE = 0x4c,
EVENT_LEARNED_SLOWPOKETAIL = 0x301,
EVENT_LEARNED_RATICATE_TAIL = 0x302,
EVENT_LEARNED_HAIL_GIOVANNI = 0x2ff,
EVENT_RIVAL_TEAM_ROCKET_BASE = 0x6c0,
EVENT_BEAT_ROCKET_EXECUTIVEM_4 = 0x574,
EVENT_BEAT_ROCKET_EXECUTIVEF_2 = 0x570,
EVENT_CLEARED_ROCKET_HIDEOUT = 0x22,
EVENT_GOT_HM06_WHIRLPOOL = 0x15,
EVENT_BEAT_PRYCE = 0x4c3,
EVENT_GOT_TM16_ICY_WIND = 0xe,
EVENT_RADIO_TOWER_ROCKET_TAKEOVER = 0x6ce,
ENGINE_GLACIERBADGE = 0x21,
ENGINE_ROCKETS_IN_RADIO_TOWER = 0x13;
/** The acceptance run for PLAN section 2: a new game played from the
* introduction to the catching tutorial through the world's own inputs,
@@ -1024,5 +1053,137 @@ describe.skipIf(!existsSync(romPath))(
reload();
writeTestSave("olivine-city");
}, 240_000);
it("crosses Route 42 past Mt. Mortar to Mahogany Town", () => {
traceFailures();
cross("up", ROUTE_39);
cross("right", ROUTE_38);
stairs(ROUTE_38_GATE);
stairs(ECRUTEAK);
stairs(ROUTE_42_GATE);
stairs(ROUTE_42);
// Route 42's pond splits it around Mt. Mortar; Krabby surfs across.
cross("right", MAHOGANY, { water: true });
expect(p.world.state.events.has(EVENT_BEAT_POKEMANIAC_SHANE)).toBe(true);
reload();
}, 240_000);
it("pays the Rockets' toll on Route 43 and stops the Red Gyarados for Lance", () => {
traceFailures();
stairs(ROUTE_43_MAHOGANY_GATE);
stairs(ROUTE_43);
// Route43GateRocketShakedownScene: ¥1000 to go through.
const money = p.world.state.money;
stairs(ROUTE_43_GATE);
expect(p.log.join(" ")).toContain("The toll is ¥1000");
expect(p.world.state.money).toBe(money - 1000);
stairs(ROUTE_43);
cross("up", LAKE_OF_RAGE);
// The Gyarados waits in the middle of the lake (18, 22).
sail(18, 23);
p.world.move("up");
p.world.interact();
play();
expect(p.world.state.events.has(EVENT_LAKE_OF_RAGE_RED_GYARADOS)).toBe(true);
expect(p.world.state.bag.keyItems).toContain(RED_SCALE);
// Lance appears on the shore (21, 28).
sail(21, 29);
talkTo(p.world.map.objects[0].id);
play([1]);
expect(p.world.state.events.has(EVENT_DECIDED_TO_HELP_LANCE)).toBe(true);
expect(p.log.join(" ")).toContain("from MAHOGANY is\nthe cause.");
reload();
}, 240_000);
it("follows Lance into the Rocket Hideout and learns both passwords", () => {
traceFailures();
cross("down", ROUTE_43);
// Route 43 sets the gate's shakedown scene again on every visit.
stairs(ROUTE_43_GATE);
stairs(ROUTE_43);
stairs(ROUTE_43_MAHOGANY_GATE);
stairs(MAHOGANY);
heal(MAHOGANY_CENTER, MAHOGANY);
// MahoganyMart1FLanceUncoversStaircaseScript: Dragonite's Hyper Beam.
enter(MAHOGANY_SHOP, "up");
expect(p.world.state.events.has(EVENT_UNCOVERED_STAIRCASE_IN_MAHOGANY_MART)).toBe(true);
// B1F's cameras and exploding traps lie on the way down.
stairs(ROCKET_HIDEOUT[0]);
stairs(ROCKET_HIDEOUT[1]);
walk(5, 14); // LanceHealsScript1
expect(p.world.state.events.has(EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE)).toBe(true);
// B3F: the grunts tell their passwords when talked to again.
stairs(ROCKET_HIDEOUT[2]);
expect(p.log.join(" ")).toContain("two passwords to");
const [, , , slowpokeTail, raticateTail] = p.world.map.objects.map((object) => object.id);
for (const grunt of [slowpokeTail, slowpokeTail, raticateTail, raticateTail]) {
talkTo(grunt);
play();
}
expect(p.world.state.events.has(EVENT_LEARNED_SLOWPOKETAIL)).toBe(true);
expect(p.world.state.events.has(EVENT_LEARNED_RATICATE_TAIL)).toBe(true);
// The boss's door is reached from B2F's other stairs; the rival
// waits on the way (RocketBaseRival).
expect(route(ROCKET_HIDEOUT[2], ROCKET_HIDEOUT, 6, { x: 10, y: 10 })).toBe(true);
walk(10, 10);
expect(p.world.state.events.has(EVENT_RIVAL_TEAM_ROCKET_BASE)).toBe(true);
p.world.move("up");
p.world.interact();
play();
walk(10, 8); // RocketBaseBossLeft
expect(p.world.state.events.has(EVENT_BEAT_ROCKET_EXECUTIVEM_4)).toBe(true);
talkTo(p.world.map.objects[2].id); // the Murkrow
play();
expect(p.world.state.events.has(EVENT_LEARNED_HAIL_GIOVANNI)).toBe(true);
reload();
}, 240_000);
it("beats the executive with Lance and the Electrodes for HM06", () => {
traceFailures();
expect(route(ROCKET_HIDEOUT[1], ROCKET_HIDEOUT, 6, { x: 14, y: 13 })).toBe(true);
walk(14, 13);
p.world.move("up");
p.world.interact();
play();
// RocketBaseBossFRight's coordinate event is two steps in.
p.world.move("up");
play();
p.world.move("up");
play();
expect(p.world.state.events.has(EVENT_BEAT_ROCKET_EXECUTIVEF_2)).toBe(true);
// Lance takes the right-hand Electrodes; the player the left three.
for (let round = 0; round < 6; round++) {
const left = p.world.map.objects
.slice(4, 7)
.map((object) => object.id)
.filter((id) => p.world.objects().some((object) => object.id === id));
if (!left.length) break;
talkTo(left[0]);
play();
}
expect(p.world.state.events.has(EVENT_CLEARED_ROCKET_HIDEOUT)).toBe(true);
expect(p.world.state.events.has(EVENT_GOT_HM06_WHIRLPOOL)).toBe(true);
expect(p.world.state.bag.tmsHms[55]).toBe(1); // HM06
travel(MAHOGANY_SHOP, ROCKET_HIDEOUT);
exit(MAHOGANY);
reload();
}, 240_000);
it("slides across Pryce's ice for the GLACIERBADGE, and the Rockets take the Radio Tower", () => {
traceFailures();
heal(MAHOGANY_CENTER, MAHOGANY);
enter(MAHOGANY_GYM, "up");
talkTo(p.world.map.objects[0].id);
play([1]);
expect(p.world.state.events.has(EVENT_BEAT_PRYCE)).toBe(true);
expect(p.world.state.flags.has(ENGINE_GLACIERBADGE)).toBe(true);
expect(p.world.state.events.has(EVENT_GOT_TM16_ICY_WIND)).toBe(true);
expect(p.world.state.bag.tmsHms[15]).toBe(1); // TM16
// The seventh badge runs RadioTowerRocketsScript.
expect(p.world.state.flags.has(ENGINE_ROCKETS_IN_RADIO_TOWER)).toBe(true);
expect(p.world.state.events.has(EVENT_RADIO_TOWER_ROCKET_TAKEOVER)).toBe(false);
exit(MAHOGANY);
reload();
writeTestSave("mahogany-town");
}, 240_000);
},
);