Merged with v14-Dev

This commit is contained in:
WBHarry 2026-03-15 19:13:37 +01:00
commit 88be00567e
650 changed files with 6323 additions and 4508 deletions

View file

@ -355,11 +355,11 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
}
get hasDamage() {
return this.damage?.parts?.length && this.type !== 'healing';
return !foundry.utils.isEmpty(this.damage?.parts) && this.type !== 'healing';
}
get hasHealing() {
return this.damage?.parts?.length && this.type === 'healing';
return !foundry.utils.isEmpty(this.damage?.parts) && this.type === 'healing';
}
get hasSave() {
@ -379,6 +379,15 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
return tags;
}
static migrateData(source) {
if (source.damage?.parts && Array.isArray(source.damage.parts)) {
source.damage.parts = source.damage.parts.reduce((acc, part) => {
acc[part.applyTo] = part;
return acc;
}, {});
}
}
}
export class ResourceUpdateMap extends Map {