Add Serrated & Self-Correcting

This commit is contained in:
Dapoolp 2025-08-09 14:32:52 +02:00
parent bf74596389
commit 4bbf1a82d2
6 changed files with 80 additions and 40 deletions

View file

@ -64,7 +64,6 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
const { ...rest } = foundry.utils.expandObject(formData.object);
foundry.utils.mergeObject(this.config.roll, rest.roll);
foundry.utils.mergeObject(this.config.modifiers, rest.modifiers);
console.log(rest)
this.config.selectedRollMode = rest.selectedRollMode;
this.render();

View file

@ -333,7 +333,7 @@ export default function DHApplicationMixin(Base) {
}
];
if (usable)
if (usable) {
options.unshift({
name: 'DAGGERHEART.GENERAL.damage',
icon: 'fa-solid fa-explosion',
@ -353,24 +353,11 @@ export default function DHApplicationMixin(Base) {
icon: 'fa-solid fa-burst',
condition: target => {
const doc = getDocFromElementSync(target);
return doc?.system?.attack?.damage.parts.length || doc?.damage?.parts.length;
return doc && !(doc.type === 'domainCard' && doc.system.inVault);
},
callback: async (target, event) => {
const doc = await getDocFromElement(target),
action = doc?.system?.attack ?? doc;
return action && action.use(event, { byPassRoll: true });
}
callback: async (target, event) => (await getDocFromElement(target)).use(event)
});
options.unshift({
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem',
icon: 'fa-solid fa-burst',
condition: target => {
const doc = getDocFromElementSync(target);
return doc && !(doc.type === 'domainCard' && doc.system.inVault);
},
callback: async (target, event) => (await getDocFromElement(target)).use(event)
});
}
if (toChat)
options.push({