# HG changeset patch # User "Rex Tsai " # Date 1234373099 -28800 # Node ID c29c8dad06734aaa92f35087d21f068b7bb1f6fb # Parent 6782280a886b36a3726dba29718a724e3f070377 added rules for build ports diff -r 6782280a886b -r c29c8dad0673 agent.pl --- a/agent.pl Thu Feb 12 01:19:27 2009 +0800 +++ b/agent.pl Thu Feb 12 01:24:59 2009 +0800 @@ -66,6 +66,11 @@ return ($city->{buildings}->{branchOffice} >= 6 ? 1 : 0); } +sub is_port_enough { + my ($self, $city) = @_; + return ($city->{buildings}->{port} >= 12 ? 1 : 0); +} + sub is_space_enough { my ($self, $city) = @_; # The maximum town hall is level 20, then we build new town diff -r 6782280a886b -r c29c8dad0673 city.yaml --- a/city.yaml Thu Feb 12 01:19:27 2009 +0800 +++ b/city.yaml Thu Feb 12 01:24:59 2009 +0800 @@ -68,6 +68,8 @@ 0: build_academy - is_branchOffice_enough: 0: build_branchOffice + - is_port_enough: + 0: build_port # 水晶島應該建設 # is_invention_researched