mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Updated Armor SRD
This commit is contained in:
parent
47b16392eb
commit
b9e3eec34c
42 changed files with 1520 additions and 23 deletions
|
|
@ -85,7 +85,7 @@ export default class DHArmor extends AttachableItem {
|
|||
|
||||
if (!this.parent.effects.some(x => x.type === 'armor')) {
|
||||
this.parent.createEmbeddedDocuments('ActiveEffect', [
|
||||
game.system.api.data.activeEffects.ArmorEffect.getDefaultEffectData()
|
||||
game.system.api.data.activeEffects.ArmorEffect.getDefaultObject()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -175,6 +175,25 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a list of localized tags based on this item's type-specific properties.
|
||||
* @returns {string[]} An array of localized tag strings.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue