Credibility pass: one voice, no scars

A three-reviewer sweep for tells of piecemeal machine generation,
every finding verified against the code before touching it. No
behavior changes; the full suite passes unchanged (plus two
strengthened pins).

Engine: removed four void-silenced fossils (a parseEdgeKey call
voided where it stood, stoneEffect's ignored cardId parameter, the
actualTarget remnant in doCast, a voided loop variable in shadow
upkeep); fixed the initialize-then-overwrite narration in
spawnCreature; replaced a filter(() => false) no-op; waterwall now
rides waveFromEdge instead of carrying its own verbatim copy (and the
single-caller washBack wrapper went with it); blind wall-bumps and
LOS blockers each collapsed to one implementation; the wand-id list
and the "permanent" duration sentinel became named constants; the
ambush number local no longer shadows the imported numberValue
function; assorted reviewer-aimed phrasings rewritten as the
constraints they guard.

Server/deploy: the protocol header now documents all eleven message
types; dropped an eslint pragma with no eslint, a test script with no
tests, and an rsync exclude anchored at a path that never existed
(the real data/ dir now excluded); the Caddy vhost has one source of
truth; stale "pending DNS" note removed — the record resolves.

Web: ~90 lines of CSS swallowed verbatim into a mobile media query
deduplicated; the reduced-motion guard on the board now actually
stops the marked-cell pulse; one shared color module replaces two
drifted palettes; an orphaned doc comment rejoined its function.

Tests: the ten-times-pasted helper block became test/helpers.ts;
wave-numbered files renamed for the behaviors they pin; deliberation
comments and void-ed corpses of unwritten assertions deleted; silent
seed-dependent early-returns now fail loudly; one assertion that
compared a value to itself now pins the home-translation it meant to;
the stored-log single-number command form gained the explicit
compatibility test it deserved.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-16 11:56:55 -04:00
co-authored by Claude Fable 5
parent f62fcf2510
commit 695307daa8
24 changed files with 240 additions and 716 deletions
+5 -21
View File
@@ -1,6 +1,7 @@
<script lang="ts">
import type { GameView } from "@wizwar/engine";
import type { Side } from "@wizwar/engine";
import { colorIndexOf as sharedColorIndex, wizardColor } from "./colors";
const CELL = 48;
const WALL = 7;
@@ -34,7 +35,6 @@
litCells?: Set<string> | null;
} = $props();
const PLAYER_COLORS = ["#1a9c46", "#d3352b", "#c9308f", "#3a3ac0", "#2ab0c9", "#c9a72a"];
// Press-and-hold peeks the square's card; a fired hold swallows the click.
let peekTimer: ReturnType<typeof setTimeout> | null = null;
@@ -81,18 +81,14 @@
return 1;
}
function wizardArt(id: string): string {
return `/tokens/wizard-${colorIndexOf(id) % 6}.png`;
return `/tokens/wizard-${sharedColorIndex(view, id) % 6}.png`;
}
function treasureArt(owner: string): string {
return `/tokens/treasure-${colorIndexOf(owner) % 6}.png`;
return `/tokens/treasure-${sharedColorIndex(view, owner) % 6}.png`;
}
function colorIndexOf(id: string): number {
const p = view.players.find((p) => p.id === id);
return p?.colorIndex ?? Math.max(0, view.players.findIndex((q) => q.id === id));
}
function playerColor(id: string): string {
return PLAYER_COLORS[colorIndexOf(id) % PLAYER_COLORS.length]!;
return wizardColor(view, id);
}
const cells = $derived(
@@ -599,19 +595,7 @@
50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
.dim-cell {
fill: rgba(12, 9, 5, 0.55);
pointer-events: none;
}
.marked-cell {
fill: rgba(211, 133, 43, 0.18);
stroke: #d3852b;
stroke-width: 2.5;
stroke-dasharray: 7 4;
pointer-events: none;
animation: warp-pulse 1.6s ease-in-out infinite;
}
.warp-dest { animation: none; }
.marked-cell, .warp-dest { animation: none; }
}
.wizard { cursor: pointer; }
.wizard-label {