Added ArmoreEffect.armorInteraction option

This commit is contained in:
WBHarry 2026-02-11 17:00:58 +01:00
parent c067fd0e10
commit 10baf0ba10
9 changed files with 62 additions and 24 deletions

View file

@ -51,10 +51,30 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel
}
]
}
)
),
armorInteraction: new fields.StringField({
required: true,
choices: CONFIG.DH.GENERAL.activeEffectArmorInteraction,
initial: CONFIG.DH.GENERAL.activeEffectArmorInteraction.none.id,
label: 'DAGGERHEART.EFFECTS.Armor.FIELDS.armorInteraction.label',
hint: 'DAGGERHEART.EFFECTS.Armor.FIELDS.armorInteraction.hint'
})
};
}
get isSuppressed() {
if (this.parent.actor?.type !== 'character') return false;
switch (this.armorInteraction) {
case CONFIG.DH.GENERAL.activeEffectArmorInteraction.active.id:
return !this.parent.actor.system.armor;
case CONFIG.DH.GENERAL.activeEffectArmorInteraction.inactive.id:
return Boolean(this.parent.actor.system.armor);
default:
return false;
}
}
/* Type Functions */
/**