# HG changeset patch # User "Rex Tsai " # Date 1231770408 -28800 # Node ID e5e25d4a2c2fb782075aaaa2be808fa44d5581a0 # Parent 2e0e478951484594f802a99359899e2cd05362b6# Parent 73430da45eec661d970d7fca57c428e4ed2086cc merged diff -r 73430da45eec -r e5e25d4a2c2f agent.pl --- a/agent.pl Tue Jan 06 23:52:17 2009 +0800 +++ b/agent.pl Mon Jan 12 22:26:48 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 ($city->{buildings}->{museum} >= 12 ? 1 : 0); + return ($city->{buildings}->{tavern} >= 12 ? 1 : 0); } 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);