diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 382db6c..fb3566f 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,7 +3,6 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== - * Werewolf: Use constants for maximum/gun player counts. * Werewolf: Fixed an annoyance in VOTES. * Werewolf: Fixed another round of bugs. * Werewolf: Fixed a grammatical error. Thanks TAD! diff --git a/modules/Werewolf.pm b/modules/Werewolf.pm index 040ed16..66b1b4a 100644 --- a/modules/Werewolf.pm +++ b/modules/Werewolf.pm @@ -11,11 +11,6 @@ my ($GAME, $PGAME, $GAMECHAN, $GAMETIME, %PLAYERS, %NICKS, @STATIC, $PHASE, $SEE our $WAIT; my $FCHAR = (conf_get('fantasy_pf'))[0][0]; -use constant { - MAX_PLAYERS => 30, - GUN_PLAYERS => 7, -}; - # Initialization subroutine. sub _init { # Create the WOLF command. @@ -141,8 +136,8 @@ sub cmd_wolf { return; } - # Are we over the max number of -players? - if (keys %PLAYERS >= MAX_PLAYERS) { + # Maximum amount of players is 30. + if (keys %PLAYERS >= 30) { notice($src->{svr}, $src->{nick}, 'Too many players! Try again next time.'); return; } @@ -276,7 +271,7 @@ sub cmd_wolf { } # If there's 6 or more players, give one of them a gun. - if (keys %PLAYERS >= GUN_PLAYERS) { + if (keys %PLAYERS >= 6) { my $rpi = $plyrs[int rand scalar @plyrs]; while ($PLAYERS{$rpi} =~ m/w/xsm || $PLAYERS{$rpi} =~ m/t/xsm) { $rpi = $plyrs[int rand scalar @plyrs] } $PLAYERS{$rpi} .= 'b';