Ring with trainers' calls, rematch them and play the radio (Closes #30)
Every registered trainer's callee and caller scripts run, with the missing specials and commands (RandomPhoneWildMon, RandomUnseenWildMon, swarms, gettrainerclassname, Kenji's break, the Blue Card and Buena's password variables). Fight counts are saved, so rematches and gifts work on every open map, and the daily reset clears the phone's flags. Random calls follow CheckPhoneCall and the 20/10/5/3-minute call timer; received calls ring twice with the caller's name, and calls play their ringing, hang-up and no-signal sounds. Grass and fishing swarms use the swarm tables. The radio ports PlayRadioShow and every station frame by frame, with its music: the Pokégear's radio card tunes by knob, house radios play through MapRadio, and Buena's show takes the day's password for Blue Card points that her receptionist exchanges for prizes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f30c3f450
commit
7c12c81a27
21 files changed
+2021
-64
No files matched your search
+12
-1
@@ -128,7 +128,8 @@ function showWorld(world: GameWorld) {
|
||||
? `${dialogue.index + 1} / ${dialogue.pages.length}`
|
||||
: "";
|
||||
const last = dialogue && dialogue.index === dialogue.pages.length - 1;
|
||||
const choice = last && !mart ? dialogue.choice : undefined;
|
||||
// A house radio shows only its text box; A, B or Continue stops it.
|
||||
const choice = last && !mart && dialogue.choice?.kind !== "mapradio" ? dialogue.choice : undefined;
|
||||
// Timed pages advance themselves; choices replace Continue.
|
||||
get("dialogue-next").hidden = Boolean(
|
||||
choice || mart || (last && dialogue.holdTicks !== undefined),
|
||||
@@ -1199,6 +1200,16 @@ function showPokegear(world: GameWorld) {
|
||||
card.append(submenu);
|
||||
}
|
||||
body.replaceChildren(card);
|
||||
} else if (view.radio) {
|
||||
// The tuning dial's frequency, the station's name and its text box.
|
||||
const radio = view.radio,
|
||||
card = element("div", "", "pokegear-radio"),
|
||||
dial = element("p", `FM ${radio.frequency}`, "pokegear-frequency"),
|
||||
box = element("div", "", "pokegear-radio-text");
|
||||
box.setAttribute("aria-live", "polite");
|
||||
box.append(element("span", radio.lines[0]), element("span", radio.lines[1]));
|
||||
card.append(dial, element("strong", radio.name), box);
|
||||
body.replaceChildren(card);
|
||||
} else body.replaceChildren();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user