Rev 14: a pit's rim is a ledge, and the walker chooses the way off (GDCN)
The table's reading of CREATE PIT: a thin ledge runs around the rim, and "jumping over" is edging along it, trying not to fall. So on a 2, 3, or 4 the walker lands on an open square beside the pit — the only one if there is one, otherwise the one they name (a click on that square sends `exit` with the move) — and a pit with no way off cannot be entered from there at all, refused before any die is rolled. The FAQ's diagonal crossing at an intersection is this rule. Older games bounced the walker back and charged the stride; they keep that under their frozen revision, so GDCN's seven bounces replay. The clockwork's path search treats a pit as a road when any side of its rim is open and names the exit its path leaves by. Tests pin the fork, the single way off, the closed pit under both revisions, and the brain's route. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
0750fe3f21
commit
c6913ea1bc
@@ -141,7 +141,7 @@
|
||||
|
||||
/** A move with its regret checks: stepping off your home still laden,
|
||||
* or stepping onto ground that bites. */
|
||||
function tryMove(direction: Side, over?: boolean) {
|
||||
function tryMove(direction: Side, over?: boolean, exit?: Side) {
|
||||
const reasons: string[] = [];
|
||||
if (view && me && me.carriedTreasureId && cellKey(me.position) === cellKey(me.home)) {
|
||||
const t = view.treasures.find((t) => t.id === me!.carriedTreasureId);
|
||||
@@ -165,7 +165,7 @@
|
||||
if (bite[ground]) reasons.push(bite[ground]);
|
||||
}
|
||||
}
|
||||
withCaution(reasons, () => dispatch({ type: "move", direction, ...(over ? { over: true } : {}) }));
|
||||
withCaution(reasons, () => dispatch({ type: "move", direction, ...(over ? { over: true } : {}), ...(exit ? { exit } : {}) }));
|
||||
}
|
||||
function playFx(events: Parameters<typeof scheduleFx>[0]) {
|
||||
if (!view) return;
|
||||
@@ -926,6 +926,18 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
// A pit beside you, and a click on a square beside IT: cross by that
|
||||
// side — the rim's ledge runs the whole way round.
|
||||
for (const side of SIDES) {
|
||||
const pit = { x: me.position.x + (side === "E" ? 1 : side === "W" ? -1 : 0),
|
||||
y: me.position.y + (side === "S" ? 1 : side === "N" ? -1 : 0) };
|
||||
if (view.squareContents[cellKey(pit)]?.kind !== "pit") continue;
|
||||
for (const out of SIDES) {
|
||||
if (out === (side === "N" ? "S" : side === "S" ? "N" : side === "E" ? "W" : "E")) continue;
|
||||
const land = { x: pit.x + (out === "E" ? 1 : out === "W" ? -1 : 0), y: pit.y + (out === "S" ? 1 : out === "N" ? -1 : 0) };
|
||||
if (cellKey(land) === cellKey(cell)) { tryMove(side, undefined, out); return; }
|
||||
}
|
||||
}
|
||||
// BIG MAN: clicking two squares away over a pit/tacks/ooze leaps it.
|
||||
if (view.sustained.some((e) => e.cardId === "big-man" && e.targetId === view!.you)) {
|
||||
for (const side of SIDES) {
|
||||
|
||||
Reference in New Issue
Block a user