Read TileCollisionStdScripts from the ROM so the Pokémon Center PC runs PokemonCenterPC: Bill's PC (deposit, withdraw, release, change and name boxes), the player's item storage (withdraw, deposit, toss, mail box) and Oak's Pokédex rating. The house PC now opens the full player's PC menu. A catch with a full party goes to the current box through SendMonIntoBox; a full box keeps the ball, and filling it queues Bill's call as a memory script after the battle. Saves gain boxes, box names and PC items, migrated by absence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
451464f7c6
commit
3bdca0099e
21 files changed
+1999
-131
No files matched your search
@@ -1,10 +1,13 @@
|
||||
import { CrystalAssets } from "../src/game/rom/assets";
|
||||
import { GameWorld } from "../src/game/world/world";
|
||||
import { OW } from "../src/game/world/constants";
|
||||
import { generatePartyMon } from "../src/game/party/pokemon";
|
||||
|
||||
/** `room` places the player at the bedroom PC or poster, "center" at
|
||||
* Cherrygrove's Pokémon Center PC with two Pokémon; otherwise outdoors. */
|
||||
export function foundationFixture(
|
||||
assets: CrystalAssets,
|
||||
room: boolean | "poster",
|
||||
room: boolean | "poster" | "center",
|
||||
) {
|
||||
const world = new GameWorld(
|
||||
assets,
|
||||
@@ -13,12 +16,34 @@ export function foundationFixture(
|
||||
);
|
||||
world.state.scenes["24:4"] = 1;
|
||||
world.state.bag.keyItems.push(OW.BICYCLE);
|
||||
if (room === "center") {
|
||||
world.state.party = [155, 16].map((species, i) =>
|
||||
generatePartyMon(assets.pokemon, {
|
||||
species,
|
||||
level: 8 - i * 4,
|
||||
item: 0,
|
||||
otId: world.playerId,
|
||||
ot: "CHRIS",
|
||||
dvs: 0x9abc,
|
||||
caughtData: 0,
|
||||
}),
|
||||
);
|
||||
world.state.bag.items = [{ item: 18, quantity: 5 }]; // POTION
|
||||
}
|
||||
const save = world.save();
|
||||
const [map, x, y] =
|
||||
room === "center"
|
||||
? ["26:5", 9, 2]
|
||||
: room === "poster"
|
||||
? ["24:7", 6, 1]
|
||||
: room
|
||||
? ["24:7", 2, 2]
|
||||
: ["24:4", 9, 6];
|
||||
world.restore({
|
||||
...save,
|
||||
map: room ? "24:7" : "24:4",
|
||||
x: room === "poster" ? 6 : room ? 2 : 9,
|
||||
y: room === "poster" ? 1 : room ? 2 : 6,
|
||||
map,
|
||||
x,
|
||||
y,
|
||||
direction: "up",
|
||||
objects: [],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user