summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2015-01-01 21:47:45 +0100
committerJulien Dessaux2015-01-01 21:47:45 +0100
commit304abd4a223130ca3dfa254e13dd855273f28e12 (patch)
tree96689c73fcc62d88b5bb7e829df835e0997be3d6
parentProtocol update (diff)
downloadavalon-arthur-304abd4a223130ca3dfa254e13dd855273f28e12.tar.gz
avalon-arthur-304abd4a223130ca3dfa254e13dd855273f28e12.tar.bz2
avalon-arthur-304abd4a223130ca3dfa254e13dd855273f28e12.zip
Added endgame infosHEADmaster
-rw-r--r--Avalon.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Avalon.pm b/Avalon.pm
index d741d72..37dae89 100644
--- a/Avalon.pm
+++ b/Avalon.pm
@@ -56,11 +56,21 @@ sub check_endgame_and_proceed {
}
}
+sub endgame_info {
+ my ( $self, $who ) = @_;
+ my $av = $self->{avalon};
+ $self->say( channel => $av->{config}->{'game.channel'}, body => "ROLE MERLIN $av->{roles}->{MERLIN}->[0]" );
+ $self->say( channel => $av->{config}->{'game.channel'}, body => "ROLE ASSASSIN $av->{roles}->{ASSASSIN}->[0]" );
+ $self->say( channel => $av->{config}->{'game.channel'}, body => "ROLE GOOD " . join(' ', @{$av->{roles}->{GOOD}}) );
+ $self->say( channel => $av->{config}->{'game.channel'}, body => "ROLE EVIL " . join(' ', @{$av->{roles}->{EVIL}}) );
+}
+
sub evil_wins {
my ( $self, $who ) = @_;
my $av = $self->{avalon};
my $evil_msg = "WINNERSIDE EVIL $av->{roles}->{ASSASSIN}->[0] " . join(' ', @{$av->{roles}->{EVIL}});
$self->say( channel => $av->{config}->{'game.channel'}, body => $evil_msg );
+ $self->endgame_info;
$self->reset_game;
}
@@ -74,6 +84,7 @@ sub good_wins {
my $av = $self->{avalon};
my $evil_msg = "WINNERSIDE GOOD $av->{roles}->{MERLIN}->[0] " . join(' ', @{$av->{roles}->{GOOD}});
$self->say( channel => $av->{config}->{'game.channel'}, body => $evil_msg );
+ $self->endgame_info;
$self->reset_game;
}