mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed damage reduction any (#937)
This commit is contained in:
parent
207d0d6335
commit
16299a9865
5 changed files with 5 additions and 17 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue