[feature] Action UsesButton (#662)

* Added a button to spend/restore uses of an action

* Fixed some compendium Uses on actions

* Went over all item compendia and fixed some Uses on actions

* Fixed folder order in Subclass compendium
This commit is contained in:
WBHarry 2025-08-07 01:10:56 +02:00 committed by GitHub
parent ead2f6b8f3
commit a1a3ccc461
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 471 additions and 358 deletions

View file

@ -233,7 +233,11 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
const feature = await foundry.utils.fromUuid(data.uuid);
const increasing =
feature.system.resource.progression === CONFIG.DH.ITEM.itemResourceProgression.increasing.id;
const resetValue = increasing ? 0 : (feature.system.resource.max ?? 0);
const resetValue = increasing
? 0
: feature.system.resource.max
? Roll.replaceFormulaData(feature.system.resource.max, this.actor)
: 0;
await feature.update({ 'system.resource.value': resetValue });
}