view building.yaml @ 74:27b16506231f

improved the tech trees
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 22 Oct 2008 20:49:29 +0800
parents 2af91e80353e
children 3d1784140009
line wrap: on
line source

---
# 基本建設規則
# 檢查是否被攻擊
- is_attacked:
    # we are in Peace :D
    0:
      - is_constructing:
         # already building something.
         1:
           # adjust human resources
           # 
           # 相關基礎研究 (technologies tree)
           # 財富
            - is_wealth_researched:
               0: research_economy
            # 擴張
            - is_expansion_researched:
               0: research_seafaring
            # 造紙
            - is_paper_researched:
               0: research_knowledge
            # 正規軍
            - is_professionalarmy_researched:
               0: resaerch_military
            # 釀酒
            - is_winepress_researched:
               0: research_economy
            # 發明 (兵工廠)
            - is_invention_researched:
               0: research_knowledge
            # 異國文化
            - is_culturalexchange_resaerched:
               0: research_seafaring
         # let's find something to build up
         0:
            - is_gold_enoughforcargo:
               1: increaseTransporter
            - is_wall_enough:
               0: build_wall
            - is_space_enough:
               0: 
                  - is_resource_enoghforHall:
                     1: build_townHall
            - is_corruption:
               1: build_governorsresidence
            # 倉庫庫存量
            - is_warehouse_enough:
               0: build_warehouse
            - is_happiness:
               0: 
                  - is_winepress_researched:
                     1: build_tavern

            # TODO
            # http://ikariam.wikia.com/wiki/List_of_buildings
            # http://ikariam.wikia.com/wiki/Technology_Tree
            # is_conservation_researched
            #    -build_warehouse
            # build_academy
            # build_palace (Expansion, Capital only)
            # build_embassy (副城, 不建)

            - is_risk:
               1: 
                  - is_professionalarmy_researched:
                     1:
                        - is_shipyard_level_enough:
                           0: build_shipyard
                        - is_barracks_level_enough:
                           0: build_barracks
                  - is_shipyard_level_enough:
                     0: 
                        - is_drydock_researched: 
                           # requireed more army ?
                           1: build_shipyard
                     # 1:
                     #    - build one board
            # 要蓋到何種程度?
            # is_invention_researched
            #    1: 
            #       - build_workshop 
            # is_espionage_researched
            #    1: 
            #       - build_hideout
            # is_culturalexchange_resaerched
            #    1: 
            #       - build_museum
    # 採取防禦措施
    1: run_defense
    # 若軍分 0, 進行焦土政策 針對特定城市 錢全部買船 拆港
    # increaseTransporter
    # destroy TradingPort
    #
    # 計算出兵數量、到達時間與調動時間
    # 調動軍隊防護 (加入封鎖列表)

    # (保留兵力) 出兵對方城鎮, 拆港, keep gold
    # (保留兵力) 出兵任一城鎮, 拆港, keep gold

# blocking
# 計算軍方比例
# 對方軍分 0, # 海軍一日三次, 每次八小時 # 陸軍每日三次, 八小時一次
# 對方平等軍分, 半夜偷襲
# 對方高軍分 # 累積分數
#
# balance resources
# 從其他城移動資源到特定城市
# 預先計算可能需要的資源