Mercurial > eagle-eye
changeset 340:fe740b1c6f94
changed town and warehouse level for 0.3.0
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Thu, 12 Feb 2009 21:12:16 +0800 |
parents | 824f949bc484 |
children | f3bdbc706a37 |
files | agent.pl |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;