# HG changeset patch # User "Rex Tsai " # Date 1226476326 -28800 # Node ID dc93eb48a9260ca19215c53b37b5788f550e5739 # Parent 5f6f845bbb1d8c029242bae9ecba58540aab36ff we build both museum and tavern at same time. build cityHall 12 hours agao. diff -r 5f6f845bbb1d -r dc93eb48a926 agent.pl --- a/agent.pl Mon Nov 10 14:19:43 2008 +0800 +++ b/agent.pl Wed Nov 12 15:52:06 2008 +0800 @@ -48,7 +48,7 @@ sub is_museum_enough { my ($self, $city) = @_; - return ($city->{buildings}->{museum} >= 2 ? 1 : 0); + return ($city->{buildings}->{museum} >= ($city->{buildings}->{tavern}/2) ? 1 : 0); } sub is_branchOffice_enough { @@ -62,7 +62,7 @@ return 1 if($city->{buildings}->{townHall} >= 20); # TODO 應該以 成長率 * 升級所需時間計算 # 6 hours earlier, we upgrade the twonHall. - return ($city->{space}->{total} <= ($city->{space}->{occupied} + ($city->{growth}*8)) ? 0 : 1) + return ($city->{space}->{total} <= ($city->{space}->{occupied} + ($city->{growth}*12)) ? 0 : 1) } sub is_safehouse_enough { @@ -290,7 +290,6 @@ my $assault = 'Swordsman'; my $resistance = 'Phalanx'; - # ok, we can build Flamethrower. if(($city->{'army'}->{$assault} / $city->{'army'}->{$resistance}) <= (2/1)) { return 302; # Swordsman } else {