view building.yaml @ 55:ff00d108e955

check resources for build_townHall
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 20 Oct 2008 23:44:45 +0800
parents 2d3c394b7940
children 6e0d5e781949
line wrap: on
line source

---
# 基本建設規則
# 檢查是否被攻擊
- is_Attacked:
    # we are in Peace :D
    0:
      - is_constructing:
         # already building something.
         1: 
         # 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_risk:
               1: 
                  - is_shipyard:
                     0: 
                        - is_drydock_researched: 
                           0: resaerch_drydock
                           1: build_shipyard
            - is_happiness:
               0: 
                  - is_winepress_researched:
                     0: research_economy
                     1: build_tavern
                     # reduce_trvern
            # 是主城, 可隨意建任一尚未搭建之建築
            # 副城, 不建 ...
    # 採取防禦措施
    1: run_defense