mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[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:
parent
ead2f6b8f3
commit
a1a3ccc461
70 changed files with 471 additions and 358 deletions
|
|
@ -164,6 +164,12 @@ export function ActionMixin(Base) {
|
|||
return foundry.utils.getProperty(this.parent, this.systemPath) instanceof Collection;
|
||||
}
|
||||
|
||||
get remainingUses() {
|
||||
if (!this.uses) return null;
|
||||
|
||||
return Math.max((this.uses.max ?? 0) - (this.uses.value ?? 0), 0);
|
||||
}
|
||||
|
||||
static async create(data, operation = {}) {
|
||||
const { parent, renderSheet } = operation;
|
||||
let { type } = data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue