Credibility pass: sweep the workshop floor
Scoped to everything since the last pass (695307d). The residue of
fast iteration, removed: a reduced-motion media query that had
swallowed a full copy of the .faq-seal rules; doc comments orphaned
from their functions by inserted methods; the FAQ scrape's seams
(section headings run into ruling bodies under the wrong topics, a
next-page heading shipped as a ruling, an amputated "h", and rulings
filed under alphabetically-nearest strangers — Large Rock/Dagger now
lives on those cards; Book of Spells and Torquemada describe no card
in this set and are gone); the write-only aisle flag left behind by
the reverted rev 7; a linter-silenced dead destructure; a duplicated
median lookup; dead casts; and the fallback path that ignored the
apprentice's one-card draw.
Tests now typecheck (tsconfig includes test/), which surfaced the
missing type imports and a drifted creature literal hiding under an
as-cast. Also: a no-op self-assignment, mid-file imports hoisted, a
dynamic-import habit made static, a hedge comment replaced with a
loud setup failure, the fallback-retries-itself dead rung removed
from both bot drivers, and the twin peek scrims merged.
Deliberately kept: the TIERS lookup guard (ledger JSON is untrusted),
the wand-cost stanzas (they differ on the power-attack trade — a
rules question, not a dedup), and rollDie's coexistence with rollD4
(migrating changes visible logs; future work).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
73150a89b5
commit
3308850bb6
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
|
||||
import { applyCommand, activePlayer, boardView, gameLos } from "../src/game";
|
||||
import { cellKey, SIDES, stepTarget, type Cell } from "../src/board";
|
||||
import type { CardInstance } from "../src/cards";
|
||||
import { eligibleCellsFor, viewFor } from "../src/view";
|
||||
import { newExpansionGame as newGame, must, giveCard, emptyNeighborCell } from "./helpers";
|
||||
|
||||
describe("expansion terrain", () => {
|
||||
@@ -163,8 +164,7 @@ describe("expansion terrain", () => {
|
||||
});
|
||||
|
||||
describe("eligibility dimming mirrors the engine", () => {
|
||||
it("boobytrap tokens go anywhere but solid stone, sight be damned", async () => {
|
||||
const { viewFor, eligibleCellsFor } = await import("../src/view");
|
||||
it("boobytrap tokens go anywhere but solid stone, sight be damned", () => {
|
||||
let { state } = newGame();
|
||||
const caster = activePlayer(state).id;
|
||||
const view = viewFor(state, caster);
|
||||
@@ -174,8 +174,7 @@ describe("eligibility dimming mirrors the engine", () => {
|
||||
expect(lit.size).toBe(Object.keys(view.board.cells).length);
|
||||
});
|
||||
|
||||
it("glue lights only sighted squares that hold something", async () => {
|
||||
const { viewFor, eligibleCellsFor } = await import("../src/view");
|
||||
it("glue lights only sighted squares that hold something", () => {
|
||||
let { state } = newGame();
|
||||
const caster = activePlayer(state);
|
||||
// Drop a dagger at the caster's feet — the one guaranteed-sighted object.
|
||||
@@ -184,8 +183,8 @@ describe("eligibility dimming mirrors the engine", () => {
|
||||
const lit = eligibleCellsFor(viewFor(state, caster.id), "glue")!;
|
||||
expect(lit.has(cellKey(here))).toBe(true);
|
||||
// Empty squares stay dim — glue needs something to glue down.
|
||||
const view = viewFor(state, caster.id);
|
||||
for (const k of lit) {
|
||||
const view = viewFor(state, caster.id);
|
||||
const held =
|
||||
(view.groundObjects[k] ?? []).length > 0 ||
|
||||
view.treasures.some((t) => t.position && cellKey(t.position) === k);
|
||||
|
||||
Reference in New Issue
Block a user