Open the Radio Tower takeover, Ice Path, Blackthorn and Dragon's Den (#32)
The Rocket-held Radio Tower, the Underground's switch room and warehouse, Ice Path, Blackthorn City and its gym, Routes 45 and 46, Dark Cave's Blackthorn entrance, Dragon's Den and the Dragon Shrine are open. The story plays through the Basement Key, the switches and the director, the Clear Bell, Ice Path's falling boulder, Clair's gym and the shrine's test for the RISINGBADGE, TM24 and the elder's Dratini. New specials: GiveDratini and MoveDeletion. A save keeps an object that a script made disappear (or appear against its flag) as Continue does, so the Radio Tower director no longer blocks the 5F stairs after a reload. A whiteout from a battle started in an scall no longer refuses. The playthrough driver pushes boulders into their holes (planned breadth first), clears whirlpools, chooses the move a TM replaces and heals with the strongest potion; the run gains six stages to the Rising Badge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
061ca4d59d
commit
9c3579937c
15 files changed
+855
-43
No files matched your search
+41
-11
@@ -149,8 +149,18 @@ export interface NativeSave {
|
||||
clock: { minuteOffset: number; weekdayOffset: number; dst: boolean };
|
||||
/** The introduction has not finished: it starts again on load. */
|
||||
intro: boolean;
|
||||
/** Current-map objects moved or turned by scripts, as saved object structs. */
|
||||
objects: { id: number; x: number; y: number; direction: Direction }[];
|
||||
/** Current-map objects moved or turned by scripts, as saved object structs.
|
||||
* `hidden` marks an object whose flags would show it but that a script
|
||||
* made disappear (one without an event flag); `shown`, one that appeared
|
||||
* although its flag is set. Continue keeps the object structs as saved. */
|
||||
objects: {
|
||||
id: number;
|
||||
x: number;
|
||||
y: number;
|
||||
direction: Direction;
|
||||
hidden?: true;
|
||||
shown?: true;
|
||||
}[];
|
||||
/** wPlayerID, drawn at a new game. */
|
||||
playerId: number;
|
||||
party: PartyMon[];
|
||||
@@ -269,6 +279,9 @@ interface Actor {
|
||||
hidden: boolean;
|
||||
fixedFacing: boolean;
|
||||
moved: boolean;
|
||||
/** An appear or disappear this visit: its visibility, not its flag,
|
||||
* is what a save keeps. */
|
||||
toggled?: boolean;
|
||||
/** OBJECT_ACTION_FISHING, from fish_cast_rod or fish_got_bite until
|
||||
* PutTheRodAway: the fishing frames replace the standing ones. */
|
||||
fishing?: boolean;
|
||||
@@ -2548,6 +2561,7 @@ export class GameWorld {
|
||||
script.run.state.events.delete(object.eventFlag);
|
||||
else script.run.state.events.add(object.eventFlag);
|
||||
}
|
||||
this.actor(object).toggled = true;
|
||||
if (effect.kind === "appear") {
|
||||
this.actor(object).hidden = false;
|
||||
if (this.assets.sprite(this.spriteOf(object)))
|
||||
@@ -4507,14 +4521,25 @@ export class GameWorld {
|
||||
rivalName: state.rivalName,
|
||||
clock: { ...state.clock },
|
||||
intro: this.introPending,
|
||||
objects: [...this.actors]
|
||||
.filter(([, actor]) => actor.moved)
|
||||
.map(([id, actor]) => ({
|
||||
id,
|
||||
x: actor.x,
|
||||
y: actor.y,
|
||||
direction: actor.direction,
|
||||
}))
|
||||
objects: this.map.objects
|
||||
.flatMap((object) => {
|
||||
const actor = this.actors.get(object.id);
|
||||
const spawned = this.spawned.has(object.id),
|
||||
flagged = this.visible(object, state),
|
||||
differs = Boolean(actor?.toggled) && spawned !== flagged;
|
||||
if (!actor?.moved && !differs) return [];
|
||||
const { x, y, direction } = actor ?? spawnActor(object);
|
||||
return [
|
||||
{
|
||||
id: object.id,
|
||||
x,
|
||||
y,
|
||||
direction,
|
||||
...(differs && !spawned && { hidden: true as const }),
|
||||
...(differs && spawned && { shown: true as const }),
|
||||
},
|
||||
];
|
||||
})
|
||||
.sort((a, b) => a.id - b.id),
|
||||
playerId: this.playerId,
|
||||
party: structuredClone(state.party),
|
||||
@@ -4746,7 +4771,9 @@ export class GameWorld {
|
||||
!map.objects.some((candidate) => candidate.id === object.id) ||
|
||||
!integer(object.x, 0, 127) ||
|
||||
!integer(object.y, 0, 127) ||
|
||||
!DIRECTION_ORDER.includes(object.direction)
|
||||
!DIRECTION_ORDER.includes(object.direction) ||
|
||||
(Object.hasOwn(object, "hidden") && object.hidden !== true) ||
|
||||
(Object.hasOwn(object, "shown") && object.shown !== true)
|
||||
)
|
||||
throw new Error(
|
||||
"Invalid native save. A saved object is not on this map.",
|
||||
@@ -4853,6 +4880,9 @@ export class GameWorld {
|
||||
// Saved objects were placed by scripts; they roam from there.
|
||||
if (actor.npc)
|
||||
Object.assign(actor.npc, { homeX: object.x, homeY: object.y });
|
||||
if (object.hidden) this.spawned.delete(object.id);
|
||||
if (object.shown) this.spawned.add(object.id);
|
||||
if (object.hidden || object.shown) actor.toggled = true;
|
||||
}
|
||||
this.player = {
|
||||
x: save.x,
|
||||
|
||||
Reference in new issue
Block a user