Compare commits

...

3 commits

Author SHA1 Message Date
WBHarry
14ae1b6e72 Raised system version 2026-01-16 00:22:46 +01:00
WBHarry
32ffb26679 Fixed secondary weapons effects 2026-01-15 23:53:41 +01:00
WBHarry
841ddedd31 . 2026-01-15 23:38:43 +01:00
2 changed files with 9 additions and 3 deletions

View file

@ -198,7 +198,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
let config = this.prepareConfig(event);
if (!config) return;
config.effects = await DHBaseAction.getEffects(this.actor, this.item);
config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects(this.actor, this.item);
if (Hooks.call(`${CONFIG.DH.id}.preUseAction`, this, config) === false) return;
@ -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;
});

View file

@ -2,7 +2,7 @@
"id": "daggerheart",
"title": "Daggerheart",
"description": "An unofficial implementation of the Daggerheart system",
"version": "1.5.0",
"version": "1.5.1",
"compatibility": {
"minimum": "13.346",
"verified": "13.351",