Fixed damage reduction any

This commit is contained in:
WBHarry 2025-08-14 15:35:19 +02:00
parent 89e4e43026
commit ab59168a28
5 changed files with 5 additions and 17 deletions

View file

@ -39,7 +39,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
this.availableStressReductions = Object.keys(actor.system.rules.damageReduction.stressDamageReduction).reduce(
(acc, key) => {
const dr = actor.system.rules.damageReduction.stressDamageReduction[key];
if (dr.enabled) {
if (dr.cost) {
if (acc === null) acc = {};
const damage = damageKeyToNumber(key);
@ -260,7 +260,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
const reducedDamage = currentDamage !== this.damage ? getDamageLabel(currentDamage) : null;
const currentDamageLabel = reducedDamage ?? getDamageLabel(this.damage);
if (stressReduction.from !== currentDamageLabel) return;
if (!stressReduction.any && stressReduction.from !== currentDamageLabel) return;
stressReduction.selected = true;
this.render();