mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
Fix d20RollDialog costs check
This commit is contained in:
parent
22fa89b395
commit
6223b05eb1
1 changed files with 5 additions and 6 deletions
|
|
@ -6,10 +6,9 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
|
||||
this.config = config;
|
||||
this.config.experiences = [];
|
||||
/* this.diceOptions = [
|
||||
{ id:12, value: 'd12' },
|
||||
{ id:20, value: 'd20' }
|
||||
]; */
|
||||
|
||||
this.item = config.actor.parent.items.get(config.source.item);
|
||||
this.action = this.item.system.actions.find(a => a._id === config.source.action);
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -52,9 +51,9 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
/* context.diceOptions = this.diceOptions; */
|
||||
context.canRoll = true;
|
||||
if(this.config.costs?.length) {
|
||||
const updatedCosts = this.config.action.calcCosts(this.config.costs);
|
||||
const updatedCosts = this.action.calcCosts(this.config.costs);
|
||||
context.costs = updatedCosts
|
||||
context.canRoll = this.config.action.getRealCosts(updatedCosts)?.hasCost;
|
||||
context.canRoll = this.action.getRealCosts(updatedCosts)?.hasCost;
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue