Werewolf: Fixed a GUARD issue and made it possible to VISIT yourself.
This commit is contained in:
1 parent
3bd8e9369d
commit
ba5de67e4a
2 files changed
+12
-6
No files matched your search
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
* Werewolf: Fixed a GUARD issue and made it possible to VISIT yourself.
|
||||||
* Possibly fixed a rare fatal error.
|
* Possibly fixed a rare fatal error.
|
||||||
* Werewolf: Rewrote WAIT to be more decent.
|
* Werewolf: Rewrote WAIT to be more decent.
|
||||||
* Werewolf: Wounded villagers are now excluded from winning villager count.
|
* Werewolf: Wounded villagers are now excluded from winning villager count.
|
||||||
|
|||||||
+11
-6
@@ -8,7 +8,7 @@ use feature qw(switch);
|
|||||||
use API::Std qw(cmd_add cmd_del trans hook_add hook_del timer_add timer_del trans conf_get has_priv match_user);
|
use API::Std qw(cmd_add cmd_del trans hook_add hook_del timer_add timer_del trans conf_get has_priv match_user);
|
||||||
use API::IRC qw(privmsg notice cmode);
|
use API::IRC qw(privmsg notice cmode);
|
||||||
our ($GAME, $PGAME, $GAMECHAN, $GAMETIME, %PLAYERS, %NICKS, @STATIC, $PHASE, $SEEN, $VISIT, $GUARD, %KILL, %WKILL, %LYNCH, %SPOKE, %WARN, $LVOTEN, @SHOT,
|
our ($GAME, $PGAME, $GAMECHAN, $GAMETIME, %PLAYERS, %NICKS, @STATIC, $PHASE, $SEEN, $VISIT, $GUARD, %KILL, %WKILL, %LYNCH, %SPOKE, %WARN, $LVOTEN, @SHOT,
|
||||||
$BULLETS, $DETECTED, $WAIT, $WAITED);
|
$BULLETS, $DETECTED, $WAIT, $WAITED, $FM);
|
||||||
my $FCHAR = (conf_get('fantasy_pf'))[0][0];
|
my $FCHAR = (conf_get('fantasy_pf'))[0][0];
|
||||||
|
|
||||||
# Initialization subroutine.
|
# Initialization subroutine.
|
||||||
@@ -887,7 +887,7 @@ sub cmd_wolf {
|
|||||||
|
|
||||||
# They can only protect one person per round.
|
# They can only protect one person per round.
|
||||||
if ($GUARD) {
|
if ($GUARD) {
|
||||||
privmsg($src->{svr}, $src->{nick}, "You are already protecting \2$NICKS{$VISIT}\2.");
|
privmsg($src->{svr}, $src->{nick}, "You are already protecting \2$NICKS{$GUARD}\2.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -945,7 +945,10 @@ sub cmd_wolf {
|
|||||||
|
|
||||||
# They can only visit one person per round.
|
# They can only visit one person per round.
|
||||||
if ($VISIT) {
|
if ($VISIT) {
|
||||||
privmsg($src->{svr}, $src->{nick}, "You are already spending the night with \2$NICKS{$VISIT}\2!");
|
my $friend;
|
||||||
|
if ($VISIT eq 1) { $friend = 'at home' }
|
||||||
|
else { $friend = "with $NICKS{$VISIT}" }
|
||||||
|
privmsg($src->{svr}, $src->{nick}, "You are already spending the night \2$friend\2!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -961,10 +964,12 @@ sub cmd_wolf {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# They can't sleep with themselves.
|
# Check if they've selected themselves.
|
||||||
if (lc $argv[1] eq lc $src->{nick}) {
|
if (lc $argv[1] eq lc $src->{nick}) {
|
||||||
privmsg($src->{svr}, $src->{nick}, 'You cannot sleep with yourself!');
|
privmsg($src->{svr}, $src->{nick}, 'You have chosen to stay home for the night.');
|
||||||
return;
|
$VISIT = 1;
|
||||||
|
_chknight();
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# All good, set variables and stuff.
|
# All good, set variables and stuff.
|
||||||
|
|||||||
Reference in new issue
Block a user