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
+17
View File
@@ -16,6 +16,7 @@ import {
type SustainedEffect,
type TreasureState,
type TurnState,
dreadDistance,
} from "./game";
export interface PlayerPublicView {
@@ -193,6 +194,22 @@ export function viewFor(state: GameState, playerId: PlayerId): GameView {
* reflects what this player knows (illusion walls they believe in block it).
* The basis for the client's "dim the ineligible squares" targeting aid.
*/
/** Every square inside a living FEAR-bearer's aura — dreadDistance walks
* through warps, the engine's own yardstick, so the painted aura and the
* movement refusal can never disagree. */
export function fearCells(view: GameView): Set<string> {
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;
}
export function sightedCellsFor(view: GameView): Set<string> {
const out = new Set<string>();
const me = view.players.find((p) => p.id === view.you);