# HG changeset patch # User "Rex Tsai " # Date 1225440816 -28800 # Node ID 9fb18f3d6e2622c9a1de10574150f8aa739be44a # Parent bfa78302cf09eb06b749a58710a2a28ed9449a0d added warning dialog for attacks diff -r bfa78302cf09 -r 9fb18f3d6e26 agent.pl --- a/agent.pl Fri Oct 31 12:47:34 2008 +0800 +++ b/agent.pl Fri Oct 31 16:13:36 2008 +0800 @@ -20,6 +20,11 @@ sub is_attacked { my ($self, $city) = @_; + if($self->{'ikariam'}->{'military'}->{attacks} > 0) { + # notify youself. + system('zenity --warning --title="Ikariam" --text="You are attacked"'); + } + return ($self->{'ikariam'}->{'military'}->{attacks} > 0 ) ? 1 : 0; }