From 622b38ac08e280c0a254adfcf4184940018fd553 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Fri, 3 Apr 2026 19:05:49 +0200 Subject: [PATCH 01/13] Fixed certain fields in actionConfig not getting translated --- templates/actionTypes/range-target.hbs | 6 +++--- templates/actionTypes/roll.hbs | 8 ++++---- templates/actionTypes/save.hbs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/actionTypes/range-target.hbs b/templates/actionTypes/range-target.hbs index 143acdf8..114c76a6 100644 --- a/templates/actionTypes/range-target.hbs +++ b/templates/actionTypes/range-target.hbs @@ -1,12 +1,12 @@
{{localize "DAGGERHEART.GENERAL.range"}}{{#if fields.target}} & {{localize "DAGGERHEART.GENERAL.Target.single"}}{{/if}} - {{formField fields.range value=source.range label="DAGGERHEART.GENERAL.range" name=(concat path "range") localize=true}} + {{formField fields.range value=source.range label=(localize "DAGGERHEART.GENERAL.range") name=(concat path "range") localize=true}} {{#if fields.target}}
{{#if (and source.target.type (not (eq source.target.type 'self')))}} - {{ formField fields.target.amount value=source.target.amount label="DAGGERHEART.GENERAL.amount" name=(concat path "target.amount") localize=true}} + {{ formField fields.target.amount value=source.target.amount label=(localize "DAGGERHEART.GENERAL.amount") name=(concat path "target.amount") localize=true}} {{/if}} - {{ formField fields.target.type value=source.target.type label="DAGGERHEART.GENERAL.Target.single" name=(concat path "target.type") localize=true }} + {{ formField fields.target.type value=source.target.type label=(localize "DAGGERHEART.GENERAL.Target.single") name=(concat path "target.type") localize=true }}
{{/if}}
\ No newline at end of file diff --git a/templates/actionTypes/roll.hbs b/templates/actionTypes/roll.hbs index 2f257768..9784fc08 100644 --- a/templates/actionTypes/roll.hbs +++ b/templates/actionTypes/roll.hbs @@ -4,7 +4,7 @@ {{#if @root.hasBaseDamage}}{{formInput fields.useDefault name="roll.useDefault" value=source.useDefault dataset=(object tooltip="Use default Item values" tooltipDirection="UP")}}{{/if}} - {{formField fields.type label="Type" name="roll.type" value=source.type localize=true choices=@root.getRollTypeOptions}} + {{formField fields.type label="DAGGERHEART.GENERAL.type" name="roll.type" value=source.type localize=true choices=@root.getRollTypeOptions localize=true}} {{#if (eq source.type "diceSet")}}
{{formField fields.diceRolling.fields.multiplier name="roll.diceRolling.multiplier" value=source.diceRolling.multiplier localize=true}} @@ -17,13 +17,13 @@
{{#unless (eq source.type 'spellcast')}} {{#if @root.isNPC}} - {{formField fields.bonus label="DAGGERHEART.GENERAL.Modifier.single" name="roll.bonus" value=source.bonus placeholder=@root.baseAttackBonus disabled=(not source.type)}} + {{formField fields.bonus label="DAGGERHEART.GENERAL.Modifier.single" name="roll.bonus" value=source.bonus placeholder=@root.baseAttackBonus disabled=(not source.type) localize=true}} {{else}} {{formField fields.trait label="DAGGERHEART.GENERAL.Trait.single" name="roll.trait" value=source.trait localize=true disabled=(not source.type)}} {{/if}} {{/unless}} - {{formField fields.difficulty label="DAGGERHEART.GENERAL.difficulty" name="roll.difficulty" value=source.difficulty disabled=(not source.type)}} - {{formField fields.advState label="DAGGERHEART.ACTIONS.Config.advantageState" name="roll.advState" value=source.advState localize=true disabled=(not source.type)}} + {{formField fields.difficulty label="DAGGERHEART.GENERAL.difficulty" name="roll.difficulty" value=source.difficulty localize=true disabled=(not source.type)}} + {{formField fields.advState label="DAGGERHEART.ACTIONS.Config.advantageState" name="roll.advState" value=source.advState localize=true localize=true disabled=(not source.type)}}
{{/if}} \ No newline at end of file diff --git a/templates/actionTypes/save.hbs b/templates/actionTypes/save.hbs index fdadba54..865991c7 100644 --- a/templates/actionTypes/save.hbs +++ b/templates/actionTypes/save.hbs @@ -3,7 +3,7 @@

{{localize "DAGGERHEART.ACTIONS.Settings.saveHint"}}

{{formField fields.trait label="DAGGERHEART.GENERAL.Trait.single" name="save.trait" value=source.trait localize=true}} - {{formField fields.difficulty label="DAGGERHEART.GENERAL.difficulty" name="save.difficulty" value=source.difficulty disabled=(not source.trait) placeholder=@root.baseSaveDifficulty}} - {{formField fields.damageMod label="DAGGERHEART.ACTIONS.Config.damageOnSave" name="save.damageMod" value=source.damageMod localize=true disabled=(not source.trait)}} + {{formField fields.difficulty label="DAGGERHEART.GENERAL.difficulty" name="save.difficulty" value=source.difficulty disabled=(not source.trait) placeholder=@root.baseSaveDifficulty localize=true}} + {{formField fields.damageMod label="DAGGERHEART.ACTIONS.Config.damageOnSave" name="save.damageMod" value=source.damageMod localize=true localize=true disabled=(not source.trait)}}
\ No newline at end of file From 01619ef0672ef913f41af05f81b25d49d8131309 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Fri, 3 Apr 2026 19:15:20 +0200 Subject: [PATCH 02/13] Corrected github deploy manifest path --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 80b84704..e245c7fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,7 +35,7 @@ jobs: env: version: ${{steps.get_version.outputs.version-without-v}} url: https://github.com/${{github.repository}} - manifest: https://raw.githubusercontent.com/{{github.repository}}/main/system.json + manifest: https://raw.githubusercontent.com/${{github.repository}}/main/system.json download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/system.zip # Create a zip file with all files required by the module to add to the release From 3a117ef117f9de1d712076eae5235023c550477d Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Fri, 3 Apr 2026 23:32:30 +0200 Subject: [PATCH 03/13] Added evasion to party resources (#1771) --- .../less/sheets/actors/party/resources.less | 20 +++++++++++++++++++ system.json | 2 +- templates/sheets/actors/party/resources.hbs | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/styles/less/sheets/actors/party/resources.less b/styles/less/sheets/actors/party/resources.less index 4db254bf..68628295 100644 --- a/styles/less/sheets/actors/party/resources.less +++ b/styles/less/sheets/actors/party/resources.less @@ -155,6 +155,26 @@ body.game:is(.performance-low, .noblur) { } } + .stat-section { + position: relative; + display: flex; + gap: 10px; + background-color: light-dark(transparent, @dark-blue); + color: light-dark(@dark-blue, @golden); + padding: 5px 10px; + border: 1px solid light-dark(@dark-blue, @golden); + border-radius: 3px; + align-items: center; + width: fit-content; + + h4 { + font-size: var(--font-size-12); + font-weight: bold; + text-transform: uppercase; + color: light-dark(@dark-blue, @golden); + } + } + .threshold-section { display: flex; align-self: center; diff --git a/system.json b/system.json index ea71aaba..78355364 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.0.1", + "version": "2.0.2", "compatibility": { "minimum": "14.359", "verified": "14.359", diff --git a/templates/sheets/actors/party/resources.hbs b/templates/sheets/actors/party/resources.hbs index bfbfb578..b53282ca 100644 --- a/templates/sheets/actors/party/resources.hbs +++ b/templates/sheets/actors/party/resources.hbs @@ -87,6 +87,12 @@
{{/unless}} + {{#if (eq actor.type 'character')}} +
+

{{localize "DAGGERHEART.GENERAL.evasion"}}: {{actor.system.evasion}}

+
+ {{/if}} + {{#unless (eq actor.type 'companion')}}

{{localize "DAGGERHEART.GENERAL.DamageThresholds.minor"}}

From f91c140d34eaf8da276e14f29d1456666edfed18 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sat, 4 Apr 2026 11:48:41 +0200 Subject: [PATCH 04/13] Fixed so that multi term expressions get evaluated into a single number (#1772) --- module/data/activeEffect/changeTypes/armor.mjs | 3 ++- system.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/data/activeEffect/changeTypes/armor.mjs b/module/data/activeEffect/changeTypes/armor.mjs index f400d41b..713ef03d 100644 --- a/module/data/activeEffect/changeTypes/armor.mjs +++ b/module/data/activeEffect/changeTypes/armor.mjs @@ -44,7 +44,8 @@ export default class ArmorChange extends foundry.abstract.DataModel { label: 'Armor', defaultPriority: 20, handler: (actor, change, _options, _field, replacementData) => { - const parsedMax = itemAbleRollParse(change.value.max, actor, change.effect.parent); + const baseParsedMax = itemAbleRollParse(change.value.max, actor, change.effect.parent); + const parsedMax = new Roll(baseParsedMax).evaluateSync().total; game.system.api.documents.DhActiveEffect.applyChange( actor, { diff --git a/system.json b/system.json index 78355364..63dc33c2 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.0.2", + "version": "2.0.3", "compatibility": { "minimum": "14.359", "verified": "14.359", From 331f1ebf75a2221beaec7985f47dc642aeef8fa7 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sat, 4 Apr 2026 12:42:50 +0200 Subject: [PATCH 05/13] Fixed prose-mirror width --- styles/less/global/prose-mirror.less | 1 + 1 file changed, 1 insertion(+) diff --git a/styles/less/global/prose-mirror.less b/styles/less/global/prose-mirror.less index 506fb8b7..3523dc89 100644 --- a/styles/less/global/prose-mirror.less +++ b/styles/less/global/prose-mirror.less @@ -4,6 +4,7 @@ .application.daggerheart { prose-mirror { height: 100% !important; + width: 100%; .editor-menu { background-color: transparent; From 7057504a9eb3684b268617cf6e6ea73b699f659c Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sat, 4 Apr 2026 13:01:24 +0200 Subject: [PATCH 06/13] Fixes (#1774) --- module/dice/dhRoll.mjs | 6 +++--- module/dice/die/_module.mjs | 4 ++++ module/dice/die/dualityDie.mjs | 14 +++++++++++--- module/dice/die/fearDie.mjs | 9 +++++++++ module/dice/die/hopeDie.mjs | 9 +++++++++ module/dice/dualityRoll.mjs | 20 ++++++++++---------- 6 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 module/dice/die/fearDie.mjs create mode 100644 module/dice/die/hopeDie.mjs diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index e4a34bd4..aa4dd75f 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -246,7 +246,7 @@ export default class DHRoll extends Roll { return (this._formula = this.constructor.getFormula(this.terms)); } - /** + /** * Calculate total modifiers of any rolls, including non-dh rolls. * This exists because damage rolls still may receive base roll classes */ @@ -256,7 +256,7 @@ export default class DHRoll extends Roll { if (!roll.terms[i].isDeterministic) continue; const termTotal = roll.terms[i].total; if (typeof termTotal === 'number') { - const multiplier = roll.terms[i - 1]?.operator === " - " ? -1 : 1; + const multiplier = roll.terms[i - 1]?.operator === ' - ' ? -1 : 1; modifierTotal += multiplier * termTotal; } } @@ -272,7 +272,7 @@ export default class DHRoll extends Roll { const changeKeys = this.getActionChangeKeys(); return ( this.options.effects?.reduce((acc, effect) => { - if (effect.system.changes.some(x => changeKeys.some(key => x.key.includes(key)))) { + if (effect.system.changes.some(x => changeKeys.some(key => x.key?.includes(key)))) { acc[effect.id] = { id: effect.id, name: effect.name, diff --git a/module/dice/die/_module.mjs b/module/dice/die/_module.mjs index ed892f6a..19ca951a 100644 --- a/module/dice/die/_module.mjs +++ b/module/dice/die/_module.mjs @@ -1,9 +1,13 @@ import DualityDie from './dualityDie.mjs'; +import HopeDie from './hopeDie.mjs'; +import FearDie from './fearDie.mjs'; import AdvantageDie from './advantageDie.mjs'; import DisadvantageDie from './disadvantageDie.mjs'; export const diceTypes = { DualityDie, + HopeDie, + FearDie, AdvantageDie, DisadvantageDie }; diff --git a/module/dice/die/dualityDie.mjs b/module/dice/die/dualityDie.mjs index e9deb77f..83229425 100644 --- a/module/dice/die/dualityDie.mjs +++ b/module/dice/die/dualityDie.mjs @@ -43,9 +43,10 @@ export default class DualityDie extends foundry.dice.terms.Die { options: { appearance: {} } }; - const preset = await getDiceSoNicePreset(diceSoNice[key], faces); - diceSoNiceRoll.dice[0].options.appearance = preset.appearance; - diceSoNiceRoll.dice[0].options.modelFile = preset.modelFile; + const diceAppearance = await this.getDiceSoNiceAppearance(options.liveRoll.roll); + diceSoNiceRoll.dice[0].options.appearance = diceAppearance.appearance; + diceSoNiceRoll.dice[0].options.modelFile = diceAppearance.modelFile; + diceSoNiceRoll.dice[0].results = diceSoNiceRoll.dice[0].results.filter(x => x.active); await game.dice3d.showForRoll(diceSoNiceRoll, game.user, true); } else { @@ -59,4 +60,11 @@ export default class DualityDie extends foundry.dice.terms.Die { this.#updateResources(oldDuality, newDuality, options.liveRoll.actor); } } + + /** + * Overridden by extending classes HopeDie and FearDie + */ + async getDiceSoNiceAppearance() { + return {}; + } } diff --git a/module/dice/die/fearDie.mjs b/module/dice/die/fearDie.mjs new file mode 100644 index 00000000..2a09d432 --- /dev/null +++ b/module/dice/die/fearDie.mjs @@ -0,0 +1,9 @@ +import { getDiceSoNicePresets } from '../../config/generalConfig.mjs'; +import DualityDie from './dualityDie.mjs'; + +export default class FearDie extends DualityDie { + async getDiceSoNiceAppearance(roll) { + const { fear } = await getDiceSoNicePresets(roll, this.denomination, this.denomination); + return fear; + } +} diff --git a/module/dice/die/hopeDie.mjs b/module/dice/die/hopeDie.mjs new file mode 100644 index 00000000..af5a4425 --- /dev/null +++ b/module/dice/die/hopeDie.mjs @@ -0,0 +1,9 @@ +import { getDiceSoNicePresets } from '../../config/generalConfig.mjs'; +import DualityDie from './dualityDie.mjs'; + +export default class HopeDie extends DualityDie { + async getDiceSoNiceAppearance(roll) { + const { hope } = await getDiceSoNicePresets(roll, this.denomination, this.denomination); + return hope; + } +} diff --git a/module/dice/dualityRoll.mjs b/module/dice/dualityRoll.mjs index bc381f07..f9a06d37 100644 --- a/module/dice/dualityRoll.mjs +++ b/module/dice/dualityRoll.mjs @@ -24,7 +24,7 @@ export default class DualityRoll extends D20Roll { } get dHope() { - if (!(this.dice[0] instanceof game.system.api.dice.diceTypes.DualityDie)) this.createBaseDice(); + if (!(this.dice[0] instanceof game.system.api.dice.diceTypes.HopeDie)) this.createBaseDice(); return this.dice[0]; } @@ -34,7 +34,7 @@ export default class DualityRoll extends D20Roll { } get dFear() { - if (!(this.dice[1] instanceof game.system.api.dice.diceTypes.DualityDie)) this.createBaseDice(); + if (!(this.dice[1] instanceof game.system.api.dice.diceTypes.FearDie)) this.createBaseDice(); return this.dice[1]; } @@ -68,8 +68,8 @@ export default class DualityRoll extends D20Roll { } get extraDice() { - const { DualityDie, AdvantageDie, DisadvantageDie } = game.system.api.dice.diceTypes; - return this.dice.filter(x => ![DualityDie, AdvantageDie, DisadvantageDie].some(die => x instanceof die)); + const { HopeDie, FearDie, AdvantageDie, DisadvantageDie } = game.system.api.dice.diceTypes; + return this.dice.filter(x => ![HopeDie, FearDie, AdvantageDie, DisadvantageDie].some(die => x instanceof die)); } setRallyChoices() { @@ -125,8 +125,8 @@ export default class DualityRoll extends D20Roll { /** @inheritDoc */ static fromData(data) { - data.terms[0].class = 'DualityDie'; - data.terms[2].class = 'DualityDie'; + data.terms[0].class = 'HopeDie'; + data.terms[2].class = 'FearDie'; if (data.options.roll.advantage?.type && data.terms[4]?.faces) { data.terms[4].class = data.options.roll.advantage.type === 1 ? 'AdvantageDie' : 'DisadvantageDie'; } @@ -135,18 +135,18 @@ export default class DualityRoll extends D20Roll { createBaseDice() { if ( - this.dice[0] instanceof game.system.api.dice.diceTypes.DualityDie && - this.dice[1] instanceof game.system.api.dice.diceTypes.DualityDie + this.dice[0] instanceof game.system.api.dice.diceTypes.HopeDie && + this.dice[1] instanceof game.system.api.dice.diceTypes.FearDie ) { this.terms = [this.terms[0], this.terms[1], this.terms[2]]; return; } - this.terms[0] = new game.system.api.dice.diceTypes.DualityDie({ + this.terms[0] = new game.system.api.dice.diceTypes.HopeDie({ faces: this.data.rules.dualityRoll?.defaultHopeDice ?? 12 }); this.terms[1] = new foundry.dice.terms.OperatorTerm({ operator: '+' }); - this.terms[2] = new game.system.api.dice.diceTypes.DualityDie({ + this.terms[2] = new game.system.api.dice.diceTypes.FearDie({ faces: this.data.rules.dualityRoll?.defaultFearDice ?? 12 }); } From 70e21f34db33f884d315af0c2729d17723f2b44f Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sat, 4 Apr 2026 13:21:17 +0200 Subject: [PATCH 07/13] Corrected system.json --- system.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system.json b/system.json index 63dc33c2..28d849b3 100644 --- a/system.json +++ b/system.json @@ -297,7 +297,7 @@ "background": "systems/daggerheart/assets/logos/FoundrybornBackgroundLogo.png", "primaryTokenAttribute": "resources.hitPoints", "secondaryTokenAttribute": "resources.stress", - "url": "https://your/hosted/system/repo/", - "manifest": "https://your/hosted/system/repo/system.json", - "download": "https://your/packaged/download/archive.zip" + "url": "https://github.com/Foundryborne/daggerheart", + "manifest": "https://raw.githubusercontent.com/Foundryborne/daggerheart/main/system.json", + "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.0.3/system.zip" } From 0d7469801e7123588f736b43debdaa6e29eccd4e Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sat, 4 Apr 2026 23:22:25 +0200 Subject: [PATCH 08/13] Updated the longrest repair armor to the new armor max path along with a migration (#1777) --- module/config/generalConfig.mjs | 2 +- module/systemRegistration/migrations.mjs | 13 +++++++++++++ system.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index f3484e43..24f1de92 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -484,7 +484,7 @@ export const defaultRestOptions = { value: { custom: { enabled: true, - formula: '@system.armorScore' + formula: '@system.armorScore.max' } } } diff --git a/module/systemRegistration/migrations.mjs b/module/systemRegistration/migrations.mjs index 458ee6ef..2851f7d4 100644 --- a/module/systemRegistration/migrations.mjs +++ b/module/systemRegistration/migrations.mjs @@ -1,3 +1,4 @@ +import { defaultRestOptions } from '../config/generalConfig.mjs'; import { RefreshType, socketEvent } from './socket.mjs'; export async function runMigrations() { @@ -341,6 +342,18 @@ export async function runMigrations() { lastMigrationVersion = '2.0.0'; } + + if (foundry.utils.isNewerVersion('2.0.4', lastMigrationVersion)) { + const downtimeMoves = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew); + if (restMoves.longRest.moves.repairArmor) { + await downtimeMoves.updateSource({ + 'restMoves.longRest.moves.repairArmor': defaultRestOptions.longRest().repairArmor + }); + game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew, downtimeMoves.toObject()); + } + + lastMigrationVersion = '2.0.4'; + } //#endregion await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LastMigrationVersion, lastMigrationVersion); diff --git a/system.json b/system.json index 28d849b3..e237f538 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.0.3", + "version": "2.0.4", "compatibility": { "minimum": "14.359", "verified": "14.359", From 90f433989810d7a9098023a9f279a06c43d32788 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 5 Apr 2026 10:23:02 +0200 Subject: [PATCH 09/13] Restoring current version number --- system.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system.json b/system.json index e237f538..28d849b3 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.0.4", + "version": "2.0.3", "compatibility": { "minimum": "14.359", "verified": "14.359", From dbcef140a263297c0783dcea4dd1489d33ad40d7 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 5 Apr 2026 11:09:00 +0200 Subject: [PATCH 10/13] Fixed armorEffects erroring on isSuppressed when not on an actor --- module/data/activeEffect/changeTypes/armor.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/data/activeEffect/changeTypes/armor.mjs b/module/data/activeEffect/changeTypes/armor.mjs index 713ef03d..2f3b9765 100644 --- a/module/data/activeEffect/changeTypes/armor.mjs +++ b/module/data/activeEffect/changeTypes/armor.mjs @@ -111,6 +111,8 @@ export default class ArmorChange extends foundry.abstract.DataModel { }; get isSuppressed() { + if (!this.parent.parent?.actor) return false; + switch (this.value.interaction) { case CONFIG.DH.GENERAL.activeEffectArmorInteraction.active.id: return !this.parent.parent?.actor.system.armor; From fdfd8c5a8d40cc1eb99b84fbfe8cf29dd6d89ab5 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 5 Apr 2026 11:28:41 +0200 Subject: [PATCH 11/13] Fixed selecting which roll to use in TagTeamRolls becoming impossible when using an Ability option --- module/applications/dialogs/tagTeamDialog.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/applications/dialogs/tagTeamDialog.mjs b/module/applications/dialogs/tagTeamDialog.mjs index 5236afb8..054331b5 100644 --- a/module/applications/dialogs/tagTeamDialog.mjs +++ b/module/applications/dialogs/tagTeamDialog.mjs @@ -366,8 +366,7 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio let rollIsSelected = false; for (const member of Object.values(members)) { const rollFinished = Boolean(member.rollData); - const damageFinished = - member.rollData?.options?.hasDamage !== undefined ? member.rollData.options.damage : true; + const damageFinished = member.rollData?.options?.hasDamage ? Boolean(member.rollData.options.damage) : true; rollsAreFinished = rollsAreFinished && rollFinished && damageFinished; rollIsSelected = rollIsSelected || member.selected; From 67d142df3d5ae908293fbae74da8d35cb96f5b4b Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 5 Apr 2026 17:27:02 +0200 Subject: [PATCH 12/13] Fixed migration --- module/systemRegistration/migrations.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/systemRegistration/migrations.mjs b/module/systemRegistration/migrations.mjs index 2851f7d4..c2c53f4e 100644 --- a/module/systemRegistration/migrations.mjs +++ b/module/systemRegistration/migrations.mjs @@ -345,7 +345,7 @@ export async function runMigrations() { if (foundry.utils.isNewerVersion('2.0.4', lastMigrationVersion)) { const downtimeMoves = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew); - if (restMoves.longRest.moves.repairArmor) { + if (downtimeMoves.restMoves.longRest.moves.repairArmor) { await downtimeMoves.updateSource({ 'restMoves.longRest.moves.repairArmor': defaultRestOptions.longRest().repairArmor }); From 4c2d31b2f4dd7b76e4c6374bd6af3cf40a1cf56a Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sun, 5 Apr 2026 19:28:27 +0200 Subject: [PATCH 13/13] Fixed so that expanded damage info without any dice will show the correct value (#1780) --- templates/ui/chat/parts/damage-part.hbs | 41 +++++++++++++------------ 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/templates/ui/chat/parts/damage-part.hbs b/templates/ui/chat/parts/damage-part.hbs index 02519a86..45b09b72 100644 --- a/templates/ui/chat/parts/damage-part.hbs +++ b/templates/ui/chat/parts/damage-part.hbs @@ -33,31 +33,32 @@
{{total}}
{{/if}}
- {{#each dice}} - {{#each results}} - {{#unless discarded}} -
-
- {{#if hasRerolls}}{{/if}} - {{result}} + {{#if dice.length}} + {{#each dice}} + {{#each results}} + {{#unless discarded}} +
+
+ {{#if hasRerolls}}{{/if}} + {{result}} +
-
- {{/unless}} + {{/unless}} + {{/each}} {{/each}} - {{/each}} - {{#if modifierTotal}} -
-
{{modifierTotal}}
-
- {{/if}} - {{#unless dice.length}} + {{#if modifierTotal}} +
+
{{modifierTotal}}
+
+ {{/if}} + {{else}}
{{total}}
- {{/unless}} + {{/if}}
{{/each}}