mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
Fixed suppressed effects being added to roll formula options
This commit is contained in:
parent
19be91a68a
commit
622d11a1cc
3 changed files with 6 additions and 10 deletions
|
|
@ -712,7 +712,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
headerTitle: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', {
|
||||
ability: abilityLabel
|
||||
}),
|
||||
effects: Array.from(await this.document.allApplicableEffects()),
|
||||
effects: await await game.system.api.data.actions.actionsTypes.base.getEffects(this.document),
|
||||
roll: {
|
||||
trait: button.dataset.attribute,
|
||||
type: 'trait'
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ export default function DHApplicationMixin(Base) {
|
|||
const doc = await getDocFromElement(target),
|
||||
action = doc?.system?.attack ?? doc;
|
||||
const config = action.prepareConfig(event);
|
||||
config.effects = Array.from(await this.document.allApplicableEffects());
|
||||
config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects(this.document);
|
||||
config.hasRoll = false;
|
||||
return action && action.workflow.get('damage').execute(config, null, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
let config = this.prepareConfig(event);
|
||||
if (!config) return;
|
||||
|
||||
await this.addEffects(config);
|
||||
config.effects = await DHBaseAction.getEffects(this.actor);
|
||||
|
||||
if (Hooks.call(`${CONFIG.DH.id}.preUseAction`, this, config) === false) return;
|
||||
|
||||
|
|
@ -267,13 +267,9 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
}
|
||||
|
||||
/** */
|
||||
async addEffects(config) {
|
||||
let effects = [];
|
||||
if (this.actor) {
|
||||
effects = Array.from(await this.actor.allApplicableEffects());
|
||||
}
|
||||
|
||||
config.effects = effects;
|
||||
static async getEffects(actor) {
|
||||
if (actor) return Array.from(await actor.allApplicableEffects()).filter(x => !x.isSuppressed);
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue