mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Merged with main
This commit is contained in:
commit
978d45b931
44 changed files with 653 additions and 373 deletions
|
|
@ -1,9 +1,11 @@
|
|||
/** NOT USED ANYMORE - TO BE DELETED **/
|
||||
|
||||
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||
|
||||
export default class RollSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
constructor(experiences, costs, action, resolve) {
|
||||
super({}, {});
|
||||
|
||||
|
||||
this.experiences = experiences;
|
||||
this.costs = costs;
|
||||
this.action = action;
|
||||
|
|
@ -65,9 +67,9 @@ export default class RollSelectionDialog extends HandlebarsApplicationMixin(Appl
|
|||
context.fear = this.data.fear;
|
||||
context.advantage = this.data.advantage;
|
||||
context.experiences = Object.keys(this.experiences).map(id => ({ id, ...this.experiences[id] }));
|
||||
if(this.costs?.length) {
|
||||
if (this.costs?.length) {
|
||||
const updatedCosts = this.action.calcCosts(this.costs);
|
||||
context.costs = updatedCosts
|
||||
context.costs = updatedCosts;
|
||||
context.canRoll = this.action.getRealCosts(updatedCosts)?.hasCost;
|
||||
} else context.canRoll = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue