From 32f4533cec4b033b5742f891619ffbdfd322aee4 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Thu, 14 Aug 2025 00:36:45 +0200 Subject: [PATCH 1/7] Hotfix 1.0.3 (#925) * Hotfix 1.0.2 (#916) * Updated the background image for the system * Fixed so Weapon/Armor features are added again * Fixed so fear is available as a resource to be deducted by actions (#757) * Changed to use the config labels and src * Updated Weapons * Fixed so the decrease button of simple fear tracker is not visible when not hovered * Fixed so armor preUpdate doesn't fail if no system changes are made * Updated .gitignore and author details (#777) * Add author details and name mapping for chrisryan10 (#773) Co-authored-by: Chris Ryan * Add build to ignore for my linux dev (#775) Co-authored-by: Chris Ryan --------- Co-authored-by: Chris Ryan * Corrected sneak attack active effect (#780) * Fixed a spelling error (#779) * Fix bardic rally showing in damage dialog when it should not (#783) * update spelling (#786) * Translating inventory descriptions (#782) * updated credits for 1.0.1 release (#797) * updated credits for 1.0.1 release * further updated artwork credits * Chagned handlebarhelper rollparsed to be more defensive (#794) * Added missing scene refreshType (#790) * Remove ability use buttons for not owned abilities (#795) * [Fix] PrayerDice Fixed (#799) * Fixed prayer dice, and wheelchair images * Fixed -settings data sources * Dragging features from one adversary to another (#788) * [Fix] Levelup Fixes (#787) * Fixed crash on experience selection. Fixed subclass error on multiclassing * Fixed so multiclasses do not gain the hope feature for the class * Fixed so Class/Subclass features are properly deleted on delevel * Removed automatic deletion of features on delevel when not using levelup auto * Fixed so custom domains can be selected in levelup when multiclassing * Changed so encounter countdowns is a button (#804) * Fixed so that dropping on class/subclass...creates the item on the character (#803) * [BUG] - Importing All Adversaries/Environments (#814) Fixes #774 Co-authored-by: Joaquin Pereyra * Bug/671 reaction roll chat title (#809) * Update Reaction Roll Chat Message Title * Removed console log --------- Co-authored-by: WBHarry * Improve Trait tooltip display (#817) Fixes #806 Co-authored-by: Joaquin Pereyra * [BUG] - Combat Tracker d12 logo not found (#812) Fixes #764 Co-authored-by: Joaquin Pereyra * Compendium Browser (#821) * Corrected timbending description localization (#816) * [Fix] Compendium Item (#810) * Corrected Emberwoven Armor * Fixed subclass regression * Fixed so character's with wildcard images don't break beastform (#815) * Fix roll result based duality damage (#822) * Impproved Adversary Sheet Data Display (#751) * Impproved Adversary Sheet Data Display Fixes #604 * FIX: formula lables for attacks and weapons --------- Co-authored-by: Joaquin Pereyra * Fixed so exp increases can be selected normally (#835) * Update localization of rollSelection.hbs (#841) The Fear label lacked a localization path * renamed .md files (#834) * Removed the unintended icons that came from merge conflicts (#838) * Sheet image position (#861) * Remove extra result text from reaction chat message (#860) * Remove extra result text from reaction chat message * Remove log * [Fix] 850 - Downtime Refreshes (#859) * Fixed the filtering of refreshable features * Raised version * [Fix] 691 - CharacterCreation Improvement (#863) * Removed main creation tab. Added equipment to remaining tab * Fixed MixedAncestry name setting * Fixed tab after first creation * Fix/857 generic roll buttons (#866) * Action Macro working again * Remove buttons from generic roll for non-gm * Update sidebar.less Armor Slots label padding, for translations (#872) Equalizes the vertical and horizontal padding on the Armor Slots status label, to allow for more (much needed) room for the upcoming French translation (and others in the future). Doesn't change anything for the display in English. * Hid item attachments for now (#876) * Fixed so effects supposed to use item data use the model directly, since items have no rolldata (#883) * Made sure the beastform user isn't moved onto other duplicate actors. Fixed scrolling text duplication (#882) * Change the critical damage max calculation (#890) * Change the critical damage max calculation to avoid setting the rolled portion to maximum all the time. * Change to the more neater code * Restored package.json --------- Co-authored-by: Chris Ryan Co-authored-by: WBHarry * Fix movement (#885) * Changed so companion can level up on its own (#879) * Fix the missing ancestries in the SRD (#888) Co-authored-by: Chris Ryan * Removed the old, now unused companion levelup button (#893) * Fixed so custom downtime moves will display their descriptions in the tooltip (#894) * Made coinflip icons in chat round (#895) * Fixed undefined case (#898) * Fix/877 hope update order (#896) * Action Macro working again * k * Fix Hope gain on Duality Roll * [Feature] Descriptions enhancements (#887) * add style to hover items and add start setting to features be expanded by default * REFACTOR: now prepare description onRender and simply the other methods * add setting to extend description from items and add molilo contacts in system.json --------- Co-authored-by: Joaquin Pereyra * Fixed traits container styling in light-mode (#899) * [BUG] - Movement Button selector not showing current mode (#912) Fixes #910 Co-authored-by: Joaquin Pereyra * Fix/864 chat targeting (#911) * Fix targeting * Fix chat target selection * Uncomment chatDisplay * Removed unessecary arg * [Feature] 648 - Mark Defeated Actors (#914) * Improved death marking styling * Added automation for defeated status * Fixed so the tracker recognises and sets the correct defeated statuses depending on type * Fixed so missing statuses doesn't cause crashes * Increased companion sheet width by 40 pixels * Added missing inheritDoc * Removed fas * FIX: use img instead of icons con statusEffectConfigns (#917) Authored-by: Joaquin Pereyra --------- Co-authored-by: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> Co-authored-by: Chris Ryan Co-authored-by: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Co-authored-by: IrkTheImp <41175833+IrkTheImp@users.noreply.github.com> Co-authored-by: CPTN_Cosmo Co-authored-by: Josh Q. Co-authored-by: joaquinpereyra98 <24190917+joaquinpereyra98@users.noreply.github.com> Co-authored-by: Joaquin Pereyra Co-authored-by: SunnySunSun Co-authored-by: Murilo Brito <91566541+moliloo@users.noreply.github.com> * Removed duplicated methods so logic gets correct (#920) * Temp ActionField attack type missing (#923) --------- Co-authored-by: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> Co-authored-by: Chris Ryan Co-authored-by: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Co-authored-by: IrkTheImp <41175833+IrkTheImp@users.noreply.github.com> Co-authored-by: CPTN_Cosmo Co-authored-by: Josh Q. Co-authored-by: joaquinpereyra98 <24190917+joaquinpereyra98@users.noreply.github.com> Co-authored-by: Joaquin Pereyra Co-authored-by: SunnySunSun Co-authored-by: Murilo Brito <91566541+moliloo@users.noreply.github.com> --- module/applications/ui/combatTracker.mjs | 7 +------ module/data/fields/actionField.mjs | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/module/applications/ui/combatTracker.mjs b/module/applications/ui/combatTracker.mjs index 69c43b61..85c77cd3 100644 --- a/module/applications/ui/combatTracker.mjs +++ b/module/applications/ui/combatTracker.mjs @@ -43,11 +43,6 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C }); } - async _prepareTurnContext(combat, combatant, index) { - const turn = await super._prepareTurnContext(combat, combatant, index); - return { ...turn, isNPC: combatant.isNPC, system: combatant.system.toObject() }; - } - _getCombatContextOptions() { return [ { @@ -113,7 +108,7 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C tooltip: this._formatEffectsTooltip(effects) }; - return turn; + return { ...turn, isNPC: combatant.isNPC, system: combatant.system.toObject() }; } async setCombatantSpotlight(combatantId) { diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index dc567da9..a8b01e37 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -102,6 +102,7 @@ export class ActionField extends foundry.data.fields.ObjectField { /** @override */ initialize(value, model, options = {}) { + if(value && !value.type) value.type = 'attack'; const cls = this.getModel(value); if (cls) return new cls(value, { parent: model, ...options }); return foundry.utils.deepClone(value); From 6942ec7d140280137a610371cd11524b09f6bb46 Mon Sep 17 00:00:00 2001 From: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> Date: Thu, 14 Aug 2025 18:26:07 +1000 Subject: [PATCH 2/7] Stress is a isReversed resource, so need to supply different values to clear/add (#932) Co-authored-by: Chris Ryan --- module/dice/dhRoll.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 88d40c32..6d691c20 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -227,13 +227,13 @@ export const registerRollDiceHooks = () => { if (!actor) return; if (config.roll.isCritical || config.roll.result.duality === 1) updates.push({ key: 'hope', value: 1, total: -1, enabled: true }); - if (config.roll.isCritical) updates.push({ key: 'stress', value: -1, total: 1, enabled: true }); + if (config.roll.isCritical) updates.push({ key: 'stress', value: 1, total: -1, enabled: true }); if (config.roll.result.duality === -1) updates.push({ key: 'fear', value: 1, total: -1, enabled: true }); if (config.rerolledRoll) { if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1) updates.push({ key: 'hope', value: -1, total: 1, enabled: true }); - if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: 1, total: -1, enabled: true }); + if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: -1, total: 1, enabled: true }); if (config.rerolledRoll.result.duality === -1) updates.push({ key: 'fear', value: -1, total: 1, enabled: true }); } From 89e4e4302646c1e34b0ef9914d83b4fbd4827b2e Mon Sep 17 00:00:00 2001 From: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:41:36 +1000 Subject: [PATCH 3/7] Set the Variant Rules settings to GM Only (#935) Co-authored-by: Chris Ryan --- module/systemRegistration/settings.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/systemRegistration/settings.mjs b/module/systemRegistration/settings.mjs index d100bcc0..3d9ffc19 100644 --- a/module/systemRegistration/settings.mjs +++ b/module/systemRegistration/settings.mjs @@ -86,7 +86,7 @@ const registerMenus = () => { hint: game.i18n.localize('DAGGERHEART.SETTINGS.Menu.variantRules.hint'), icon: CONFIG.DH.SETTINGS.menu.VariantRules.Icon, type: DhVariantRuleSettings, - restricted: false + restricted: true }); }; From 207d0d63350c1f2cf4429e566d45c1e56a4c5f0b Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:51:56 +0200 Subject: [PATCH 4/7] Fix/929 flat modifier disappears (#936) * Temp ActionField attack type missing * Move missing attack type to getModel --- module/data/fields/action/damageField.mjs | 2 +- module/data/fields/actionField.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/data/fields/action/damageField.mjs b/module/data/fields/action/damageField.mjs index 9e9e4b16..810b6e76 100644 --- a/module/data/fields/action/damageField.mjs +++ b/module/data/fields/action/damageField.mjs @@ -29,7 +29,7 @@ export class DHActionDiceData extends foundry.abstract.DataModel { bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }), custom: new fields.SchemaField({ enabled: new fields.BooleanField({ label: 'Custom Formula' }), - formula: new FormulaField({ label: 'Formula' }) + formula: new FormulaField({ label: 'Formula', initial: "" }) }) }; } diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index a8b01e37..4ae436de 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -82,6 +82,7 @@ export class ActionsField extends MappingField { */ export class ActionField extends foundry.data.fields.ObjectField { getModel(value) { + if(value && !value.type) value.type = 'attack'; return ( game.system.api.models.actions.actionsTypes[value.type] ?? null @@ -102,7 +103,6 @@ export class ActionField extends foundry.data.fields.ObjectField { /** @override */ initialize(value, model, options = {}) { - if(value && !value.type) value.type = 'attack'; const cls = this.getModel(value); if (cls) return new cls(value, { parent: model, ...options }); return foundry.utils.deepClone(value); From 16299a98652293476f53ad4b61d3901d0fb2c4a5 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Thu, 14 Aug 2025 19:21:12 +0200 Subject: [PATCH 5/7] Fixed damage reduction any (#937) --- module/applications/dialogs/damageReductionDialog.mjs | 4 ++-- module/data/fields/actorField.mjs | 1 - module/helpers/utils.mjs | 5 +++-- .../domains/domainCard_Get_Back_Up_BFWN2cObMdlk9uVz.json | 6 ------ .../domains/domainCard_Shrug_It_Off_JwfhtgmmuRxg4zhI.json | 6 ------ 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/module/applications/dialogs/damageReductionDialog.mjs b/module/applications/dialogs/damageReductionDialog.mjs index d8541396..b64149c0 100644 --- a/module/applications/dialogs/damageReductionDialog.mjs +++ b/module/applications/dialogs/damageReductionDialog.mjs @@ -39,7 +39,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap this.availableStressReductions = Object.keys(actor.system.rules.damageReduction.stressDamageReduction).reduce( (acc, key) => { const dr = actor.system.rules.damageReduction.stressDamageReduction[key]; - if (dr.enabled) { + if (dr.cost) { if (acc === null) acc = {}; const damage = damageKeyToNumber(key); @@ -260,7 +260,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap const reducedDamage = currentDamage !== this.damage ? getDamageLabel(currentDamage) : null; const currentDamageLabel = reducedDamage ?? getDamageLabel(this.damage); - if (stressReduction.from !== currentDamageLabel) return; + if (!stressReduction.any && stressReduction.from !== currentDamageLabel) return; stressReduction.selected = true; this.render(); diff --git a/module/data/fields/actorField.mjs b/module/data/fields/actorField.mjs index 3c65b984..f9eeeb90 100644 --- a/module/data/fields/actorField.mjs +++ b/module/data/fields/actorField.mjs @@ -20,7 +20,6 @@ const resourceField = (max = 0, initial = 0, label, reverse = false, maxLabel) = const stressDamageReductionRule = localizationPath => new fields.SchemaField({ - enabled: new fields.BooleanField({ required: true, initial: false }), cost: new fields.NumberField({ integer: true, label: `${localizationPath}.label`, diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index 439f1780..6f4e5a26 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -198,7 +198,7 @@ foundry.dice.terms.Die.prototype.selfCorrecting = function (modifier) { }; export const getDamageKey = damage => { - return ['none', 'minor', 'major', 'severe'][damage]; + return ['none', 'minor', 'major', 'severe', 'any'][damage]; }; export const getDamageLabel = damage => { @@ -210,7 +210,8 @@ export const damageKeyToNumber = key => { none: 0, minor: 1, major: 2, - severe: 3 + severe: 3, + any: 4 }[key]; }; diff --git a/src/packs/domains/domainCard_Get_Back_Up_BFWN2cObMdlk9uVz.json b/src/packs/domains/domainCard_Get_Back_Up_BFWN2cObMdlk9uVz.json index a2e1366b..91b55807 100644 --- a/src/packs/domains/domainCard_Get_Back_Up_BFWN2cObMdlk9uVz.json +++ b/src/packs/domains/domainCard_Get_Back_Up_BFWN2cObMdlk9uVz.json @@ -45,12 +45,6 @@ "mode": 5, "value": "1", "priority": null - }, - { - "key": "system.rules.damageReduction.stressDamageReduction.severe.enabled", - "mode": 5, - "value": "1", - "priority": null } ], "disabled": false, diff --git a/src/packs/domains/domainCard_Shrug_It_Off_JwfhtgmmuRxg4zhI.json b/src/packs/domains/domainCard_Shrug_It_Off_JwfhtgmmuRxg4zhI.json index 4a6d5a74..2b7ccf04 100644 --- a/src/packs/domains/domainCard_Shrug_It_Off_JwfhtgmmuRxg4zhI.json +++ b/src/packs/domains/domainCard_Shrug_It_Off_JwfhtgmmuRxg4zhI.json @@ -101,12 +101,6 @@ "mode": 5, "value": "1", "priority": null - }, - { - "key": "system.rules.damageReduction.stressDamageReduction.any.enabled", - "mode": 5, - "value": "1", - "priority": null } ], "disabled": false, From 3d05c7fe0a6fd304dcf2fe1a27bb3ab7b6a12120 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 14 Aug 2025 19:41:38 +0200 Subject: [PATCH 6/7] Merged in release to fix history --- module/data/fields/actionField.mjs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index 45d55dbf..d2fdc6c8 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -82,11 +82,8 @@ export class ActionsField extends MappingField { */ export class ActionField extends foundry.data.fields.ObjectField { getModel(value) { - if(value && !value.type) value.type = 'attack'; - return ( - game.system.api.models.actions.actionsTypes[value.type] ?? - null - ); + if (value && !value.type) value.type = 'attack'; + return game.system.api.models.actions.actionsTypes[value.type] ?? null; } /* -------------------------------------------- */ @@ -103,7 +100,6 @@ export class ActionField extends foundry.data.fields.ObjectField { /** @override */ initialize(value, model, options = {}) { - if(value && !value.type) value.type = 'attack'; const cls = this.getModel(value); if (cls) return new cls(value, { parent: model, ...options }); return foundry.utils.deepClone(value); From 006f9dde1f2dd5bc52dbbaebce1a15a4c633ec11 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Thu, 14 Aug 2025 19:49:45 +0200 Subject: [PATCH 7/7] [Fix] Levelup Blackbox Issue (#934) * Made the original inputs related to tagify be display: none to avoid css issues * Raised system.json version --- styles/less/global/elements.less | 4 ++++ system.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index 4c0243f6..c22c3bfc 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -667,6 +667,10 @@ } } } + + + input { + display: none; + } } .tagify__dropdown { diff --git a/system.json b/system.json index 66a4cfdb..b26bb543 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.0.2", + "version": "1.0.4", "compatibility": { "minimum": "13", "verified": "13.347",