Open Route 31, Violet City and Sprout Tower (#31)

Enable Route 31 and its gate, Dark Cave's Violet entrance, Violet City with its buildings and Sprout Tower. Port the script commands they use: gettrainername, askforphonenumber (with AddPhoneNumber's room for Mom and Elm; addcellnum now reports failure as the original does), checkpokemail, loadmenu/_2dmenu/closewindow, giveegg and trade (NPCTrade, with wTradeFlags saved).

Eggs keep their species with an egg flag, as wPartySpecies does. The pack's TM/HM counts receive, check and toss TMs and HMs, which are named TM01-HM07.

The playthrough continues through Route 31 (with Mom's call), Violet City and Sprout Tower to Elder Li's Flash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-10-03 16:24:29 +02:00
1 parent ec3d1cd5c4
commit 7909302db1
16 files changed
+585 -63

No files matched your search

+3 -4
View File
@@ -66,7 +66,6 @@ const BOX_SWITCH = 0,
/** DelayFrames after a Bill's PC message, in overworld ticks (two frames). */
const MESSAGE_TICKS = 25,
RELEASED_TICKS = 40;
const EGG = 0xfd;
/** A pack entry and where it came from, for TossItem's wCurItemQuantity. */
interface PackSlot extends ItemSlot {
@@ -287,7 +286,7 @@ export class PcSession {
);
if (slot < 0) return;
const mon = party[slot];
if (mon.species === EGG) {
if (mon.egg) {
yield* this.print(PC["MailboxPC.MailEggText"]);
continue;
}
@@ -698,7 +697,7 @@ export class PcSession {
}
if (action !== SUBMENU_RELEASE) break;
if (!(yield* this.partyMonMayLeave(index))) break;
if (mon.species === EGG) {
if (mon.egg) {
yield* this.placeString(this.string(PC.PCString_NoReleasingEGGS));
break;
}
@@ -751,7 +750,7 @@ export class PcSession {
continue;
}
if (action !== SUBMENU_RELEASE) break;
if (mon.species === EGG) {
if (mon.egg) {
yield* this.placeString(this.string(PC.PCString_NoReleasingEGGS));
continue;
}