Begin damage

This commit is contained in:
Aurélien LEBOURGEOIS 2025-06-18 17:35:32 +02:00
parent 7cc92d153b
commit 1c90024a5d
11 changed files with 159 additions and 104 deletions

View file

@ -140,6 +140,10 @@ export class DHBaseAction extends foundry.abstract.DataModel {
return foundry.utils.getProperty(this.parent, this.systemPath).indexOf(this);
}
get id() {
return this._id;
}
get item() {
return this.parent.parent;
}
@ -190,8 +194,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
event,
title: this.item.name,
source: {
itemId: this.item._id,
actionId: this._id
item: this.item._id,
action: this._id
},
type: this.type,
hasDamage: !!this.damage?.parts?.length,
@ -238,7 +242,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
...config,
roll: {
// modifier: modifierValue,
modifier: [],
modifiers: [],
trait: this.roll?.trait,
label: game.i18n.localize(abilities[this.roll.trait].label),
type: this.actionType,