Credibility pass: the accretion sanded smooth
Blind reviews over d2b40ec..HEAD (engine / web / server+deploy). Orphaned doc comments rejoined their functions; the swap-meet tradables collapsed from four pasted deriveds to one (killing the "the's treasure" label); FEAR's aura and banner now share the engine's own dreadDistance; the long-press peek got one home; rulebook.ts stopped wearing JSON quotes; process-named tests and war-story comments now state the constraints they pin; the protocol doc caught up to its handlers; verify-ledgers.sh can actually count failures; the runbook learned about the determinism gate and the nightly backups. No behavior changes — 255 tests and all 48 production ledgers replay identically. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3445d12206
commit
6adcbe23b5
@@ -256,6 +256,12 @@ function bestWallCrossing(
|
||||
return best;
|
||||
}
|
||||
|
||||
/** Square-filling nuisances for path denial, best blocker first. */
|
||||
const DENIAL_FILLERS = [
|
||||
"fill-square-with-stone", "thornbush", "rosebush", "create-pit",
|
||||
"fill-square-with-slime", "killer-ooze", "handful-of-tacks", "dust-cloud",
|
||||
];
|
||||
|
||||
/**
|
||||
* Path denial: when an enemy's march threatens something dear — they carry
|
||||
* one of the clockwork's treasures home, or close on its gold lying on the
|
||||
@@ -265,12 +271,6 @@ function bestWallCrossing(
|
||||
* would accept are offered (sighted, empty, off homes and warp tokens), and
|
||||
* only when the detour costs the enemy 3+ extra steps.
|
||||
*/
|
||||
/** Square-filling nuisances for path denial, best blocker first. */
|
||||
const DENIAL_FILLERS = [
|
||||
"fill-square-with-stone", "thornbush", "rosebush", "create-pit",
|
||||
"fill-square-with-slime", "killer-ooze", "handful-of-tacks", "dust-cloud",
|
||||
];
|
||||
|
||||
function pathDenial(view: GameView): Command | null {
|
||||
const wall = inHand(view, "create-wall") ?? inHand(view, "illusion-wall");
|
||||
const jam = inHand(view, "jam-lock");
|
||||
@@ -531,7 +531,8 @@ function roadworkPlan(
|
||||
}
|
||||
}
|
||||
}
|
||||
return best !== null ? (best as { cmd: Command; total: number }).cmd : null;
|
||||
if (best !== null) return (best as { cmd: Command; total: number }).cmd;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1308,14 +1309,14 @@ export function automatonCommand(
|
||||
view.sustained.some((e) => e.cardId === "fear" && e.targetId === p.id) &&
|
||||
Math.abs(p.position.x - self.position.x) + Math.abs(p.position.y - self.position.y) <= 3);
|
||||
for (const source of dreadful) {
|
||||
const here = Math.abs(source.position.x - self.position.x) + Math.abs(source.position.y - self.position.y);
|
||||
const distNow = Math.abs(source.position.x - self.position.x) + Math.abs(source.position.y - self.position.y);
|
||||
let best: { dir: Side; d: number } | null = null;
|
||||
for (const dir of SIDES) {
|
||||
const t = stepTarget(view.board, self.position, dir);
|
||||
if (t.kind === "blocked") continue;
|
||||
if (view.squareContents[cellKey(t.to)]?.kind === "stone") continue;
|
||||
const d = Math.abs(source.position.x - t.to.x) + Math.abs(source.position.y - t.to.y);
|
||||
if (d > here && (best === null || d > best.d)) best = { dir, d };
|
||||
if (d > distNow && (best === null || d > best.d)) best = { dir, d };
|
||||
}
|
||||
if (best) return { type: "move", direction: best.dir };
|
||||
// Dead end: the card excuses what cannot be done; march on normally.
|
||||
@@ -1391,7 +1392,6 @@ export function automatonCommand(
|
||||
}
|
||||
// Standing on a warp token whose far side is closer to the goal: step in.
|
||||
{
|
||||
const here = cellKey(self.position);
|
||||
const pair = view.dimWarps.find((w) => cellKey(w.a) === here || cellKey(w.b) === here);
|
||||
if (pair) {
|
||||
const dest = cellKey(pair.a) === here ? pair.b : pair.a;
|
||||
|
||||
Reference in New Issue
Block a user