Three things Tim asked for together: measure the long end of a fight, make the swing check bite on stale prose, and record in rules.mjs the coincidence that hid an invented rule from two readers. GUARD 15 — check-fight-tail, on tools/fight-tail.mjs. Fourteen guards measured this scenario's combat and none could see a long fight, because every one of them averages. The cap is the measurement here, so the tool passes its own (400, not runFight's default 40) and --update refuses to record anything reaching it. Verified by lowering it back to 40: the cut loses 20 fights to the ceiling, the six-a-side 117, 107 of those ending neither won nor wiped, and the recorder stops. Two claims, both read from a fresh measurement rather than the baseline, so --update cannot silence them. "The long end is twice the median" was rejected as a claim because it is true of both encounters and so distinguishes nothing. Instead: a fight past 15 rounds wipes the party materially more often than a short one, and the SIX-A-SIDE fight is the longer one (median 14 vs 10.7) -- R-270 showing up as duration, since a disabled fighter keeps fighting 30 points down. The cut is shorter because it is decisive, not safer. GUARD 16 — check-cited, on tools/check-cited.mjs. check-firstblood and check-attackers catch the game changing; neither reads the document. Re-record after a re-cast and the artifact updates, the guard goes green, and the prose keeps printing the old number under a citation saying where the new one lives. So citations are now machine-readable -- **40**<!-- cite: first-blood cut.swing --> -- and resolved on every build. 25 of them. It failed three times on its first runs, all real: a config keyed "column" that the prose called "line", two figures rounded 32.3 -> 32, and a vacuous pass on zero citations, now fatal in its own right. It also refuses citation of unstable fields. fight-tail.longest may not reach prose: same party, same seeds, same runs, and renaming a config moved it 71 -> 90 rounds, because seedFor derives the stream from the id. Across seven labels -- median spread 0, p95 1, p99 3, longest 21. A sample maximum reads like a bound and is a property of the label. EXPOSURE states p99 instead. Same discipline on the deadlier ratio: 2.42 with seed spread 1.1, so the document gives its direction and declines to quote its size. RULES.MJS — one comment, no rule change. Over resolveLocationHit: its two thresholds are unrelated and usually agree. disabled is a fraction of the pool per location; majorWound is ceil(hp/2) and feeds only dyingLimitFor; neither removes anyone from a fight, which is conditionFor at 2 hit points or a destroyed head. At 10 hp, leg/abdomen/chest capacity is 5 and majorWoundFor is 5, and those locations take 12 of 20 melee results and 15 of 20 ranged -- so two readers reconstructed a rule that does not exist, checked it against the log, and were confirmed by it. The note says to test an arm, the only place the difference shows. Guards verified to bite, not assumed: drift, re-cast, censoring, the longest refusal, the rounding catch and the vacuous-pass catch were each forced and each failed the build with the right guidance, then restored. npm run check: 16 guards, exit 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
28 lines
1.4 KiB
JavaScript
28 lines
1.4 KiB
JavaScript
/**
|
|
* CLEAN GROUND tells a GM how long a fight takes, and every figure it had was a median.
|
|
*
|
|
* A median is what the suite could see: fourteen guards averaged, so none of them could
|
|
* have said that one six-a-side fight in five runs past twenty rounds, or that a fight
|
|
* still going at fifteen is one the party is losing. Those are the sentences EXPOSURE now
|
|
* prints, and this is what keeps them true.
|
|
*
|
|
* Thin on purpose: the measurement lives in fight-tail.mjs, which is also the tool a
|
|
* reader runs, so the guard and the reading cannot drift apart.
|
|
*/
|
|
import { spawnSync } from "node:child_process";
|
|
|
|
const r = spawnSync(process.execPath, [new URL("fight-tail.mjs", import.meta.url).pathname, "--check"],
|
|
{ encoding: "utf8" });
|
|
|
|
if (r.status !== 0) {
|
|
process.stdout.write(r.stdout ?? "");
|
|
process.stderr.write(r.stderr ?? "");
|
|
console.error("check-fight-tail: FAILED — these fights no longer run the length CLEAN GROUND "
|
|
+ "says they do. Read `node tools/fight-tail.mjs` before re-recording.");
|
|
process.exit(1);
|
|
}
|
|
// update-readme reads the line beginning with this file's own name.
|
|
const m = r.stdout.match(/wipes the party ([\d.]+)x as often in the cut and ([\d.]+)x at six a side/) ?? [];
|
|
console.log(`check-fight-tail: OK — a fight past 15 rounds wipes the party ${m[1] ?? "?"}x as often in `
|
|
+ `the four-player cut and ${m[2] ?? "?"}x at six a side, and nothing was truncated`);
|