###########################
# Cyrenaica & Tripolitania Focus Tree
# By Jeankedezeehond
###########################

focus_tree = {
	id = cyrenaica_focus
	country = {
		factor = 0
		modifier = {
			add = 10
			tag = LBA
		}
	}
	default = no
	continuous_focus_position = { x = 50 y = 600 }

	focus = {
		id = LBA_army
		available = {
			has_idea = LBA_home_of_the_Senussi
		}
		icon = GFX_goal_SOM_Arabic_Primacy
		x = 2
		y = 0
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_ARMY_BONUS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_army"
			swap_ideas = {
				remove_idea = LBA_home_of_the_Senussi
				add_idea = LBA_home_of_the_Senussi2
			}
		}
	}

	focus = {
		id = LBA_equipments_tactics
		prerequisite = {
			focus = LBA_army
		}
		icon = GFX_goal_generic_army_high_command
		relative_position_id = LBA_army
		x = -2
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_RESEARCH }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_equipments_tactics"
			army_experience = 15
			add_doctrine_cost_reduction = {
				name = LBA_equipments_tactics
				cost_reduction = 1
				uses = 1
				category = land_doctrine
			}
		}
	}

	focus = {
		id = LBA_guns_butter
		prerequisite = {
			focus = LBA_equipments_tactics
		}
		icon = GFX_BRY_Every_Hand_A_Rifle
		relative_position_id = LBA_army
		x = -2
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_PRODUCTION }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_guns_butter"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 300
				producer = ITA
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 430
				producer = FRA
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 200
				producer = ENG
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 500
				producer = TUR
			}
		}
	}

	focus = {
		id = LBA_bedouins
		prerequisite = {
			focus = LBA_army
		}
		icon = GFX_goal_SOM_Autocratic_Nationalism
		relative_position_id = LBA_army
		x = 2
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_bedouins"
			add_ideas = LBA_horse
		}
	}


	focus = {
		id = LBA_planning
		prerequisite = {
			focus = LBA_seting_up_perimiters
		}
		icon = GFX_goal_OTT_Pipeline
		relative_position_id = LBA_army
		x = 0
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_planning"
			add_doctrine_cost_reduction = {
				name = land_doc_bonus
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
		}
	}

	focus = {
		id = LBA_fast_move
		prerequisite = {
			focus = LBA_planning
		}
		icon = GFX_goal_NVN_Masters_Southwestern_Desert
		relative_position_id = LBA_army
		x = 1
		y = 3
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_fast_move"
			add_ideas = LBA_gotta_go
		}
	}

	focus = {
		id = LBA_seting_up_perimiters
		prerequisite = {
			focus = LBA_army
		}
		icon = GFX_GRU_border
		relative_position_id = LBA_army
		x = 0
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_RESISTANCE }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_seting_up_perimiters"
			add_ideas = LBA_oasis_defence
			hidden_effect = {
				set_technology = { desert_warfare = 1 }
			}
			custom_effect_tooltip = desert_warfare_effect
		}
	}

	focus = {
		id = LBA_desert_warfare
		prerequisite = {
			focus = LBA_planning
		}
		icon = GFX_goal_NFE_butcher_turkey
		relative_position_id = LBA_army
		x = -1
		y = 3
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_desert_warfare"
			swap_ideas = {
				add_idea = LBA_desert_warriors
				remove_idea = LBA_oasis_defence
			}
		}
	}

	focus = {
		id = LBA_equipments_needs
		prerequisite = {
			focus = LBA_army
		}
		icon = GFX_goal_CZE_imperial_arms
		relative_position_id = LBA_army
		x = 4
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_RESEARCH FOCUS_FILTER_PRODUCTION }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_equipments_needs"
			add_tech_bonus = {
				name = LBA_equipments_needs
				bonus = 0.5
				uses = 2
				category = infantry_weapons
				category = artillery
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 200
				producer = MAF
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 160
				producer = EGY
			}
		}
	}

	focus = {
		id = LBA_improvisation
		prerequisite = {
			focus = LBA_equipments_needs
		}
		icon = GFX_goal_generic_old_weapons
		relative_position_id = LBA_army
		x = 3
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_PRODUCTION }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_improvisation"
			add_ideas = LBA_support_eq_cheap
		}
	}

	focus = {
		id = LBA_fezzani_recruitment
		prerequisite = {
			focus = LBA_improvisation
		}
		icon = GFX_goal_SIC_Arabs_and_parthians
		relative_position_id = LBA_army
		x = 3
		y = 3
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_PRODUCTION }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_improvisation"
			add_manpower = 19000
		}
	}

	focus = {
		id = LBA_military_fact
		prerequisite = {
			focus = LBA_equipments_needs
		}
		prerequisite = {
			focus = LBA_Local_Manufacturing
		}
		icon = GFX_goal_NIC_Military_Industry
		relative_position_id = LBA_army
		x = 5
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_military_fact"
			random_owned_state = {
				limit = {
					state_population > 100000
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = LBA_dockyardo
		prerequisite = {
			focus = LBA_military_fact
		}
		icon = GFX_goal_MAG_open_port_for_all
		relative_position_id = LBA_army
		x = 5
		y = 3
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_dockyardo"
			450 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	#################
	# ECONOMIC TREE #
	#################
	focus = {
		id = LBA_Jebel_Irrigation
		icon = GFX_CRM_Water
		relative_position_id = LBA_army
		x = 8
		y = 0
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Jebel_Irrigation"
			add_ideas = LBA_farmers
			451 = {
				add_extra_state_shared_building_slots = 1
			}
		}
	}

	focus = {
		id = LBA_Egyptian_Connection
		prerequisite = {
			focus = LBA_Jebel_Irrigation
		}
		icon = GFX_goal_EGY_Valley
		relative_position_id = LBA_Jebel_Irrigation
		x = 0
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Egyptian_Connection"
			add_political_power = 75
			663 = {
				add_building_construction = {
					type = infrastructure
					level = 1
				}
			}
			add_equipment_to_stockpile = {
				type = convoy
				amount = 10
				producer = EGY
			}
		}
	}

	focus = {
		id = LBA_Saharan_Trade
		prerequisite = {
			focus = LBA_Egyptian_Connection
		}
		icon = GFX_goal_OTT_camels
		relative_position_id = LBA_Egyptian_Connection
		x = 1
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Saharan_Trade"
			add_ideas = LBA_trans_saharan_trade
		}
	}

	focus = {
		id = LBA_Weapon_Smuggling
		prerequisite = {
			focus = LBA_Saharan_Trade
		}
		icon = GFX_goal_DAH_arms_trade
		relative_position_id = LBA_Saharan_Trade
		x = 0
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_POLITICAL }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Weapon_Smuggling"
			add_political_power = 50
			custom_effect_tooltip = lba_weapons_smuggling_tt
			add_to_variable = {
				waf_route = 10
			}
			add_to_variable = {
				alg_route = 10
			}
			add_to_variable = {
				cam_route = 10
			}
			add_to_variable = {
				con_route = 10
			}
			add_to_variable = {
				nig_route = 10
			}
			add_to_variable = {
				siw_route = 10
			}
		}
	}

	focus = {
		id = LBA_The_Jihadi_Cause
		prerequisite = {
			focus = LBA_Saharan_Trade
		}
		icon = GFX_BRY_Every_Hand_A_Rifle
		relative_position_id = LBA_Saharan_Trade
		x = 2
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_POLITICAL }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_The_Jihadi_Cause"
			add_offsite_building = { type = arms_factory level = 1 }
		}
	}

	focus = {
		id = LBA_Derna_Harbour
		prerequisite = {
			focus = LBA_Egyptian_Connection
		}
		icon = GFX_USA_ports_atlantic
		relative_position_id = LBA_Egyptian_Connection
		x = -1
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Derna_Harbour"
			remove_ideas = LBA_ottoman_naval_penetration
			451 = {
				add_building_construction = {
					type = naval_base
					level = 2
					province = 9992
				}
			}
			451 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
				}
			}
		}
	}

	focus = {
		id = LBA_Promote_Fishing
		prerequisite = {
			focus = LBA_Derna_Harbour
		}
		icon = GFX_nileandlakecommission
		relative_position_id = LBA_Egyptian_Connection
		x = -1
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Promote_Fishing"
			add_offsite_building = { type = industrial_complex level = 1 }
			add_stability = 0.05
		}
	}

	focus = {
		id = LBA_Local_Manufacturing
		prerequisite = {
			focus = LBA_Jebel_Irrigation
		}
		icon = GFX_goal_AUS_Ensure_Integrity_Economy_Culture
		relative_position_id = LBA_Jebel_Irrigation
		x = -2
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Local_Manufacturing"
			451 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
	}


	focus = {
		id = LBA_Zawiya_Education
		prerequisite = {
			focus = LBA_Jebel_Irrigation
		}
		icon = GFX_goal_SOM_Allah_Liberalization
		relative_position_id = LBA_Jebel_Irrigation
		x = 2
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Zawiya_Education"
			add_research_slot_until_five = yes
		}
	}

	#########
	# IDRIS #
	#########

	focus = {
		id = LBA_idris_the_liberator
		icon = GFX_goal_LBA_Idris_Returns

		x = 16
		y = 0
		cost = 7
		ai_will_do = {
			factor = 90
		}
		bypass = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		mutually_exclusive = {
			focus = LBA_loyalty_own_reward
		}
		search_filters = { FOCUS_FILTER_INTERNAL_AFFAIRS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_idris_the_liberator"
			effect_tooltip = {
				add_popularity = {
					ideology = authoritarian_democrat
					popularity = 0.20
				}
				set_politics = {
					ruling_party = authoritarian_democrat
					elections_allowed = no
				}
			}
			if = {
				limit = {
					has_cosmetic_tag = LBA_OTT
				}
				drop_cosmetic_tag = yes
			}
		}
	}

	focus = {
		id = LBA_reborn_spirit
		prerequisite = {
			focus = LBA_idris_the_liberator
		}
		icon = GFX_goal_NEE_Meritocracy_Focused_Growing_Urban_Heart_alt
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		relative_position_id = LBA_idris_the_liberator
		x = -2
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INTERNAL_AFFAIRS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_reborn_spirit"
			add_popularity = {
				ideology = authoritarian_democrat
				popularity = 0.10
			}
		}
	}


	focus = {
		id = LBA_Prepare_Defences
		prerequisite = {
			focus = LBA_reborn_spirit
		}
		icon = GFX_goal_ALB_Bunker
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		relative_position_id = LBA_idris_the_liberator
		x = -2
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Prepare_Defences"
			451 = {
				add_building_construction = {
					type = bunker
					level = 3
					province = 1127
				}
				add_building_construction = {
					type = bunker
					level = 2
					province = 1062
				}
				add_building_construction = {
					type = bunker
					level = 2
					province = 7139
				}
				add_building_construction = {
					type = bunker
					level = 2
					province = 4063
				}
			}
			663 = {
				add_building_construction = {
					type = bunker
					level = 3
					province = 1060
				}
				add_building_construction = {
					type = bunker
					level = 2
					province = 4060
				}
			}
		}
	}

	focus = {
		id = LBA_join_egypt
		prerequisite = {
			focus = LBA_idris_the_liberator
		}
		icon = GFX_EGY_Third_Arab_Congress
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		relative_position_id = LBA_idris_the_liberator
		x = 0
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_join_egypt"
			add_war_support = 0.1
			every_country = {
				limit = {
					OR = {
						tag = EGY
						tag = SYR
						tag = IRQ
						tag = SAU
						tag = JBS
						tag = ALG
						tag = TUN
					}
				}
				add_opinion_modifier = {
					target = LBA
					modifier = small_increase
				}
			}
			448 = {
				ott_increase_revolt_risk = yes
			}
		}
	}

	focus = {
		id = LBA_foreign_experts
		prerequisite = {
			focus = LBA_join_egypt
		}
		icon = GFX_goal_BRM_investment
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		relative_position_id = LBA_idris_the_liberator
		x = 2
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_foreign_experts"
			add_offsite_building = {
				type = industrial_complex
				level = 1
			}
			add_tech_bonus = {
				name = LBA_foreign_experts
				category = industry
				bonus = 1
				uses = 1
			}
		}
	}

	focus = {
		id = LBA_intel_equip_sharing
		prerequisite = {
			focus = LBA_foreign_experts
		}
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		icon = GFX_goal_EGY_sons
		relative_position_id = LBA_idris_the_liberator
		x = 2
		y = 3
		cost = 7
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_intel_equip_sharing"
			add_ideas = LBA_egyptian_mission
		}
	}


	focus = {
		id = LBA_anti_imperial_rhetoric
		prerequisite = {
			focus = LBA_join_egypt
		}
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		icon = GFX_goal_BBR_racial_populism
		relative_position_id = LBA_idris_the_liberator
		x = 0
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_MANPOWER }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_anti_imperial_rhetoric"
			add_manpower = 5000
			450 = {
				ott_increase_revolt_risk = yes
			}
		}
	}

	focus = {
		id = LBA_tribal_burden
		prerequisite = {
			focus = LBA_Prepare_Defences
		}
		prerequisite = {
			focus = LBA_anti_imperial_rhetoric
		}
		available = {
			has_country_leader = {
				name = "Idris I"
			}
		}
		icon = GFX_goal_AFG_placate_tribe_leaders
		relative_position_id = LBA_idris_the_liberator
		x = -1
		y = 3
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_tribal_burden"
			add_stability = 0.15
		}
	}

	focus = {
		id = LBA_loyalty_own_reward
		icon = GFX_goal_BBR_reactionary_futurism
		x = 21
		y = 0
		cost = 7
		bypass = {
			has_country_flag = LBA_idris_btfo
		}
		available = {
			has_country_flag = LBA_idris_btfo
		}
		mutually_exclusive = {
			focus = LBA_idris_the_liberator
		}
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INTERNAL_AFFAIRS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_loyalty_own_reward"
			add_popularity = {
				ideology = national_populist
				popularity = 0.2
			}
			set_politics = {
				ruling_party = national_populist
				elections_allowed = no
			}
		}
	}

	focus = {
		id = LBA_crush_the_opposition
		prerequisite = {
			focus = LBA_idris_the_liberator focus = LBA_loyalty_own_reward
		}
		icon = GFX_HUN_fleet_horse
		relative_position_id = LBA_loyalty_own_reward
		x = -3
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_crush_the_opposition"
			add_stability = 0.05
			add_war_support = 0.05
			increase_ruling_party_popularity_by_5 = yes
		}
	}

	focus = {
		id = LBA_Confiscate_Royal_Assets
		prerequisite = {
			focus = LBA_loyalty_own_reward
		}
		available = {
			has_country_flag = LBA_idris_btfo
		}
		icon = GFX_goal_SIC_confiscate_degenerate_wealth
		relative_position_id = LBA_loyalty_own_reward
		x = -1
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Confiscate_Royal_Assets"
			add_stability = -0.05
			add_offsite_building = {
				type = industrial_complex
				level = 1
			}
		}
	}

	focus = {
		id = LBA_Rally_Tribes
		prerequisite = {
			focus = LBA_Confiscate_Royal_Assets
		}
		available = {
			has_country_flag = LBA_idris_btfo
		}
		icon = GFX_goal_NFE_conquer_tripolitania
		relative_position_id = LBA_loyalty_own_reward
		x = -1
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Rally_Tribes"
			add_ideas = LBA_tribal_loyalty
			hidden_effect = {
				division_template = {
					name = "Senussi Horsemen"
					division_names_group = EGY_CAV_01
					regiments = {
						cavalry = { x = 0 y = 0 }
						cavalry = { x = 0 y = 1 }

						cavalry = { x = 1 y = 0 }
						cavalry = { x = 1 y = 1 }
					}
				}
			}
			451 = {
				create_unit = {
					division = "name = \"Drasa Militia\" division_template = \"Senussi Horsemen\"  start_experience_factor = 0.3"
					owner = ROOT
				}
				create_unit = {
					division = "name = \"'Awagir Militia\" division_template = \"Senussi Horsemen\"  start_experience_factor = 0.3"
					owner = ROOT
				}
				create_unit = {
					division = "name = \"Zawaya Militia\" division_template = \"Senussi Horsemen\"  start_experience_factor = 0.3"
					owner = ROOT
				}
			}
		}
	}


	focus = {
		id = LBA_make_it_double
		prerequisite = {
			focus = LBA_Rally_Tribes
		}
		available = {
			has_country_flag = LBA_idris_btfo

		}
		icon = GFX_goal_NVN_Fortify_Fort_Defiance
		relative_position_id = LBA_loyalty_own_reward
		x = -1
		y = 3
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_make_it_double"
			add_offsite_building = {
				type = arms_factory
				level = 1
			}
			451 = {
				add_building_construction = {
					type = bunker
					level = 3
					province = 1127
				}
				add_building_construction = {
					type = bunker
					level = 2
					province = 1062
				}
				add_building_construction = {
					type = bunker
					level = 2
					province = 7139
				}
				add_building_construction = {
					type = bunker
					level = 2
					province = 4063
				}
			}
		}
	}

	focus = {
		id = LBA_joint_war_efforts
		prerequisite = {
			focus = LBA_loyalty_own_reward
		}
		available = {
			has_country_flag = LBA_idris_btfo
		}
		icon = GFX_goal_SOM_Bend_To_Tribes
		relative_position_id = LBA_loyalty_own_reward
		x = 1
		y = 1
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_ARMY_BONUS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_joint_war_efforts"
			add_ideas = LBA_mujahideen
		}
	}

	focus = {
		id = LBA_Cooperate_Caliph
		prerequisite = {
			focus = LBA_joint_war_efforts
		}
		available = {
			has_country_flag = LBA_idris_btfo
			NOT = {
				has_war_with = TUR
			}
		}
		mutually_exclusive = {
			focus = LBA_Unite_Libya
		}
		search_filters = { FOCUS_FILTER_RESEARCH FOCUS_FILTER_PRODUCTION }
		icon = GFX_goal_AFG_ottoman_sultan_takes_over
		relative_position_id = LBA_loyalty_own_reward
		x = 1
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Cooperate_Caliph"
			TUR = {
				add_opinion_modifier = {
					target = LBA
					modifier = ott_rr_caliph
				}
			}
			custom_effect_tooltip = tooltip_white_line
			add_tech_bonus = {
				name = LBA_Cooperate_Caliph
				category = infantry_weapons
				bonus = 1
				uses = 1
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 2000
				producer = TUR
			}
			if = {
				limit = {
					NOT = {
						owns_state = 448
					}
				}
				hidden_effect = {
					set_cosmetic_tag = LBA_OTT
				}
			}
			if = {
				limit = {
					TUR = {
						is_ai = yes
						owns_state = 450
					}
				}
				transfer_state = 450
			}
		}
	}

	focus = {
		id = LBA_Turkish_Military_Assistance
		prerequisite = {
			focus = LBA_Cooperate_Caliph
		}
		available = {
			has_country_flag = LBA_idris_btfo
			NOT = {
				has_war_with = TUR
			}
		}
		icon = GFX_goal_OTT_hunting
		relative_position_id = LBA_loyalty_own_reward
		x = 1
		y = 4
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Turkish_Military_Assistance"
			add_ideas = LBA_ottoaid
		}
	}

	focus = {
		id = LBA_Unite_Libya
		prerequisite = {
			focus = LBA_joint_war_efforts
		}
		available = {
			has_country_flag = LBA_idris_btfo
			OR = {
				is_ai = no
				EGY = {
					has_war_with = TUR
				}
			}
		}
		mutually_exclusive = {
			focus = LBA_Cooperate_Caliph
		}
		icon = GFX_goal_NEE_open_warfare
		relative_position_id = LBA_loyalty_own_reward
		x = 3
		y = 2
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_ANNEXATION }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Unite_Libya"
			add_state_claim = 448
			custom_effect_tooltip = tooltip_white_line
			if = {
				limit = { is_subject = yes }
				overlord = {
					set_autonomy = {
						target = ROOT
						autonomy_state = autonomy_free
					}
				}
			}
			if = {
				limit = {
					has_cosmetic_tag = LBA_OTT
				}
				drop_cosmetic_tag = yes
			}
			leave_faction = yes
			every_enemy_country = {
				limit = {
					is_valid_peace_target = yes
					NOT = { tag = TUR }
				}
				white_peace_with_ROOT = yes
			}
			declare_war_on = {
				target = TUR
				type = take_core_state
			}
			if = {
				limit = {
					EGY = {
						has_war_with = TUR
						is_faction_leader = yes
					}
				}
				EGY = {
					add_to_faction = "LBA"
				}
			}
			else = {
				activate_mission = LBA_White_Peace_Cyrenaican_Revolt
			}
		}
	}

	focus = {
		id = LBA_Maghrebi_Jihad
		prerequisite = {
			focus = LBA_Unite_Libya
		}
		available = {
			has_country_flag = LBA_idris_btfo
			owns_state = 448
			owns_state = 273
			owns_state = 450
		}
		icon = GFX_goal_AFG_islamic_revolution
		relative_position_id = LBA_loyalty_own_reward
		x = 4
		y = 3
		cost = 7
		ai_will_do = {
			factor = 100
			modifier = {
				factor = 0
				has_war = yes
			}
			modifier = {
				factor = 0
				NFA = {
					NOT = {
						has_war_with = FRA
						has_war_with = GER
					}
				}
			}
		}
		select_effect = {
			country_event = libya.12
		}
		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_MANPOWER FOCUS_FILTER_PRODUCTION }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Maghrebi_Jihad"
			create_wargoal = {
				target = NFA
				type = liberate_wargoal
			}
			add_manpower = 20000
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 1000
				producer = EGY
			}
		}
	}

	focus = {
		id = LBA_Cyrenaican_Egyptian_Cooperation
		prerequisite = {
			focus = LBA_Unite_Libya
		}
		available = {
			has_country_flag = LBA_idris_btfo
			owns_state = 448
			owns_state = 273
			owns_state = 450
		}
		icon = GFX_goal_EGY_Army
		relative_position_id = LBA_loyalty_own_reward
		x = 2
		y = 3
		cost = 7
		ai_will_do = {
			factor = 90
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Cyrenaican_Egyptian_Cooperation"
			EGY = {
				add_to_faction = LBA
			}
			add_offsite_building = {
				type = arms_factory
				level = 1
			}
			add_offsite_building = {
				type = industrial_complex
				level = 1
			}
		}
	}

	#################
	# Post-War Tree #
	#################

	focus = {
		id = LBA_Unification_Libya
		icon = GFX_EGY_Liberate_Tripolitania

		cost = 2

		available = {
			is_subject = no
			can_declare_war_on = 448.owner
			controls_all_owned_states = yes
			NOT = {
				owns_state = 448
			}
		}

		x = 19
		y = 5
		will_lead_to_war_with = TRP
		ai_will_do = {
			factor = 5
			modifier = {
				factor = 1
				has_war = yes
			}
		}
		bypass = {
			owns_state = 448
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Unification_Libya"
			declare_war_on = { type = annex_everything target = 448.owner }
			if = {
				limit = {
					NOT = {
						448 = {
							is_core_of = ROOT
						}
					}
				}
				448 = { add_core_of = ROOT }
			}
			if = {
				limit = {
					NOT = {
						273 = {
							is_core_of = ROOT
						}
					}
				}
				273 = { add_core_of = ROOT }
			}
		}
	}

	focus = {
		id = LBA_Maintain_Tribal_Organisation
		icon = GFX_goal_SOM_Clan_Conservatism

		cost = 7

		prerequisite = {
			focus = LBA_Federation
		}

		mutually_exclusive = {
			focus = LBA_Libyan_Army
		}

		x = -1
		y = 2
		relative_position_id = LBA_Unification_Libya

		ai_will_do = {
			factor = 100
		}
		
		search_filters = { FOCUS_FILTER_ARMY_BONUS }



		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Maintain_Tribal_Organisation"
			add_ideas = LBA_tribal_organisation
			add_war_support = 0.05
		}
	}

	focus = {
		id = LBA_Libyan_Army
		icon = GFX_goal_AFG_ottoman_ex_caucasus_war

		cost = 7

		prerequisite = {
			focus = LBA_Unitary_State
		}



		mutually_exclusive = {
			focus = LBA_Maintain_Tribal_Organisation
		}

		x = 1
		y = 2
		relative_position_id = LBA_Unification_Libya

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_RESEARCH }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Libyan_Army"
			add_doctrine_cost_reduction = {
				name = LBA_Libyan_Army
				cost_reduction = 1
				uses = 2
				category = land_doctrine
			}
			add_tech_bonus = {
				name = LBA_Libyan_Army
				category = motorized_equipment
				bonus = 1
				uses = 1
			}
			add_tech_bonus = {
				name = LBA_Libyan_Army
				category = air_equipment
				bonus = 0.5
				uses = 2
			}
		}
	}

	focus = {
		id = LBA_Redistribute_Ottoman_Equipment
		icon = GFX_goal_OTT_arms_purchase

		cost = 7

		prerequisite = {
			focus = LBA_Maintain_Tribal_Organisation
			focus = LBA_Libyan_Army
		}



		x = 1
		y = 1
		relative_position_id = LBA_Maintain_Tribal_Organisation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_PRODUCTION }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Redistribute_Ottoman_Equipment"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 3000
				producer = TUR
			}
			add_equipment_to_stockpile = {
				type = artillery_equipment_1
				amount = 200
				producer = TUR
			}
			add_equipment_to_stockpile = {
				type = support_equipment_1
				amount = 300
				producer = TUR
			}
			add_equipment_to_stockpile = {
				type = small_plane_airframe
				amount = 10
				producer = TUR
			}
		}
	}

	focus = {
		id = LBA_Expand_Zawiya_Network
		icon = GFX_goal_SOM_True_Islamic_Republicanism

		cost = 7

		prerequisite = {
			focus = LBA_Redistribute_Ottoman_Equipment
		}



		x = 1
		y = 2
		relative_position_id = LBA_Maintain_Tribal_Organisation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Expand_Zawiya_Network"
			add_war_support = 0.10
			WAD = {
				add_offsite_building = {
					type = arms_factory
					level = 1
				}
			}
			TUA = {
				add_offsite_building = {
					type = arms_factory
					level = 1
				}
			}
			TUN = {
				add_offsite_building = {
					type = arms_factory
					level = 1
				}
			}
		}
	}

	focus = {
		id = LBA_Federation
		icon = GFX_SAF_race_council

		cost = 7

		prerequisite = {
			focus = LBA_Unification_Libya
		}

		available = {
			controls_all_owned_states = yes
			owns_state = 448
			owns_state = 273
			owns_state = 450
		}

		mutually_exclusive = {
			focus = LBA_Unitary_State
		}

		x = -4
		y = 1
		relative_position_id = LBA_Unification_Libya

		ai_will_do = {
			factor = 100
		}
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Federation"
			add_ideas = LBA_federation
			if = {
				limit = {
					NOT = {
						has_cosmetic_tag = LBA_SENUSSY
					}
				}
				set_cosmetic_tag = LBA_libya_federation
			}
			ROOT = {
				every_owned_state = {
					limit = {
						is_claimed_by = TRP
					}
					remove_claim_by = TRP
				}
				every_owned_state = {
					limit = {
						is_core_of = TRP
					}
					remove_core_of = TRP
				}
			}
		}
	}

	focus = {
		id = LBA_Legislative_Councils_of_the_Provinces
		icon = GFX_goal_PRU_legislative_palace

		cost = 7

		prerequisite = {
			focus = LBA_Federation
		}

		available = {
			has_idea = LBA_federation
		}

		x = -1
		y = 1
		relative_position_id = LBA_Federation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Legislative_Councils_of_the_Provinces"
			swap_ideas = {
				remove_idea = LBA_federation
				add_idea = LBA_federation2
			}
			add_research_slot_until_five = yes
		}
	}

	focus = {
		id = LBA_Province_Fezzan
		icon = GFX_CRM_Fruit

		cost = 7

		prerequisite = {
			focus = LBA_Legislative_Councils_of_the_Provinces
		}

		x = -3
		y = 2
		relative_position_id = LBA_Federation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_INDUSTRY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Province_Fezzan"
			273 = {
				add_extra_state_shared_building_slots = 1
			}
		}
	}

	focus = {
		id = LBA_Republic_Tripolitania
		icon = GFX_goal_USA_Wealth_Ceiling

		cost = 7

		prerequisite = {
			focus = LBA_Legislative_Councils_of_the_Provinces
		}

		x = -1
		y = 2
		relative_position_id = LBA_Federation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_INDUSTRY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Republic_Tripolitania"
			448 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
				}
			}
		}
	}

	focus = {
		id = LBA_Emirate_Cyrenaica
		icon = GFX_goal_SOM_Clan_Amends

		cost = 7

		prerequisite = {
			focus = LBA_Legislative_Councils_of_the_Provinces
		}

		x = 1
		y = 2
		relative_position_id = LBA_Federation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_MANPOWER }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Emirate_Cyrenaica"
			army_experience = 30
			add_manpower = 15000
		}
	}

	focus = {
		id = LBA_Curb_Federal_Excecutive_Power
		icon = GFX_goal_MEX_Maintain_the_3_branches

		cost = 7

		prerequisite = {
			focus = LBA_Province_Fezzan
		}
		prerequisite = {
			focus = LBA_Republic_Tripolitania
		}
		prerequisite = {
			focus = LBA_Emirate_Cyrenaica
		}



		x = -1
		y = 3
		relative_position_id = LBA_Federation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_STABILITY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Curb_Federal_Excecutive_Power"
			swap_ideas = {
				remove_idea = LBA_federation2
				add_idea = LBA_federation3
			}
		}
	}

	focus = {
		id = LBA_Enforce_Regionalism
		icon = GFX_RUS_Decentralize_Power

		cost = 7

		prerequisite = {
			focus = LBA_Federation
		}



		x = 1
		y = 1
		relative_position_id = LBA_Federation

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_STABILITY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Enforce_Regionalism"
			add_stability = 0.05
		}
	}

	focus = {
		id = LBA_Unitary_State
		icon = GFX_goal_CZE_unite_the_right

		cost = 7

		prerequisite = {
			focus = LBA_Unification_Libya
		}

		available = {
			controls_all_owned_states = yes
			owns_state = 448
			owns_state = 273
			owns_state = 450
		}

		mutually_exclusive = {
			focus = LBA_Federation
		}

		x = 4
		y = 1
		relative_position_id = LBA_Unification_Libya

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Unitary_State"
			add_ideas = LBA_unitary
			if = {
				limit = {
					NOT = {
						has_cosmetic_tag = LBA_SENUSSY
					}
				}
				set_cosmetic_tag = LBA_libya_state
			}
		}
	}

	focus = {
		id = LBA_Strengthen_Diwan
		icon = GFX_goal_NFA_empower_parliament

		cost = 7

		prerequisite = {
			focus = LBA_Unitary_State
		}



		x = -1
		y = 1
		relative_position_id = LBA_Unitary_State

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_INTERNAL_AFFAIRS }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Strengthen_Diwan"
			increase_ruling_party_popularity_by_10 = yes
			add_war_support = 0.05
		}
	}

	focus = {
		id = LBA_Libyan_National_Congress
		icon = GFX_goal_CAL_council

		cost = 7

		prerequisite = {
			focus = LBA_Unitary_State
		}



		x = 1
		y = 1
		relative_position_id = LBA_Unitary_State

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_STABILITY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Libyan_National_Congress"
			swap_ideas = {
				remove_idea = LBA_unitary
				add_idea = LBA_unitary2
			}
		}
	}

	focus = {
		id = LBA_Redraw_Provincial_Borders
		icon = GFX_goal_NFA_Empire_Provinces_Not_Departments

		cost = 7

		prerequisite = {
			focus = LBA_Libyan_National_Congress
		}

		x = 2
		y = 2
		relative_position_id = LBA_Unitary_State

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_INDUSTRY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Redraw_Provincial_Borders"
			swap_ideas = {
				remove_idea = LBA_unitary2
				add_idea = LBA_unitary3
			}
		}
	}

	focus = {
		id = LBA_Bank_of_Tripoli
		icon = GFX_goal_TEX_banks_for_america

		cost = 7

		prerequisite = {
			focus = LBA_Libyan_National_Congress
		}

		x = 0
		y = 2
		relative_position_id = LBA_Unitary_State

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_RESEARCH FOCUS_FILTER_INDUSTRY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Bank_of_Tripoli"
			add_tech_bonus = {
				name = LBA_Bank_of_Tripoli
				category = construction_tech
				bonus = 1
				uses = 1
			}
			448 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
				}
			}
		}
	}

	focus = {
		id = LBA_Reinvigorate_Tripolitanian_Construction
		icon = GFX_BBR_build_industries

		cost = 7

		prerequisite = {
			focus = LBA_Bank_of_Tripoli
		}

		x = 1
		y = 3
		relative_position_id = LBA_Unitary_State

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_INDUSTRY }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Reinvigorate_Tripolitanian_Construction"
			448 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
				}
				add_building_construction = {
					type = infrastructure
					level = 1
				}
			}
		}
	}

	focus = {
		id = LBA_Combat_Illiteracy
		icon = GFX_goal_HON_Education_Research

		cost = 7

		prerequisite = {
			focus = LBA_Bank_of_Tripoli
		}
		prerequisite = {
			focus = LBA_Strengthen_Diwan
		}

		x = -1
		y = 3
		relative_position_id = LBA_Unitary_State

		ai_will_do = {
			factor = 100
		}


		
		search_filters = { FOCUS_FILTER_RESEARCH }

		completion_reward = {
			log = "[GetDateText]: [Root.GetName]: Focus LBA_Combat_Illiteracy"
			add_research_slot_until_five = yes
		}
	}
}