From 32ffb2667934d2e9380f933da690ac83a71faf70 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 15 Jan 2026 23:53:41 +0100 Subject: [PATCH] Fixed secondary weapons effects --- module/data/action/baseAction.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 2f4b306f..1fa14186 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -276,7 +276,13 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel if (actor) return Array.from(await actor.allApplicableEffects()).filter(effect => { /* Effects on weapons only ever apply for the weapon itself */ - if (effect.parent.type === 'weapon' && effectParent?.id !== effect.parent.id) return false; + if (effect.parent.type === 'weapon') { + /* Unless they're secondary - then they apply only to other primary weapons */ + if (effect.parent.system.secondary) { + if (effectParent.type !== 'weapon' || effectParent.system.secondary) return false; + } else if (effectParent?.id !== effect.parent.id) return false; + } + return !effect.isSuppressed; });