Skip to content

Commit

Permalink
!heal now heals from 0 if you are on negative
Browse files Browse the repository at this point in the history
  • Loading branch information
draconas1 committed Jan 23, 2021
1 parent b9ee0c2 commit 3f2f706
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CreatureExport/Roll20Api/Character-Ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ var CharacterOps = CharacterOps || (function () {
let surgesAttr = surgesAttrList[0]
let surges = surgesAttr.get("current")
if (surges > 0) {
let hp = TokenOps.value(token, HP_BAR, false)
let rawhp = TokenOps.value(token, HP_BAR, false)
let hp = rawhp > 0 ? rawhp : 0
let hpMax = TokenOps.value(token, HP_BAR, true)
MasterplanCommon.debugOutput(name + ": HP/Max, Surges/Surge Value " + hp + "/" + hpMax + ", " + surges + "/" + surgeValue, msg.who)
if (hp < hpMax) {
Expand Down

0 comments on commit 3f2f706

Please sign in to comment.