The dread wraps: fear's diamond continues from the opposite rim
The maze is a torus — a wizard walking through walls off one edge arrives at the other, so the crow flies around the wrap too. dreadDistance measures toroidal manhattan; the aura's wash wraps with it. No rev-32 game has cast fear yet, so the measure corrects in place; older vintages replay flat as they were played. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
co-authored by
Claude Fable 5
parent
bcd2155fe0
commit
0a0108c48c
@@ -181,16 +181,21 @@
|
||||
});
|
||||
|
||||
// FEAR's dread: three spaces in every direction, straight through walls
|
||||
// ("even if walls separate you"), never diagonally — a manhattan diamond,
|
||||
// the same measure the engine's refusal takes.
|
||||
// ("even if walls separate you"), never diagonally — and the maze wraps,
|
||||
// so the diamond continues from the opposite rim. Same measure the
|
||||
// engine's refusal takes.
|
||||
const fearCells = $derived.by(() => {
|
||||
const out = new Set<string>();
|
||||
const W = view.board.width;
|
||||
const H = view.board.height;
|
||||
for (const fp of view.players) {
|
||||
if (!fp.alive) continue;
|
||||
if (!view.sustained.some((e) => e.cardId === "fear" && e.targetId === fp.id)) continue;
|
||||
for (let dx = -3; dx <= 3; dx++) {
|
||||
for (let dy = -3 + Math.abs(dx); dy <= 3 - Math.abs(dx); dy++) {
|
||||
const k = `${fp.position.x + dx},${fp.position.y + dy}`;
|
||||
const wx = ((fp.position.x + dx) % W + W) % W;
|
||||
const wy = ((fp.position.y + dy) % H + H) % H;
|
||||
const k = `${wx},${wy}`;
|
||||
if (view.board.cells[k]) out.add(k);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user