diff --git a/module/data/item/armor.mjs b/module/data/item/armor.mjs index 3170627f..e0bee054 100644 --- a/module/data/item/armor.mjs +++ b/module/data/item/armor.mjs @@ -178,16 +178,6 @@ export default class DHArmor extends AttachableItem { /** @inheritDoc */ static migrateDocumentData(source) { if (source.system.baseScore !== undefined && !source.effects.some(x => x.type === 'armor')) { - // source.effects.push({ - // ...game.system.api.data.activeEffects.ArmorEffect.getDefaultObject(), - // changes: [{ - // type: CONFIG.DH.GENERAL.activeEffectModes.armor.id, - // phase: 'initial', - // priority: 20, - // value: 0, - // max: source.system.baseScore - // }], - // }); if (!source.flags) source.flags = {}; if (!source.flags.daggerheart) source.flags.daggerheart = {}; source.flags.daggerheart.baseScoreMigrationValue = source.system.baseScore; @@ -200,7 +190,7 @@ export default class DHArmor extends AttachableItem { */ _getTags() { const tags = [ - `${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.armorData.value}`, + `${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.armorData.max}`, `${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseThresholds.base')}: ${this.baseThresholds.major} / ${this.baseThresholds.severe}` ]; @@ -212,7 +202,7 @@ export default class DHArmor extends AttachableItem { * @returns {(string | { value: string, icons: string[] })[]} An array of localized strings and damage label objects. */ _getLabels() { - const labels = [`${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.armorData.value}`]; + const labels = [`${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.armorData.max}`]; return labels; } diff --git a/module/systemRegistration/migrations.mjs b/module/systemRegistration/migrations.mjs index 858481c5..2b558ee2 100644 --- a/module/systemRegistration/migrations.mjs +++ b/module/systemRegistration/migrations.mjs @@ -300,20 +300,6 @@ export async function runMigrations() { progress.advance(); } - // const lockedPacks = []; - // const compendiumArmors = []; - // const compendiumCharacters = []; - // for (let pack of game.packs.filter(x => x.metadata.type === 'Item')) { - // if (pack.locked) { - // lockedPacks.push(pack.collection); - // await pack.configure({ locked: false }); - // } - - // const documents = await pack.getDocuments({ type: 'armor' }); - // compendiumArmors.push(...documents.filter(x => x instanceof game.system.api.documents.DHItem && x.type === 'armor')); - // compendiumCharacters.push(...documents.filter(x => x.type === 'character')); - // } - for (const armor of [...compendiumArmors, ...worldArmors]) { const hasArmorEffect = armor.effects.some(x => x.type === 'armor'); const migrationArmorScore = armor.flags.daggerheart?.baseScoreMigrationValue;