Fixed so that resource reset on downtime can handle math expressions

This commit is contained in:
WBHarry 2026-04-20 00:04:03 +02:00
parent 1fea8438ba
commit 03110377e1

View file

@ -259,8 +259,9 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
const resetValue = increasing
? 0
: feature.system.resource.max
? Roll.replaceFormulaData(feature.system.resource.max, this.actor)
? new Roll(Roll.replaceFormulaData(feature.system.resource.max, this.actor)).evaluateSync().total
: 0;
await feature.update({ 'system.resource.value': resetValue });
}