This commit is contained in:
WBHarry 2026-03-22 01:00:15 +01:00
parent 011dd7d476
commit 287c6300f3

View file

@ -218,13 +218,10 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
const maxArmor = this.actor.system.rules.damageReduction.maxArmorMarked.value; const maxArmor = this.actor.system.rules.damageReduction.maxArmorMarked.value;
this.marks = { this.marks = {
armor: Object.keys(this.marks.armor).reduce((acc, key, index) => { armor: this.marks.armor.map((mark, index) => {
const mark = this.marks.armor[key];
const keepSelectValue = !this.rulesOn || index + 1 <= maxArmor; const keepSelectValue = !this.rulesOn || index + 1 <= maxArmor;
acc[key] = { ...mark, selected: keepSelectValue ? mark.selected : false }; return { ...mark, selected: keepSelectValue ? mark.selected : false };
}),
return acc;
}, {}),
stress: this.marks.stress stress: this.marks.stress
}; };