From 87019a3ae0dac5e87b71eaf7aebb94a29d13ba2e Mon Sep 17 00:00:00 2001 From: raeleus Date: Mon, 7 Oct 2024 05:40:33 -0700 Subject: [PATCH] Only add characters to initiative if they have health. --- Library.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library.js b/Library.js index 556a777..bc5e15d 100644 --- a/Library.js +++ b/Library.js @@ -885,10 +885,12 @@ function createInitiativeOrder() { state.initiativeOrder = [] for (var character of state.characters) { + if (character.health <= 0) continue state.initiativeOrder.push(character) } for (var enemy of state.enemies) { + if (enemy.health <= 0) continue state.initiativeOrder.push(enemy) }