Reverting all changes made by Eitan.
This commit is contained in:
1 parent
d31b16200e
commit
fe353984c2
2 files changed
+3
-9
No files matched your search
@@ -3,7 +3,6 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
===============================================================================
|
===============================================================================
|
||||||
* Werewolf: Use constants for maximum/gun player counts.
|
|
||||||
* Werewolf: Fixed an annoyance in VOTES.
|
* Werewolf: Fixed an annoyance in VOTES.
|
||||||
* Werewolf: Fixed another round of bugs.
|
* Werewolf: Fixed another round of bugs.
|
||||||
* Werewolf: Fixed a grammatical error. Thanks TAD!
|
* Werewolf: Fixed a grammatical error. Thanks TAD!
|
||||||
|
|||||||
+3
-8
@@ -11,11 +11,6 @@ my ($GAME, $PGAME, $GAMECHAN, $GAMETIME, %PLAYERS, %NICKS, @STATIC, $PHASE, $SEE
|
|||||||
our $WAIT;
|
our $WAIT;
|
||||||
my $FCHAR = (conf_get('fantasy_pf'))[0][0];
|
my $FCHAR = (conf_get('fantasy_pf'))[0][0];
|
||||||
|
|
||||||
use constant {
|
|
||||||
MAX_PLAYERS => 30,
|
|
||||||
GUN_PLAYERS => 7,
|
|
||||||
};
|
|
||||||
|
|
||||||
# Initialization subroutine.
|
# Initialization subroutine.
|
||||||
sub _init {
|
sub _init {
|
||||||
# Create the WOLF command.
|
# Create the WOLF command.
|
||||||
@@ -141,8 +136,8 @@ sub cmd_wolf {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Are we over the max number of -players?
|
# Maximum amount of players is 30.
|
||||||
if (keys %PLAYERS >= MAX_PLAYERS) {
|
if (keys %PLAYERS >= 30) {
|
||||||
notice($src->{svr}, $src->{nick}, 'Too many players! Try again next time.');
|
notice($src->{svr}, $src->{nick}, 'Too many players! Try again next time.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -276,7 +271,7 @@ sub cmd_wolf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# If there's 6 or more players, give one of them a gun.
|
# 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];
|
my $rpi = $plyrs[int rand scalar @plyrs];
|
||||||
while ($PLAYERS{$rpi} =~ m/w/xsm || $PLAYERS{$rpi} =~ m/t/xsm) { $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';
|
$PLAYERS{$rpi} .= 'b';
|
||||||
|
|||||||
Reference in new issue
Block a user