/** * 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`);