mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
[Feature] ArmorEffect reworked into ChangeType on BaseEffect (#1739)
* Initial * . * Single armor rework start * More fixes * Fixed DamageReductionDialog * Removed last traces of ArmorEffect * .
This commit is contained in:
parent
0b5de79ca8
commit
b5e0bb7c27
26 changed files with 339 additions and 416 deletions
|
|
@ -52,7 +52,7 @@ export default class DHArmor extends AttachableItem {
|
|||
}
|
||||
|
||||
get armorEffect() {
|
||||
return this.parent.effects.find(x => x.type === 'armor');
|
||||
return this.parent.effects.find(x => x.system.armorData);
|
||||
}
|
||||
|
||||
get armorData() {
|
||||
|
|
@ -80,9 +80,9 @@ export default class DHArmor extends AttachableItem {
|
|||
async _onCreate(_data, _options, userId) {
|
||||
if (userId !== game.user.id) return;
|
||||
|
||||
if (!this.parent.effects.some(x => x.type === 'armor')) {
|
||||
if (!this.parent.effects.some(x => x.system.armorData)) {
|
||||
this.parent.createEmbeddedDocuments('ActiveEffect', [
|
||||
game.system.api.data.activeEffects.ArmorEffect.getDefaultObject()
|
||||
game.system.api.data.activeEffects.changeTypes.armor.getDefaultArmorEffect()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue