diff agent.pl @ 262:1b435cd26a7b

change the factor of happiness
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Thu, 20 Nov 2008 00:30:21 +0800
parents dc93eb48a926
children 06ee88d2bb2a
line wrap: on
line diff
--- a/agent.pl	Wed Nov 19 12:24:14 2008 +0800
+++ b/agent.pl	Thu Nov 20 00:30:21 2008 +0800
@@ -122,11 +122,12 @@
     my ($self, $city) = @_;
 
     return ($city->{growth} >= 5 ?  1 : 0) 
-        if($city->{buildings}->{townHall} <= 16);
+        if($city->{buildings}->{townHall} <= 10);
+
+    return ($city->{growth} >= 2 ?  1 : 0) 
+        if($city->{buildings}->{townHall} <= 15);
 
     return 1 if($city->{buildings}->{townHall} >= 20);
- 
-    return ($city->{happiness} >= 2 ?  1 : 0);
 }
 
 sub is_tavern_available {