mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
- Fixed dice pool to be min 2 and max 9 on manual entry
This commit is contained in:
@@ -1007,5 +1007,23 @@
|
||||
setAttrs({lastroll: ""});
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
on("change:num_dice", function(e) {
|
||||
|
||||
let attrs;
|
||||
if(+e.newValue < 2) {
|
||||
attrs = {num_dice: 2};
|
||||
}
|
||||
if(+e.newValue > 9) {
|
||||
attrs = {num_dice: 9};
|
||||
}
|
||||
|
||||
if(attrs) {
|
||||
setAttrs(attrs);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
Reference in New Issue
Block a user