This commit is contained in:
WBHarry 2026-01-16 10:05:38 +01:00 committed by GitHub
parent 78c6f3bf48
commit d626285a88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,7 +194,16 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
return ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelectedOrPerm'));
this.consumeOnSuccess();
this.system.action?.workflow.get('applyDamage')?.execute(config, targets, true);
if (this.system.action) this.system.action.workflow.get('applyDamage')?.execute(config, targets, true);
else {
for (const target of targets) {
const actor = await foundry.utils.fromUuid(target.actorId);
if (!actor) continue;
if (this.system.hasHealing) actor.takeHealing(this.system.damage);
else actor.takeDamage(this.system.damage);
}
}
}
async onRollSave(event) {