Updated migrations

This commit is contained in:
WBHarry 2026-03-22 01:25:38 +01:00
parent 33fb7bcc69
commit cd4a8069fc
2 changed files with 8 additions and 35 deletions

View file

@ -153,10 +153,8 @@ export default class DHArmor extends AttachableItem {
/** @inheritDoc */
static migrateDocumentData(source) {
if (source.system.baseScore !== undefined && !source.effects.some(x => x.type === 'armor')) {
if (!source.flags) source.flags = {};
if (!source.flags.daggerheart) source.flags.daggerheart = {};
source.flags.daggerheart.baseScoreMigrationValue = source.system.baseScore;
if (!source.system.armor) {
source.system.armor = { current: source.system.marks ?? 0, max: source.system.baseScore ?? 0 };
}
}