mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
Fix the sliders to do the correct maximums
This commit is contained in:
parent
a071626e43
commit
2c93defd9c
3 changed files with 4 additions and 3 deletions
|
|
@ -41,6 +41,8 @@ export default class RiskItAllDialog extends HandlebarsApplicationMixin(Applicat
|
|||
async _prepareContext(_options) {
|
||||
const context = await super._prepareContext(_options);
|
||||
context.resourceValue = this.resourceValue;
|
||||
context.maxHitPointsValue = Math.min(this.resourceValue, this.actor.system.resources.hitPoints.max);
|
||||
context.maxStressValue = Math.min(this.resourceValue, this.actor.system.resources.stress.max);
|
||||
context.remainingResource = this.resourceValue - this.choices.hitPoints - this.choices.stress;
|
||||
context.unfinished = context.remainingResource !== 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue