# Trade post decisions are possible vs _all_ trade posts and are shown in the Settlement Diplomacy View, not the Intrigue View. The taker is in the FROM scope.
#
# filter = [capital/owned/vassal_owned/sub_realm_owned/realm_owned/dynasty_owned]
# ai_target_filter = [capital/owned/vassal_owned/sub_realm_owned/realm_owned/dynasty_owned] (which trade posts for which the AI evaluates the decision.)
#	owned: all trade posts owned by the AI
#	vassal_owned: all trade posts owned by direct vassal rulers of the AI's employer
#	sub_realm_owned: all trade posts below the AI's employer
#	realm_owned: all trade posts in the same top realm as the AI
#	dynasty_owned: all trade posts owned by members of the same dynasty
#	

trade_post_decisions = {

	destryo_trade_post_Ek = {
		filter = owned
		
		from_potential = {
			ai = no
			has_character_flag = cheats_enabled
			NOT = {owns = ROOT}
		}
		
		allow = {
			always = yes
		}
		effect = {
		destroy_tradepost = THIS
		}
		ai_will_do = {
			factor = 0
		}
    }	

	take_trade_post_seize_Ek = {
		filter = owned
		
		from_potential = {
			ai = no
			has_character_flag = cheats_enabled
			NOT = {owns = ROOT}
		}
		
		allow = {
			always = yes
		}
		effect = {
			
			set_trade_route_base_value = {
    			value = 100
			}
			set_trade_route_value_multiplier= {
    			value = 3
			}
			seize_trade_post = ROOT
		}
		ai_will_do = {
			factor = 0
		}
    }

	Upgrade_trade_post_EK = {
		filter = owned
		
		from_potential = {
			ai = no
			has_character_flag = cheats_enabled
			NOT = {owns = ROOT}
		}
		potential = {
            NOT = {
                AND = {
                    has_building = tr_enclave_2
					has_building = tr_port_2
					has_building = tr_garrison_2
					has_building = tr_barracks_2
                }
            }
        }
		
		allow = {
			always = yes
		}
		effect = {
			add_to_extra_holding = {type = trade_post building = tr_skooma_0}
			add_to_extra_holding = {type = trade_post building = tr_smugglers_0}
			add_to_extra_holding = {type = trade_post building = tr_port_0}
			add_to_extra_holding = {type = trade_post building = tr_port_1}
			add_to_extra_holding = {type = trade_post building = tr_port_2}
			add_to_extra_holding = {type = trade_post building = tr_enclave_0}
			add_to_extra_holding = {type = trade_post building = tr_enclave_1}
			add_to_extra_holding = {type = trade_post building = tr_enclave_2}
			add_to_extra_holding = {type = trade_post building = tr_skooma_0}
			add_to_extra_holding = {type = trade_post building = tr_skooma_0}
			add_to_extra_holding = {type = trade_post building = tr_skooma_0}
			add_to_extra_holding = {type = trade_post building = tr_skooma_0}
			add_to_extra_holding = {type = trade_post building = tr_skooma_0}
			add_to_extra_holding = {type = trade_post building = tr_skooma_0} 
			add_to_extra_holding = {type = trade_post building = tr_garrison_0}
			add_to_extra_holding = {type = trade_post building = tr_garrison_1}
			add_to_extra_holding = {type = trade_post building = tr_garrison_2}
			add_to_extra_holding = {type = trade_post building = tr_barracks_0}
			add_to_extra_holding = {type = trade_post building = tr_barracks_1}
			add_to_extra_holding = {type = trade_post building = tr_barracks_2}
			add_to_extra_holding = {type = trade_post building = tr_toll_house}
			add_to_extra_holding = {type = trade_post building = tr_customs_office}
			add_to_extra_holding = {type = trade_post building = tr_guardpost_0}
			add_to_extra_holding = {type = trade_post building = tr_guardpost_1}
			add_to_extra_holding = {type = trade_post building = tr_tavern_0}
			add_to_extra_holding = {type = trade_post building = tr_tavern_1}
			add_to_extra_holding = {type = trade_post building = tr_tavern_2}
			add_to_extra_holding = {type = trade_post building = tr_plantation_0}
			add_to_extra_holding = {type = trade_post building = tr_plantation_1}
			add_to_extra_holding = {type = trade_post building = tr_slave_0}
			add_to_extra_holding = {type = trade_post building = tr_slave_1}
			add_to_extra_holding = {type = trade_post building = tr_slave_2}

		}
		ai_will_do = {
			factor = 0
		}
    }
}