# HG changeset patch # User "Rex Tsai " # Date 1225980187 -28800 # Node ID a254fb798eb9cdb797ef3b98c7ec567b1a9bf3da # Parent cf08e01f5713150f13d607d5b4418404127b0c09 rules for branchOffice diff -r cf08e01f5713 -r a254fb798eb9 agent.pl --- a/agent.pl Thu Nov 06 20:36:24 2008 +0800 +++ b/agent.pl Thu Nov 06 22:03:07 2008 +0800 @@ -51,6 +51,11 @@ return ($city->{buildings}->{museum} >= 2 ? 1 : 0); } +sub is_branchOffice_enough { + my ($self, $city) = @_; + return ($city->{buildings}->{branchOffice} >= 6 ? 1 : 0); +} + sub is_space_enough { my ($self, $city) = @_; # The maximum town hall is level 20, then we build new town diff -r cf08e01f5713 -r a254fb798eb9 city.yaml --- a/city.yaml Thu Nov 06 20:36:24 2008 +0800 +++ b/city.yaml Thu Nov 06 22:03:07 2008 +0800 @@ -67,6 +67,8 @@ - is_conservation_researched: 1: build_warehouse 0: build_academy + - is_branchOffice_enough: + 0: build_branchOffice # 水晶島應該建設 # is_invention_researched