FEAR stains the forbidden ground in the cockpit too

The aura's warp-walking diamond — dreadDistance ≤ 3, extracted to one
shared fearCells so the board's dashed ring, the cockpit's floor stain,
and the engine's refusal can never disagree — now tints the flagstones
violet in first person, breathing like the board's aura, beneath the
dread ring already at the bearer's feet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
Eric Wagoner
2026-09-01 12:06:00 -04:00
co-authored by Claude Fable 5
parent 203b6101bd
commit 19888f9e84
3 changed files with 51 additions and 15 deletions
+3 -14
View File
@@ -2,7 +2,7 @@
import type { Component } from "svelte";
import type { GameView, SightTrace } from "@wizwar/engine";
import type { Side } from "@wizwar/engine";
import { dreadDistance } from "@wizwar/engine";
import { fearCells } from "@wizwar/engine";
import type { BoardFx } from "./fx";
import { colorIndexOf as sharedColorIndex, wizardColor } from "./colors";
import { CREATURE_ART, objectArt, TERRAIN_ART, tokenArt } from "./art";
@@ -212,18 +212,7 @@
// ("even if walls separate you"), never diagonally — and the maze wraps,
// so the diamond continues from the opposite rim. The engine's own
// yardstick, so the aura and the refusal can never disagree.
const fearCells = $derived.by(() => {
const out = new Set<string>();
for (const fp of view.players) {
if (!fp.alive) continue;
if (!view.sustained.some((e) => e.cardId === "fear" && e.targetId === fp.id)) continue;
for (const k of Object.keys(view.board.cells)) {
const [x, y] = k.split(",").map(Number) as [number, number];
if (dreadDistance(view.board, fp.position, { x, y }) <= 3) out.add(k);
}
}
return out;
});
const fearAura = $derived(fearCells(view));
// Warp pairs share a letter, like the printed openings on the real boards.
const warpLetters = $derived.by(() => {
@@ -692,7 +681,7 @@
{/each}
{/if}
<!-- FEAR's bubble: the three-space diamond, through walls, wrapping the rim -->
{#each fearCells as key (key)}
{#each fearAura as key (key)}
{@const bx = Number(key.split(",")[0])}
{@const by = Number(key.split(",")[1])}
<rect x={bx * CELL + 1.5} y={by * CELL + 1.5} width={CELL - 3} height={CELL - 3}