Changed from index based to object

This commit is contained in:
WBHarry 2025-06-24 23:25:30 +02:00
parent 0e1320e31d
commit 3dfefa0f4f
6 changed files with 134 additions and 79 deletions

View file

@ -516,10 +516,11 @@ export default class DhpActor extends Actor {
new Promise((resolve, reject) => {
new DamageReductionDialog(resolve, reject, this, hpDamage).render(true);
})
.then(async ({ modifiedDamage, armorSpent }) => {
.then(async ({ modifiedDamage, armorSpent, stressSpent }) => {
const resources = [
{ value: modifiedDamage, type: 'hitPoints' },
...(armorSpent ? [{ value: armorSpent, type: 'armorStack' }] : [])
...(armorSpent ? [{ value: armorSpent, type: 'armorStack' }] : []),
...(stressSpent ? [{ value: stressSpent, type: 'stress' }] : [])
];
await this.modifyResource(resources);
})