Werewolf: Improved STATS to be smart.
This commit is contained in:
1 parent
9fca160de5
commit
e590c0dee3
2 files changed
+18
-3
No files matched your search
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
* Werewolf: Improved STATS to be smart.
|
||||||
* Werewolf 1.04: Added village drunks and fixed other issues.
|
* Werewolf 1.04: Added village drunks and fixed other issues.
|
||||||
* Werewolf: Fixed various annoyances. Also raised chance of gun hitting.
|
* Werewolf: Fixed various annoyances. Also raised chance of gun hitting.
|
||||||
* Werewolf: Fixed a nasty lynch nick exploit.
|
* Werewolf: Fixed a nasty lynch nick exploit.
|
||||||
|
|||||||
+17
-3
@@ -592,6 +592,7 @@ sub cmd_wolf {
|
|||||||
privmsg($src->{svr}, $src->{chan}, "$src->{nick}: \2".keys(%PLAYERS)."\2 players: $str");
|
privmsg($src->{svr}, $src->{chan}, "$src->{nick}: \2".keys(%PLAYERS)."\2 players: $str");
|
||||||
# If all roles have been assigned, return the count of each.
|
# If all roles have been assigned, return the count of each.
|
||||||
if ($GAME) {
|
if ($GAME) {
|
||||||
|
# Get a count of all roles.
|
||||||
my $cwolves = my $cseers = my $charlots = my $cangels = my $ctraitors = my $cdetectives = 0;
|
my $cwolves = my $cseers = my $charlots = my $cangels = my $ctraitors = my $cdetectives = 0;
|
||||||
foreach my $flags (values %PLAYERS) {
|
foreach my $flags (values %PLAYERS) {
|
||||||
if ($flags =~ m/w/xsm) { $cwolves++ }
|
if ($flags =~ m/w/xsm) { $cwolves++ }
|
||||||
@@ -601,9 +602,22 @@ sub cmd_wolf {
|
|||||||
if ($flags =~ m/t/xsm) { $ctraitors++ }
|
if ($flags =~ m/t/xsm) { $ctraitors++ }
|
||||||
if ($flags =~ m/d/xsm) { $cdetectives++ }
|
if ($flags =~ m/d/xsm) { $cdetectives++ }
|
||||||
}
|
}
|
||||||
privmsg($src->{svr}, $src->{chan}, "$src->{nick}: There are \2$cwolves\2 wolves, \2$cseers\2 seers, ".
|
# Prepare an array of data.
|
||||||
"\2$charlots\2 ".((conf_get('werewolf:rated-g')) ? '<removed>' : 'harlots').", \2$ctraitors\2 traitors, \2$cdetectives\2 detectives, ".
|
my @data;
|
||||||
"and \2$cangels\2 guardian angels.");
|
push @data, "\2$cwolves\2 wolves";
|
||||||
|
push @data, "\2$cseers\2 seers";
|
||||||
|
|
||||||
|
# Push extra roles.
|
||||||
|
if (!conf_get('werewolf:rated-g')) { push @data, "\2$charlots\2 harlots" }
|
||||||
|
if (!conf_get('werewolf:no-angels')) { push @data, "\2$cangels\2 guardian angels" }
|
||||||
|
if (conf_get('werewolf:traitors')) { push @data, "\2$ctraitors\2 traitors" }
|
||||||
|
if (conf_get('werewolf:detectives')) { push @data, "\2$cdetectives\2 detectives" }
|
||||||
|
|
||||||
|
# Prepare message.
|
||||||
|
my $msg = "$src->{nick}: There are ".join(', ', @data[0..$#data-1]);
|
||||||
|
$msg .= ", and $data[$#data].";
|
||||||
|
|
||||||
|
privmsg($src->{svr}, $src->{chan}, $msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
when (/^(KICK|K)$/) {
|
when (/^(KICK|K)$/) {
|
||||||
|
|||||||
Reference in new issue
Block a user