mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
Fixed duality roll buttons
This commit is contained in:
parent
75ee44af52
commit
01aa1b4bdd
3 changed files with 11 additions and 10 deletions
|
|
@ -9,13 +9,13 @@ export function dualityRollEnricher(match, _options) {
|
|||
}
|
||||
|
||||
export function getDualityMessage(roll) {
|
||||
const attributeLabel =
|
||||
roll.attribute && abilities[roll.attribute]
|
||||
const traitLabel =
|
||||
roll.trait && abilities[roll.trait]
|
||||
? game.i18n.format('DAGGERHEART.General.Check', {
|
||||
check: game.i18n.localize(abilities[roll.attribute].label)
|
||||
check: game.i18n.localize(abilities[roll.trait].label)
|
||||
})
|
||||
: null;
|
||||
const label = attributeLabel ?? game.i18n.localize('DAGGERHEART.General.Duality');
|
||||
const label = traitLabel ?? game.i18n.localize('DAGGERHEART.General.Duality');
|
||||
|
||||
const dualityElement = document.createElement('span');
|
||||
dualityElement.innerHTML = `
|
||||
|
|
@ -23,7 +23,7 @@ export function getDualityMessage(roll) {
|
|||
data-label="${label}"
|
||||
data-hope="${roll.hope ?? 'd12'}"
|
||||
data-fear="${roll.fear ?? 'd12'}"
|
||||
${roll.attribute && abilities[roll.attribute] ? `data-attribute="${roll.attribute}"` : ''}
|
||||
${roll.trait && abilities[roll.trait] ? `data-trait="${roll.trait}"` : ''}
|
||||
${roll.advantage ? 'data-advantage="true"' : ''}
|
||||
${roll.disadvantage ? 'data-disadvantage="true"' : ''}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue