ALG_crackdown_category = {
	ALG_arrest_political_opponents = {
		available = { has_country_flag = ALG_crackdown_path }
		days_remove = 30
		fire_only_once = yes
		cost = 150
		icon = GFX_decision_generic_arrest

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_arrest_political_opponents"
			custom_effect_tooltip = ALG_arrest_opponents_started_tt
			add_stability = -0.05
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_arrest_political_opponents"
			custom_effect_tooltip = ALG_arrest_opponents_complete_tt
			add_popularity = {
				ideology = nationalist
				popularity = 0.05
			}
			add_ideas = ALG_repression_modifier
			set_temp_variable = { corp_change = 1 }
			modify_corporate_tax_rate_effect = yes
			random = {
				chance = 30
				country_event = { id = alg_crackdown.1 days = 15 random_days = 10 }
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				has_stability < 0.45
			}
			modifier = {
				factor = 0.5
				has_war_support < 0.3
			}
		}
	}

	ALG_expand_surveillance_services = {
		cost = 100
		available = { has_country_flag = ALG_crackdown_path }
		icon = GFX_decision_eng_propaganda_campaigns
		days_remove = 30
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_expand_surveillance_services"
			custom_effect_tooltip = ALG_surveillance_started_tt
			add_stability = -0.02
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_expand_surveillance_services"
			custom_effect_tooltip = ALG_surveillance_complete_tt
			add_ideas = ALG_surveillance_state_modifier
			set_temp_variable = { temp_productivity_change = -0.01 }
			flat_productivity_change_effect = yes
			add_war_support = 0.01
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 1.5
				has_idea = ALG_repression_modifier
			}
		}
	}

	ALG_ban_opposition_parties = {
		cost = 150

		available = {
			has_country_flag = ALG_crackdown_path
			has_stability > 0.65
		}

		icon = bancru_depts_button
		days_remove = 30
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_ban_opposition_parties"
			custom_effect_tooltip = ALG_ban_parties_started_tt
			add_stability = -0.03
			add_opinion_modifier = {
				target = USA
				modifier = crackdown_on_protests
			}
			add_opinion_modifier = {
				target = FRA
				modifier = crackdown_on_protests
			}
			add_opinion_modifier = {
				target = GER
				modifier = crackdown_on_protests
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_ban_opposition_parties"
			custom_effect_tooltip = ALG_ban_parties_complete_tt
			add_war_support = 0.02
			#set_country_flag = ALG_crackdown_backfired
			add_popularity = {
				ideology = nationalist
				popularity = 0.06
			}
			add_popularity = {
				ideology = communism
				popularity = 0.08
			}
			if = {
				limit = { has_government = democratic }
				add_popularity = {
					ideology = democratic
					popularity = -0.08
				}
			}
			set_temp_variable = { party_index = 0 }
			ban_party_scripted_call = yes
			set_temp_variable = { party_index = 1 }
			ban_party_scripted_call = yes
			set_temp_variable = { party_index = 16 }
			ban_party_scripted_call = yes
			set_temp_variable = { party_index = 18 }
			ban_party_scripted_call = yes
			increase_centralization = yes
			decrease_economic_growth = yes
			country_event = { id = alg_crackdown.2 days = 45 random_days = 15 }
		}

		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 3
				has_stability < 0.40
			}
		}
	}
}
ALG_economic_recovery_category = {
	ALG_accept_imf_loan = {
		cost = 0
		icon = bancru_imf_button

		available = {
			has_completed_focus = ALG_state_and_imf_funding
			NOT = { has_country_flag = ALG_imf_loan_taken }
			NOT = {
				OR = {
					has_idea = corruption_level_10
					has_idea = corruption_level_09
					has_idea = corruption_level_08
				}
			}
		}

		days_remove = 60

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_accept_imf_loan"
			custom_effect_tooltip = ALG_imf_loan_started_tt
			set_country_flag = ALG_imf_loan_taken
			activate_mission = cheap_loan_from_the_imf_mission
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_accept_imf_loan"
			custom_effect_tooltip = ALG_imf_loan_complete_tt
			add_offsite_building = { type = industrial_complex level = 2 }
			add_political_power = 100
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				has_political_power < 100
			}
		}
	}

	ALG_start_oil_licensing = {
		cost = 50
		icon = cuba_oil_button
		available = { has_completed_focus = ALG_energy_reform }
		days_remove = 30
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_start_oil_licensing"
			custom_effect_tooltip = ALG_oil_licensing_started_tt
			add_stability = -0.01
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_start_oil_licensing"
			custom_effect_tooltip = ALG_oil_licensing_complete_tt
			add_political_power = 50
			add_ideas = ALG_foreign_oil_licensing_bonus
			random_owned_controlled_state = {
				limit = {
					OR = {
						state = 382
						state = 381
						state = 383
						is_core_of = ALG
					}
				}
				add_resource = {
					type = oil
					amount = 5
				}
			}
			# Relations with oil countries
			add_opinion_modifier = { target = USA modifier = oil_deals }
			add_opinion_modifier = { target = PER modifier = oil_deals }
			add_opinion_modifier = { target = CAN modifier = oil_deals }
			add_opinion_modifier = { target = SAU modifier = oil_deals }
			add_opinion_modifier = { target = SOV modifier = oil_deals }
			add_opinion_modifier = { target = IRQ modifier = oil_deals }
			add_opinion_modifier = { target = VEN modifier = oil_deals }
			add_opinion_modifier = { target = UAE modifier = oil_deals }
			add_opinion_modifier = { target = KUW modifier = oil_deals }
			add_opinion_modifier = { target = MEX modifier = oil_deals }
		}

		ai_will_do = { base = 1 }
	}

	ALG_repay_imf_loan = {
		cost = 50
		icon = bancru_ass_imf_button
		available = { has_country_flag = ALG_imf_loan_taken }
		days_remove = 30
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_repay_imf_loan"
			custom_effect_tooltip = ALG_repay_imf_started_tt
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_repay_imf_loan"
			custom_effect_tooltip = ALG_repay_imf_complete_tt
			set_temp_variable = { debt_change = 5.0 }
			modify_debt_effect = yes
			add_stability = 0.03
			clr_country_flag = ALG_imf_loan_taken
		}

		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 2
				has_stability < 0.50
			}
			modifier = {
				factor = 3
				has_political_power > 300
			}
		}
	}
}
ALG_kabyle_issue = {
	monitor_kabyle_unrest = {
		icon = GFX_decision_generic_political_discourse

		available = {
			has_idea = ALG_kabylia_unrest
			385 = { resistance > 0 }
		}

		cost = 0
		highlight_states = { highlight_states_trigger = { state = 385 } }
		on_map_mode = map_only

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete monitor_kabyle_unrest"
			custom_effect_tooltip = kabyle_resistance_effects
			custom_effect_tooltip = kabyle_resistance_tooltip
		}

		#hidden_effect = {
		#	385 = {
		#		save_event_target_as = kabyle_state
		#	}
		#	set_variable = { kabyle_resistance = event_target:kabyle_state.resistance }
		#}
		ai_will_do = { base = 0 }
	}
}
ALG_reconciliation_path_category = {
	ALG_pardon_moderate_islamist = {
		icon = GFX_decisions_promice_peace_button
		cost = 100

		available = {
			has_completed_focus = ALG_moderate_islamist_talks
			has_stability > 0.40
		}

		days_remove = 30
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_pardon_moderate_islamist"
			custom_effect_tooltip = ALG_pardon_islamist_started_tt
			add_stability = -0.02
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_pardon_moderate_islamist"
			custom_effect_tooltip = ALG_pardon_islamist_complete_tt
			add_popularity = {
				ideology = fascism
				popularity = -0.04
			}
			add_popularity = {
				ideology = democratic
				popularity = 0.03
			}
			add_popularity = {
				ideology = neutrality
				popularity = 0.03
			}
			add_political_power = 75
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0.3
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
	}

	ALG_initiate_national_dialogues = {
		available = { has_completed_focus = ALG_moderate_islamist_talks }
		icon = spending_lower_button
		cost = 150
		days_remove = 30
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_initiate_national_dialogues"
			custom_effect_tooltip = ALG_dialogue_started_tt
			add_war_support = -0.03
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_initiate_national_dialogues"
			custom_effect_tooltip = ALG_dialogue_complete_tt
			add_stability = 0.05
			add_ideas = ALG_national_dialogue_modifier
			#set_country_flag = ALG_dialogue_opened
			add_opinion_modifier = { target = FRA modifier = democratic_reforms }
			add_opinion_modifier = { target = GER modifier = democratic_reforms }
			add_opinion_modifier = { target = ENG modifier = democratic_reforms }
			add_opinion_modifier = { target = SWI modifier = democratic_reforms }
			add_opinion_modifier = { target = NRY modifier = democratic_reforms }
			add_opinion_modifier = { target = HOL modifier = democratic_reforms }
		}

		ai_will_do = {
			base = 0.9
			modifier = {
				factor = 2
				has_stability < 0.50
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
	}

	ALG_reintegrate_former_fighter = {
		available = { has_completed_focus = ALG_moderate_islamist_talks }
		days_remove = 30
		fire_only_once = yes
		icon = GFX_decision_generic_army_support
		cost = 175

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_reintegrate_former_fighter"
			custom_effect_tooltip = ALG_reintegrate_fighters_started_tt
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_reintegrate_former_fighter"
			custom_effect_tooltip = ALG_reintegrate_fighters_complete_tt
			add_stability = 0.03
			add_manpower = 3000
			add_popularity = {
				ideology = nationalist
				popularity = 0.05
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				has_manpower > 10000
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
	}
}

ALG_ethnic_data_category = {
	ALG_show_ethnic_data = {
		icon = GFX_decisions_religion_government_button
		visible = { has_country_flag = ALG_ethnic_data_initialized }
		available = { always = yes }
		days_remove = 0

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_show_ethnic_data"
			custom_effect_tooltip = ALG_ethnic_overview_full_tt
		}

		ai_will_do = { base = 0 }
	}

	ALG_favor_arab_policies = {
		icon = GFX_decision_generic_political_discourse
		visible = { has_country_flag = ALG_ethnic_data_initialized }

		available = {
			has_political_power > 50
			NOT = { has_country_flag = ALG_recent_ethnic_policy }
		}

		cost = 50
		days_remove = 30
		modifier = { political_power_gain = 0.05 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_favor_arab_policies"
			custom_effect_tooltip = ALG_favor_arab_tt
			hidden_effect = {
				add_to_variable = { ALG_arab_satisfaction = 10 }
				add_to_variable = { ALG_arab_favor_counter = 1 }
				subtract_from_variable = { ALG_kabyle_satisfaction = 5 }
				subtract_from_variable = { ALG_chaoui_satisfaction = 3 }
				subtract_from_variable = { ALG_tuareg_satisfaction = 3 }
				subtract_from_variable = { ALG_mozabite_satisfaction = 3 }
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_tuareg_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_mozabite_satisfaction min = 0 max = 100 }
				set_country_flag = { flag = ALG_recent_ethnic_policy days = 60 value = 1 }
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_favor_arab_policies"
			ALG_update_ethnic_modifiers = yes
		}

		ai_will_do = {
			base = 2
			modifier = {
				factor = 2
				check_variable = { ALG_arab_satisfaction < 40 }
			}
			modifier = {
				factor = 0
				OR = {
					check_variable = { ALG_kabyle_satisfaction < 30 }
					check_variable = { ALG_chaoui_satisfaction < 30 }
					check_variable = { ALG_tuareg_satisfaction < 30 }
					check_variable = { ALG_mozabite_satisfaction < 30 }
				}
			}
		}
	}

	ALG_favor_kabyle_policies = {
		icon = GFX_decision_generic_nationalism
		visible = { has_country_flag = ALG_ethnic_data_initialized }

		available = {
			has_political_power > 50
			NOT = { has_country_flag = ALG_recent_ethnic_policy }
		}

		cost = 50
		days_remove = 30
		modifier = { research_speed_factor = 0.02 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_favor_kabyle_policies"
			custom_effect_tooltip = ALG_favor_kabyle_tt
			hidden_effect = {
				add_to_variable = { ALG_kabyle_satisfaction = 10 }
				add_to_variable = { ALG_kabyle_favor_counter = 1 }
				subtract_from_variable = { ALG_arab_satisfaction = 5 }
				subtract_from_variable = { ALG_chaoui_satisfaction = 2 }
				clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
				set_country_flag = { flag = ALG_recent_ethnic_policy days = 60 value = 1 }
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_favor_kabyle_policies"
			ALG_update_ethnic_modifiers = yes
		}

		ai_will_do = {
			base = 5
			modifier = {
				factor = 3
				check_variable = { ALG_kabyle_satisfaction < 40 }
			}
			modifier = {
				factor = 5
				check_variable = { ALG_kabyle_satisfaction < 25 }
			}
			modifier = {
				factor = 10
				check_variable = { ALG_kabyle_satisfaction < 15 }
			}
		}
	}

	ALG_favor_chaoui_policies = {
		icon = GFX_decision_generic_construction
		visible = { has_country_flag = ALG_ethnic_data_initialized }

		available = {
			has_political_power > 50
			NOT = { has_country_flag = ALG_recent_ethnic_policy }
		}

		cost = 50
		days_remove = 30
		modifier = { production_speed_buildings_factor = 0.03 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_favor_chaoui_policies"
			custom_effect_tooltip = ALG_favor_chaoui_tt
			hidden_effect = {
				add_to_variable = { ALG_chaoui_satisfaction = 10 }
				add_to_variable = { ALG_chaoui_favor_counter = 1 }
				subtract_from_variable = { ALG_arab_satisfaction = 3 }
				subtract_from_variable = { ALG_kabyle_satisfaction = 2 }
				clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
				set_country_flag = { flag = ALG_recent_ethnic_policy days = 60 value = 1 }
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_favor_chaoui_policies"
			ALG_update_ethnic_modifiers = yes
		}

		ai_will_do = {
			base = 5
			modifier = {
				factor = 3
				check_variable = { ALG_chaoui_satisfaction < 40 }
			}
			modifier = {
				factor = 5
				check_variable = { ALG_chaoui_satisfaction < 25 }
			}
		}
	}

	ALG_favor_tuareg_policies = {
		icon = GFX_decision_generic_military
		visible = { has_country_flag = ALG_ethnic_data_initialized }

		available = {
			has_political_power > 50
			NOT = { has_country_flag = ALG_recent_ethnic_policy }
		}

		cost = 50
		days_remove = 30
		modifier = { army_org_factor = 0.02 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_favor_tuareg_policies"
			custom_effect_tooltip = ALG_favor_tuareg_tt
			hidden_effect = {
				add_to_variable = { ALG_tuareg_satisfaction = 10 }
				add_to_variable = { ALG_tuareg_favor_counter = 1 }
				subtract_from_variable = { ALG_arab_satisfaction = 3 }
				clamp_variable = { var = ALG_tuareg_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				set_country_flag = { flag = ALG_recent_ethnic_policy days = 60 value = 1 }
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_favor_tuareg_policies"
			ALG_update_ethnic_modifiers = yes
		}

		ai_will_do = {
			base = 5
			modifier = {
				factor = 3
				check_variable = { ALG_tuareg_satisfaction < 40 }
			}
			modifier = {
				factor = 5
				check_variable = { ALG_tuareg_satisfaction < 25 }
			}
			modifier = {
				factor = 10
				check_variable = { ALG_tuareg_satisfaction < 15 }
			}
		}
	}

	ALG_favor_mozabite_policies = {
		icon = GFX_decision_generic_industry
		visible = { has_country_flag = ALG_ethnic_data_initialized }

		available = {
			has_political_power > 50
			NOT = { has_country_flag = ALG_recent_ethnic_policy }
		}

		cost = 50
		days_remove = 30
		modifier = { consumer_goods_factor = -0.02 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_favor_mozabite_policies"
			custom_effect_tooltip = ALG_favor_mozabite_tt
			hidden_effect = {
				add_to_variable = { ALG_mozabite_satisfaction = 10 }
				add_to_variable = { ALG_mozabite_favor_counter = 1 }
				subtract_from_variable = { ALG_arab_satisfaction = 2 }
				clamp_variable = { var = ALG_mozabite_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				set_country_flag = { flag = ALG_recent_ethnic_policy days = 60 value = 1 }
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_favor_mozabite_policies"
			ALG_update_ethnic_modifiers = yes
		}

		ai_will_do = {
			base = 5
			modifier = {
				factor = 3
				check_variable = { ALG_mozabite_satisfaction < 40 }
			}
			modifier = {
				factor = 5
				check_variable = { ALG_mozabite_satisfaction < 25 }
			}
		}
	}

	ALG_national_unity_initiative = {
		icon = GFX_decision_generic_form_nation
		visible = { has_country_flag = ALG_ethnic_data_initialized }

		available = {
			has_political_power > 100
			NOT = { has_country_flag = ALG_recent_unity_policy }
		}

		cost = 100
		days_remove = 90

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_national_unity_initiative"
			custom_effect_tooltip = ALG_unity_policy_tt
			hidden_effect = {
				add_to_variable = { ALG_arab_satisfaction = 5 }
				add_to_variable = { ALG_kabyle_satisfaction = 5 }
				add_to_variable = { ALG_chaoui_satisfaction = 5 }
				add_to_variable = { ALG_tuareg_satisfaction = 5 }
				add_to_variable = { ALG_mozabite_satisfaction = 5 }
				add_to_variable = { ALG_arab_favor_counter = 1 }
				add_to_variable = { ALG_kabyle_favor_counter = 1 }
				add_to_variable = { ALG_chaoui_favor_counter = 1 }
				add_to_variable = { ALG_tuareg_favor_counter = 1 }
				add_to_variable = { ALG_mozabite_favor_counter = 1 }
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_tuareg_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_mozabite_satisfaction min = 0 max = 100 }
				set_country_flag = { flag = ALG_recent_unity_policy days = 180 value = 1 }
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_national_unity_initiative"
			ALG_update_ethnic_modifiers = yes
			add_stability = 0.03
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 4
				OR = {
					check_variable = { ALG_kabyle_satisfaction < 30 }
					check_variable = { ALG_chaoui_satisfaction < 30 }
					check_variable = { ALG_tuareg_satisfaction < 30 }
					check_variable = { ALG_mozabite_satisfaction < 30 }
				}
			}
		}
	}

	ALG_conduct_national_census = {
		fixed_random_seed = no
		icon = GFX_decision_generic_independence

		available = {
			has_country_flag = ALG_ethnic_data_initialized
			has_political_power > 75
		}

		visible = {
			has_country_flag = ALG_ethnic_data_initialized
			NOT = { has_country_flag = ALG_census_conducted }
		}

		cost = 75
		days_remove = 60
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_conduct_national_census"
			custom_effect_tooltip = ALG_census_tt
			hidden_effect = {
				set_country_flag = ALG_census_conducted
				random_list = {
					30 = {
						add_to_variable = { ALG_ethnic_kabyle = 1 }
						subtract_from_variable = { ALG_ethnic_arab = 1 }
						add_to_variable = { ALG_kabyle_satisfaction = 5 }
					}
					30 = {
						add_to_variable = { ALG_ethnic_chaoui = 1 }
						subtract_from_variable = { ALG_ethnic_other = 0.5 }
						subtract_from_variable = { ALG_ethnic_arab = 0.5 }
						add_to_variable = { ALG_chaoui_satisfaction = 5 }
					}
					20 = {
						add_to_variable = { ALG_ethnic_tuareg = 0.5 }
						subtract_from_variable = { ALG_ethnic_other = 0.5 }
						add_to_variable = { ALG_tuareg_satisfaction = 5 }
					}
					20 = { }
				}
				country_event = { id = ALG_ethnic_data.2 days = 5 }
			}
		}

		ai_will_do = { base = 0.5 }
	}

	ALG_suppress_ethnic_unrest = {
		icon = GFX_decision_generic_ignite_civil_war

		visible = {
			has_country_flag = ALG_ethnic_data_initialized
			OR = {
				check_variable = { ALG_arab_satisfaction < 25 }
				check_variable = { ALG_kabyle_satisfaction < 25 }
				check_variable = { ALG_tuareg_satisfaction < 25 }
				check_variable = { ALG_chaoui_satisfaction < 25 }
				check_variable = { ALG_mozabite_satisfaction < 25 }
			}
		}

		available = {
			has_political_power > 75
			NOT = { has_country_flag = ALG_recent_suppression }
		}

		cost = 75
		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_suppress_ethnic_unrest"
			custom_effect_tooltip = ALG_suppress_unrest_tt
			add_stability = -0.05
			add_war_support = -0.03
			hidden_effect = {
				if = {
					limit = { check_variable = { ALG_arab_satisfaction < 25 } }
					add_to_variable = { ALG_arab_satisfaction = 15 }
				}
				if = {
					limit = { check_variable = { ALG_kabyle_satisfaction < 25 } }
					add_to_variable = { ALG_kabyle_satisfaction = 15 }
				}
				if = {
					limit = { check_variable = { ALG_tuareg_satisfaction < 25 } }
					add_to_variable = { ALG_tuareg_satisfaction = 15 }
				}
				if = {
					limit = { check_variable = { ALG_chaoui_satisfaction < 25 } }
					add_to_variable = { ALG_chaoui_satisfaction = 15 }
				}
				if = {
					limit = { check_variable = { ALG_mozabite_satisfaction < 25 } }
					add_to_variable = { ALG_mozabite_satisfaction = 15 }
				}
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_tuareg_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_mozabite_satisfaction min = 0 max = 100 }
				set_country_flag = { flag = ALG_recent_suppression days = 120 value = 1 }
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_suppress_ethnic_unrest"
			ALG_update_ethnic_modifiers = yes
		}

		ai_will_do = { base = 0.8 }
	}

	ALG_recognize_tamazight_1 = {
		icon = GFX_decision_generic_nationalism

		visible = {
			has_country_flag = ALG_ethnic_data_initialized
			NOT = { has_country_flag = ALG_tamazight_recognized }
		}

		available = {
			has_political_power > 150
			date > 2002.1.1
		}

		cost = 150
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_recognize_tamazight_1"
			custom_effect_tooltip = ALG_recognize_tamazight_tt
			add_stability = 0.05
			hidden_effect = {
				add_to_variable = { ALG_kabyle_satisfaction = 20 }
				add_to_variable = { ALG_chaoui_satisfaction = 15 }
				add_to_variable = { ALG_tuareg_satisfaction = 10 }
				add_to_variable = { ALG_mozabite_satisfaction = 10 }
				subtract_from_variable = { ALG_arab_satisfaction = 10 }
				clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_tuareg_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_mozabite_satisfaction min = 0 max = 100 }
				clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
				set_country_flag = ALG_tamazight_recognized
				ALG_update_ethnic_modifiers = yes
			}
		}

		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 2
				check_variable = { ALG_kabyle_satisfaction < 30 }
			}
		}
	}
}

ALG_political_struggle = {
	ALG_boost_reformists = {
		icon = GFX_decision_poland_revoult

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_boosting_reformists }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_boost_reformists"
			custom_effect_tooltip = ALG_boost_reformists_tt
			set_country_flag = { flag = ALG_boosting_reformists days = 90 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.15
			}
			add_popularity = {
				ideology = democratic
				popularity = 0.02
			}
			add_stability = -0.02
		}

		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 2
				has_stability > 0.50
			}
			modifier = {
				factor = 3
				has_completed_focus = ALG_moderate_islamist_talks
			}
			modifier = {
				factor = 0.1
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 2
				power_balance_value = { id = algeria_power_balance value < -0.40 }
			}
			modifier = {
				factor = 3
				power_balance_value = { id = algeria_power_balance value < -0.3 }
			}
			modifier = {
				factor = 0.2
				power_balance_value = { id = algeria_power_balance value > 0.60 }
				NOT = { has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH }
				NOT = { has_global_flag = ALG_ISLAMIST_FOCUS_PATH }
			}
			modifier = {
				factor = 5
				OR = {
					has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH
					has_global_flag = ALG_ISLAMIST_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0.1
				OR = {
					has_global_flag = ALG_LE_POUVOIR_FOCUS_PATH
					has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0
				power_balance_value = { id = algeria_power_balance value > 0.75 }
				has_global_flag = ALG_ISLAMIST_FOCUS_PATH
			}
		}
	}

	ALG_boost_old_guard = {
		icon = GFX_decision_ISR_military_button

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_boosting_old_guard }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_boost_old_guard"
			custom_effect_tooltip = ALG_boost_old_guard_tt
			set_country_flag = { flag = ALG_boosting_old_guard days = 90 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.15
			}
			add_stability = -0.02
			add_war_support = 0.03
			add_popularity = {
				ideology = nationalist
				popularity = 0.02
			}
		}

		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 3
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 2
				has_war_support < 0.40
			}
			modifier = {
				factor = 0.1
				has_completed_focus = ALG_moderate_islamist_talks
			}
			modifier = {
				factor = 2
				power_balance_value = { id = algeria_power_balance value > 0.40 }
			}
			modifier = {
				factor = 0.2
				power_balance_value = { id = algeria_power_balance value < -0.60 }
				NOT = { has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH }
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				date > 2014.1.1
				NOT = { has_global_flag = ALG_LE_POUVOIR_FOCUS_PATH }
				NOT = { has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH }
			}
			modifier = {
				factor = 5
				OR = {
					has_global_flag = ALG_LE_POUVOIR_FOCUS_PATH
					has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0.1
				OR = {
					has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH
					has_global_flag = ALG_ISLAMIST_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0
				power_balance_value = { id = algeria_power_balance value < -0.75 }
				has_global_flag = ALG_LE_POUVOIR_FOCUS_PATH
			}
		}
	}

	ALG_rally_students = {
		icon = GFX_decision_generic_political_rally

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_rallying_students }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 75

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_rally_students"
			custom_effect_tooltip = ALG_rally_students_tt
			set_country_flag = { flag = ALG_rallying_students days = 60 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.08
			}
			add_stability = -0.03
			add_popularity = {
				ideology = democratic
				popularity = 0.01
			}
		}

		ai_will_do = {
			base = 0.3
			modifier = {
				factor = 2
				has_completed_focus = ALG_moderate_islamist_talks
			}
			modifier = {
				factor = 0.1
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 3
				OR = {
					has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH
					has_global_flag = ALG_ISLAMIST_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0.2
				power_balance_value = { id = algeria_power_balance value > 0.60 }
				NOT = { has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH }
			}
			modifier = {
				factor = 0
				power_balance_value = { id = algeria_power_balance value > 0.75 }
				has_global_flag = ALG_ISLAMIST_FOCUS_PATH
			}
		}
	}

	ALG_mobilize_veterans = {
		icon = GFX_decision_generic_army_support

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_mobilizing_veterans }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 75

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_mobilize_veterans"
			custom_effect_tooltip = ALG_mobilize_veterans_tt
			set_country_flag = { flag = ALG_mobilizing_veterans days = 60 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.08
			}
			add_stability = -0.02
			add_war_support = 0.05
			add_popularity = {
				ideology = nationalist
				popularity = 0.01
			}
		}

		ai_will_do = {
			base = 0.3
			modifier = {
				factor = 2
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 0.1
				has_completed_focus = ALG_moderate_islamist_talks
			}
			modifier = {
				factor = 3
				OR = {
					has_global_flag = ALG_LE_POUVOIR_FOCUS_PATH
					has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0.2
				power_balance_value = { id = algeria_power_balance value < -0.60 }
				NOT = { has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH }
			}
		}
	}

	ALG_bribe_elites = {
		icon = GFX_decision_money_dec

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_bribing_elites }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 150

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_bribe_elites"
			custom_effect_tooltip = ALG_bribe_elites_tt
			set_country_flag = { flag = ALG_bribing_elites days = 120 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.05
			}
			add_stability = 0.02
			set_temp_variable = { treasury_change = -30 }
			modify_treasury_effect = yes
			if = {
				limit = { NOT = { has_idea = corruption_level_08 } }
				add_timed_idea = {
					idea = ALG_elite_patronage
					days = 180
				}
			}
		}

		ai_will_do = {
			base = 0.2
			modifier = {
				factor = 3
				has_stability < 0.35
			}
			modifier = {
				factor = 2
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 0.2
				power_balance_value = { id = algeria_power_balance value < -0.60 }
				NOT = { has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH }
			}
			modifier = {
				factor = 0.1
				OR = {
					has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH
					has_global_flag = ALG_ISLAMIST_FOCUS_PATH
				}
			}
		}
	}

	ALG_support_mujahideen = {
		icon = GFX_decision_generic_civil_support

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_supporting_mujahideen }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 75

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_support_mujahideen"
			set_country_flag = { flag = ALG_supporting_mujahideen days = 120 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.07
			}
			add_stability = 0.03
			add_war_support = 0.02
			add_popularity = {
				ideology = nationalist
				popularity = 0.015
			}
			add_to_variable = { deep_state_power = 1 }
			custom_effect_tooltip = deep_state_power_increased_1_tt
		}

		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 2
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 2
				power_balance_value = { id = algeria_power_balance value > 0.30 }
			}
			modifier = {
				factor = 0.2
				power_balance_value = { id = algeria_power_balance value < -0.60 }
				NOT = { has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH }
			}
			modifier = {
				factor = 0.1
				OR = {
					has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH
					has_global_flag = ALG_ISLAMIST_FOCUS_PATH
				}
			}
		}
	}

	ALG_seek_compromise = {
		fixed_random_seed = no
		icon = GFX_decisions_war_campaign_button

		available = {
			has_political_power > 100
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_seeking_compromise }
			# Only available when not at extremes
			power_balance_value = { id = algeria_power_balance value > -0.60 }
			power_balance_value = { id = algeria_power_balance value < 0.60 }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 75

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_seek_compromise"
			custom_effect_tooltip = ALG_compromise_tt
			set_country_flag = { flag = ALG_seeking_compromise days = 180 value = 1 }
			add_stability = 0.05
			add_political_power = 25
			# Move toward center
			if = {
				limit = {
					power_balance_value = { id = algeria_power_balance value > 0.10 }
				}
				add_power_balance_value = {
					id = algeria_power_balance
					value = -0.08
				}
			}
			else_if = {
				limit = {
					power_balance_value = { id = algeria_power_balance value < -0.10 }
				}
				add_power_balance_value = {
					id = algeria_power_balance
					value = 0.08
				}
			}
			random = {
				chance = 50
				country_event = { id = alg_politics.10 days = 7 }
			}
		}

		ai_will_do = {
			base = 0.6
			modifier = {
				factor = 2
				has_stability < 0.40
			}
			modifier = {
				factor = 0.5
				OR = {
					has_country_flag = ALG_crackdown_path
					has_completed_focus = ALG_moderate_islamist_talks
				}
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				date > 2014.1.1
			}
		}
	}

	ALG_media_campaign_reform = {
		icon = GFX_decision_milocevic_tv_button

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_running_media_campaign }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_media_campaign_reform"
			custom_effect_tooltip = ALG_media_campaign_reform_tt
			set_country_flag = { flag = ALG_running_media_campaign days = 45 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.05
			}
			add_war_support = -0.01
		}

		ai_will_do = {
			base = 0.4
			modifier = {
				factor = 2
				has_completed_focus = ALG_moderate_islamist_talks
			}
		}
	}

	ALG_security_crackdown = {
		icon = GFX_decision_generic_military

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_running_security_crackdown }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_security_crackdown"
			custom_effect_tooltip = ALG_security_crackdown_tt
			set_country_flag = { flag = ALG_running_security_crackdown days = 45 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.05
			}
			add_stability = -0.01
			add_war_support = 0.02
		}

		ai_will_do = {
			base = 0.4
			modifier = {
				factor = 2
				has_country_flag = ALG_crackdown_path
			}
		}
	}

	ALG_world_tension_security = {
		icon = GFX_decision_generic_scorched_earth

		available = {
			has_power_balance = { id = algeria_power_balance }
			threat > 0.20
			NOT = { has_country_flag = ALG_reacting_world_tension }
		}

		visible = {
			has_power_balance = { id = algeria_power_balance }
			threat > 0.15
		}

		cost = 50
		days_remove = 180

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_world_tension_security"
			custom_effect_tooltip = ALG_world_tension_security_tt
			set_country_flag = { flag = ALG_reacting_world_tension days = 180 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.08
			}
			add_war_support = 0.03
		}

		modifier = { training_time_factor = -0.2 }

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_world_tension_security"
			custom_effect_tooltip = ALG_world_tension_security_ended_tt
		}

		ai_will_do = { base = 8 }
	}

	ALG_world_tension_high_security = {
		icon = GFX_decision_generic_guerilla_base

		available = {
			has_power_balance = { id = algeria_power_balance }
			threat > 0.40
			NOT = { has_country_flag = ALG_reacting_world_tension_high }
		}

		visible = {
			has_power_balance = { id = algeria_power_balance }
			threat > 0.35
		}

		cost = 50
		days_remove = 180

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_world_tension_high_security"
			custom_effect_tooltip = ALG_world_tension_high_security_tt
			set_country_flag = { flag = ALG_reacting_world_tension_high days = 180 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.12
			}
			add_war_support = 0.05
		}

		modifier = { training_time_factor = -0.3 }

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_world_tension_high_security"
			custom_effect_tooltip = ALG_world_tension_high_security_ended_tt
		}

		ai_will_do = { base = 10 }
	}

	ALG_path_crackdown_momentum = {
		icon = GFX_decision_ISR_military_button

		available = {
			has_country_flag = ALG_crackdown_path
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_crackdown_momentum_active }
		}

		visible = { has_country_flag = ALG_crackdown_path }
		cost = 50
		days_remove = 120

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_path_crackdown_momentum"
			custom_effect_tooltip = ALG_crackdown_momentum_tt
			set_country_flag = { flag = ALG_crackdown_momentum_active days = 120 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.10
			}
			add_stability = -0.02
		}

		modifier = {
			personnel_cost_multiplier_modifier = 0.05
			army_org_factor = -0.10
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_path_crackdown_momentum"
			custom_effect_tooltip = ALG_crackdown_momentum_ended_tt
		}

		ai_will_do = { base = 6 }
	}

	ALG_path_reconciliation_momentum = {
		icon = GFX_decision_poland_revoult

		available = {
			has_completed_focus = ALG_moderate_islamist_talks
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_reconciliation_momentum_active }
		}

		visible = { has_completed_focus = ALG_moderate_islamist_talks }
		cost = 50
		days_remove = 120

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_path_reconciliation_momentum"
			custom_effect_tooltip = ALG_reconciliation_momentum_tt
			set_country_flag = { flag = ALG_reconciliation_momentum_active days = 120 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.10
			}
			add_stability = 0.02
		}

		modifier = {
			tax_gain_multiplier_modifier = -0.1
			social_cost_multiplier_modifier = 0.1
			health_cost_multiplier_modifier = 0.1
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_path_reconciliation_momentum"
			custom_effect_tooltip = ALG_reconciliation_momentum_ended_tt
		}

		ai_will_do = { base = 6 }
	}

	# --- ECONOMIC DECISIONS ---
	ALG_oil_patronage = {
		icon = GFX_decision_cuba_oil_button

		available = {
			has_power_balance = { id = algeria_power_balance }
			has_resources_in_country = { resource = oil amount > 30 }
			NOT = { has_country_flag = ALG_using_oil_patronage }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 75

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_oil_patronage"
			custom_effect_tooltip = ALG_oil_patronage_tt
			set_country_flag = { flag = ALG_using_oil_patronage days = 180 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.06
			}
			add_stability = 0.03
			set_temp_variable = { treasury_change = -25 }
			modify_treasury_effect = yes
			381 = { add_resource = { type = oil amount = 3 } }
		}

		ai_will_do = {
			base = 5
			modifier = {
				factor = 2
				has_stability < 0.40
			}
		}
	}

	ALG_economic_reforms = {
		icon = GFX_decision_sov_growth_economic_button

		available = {
			has_power_balance = { id = algeria_power_balance }
			NOT = { has_country_flag = ALG_implementing_economic_reforms }
		}

		visible = { has_power_balance = { id = algeria_power_balance } }
		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_economic_reforms"
			custom_effect_tooltip = ALG_economic_reforms_tt
			set_country_flag = { flag = ALG_implementing_economic_reforms days = 240 value = 1 }
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.08
			}
			add_stability = 0.02
			random_owned_state = {
				set_temp_variable = { temp_productivity_change = 0.025 }
				state_flat_productivity_change_effect = yes
			}
		}

		ai_will_do = {
			base = 4
			modifier = {
				factor = 2
				has_completed_focus = ALG_moderate_islamist_talks
			}
		}
	}
}

ALG_cabinet_category = {
	### CABINET OVERVIEW ###
	ALG_review_cabinet = {
		icon = GFX_decisions_governorates_4
		available = { has_political_power > 10 }
		visible = { always = yes }
		cost = 10

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_review_cabinet"
			custom_effect_tooltip = ALG_cabinet_overview_tt
			country_event = alg_cabinet.1
		}

		ai_will_do = { base = 0 }
	}

	### PRIME MINISTER ###
	ALG_replace_prime_minister = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 75
			NOT = { has_country_flag = recent_pm_change }
		}

		visible = { always = yes }
		cost = 75

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_prime_minister"
			custom_effect_tooltip = ALG_replace_pm_tt
			country_event = alg_cabinet.10
			set_country_flag = { flag = recent_pm_change days = 180 value = 1 }
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 5
				check_variable = { ALG_pm_loyalty < 40 }
			}
			modifier = {
				factor = 0
				check_variable = { ALG_pm_loyalty > 70 }
			}
		}
	}

	### MINISTER OF DEFENSE ###
	ALG_replace_defense_minister = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 100
			NOT = { has_country_flag = recent_mod_change }
			custom_trigger_tooltip = {
				tooltip = ALG_replace_defense_minister_condition_tt
				OR = {
					check_variable = { deep_state_power < 15 }
					check_variable = { ALG_mod_loyalty < 30 }
					has_idea = ALG_state_of_emergency
				}
			}
		}

		visible = { always = yes }
		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_defense_minister"
			custom_effect_tooltip = ALG_replace_mod_tt
			if = {
				limit = { check_variable = { ALG_mod_deep_state > 70 } }
				custom_effect_tooltip = ALG_mod_deep_state_warning_tt
			}
			country_event = alg_cabinet.20
			set_country_flag = { flag = recent_mod_change days = 365 value = 1 }
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 0
				check_variable = { deep_state_power > 20 }
			}
		}
	}

	### MINISTER OF INTERIOR ###
	ALG_replace_interior_minister = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 50
			NOT = { has_country_flag = recent_moi_change }
		}

		visible = { always = yes }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_interior_minister"
			custom_effect_tooltip = ALG_replace_moi_tt
			country_event = alg_cabinet.30
			set_country_flag = { flag = recent_moi_change days = 180 value = 1 }
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				check_variable = { ALG_moi_competence < 40 }
			}
		}
	}

	### MINISTER OF FOREIGN AFFAIRS ###
	ALG_replace_foreign_minister = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 50
			NOT = { has_country_flag = recent_mofa_change }
		}

		visible = { always = yes }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_foreign_minister"
			custom_effect_tooltip = ALG_replace_mofa_tt
			country_event = alg_cabinet.40
			set_country_flag = { flag = recent_mofa_change days = 180 value = 1 }
		}

		ai_will_do = { base = 1 }
	}

	### MINISTER OF FINANCE ###
	ALG_replace_finance_minister = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 50
			NOT = { has_country_flag = recent_mof_change }
		}

		visible = { always = yes }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_finance_minister"
			custom_effect_tooltip = ALG_replace_mof_tt
			country_event = alg_cabinet.50
			set_country_flag = { flag = recent_mof_change days = 180 value = 1 }
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				check_variable = { ALG_mof_competence < 50 }
			}
		}
	}

	### MINISTER OF ENERGY ###
	ALG_replace_energy_minister = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 50
			NOT = { has_country_flag = recent_moe_change }
		}

		visible = { always = yes }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_energy_minister"
			custom_effect_tooltip = ALG_replace_moe_tt
			country_event = alg_cabinet.60
			set_country_flag = { flag = recent_moe_change days = 180 value = 1 }
		}

		ai_will_do = { base = 1 }
	}

	### MINISTER OF JUSTICE ###
	ALG_replace_justice_minister = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 50
			NOT = { has_country_flag = recent_moj_change }
		}

		visible = { always = yes }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_justice_minister"
			custom_effect_tooltip = ALG_replace_moj_tt
			country_event = alg_cabinet.70
			set_country_flag = { flag = recent_moj_change days = 180 value = 1 }
		}

		ai_will_do = { base = 1 }
	}

	### INTELLIGENCE CHIEF ###
	ALG_replace_intelligence_chief = {
		icon = GFX_decision_syr_govern_button

		available = {
			has_political_power > 150
			NOT = { has_country_flag = recent_drs_change }
			custom_trigger_tooltip = {
				tooltip = ALG_replace_intelligence_chief_condition_tt
				OR = {
					check_variable = { deep_state_power < 10 }
					check_variable = { ALG_drs_loyalty < 20 }
					has_idea = ALG_state_of_emergency
				}
			}
		}

		visible = { always = yes }
		cost = 150

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_replace_intelligence_chief"
			custom_effect_tooltip = ALG_replace_drs_tt
			if = {
				limit = { check_variable = { ALG_drs_deep_state > 80 } }
				custom_effect_tooltip = ALG_drs_deep_state_warning_tt
			}
			country_event = alg_cabinet.80
			set_country_flag = { flag = recent_drs_change days = 365 value = 1 }
		}

		ai_will_do = {
			base = 0
			modifier = {
				add = 10
				check_variable = { ALG_drs_loyalty < 20 }
			}
		}
	}

	### CABINET ACTIONS ###
	ALG_cabinet_reshuffle = {
		icon = GFX_recogn_nationalboost_button

		available = {
			has_political_power > 200
			NOT = { has_country_flag = recent_reshuffle }
		}

		visible = { always = yes }
		cost = 200
		days_remove = 30
		modifier = { political_power_factor = -0.25 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_cabinet_reshuffle"
			custom_effect_tooltip = ALG_reshuffle_started_tt
			set_country_flag = { flag = recent_reshuffle days = 365 value = 1 }
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_cabinet_reshuffle"
			country_event = alg_cabinet.100
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 5
				check_variable = { ALG_cabinet_loyalty < 50 }
			}
		}
	}

	ALG_demand_cabinet_loyalty = {
		icon = GFX_decision_nationalist_button

		available = {
			has_political_power > 50
			custom_trigger_tooltip = {
				tooltip = ALG_demand_cabinet_loyalty_tt
				NOT = { has_country_flag = recent_loyalty_demand }
				check_variable = { ALG_cabinet_loyalty < 70 }
			}
		}

		visible = { check_variable = { ALG_cabinet_loyalty < 80 } }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_demand_cabinet_loyalty"
			custom_effect_tooltip = ALG_demand_loyalty_tt
			set_country_flag = { flag = recent_loyalty_demand days = 90 value = 1 }
			country_event = alg_cabinet.110
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				check_variable = { ALG_cabinet_loyalty < 50 }
			}
		}
	}

	ALG_reward_cabinet = {
		icon = GFX_decision_nationalist_button

		available = {
			has_political_power > 100
			NOT = { has_country_flag = recent_cabinet_reward }
		}

		visible = { always = yes }
		cost = 100

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_reward_cabinet"
			custom_effect_tooltip = ALG_reward_cabinet_tt
			set_country_flag = { flag = recent_cabinet_reward days = 180 value = 1 }
			ALG_increase_all_loyalty = yes
			custom_effect_tooltip = ALG_cabinet_loyalty_increased_tt
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				check_variable = { ALG_cabinet_loyalty < 60 }
			}
		}
	}

	ALG_anti_corruption_drive = {
		icon = GFX_decision_generic_political_discourse

		available = {
			has_political_power > 100
			custom_trigger_tooltip = {
				tooltip = ALG_anti_corruption_drive_tt
				NOT = { has_country_flag = recent_anti_corruption }
				check_variable = { ALG_cabinet_deep_state_influence > 40 }
			}
		}

		visible = { check_variable = { ALG_cabinet_deep_state_influence > 30 } }
		cost = 100
		days_remove = 60
		modifier = { stability_weekly = -0.002 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_anti_corruption_drive"
			custom_effect_tooltip = ALG_anti_corruption_started_tt
			set_country_flag = { flag = recent_anti_corruption days = 365 value = 1 }
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_anti_corruption_drive"
			custom_effect_tooltip = ALG_anti_corruption_complete_tt
			ALG_reduce_deep_state_influence_cabinet = yes
			add_stability = 0.03
			add_to_variable = { deep_state_power = 2 }
			custom_effect_tooltip = deep_state_power_increased_2_tt
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				check_variable = { ALG_cabinet_deep_state_influence > 60 }
			}
		}
	}

	ALG_strengthen_pm_authority = {
		icon = GFX_decision_anti_sheriff_button

		available = {
			has_political_power > 75
			custom_trigger_tooltip = {
				tooltip = ALG_strengthen_pm_authority_tt
				NOT = { has_country_flag = recent_pm_authority }
				check_variable = { ALG_pm_competence > 50 }
			}
		}

		visible = { always = yes }
		cost = 75

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_strengthen_pm_authority"
			custom_effect_tooltip = ALG_strengthen_pm_tt
			set_country_flag = { flag = recent_pm_authority days = 180 value = 1 }
			add_to_variable = { ALG_pm_loyalty = 10 }
			add_to_variable = { ALG_pm_competence = 5 }
			clamp_variable = { var = ALG_pm_loyalty min = 0 max = 100 }
			clamp_variable = { var = ALG_pm_competence min = 0 max = 100 }
			ALG_calculate_cabinet_stats = yes
			add_political_power = 25
		}

		ai_will_do = { base = 1 }
	}
}
ALG_deep_state_category = {
	ALG_assess_deep_state = {
		icon = GFX_decision_generic_intelligence_operation
		available = { has_political_power > 25 }
		visible = { has_variable = deep_state_power }
		cost = 25
		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_assess_deep_state"
			custom_effect_tooltip = deep_state_assessing_tt
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_assess_deep_state"
			custom_effect_tooltip = deep_state_level_revealed_tt
			# Show different warnings based on level
			if = {
				limit = { check_variable = { deep_state_power < 6 } }
				custom_effect_tooltip = deep_state_warning_low_tt
			}
			else_if = {
				limit = { check_variable = { deep_state_power < 11 } }
				custom_effect_tooltip = deep_state_warning_moderate_tt
			}
			else_if = {
				limit = { check_variable = { deep_state_power < 16 } }
				custom_effect_tooltip = deep_state_warning_medium_tt
			}
			else_if = {
				limit = { check_variable = { deep_state_power < 21 } }
				custom_effect_tooltip = deep_state_warning_high_tt
			}
			else_if = {
				limit = { check_variable = { deep_state_power < 28 } }
				custom_effect_tooltip = deep_state_warning_critical_tt
			}
			else = {
				custom_effect_tooltip = deep_state_warning_coup_imminent_tt
			}
		}

		ai_will_do = { base = 1 }
	}

	ALG_reduce_deep_state = {
		fixed_random_seed = no
		icon = GFX_decision_eng_propaganda_campaigns

		available = {
			has_political_power > 100
			custom_trigger_tooltip = {
				tooltip = ALG_reduce_deep_state_tt
				check_variable = { deep_state_power > 5 }
			}
		}

		visible = { has_variable = deep_state_power }
		cost = 100
		days_remove = 60
		modifier = { stability_weekly = -0.002 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_reduce_deep_state"
			custom_effect_tooltip = deep_state_reduction_started_tt
			custom_effect_tooltip = deep_state_expect_resistance_tt
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_reduce_deep_state"
			custom_effect_tooltip = deep_state_power_decreased_5_tt
			custom_effect_tooltip = deep_state_civilian_gains_tt
			add_to_variable = { deep_state_power = -5 }
			clamp_variable = {
				var = deep_state_power
				min = 0
				max = 30
			}
			add_stability = -0.04
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.08
			}
			# Chance of backlash at high power
			if = {
				limit = { check_variable = { deep_state_power > 15 } }
				random_list = {
					70 = { custom_effect_tooltip = deep_state_reduction_success_tt }
					30 = {
						custom_effect_tooltip = deep_state_reduction_backlash_tt
						add_to_variable = { deep_state_power = 2 }
						add_stability = -0.03
					}
				}
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 5
				check_variable = { deep_state_power > 20 }
			}
		}
	}

	ALG_purge_military_command = {
		icon = GFX_decision_generic_army_support

		available = {
			has_political_power > 200
			custom_trigger_tooltip = {
				tooltip = ALG_purge_military_command_tt
				check_variable = { deep_state_power > 15 }
				NOT = { has_country_flag = recent_purge }
			}
		}

		visible = { check_variable = { deep_state_power > 10 } }
		cost = 200
		days_remove = 90

		modifier = {
			army_org_factor = -0.10
			stability_weekly = -0.005
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_purge_military_command"
			custom_effect_tooltip = deep_state_purge_started_tt
			custom_effect_tooltip = deep_state_army_disruption_tt
			set_country_flag = { flag = recent_purge days = 365 value = 1 }
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_purge_military_command"
			custom_effect_tooltip = deep_state_power_decreased_10_tt
			custom_effect_tooltip = deep_state_purge_complete_tt
			add_to_variable = { deep_state_power = -10 }
			clamp_variable = {
				var = deep_state_power
				min = 0
				max = 30
			}
			add_stability = -0.10
			army_experience = -50
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.15
			}
			# Clear stage flags to allow re-triggering events
			if = {
				limit = { check_variable = { deep_state_power < 21 } }
				clr_country_flag = deep_state_stage_4
			}
			if = {
				limit = { check_variable = { deep_state_power < 16 } }
				clr_country_flag = deep_state_stage_3
			}
			if = {
				limit = { check_variable = { deep_state_power < 11 } }
				clr_country_flag = deep_state_stage_2
			}
		}

		ai_will_do = {
			base = 0
			modifier = {
				add = 10
				check_variable = { deep_state_power > 25 }
			}
		}
	}

	ALG_cooperate_with_military = {
		icon = GFX_decision_generic_army_support_new

		available = {
			has_political_power > 50
			# Don't cooperate if already at critical levels
			custom_trigger_tooltip = {
				tooltip = ALG_cooperate_with_military_tt
				check_variable = { deep_state_power < 25 }
			}
		}

		visible = { has_variable = deep_state_power }
		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_cooperate_with_military"
			custom_effect_tooltip = deep_state_power_increased_3_tt
			custom_effect_tooltip = deep_state_cooperation_tt
			custom_effect_tooltip = deep_state_stability_boost_tt
			add_to_variable = { deep_state_power = 3 }
			clamp_variable = {
				var = deep_state_power
				min = 0
				max = 30
			}
			add_stability = 0.03
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.05
			}
			# Warning if approaching danger zone
			if = {
				limit = { check_variable = { deep_state_power > 18 } }
				custom_effect_tooltip = deep_state_cooperation_warning_tt
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 0
				check_variable = { deep_state_power > 15 }
			}
		}
	}

	ALG_reform_intelligence_services = {
		icon = GFX_decision_hol_exchange_intelligence_data

		available = {
			has_political_power > 150
			custom_trigger_tooltip = {
				tooltip = ALG_reform_intelligence_services_tt
				check_variable = { deep_state_power > 10 }
				NOT = { has_country_flag = recent_intel_reform }
			}
		}

		visible = { check_variable = { deep_state_power > 5 } }
		cost = 150
		days_remove = 120
		modifier = { political_power_factor = -0.10 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_reform_intelligence_services"
			custom_effect_tooltip = deep_state_intel_reform_started_tt
			custom_effect_tooltip = deep_state_expect_pushback_tt
			set_country_flag = { flag = recent_intel_reform days = 180 value = 1 }
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_reform_intelligence_services"
			custom_effect_tooltip = deep_state_power_decreased_7_tt
			custom_effect_tooltip = deep_state_intel_reformed_tt
			add_to_variable = { deep_state_power = -7 }
			clamp_variable = {
				var = deep_state_power
				min = 0
				max = 30
			}
			add_stability = -0.05
			if = {
				limit = { has_idea = ALG_surveillance_state_1 }
				remove_ideas = ALG_surveillance_state_1
				custom_effect_tooltip = deep_state_surveillance_removed_tt
			}
			add_power_balance_value = {
				id = algeria_power_balance
				value = 0.10
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				check_variable = { deep_state_power > 18 }
			}
		}
	}

	ALG_appoint_loyal_officers = {
		icon = GFX_decision_civil_support

		available = {
			has_political_power > 75
			has_army_experience > 25
			NOT = { has_country_flag = recent_officer_appointments }
		}

		visible = { has_variable = deep_state_power }
		cost = 75
		days_remove = 45

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_appoint_loyal_officers"
			custom_effect_tooltip = deep_state_loyal_officers_tt
			army_experience = -25
			set_country_flag = { flag = recent_officer_appointments days = 120 value = 1 }
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_appoint_loyal_officers"
			custom_effect_tooltip = deep_state_power_decreased_3_tt
			custom_effect_tooltip = deep_state_loyalists_placed_tt
			add_to_variable = { deep_state_power = -3 }
			clamp_variable = {
				var = deep_state_power
				min = 0
				max = 30
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				check_variable = { deep_state_power > 15 }
			}
		}
	}

	#Emergency Martial Law (if deep state is too powerful)
	ALG_declare_emergency = {
		icon = GFX_decision_emerging_button

		available = {
			has_political_power > 150
			custom_trigger_tooltip = {
				tooltip = ALG_declare_emergency_tt
				check_variable = { deep_state_power > 22 }
			}
			NOT = { has_idea = ALG_state_of_emergency }
		}

		visible = { check_variable = { deep_state_power > 18 } }
		cost = 150

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_declare_emergency"
			custom_effect_tooltip = deep_state_emergency_declared_tt
			custom_effect_tooltip = deep_state_emergency_effect_tt
			add_ideas = ALG_state_of_emergency
			add_stability = -0.08
			add_war_support = 0.05
			# Temporarily freezes deep state growth
			set_country_flag = { flag = deep_state_frozen days = 180 value = 1 }
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 10
				check_variable = { deep_state_power > 26 }
			}
		}
	}

	#Negotiate with Generals
	ALG_negotiate_with_generals = {
		fixed_random_seed = no
		icon = GFX_decision_negotiate_icon

		available = {
			has_political_power > 100
			custom_trigger_tooltip = {
				tooltip = ALG_negotiate_with_generals_tt
				check_variable = { deep_state_power > 15 }
				NOT = { has_country_flag = recent_negotiations }
			}
		}

		visible = { check_variable = { deep_state_power > 12 } }
		cost = 100
		days_remove = 30

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_negotiate_with_generals"
			custom_effect_tooltip = deep_state_negotiation_started_tt
			set_country_flag = { flag = recent_negotiations days = 180 value = 1 }
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_negotiate_with_generals"
			random_list = {
				50 = {
					custom_effect_tooltip = deep_state_negotiation_success_tt
					add_to_variable = { deep_state_power = -4 }
					add_stability = 0.02
				}
				30 = {
					custom_effect_tooltip = deep_state_negotiation_partial_tt
					add_to_variable = { deep_state_power = -2 }
				}
				20 = {
					custom_effect_tooltip = deep_state_negotiation_failed_tt
					add_to_variable = { deep_state_power = 2 }
					add_stability = -0.03
				}
			}
			clamp_variable = {
				var = deep_state_power
				min = 0
				max = 30
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				check_variable = { deep_state_power > 20 }
			}
		}
	}
}

ALG_resistance_challenges_new = {
	ALG_healthcare_reform = {
		icon = GFX_decision_ISR_healthcare_button

		activation = {
			has_country_flag = ALG_resistance_path
			NOT = { has_country_flag = ALG_healthcare_reform_done }
		}

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_healthcare_reform_tt
				check_variable = { ALG_people_grievance < 80 }
			}
			OR = {
				has_idea = health_04
				has_idea = health_05
			}
		}

		fire_only_once = yes
		days_mission_timeout = 180

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_healthcare_reform"
			custom_effect_tooltip = ALG_healthcare_success_tt
			add_to_variable = { var = ALG_people_grievance value = -5 tooltip = ALG_people_grievance_factor_tt }
			add_to_variable = { var = ALG_army_influence value = -3 tooltip = ALG_army_influence_factor_tt }
			clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
			clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
			add_stability = 0.05
			set_country_flag = ALG_healthcare_reform_done
			country_event = { id = alg.310 days = 1 }
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_healthcare_reform"
			custom_effect_tooltip = ALG_healthcare_failure_tt
			add_to_variable = { var = ALG_people_grievance value = 5 tooltip = ALG_people_grievance_factor_tt }
			add_to_variable = { var = ALG_army_influence value = 5 tooltip = ALG_army_influence_factor_tt }
			clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
			clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
			add_stability = -0.05
			set_country_flag = ALG_healthcare_reform_done
			country_event = { id = alg.311 days = 1 }
		}
	}

	ALG_education_reform = {
		icon = GFX_decision_ISR_education_button

		activation = {
			has_country_flag = ALG_resistance_path
			NOT = { has_country_flag = ALG_education_reform_done }
		}

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_education_reform_tt
				check_variable = { ALG_people_grievance < 80 }
			}
			OR = {
				has_idea = edu_04
				has_idea = edu_05
			}
		}

		fire_only_once = yes
		days_mission_timeout = 180

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_education_reform"
			custom_effect_tooltip = ALG_education_success_tt
			add_to_variable = { var = ALG_people_grievance value = -5 tooltip = ALG_people_grievance_factor_tt }
			add_to_variable = { var = ALG_army_influence value = -3 tooltip = ALG_army_influence_factor_tt }
			clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
			clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
			add_stability = 0.05
			set_country_flag = ALG_education_reform_done
			country_event = { id = alg.320 days = 1 }
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_education_reform"
			custom_effect_tooltip = ALG_education_failure_tt
			add_to_variable = { var = ALG_people_grievance value = 5 tooltip = ALG_people_grievance_factor_tt }
			add_to_variable = { var = ALG_army_influence value = 5 tooltip = ALG_army_influence_factor_tt }
			clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
			clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
			add_stability = -0.05
			set_country_flag = ALG_education_reform_done
			country_event = { id = alg.321 days = 1 }
		}
	}

	ALG_unemployment_reform = {
		icon = GFX_decision_ISR_welfare_button

		activation = {
			has_country_flag = ALG_resistance_path
			NOT = { has_country_flag = ALG_unemployment_reform_done }
		}

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_unemployment_reform_tt
				check_variable = { ALG_people_grievance < 80 }
			}
			custom_trigger_tooltip = {
				tooltip = ALG_employment_TT
				check_variable = { total_unemployed_percentage_display < 0.2 }
			}
			OR = {
				has_idea = social_04
				has_idea = social_05
			}
		}

		fire_only_once = yes
		days_mission_timeout = 180

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_unemployment_reform"
			custom_effect_tooltip = ALG_unemployment_success_tt
			add_to_variable = { var = ALG_people_grievance value = -10 tooltip = ALG_people_grievance_factor_tt }
			add_to_variable = { var = ALG_army_influence value = -5 tooltip = ALG_army_influence_factor_tt }
			clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
			clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
			add_stability = 0.05
			add_offsite_building = { type = arms_factory level = 1 }
			add_offsite_building = { type = industrial_complex level = 1 }
			set_country_flag = ALG_unemployment_reform_done
			country_event = { id = alg.330 days = 1 }
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_unemployment_reform"
			custom_effect_tooltip = ALG_unemployment_failure_tt
			add_to_variable = { var = ALG_people_grievance value = 10 tooltip = ALG_people_grievance_factor_tt }
			add_to_variable = { var = ALG_army_influence value = 8 tooltip = ALG_army_influence_factor_tt }
			clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
			clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
			add_stability = -0.1
			random_owned_controlled_state = {
				limit = {
					is_core_of = ALG
					has_resistance = yes
				}
				add_resistance = 10
			}
			set_country_flag = ALG_unemployment_reform_done
			country_event = { id = alg.331 days = 1 }
		}
	}
}

# Appease Kabyles
alg_ethnic_policy = {
	alg_appease_kabyles = {
		icon = Kabylie_Flag
		visible = { check_variable = { ALG_kabyle_satisfaction < 80 } }
		cost = 200
		days_remove = 45

		available = {
			has_political_power > 200
			NOT = { has_country_flag = ALG_arabization_hardline } # Can't do both
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete alg_appease_kabyles"
			custom_effect_tooltip = alg_appease_kabyles_tt
			set_temp_variable = { treasury_change = -20 }
			modify_treasury_effect = yes
			add_to_variable = { var = ALG_kabyle_satisfaction value = 10 }
			subtract_from_variable = { var = ALG_arab_satisfaction value = 5 }
			clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
			385 = {
				add_resistance = -5
				add_compliance = 5
			}
			if = {
				limit = { has_completed_focus = ALG_national_reconciliation }
				add_stability = 0.02
			}
			else = {
				add_stability = 0.01
			}
			add_popularity = {
				ideology = nationalist
				popularity = -0.01
			}
			set_country_flag = ALG_kabyle_appeased_recently
			clr_country_flag = { flag = ALG_kabyle_appeased_recently days = 90 }
		}

		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 3
				385 = { resistance > 20 }
			}
			modifier = {
				factor = 2
				has_completed_focus = ALG_national_reconciliation
			}
			modifier = {
				factor = 0.1
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 0
				has_country_flag = ALG_kabyle_appeased_recently
			}
		}
	}

	# Promote Arabization
	alg_promote_arabization = {
		icon = arabic
		visible = { check_variable = { ALG_arab_satisfaction < 80 } }

		available = {
			has_political_power > 150
			NOT = { has_country_flag = ALG_kabyle_autonomy } # Contradictory
		}

		cost = 150
		days_remove = 45

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete alg_promote_arabization"
			custom_effect_tooltip = alg_arabization_tt
			set_temp_variable = { treasury_change = -20 }
			modify_treasury_effect = yes
			add_to_variable = { var = ALG_arab_satisfaction value = 10 }
			subtract_from_variable = { var = ALG_kabyle_satisfaction value = 10 }
			subtract_from_variable = { var = ALG_mozabite_satisfaction value = 5 }
			subtract_from_variable = { var = ALG_chaoui_satisfaction value = 5 }
			subtract_from_variable = { var = ALG_tuareg_satisfaction value = 3 }
			clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_mozabite_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_tuareg_satisfaction min = 0 max = 100 }
			385 = { add_resistance = 5 }
			random_owned_controlled_state = {
				limit = {
					OR = {
						state = 380 # Aurès (Chaoui)
						state = 381 # Southern desert (Tuareg)
					}
				}
				add_resistance = 2
			}
			add_popularity = {
				ideology = nationalist
				popularity = 0.02
			}
			if = {
				limit = { has_country_flag = ALG_crackdown_path }
				add_stability = 0.01
			}
			else = {
				add_stability = -0.01
			}
			if = {
				limit = { has_country_flag = ALG_arabization_pushed_once }
				set_country_flag = ALG_arabization_hardline
			}
			else = {
				set_country_flag = ALG_arabization_pushed_once
			}
			set_country_flag = ALG_arabization_recent
			clr_country_flag = { flag = ALG_arabization_recent days = 90 }
		}

		ai_will_do = {
			base = 0.4
			modifier = {
				factor = 3
				has_country_flag = ALG_crackdown_path
			}
			modifier = {
				factor = 2
				check_variable = { ALG_arab_satisfaction < 40 }
			}
			modifier = {
				factor = 0.1
				has_completed_focus = ALG_national_reconciliation
			}
			modifier = {
				factor = 0
				has_country_flag = ALG_arabization_recent
			}
		}
	}

	# Recognize Tamazight Language
	alg_recognize_tamazight = {
		icon = amazigh
		visible = { NOT = { has_country_flag = ALG_tamazight_recognized } }

		available = {
			has_political_power > 150
			has_stability > 0.40
			NOT = { has_country_flag = ALG_arabization_hardline }
		}

		cost = 150
		days_remove = 60
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete alg_recognize_tamazight"
			custom_effect_tooltip = alg_tamazight_recognition_started_tt
			add_stability = -0.02
			subtract_from_variable = { var = ALG_arab_satisfaction value = 10 }
			clamp_variable = { var = ALG_arab_satisfaction min = 0 max = 100 }
			add_popularity = {
				ideology = nationalist
				popularity = -0.03
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove alg_recognize_tamazight"
			custom_effect_tooltip = alg_tamazight_recognition_complete_tt
			add_political_power = 100
			add_to_variable = { var = ALG_kabyle_satisfaction value = 20 }
			add_to_variable = { var = ALG_chaoui_satisfaction value = 15 }
			add_to_variable = { var = ALG_mozabite_satisfaction value = 10 }
			add_to_variable = { var = ALG_tuareg_satisfaction value = 12 }
			clamp_variable = { var = ALG_kabyle_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_chaoui_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_mozabite_satisfaction min = 0 max = 100 }
			clamp_variable = { var = ALG_tuareg_satisfaction min = 0 max = 100 }
			385 = { add_resistance = -10 }
			every_owned_state = {
				limit = {
					OR = {
						state = 380
						state = 381
						state = 382
					}
				}
				add_resistance = -5
				add_compliance = 3
			}
			if = {
				limit = { has_idea = ALG_kabylia_unrest }
				swap_ideas = {
					remove_idea = ALG_kabylia_unrest
					add_idea = ALG_tamazight_integration_process
				}
			}
			set_country_flag = ALG_tamazight_recognized
			country_event = { id = alg_ethnic.10 days = 90 }
		}

		ai_will_do = {
			base = 0.7
			modifier = {
				factor = 5
				has_completed_focus = ALG_national_reconciliation
			}
			modifier = {
				factor = 3
				385 = { resistance > 25 }
			}
			modifier = {
				factor = 0.1
				has_country_flag = ALG_crackdown_path
			}
		}
	}
}

ALG_resistance_movement = {
	# National Measures
	ALG_throttle_internet_speeds = {
		days_remove = 30
		icon = generic_nationalism
		available = { NOT = { has_country_flag = ALG_doing_decision_y } }
		days_re_enable = 14

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_throttle_internet_speeds"
			set_country_flag = ALG_doing_decision_y
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.05 # Le Pouvoir gains
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_throttle_internet_speeds"
			clr_country_flag = ALG_doing_decision_y
			custom_effect_tooltip = ALG_protester_exhaustion_TT
		}

		modifier = {
			research_speed_factor = -0.15
			stability_weekly = -0.01
		}

		ai_will_do = { base = 100 }
	}

	ALG_nationwide_security_presence = {
		days_remove = 30
		icon = generic_nationalism
		available = { NOT = { has_country_flag = ALG_doing_decision_y } }
		days_re_enable = 14

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_nationwide_security_presence"
			set_country_flag = ALG_doing_decision_y
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.05
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_nationwide_security_presence"
			clr_country_flag = ALG_doing_decision_y
			custom_effect_tooltip = ALG_protester_exhaustion_TT
		}

		modifier = {
			police_cost_multiplier_modifier = 0.10
			stability_weekly = -0.01
		}

		ai_will_do = { base = 100 }
	}

	ALG_fund_pro_government_protests = {
		days_remove = 30
		icon = generic_nationalism
		available = { NOT = { has_country_flag = ALG_doing_decision_y } }
		days_re_enable = 14

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_fund_pro_government_protests"
			set_country_flag = ALG_doing_decision_y
			add_power_balance_value = {
				id = algeria_power_balance
				value = -0.05
			}
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_fund_pro_government_protests"
			clr_country_flag = ALG_doing_decision_y
			custom_effect_tooltip = ALG_protester_exhaustion_TT
		}

		modifier = {
			political_power_gain = -1.00
			stability_weekly = -0.01
		}

		ai_will_do = { base = 100 }
	}

	# Regional Deployments
	# Kabylia
	ALG_deploy_security_kabylia_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 385 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			385 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_kabylia_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_kabylia_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200 # Suppressed
							385 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_kabylia_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 } # Failed
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Mzab
	ALG_deploy_security_mzab_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 379 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			379 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_mzab_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_mzab_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							379 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_mzab_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Aures
	ALG_deploy_security_aures_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 380 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			380 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_aures_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_aures_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							380 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_aures_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Tamanrasset
	ALG_deploy_security_tamanrasset_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 381 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			381 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_tamanrasset_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_tamanrasset_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							381 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_tamanrasset_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Grand Erg Occidental
	ALG_deploy_security_granderg_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 382 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			382 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_granderg_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_granderg_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							382 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_granderg_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Algerian Atlas
	ALG_deploy_security_atlas_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 383 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			383 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_atlas_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_atlas_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							383 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_atlas_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Constantinois
	ALG_deploy_security_constantinois_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 384 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			384 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_constantinois_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_constantinois_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							384 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_constantinois_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Algerois
	ALG_deploy_security_algerois_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 386 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			386 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_algerois_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_algerois_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							386 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_algerois_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}

	# Oranais
	ALG_deploy_security_oranais_1 = {
		fixed_random_seed = no
		days_remove = 14
		on_map_mode = map_only
		icon = generic_nationalism
		cost = 25
		days_re_enable = 14
		highlight_states = { highlight_state_targets = { state = 387 } }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_presidential_decisions_only_one_is_available_TT
				NOT = { has_country_flag = ALG_doing_decision }
			}
			387 = { has_state_flag = ALG_locals_swayed }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_deploy_security_oranais_1"
			set_country_flag = ALG_doing_decision
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_deploy_security_oranais_1"
			clr_country_flag = ALG_doing_decision
			custom_effect_tooltip = ALG_deploys_security_TT
			hidden_effect = {
				if = {
					limit = { check_variable = { the_military_opinion > 60 } }
					random_list = {
						70 = {
							country_event = algerian_events.200
							387 = { clr_state_flag = ALG_locals_swayed }
							ALG_update_hirak_gui_dirty_variable = yes
							set_country_flag = { flag = ALG_oranais_fell_recently value = 1 days = 180 }
						}
						30 = { country_event = algerian_events.2015 }
					}
				}
			}
		}

		ai_will_do = { base = 100 }
	}
}
ALG_resistance_power_struggle = {
	Resistance_support = {
		icon = GFX_decision_infiltrate_state
		cost = 100
		days_remove = 60
		fixed_random_seed = no
		available = { has_country_flag = ALG_resistance_path }

		# custom_effect_tooltip = ALG_power_struggle_status_tt
		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete Resistance_support"
			custom_effect_tooltip = ALG_increase_resistance_tt
			hidden_effect = {
				random_list = {
					50 = {
						add_to_variable = { var = ALG_people_grievance value = 2 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
						add_to_variable = { var = ALG_army_influence value = -2 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
					}
					30 = {
						add_to_variable = { var = ALG_people_grievance value = 3 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
						add_to_variable = { var = ALG_army_influence value = -3 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
					}
					15 = {
						add_to_variable = { var = ALG_people_grievance value = 4 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
						add_to_variable = { var = ALG_army_influence value = -4 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
					}
					5 = {
						add_to_variable = { var = ALG_people_grievance value = 5 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
						add_to_variable = { var = ALG_army_influence value = -5 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
					}
				}
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 10
				OR = {
					has_global_flag = ALG_FIS_UPRISING_FOCUS_PATH
					has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_global_flag = ALG_LE_POUVOIR_FOCUS_PATH
					has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH
				}
			}
		}
	}

	Le_Pouvoir_support = {
		icon = GFX_decision_generic_speech
		cost = 100
		days_remove = 60
		fixed_random_seed = no
		available = { has_country_flag = ALG_resistance_path }

		# custom_effect_tooltip = ALG_power_struggle_status_tt
		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete Le_Pouvoir_support"
			custom_effect_tooltip = ALG_increase_pouvoir_tt
			hidden_effect = {
				random_list = {
					50 = {
						add_to_variable = { var = ALG_army_influence value = 2 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
						add_to_variable = { var = ALG_people_grievance value = -2 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
					}
					30 = {
						add_to_variable = { var = ALG_army_influence value = 3 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
						add_to_variable = { var = ALG_people_grievance value = -3 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
					}
					15 = {
						add_to_variable = { var = ALG_army_influence value = 4 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
						add_to_variable = { var = ALG_people_grievance value = -4 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
					}
					5 = {
						add_to_variable = { var = ALG_army_influence value = 5 tooltip = ALG_army_influence_factor_tt }
						clamp_variable = { var = ALG_army_influence min = 0 max = 100 }
						add_to_variable = { var = ALG_people_grievance value = -5 tooltip = ALG_people_grievance_factor_tt }
						clamp_variable = { var = ALG_people_grievance min = 0 max = 100 }
					}
				}
			}
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 10
				OR = {
					has_global_flag = ALG_LE_POUVOIR_FOCUS_PATH
					has_global_flag = ALG_MILITARY_JUNTA_FOCUS_PATH
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_global_flag = ALG_FIS_UPRISING_FOCUS_PATH
					has_global_flag = ALG_HIRAK_DEMOCRACY_FOCUS_PATH
				}
			}
		}
	}

	Resistance_Final_Clash = {
		icon = GFX_decisions_generic_counter_infiltration
		days_mission_timeout = 90
		fire_only_once = yes

		available = {
			has_country_flag = ALG_resistance_path
			NOT = { has_country_flag = ALG_resistance_wins }
			NOT = { has_country_flag = ALG_pouvoir_wins }
			NOT = { has_country_flag = ALG_junta }
		}

		# custom_effect_tooltip = ALG_power_struggle_status_tt
		activation = {
			has_country_flag = ALG_resistance_path
			NOT = {
				OR = {
					has_completed_focus = ALG_restore_hope
					has_completed_focus = ALG_military_coup
				}
			}
		}

		#available = { always = no }
		fixed_random_seed = no

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision Resistance_Final_Clash"
			if = {
				limit = {
					check_variable = { ALG_people_grievance > 10 }
					check_variable = { var = ALG_people_grievance value = ALG_army_influence compare = greater_than }
				}
				set_country_flag = ALG_resistance_wins
				country_event = alg_resistance.1
			}
			else_if = {
				limit = {
					check_variable = { ALG_army_influence > 10 }
					check_variable = { var = ALG_army_influence value = ALG_people_grievance compare = greater_than }
				}
				set_country_flag = ALG_pouvoir_wins
				news_event = alg_resistance.2
			}
			else = {
				set_country_flag = ALG_junta
				country_event = alg_resistance.3
			}
		}
	}
}
ALG_algeria_support_category = {
	ALG_ter_oboronaup_start = {
		custom_cost_trigger = { command_power > 20 }
		custom_cost_text = command_power_more_than_20
		icon = GFX_decision_ter_oborona
		days_remove = 45
		fire_only_once = yes
		available = { has_war = yes }
		visible = { has_completed_focus = ALG_al_hars_al_watani }

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_ter_oboronaup_start"
			add_manpower = -5000
			set_temp_variable = { treasury_change = -6 }
			add_command_power = -25
			modify_treasury_effect = yes
			if = {
				limit = { NOT = { has_template = "Territorial Defense Brigade" } }
				division_template = {
					name = "Territorial Defense Brigade"
					is_locked = yes
					regiments = {
						L_Inf_Bat = { x = 0 y = 0 }
						L_Inf_Bat = { x = 0 y = 1 }
						Mot_Inf_Bat = { x = 1 y = 0 }
					}
				}
			}
			random_owned_controlled_state = {
				prioritize = { 385 }
				create_unit = {
					division = "name = \"Territorial Defense Brigade\" division_template = \"Territorial Defense Brigade\" start_experience_factor = 1.0"
					owner = ROOT
					allow_spawning_on_enemy_provs = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 386 }
				create_unit = {
					division = "name = \"Territorial Defense Brigade\" division_template = \"Territorial Defense Brigade\" start_experience_factor = 1.0"
					owner = ROOT
					allow_spawning_on_enemy_provs = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 384 }
				create_unit = {
					division = "name = \"Territorial Defense Brigade\" division_template = \"Territorial Defense Brigade\" start_experience_factor = 1.0"
					owner = ROOT
					allow_spawning_on_enemy_provs = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 383 }
				create_unit = {
					division = "name = \"Territorial Defense Brigade\" division_template = \"Territorial Defense Brigade\" start_experience_factor = 1.0"
					owner = ROOT
					allow_spawning_on_enemy_provs = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 382 }
				create_unit = {
					division = "name = \"Territorial Defense Brigade\" division_template = \"Territorial Defense Brigade\" start_experience_factor = 1.0"
					owner = ROOT
					allow_spawning_on_enemy_provs = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 381 }
				create_unit = {
					division = "name = \"Territorial Defense Brigade\" division_template = \"Territorial Defense Brigade\" start_experience_factor = 1.0"
					owner = ROOT
					allow_spawning_on_enemy_provs = yes
				}
			}
		}

		ai_will_do = { base = 1 }
	}

	ALG_internalup_start = {
		custom_cost_trigger = { command_power > 20 }
		custom_cost_text = command_power_more_than_20
		icon = GFX_decision_internal_troops
		days_remove = 35
		fire_only_once = yes
		available = { has_war = yes }
		visible = { has_completed_focus = ALG_internal_troops }

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_internalup_start"
			add_manpower = -1000
			set_temp_variable = { treasury_change = -3 }
			modify_treasury_effect = yes
			add_command_power = -25
			385 = {
				create_unit = {
					division = "name = \"3rd Separate Special-Purpose Brigade\" division_template = \"GIS\" start_experience_factor = 1.2"
					prioritize_location = 7166
					owner = ALG
				}
			}
		}

		ai_will_do = { base = 1 }
	}
}

ALG_anti_poaching_decisions = {
	ALG_bi_yearly_poaching_report = {
		icon = GFX_decision_generic_decision
		available = { always = no }

		activation = {
			OR = {
				has_idea = ALG_sahara_expansion_1
				has_idea = ALG_sahara_expansion_2
				has_idea = ALG_sahara_expansion_3
				has_idea = ALG_sahara_expansion_4
				has_idea = ALG_sahara_expansion_5
				has_idea = ALG_sahara_expansion_6
				has_idea = ALG_sahara_expansion_7
				has_idea = ALG_sahara_expansion_8
				has_idea = ALG_sahara_expansion_9
				has_idea = ALG_sahara_expansion_10
			}
		}

		days_mission_timeout = 360
		days_re_enable = 1

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_bi_yearly_poaching_report"
			if = {
				limit = { check_variable = { no_of_poachers < 50 } }
				ALG_decrease_desertification_rate = yes
			}
			else_if = {
				limit = { check_variable = { no_of_poachers > 149 } }
				ALG_increase_desertification_rate = yes
			}
		}
	}

	ALG_anti_poaching_extra_security = {
		icon = generic_police_action
		available = { command_power > 20 }
		cost = 25
		days_remove = 90

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_anti_poaching_extra_security"
			add_to_variable = { chance_to_kill_poachers = 10 }
			add_command_power = -20
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_anti_poaching_extra_security"
			subtract_from_variable = { chance_to_kill_poachers = 10 }
		}

		modifier = {
			police_cost_multiplier_modifier = 0.50
			custom_modifier_tooltip = ALG_anti_poaching_extra_security_tt
		}

		ai_will_do = {
			base = 100
			modifier = {
				factor = 0
				check_variable = { no_of_poachers < 50 }
			}
			modifier = {
				factor = 2
				check_variable = { no_of_poachers > 150 }
			}
		}
	}

	ALG_anti_poaching_heavy_weapons = {
		icon = generic_assassination
		available = { command_power > 20 }
		cost = 25
		days_remove = 90

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_anti_poaching_heavy_weapons"
			add_to_variable = { no_of_poachers_to_kill = 5 }
			add_command_power = -20
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_anti_poaching_heavy_weapons"
			subtract_from_variable = { no_of_poachers_to_kill = 5 }
		}

		modifier = {
			police_cost_multiplier_modifier = 0.50
			custom_modifier_tooltip = ALG_anti_poaching_heavy_weapons_tt
		}

		ai_will_do = {
			base = 100
			modifier = {
				factor = 0
				check_variable = { no_of_poachers < 50 }
			}
			modifier = {
				factor = 2
				check_variable = { no_of_poachers > 150 }
			}
		}
	}

	ALG_anti_poaching_dehorn_camels = {
		available = { always = yes }
		cost = 100
		days_remove = 30
		days_re_enable = 360
		fixed_random_seed = no

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_anti_poaching_dehorn_camels"
			ALG_increase_desertification_rate = yes
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_anti_poaching_dehorn_camels"
			random_list = {
				75 = {
					country_event = Algeria_events.5
					custom_effect_tooltip = ALG_anti_poaching_dehorn_camels_tt
				}
				25 = {
					country_event = Algeria_events.6
				}
			}
		}

		ai_will_do = {
			base = 100
			modifier = {
				factor = 0
				check_variable = { no_of_poachers < 50 }
			}
			modifier = {
				factor = 2
				check_variable = { no_of_poachers > 150 }
			}
		}
	}
}

ALG_de_arabisation_category = {
	ALG_de_arabisation_mission = {
		icon = arab_federation_nationalist_announce_button
		days_mission_timeout = 356
		is_good = no
		activation = { has_completed_focus = ALG_de_arabisation }
		available = { has_idea = ALG_dearabisation_penalty }
		cancel_trigger = { has_war = yes }
		highlight_states = { highlight_states_trigger = { is_core_of = ALG } }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_de_arabisation_mission"
			remove_ideas = ALG_dearabisation_penalty
			add_ideas = ALG_imazighen_perseverance
			add_stability = 0.05
			custom_effect_tooltip = ALG_dearabisation_end_TT
			every_owned_state = {
				limit = { is_core_of = ALG }
				remove_core_of = ALG
				add_core_of = KBY
			}
			every_state = {
				limit = {
					OR = {
						is_core_of = MOR
						is_core_of = TUN
						is_core_of = LBA
					}
					#OR = {
					# Only Berber/Amazigh regions
					#state = x # Kabylie
					#state = x # Aurès
					#state = x # Rif (Morocco)
					# Add all Tamazgha state IDs
					#}
				}
				add_core_of = KBY
			}
			set_country_flag = ALG_de_arabisation_mission_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_de_arabisation_mission"
			remove_ideas = ALG_dearabisation_penalty
			add_stability = -0.03
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			add_to_variable = { var = ALG_arab_satisfaction value = -5 tooltip = ALG_arab_satisfaction_factor_tt }
			ALG_update_ethnic_modifiers = yes
			custom_effect_tooltip = ALG_dearabisation_fail_TT
		}

		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision remove ALG_de_arabisation_mission"
			add_stability = 0.02
		}
	}

	ALG_subsidise_amazigh_businesses = {
		icon = GFX_decision_generic_welfare
		days_mission_timeout = 180
		is_good = no
		activation = { has_completed_focus = ALG_de_arabisation }

		available = {
			has_completed_focus = ALG_tamazgha
			custom_trigger_tooltip = {
				tooltip = ALG_ethnic_kabyle_tt
				check_variable = { var = ALG_ethnic_kabyle value > 10 }
			}
			custom_trigger_tooltip = {
				tooltip = ALG_kabyle_satisfaction_tt
				check_variable = { var = ALG_kabyle_satisfaction value > 64 }
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_subsidise_amazigh_businesses"
			add_to_variable = { var = ALG_kabyle_satisfaction value = 10 tooltip = kabyle_satisfaction_factor_tt }
			add_to_variable = { var = ALG_arab_satisfaction value = -5 tooltip = ALG_arab_satisfaction_factor_tt }
			ALG_update_ethnic_modifiers = yes
			add_to_variable = { var = ALG_ethnic_kabyle value = 2 }
			add_stability = 0.03
			custom_effect_tooltip = ALG_amazigh_businesses_complete_TT
			#set_country_flag = ALG_subsidise_amazigh_businesses_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_subsidise_amazigh_businesses"
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_stability = -0.02
			custom_effect_tooltip = ALG_amazigh_businesses_fail_TT
		}
	}

	ALG_return_amazigh_exiles = {
		icon = GFX_decision_generic_political_discourse
		days_mission_timeout = 200
		is_good = no
		activation = { has_completed_focus = ALG_de_arabisation }

		available = {
			has_completed_focus = ALG_tamazgha
			has_political_power > 200
			has_stability > 0.6
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_return_amazigh_exiles"
			add_to_variable = { var = ALG_kabyle_satisfaction value = 15 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_to_variable = { var = ALG_ethnic_kabyle value = 3 }
			add_war_support = 0.02
			add_manpower = 5000
			custom_effect_tooltip = ALG_return_exiles_complete_TT
			#set_country_flag = ALG_return_amazigh_exiles_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_return_amazigh_exiles"
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_stability = -0.02
			custom_effect_tooltip = ALG_return_exiles_fail_TT
		}
	}

	ALG_leave_arab_league = {
		icon = arab_federation_announce_button
		days_mission_timeout = 180
		is_good = no
		activation = { has_completed_focus = ALG_de_arabisation }

		available = {
			has_completed_focus = ALG_tamazgha
			custom_trigger_tooltip = {
				tooltip = ALG_no_arab_league_faction_partner_tt
				NOT = {
					any_of_scopes = {
						array = global.arab_league_members
						exists = yes
						NOT = { tag = ROOT }
						is_in_faction_with = ROOT
					}
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_leave_arab_league"
			leave_faction = yes
			remove_ideas = LoAS_member
			add_stability = 0.05
			add_to_variable = { var = ALG_arab_satisfaction value = -15 tooltip = ALG_arab_satisfaction_factor_tt }
			add_to_variable = { var = ALG_kabyle_satisfaction value = 10 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_ethnic_modifiers = yes
			set_temp_variable = { int_investment_change = -0.20 }
			modify_international_investment_effect = yes
			custom_effect_tooltip = ALG_leave_arab_league_complete_TT
			#set_country_flag = ALG_leave_arab_league_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_leave_arab_league"
			add_stability = -0.05
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			custom_effect_tooltip = ALG_leave_arab_league_fail_TT
		}
	}

	ALG_maintain_kabyle_relations = {
		icon = GFX_decision_generic_political_discourse
		cost = 150
		days_re_enable = 90

		available = {
			has_completed_focus = ALG_tamazgha
			NOT = { has_country_flag = ALG_maintaining_kabyle_relations }
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_maintain_kabyle_relations"
			custom_effect_tooltip = ALG_maintain_kabyle_relations_tt
			set_country_flag = { flag = ALG_maintaining_kabyle_relations days = 90 value = 1 }
			add_to_variable = { var = ALG_kabyle_satisfaction value = 5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_stability = 0.02
		}

		ai_will_do = {
			base = 5
			modifier = {
				factor = 2
				check_variable = { ALG_kabyle_satisfaction < 50 }
			}
			modifier = {
				factor = 0.5
				check_variable = { ALG_kabyle_satisfaction > 70 }
			}
		}
	}

	ALG_boost_kabyle_population = {
		icon = GFX_decision_SWI_support_humanitarian_efforts
		days_mission_timeout = 240
		is_good = no
		activation = { has_completed_focus = ALG_de_arabisation }

		available = {
			has_completed_focus = ALG_tamazgha
			custom_trigger_tooltip = {
				tooltip = ALG_kabyle_satisfaction_70_tt
				check_variable = { var = ALG_kabyle_satisfaction value > 70 }
			}
			has_stability > 0.5
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_boost_kabyle_population"
			add_to_variable = { var = ALG_ethnic_kabyle value = 5 }
			add_to_variable = { var = ALG_ethnic_arab value = -5 }
			add_to_variable = { var = ALG_kabyle_satisfaction value = 15 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_stability = 0.05
			random_owned_controlled_state = {
				limit = { is_core_of = KBY }
				add_manpower = 5000
			}
			custom_effect_tooltip = ALG_kabyle_pop_complete_TT
			#set_country_flag = ALG_boost_kabyle_population_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_boost_kabyle_population"
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_stability = -0.02
			custom_effect_tooltip = ALG_kabyle_pop_fail_TT
		}
	}
}
ALG_tamazgha_cultural_revival_category = {
	ALG_amazigh_language_reform = {
		icon = amazigh
		days_mission_timeout = 180
		is_good = no
		activation = { has_country_flag = ALG_de_arabisation_mission_done }

		available = {
			has_completed_focus = ALG_tamazgha
			has_idea = edu_03
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_amazigh_language_reform"
			add_to_variable = { var = ALG_kabyle_satisfaction value = 10 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_to_variable = { var = ALG_ethnic_kabyle value = 3 }
			add_stability = 0.03
			set_temp_variable = { temp_productivity_change = 0.015 }
			flat_productivity_change_effect = yes
			increase_education_budget_2 = yes
			custom_effect_tooltip = ALG_amazigh_language_reform_complete_TT
			#set_country_flag = ALG_amazigh_language_reform_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_amazigh_language_reform"
			add_stability = -0.03
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			custom_effect_tooltip = ALG_amazigh_language_reform_fail_TT
		}
	}

	ALG_tamazight_in_education = {
		icon = ISR_education_button
		days_mission_timeout = 210
		is_good = no
		activation = { has_country_flag = ALG_de_arabisation_mission_done }

		available = {
			has_completed_focus = ALG_tamazgha
			custom_trigger_tooltip = {
				tooltip = ALG_kabyle_satisfaction_60_tt
				check_variable = { var = ALG_kabyle_satisfaction value > 60 }
			}
			has_idea = edu_04
			has_stability > 0.6
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_tamazight_in_education"
			add_to_variable = { var = ALG_kabyle_satisfaction value = 15 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_stability = 0.04
			set_temp_variable = { int_investment_change = 0.1 }
			modify_international_investment_effect = yes
			custom_effect_tooltip = ALG_tamazight_in_education_complete_TT
			#set_country_flag = ALG_tamazight_in_education_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_tamazight_in_education"
			add_stability = -0.02
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			custom_effect_tooltip = ALG_tamazight_in_education_fail_TT
		}
	}

	ALG_media_cultural_independence = {
		icon = GFX_decision_generic_nationalism
		days_mission_timeout = 150
		is_good = no
		activation = { has_country_flag = ALG_de_arabisation_mission_done }

		available = {
			has_completed_focus = ALG_tamazgha
			custom_trigger_tooltip = {
				tooltip = ALG_kabyle_satisfaction_70_tt
				check_variable = { var = ALG_kabyle_satisfaction value > 70 }
			}
			has_idea = social_04
			has_idea = police_04
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_media_cultural_independence"
			add_stability = 0.03
			add_war_support = 0.02
			add_to_variable = { var = ALG_kabyle_satisfaction value = 10 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			set_temp_variable = { temp_opinion = 10 }
			change_small_medium_business_owners_opinion = yes
			custom_effect_tooltip = ALG_media_cultural_independence_complete_TT
			#set_country_flag = ALG_media_cultural_independence_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_media_cultural_independence"
			add_stability = -0.03
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			custom_effect_tooltip = ALG_media_cultural_independence_fail_TT
		}
	}

	ALG_tamazgha_regional_cooperation = {
		icon = GFX_decision_eng_ally_imperialist_coup
		days_mission_timeout = 240
		is_good = no
		activation = { has_country_flag = ALG_de_arabisation_mission_done }

		available = {
			has_completed_focus = ALG_tamazgha
			is_in_faction = no
			OR = {
				MAU = { is_in_faction = no has_opinion = { target = ROOT value > 49 } }
				TUN = { is_in_faction = no has_opinion = { target = ROOT value > 49 } }
				MOR = { is_in_faction = no has_opinion = { target = ROOT value > 49 } }
				LBA = { is_in_faction = no has_opinion = { target = ROOT value > 49 } }
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision complete ALG_tamazgha_regional_cooperation"
			add_to_variable = { var = ALG_kabyle_satisfaction value = 20 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			add_stability = 0.05
			add_war_support = 0.03
			set_temp_variable = { int_investment_change = 0.5 }
			modify_international_investment_effect = yes
			create_faction_from_template = faction_template_tamazgha_confederation
			MAU = { if = { limit = { is_in_faction = no } set_country_flag = ALG_tamazgha_invitation_pending country_event = ALG_tamazgha.1 } }
			TUN = { if = { limit = { is_in_faction = no } set_country_flag = ALG_tamazgha_invitation_pending country_event = ALG_tamazgha.1 } }
			MOR = { if = { limit = { is_in_faction = no } set_country_flag = ALG_tamazgha_invitation_pending country_event = ALG_tamazgha.1 } }
			LBA = { if = { limit = { is_in_faction = no } set_country_flag = ALG_tamazgha_invitation_pending country_event = ALG_tamazgha.1 } }
			custom_effect_tooltip = ALG_tamazgha_regional_cooperation_complete_TT
			#set_country_flag = ALG_tamazgha_regional_cooperation_done
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_tamazgha_regional_cooperation"
			add_stability = -0.02
			add_to_variable = { var = ALG_kabyle_satisfaction value = -5 tooltip = kabyle_satisfaction_factor_tt }
			ALG_update_kabyle_modifiers = yes
			custom_effect_tooltip = ALG_tamazgha_regional_cooperation_fail_TT
		}
	}
}
ALG_casablanca_decisions = {
	ALG_casablanca_mission = {
		fixed_random_seed = no
		icon = GFX_decision_oppression

		activation = {
			has_country_flag = algeria_casablanca_unlocked
			NOT = { check_variable = { algeria_casablanca_approach = 0 } }
		}

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_casablanca_mission_tt
				check_variable = { algeria_casablanca_result = 0 }
				NOT = { check_variable = { algeria_casablanca_approach = 0 } }
			}
		}

		days_mission_timeout = 180

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_casablanca_mission"
			# approach = 1 (great powers) -> best odds
			if = {
				limit = { check_variable = { algeria_casablanca_approach = 1 } }
				random_list = {
					60 = { set_variable = { algeria_casablanca_result = 2 } } # high success
					30 = { set_variable = { algeria_casablanca_result = 1 } } # medium
					10 = { set_variable = { algeria_casablanca_result = 0 } } # low
				}
			}
			# approach = 3 (mixed) -> balanced odds
			else_if = {
				limit = { check_variable = { algeria_casablanca_approach = 3 } }
				random_list = {
					40 = { set_variable = { algeria_casablanca_result = 2 } }
					40 = { set_variable = { algeria_casablanca_result = 1 } }
					20 = { set_variable = { algeria_casablanca_result = 0 } }
				}
			}
			# approach = 2 (regional) and the no-approach fallback -> worst odds
			else = {
				random_list = {
					10 = { set_variable = { algeria_casablanca_result = 2 } }
					30 = { set_variable = { algeria_casablanca_result = 1 } }
					60 = { set_variable = { algeria_casablanca_result = 0 } }
				}
			}
			# Rewards: PP & stability only
			if = {
				limit = { check_variable = { algeria_casablanca_result = 2 } }
				add_political_power = 100
				add_stability = 0.03
				hidden_effect = { news_event = { id = AlgeriaFocusNews.103 hours = 6 } }
			}
			else_if = {
				limit = { check_variable = { algeria_casablanca_result = 1 } }
				add_political_power = 50
				add_stability = 0.02
				hidden_effect = { news_event = { id = AlgeriaFocusNews.104 hours = 6 } }
			}
			else = {
				add_political_power = 20
				add_stability = 0.01
				hidden_effect = { news_event = { id = AlgeriaFocusNews.105 hours = 6 } }
			}
			# clear unlock flag and reset approach so it can't auto-activate again
			set_variable = { algeria_casablanca_approach = 0 }
			clr_country_flag = algeria_casablanca_unlocked
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_casablanca_mission"
			# mission timed out: failure
			set_variable = { algeria_casablanca_result = 0 }
			set_variable = { algeria_casablanca_approach = 0 }
			add_stability = -0.03
			hidden_effect = { news_event = { id = AlgeriaFocusNews.106 hours = 6 } }
			clr_country_flag = algeria_casablanca_unlocked
		}
	}

	ALG_casablanca_approach_great_powers = {
		icon = GFX_decision_SOV_place_hq
		visible = { has_country_flag = algeria_casablanca_unlocked }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_casablanca_approach_tt
				check_variable = { algeria_casablanca_approach = 0 }
				check_variable = { algeria_casablanca_result = 0 }
			}
		}

		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_casablanca_approach_great_powers"
			set_variable = { algeria_casablanca_approach = 3 }
			add_stability = -0.03
			set_temp_variable = { percent_change = 10 }
			set_temp_variable = { tag_index = USA }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			set_temp_variable = { percent_change = 8 }
			set_temp_variable = { tag_index = SOV }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			set_temp_variable = { percent_change = 7 }
			set_temp_variable = { tag_index = SPR }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			hidden_effect = { news_event = { id = AlgeriaFocusNews.100 hours = 6 } }
		}

		ai_will_do = { base = 0 }
	}

	ALG_casablanca_approach_regional = {
		icon = GFX_decision_SWI_no_elected_president
		visible = { has_country_flag = algeria_casablanca_unlocked }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_casablanca_approach_tt
				check_variable = { algeria_casablanca_approach = 0 }
				check_variable = { algeria_casablanca_result = 0 }
			}
		}

		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_casablanca_approach_regional"
			set_variable = { algeria_casablanca_approach = 2 }
			add_stability = -0.02
			set_temp_variable = { percent_change = 4 }
			set_temp_variable = { tag_index = MAU }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			set_temp_variable = { percent_change = 3 }
			set_temp_variable = { tag_index = TUN }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			set_temp_variable = { percent_change = 3 }
			set_temp_variable = { tag_index = LBA }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			set_temp_variable = { percent_change = 3 }
			set_temp_variable = { tag_index = MOR }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			hidden_effect = { news_event = { id = AlgeriaFocusNews.101 hours = 6 } }
		}

		ai_will_do = { base = 0 }
	}

	ALG_casablanca_approach_mixed = {
		icon = GFX_decision_generic_political_address
		visible = { has_country_flag = algeria_casablanca_unlocked }

		available = {
			custom_trigger_tooltip = {
				tooltip = ALG_casablanca_approach_tt
				check_variable = { algeria_casablanca_approach = 0 }
				check_variable = { algeria_casablanca_result = 0 }
			}
		}

		cost = 50

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_casablanca_approach_mixed"
			set_variable = { algeria_casablanca_approach = 1 }
			add_stability = -0.01
			set_temp_variable = { percent_change = 3 }
			set_temp_variable = { tag_index = USA }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			set_temp_variable = { tag_index = SOV }
			change_influence_percentage = yes
			set_temp_variable = { percent_change = 2 }
			set_temp_variable = { tag_index = SPR }
			change_influence_percentage = yes
			set_temp_variable = { tag_index = MAU }
			change_influence_percentage = yes
			set_temp_variable = { tag_index = TUN }
			change_influence_percentage = yes
			set_temp_variable = { percent_change = 1 }
			set_temp_variable = { tag_index = LBA }
			change_influence_percentage = yes
			set_temp_variable = { tag_index = MOR }
			change_influence_percentage = yes
			hidden_effect = { news_event = { id = AlgeriaFocusNews.102 hours = 6 } }
		}

		ai_will_do = { base = 0 }
	}
}
ALG_uav_procurement_category = {
	ALG_purchase_turkish_uavs = {
		icon = GFX_decision_turkish_guns

		visible = {
			has_completed_focus = ALG_military_aviation_contract
			NOT = { has_country_flag = ALG_uav_procured }
		}

		available = {
			NOT = { has_country_flag = ALG_uav_procured }
			TUR = {
				has_opinion = {
					target = ALG
					value > 25
				}
			}
		}

		cost = 75
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_purchase_turkish_uavs"
			set_temp_variable = { treasury_change = -8 }
			modify_treasury_effect = yes
			if = {
				limit = { has_dlc = "By Blood Alone" }
				add_equipment_to_stockpile = {
					type = small_plane_suicide_airframe_2
					amount = 30
					variant_name = "Bayraktar TB2"
					producer = TUR
				}
			}
			else = {
				add_equipment_to_stockpile = {
					type = Air_UAV1
					amount = 30
					producer = TUR
				}
			}
			set_temp_variable = { percent_change = 3 }
			set_temp_variable = { tag_index = TUR }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			add_opinion_modifier = {
				target = TUR
				modifier = improve_trade
			}
			reverse_add_opinion_modifier = {
				target = TUR
				modifier = improve_trade
			}
			set_country_flag = ALG_uav_procured
		}

		ai_will_do = { base = 0 }
	}

	ALG_purchase_chinese_uavs = {
		icon = GFX_decision_chinese_guns

		visible = {
			has_completed_focus = ALG_military_aviation_contract
			NOT = { has_country_flag = ALG_uav_procured }
		}

		available = {
			NOT = { has_country_flag = ALG_uav_procured }
			CHI = {
				has_opinion = {
					target = ALG
					value > 25
				}
			}
		}

		cost = 75
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_purchase_chinese_uavs"
			set_temp_variable = { treasury_change = -10 }
			modify_treasury_effect = yes
			if = {
				limit = { has_dlc = "By Blood Alone" }
				add_equipment_to_stockpile = {
					type = small_plane_suicide_airframe_2
					amount = 40
					variant_name = "Wing Loong II"
					producer = CHI
				}
			}
			else = {
				add_equipment_to_stockpile = {
					type = Air_UAV1
					amount = 40
					producer = CHI
				}
			}
			set_temp_variable = { percent_change = 4 }
			set_temp_variable = { tag_index = CHI }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			add_opinion_modifier = {
				target = CHI
				modifier = improve_trade
			}
			reverse_add_opinion_modifier = {
				target = CHI
				modifier = improve_trade
			}
			set_country_flag = ALG_uav_procured
		}

		ai_will_do = { base = 0 }
	}

	ALG_purchase_iranian_uavs = {
		icon = GFX_decision_iran_guns

		visible = {
			has_completed_focus = ALG_military_aviation_contract
			NOT = { has_country_flag = ALG_uav_procured }
		}

		available = {
			NOT = { has_country_flag = ALG_uav_procured }
			PER = {
				has_opinion = {
					target = ALG
					value > 25
				}
			}
		}

		cost = 75
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_purchase_iranian_uavs"
			set_temp_variable = { treasury_change = -6 }
			modify_treasury_effect = yes
			if = {
				limit = { has_dlc = "By Blood Alone" }
				add_equipment_to_stockpile = {
					type = small_plane_suicide_airframe_2
					amount = 50
					variant_name = "Mohajer-6"
					producer = PER
				}
			}
			else = {
				add_equipment_to_stockpile = {
					type = Air_UAV1
					amount = 50
					producer = PER
				}
			}
			set_temp_variable = { percent_change = 5 }
			set_temp_variable = { tag_index = PER }
			set_temp_variable = { influence_target = ALG }
			change_influence_percentage = yes
			add_opinion_modifier = {
				target = PER
				modifier = improve_trade
			}
			reverse_add_opinion_modifier = {
				target = PER
				modifier = improve_trade
			}
			set_country_flag = ALG_uav_procured
		}

		ai_will_do = { base = 0 }
	}
}

ALG_drone_program_category = {
	ALG_develop_amel_recon_uav = {
		icon = GFX_decision_uav

		visible = {
			has_completed_focus = ALG_star_aviation_uav_division
			NOT = { has_country_flag = ALG_drone_variant_chosen }
		}

		available = {
			NOT = { has_country_flag = ALG_drone_variant_chosen }
			amount_research_slots > 3
		}

		cost = 100
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_develop_amel_recon_uav"
			set_temp_variable = { treasury_change = -5 }
			modify_treasury_effect = yes
			custom_effect_tooltip = ALG_amel_developed_tt
			if = {
				limit = {
					has_dlc = "By Blood Alone"
					NOT = { has_tech = drone_2 }
				}
				set_technology = { drone_2 = 1 }
			}
			else_if = {
				limit = {
					NOT = { has_tech = Air_UAV2 }
					has_tech = Air_UAV1
				}
				set_technology = { Air_UAV2 = 1 }
			}
			else = {
				add_tech_bonus = {
					name = ALG_develop_amel_recon_uav
					bonus = 0.5
					uses = 1
					category = CAT_air_drones
				} hidden_effect = { rq_eb_3666de88c4 = yes }
			}
			if = {
				limit = { has_dlc = "By Blood Alone" }
				add_equipment_to_stockpile = {
					type = small_plane_suicide_airframe_2
					amount = 20
					variant_name = "Amel-1"
					producer = ALG
				}
			}
			else = {
				add_equipment_to_stockpile = {
					type = Air_UAV2
					amount = 20
					producer = ALG
				}
			}
			set_country_flag = ALG_drone_variant_chosen
		}

		ai_will_do = { base = 0 }
	}

	ALG_develop_el_djazair_ucav = {
		icon = GFX_decision_uav

		visible = {
			has_completed_focus = ALG_star_aviation_uav_division
			NOT = { has_country_flag = ALG_drone_variant_chosen }
		}

		available = {
			NOT = { has_country_flag = ALG_drone_variant_chosen }
			amount_research_slots > 3
		}

		cost = 100
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_develop_el_djazair_ucav"
			set_temp_variable = { treasury_change = -7 }
			modify_treasury_effect = yes
			custom_effect_tooltip = ALG_ucav_developed_tt
			add_tech_bonus = {
				name = ALG_develop_el_djazair_ucav
				bonus = 0.75
				uses = 1
				category = CAT_air_drones
			} hidden_effect = { rq_eb_ee17714b84 = yes }
			add_ideas = ALG_combat_uav_program
			if = {
				limit = { has_dlc = "By Blood Alone" }
				add_equipment_to_stockpile = {
					type = small_plane_suicide_airframe_2
					amount = 15
					producer = ALG
				}
			}
			else = {
				add_equipment_to_stockpile = {
					type = Air_UAV2
					amount = 15
					producer = ALG
				}
			}
			set_country_flag = ALG_drone_variant_chosen
		}

		ai_will_do = { base = 0 }
	}

	ALG_develop_swarm_loitering = {
		icon = GFX_decision_uav

		visible = {
			has_completed_focus = ALG_star_aviation_uav_division
			NOT = { has_country_flag = ALG_drone_variant_chosen }
		}

		available = {
			NOT = { has_country_flag = ALG_drone_variant_chosen }
			amount_research_slots > 4
			has_tech = avionics_2
		}

		cost = 100
		fire_only_once = yes

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision ALG_develop_swarm_loitering"
			set_temp_variable = { treasury_change = -8 }
			modify_treasury_effect = yes
			custom_effect_tooltip = ALG_swarm_developed_tt
			add_tech_bonus = {
				name = ALG_develop_swarm_loitering
				bonus = 1.0
				uses = 1
				category = CAT_land_drones
			} hidden_effect = { rq_eb_349cf14c11 = yes }
			if = {
				limit = { has_dlc = "No Step Back" }
				add_tech_bonus = {
					name = ALG_develop_swarm_loitering
					bonus = 0.5
					uses = 1
					category = CAT_tank_computer_systems
				} hidden_effect = { rq_eb_1346a0b531 = yes }
			}
			else = {
				add_tech_bonus = {
					name = ALG_develop_swarm_loitering
					bonus = 0.5
					uses = 1
					category = CAT_land_drones
				} hidden_effect = { rq_eb_6016ab7463 = yes }
			}
			if = {
				limit = { has_dlc = "By Blood Alone" }
				add_equipment_to_stockpile = {
					type = small_plane_suicide_airframe_2
					amount = 60
					producer = ALG
				}
			}
			else = {
				add_equipment_to_stockpile = {
					type = Air_UAV2
					amount = 60
					producer = ALG
				}
			}
			set_country_flag = ALG_drone_variant_chosen
		}

		ai_will_do = { base = 0 }
	}
}
