diff --git a/module/dice/damageRoll.mjs b/module/dice/damageRoll.mjs index 44794faa..8a72d86e 100644 --- a/module/dice/damageRoll.mjs +++ b/module/dice/damageRoll.mjs @@ -159,25 +159,28 @@ export default class DamageRoll extends DHRoll { if (config.data?.parent) { if (config.data.parent.appliedEffects) { // Bardic Rally - mods.rally = { - label: 'DAGGERHEART.CLASS.Feature.rallyDice', - values: config.data?.parent?.appliedEffects.reduce((a, c) => { + const rallyChoices = config.data?.parent?.appliedEffects.reduce((a, c) => { const change = c.changes.find(ch => ch.key === 'system.bonuses.rally'); if (change) a.push({ value: c.id, label: change.value }); return a; - }, []), - value: null, - beforeCrit: true, - callback: part => { - const rallyFaces = config.modifiers.rally.values.find( - r => r.value === config.modifiers.rally.value - )?.label; - part.roll.terms.push( - new foundry.dice.terms.OperatorTerm({ operator: '+' }), - ...this.parse(`1${rallyFaces}`) - ); - } - }; + }, []) + if(rallyChoices.length) { + mods.rally = { + label: 'DAGGERHEART.CLASS.Feature.rallyDice', + values: rallyChoices, + value: null, + beforeCrit: true, + callback: part => { + const rallyFaces = config.modifiers.rally.values.find( + r => r.value === config.modifiers.rally.value + )?.label; + part.roll.terms.push( + new foundry.dice.terms.OperatorTerm({ operator: '+' }), + ...this.parse(`1${rallyFaces}`) + ); + } + }; + } } const item = config.data.parent.items?.get(config.source.item); diff --git a/templates/dialogs/dice-roll/damageSelection.hbs b/templates/dialogs/dice-roll/damageSelection.hbs index be49906b..ba542666 100644 --- a/templates/dialogs/dice-roll/damageSelection.hbs +++ b/templates/dialogs/dice-roll/damageSelection.hbs @@ -24,7 +24,7 @@ {{/each}} - {{#if @root.modifiers}} + {{#unless (empty @root.modifiers)}}
- {{/if}} + {{/unless}}