Mercurial > eagle-eye
changeset 318:e5e25d4a2c2f
merged
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Mon, 12 Jan 2009 22:26:48 +0800 |
parents | 2e0e47895148 (diff) 73430da45eec (current diff) |
children | 61dd017416cf |
files | agent.pl |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);