From bf2f72ecf63e4195851798f4153ef1f2d0d620fc Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 5 Feb 2026 10:37:04 +0000 Subject: [PATCH] - Force number of dice to be 2 - 9 if manually typed in --- Household/Household.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Household/Household.html b/Household/Household.html index 0a7cf09534..3b0e3ef3e9 100644 --- a/Household/Household.html +++ b/Household/Household.html @@ -1007,5 +1007,25 @@ setAttrs({lastroll: ""}); }); + /* + * + */ + on("change:num_dice", function(e) { + + console.log("change:num_dice: " + JSON.stringify(e)); + + let attrs; + if(+e.newValue < 2) { + attrs = {num_dice: 2}; + } + if(+e.newValue > 9) { + attrs = {num_dice: 9}; + } + + if(attrs) { + setAttrs(attrs); + } + }); + \ No newline at end of file