POKéGEAR in the start menu runs the clock, Town Map and phone cards with the original joypad rules. Calls to Elm and Mom run their callee scripts, with the out-of-area and out-of-hours cases and HangUp's corrected timing. Mom saves a quarter of trainer prizes once asked, talking to her at home opens BankOfMom (GET, SAVE, CHANGE and the DST checks) with its digit amount box, and MomTriesToBuySomething buys items and dolls with her savings. Saves gain Mom's money, her next item and its trigger balance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3456aa4e11
commit
209778cabe
29 files changed
+2726
-47
No files matched your search
@@ -14,8 +14,10 @@ import {
|
||||
copyScriptState,
|
||||
type MartEntry,
|
||||
type ScriptEffect,
|
||||
type ScriptHost,
|
||||
type ScriptState,
|
||||
} from "./interpreter";
|
||||
import { Pokegear } from "./pokegear";
|
||||
import { readString, readText, type TextContext } from "./text";
|
||||
|
||||
type Input = number | string | undefined;
|
||||
@@ -109,6 +111,10 @@ export interface StartMenuHost {
|
||||
landmark(): number;
|
||||
/** A field move's checks for party slot `mon`, on the menu's draft. */
|
||||
fieldMove(state: ScriptState, mon: number, move: number): MenuFieldMove;
|
||||
/** The script host a Pokégear phone call runs with. */
|
||||
scriptHost(): ScriptHost;
|
||||
/** GetWorldMapLocation for any map. */
|
||||
landmarkOf(mapId: string): number;
|
||||
}
|
||||
|
||||
/** The overworld start menu (engine/menus/start_menu.asm) with its
|
||||
@@ -282,6 +288,16 @@ export class StartMenuRun {
|
||||
case STARTMENUITEM_PACK:
|
||||
if (yield* this.pack()) return;
|
||||
break;
|
||||
case STARTMENUITEM_POKEGEAR:
|
||||
// StartMenu_Pokegear returns to the start menu.
|
||||
yield* new Pokegear(this.state, {
|
||||
reader: this.reader,
|
||||
data: this.data,
|
||||
text: () => this.text(),
|
||||
scriptHost: () => this.host.scriptHost(),
|
||||
landmarkOf: (mapId) => this.host.landmarkOf(mapId),
|
||||
}).run();
|
||||
break;
|
||||
case STARTMENUITEM_EXIT:
|
||||
return;
|
||||
case STARTMENUITEM_SAVE:
|
||||
|
||||
Reference in new issue
Block a user