mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
.
This commit is contained in:
parent
b9e3eec34c
commit
aef3d3cd04
2 changed files with 2 additions and 26 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue