tBKwtWS 7 lat temu
rodzic
commit
9a1f5d3480
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      commands/games.py

+ 5 - 3
commands/games.py

@@ -89,7 +89,7 @@ def do_command(self, connection, event):
                         except ValueError:  # "d" not followd by interger.
                             connection.privmsg(replyto, "Invalid number or type of dice. For help type: " + blue + self.helpchar + "dice" + reset + ".")
                             return
-                        if dicetype < 1 :
+                        if dicetype < 1:
                             connection.action(replyto, "can not create objects with less then one side.")
                         else:
                             connection.privmsg(replyto, str(GameHelpers.roll_dice(1,  dicetype)[0]))
@@ -115,10 +115,12 @@ def do_command(self, connection, event):
                     return
                 if diceamount < 1:
                     connection.privmsg(replyto, "Rolling " + bold + "no " + reset + "dice.")
-                elif dicetype < 1 :
-                    connection.action(replyto, "can not create objects with less then one side.")
                 elif diceamount > 10:
                     connection.action(replyto, "can not fit that many dice into it's robot hands.")
+                elif dicetype < 1:
+                    connection.action(replyto, "can not create objects with less then one side.")
+                elif dicetype > 9999999999 and diceamount > 1:
+                    connection.action(replyto, "Those dices are so large i can only roll one at a time.")
                 else:
                     connection.privmsg(replyto, ", ".join(str(rolls) for rolls in GameHelpers.roll_dice(diceamount,  dicetype)) + ".") # Roll x amount of x type dice.
             else:   # Invalid amount of arguments.