From 0065bf668d9c9ed7c1a5ac0fb462778c10e02fa3 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Sat, 22 Apr 2023 20:58:12 +0200 Subject: [PATCH] fix: properly log automatic unconscious status (close #132) (#133) --- src/tracker/stores/tracker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tracker/stores/tracker.ts b/src/tracker/stores/tracker.ts index 87f05ba3..2e24baad 100644 --- a/src/tracker/stores/tracker.ts +++ b/src/tracker/stores/tracker.ts @@ -333,7 +333,10 @@ function createTracker() { Math.max(Math.abs(toAdd) * modifier, 1); toAdd = roundHalf ? Math.trunc(toAdd) : toAdd; message.hp = toAdd; - if (creature.hp <= 0) { + if ( + toAdd < 0 && + creature.hp + creature.temp + toAdd <= 0 + ) { message.unc = true; } change.hp = toAdd;