diff agent.pl @ 89:86402d28544f

stop upgrade townHall after the level is 20.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 26 Oct 2008 16:20:48 +0800
parents 4c82cf844aa8
children 73f0a1cafc23
line wrap: on
line diff
--- a/agent.pl	Sun Oct 26 16:12:03 2008 +0800
+++ b/agent.pl	Sun Oct 26 16:20:48 2008 +0800
@@ -39,6 +39,7 @@
     my ($self, $city) = @_;
     # TODO 應該以消耗率/時間計算
     # $self->{ikariam}->{growth}
+    return 1 if($city->{buildings}->{townHall} >= 20);
     return ($city->{space}->{total} <= ($city->{space}->{occupied}+6) ?  0 : 1)
 }