Merge branch 'development' into compendium-browser-per-type

This commit is contained in:
Dapoolp 2025-08-27 10:55:42 +02:00
commit a391470ad0
116 changed files with 2062 additions and 1065 deletions

View file

@ -412,6 +412,16 @@ export default function DHApplicationMixin(Base) {
];
if (usable) {
options.unshift({
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.cancelBeastform',
icon: 'fa-solid fa-ban',
condition: target => {
const doc = getDocFromElementSync(target);
return doc && doc.system?.actions?.some(a => a.type === "beastform");
},
callback: async target => game.system.api.fields.ActionFields.BeastformField.handleActiveTransformations.call(await getDocFromElement(target))
});
options.unshift({
name: 'DAGGERHEART.GENERAL.damage',
icon: 'fa-solid fa-explosion',
@ -422,7 +432,9 @@ export default function DHApplicationMixin(Base) {
callback: async (target, event) => {
const doc = await getDocFromElement(target),
action = doc?.system?.attack ?? doc;
return action && action.use(event, { byPassRoll: true });
const config = action.prepareConfig(event);
config.hasRoll = false;
return action && action.workflow.get("damage").execute(config, null, true);
}
});