Fix HP loss
All checks were successful
Release Creation / build (release) Successful in 1m20s

This commit is contained in:
2025-05-02 18:24:14 +02:00
parent 71d3f777bf
commit bd8b098b35
23 changed files with 71 additions and 69 deletions

View File

@ -47,7 +47,9 @@ export default class LethalFantasyUtils {
event.preventDefault();
let hpLoss = event.currentTarget.dataset.hpValue;
if (token) {
let actor = game.actors.get(token.actorId);
let tokenFull = canvas.tokens.placeables.find( t => t.id === token._id);
console.log(tokenFull, token)
let actor = tokenFull.actor;
actor.applyDamage(Number(hpLoss));
html.find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
html.find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');