Rework backend #1
@@ -157,6 +157,7 @@ async function main() {
|
|||||||
let lastReorder = 0;
|
let lastReorder = 0;
|
||||||
|
|
||||||
for (let roundN = 1; roundN <= ROUNDS; roundN++) {
|
for (let roundN = 1; roundN <= ROUNDS; roundN++) {
|
||||||
|
console.log(`--- round ${roundN} starting ---`);
|
||||||
// advance initiative until round counter ticks (full cycle done).
|
// advance initiative until round counter ticks (full cycle done).
|
||||||
const cap = (enc.participants.length + 2) * 2;
|
const cap = (enc.participants.length + 2) * 2;
|
||||||
let guard = 0;
|
let guard = 0;
|
||||||
@@ -338,8 +339,6 @@ async function main() {
|
|||||||
}
|
}
|
||||||
if (!enc.isStarted) { console.log('combat auto-ended'); break; }
|
if (!enc.isStarted) { console.log('combat auto-ended'); break; }
|
||||||
const alive = enc.participants.filter(p => p.currentHp > 0).length;
|
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
|
// revive dead: heal to full + reactivate. Sustains combat for 100 rounds
|
||||||
// and exercises toggleActive reactivate + heal-from-zero path.
|
// and exercises toggleActive reactivate + heal-from-zero path.
|
||||||
const dead = enc.participants.filter(p => p.currentHp <= 0 || p.isActive === false);
|
const dead = enc.participants.filter(p => p.currentHp <= 0 || p.isActive === false);
|
||||||
|
|||||||
Reference in New Issue
Block a user