# HG changeset patch # User "Rex Tsai " # Date 1227625680 -28800 # Node ID 06ee88d2bb2a2e0924f8d9510181b19d2ae5fd06 # Parent 53827cc442b6bcf3d4d368fbd9fd0631a052c0b3 fixed a typo diff -r 53827cc442b6 -r 06ee88d2bb2a agent.pl --- a/agent.pl Tue Nov 25 23:06:47 2008 +0800 +++ b/agent.pl Tue Nov 25 23:08:00 2008 +0800 @@ -21,7 +21,7 @@ sub is_attacked { my ($self, $city) = @_; - return ($self->{'ikariam'}->{'military'}->{attacks} > 0 ) ? 1 : 0; + return ($self->{'ikariam'}->{'military'}->{attack} > 0 ) ? 1 : 0; } sub is_constructing { @@ -412,6 +412,7 @@ $cities->{$cityId}->{parse_path} = []; $cities->{$cityId}->{parse_answer} = undef; if (my $action = ParseTree($tree, $rules, $cities->{$cityId})) { + # printf("%s is suppressed\n", $action); triggerAction($action, $cityId); } DumpFile("city-$cityId-dump.yaml", $cities->{$cityId});