diff --git a/var.py b/var.py index ab3fa58..2ee7ec8 100644 --- a/var.py +++ b/var.py @@ -3,6 +3,7 @@ MINIMUM_WAIT = 60 # debug, change to 60 for normal EXTRA_WAIT = 20 MAXIMUM_WAITED = 2 # limit for amount of !wait's MAX_SHOTS = 2 +MAX_PLAYERS = 30 DRUNK_SHOTS_MULTIPLIER = 3 NIGHT_TIME_LIMIT = 90 DAY_TIME_LIMIT = 333 @@ -15,6 +16,8 @@ GAME_COMMAND_ADMIN_ONLY = True GUN_CHANCES = ( 5/7 , 1/7 , 1/7 ) DRUNK_GUN_CHANCES = ( 4/7 , 2/7 , 1/7 ) MANSLAUGHTER_CHANCE = 1/5 +GUN_KILLS_WOLF_CHANCE = 1/2 +GUARDIAN_ANGEL_DIES_CHANCE = 1/2 GAME_MODES = {} diff --git a/wolfgame.py b/wolfgame.py index 0976092..2e5d678 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -246,6 +246,7 @@ def fpinger(cli, nick, chan, rest): @cmd("!join") def join(cli, nick, chan, rest): + pl = var.list_players() if var.PHASE == "none": cli.mode(chan, "+v", nick, nick+"!*@*") var.ROLES["person"].append(nick) @@ -255,8 +256,10 @@ def join(cli, nick, chan, rest): cli.msg(chan, ('\u0002{0}\u0002 has started a game of Werewolf. '+ 'Type "!join" to join. Type "!start" to start the game. '+ 'Type "!wait" to increase join wait time.').format(nick)) - elif nick in var.list_players(): + elif nick in pl: cli.notice(nick, "You're already playing!") + elif len(pl) >= var.MAX_PLAYERS: + cli.notice(nick, "Too many players! Try again next time.") elif var.PHASE != "join": cli.notice(nick, "Sorry but the game is already running. Try again next time.") else: