Skip to content

Commit 57048dd

Browse files
authored
Merge pull request #14762 from brookesi/master
[Household] - Enforce Dice Pool Min/Max On Manual Entry
2 parents 0fba9ea + 4b042f3 commit 57048dd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Household/Household.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,5 +1007,23 @@ <h3 data-i18n="notes-u">Notes</h3>
10071007
setAttrs({lastroll: ""});
10081008
});
10091009

1010+
/*
1011+
*
1012+
*/
1013+
on("change:num_dice", function(e) {
1014+
1015+
let attrs;
1016+
if(+e.newValue < 2) {
1017+
attrs = {num_dice: 2};
1018+
}
1019+
if(+e.newValue > 9) {
1020+
attrs = {num_dice: 9};
1021+
}
1022+
1023+
if(attrs) {
1024+
setAttrs(attrs);
1025+
}
1026+
});
1027+
10101028
</script>
10111029
</div>

0 commit comments

Comments
 (0)