Fixed ArmorEffect max being a string

This commit is contained in:
WBHarry 2026-02-11 10:22:24 +01:00
parent b0f8442aaa
commit 49e834062b
37 changed files with 144 additions and 107 deletions

View file

@ -173,7 +173,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
? Object.values(this.availableStressReductions).filter(red => red.selected)
: [];
const currentMarks =
this.actor.system.armor.system.marks.value + selectedArmorMarks.length + selectedStressMarks.length;
this.actor.system.armorScore.value + selectedArmorMarks.length + selectedStressMarks.length;
const armorMarkReduction =
selectedArmorMarks.length * this.actor.system.rules.damageReduction.increasePerArmorMark;

View file

@ -42,11 +42,12 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel
{
initial: [
{
key: 'system.armorScore',
type: CONFIG.DH.GENERAL.activeEffectModes.armor.id,
phase: 'initial',
priority: 20,
value: 0,
max: 1
max: '1'
}
]
}
@ -161,6 +162,7 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel
static getDefaultObject() {
return {
key: 'system.armorScore',
type: 'armor',
name: game.i18n.localize('DAGGERHEART.EFFECTS.Armor.newArmorEffect'),
img: 'icons/equipment/chest/breastplate-helmet-metal.webp'