diff --git a/lang/en.json b/lang/en.json index 867558d7..349200f7 100755 --- a/lang/en.json +++ b/lang/en.json @@ -823,8 +823,8 @@ "name": "Restrained", "description": "When an effect makes a creature Restrained, it means they cannot move until this condition is cleared.\nThey can still take actions from their current position." }, - "unconcious": { - "name": "Unconcious", + "unconscious": { + "name": "Unconscious", "description": "Your character can’t move or act while unconscious, they can’t be targeted by an attack." }, "vulnerable": { diff --git a/module/applications/sheets/api/application-mixin.mjs b/module/applications/sheets/api/application-mixin.mjs index 1a7e19c1..315ae3cb 100644 --- a/module/applications/sheets/api/application-mixin.mjs +++ b/module/applications/sheets/api/application-mixin.mjs @@ -419,7 +419,7 @@ export default function DHApplicationMixin(Base) { : this.document.system.actions?.get(actionId); if (!doc) return; - const description = doc.system?.description ?? doc.description; + const description = game.i18n.localize(doc.system?.description ?? doc.description); const isAction = !!actionId; descriptionElement.innerHTML = await foundry.applications.ux.TextEditor.implementation.enrichHTML( description, diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index 133dd09e..80ca1983 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -183,11 +183,11 @@ export const conditions = { icon: 'icons/magic/control/debuff-chains-shackle-movement-red.webp', description: 'DAGGERHEART.CONFIG.Condition.restrained.description' }, - unconcious: { - id: 'unconcious', - name: 'DAGGERHEART.CONFIG.Condition.unconcious.name', + unconscious: { + id: 'unconscious', + name: 'DAGGERHEART.CONFIG.Condition.unconscious.name', icon: 'icons/magic/control/sleep-bubble-purple.webp', - description: 'DAGGERHEART.CONFIG.Condition.unconcious.description' + description: 'DAGGERHEART.CONFIG.Condition.unconscious.description' }, dead: { id: 'dead', 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/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 504a9c02..126a7944 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -238,7 +238,7 @@ export const registerRollDiceHooks = () => { if (updates.length) { const target = actor.system.partner ?? actor; - if (!['dead', 'unconcious'].some(x => actor.statuses.has(x))) { + if (!['dead', 'unconscious'].some(x => actor.statuses.has(x))) { setTimeout(() => { target.modifyResource(updates); }, 50); 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)}}
{{localize "DAGGERHEART.GENERAL.Modifier.plural"}} {{#each @root.modifiers}} @@ -39,7 +39,7 @@ {{/if}} {{/each}}
- {{/if}} + {{/unless}}
{{#if directDamage}}