Reverting all changes made by Eitan.

This commit is contained in:
Elijah Perrault committed 2011-04-10 19:25:12 -06:00
1 parent d31b16200e
commit fe353984c2
2 files changed
+3 -9

No files matched your search

-1
View File
@@ -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!
+3 -8
View File
@@ -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';