Port Fly, Dig, Teleport and the Escape Rope
FLY opens _FlyMap in the party menu: the region's Town Map with "Where?", the visited flypoints in turn and the Fly user's icon, then FlyScript flies the icon off along SpriteAnimFunc_FlyFrom's path, enters the spawn point and lands it with SpriteAnimFunc_FlyTo. Teleport returns to the last Pokémon Center's town through IsSpawnPoint. Dig and the Escape Rope lead out of a cave to the warp EnterMapWarp's SaveDigWarp recorded, which saves now keep. newloadmap stops its script as StopScript does and the world resumes it on the new map, which the landing and return movements need. A destination that is not ported yet gives a notice. Closes #25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4cc0e756c
commit
a7aceda089
21 files changed
+1166
-97
No files matched your search
+29
-3
@@ -55,6 +55,7 @@ function showWorld(world: GameWorld) {
|
||||
showPokegear(world);
|
||||
showTrainerCard(world);
|
||||
showOptions(world);
|
||||
showFlyMap(world);
|
||||
get("town-map-view").hidden = !world.townMap;
|
||||
if (world.townMap)
|
||||
drawTownMap(get<HTMLCanvasElement>("town-map-canvas"), world);
|
||||
@@ -72,6 +73,7 @@ function showWorld(world: GameWorld) {
|
||||
(dialogue.choice?.kind === "pokegear" && !dialogue.pages[dialogue.index]) ||
|
||||
dialogue.choice?.kind === "trainercard" ||
|
||||
dialogue.choice?.kind === "options" ||
|
||||
dialogue.choice?.kind === "flymap" ||
|
||||
Boolean(mart) ||
|
||||
world.townMap ||
|
||||
Boolean(world.statsScreen);
|
||||
@@ -128,10 +130,11 @@ function showChoice(choice: Choice | undefined) {
|
||||
else if (
|
||||
choice.kind === "pokegear" ||
|
||||
choice.kind === "trainercard" ||
|
||||
choice.kind === "options"
|
||||
choice.kind === "options" ||
|
||||
choice.kind === "flymap"
|
||||
) {
|
||||
// The Pokégear, the trainer card and the options read the controls
|
||||
// directly.
|
||||
// The Pokégear, the trainer card, the options and the Fly map read
|
||||
// the controls directly.
|
||||
container.replaceChildren();
|
||||
container.hidden = true;
|
||||
} else if (choice.kind === "yesno")
|
||||
@@ -987,6 +990,29 @@ function showOptions(world: GameWorld) {
|
||||
);
|
||||
}
|
||||
|
||||
let flyMapKey = "";
|
||||
/** _FlyMap: TownMapBubble's "Where?" and flypoint name over the Town Map,
|
||||
* with the Fly user's icon on the flypoint. */
|
||||
function showFlyMap(world: GameWorld) {
|
||||
const choice = world.dialogue?.choice;
|
||||
const view = choice?.kind === "flymap" ? choice.view : undefined;
|
||||
get("fly-map").hidden = !view;
|
||||
if (!view) {
|
||||
flyMapKey = "";
|
||||
return;
|
||||
}
|
||||
const key = JSON.stringify(view);
|
||||
if (key === flyMapKey) return;
|
||||
flyMapKey = key;
|
||||
const where = document.createElement("span"),
|
||||
arrows = document.createElement("span");
|
||||
where.textContent = `${view.where}\n${view.name}`;
|
||||
arrows.textContent = "▲▼";
|
||||
arrows.setAttribute("aria-hidden", "true");
|
||||
get("fly-map-bubble").replaceChildren(where, arrows);
|
||||
drawTownMap(get<HTMLCanvasElement>("fly-map-canvas"), world, view);
|
||||
}
|
||||
|
||||
let trainerCardKey = "";
|
||||
/** TrainerCard (engine/menus/trainer_card.asm): the top half with the
|
||||
* name, ID, money and card picture, then page 1's Pokédex count and play
|
||||
|
||||
Reference in new issue
Block a user