From 330e15cc46f131c6dbc3ec6ac7116cdf212071e5 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 28 Jul 2025 21:17:34 +0200 Subject: [PATCH 1/4] Fixed so that extra selected proficiciency is added correctly (#448) --- module/data/actor/character.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index 989e4519..ec6e5c7c 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -532,7 +532,7 @@ export default class DhCharacter extends BaseDataActor { this.evasion += selection.value; break; case 'proficiency': - this.proficiency = selection.value; + this.proficiency += selection.value; break; case 'experience': Object.keys(this.experiences).forEach(key => { From 4defe69c2148a8dd65b746c3caf6ed75a9d59d84 Mon Sep 17 00:00:00 2001 From: Cyril ALFARO Date: Mon, 28 Jul 2025 23:32:25 +0200 Subject: [PATCH 2/4] Update dhRoll.mjs (#449) --- module/dice/dhRoll.mjs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 4bc1a5bd..aa1ebb68 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -193,11 +193,12 @@ export const registerRollDiceHooks = () => { if (config.roll.isCritical) updates.push({ key: 'stress', value: -1 }); if (config.roll.result.duality === -1) updates.push({ key: 'fear', value: 1 }); - if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1) - updates.push({ key: 'hope', value: -1 }); - if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: 1 }); - if (config.rerolledRoll.result.duality === -1) updates.push({ key: 'fear', value: -1 }); - + if (config.rerolledRoll) { + if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1) updates.push({ key: 'hope', value: -1 }); + if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: 1 }); + if (config.rerolledRoll.result.duality === -1) updates.push({ key: 'fear', value: -1 }); + } + if (updates.length) { const target = actor.system.partner ?? actor; if (!['dead', 'unconcious'].some(x => actor.statuses.has(x))) { From 253faabbcfec0fe84f82d2bf130d3a6cae346f42 Mon Sep 17 00:00:00 2001 From: Cyril ALFARO Date: Tue, 29 Jul 2025 13:00:48 +0200 Subject: [PATCH 3/4] fix: statuses are Set not Array, change include() to has() in placeables/token.mjs (#451) It crash if I have a status on a token and I refresh Foundry. It's because it calls a include() function on a Set. --- module/canvas/placeables/token.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/canvas/placeables/token.mjs b/module/canvas/placeables/token.mjs index dd6f089e..4c2ae4ed 100644 --- a/module/canvas/placeables/token.mjs +++ b/module/canvas/placeables/token.mjs @@ -18,7 +18,7 @@ export default class DhTokenPlaceable extends foundry.canvas.placeables.Token { x => x.statuses.size === 1 && x.name === game.i18n.localize(statusMap.get(x.statuses.first()).name) ); for (var status of effect.statuses) { - if (!currentStatusActiveEffects.find(x => x.statuses.includes(status))) { + if (!currentStatusActiveEffects.find(x => x.statuses.has(status))) { const statusData = statusMap.get(status); acc.push({ name: game.i18n.localize(statusData.name), From 2608c4a5ae2540cdb71e60c0ae67ee3ab6bf90fa Mon Sep 17 00:00:00 2001 From: Cyril ALFARO Date: Tue, 29 Jul 2025 16:52:29 +0200 Subject: [PATCH 4/4] Update character.mjs (#455) --- module/applications/sheets/actors/character.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/applications/sheets/actors/character.mjs b/module/applications/sheets/actors/character.mjs index d9098f9b..6bbef5b0 100644 --- a/module/applications/sheets/actors/character.mjs +++ b/module/applications/sheets/actors/character.mjs @@ -260,7 +260,7 @@ export default class CharacterSheet extends DHBaseActorSheet { icon: 'fa-solid fa-arrow-up', condition: target => { const doc = getDocFromElementSync(target); - return doc && system.inVault; + return doc && doc.system.inVault; }, callback: async target => { const doc = await getDocFromElement(target);