changeset 306:2f36120aba83

merged
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 10 Dec 2008 00:42:31 +0800
parents ff8db948e1a1 (current diff) cdbb428b464c (diff)
children 2972852a4ee5 f6f56a47f383
files
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/agent.pl	Wed Dec 10 00:42:12 2008 +0800
+++ b/agent.pl	Wed Dec 10 00:42: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.