164 - Add Hope/Fear formula

This commit is contained in:
Dapoolp 2025-06-25 16:16:47 +02:00
parent aacaf516b2
commit 8423ab6776
9 changed files with 125 additions and 57 deletions

View file

@ -42,13 +42,12 @@ export default class CostSelectionDialog extends HandlebarsApplicationMixin(Appl
}
async _prepareContext(_options) {
console.log(this.costs);
const updatedCosts = this.action.calcCosts(this.costs),
updatedUses = this.action.calcUses(this.uses);
return {
costs: updatedCosts,
uses: updatedUses,
canUse: this.action.getRealCosts(updatedCosts)?.hasCost && this.action.hasUses(updatedUses)
canUse: this.action.hasCost(updatedCosts) && this.action.hasUses(updatedUses)
};
}