Hotfix: the wrap gains its vintage gate; every ledger verified
Same lesson twice in one night: the toroidal dread applied at every rev and QD3S (recorded flat) refused seq 76 again on restore. rev >= 32 wraps; older vintages measure the flat diamond they were played under. This time verified properly: a strict replay harness (any refused command is a hard failure) ran all 41 production ledgers against the new engine before deploy — 0 failures. That harness now lives in the repo as the pre-deploy determinism check it always should have been. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
co-authored by
Claude Fable 5
parent
0a0108c48c
commit
c87b8cb28d
@@ -3734,12 +3734,19 @@ function dreadDistance(board: AssembledBoard, a: Cell, b: Cell): number {
|
||||
}
|
||||
|
||||
function fearRepels(state: GameState, moverId: PlayerId | null, from: Cell, to: Cell): boolean {
|
||||
const board = boardView(state);
|
||||
// The wrap joined the measure at rev 32; older ledgers were recorded
|
||||
// under the flat diamond and replay so.
|
||||
const wraps = (state.config.deckRev ?? 1) >= 32;
|
||||
const board = wraps ? boardView(state) : null;
|
||||
for (const other of state.players) {
|
||||
if (!other.alive || other.id === moverId) continue;
|
||||
if (sustainedOn(state, other.id, "fear").length === 0) continue;
|
||||
const d = dreadDistance(board, other.position, to);
|
||||
const dBefore = dreadDistance(board, other.position, from);
|
||||
const d = board
|
||||
? dreadDistance(board, other.position, to)
|
||||
: Math.abs(other.position.x - to.x) + Math.abs(other.position.y - to.y);
|
||||
const dBefore = board
|
||||
? dreadDistance(board, other.position, from)
|
||||
: Math.abs(other.position.x - from.x) + Math.abs(other.position.y - from.y);
|
||||
if (d <= 3 && d < dBefore) return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user