mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-22 07:23:37 +02:00
.
This commit is contained in:
parent
011dd7d476
commit
287c6300f3
1 changed files with 3 additions and 6 deletions
|
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue