mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-24 00:13:39 +02:00
Update module/data/action/baseAction.mjs
Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
parent
14ae1b6e72
commit
c5e4dd52cb
1 changed files with 12 additions and 13 deletions
|
|
@ -273,7 +273,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
||||||
* @returns {DhActiveEffect[]}
|
* @returns {DhActiveEffect[]}
|
||||||
*/
|
*/
|
||||||
static async getEffects(actor, effectParent) {
|
static async getEffects(actor, effectParent) {
|
||||||
if (actor)
|
if (!actor) return [];
|
||||||
|
|
||||||
return Array.from(await actor.allApplicableEffects()).filter(effect => {
|
return Array.from(await actor.allApplicableEffects()).filter(effect => {
|
||||||
/* Effects on weapons only ever apply for the weapon itself */
|
/* Effects on weapons only ever apply for the weapon itself */
|
||||||
if (effect.parent.type === 'weapon') {
|
if (effect.parent.type === 'weapon') {
|
||||||
|
|
@ -285,8 +286,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
||||||
|
|
||||||
return !effect.isSuppressed;
|
return !effect.isSuppressed;
|
||||||
});
|
});
|
||||||
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue