# HG changeset patch # User "Rex Tsai " # Date 1231770346 -28800 # Node ID 2e0e478951484594f802a99359899e2cd05362b6 # Parent 6aeedda23e3a67cb3fde945980b1a05ccbf3cc61 changed a little bit for 0.0.3 diff -r 6aeedda23e3a -r 2e0e47895148 agent.pl --- a/agent.pl Mon Jan 05 00:18:25 2009 +0800 +++ b/agent.pl Mon Jan 12 22:25:46 2009 +0800 @@ -33,7 +33,8 @@ my ($self, $city) = @_; # http://ikariam.wikia.com/wiki/Wall_Defense # Basic rule - the wall level must equale or large then townHall level. - return ($city->{buildings}->{wall} >= $city->{buildings}->{townHall} ? 1 : 0); + return ($city->{buildings}->{wall} >= 26 ? 1 : 0); +# return ($city->{buildings}->{wall} >= $city->{buildings}->{townHall} ? 1 : 0); } sub is_academy_enough { @@ -50,13 +51,13 @@ sub is_museum_enough { my ($self, $city) = @_; - return 1 if($city->{buildings}->{museum} >= 8); + return 1 if($city->{buildings}->{museum} >= 9); } sub is_tavern_enough { my ($self, $city) = @_; return 0 if(!defined($city->{buildings}->{tavern})); - return 1 if($city->{buildings}->{museum} >= 12); + return 1 if($city->{buildings}->{tavern} >= 12); } sub is_branchOffice_enough { @@ -75,6 +76,9 @@ sub is_safehouse_enough { my ($self, $city) = @_; + + return 1; + return 0 if(!defined($city->{buildings}->{safehouse})); return 1 if(($city->{buildings}->{townHall} - $city->{buildings}->{wall}) > 2); return 1 if($city->{buildings}->{townHall} >= 20);