It has been such a long time since I coded in Maptool, that I lost my proficiencies with it!
According to the rules, characters no longer go into the negatives when they take damage - it stops at 0. However, if they take damage = to their Max HP, then they are dead.
Can you please help me with my current Take Damage macro? It is probably something crazy simple.
Code: Select all
[H:success=input("Damage | "+0 +" | How much damage did you just take? | TEXT")]
[H:abort(success)]
[h: Thp=TempHP]
[h: DamAmt = max(0, Damage - TempHP)]
[h: TempHP = max(0, TempHP - Damage)]
[h: CurrentHP = CurrentHP - DamAmt]
[h:ShowBar = If(CurrentHP >= MaxHP,'setBarVisible("Green","off")','bar.Green=CurrentHP/MaxHP')]
[h:eval(ShowBar)]
[h:state.Bloodied = if(CurrentHP <= floor(MaxHP/2), 1, 0)]
[h:state.Dying = if(CurrentHP <= (0), 1, 0)]
[h:state.Dead = if(CurrentHP <= -floor(MaxHP), 1, 0)]
[r:token.name] just got hit for [r:Damage] damage and took [r:DamAmt] damage.<br>
Temporary HP was [r:Thp] and is now [r:TempHP]. <br>
[r:token.name] now has [r:CurrentHP] HP remaining.