Fixed ChatMessage damage creation

This commit is contained in:
WBHarry 2026-07-18 03:09:37 +02:00
parent 1f12a98c63
commit 42ec4f8c30
8 changed files with 152 additions and 113 deletions

View file

@ -429,11 +429,11 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
}
get hasDamage() {
return Boolean(Object.keys(this.damage?.parts ?? {}).length) && this.type !== 'healing';
return this.type !== 'healing' && Boolean(this.damage.main) || Boolean(this.damage.resources.length);
}
get hasHealing() {
return Boolean(Object.keys(this.damage?.parts ?? {}).length) && this.type === 'healing';
return this.type === 'healing' && Boolean(this.damage.main) || Boolean(this.damage.resources.length);
}
get hasSave() {