From 2c93defd9c55ec35eb527d38f31c2270d7143891 Mon Sep 17 00:00:00 2001 From: Chris Ryan Date: Sat, 17 Jan 2026 12:11:21 +1000 Subject: [PATCH] Fix the sliders to do the correct maximums --- module/applications/dialogs/riskItAllDialog.mjs | 2 ++ module/enrichers/FateRollEnricher.mjs | 1 - templates/dialogs/riskItAllDialog.hbs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/applications/dialogs/riskItAllDialog.mjs b/module/applications/dialogs/riskItAllDialog.mjs index 9bdd5dc2..10fa1bb4 100644 --- a/module/applications/dialogs/riskItAllDialog.mjs +++ b/module/applications/dialogs/riskItAllDialog.mjs @@ -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; diff --git a/module/enrichers/FateRollEnricher.mjs b/module/enrichers/FateRollEnricher.mjs index c50a563b..0cafd4b6 100644 --- a/module/enrichers/FateRollEnricher.mjs +++ b/module/enrichers/FateRollEnricher.mjs @@ -45,7 +45,6 @@ function getFateMessage(roll, flavor) { export const renderFateButton = async event => { const button = event.currentTarget, target = getCommandTarget({ allowNull: true }); - console.log('button', button); const fateTypeData = getFateTypeData(button.dataset?.fatetype); diff --git a/templates/dialogs/riskItAllDialog.hbs b/templates/dialogs/riskItAllDialog.hbs index edb2fbf6..98f89416 100644 --- a/templates/dialogs/riskItAllDialog.hbs +++ b/templates/dialogs/riskItAllDialog.hbs @@ -10,11 +10,11 @@
- +
- +