Mercurial > eagle-eye
changeset 304:cdbb428b464c
new rules for safehouse and academy
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 09 Dec 2008 03:16:31 +0800 |
parents | 50cff2eee239 |
children | 2f36120aba83 |
files | agent.pl |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/agent.pl Sun Dec 07 22:26:44 2008 +0800 +++ b/agent.pl Tue Dec 09 03:16:31 2008 +0800 @@ -38,8 +38,8 @@ sub is_academy_enough { my ($self, $city) = @_; - return ($city->{buildings}->{academy} >= 6 ? 1 : 0); - return ($city->{buildings}->{academy} >= 16 ? 1 : 0); + return ($city->{buildings}->{academy} >= 12 ? 1 : 0); +# return ($city->{buildings}->{academy} >= 16 ? 1 : 0); } sub is_embassy_enough { @@ -70,6 +70,7 @@ sub is_safehouse_enough { my ($self, $city) = @_; return 0 if(!defined($city->{buildings}->{safehouse})); + return 1 if(($city->{buildings}->{townHall} - $city->{buildings}->{wall}) > 2); return 1 if($city->{buildings}->{townHall} >= 20); # build the higgest safehouse.