More fixes

This commit is contained in:
WBHarry 2026-03-19 15:11:40 +01:00
parent caea55ade4
commit b3e298693a
7 changed files with 57 additions and 36 deletions

View file

@ -89,11 +89,15 @@ export default class BaseEffect extends foundry.data.ActiveEffectTypeDataModel {
return true;
}
get armorChange() {
return this.changes.find(x => x.type === CONFIG.DH.GENERAL.activeEffectModes.armor.id);
}
get armorData() {
const armorChange = this.changes.find(x => x.type === CONFIG.DH.GENERAL.activeEffectModes.armor.id);
const armorChange = this.armorChange;
if (!armorChange) return null;
return armorChange.armorData;
return armorChange.typeData.getArmorData(armorChange);
}
static getDefaultObject() {