###########################
# Cyrenaica Decisions
###########################
# By Jeankedezeehond
###########################

foreign_politics = {
	LBA_Pacify_Tripolitania = {

		icon = infiltrate_state

		allowed = {
			original_tag = LBA
		}

		available = {
			448 = {
				is_fully_controlled_by = LBA
			}
			has_completed_focus = LBA_Unification_Libya
		}

		visible = {
			controls_state = 448
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Pacify_Tripolitania"
			448 = {
				add_core_of = LBA
				if = {
					limit = { has_resistance = yes }
					cancel_resistance = yes
				}
				force_disable_resistance = { clear = yes }
			}
			273 = {
				add_core_of = LBA
				if = {
					limit = { has_resistance = yes }
					cancel_resistance = yes
				}
				force_disable_resistance = { clear = yes }
			}
		}

		ai_will_do = {
			factor = 100
		}
	}
	LBA_Move_Capital_Benghazi = {

		icon = GFX_decision_eng_trade_unions_support

		allowed = {
			original_tag = LBA
		}

		available = {
			450 = {
				is_fully_controlled_by = LBA
			}
		}

		visible = {
			controls_state = 450
			NOT = {
				has_country_flag = tripoli_capital
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Move_Capital_Benghazi"
			set_capital = { state = 450 }
			add_stability = 0.05
			add_state_core = 450
		}

		ai_will_do = {
			factor = 100
		}
	}
	LBA_Move_Capital_Tripoli = {

		icon = GFX_decision_eng_trade_unions_support

		allowed = {
			original_tag = LBA
		}

		available = {
			448 = {
				is_fully_controlled_by = LBA
				is_core_of = LBA
				NOT = {
					has_dynamic_modifier = {
						modifier = autonomous_state
					}
				}
			}
			has_completed_focus = LBA_Unitary_State
		}

		visible = {
			controls_state = 448
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Move_Capital_Tripoli"
			set_capital = { state = 448 }
			add_political_power = 30
			set_country_flag = tripoli_capital
		}

		ai_will_do = {
			factor = 100
			modifier = {
				factor = 0
				has_country_leader = {
					name = "Idris I"
					ruling_only = yes
				}
			}
		}
	}
	LBA_Form_Ifriqiya = {

		icon = infiltrate_state

		allowed = {
			original_tag = LBA
		}

		available = {
			has_country_leader = {
				name = "Idris I"
			}
			controls_state = 458
			controls_state = 665
		}

		visible = {
			has_country_leader = {
				name = "Idris I"
			}
			controls_state = 458
		}

		fire_only_once = yes

		cost = 0

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Form_Ifriqiya"
			add_state_core = 458
			add_state_core = 665
			set_cosmetic_tag = IFR
			country_event = libya.39
		}

		ai_will_do = {
			factor = 100
		}
	}
	LBA_Proclaim_Maghreb_Unity = {#
		icon = generic_prepare_civil_war
		allowed = { original_tag = LBA }
		available = {
			tag = LBA
			owns_state = 459
			NFA = { exists = no }
			}
		visible = {
			has_cosmetic_tag = IFR
			has_country_flag = LBA_Maghreb_Unity
		}
		fire_only_once = yes
		cost = 100
		days_remove = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Proclaim_Maghreb_Unity"
		}
		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Proclaim_Maghreb_Unity"
			every_state = {
				limit = {
				OR = {
				is_core_of = ALG
				is_core_of = MRT
				is_core_of = MOR
					}
				}
				add_core_of = LBA
			}
		}
	}
	LBA_White_Peace_Cyrenaican_Revolt = {
		icon = oppression

		available = {
			LBA = {
				has_capitulated = yes
			}
		}

		visible = {
			always = yes
		}

		days_mission_timeout = 200
		is_good = no

		activation = {
			always = no
		}

		cancel_trigger = {
			LBA = {
				exists = no
			}
		}

		highlight_states = { highlight_state_targets = {
			state = 663
		}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_White_Peace_Cyrenaican_Revolt target: [From.GetName]"

		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_White_Peace_Cyrenaican_Revolt target: [From.GetName]"
			LBA = {
				country_event = libya.37
			}
		}
	}
}

LBA_Weapon_Smuggling_dc = {
	### Trading Posts
	LBA_Benghazi_Harbour = {
		icon = generic_naval

		on_map_mode = map_only

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = { highlight_state_targets = {
			state = 450
		}
		}
	}
	LBA_Siwa_Oasis = {
		icon = oasis

		on_map_mode = map_only

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = { highlight_state_targets = {
			state = 452
		}
		}
	}
	LBA_Kufra_Oasis = {
		icon = oasis

		available = {
			1009 = {
				NOT = {
					has_state_flag = trading_post_upgraded
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 1009
		}
		}

		cost = 35

		days_remove = 25

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Kufra_Oasis target: [From.GetName]"
			custom_effect_tooltip = lba_trading_post_upgraded_tt
			1009 = {
				set_state_flag = trading_post_upgraded
			}
		}
	}
	LBA_Murzuq_Oasis = {
		icon = oasis

		available = {
			273 = {
				NOT = {
					has_state_flag = trading_post_upgraded
				}
				has_state_flag = lba_zawiya_2
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 273
		}
		}

		cost = 35

		days_remove = 25

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Murzuq_Oasis target: [From.GetName]"
			custom_effect_tooltip = lba_trading_post_upgraded_tt
			273 = {
				set_state_flag = trading_post_upgraded
			}
		}
	}
	LBA_Tuat_Oasis = {
		icon = oasis

		on_map_mode = map_only

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = { highlight_state_targets = {
			state = 514
		}
		}
	}
	LBA_Timbuktu_Oasis = {
		icon = generic_industry

		on_map_mode = map_only

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = { highlight_state_targets = {
			state = 556
		}
		}
	}
	LBA_Bilma_Oasis = {
		icon = oasis

		available = {
			910 = {
				NOT = {
					has_state_flag = trading_post_upgraded
				}
				has_state_flag = lba_zawiya_2
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 910
		}
		}

		cost = 35

		days_remove = 25

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Bilma_Oasis target: [From.GetName]"
			custom_effect_tooltip = lba_trading_post_upgraded_tt
			910 = {
				set_state_flag = trading_post_upgraded
			}
		}
	}
	LBA_Wadai = {
		icon = fortress

		available = {
			515 = {
				NOT = {
					has_state_flag = trading_post_upgraded
				}
				has_state_flag = lba_zawiya_2
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 515
		}
		}

		cost = 35

		days_remove = 25

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Wadai target: [From.GetName]"
			custom_effect_tooltip = lba_trading_post_upgraded_tt
			515 = {
				set_state_flag = trading_post_upgraded
			}
		}
	}
	LBA_Congo = {
		icon = generic_industry

		on_map_mode = map_only

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = { highlight_state_targets = {
			state = 1025
		}
		}
	}
	LBA_Cameroon = {
		icon = generic_industry

		on_map_mode = map_only

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = { highlight_state_targets = {
			state = 927
		}
		}
	}
	LBA_Nigeria = {
		icon = generic_industry

		on_map_mode = map_only

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = { highlight_state_targets = {
			state = 558
		}
		}
	}

	### Trade Routes ###
		# West African Route
	LBA_waf_Timbuktu_Bilma_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 556
		}
		}

		available = {
			OR = {
				556 = {
					has_state_flag = blocked_caravan
				}
				910 = {
					has_state_flag = blocked_caravan
				}
				273 = {
					has_state_flag = blocked_caravan
				}
			}
		}

		days_mission_timeout = 30
		is_good = yes

		fixed_random_seed = no

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_waf_Timbuktu_Bilma_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.1
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_waf_Timbuktu_Bilma_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.1
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_waf_Timbuktu_Bilma_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_waf_add_guns
			random_list = {
				20 = {
					modifier = {
						factor = 0
						NOT = {
							NFA = {
								controls_state = 556
							}
						}
					}
					country_event = libya.23
					hidden_effect = {
						country_event = {
							id = libcav.1
							days = 10
						}
					}
				}
				80 = {
					activate_mission = LBA_waf_Bilma_Murzuq_Caravan
					hidden_effect = {
						if = {
							limit = {
								910 = {
									has_state_flag = trading_post_upgraded
								}
							}
							add_days_mission_timeout = {
								mission = LBA_waf_Bilma_Murzuq_Caravan
								days = -5
							}
						}
					}
				}
			}
		}
	}
	LBA_waf_Bilma_Murzuq_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 910
		}
		}

		available = {
			OR = {
				910 = {
					has_state_flag = blocked_caravan
				}
				273 = {
					has_state_flag = blocked_caravan
				}
			}
		}

		days_mission_timeout = 10
		is_good = yes

		fixed_random_seed = no

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_waf_Bilma_Murzuq_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.1
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_waf_Bilma_Murzuq_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.1
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_waf_Bilma_Murzuq_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_waf_add_guns
			random_list = {
				5 = {
					country_event = libya.21
					hidden_effect = {
						country_event = {
							id = libcav.1
							days = 10
						}
					}
				}
				5 = {
					country_event = libya.22
					hidden_effect = {
						country_event = {
							id = libcav.1
							days = 10
						}
					}
				}
				10 = {
					modifier = {
						factor = 0
						NOT = {
							NFA = {
								controls_state = 910
							}
						}
					}
					#910 = {
					#	#lba_clear_zawiya_unrest = yes
					#	#state_event = { id = nfa.482 trigger_for = owner }
					#}
					country_event = libya.20
					hidden_effect = {
						country_event = {
							id = libcav.1
							days = 10
						}
					}
				}
				10 = {
					country_event = libya.27
					hidden_effect = {
						activate_mission = LBA_waf_Murzuq_Kufra_Caravan
						hidden_effect = {
							if = {
								limit = {
									273 = {
										has_state_flag = trading_post_upgraded
									}
								}
								add_days_mission_timeout = {
									mission = LBA_waf_Murzuq_Kufra_Caravan
									days = -5
								}
							}
						}
					}
				}
				70 = {
					activate_mission = LBA_waf_Murzuq_Kufra_Caravan
					hidden_effect = {
						if = {
							limit = {
								273 = {
									has_state_flag = trading_post_upgraded
								}
							}
							add_days_mission_timeout = {
								mission = LBA_waf_Murzuq_Kufra_Caravan
								days = -5
							}
						}
					}
				}
			}
		}
	}
	LBA_waf_Murzuq_Kufra_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 273
		}
		}

		available = {
			273 = {
				has_state_flag = blocked_caravan
			}
		}

		days_mission_timeout = 10
		is_good = yes

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_waf_Murzuq_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.1
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_waf_Murzuq_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.1
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_waf_Murzuq_Kufra_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_waf_add_guns
			activate_mission = LBA_waf_Kufra_Benghazi_Caravan
			hidden_effect = {
				if = {
					limit = {
						1009 = {
							has_state_flag = trading_post_upgraded
						}
					}
					add_days_mission_timeout = {
						mission = LBA_waf_Kufra_Benghazi_Caravan
						days = -5
					}
				}
			}
		}
	}
	LBA_waf_Kufra_Benghazi_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 1009
		}
		}

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 10
		is_good = yes

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_waf_Kufra_Benghazi_Caravan target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = waf_route_total
				producer = NFA
			}
			hidden_effect = {
				country_event = {
					id = libcav.1
				}
			}
		}
	}

		# Algerian Route
	#LBA_alg_Tuat_Murzuq_Caravan = {
	#	icon = caravan

	#	ai_will_do = { factor = 100 }

	#	allowed = {
	#		always = no
	#	}

	#	highlight_states = { highlight_state_targets = {
	#		state = 514
	#	}
	#	}

	#	available = {
	#		OR = {
	#			514 = {
	#				has_state_flag = blocked_caravan
	#			}
	#			273 = {
	#				has_state_flag = blocked_caravan
	#			}
	#		}
	#	}

	#	days_mission_timeout = 16
	#	is_good = yes

	#	fixed_random_seed = no

	#	cancel_effect = {
	#		log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_alg_Tuat_Murzuq_Caravan target: [From.GetName]"
	#		hidden_effect = {
	#			country_event = {
	#				id = libcav.2
	#				days = 10
	#			}
	#		}
	#	}

	#	complete_effect = {
	#		log = "[GetDateText]: [Root.GetName]: Decision LBA_alg_Tuat_Murzuq_Caravan target: [From.GetName]"
	#		hidden_effect = {
	#			country_event = {
	#				id = libcav.2
	#				days = 10
	#			}
	#		}
	#	}

	#	timeout_effect = {
	#		log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_alg_Tuat_Murzuq_Caravan target: [From.GetName]"
	#		custom_effect_tooltip = LBA_alg_add_guns
	#		random_list = {
	#			5 = {
	#				country_event = libya.21
	#				hidden_effect = {
	#					country_event = {
	#						id = libcav.2
	#						days = 10
	#					}
	#				}
	#			}
	#			5 = {
	#				country_event = libya.22
	#				hidden_effect = {
	#					country_event = {
	#						id = libcav.2
	#						days = 10
	#					}
	#				}
	#			}
	#			15 = {
	#				modifier = {
	#					factor = 0
	#					NOT = {
	#						NFA = {
	#							controls_state = 514
	#						}
	#					}
	#				}
					#514 = {
						#lba_clear_zawiya_unrest = yes
						#state_event = { id = nfa.482 trigger_for = owner }
					#}
	#				country_event = libya.20
	#				hidden_effect = {
	#					country_event = {
	#						id = libcav.2
	#						days = 10
	#					}
	#				}
	#			}
	#			10 = {
	#				country_event = libya.27
	#				hidden_effect = {
	#					activate_mission = LBA_alg_Murzuq_Kufra_Caravan
	#					hidden_effect = {
	#						if = {
	#							limit = {
	#								273 = {
	#									has_state_flag = trading_post_upgraded
	#								}
	#							}
	#							add_days_mission_timeout = {
	#								mission = LBA_alg_Murzuq_Kufra_Caravan
	#								days = -5
	#							}
	#						}
	#					}
	#				}
	#			}
	#			65 = {
	#				activate_mission = LBA_alg_Murzuq_Kufra_Caravan
	#				hidden_effect = {
	#					if = {
	#						limit = {
	#							273 = {
	#								has_state_flag = trading_post_upgraded
	#							}
	#						}
	#						add_days_mission_timeout = {
	#							mission = LBA_alg_Murzuq_Kufra_Caravan
	#							days = -5
	#						}
	#					}
	#				}
	#			}
	#		}
	#	}
	#}
	LBA_alg_Murzuq_Kufra_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 273
		}
		}

		available = {
			273 = {
				has_state_flag = blocked_caravan
			}
		}

		days_mission_timeout = 10
		is_good = yes

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_alg_Murzuq_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.2
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_alg_Murzuq_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.2
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_alg_Murzuq_Kufra_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_alg_add_guns
			activate_mission = LBA_alg_Kufra_Benghazi_Caravan
			hidden_effect = {
				if = {
					limit = {
						1009 = {
							has_state_flag = trading_post_upgraded
						}
					}
					add_days_mission_timeout = {
						mission = LBA_alg_Kufra_Benghazi_Caravan
						days = -5
					}
				}
			}
		}
	}
	LBA_alg_Kufra_Benghazi_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 1009
		}
		}

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 10
		is_good = yes

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_alg_Kufra_Benghazi_Caravan target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = alg_route_total
				producer = NFA
			}
			hidden_effect = {
				country_event = {
					id = libcav.2
				}
			}
		}
	}

		# Siwa Route
	LBA_siw_Siwa_Benghazi_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			tag = LBA
		}

		highlight_states = { highlight_state_targets = {
			state = 452
		}
		}

		available = {
			452 = {
				has_state_flag = blocked_caravan
			}
		}

		activation = {
			452 = {
				NOT = {
					has_state_flag = blocked_caravan
				}
			}
		}

		days_mission_timeout = 8
		is_good = yes

		days_re_enable = 10

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_siw_Siwa_Benghazi_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_siw_add_guns
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = siw_route
				producer = EGY
			}
		}
	}

		# Congo Route
	LBA_con_Congo_Wadai_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 1025
		}
		}

		available = {
			OR = {
				1025 = {
					has_state_flag = blocked_caravan
				}
				515 = {
					has_state_flag = blocked_caravan
				}
			}
		}

		days_mission_timeout = 50
		is_good = yes

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_con_Congo_Wadai_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.3
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_con_Congo_Wadai_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.3
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_con_Congo_Wadai_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_con_add_guns
			activate_mission = LBA_con_Wadai_Kufra_Caravan
			hidden_effect = {
				if = {
					limit = {
						515 = {
							has_state_flag = trading_post_upgraded
						}
					}
					add_days_mission_timeout = {
						mission = LBA_con_Wadai_Kufra_Caravan
						days = -5
					}
				}
			}
		}
	}
	LBA_con_Wadai_Kufra_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 515
		}
		}

		available = {
			515 = {
				has_state_flag = blocked_caravan
			}
		}

		days_mission_timeout = 10
		is_good = yes

		fixed_random_seed = no

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_con_Wadai_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.3
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_con_Wadai_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.3
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_con_Wadai_Kufra_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_con_add_guns
			random_list = {
				5 = {
					country_event = libya.21
					hidden_effect = {
						country_event = {
							id = libcav.3
							days = 10
						}
					}
				}
				5 = {
					country_event = libya.22
					hidden_effect = {
						country_event = {
							id = libcav.3
							days = 10
						}
					}
				}
				15 = {
					modifier = {
						factor = 0
						NOT = {
							NFA = {
								controls_state = 515
							}
						}
					}
					#515 = {
						#lba_clear_zawiya_unrest = yes
						#state_event = { id = nfa.482 trigger_for = owner }
					#}
					country_event = libya.20
					hidden_effect = {
						country_event = {
							id = libcav.3
							days = 10
						}
					}
				}
				10 = {
					country_event = libya.27
					hidden_effect = {
						activate_mission = LBA_con_Kufra_Benghazi_Caravan
						hidden_effect = {
							if = {
								limit = {
									1009 = {
										has_state_flag = trading_post_upgraded
									}
								}
								add_days_mission_timeout = {
									mission = LBA_con_Kufra_Benghazi_Caravan
									days = -5
								}
							}
						}
					}
				}
				75 = {
					activate_mission = LBA_con_Kufra_Benghazi_Caravan
					hidden_effect = {
						if = {
							limit = {
								1009 = {
									has_state_flag = trading_post_upgraded
								}
							}
							add_days_mission_timeout = {
								mission = LBA_con_Kufra_Benghazi_Caravan
								days = -5
							}
						}
					}
				}
			}
		}
	}
	LBA_con_Kufra_Benghazi_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 1009
		}
		}

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 10
		is_good = yes

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_con_Kufra_Benghazi_Caravan target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = con_route_total
				producer = NFA
			}
			hidden_effect = {
				country_event = {
					id = libcav.3
				}
			}
		}
	}

		# Cameroon Route
	LBA_cam_Cameroon_Wadai_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 927
		}
		}

		available = {
			OR = {
				927 = {
					has_state_flag = blocked_caravan
				}
				515 = {
					has_state_flag = blocked_caravan
				}
			}
		}

		days_mission_timeout = 40
		is_good = yes

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_cam_Cameroon_Wadai_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.4
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_cam_Cameroon_Wadai_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.4
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_cam_Cameroon_Wadai_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_cam_add_guns
			activate_mission = LBA_cam_Wadai_Kufra_Caravan
			hidden_effect = {
				if = {
					limit = {
						515 = {
							has_state_flag = trading_post_upgraded
						}
					}
					add_days_mission_timeout = {
						mission = LBA_cam_Wadai_Kufra_Caravan
						days = -5
					}
				}
			}
		}
	}
	LBA_cam_Wadai_Kufra_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 515
		}
		}

		available = {
			515 = {
				has_state_flag = blocked_caravan
			}
		}

		days_mission_timeout = 10
		is_good = yes

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_cam_Wadai_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.4
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_cam_Wadai_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.4
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_cam_Wadai_Kufra_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_cam_add_guns
			random_list = {
				5 = {
					country_event = libya.21
					hidden_effect = {
						country_event = {
							id = libcav.4
							days = 10
						}
					}
				}
				5 = {
					country_event = libya.22
					hidden_effect = {
						country_event = {
							id = libcav.4
							days = 10
						}
					}
				}
				15 = {
					modifier = {
						factor = 0
						NOT = {
							NFA = {
								controls_state = 515
							}
						}
					}
					#515 = {
						#lba_clear_zawiya_unrest = yes
						#state_event = { id = nfa.482 trigger_for = owner }
					#}
					country_event = libya.20
					hidden_effect = {
						country_event = {
							id = libcav.4
							days = 10
						}
					}
				}
				10 = {
					country_event = libya.27
					hidden_effect = {
						activate_mission = LBA_cam_Kufra_Benghazi_Caravan
						hidden_effect = {
							if = {
								limit = {
									1009 = {
										has_state_flag = trading_post_upgraded
									}
								}
								add_days_mission_timeout = {
									mission = LBA_cam_Kufra_Benghazi_Caravan
									days = -5
								}
							}
						}
					}
				}
				75 = {
					activate_mission = LBA_cam_Kufra_Benghazi_Caravan
					hidden_effect = {
						if = {
							limit = {
								1009 = {
									has_state_flag = trading_post_upgraded
								}
							}
							add_days_mission_timeout = {
								mission = LBA_cam_Kufra_Benghazi_Caravan
								days = -5
							}
						}
					}
				}
			}
		}
	}
	LBA_cam_Kufra_Benghazi_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 1009
		}
		}

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 10
		is_good = yes

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_cam_Kufra_Benghazi_Caravan target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = cam_route
				producer = MAF
			}
			hidden_effect = {
				country_event = {
					id = libcav.4
				}
			}
		}
	}

		# Nigeria Route
	LBA_nig_Nigeria_Wadai_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 558
		}
		}

		available = {
			OR = {
				558 = {
					has_state_flag = blocked_caravan
				}
				515 = {
					has_state_flag = blocked_caravan
				}
			}
		}

		days_mission_timeout = 40
		is_good = yes

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_nig_Nigeria_Wadai_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.5
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_nig_Nigeria_Wadai_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.5
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_nig_Nigeria_Wadai_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_nig_add_guns
			activate_mission = LBA_nig_Wadai_Kufra_Caravan
			hidden_effect = {
				if = {
					limit = {
						515 = {
							has_state_flag = trading_post_upgraded
						}
					}
					add_days_mission_timeout = {
						mission = LBA_nig_Wadai_Kufra_Caravan
						days = -5
					}
				}
			}
		}
	}
	LBA_nig_Wadai_Kufra_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 515
		}
		}

		available = {
			515 = {
				has_state_flag = blocked_caravan
			}
		}

		days_mission_timeout = 10
		is_good = yes

		cancel_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision cancelled LBA_nig_Wadai_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.5
					days = 10
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_nig_Wadai_Kufra_Caravan target: [From.GetName]"
			hidden_effect = {
				country_event = {
					id = libcav.5
					days = 10
				}
			}
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_nig_Wadai_Kufra_Caravan target: [From.GetName]"
			custom_effect_tooltip = LBA_nig_add_guns
			random_list = {
				5 = {
					country_event = libya.21
					hidden_effect = {
						country_event = {
							id = libcav.5
							days = 10
						}
					}
				}
				5 = {
					country_event = libya.22
					hidden_effect = {
						country_event = {
							id = libcav.5
							days = 10
						}
					}
				}
				15 = {
					modifier = {
						factor = 0
						NOT = {
							NFA = {
								controls_state = 515
							}
						}
					}
					#515 = {
						#lba_clear_zawiya_unrest = yes
						#state_event = { id = nfa.482 trigger_for = owner }
					#}
					country_event = libya.20
					hidden_effect = {
						country_event = {
							id = libcav.5
							days = 10
						}
					}
				}
				10 = {
					country_event = libya.27
					hidden_effect = {
						activate_mission = LBA_nig_Kufra_Benghazi_Caravan
						hidden_effect = {
							if = {
								limit = {
									1009 = {
										has_state_flag = trading_post_upgraded
									}
								}
								add_days_mission_timeout = {
									mission = LBA_nig_Kufra_Benghazi_Caravan
									days = -5
								}
							}
						}
					}
				}
				75 = {
					activate_mission = LBA_nig_Kufra_Benghazi_Caravan
					hidden_effect = {
						if = {
							limit = {
								1009 = {
									has_state_flag = trading_post_upgraded
								}
							}
							add_days_mission_timeout = {
								mission = LBA_nig_Kufra_Benghazi_Caravan
								days = -5
							}
						}
					}
				}
			}
		}
	}
	LBA_nig_Kufra_Benghazi_Caravan = {
		icon = caravan

		ai_will_do = { factor = 100 }

		allowed = {
			always = no
		}

		highlight_states = { highlight_state_targets = {
			state = 1009
		}
		}

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 10
		is_good = yes

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout LBA_nig_Kufra_Benghazi_Caravan target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = nig_route_total
				producer = MAF
			}
			hidden_effect = {
				country_event = {
					id = libcav.5
				}
			}
		}
	}
}

LBA_Senussi_Network_dc = {
	### Timbuktu
	LBA_Timbuktu_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			556 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		visible = {
			556 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					is_owned_by_ROOT_or_ally = yes
					is_owned_by = TRP
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 556
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Timbuktu_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						556 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#556 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#556 = {
						#lba_increase_zawiya = yes
						#save_event_target_as = senussi_zawiya_state
						#state_event = { id = nfa.481 trigger_for = owner }
					#}
				}
			}
		}
	}
	LBA_Timbuktu_Open_Trade_Route = {
		icon = generic_prepare_civil_war

		ai_will_do = {
			factor = 100
		}

		visible = {
			556 = {
				has_state_flag = blocked_caravan
			}
		}

		available = {
			556 = {
				has_state_flag = blocked_caravan
				has_state_flag = lba_zawiya_1
			}
			has_equipment = {
				infantry_equipment > 249
			}
			has_manpower > 750
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 556
		}
		}

		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Timbuktu_Open_Trade_Route target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}
			add_manpower = -750
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Timbuktu_Open_Trade_Route target: [From.GetName]"
			add_manpower = 500
			556 = {
				clr_state_flag = blocked_caravan
				custom_effect_tooltip = lba_blockade_lifted_tt
			}
		}
	}
	LBA_Timbuktu_Arm_Resistance = {
		icon = generic_nationalism

		ai_will_do = {
			factor = 0
			modifier = {
				add = 50
				has_equipment = {
					infantry_equipment > 1000
				}
			}
		}

		visible = {
			556 = {
				has_state_flag = lba_zawiya_2
				has_resistance = yes
			}
		}

		available = {
			556 = {
				has_state_flag = lba_zawiya_2
				NOT = {
					has_state_flag = lba_increased_resistance
				}
			}
			has_equipment = {
				infantry_equipment > 199
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 556
		}
		}

		days_remove = 30
		days_re_enable = 365

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Timbuktu_Arm_Resistance target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -200
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Timbuktu_Arm_Resistance target: [From.GetName]"
			556 = {
				add_resistance_target = {
					amount = 40
					occupier = NFA
					days = 365
					tooltip = lba_senussi_backed_resistance
					id = 1453
				}
				set_state_flag = {
					flag = lba_increased_resistance
					days = 366
					value = 1
				}
				save_event_target_as = senussi_resistance_state
			}
			MAL = {
				add_timed_idea = {
					idea = resistance_per_day
					days = 365
				}
			}
		}
	}

	# Bilma
	LBA_Bilma_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			910 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		visible = {
			910 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					is_owned_by_ROOT_or_ally = yes
					is_owned_by = TRP
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 910
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Bilma_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						910 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#910 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#910 = {
						#lba_increase_zawiya = yes
						#save_event_target_as = senussi_zawiya_state
						#state_event = { id = nfa.481 trigger_for = owner }
					#}
				}
			}
		}
	}
	LBA_Bilma_Open_Trade_Route = {
		icon = generic_prepare_civil_war

		ai_will_do = {
			factor = 100
		}

		visible = {
			910 = {
				has_state_flag = blocked_caravan
			}
		}

		available = {
			910 = {
				has_state_flag = blocked_caravan
				has_state_flag = lba_zawiya_1
			}
			has_equipment = {
				infantry_equipment > 249
			}
			has_manpower > 750
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 910
		}
		}

		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Bilma_Open_Trade_Route target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}
			add_manpower = -750
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Bilma_Open_Trade_Route target: [From.GetName]"
			add_manpower = 500
			910 = {
				clr_state_flag = blocked_caravan
				custom_effect_tooltip = lba_blockade_lifted_tt
			}
		}
	}
	LBA_Bilma_Arm_Resistance = {
		icon = generic_nationalism

		ai_will_do = {
			factor = 0
			modifier = {
				add = 50
				has_equipment = {
					infantry_equipment > 1000
				}
			}
		}

		visible = {
			910 = {
				has_state_flag = lba_zawiya_2
				has_resistance = yes
			}
		}

		available = {
			910 = {
				has_state_flag = lba_zawiya_2
				NOT = {
					has_state_flag = lba_increased_resistance
				}
			}
			has_equipment = {
				infantry_equipment > 199
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 910
		}
		}

		days_remove = 30
		days_re_enable = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Bilma_Arm_Resistance target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -200
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Bilma_Arm_Resistance target: [From.GetName]"
			910 = {
				add_resistance_target = {
					amount = 40
					occupier = NFA
					days = 365
					tooltip = lba_senussi_backed_resistance
					id = 1453
				}
				set_state_flag = {
					flag = lba_increased_resistance
					days = 366
					value = 1
				}
				save_event_target_as = senussi_resistance_state
			}
			NER = {
				add_timed_idea = {
					idea = resistance_per_day
					days = 365
				}
			}
		}
	}

	# Tuat
	LBA_Tuat_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			514 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		visible = {
			514 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					is_owned_by_ROOT_or_ally = yes
					is_owned_by = TRP
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 514
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Tuat_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						514 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#514 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#514 = {
						#lba_increase_zawiya = yes
						#save_event_target_as = senussi_zawiya_state
						#state_event = { id = nfa.481 trigger_for = owner }
					#}
				}
			}
		}
	}
	LBA_Tuat_Open_Trade_Route = {
		icon = generic_prepare_civil_war

		ai_will_do = {
			factor = 100
		}

		visible = {
			514 = {
				has_state_flag = blocked_caravan
			}
		}

		available = {
			514 = {
				has_state_flag = blocked_caravan
				has_state_flag = lba_zawiya_1
			}
			has_equipment = {
				infantry_equipment > 249
			}
			has_manpower > 750
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 514
		}
		}

		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Tuat_Open_Trade_Route target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}
			add_manpower = -750
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Tuat_Open_Trade_Route target: [From.GetName]"
			add_manpower = 500
			514 = {
				clr_state_flag = blocked_caravan
				custom_effect_tooltip = lba_blockade_lifted_tt
			}
		}
	}
	LBA_Tuat_Arm_Resistance = {
		icon = generic_nationalism

		ai_will_do = {
			factor = 0
			modifier = {
				add = 50
				has_equipment = {
					infantry_equipment > 1000
				}
			}
		}

		visible = {
			514 = {
				has_state_flag = lba_zawiya_2
				has_resistance = yes
				is_owned_by_ROOT_or_ally = no
			}
		}

		available = {
			514 = {
				has_state_flag = lba_zawiya_2
				NOT = {
					has_state_flag = lba_increased_resistance
				}
			}
			has_equipment = {
				infantry_equipment > 199
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 514
		}
		}

		days_remove = 30
		days_re_enable = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Tuat_Arm_Resistance target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -200
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Tuat_Arm_Resistance target: [From.GetName]"
			514 = {
				add_resistance_target = {
					amount = 40
					occupier = NFA
					days = 365
					tooltip = lba_senussi_backed_resistance
					id = 1453
				}
				set_state_flag = {
					flag = lba_increased_resistance
					days = 366
					value = 1
				}
				save_event_target_as = senussi_resistance_state
			}
			ALG = {
				add_timed_idea = {
					idea = resistance_per_day
					days = 365
				}
			}
		}
	}

	# Algeria	
	LBA_Algeria_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			513 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		visible = {
			513 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					is_owned_by_ROOT_or_ally = yes
					is_owned_by = TRP
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 513
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Algeria_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						513 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#513 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#513 = {
						#lba_increase_zawiya = yes
						#save_event_target_as = senussi_zawiya_state
						#state_event = { id = nfa.481 trigger_for = owner }
					#}
				}
			}
		}
	}
	LBA_Algeria_Arm_Resistance = {
		icon = generic_nationalism

		ai_will_do = {
			factor = 0
			modifier = {
				add = 50
				has_equipment = {
					infantry_equipment > 1000
				}
			}
		}

		visible = {
			513 = {
				has_state_flag = lba_zawiya_2
				has_resistance = yes
				is_owned_by_ROOT_or_ally = no
			}
		}

		available = {
			513 = {
				has_state_flag = lba_zawiya_2
				NOT = {
					has_state_flag = lba_increased_resistance
				}
			}
			has_equipment = {
				infantry_equipment > 199
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 513
		}
		}

		days_remove = 30
		days_re_enable = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Algeria_Arm_Resistance target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -200
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Algeria_Arm_Resistance target: [From.GetName]"
			513 = {
				add_resistance_target = {
					amount = 40
					occupier = NFA
					days = 365
					tooltip = lba_senussi_backed_resistance
					id = 1453
				}
				set_state_flag = {
					flag = lba_increased_resistance
					days = 366
					value = 1
				}
				save_event_target_as = senussi_resistance_state
			}
			ALG = {
				add_timed_idea = {
					idea = resistance_per_day
					days = 365
				}
			}
		}
	}

	# Tripoli
	LBA_Tripoli_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			448 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		visible = {
			448 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					AND = {
						is_owned_by_ROOT_or_ally = yes
						NOT = {
							is_owned_by = TUR
						}
					}
					is_owned_by = TRP
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 448
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Tripoli_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						448 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#448 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#448 = {
						#lba_increase_zawiya = yes
					#}
				}
			}
		}
	}
	LBA_Tripoli_Arm_Resistance = {
		icon = generic_nationalism

		ai_will_do = {
			factor = 0
			modifier = {
				add = 50
				has_equipment = {
					infantry_equipment > 1000
				}
			}
		}

		visible = {
			448 = {
				has_state_flag = lba_zawiya_2
				has_resistance = yes
				is_owned_by_ROOT_or_ally = no
			}
		}

		available = {
			448 = {
				has_state_flag = lba_zawiya_2
				NOT = {
					has_state_flag = lba_increased_resistance
				}
			}
			has_equipment = {
				infantry_equipment > 199
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 448
		}
		}

		days_remove = 30
		days_re_enable = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Tripoli_Arm_Resistance target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -200
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Tripoli_Arm_Resistance target: [From.GetName]"
			448 = {
				add_resistance_target = {
					amount = 40
					occupier = TUR
					days = 365
					tooltip = lba_senussi_backed_resistance
					id = 1453
				}
				set_state_flag = {
					flag = lba_increased_resistance
					days = 366
					value = 1
				}
			}
			TRP = {
				add_timed_idea = {
					idea = resistance_per_day
					days = 365
				}
			}
		}
	}

	# Murzuq
	LBA_Murzuq_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			273 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		visible = {
			273 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					AND = {
						is_owned_by_ROOT_or_ally = yes
						NOT = {
							is_owned_by = TUR
						}
					}
					is_owned_by = TRP
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 273
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Murzuq_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						273 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#273 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#273 = {
						#lba_increase_zawiya = yes
					#}
				}
			}
		}
	}
	LBA_Murzuq_Open_Trade_Route = {
		icon = generic_prepare_civil_war

		ai_will_do = {
			factor = 100
		}

		visible = {
			273 = {
				has_state_flag = blocked_caravan
			}
		}

		available = {
			273 = {
				has_state_flag = blocked_caravan
				has_state_flag = lba_zawiya_1
			}
			has_equipment = {
				infantry_equipment > 249
			}
			has_manpower > 750
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 273
		}
		}

		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Murzuq_Open_Trade_Route target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}
			add_manpower = -750
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Murzuq_Open_Trade_Route target: [From.GetName]"
			add_manpower = 500
			273 = {
				clr_state_flag = blocked_caravan
				custom_effect_tooltip = lba_blockade_lifted_tt
			}
		}
	}
	LBA_Murzuq_Arm_Resistance = {
		icon = generic_nationalism

		ai_will_do = {
			factor = 0
			modifier = {
				add = 50
				has_equipment = {
					infantry_equipment > 1000
				}
			}
		}

		visible = {
			273 = {
				has_state_flag = lba_zawiya_2
				has_resistance = yes
				is_owned_by_ROOT_or_ally = no
			}
		}

		available = {
			273 = {
				has_state_flag = lba_zawiya_2
				NOT = {
					has_state_flag = lba_increased_resistance
				}
			}
			has_equipment = {
				infantry_equipment > 199
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 273
		}
		}

		days_remove = 30
		days_re_enable = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Murzuq_Arm_Resistance target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -200
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Murzuq_Arm_Resistance target: [From.GetName]"
			273 = {
				add_resistance_target = {
					amount = 40
					occupier = TUR
					days = 365
				}
			}
			TRP = {
				add_timed_idea = {
					idea = resistance_per_day
					days = 365
				}
			}
		}
	}

	# Wadai
	LBA_Wadai_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			515 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					is_owned_by_ROOT_or_ally = yes
					is_owned_by = TRP
				}
			}
		}

		visible = {
			515 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 515
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Wadai_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						515 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#515 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#515 = {
						#lba_increase_zawiya = yes
						#save_event_target_as = senussi_zawiya_state
						#state_event = { id = nfa.481 trigger_for = owner }
					#}
				}
			}
		}
	}
	LBA_Wadai_Open_Trade_Route = {
		icon = generic_prepare_civil_war

		ai_will_do = {
			factor = 100
		}

		visible = {
			515 = {
				has_state_flag = blocked_caravan
			}
		}

		available = {
			515 = {
				has_state_flag = blocked_caravan
				has_state_flag = lba_zawiya_1
			}
			has_equipment = {
				infantry_equipment > 249
			}
			has_manpower > 750
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 515
		}
		}

		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Wadai_Open_Trade_Route target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}
			add_manpower = -750
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Wadai_Open_Trade_Route target: [From.GetName]"
			add_manpower = 500
			515 = {
				clr_state_flag = blocked_caravan
				custom_effect_tooltip = lba_blockade_lifted_tt
			}
		}
	}
	LBA_Wadai_Arm_Resistance = {
		icon = generic_nationalism

		ai_will_do = {
			factor = 0
			modifier = {
				add = 50
				has_equipment = {
					infantry_equipment > 1000
				}
			}
		}

		visible = {
			515 = {
				has_state_flag = lba_zawiya_2
				has_resistance = yes
				is_owned_by_ROOT_or_ally = no
			}
		}

		available = {
			515 = {
				has_state_flag = lba_zawiya_2
				NOT = {
					has_state_flag = lba_increased_resistance
				}
			}
			has_equipment = {
				infantry_equipment > 199
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 515
		}
		}

		days_remove = 30
		days_re_enable = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Wadai_Arm_Resistance target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -200
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Wadai_Arm_Resistance target: [From.GetName]"
			515 = {
				add_resistance_target = {
					amount = 40
					occupier = NFA
					days = 365
					tooltip = lba_senussi_backed_resistance
					id = 1453
				}
				set_state_flag = {
					flag = lba_increased_resistance
					days = 366
					value = 1
				}
				save_event_target_as = senussi_resistance_state
			}
			975 = {
				add_resistance_target = {
					amount = 40
					occupier = NFA
					days = 365
					tooltip = lba_senussi_backed_resistance
					id = 1453
				}
				set_state_flag = {
					flag = lba_increased_resistance
					days = 366
					value = 1
				}
				save_event_target_as = senussi_resistance_state
			}
			WAD = {
				add_timed_idea = {
					idea = resistance_per_day
					days = 365
				}
			}
		}
	}

	# Siwa
	LBA_Siwa_Zawiya = {
		icon = onmap_recruit_operative

		ai_will_do = {
			factor = 100
		}

		available = {
			452 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
			}
		}

		visible = {
			452 = {
				NOT = {
					has_state_flag = lba_zawiya_2
				}
				NOT = {
					is_owned_by_ROOT_or_ally = yes
				}
			}
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 452
		}
		}

		cost = 30
		days_remove = 30

		fixed_random_seed = no

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Siwa_Zawiya target: [From.GetName]"
			random_list = {
				20 = {
					modifier = {
						factor = 0
						452 = {
							OR = {
								is_controlled_by_ROOT_or_ally = yes
								NOT = {
									has_state_flag = lba_zawiya_1
								}
							}
						}
					}
					#452 = { lba_clear_zawiya_unrest = yes }
					country_event = libya.28
				}
				80 = {
					#452 = {
						#lba_increase_zawiya = yes
					#}
				}
			}
		}
	}
	LBA_Siwa_Open_Trade_Route = {
		icon = generic_prepare_civil_war

		ai_will_do = {
			factor = 100
		}

		visible = {
			452 = {
				has_state_flag = blocked_caravan
			}
		}

		available = {
			452 = {
				has_state_flag = blocked_caravan
				has_state_flag = lba_zawiya_1
			}
			has_equipment = {
				infantry_equipment > 249
			}
			has_manpower > 750
		}

		on_map_mode = map_only

		highlight_states = { highlight_state_targets = {
			state = 452
		}
		}

		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision LBA_Siwa_Open_Trade_Route target: [From.GetName]"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}
			add_manpower = -750
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove LBA_Siwa_Open_Trade_Route target: [From.GetName]"
			add_manpower = 500
			452 = {
				clr_state_flag = blocked_caravan
				custom_effect_tooltip = lba_blockade_lifted_tt
			}
		}
	}
}
