From d73405753a4bb37a7cedb53201a26318002435fc Mon Sep 17 00:00:00 2001 From: david raistrick <1108844+keen99@users.noreply.github.com> Date: Wed, 1 Jul 2026 17:21:55 -0400 Subject: [PATCH] fix(replay): round markers align with turn-line round labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round-complete marker logged roundN (just completed) while turn lines logged enc.round (post-increment, new round). Result: 'turn 8 (round 2)' appeared BEFORE 'round 1 complete' — confusing off-by-one. Replaced bottom 'round N complete' marker with top 'round N starting' marker. Turn lines for round N now appear after its start marker. Logic unchanged. 4-round smoke verified. --- scripts/replay-combat.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/replay-combat.js b/scripts/replay-combat.js index 0050fe8..cbc6210 100644 --- a/scripts/replay-combat.js +++ b/scripts/replay-combat.js @@ -157,6 +157,7 @@ async function main() { let lastReorder = 0; for (let roundN = 1; roundN <= ROUNDS; roundN++) { + console.log(`--- round ${roundN} starting ---`); // advance initiative until round counter ticks (full cycle done). const cap = (enc.participants.length + 2) * 2; let guard = 0; @@ -338,8 +339,6 @@ async function main() { } if (!enc.isStarted) { console.log('combat auto-ended'); break; } const alive = enc.participants.filter(p => p.currentHp > 0).length; - console.log(`--- round ${roundN} complete (turns=${totalTurns}, alive=${alive}) ---`); - // revive dead: heal to full + reactivate. Sustains combat for 100 rounds // and exercises toggleActive reactivate + heal-from-zero path. const dead = enc.participants.filter(p => p.currentHp <= 0 || p.isActive === false);