# HG changeset patch # User "Rex Tsai " # Date 1224519232 -28800 # Node ID 9307c559f9bf1ec8dc23b3a5ebe57a22dd15299b # Parent 6e0d5e781949b360cc04c5356b4ed130887642cc rule for research expansion diff -r 6e0d5e781949 -r 9307c559f9bf agent.pl --- a/agent.pl Tue Oct 21 00:00:33 2008 +0800 +++ b/agent.pl Tue Oct 21 00:13:52 2008 +0800 @@ -94,6 +94,11 @@ return 0; } +sub is_expansion_researched { + my ($self, $city) = @_; + return (defined($city->{research}->{1030}) ? 1 : 0); +} + sub is_drydock_researched { my ($self, $city) = @_; return (defined($city->{research}->{4010}) ? 1 : 0); diff -r 6e0d5e781949 -r 9307c559f9bf building.yaml --- a/building.yaml Tue Oct 21 00:00:33 2008 +0800 +++ b/building.yaml Tue Oct 21 00:13:52 2008 +0800 @@ -8,6 +8,8 @@ # already building something. 1: # adjust human resources + - is_expansion_researched: + 0: research_seafaring # let's find something to build up 0: # 確認是否為主城 @@ -30,7 +32,7 @@ - is_shipyard: 0: - is_drydock_researched: - 0: resaerch_drydock + 0: resaerch_military 1: build_shipyard - is_happiness: 0: