changeset 58:46e60bb040ad

list down the basic research.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Tue, 21 Oct 2008 00:33:11 +0800
parents 9307c559f9bf
children b40f87f16263
files agent.pl building.yaml
diffstat 2 files changed, 36 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/agent.pl	Tue Oct 21 00:13:52 2008 +0800
+++ b/agent.pl	Tue Oct 21 00:33:11 2008 +0800
@@ -99,6 +99,21 @@
     return (defined($city->{research}->{1030}) ?  1 : 0);
 }
 
+sub is_wealth_researched {
+    my ($self, $city) = @_;
+    return (defined($city->{research}->{2030}) ?  1 : 0);
+}
+
+sub is_professionalarmy_researched {
+    my ($self, $city) = @_;
+    return (defined($city->{research}->{4030}) ?  1 : 0);
+}
+
+sub is_paper_research {
+    my ($self, $city) = @_;
+    return (defined($city->{research}->{3020}) ?  1 : 0);
+}
+
 sub is_drydock_researched {
     my ($self, $city) = @_;
     return (defined($city->{research}->{4010}) ?  1 : 0);
--- a/building.yaml	Tue Oct 21 00:13:52 2008 +0800
+++ b/building.yaml	Tue Oct 21 00:33:11 2008 +0800
@@ -8,8 +8,27 @@
          # already building something.
          1:
            # adjust human resources
-            - is_expansion_researched:
-               0: research_seafaring
+           # 
+           # 相關基礎研究 (technologies tree)
+           # 財富
+            - is_wealth_researched:
+               0: research_economy
+               1: 
+                  # 擴張
+                  - is_expansion_researched:
+                     0: research_seafaring
+                     1:
+                        # 造紙
+                        - is_paper_researched:
+                           0: research_knowledge
+                           1:
+                                # 釀酒
+                              - is_winepress_researched:
+                                 0: research_economy
+                                 1:
+                                 # 正規軍
+                                    - is_professionalarmy_researched:
+                                      0: resaerch_military
          # let's find something to build up
          0:
             # 確認是否為主城