From d35b9e8eb30f6a0959c68117f8db76af55df0c38 Mon Sep 17 00:00:00 2001 From: Dapoolp Date: Sun, 24 Aug 2025 22:32:38 +0200 Subject: [PATCH] n --- module/data/chat-message/actorRoll.mjs | 3 ++- templates/ui/chat/parts/target-part.hbs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/data/chat-message/actorRoll.mjs b/module/data/chat-message/actorRoll.mjs index 4431f87d..eebde704 100644 --- a/module/data/chat-message/actorRoll.mjs +++ b/module/data/chat-message/actorRoll.mjs @@ -113,7 +113,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel { this.currentTargets = this.getTargetList(); // this.registerTargetHook(); - if (this.targetMode === true && this.hasRoll) { + if (this.hasRoll) { this.targetShort = this.targets.reduce( (a, c) => { if (c.hit) a.hit += 1; @@ -128,6 +128,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel { this.canViewSecret = this.parent.speakerActor?.testUserPermission(game.user, 'OBSERVER'); this.canButtonApply = game.user.isGM; + this.isGM = game.user.isGM; } getTargetList() { diff --git a/templates/ui/chat/parts/target-part.hbs b/templates/ui/chat/parts/target-part.hbs index af7e93b0..a1585e27 100644 --- a/templates/ui/chat/parts/target-part.hbs +++ b/templates/ui/chat/parts/target-part.hbs @@ -1,6 +1,6 @@
{{pluralize currentTargets.length "DAGGERHEART.GENERAL.Target"}}
- {{#if (or (and targets.length (or (gt targetShort.hit 0) (gt targetShort.miss 0))) (and hasSave pendingSaves))}} + {{#if isGM}}
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}} @@ -30,7 +30,7 @@
{{name}}
- {{#if (and ../targetMode ../hasRoll)}} + {{#if (and ../hasRoll (hasProperty this "hit"))}}
{{#if hit}} {{localize "DAGGERHEART.GENERAL.hit.single"}}