diff --git a/src/games/dice.js b/src/games/dice.js index 3383bc0..f241fc5 100644 --- a/src/games/dice.js +++ b/src/games/dice.js @@ -15,13 +15,8 @@ function onCommand(args, context) { return; } - const rolls = Number(args[0]) || 1; - const faces = Number(args[1]) || 6; - - if (rolls < 1 || faces < 1) { - context.sendMessage('The dice must exist in the physical universe.', context.room.id); - return; - } + const rolls = Math.max(Number(args[0]) || 1, 1); + const faces = Math.max(Number(args[1]) || 6, 1); if (rolls > config.dice.maxRolls) { context.sendMessage(`You can only roll ${config.dice.maxRolls} dice at one time`, context.room.id);