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
+19
-7
@@ -91,6 +91,8 @@ const isWarpHazard = (tile: number) =>
|
||||
/** COLL_WATER and the unused COLL_WATER_21: open water a surfer crosses
|
||||
* freely, unlike currents, waterfalls and whirlpools. */
|
||||
const isOpenWater = (tile: number) => tile === 0x29 || tile === 0x21;
|
||||
/** COLL_WHIRLPOOL and COLL_WHIRLPOOL_2C: water once Whirlpool clears it. */
|
||||
export const isWhirlpool = (tile: number) => tile === 0x24 || tile === 0x2c;
|
||||
|
||||
/** COLL_ICE and COLL_ICE_2B: a step onto them keeps sliding (.CheckForced). */
|
||||
const isIce = (tile: number) => tile === 0x23 || tile === 0x2b;
|
||||
@@ -105,13 +107,18 @@ function open(
|
||||
direction: Direction,
|
||||
water: boolean,
|
||||
target?: { x: number; y: number },
|
||||
whirlpools = false,
|
||||
) {
|
||||
const [, dx, dy] = DIRECTIONS.find(([d]) => d === direction)!;
|
||||
const x = fromX + dx,
|
||||
y = fromY + dy;
|
||||
if (x < 0 || y < 0 || x >= world.map.width || y >= world.map.height) return false;
|
||||
const tile = world.assets.collision(world.map, x, y);
|
||||
if (world.assets.permission(tile) !== 0 && !(water && isOpenWater(tile))) return false;
|
||||
if (
|
||||
world.assets.permission(tile) !== 0 &&
|
||||
!(water && (isOpenWater(tile) || (whirlpools && isWhirlpool(tile))))
|
||||
)
|
||||
return false;
|
||||
if (
|
||||
edges(world.assets.collision(world.map, fromX, fromY)).includes(direction) ||
|
||||
edges(tile).includes(OPPOSITE[direction])
|
||||
@@ -135,9 +142,13 @@ export function landing(
|
||||
x: number,
|
||||
y: number,
|
||||
direction: Direction,
|
||||
{ water = false, target }: { water?: boolean; target?: { x: number; y: number } } = {},
|
||||
{
|
||||
water = false,
|
||||
target,
|
||||
whirlpools = false,
|
||||
}: { water?: boolean; target?: { x: number; y: number }; whirlpools?: boolean } = {},
|
||||
): { x: number; y: number } | undefined {
|
||||
if (!open(world, x, y, direction, water, target)) return undefined;
|
||||
if (!open(world, x, y, direction, water, target, whirlpools)) return undefined;
|
||||
const [, dx, dy] = DIRECTIONS.find(([d]) => d === direction)!;
|
||||
x += dx;
|
||||
y += dy;
|
||||
@@ -152,13 +163,14 @@ export function landing(
|
||||
}
|
||||
|
||||
/** Shortest walkable path on the current map, avoiding other warps.
|
||||
* `water` also crosses open water, for a player who can Surf; a step onto
|
||||
* ice slides on until blocked. */
|
||||
* `water` also crosses open water, for a player who can Surf, and
|
||||
* `whirlpools` the whirlpools a player with Whirlpool can clear; a step
|
||||
* onto ice slides on until blocked. */
|
||||
export function findPath(
|
||||
world: GameWorld,
|
||||
targetX: number,
|
||||
targetY: number,
|
||||
{ water = false } = {},
|
||||
{ water = false, whirlpools = false } = {},
|
||||
): Direction[] {
|
||||
const target = { x: targetX, y: targetY };
|
||||
const queue = [{ x: world.x, y: world.y, path: [] as Direction[] }];
|
||||
@@ -170,7 +182,7 @@ export function findPath(
|
||||
visited.add(key);
|
||||
if (node.x === targetX && node.y === targetY) return node.path;
|
||||
for (const [direction] of DIRECTIONS) {
|
||||
const end = landing(world, node.x, node.y, direction, { water, target });
|
||||
const end = landing(world, node.x, node.y, direction, { water, target, whirlpools });
|
||||
if (end) queue.push({ ...end, path: [...node.path, direction] });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user