From cf5fa271c72a8bfa95a44f9864eaf7be24541d68 Mon Sep 17 00:00:00 2001 From: sasquach45932 Date: Thu, 19 Feb 2026 20:52:47 +0100 Subject: [PATCH 1/2] BugFix: specialDuration expiration removal --- src/lang/en.json | 1 + src/module/chat/chat-listeners.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lang/en.json b/src/lang/en.json index 54032ff3..d3eb1486 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -320,6 +320,7 @@ "DL.DialogDoYouStartYourTurnWithLOSCreature":"Do you start your turn with line of sight to the following creature?", "DL.DialogDoYouStartYourTurnWithLOSCreatures":"Do you start your turn with line of sight to the following creatures?", "DL.DialogInvalidRollFormula": "Invalid Roll Formula: {rollFormula}!", + "DL.DialogEffectsWillNotExpire": "Source actor is not on the scene! Effects with special duration 'TurnStartSource' and 'TurnEndSource' will NOT expire.", "DL.DialogFortuneAwarded": "Awarded a Fortune point.", "DL.DialogFortuneExpended": "Expended a Fortune point.", "DL.DialogHealedFor": "Healed ", diff --git a/src/module/chat/chat-listeners.js b/src/module/chat/chat-listeners.js index 8f1e30c7..2a904458 100644 --- a/src/module/chat/chat-listeners.js +++ b/src/module/chat/chat-listeners.js @@ -257,8 +257,10 @@ async function _onChatApplyEffect(event) { let aeUuid = activeEffect.uuid let effectOrigin = aeUuid.substr(0, aeUuid.search('.ActiveEffect.')) let effectOriginName = fromUuidSync(effectOrigin).name - if (activeEffect.origin.startsWith('Compendium')) { + if (activeEffect.origin.startsWith('Compendium') || ['TurnStartSource', 'TurnEndSource'].includes(foundry.utils.getProperty(effectData, `flags.${game.system.id}.specialDuration`))) { effectData.origin = effectOrigin + if (['TurnStartSource', 'TurnEndSource'].includes(foundry.utils.getProperty(effectData, `flags.${game.system.id}.specialDuration`)) && effectData.origin.startsWith('Actor')) + ui.notifications.warn(game.i18n.localize('DL.DialogEffectsWillNotExpire')) } if (effectData.name !== effectOriginName) effectData.name = `${effectData.name} [${effectOriginName}]` From 11e42d7956fe99ae2d526fb86a8caf3306a7afdc Mon Sep 17 00:00:00 2001 From: sasquach45932 Date: Thu, 19 Feb 2026 20:54:21 +0100 Subject: [PATCH 2/2] BugFix: dlHideItem2025Trait HandleBars helper --- src/module/utils/handlebars-helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/utils/handlebars-helpers.js b/src/module/utils/handlebars-helpers.js index 6b931967..69ad1c98 100644 --- a/src/module/utils/handlebars-helpers.js +++ b/src/module/utils/handlebars-helpers.js @@ -109,7 +109,7 @@ export function registerHandlebarsHelpers() { }) Handlebars.registerHelper('dlHideItem2025Trait', function (a) { - return ( game.settings.get('demonlord', 'optionalRuleHide2025FHTraits') && !game.settings.get('demonlord', 'optionalRuleTraitMode2025') && [game.i18n.localize('DL.CreatureHorrifying').toLowerCase(), game.i18n.localize('DL.CreatureFrightening').toLowerCase()].find(x => x === a.toLowerCase()!== undefined)) + return ( game.settings.get('demonlord', 'optionalRuleHide2025FHTraits') && !game.settings.get('demonlord', 'optionalRuleTraitMode2025') && ([game.i18n.localize('DL.CreatureHorrifying').toLowerCase(), game.i18n.localize('DL.CreatureFrightening').toLowerCase()].find(x => x === a.toLowerCase()) !== undefined)) }) Handlebars.registerHelper('enrichHTMLUnrolled', async (x) => await TextEditor.enrichHTML(x, { unrolled: true }))