Bug fixes.
This commit is contained in:
1 parent
8b3f287a49
commit
60e9bca86d
1 file changed
+8
-4
+8
-4
@@ -936,6 +936,7 @@ sub cmd_wolf {
|
|||||||
# Change time to night.
|
# Change time to night.
|
||||||
sub _init_night {
|
sub _init_night {
|
||||||
my ($gsvr, $gchan) = split '/', $GAMECHAN;
|
my ($gsvr, $gchan) = split '/', $GAMECHAN;
|
||||||
|
$PHASE = 'n';
|
||||||
|
|
||||||
# Iterate through all players.
|
# Iterate through all players.
|
||||||
foreach my $plyr (keys %PLAYERS) {
|
foreach my $plyr (keys %PLAYERS) {
|
||||||
@@ -947,7 +948,9 @@ sub _init_night {
|
|||||||
if ($role =~ m/w/xsm) {
|
if ($role =~ m/w/xsm) {
|
||||||
$erole = 'wolf';
|
$erole = 'wolf';
|
||||||
$msg = "It is your job to kill all the villagers. Use \"$COMMANDS{kill}\" to kill a villager. Also, if you send a PM to me, it will be relayed to all other wolves.\n&pi&";
|
$msg = "It is your job to kill all the villagers. Use \"$COMMANDS{kill}\" to kill a villager. Also, if you send a PM to me, it will be relayed to all other wolves.\n&pi&";
|
||||||
$msg .= "\nAlso, if there are other wolves, please consider using PM's or a channel to speak with them rather than my relay, to prevent from me lagging.";
|
my $cwolves = 0;
|
||||||
|
for (values %PLAYERS) { if (m/w/xsm) { $cwolves++ } }
|
||||||
|
if ($cwolves > 1) { $msg .= "\nAlso, please consider using PM's or a channel to speak with your fellow wolves rather than my relay, to prevent from me lagging." }
|
||||||
}
|
}
|
||||||
# For harlots.
|
# For harlots.
|
||||||
elsif ($role =~ m/h/xsm) {
|
elsif ($role =~ m/h/xsm) {
|
||||||
@@ -1008,7 +1011,6 @@ sub _init_night {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# It is now nighttime.
|
# It is now nighttime.
|
||||||
$PHASE = 'n';
|
|
||||||
%LYNCH = ();
|
%LYNCH = ();
|
||||||
$DETECTED = 0;
|
$DETECTED = 0;
|
||||||
privmsg($gsvr, $gchan, 'It is now nighttime. All players check for PM\'s from me for instructions. If you did not receive one, simply sit back, relax, and wait patiently for morning.');
|
privmsg($gsvr, $gchan, 'It is now nighttime. All players check for PM\'s from me for instructions. If you did not receive one, simply sit back, relax, and wait patiently for morning.');
|
||||||
@@ -1084,6 +1086,9 @@ sub _init_day {
|
|||||||
$victim = 0;
|
$victim = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set phase to day.
|
||||||
|
$PHASE = 'd';
|
||||||
|
|
||||||
# Cool, all data should be ready for shipment. Lets go!
|
# Cool, all data should be ready for shipment. Lets go!
|
||||||
my $continue = 1;
|
my $continue = 1;
|
||||||
my $msg = 'It is now daytime. The villagers awake, thankful for surviving the night, and search the village...';
|
my $msg = 'It is now daytime. The villagers awake, thankful for surviving the night, and search the village...';
|
||||||
@@ -1130,8 +1135,7 @@ sub _init_day {
|
|||||||
$LVOTEN++;
|
$LVOTEN++;
|
||||||
privmsg($gsvr, $gchan, 'The villagers must now vote for who to lynch. Use "'.$FCHAR.$COMMANDS{lynch}.'" to cast your vote. '.$LVOTEN.' votes are required to lynch.');
|
privmsg($gsvr, $gchan, 'The villagers must now vote for who to lynch. Use "'.$FCHAR.$COMMANDS{lynch}.'" to cast your vote. '.$LVOTEN.' votes are required to lynch.');
|
||||||
|
|
||||||
# Set phase to day and clear variables.
|
# Clear variables.
|
||||||
$PHASE = 'd';
|
|
||||||
$SEEN = $GUARD = $VISIT = $SHOT = 0;
|
$SEEN = $GUARD = $VISIT = $SHOT = 0;
|
||||||
%KILL = ();
|
%KILL = ();
|
||||||
%WKILL = ();
|
%WKILL = ();
|
||||||
|
|||||||
Reference in new issue
Block a user