Fixed Adversary roll failing

This commit is contained in:
WBHarry 2026-03-31 18:01:12 +02:00
parent d284bd7398
commit 25264c26e9
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ export default class D20Roll extends DHRoll {
get isCritical() { get isCritical() {
if (!this.d20._evaluated) return; if (!this.d20._evaluated) return;
const criticalThreshold = this.options.actionType === 'reaction' ? 20 : this.data.system.criticalThreshold; const criticalThreshold = this.options.actionType === 'reaction' ? 20 : this.data.criticalThreshold;
return this.d20.total >= criticalThreshold; return this.d20.total >= criticalThreshold;
} }

View file

@ -6,7 +6,7 @@
{{#if roll.isCritical}} {{#if roll.isCritical}}
<span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span> <span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
{{else}} {{else}}
{{#if (and roll.result (not (eq roll.type "reaction")))}} {{#if (and roll.dHope (not (eq roll.type "reaction")))}}
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}</span> <span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}</span>
{{/if}} {{/if}}
{{/if}} {{/if}}
@ -89,7 +89,7 @@
{{#each roll.dice}} {{#each roll.dice}}
{{#each results}} {{#each results}}
<div class="roll-die {{#unless (or @../first discarded)}} has-plus{{/unless}}"> <div class="roll-die {{#unless (or @../first discarded)}} has-plus{{/unless}}">
<div class="dice {{../dice}}{{#if discarded}} discarded{{else}}{{#if (and @../first ../../roll.advantage.type)}}{{#if (eq ../../roll.advantage.type 1)}} color-adv{{else}} color-dis{{/if}}{{/if}}{{#if success}} color-adv{{/if}}{{/if}}"> <div class="dice {{../denomination}}{{#if discarded}} discarded{{else}}{{#if (and @../first ../../roll.advantage.type)}}{{#if (eq ../../roll.advantage.type 1)}} color-adv{{else}} color-dis{{/if}}{{/if}}{{#if success}} color-adv{{/if}}{{/if}}">
{{result}} {{result}}
</div> </div>
</div> </div>