Fixed so that formula construction specific to DAMAGE is now only applied to damage.main rather than by applyTo=hitPoints

This commit is contained in:
WBHarry 2026-07-18 17:14:55 +02:00
parent 88754c5a80
commit 3562ba649f
8 changed files with 56 additions and 62 deletions

View file

@ -188,8 +188,8 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
}
static migrateData(source) {
const { main, resources, ...flatDamageKeys } = source.damage;
if (!main && !resources) {
const { main, resources, ...flatDamageKeys } = source.damage ?? {};
if (source.damage && !main && !resources) {
source.damage.main = null;
source.damage.resources = {};