diff agent.pl @ 317:2e0e47895148

changed a little bit for 0.0.3
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 12 Jan 2009 22:25:46 +0800
parents 6aeedda23e3a
children e5e25d4a2c2f
line wrap: on
line diff
--- a/agent.pl	Mon Jan 05 00:18:25 2009 +0800
+++ b/agent.pl	Mon Jan 12 22:25:46 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 1 if($city->{buildings}->{museum} >= 12);
+    return 1 if($city->{buildings}->{tavern} >= 12);
 }
 
 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);