# HG changeset patch # User "Rex Tsai " # Date 1234444336 -28800 # Node ID fe740b1c6f942f612aa8dd3537e5c6a1a2f38b07 # Parent 824f949bc484a223d830efed7afa14431c1761cc changed town and warehouse level for 0.3.0 diff -r 824f949bc484 -r fe740b1c6f94 agent.pl --- a/agent.pl Thu Feb 12 03:59:24 2009 +0800 +++ b/agent.pl Thu Feb 12 21:12:16 2009 +0800 @@ -74,7 +74,7 @@ sub is_space_enough { my ($self, $city) = @_; # The maximum town hall is level 20, then we build new town - return 1 if($city->{buildings}->{townHall} >= 20); + return 1 if($city->{buildings}->{townHall} >= 15); # TODO 應該以 成長率 * 升級所需時間計算 # 6 hours earlier, we upgrade the twonHall. return ($city->{space}->{total} <= ($city->{space}->{occupied} + ($city->{growth}*12)) ? 0 : 1) @@ -113,6 +113,8 @@ sub is_warehouse_enougn_for_governorsresidence { my ($self, $city) = @_; + return (($city->{buildings}->{warehouse} >= 5) ? 0 : 1); + my @warehouse = (qw/undef undef 0 4 9 16 18 19 20 21 22 23 24 25/); my @cities = keys(%{$self->{ikariam}->{cities}}); my $citiesNumber = $#cities + 1;