Partial fix for #671 Reaction Roll chat display to match rules

This commit is contained in:
Chris Ryan 2025-08-11 18:25:22 +10:00
parent 4ffa690aec
commit 208b6623b4
4 changed files with 12 additions and 5 deletions

View file

@ -209,8 +209,10 @@ Hooks.on('chatMessage', (_, message) => {
const difficulty = rollCommand.difficulty; const difficulty = rollCommand.difficulty;
const target = getCommandTarget({ allowNull: true }); const target = getCommandTarget({ allowNull: true });
const titleType = reaction ? 'DAGGERHEART.UI.Chat.dualityRoll.abilityReactionCheckTitle'
: 'DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle';
const title = traitValue const title = traitValue
? game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', { ? game.i18n.format(titleType, {
ability: game.i18n.localize(SYSTEM.ACTOR.abilities[traitValue].label) ability: game.i18n.localize(SYSTEM.ACTOR.abilities[traitValue].label)
}) })
: game.i18n.localize('DAGGERHEART.GENERAL.duality'); : game.i18n.localize('DAGGERHEART.GENERAL.duality');

View file

@ -2265,7 +2265,8 @@
"title": "Domain Card" "title": "Domain Card"
}, },
"dualityRoll": { "dualityRoll": {
"abilityCheckTitle": "{ability} Check" "abilityCheckTitle": "{ability} Check",
"abilityReactionCheckTitle": "{ability} Reaction Check"
}, },
"featureTitle": "Class Feature", "featureTitle": "Class Feature",
"healingRoll": { "healingRoll": {

View file

@ -337,7 +337,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
if (!actor) return; if (!actor) return;
const title = actor.isNPC const title = actor.isNPC
? game.i18n.localize('DAGGERHEART.GENERAL.reactionRoll') ? game.i18n.localize('DAGGERHEART.GENERAL.reactionRoll')
: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', { : game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityReactionCheckTitle', {
ability: game.i18n.localize(abilities[this.save.trait]?.label) ability: game.i18n.localize(abilities[this.save.trait]?.label)
}); });
return actor.diceRoll({ return actor.diceRoll({

View file

@ -6,8 +6,12 @@
{{#if roll.isCritical}} {{#if roll.isCritical}}
<span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span> <span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
{{else}} {{else}}
{{#if roll.result}} {{#if (eq roll.type "reaction")}}
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}</span> {{!-- Display no hope/fear as per rules --}}
{{else}}
{{#if roll.result}}
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}</span>
{{/if}}
{{/if}} {{/if}}
{{/if}} {{/if}}
</span> </span>