# HG changeset patch # User "Rex Tsai " # Date 1228763791 -28800 # Node ID cdbb428b464c836441cbfbc49e9a0fafe681cd99 # Parent 50cff2eee2390c298c20cd92963dee2dd2be102c new rules for safehouse and academy diff -r 50cff2eee239 -r cdbb428b464c agent.pl --- 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.