diff options
author | Julien Dessaux | 2015-01-01 21:47:45 +0100 |
---|---|---|
committer | Julien Dessaux | 2015-01-01 21:47:45 +0100 |
commit | 304abd4a223130ca3dfa254e13dd855273f28e12 (patch) | |
tree | 96689c73fcc62d88b5bb7e829df835e0997be3d6 /Avalon.pm | |
parent | Protocol update (diff) | |
download | avalon-arthur-master.tar.gz avalon-arthur-master.tar.bz2 avalon-arthur-master.zip |
Diffstat (limited to 'Avalon.pm')
-rw-r--r-- | Avalon.pm | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; } |