diff --git a/module/data/chat-message/adversaryRoll.mjs b/module/data/chat-message/adversaryRoll.mjs index 337acf5b..1447acb8 100644 --- a/module/data/chat-message/adversaryRoll.mjs +++ b/module/data/chat-message/adversaryRoll.mjs @@ -110,6 +110,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel { if (this.hasTarget) { this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0; this.currentTargets = this.getTargetList(); + // this.registerTargetHook(); if (this.targetMode === true && this.hasRoll) { this.targetShort = this.targets.reduce( diff --git a/module/documents/chatMessage.mjs b/module/documents/chatMessage.mjs index 9b878776..baf4ca17 100644 --- a/module/documents/chatMessage.mjs +++ b/module/documents/chatMessage.mjs @@ -1,6 +1,5 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { targetHook = null; - targetSelection = null; async renderHTML() { const actor = game.actors.get(this.speaker.actor); @@ -24,7 +23,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { /** @inheritDoc */ prepareData() { - if (this.isAuthor && this.targetSelection === null) this.targetSelection = this.system.targets?.length > 0; + if (this.isAuthor && this.targetSelection === undefined) this.targetSelection = this.system.targets?.length > 0; super.prepareData(); } diff --git a/templates/ui/chat/parts/roll-part.hbs b/templates/ui/chat/parts/roll-part.hbs index d702db91..8e88015f 100644 --- a/templates/ui/chat/parts/roll-part.hbs +++ b/templates/ui/chat/parts/roll-part.hbs @@ -6,7 +6,7 @@ {{#if roll.isCritical}} {{localize "DAGGERHEART.GENERAL.criticalShort"}} {{else}} - {{#if (and roll.result (not roll.type "reaction"))}} + {{#if (and roll.result (not (eq roll.type "reaction")))}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}} {{/if}} {{/if}}