Fixed damage reduction any (#937)

This commit is contained in:
WBHarry 2025-08-14 19:21:12 +02:00 committed by GitHub
parent 207d0d6335
commit 16299a9865
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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();