Feature/200 beastform (#255)

* Temp

* Dialog setup

* Fixed basic beastform

* Reworked beastform to hold it's data entirely in the beastformEffect

* UpdateActorTokens fix

* Removed hardcoded tierlimit on beastform

* PR fixes
This commit is contained in:
WBHarry 2025-07-04 02:02:14 +02:00 committed by GitHub
parent c4448226e0
commit d071fadf7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 1102 additions and 298 deletions

View file

@ -5,7 +5,7 @@ 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;
@ -67,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;