Skip to content

Commit

Permalink
fix: properly log automatic unconscious status (close #132) (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaggioli authored Apr 22, 2023
1 parent ab7ee5f commit 0065bf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tracker/stores/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0065bf6

Please sign in to comment.