Compare commits
No commits in common. "bdc2d0d3cb1ecd2e76070f1c05981eaa399239bf" and "a0ab0302f31db104d16c030987def16fdee01659" have entirely different histories.
bdc2d0d3cb
...
a0ab0302f3
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.16.3",
|
"version": "1.16.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.16.3",
|
"version": "1.16.2",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bhttp": "^1.2.8",
|
"bhttp": "^1.2.8",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.16.3",
|
"version": "1.16.2",
|
||||||
"description": "Game host for SChat 2-powered chat sites",
|
"description": "Game host for SChat 2-powered chat sites",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -15,8 +15,13 @@ function onCommand(args, context) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rolls = Math.max(Number(args[0]) || 1, 1);
|
const rolls = Number(args[0]) || 1;
|
||||||
const faces = Math.max(Number(args[1]) || 6, 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;
|
||||||
|
}
|
||||||
|
|
||||||
if (rolls > config.dice.maxRolls) {
|
if (rolls > config.dice.maxRolls) {
|
||||||
context.sendMessage(`You can only roll ${config.dice.maxRolls} dice at one time`, context.room.id);
|
context.sendMessage(`You can only roll ${config.dice.maxRolls} dice at one time`, context.room.id);
|
||||||
|
|
Loading…
Reference in New Issue