﻿###########################
# Egypt Events
# By Herkles
###########################

add_namespace = egy

country_event = { # Introduction Event
	id = egy.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.1" }
	title = egy.1.t
	desc = egy.1.d
	picture = GFX_report_event_suezkanal
	is_triggered_only = yes

	option = {
		name = egy.1.a
	}
}

### Political Events ###
country_event = { # Death of Fuad I
	id = egy.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.2" }
	title = egy.2.t
	desc = egy.2.d
	picture = GFX_report_event_royal_parade
	is_triggered_only = yes

	option = {
		name = egy.2.a
		add_stability = -0.1
		add_political_power = -50
		custom_effect_tooltip = EGY_farouk_becomes_sultan
		hidden_effect = {
			create_country_leader = {
				name = "Farouk I"
				picture = "gfx/leaders/EGY/Portrait_Egypt_Farouk.png"
				desc = "POLITICS_FAROUK_DESC"
				expire = "1.1.1"
				ideology = socdem_pharaonism_subtype
			}
			create_country_leader = {
				name = "Farouk I"
				picture = "gfx/leaders/EGY/Portrait_Egypt_Farouk.png"
				desc = "POLITICS_FAROUK_DESC"
				expire = "1.1.1"
				ideology = national_liberalism_subtype
			}
			create_country_leader = {
				name = "Farouk I"
				picture = "gfx/leaders/EGY/Portrait_Egypt_Farouk.png"
				desc = "POLITICS_FAROUK_DESC"
				expire = "1.1.1"
				ideology = marlib_national_liberalism_subtype
			}
			create_country_leader = {
				name = "Farouk I"
				picture = "gfx/leaders/EGY/Portrait_Egypt_Farouk.png"
				desc = "POLITICS_FAROUK_DESC"
				expire = "1.1.1"
				ideology = soccon_islamism_subtype
			}
			create_country_leader = {
				name = "Farouk I"
				picture = "gfx/leaders/EGY/Portrait_Egypt_Farouk.png"
				desc = "POLITICS_FAROUK_DESC"
				expire = "1.1.1"
				ideology = islamism_subtype
			}
			create_country_leader = {
				name = "Farouk I"
				picture = "gfx/leaders/EGY/Portrait_Egypt_Farouk.png"
				desc = "POLITICS_FAROUK_DESC"
				expire = "1.1.1"
				ideology = absolute_monarchy_subtype
			}
			set_country_flag = EGY_farouk_is_now_sultan
			country_event = {
				id = egy.125
				days = 360
			}
			country_event = {
				id = egy.113
				days = 456
			}
		}
	}
}
country_event = { # Black Monday hits Egypt
	id = egy.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.3" }
	title = egy.3.t
	desc = egy.3.d
	picture = GFX_report_event_generic_run_on_the_banks
	is_triggered_only = yes

	option = {
		name = egy.3.a
		add_ideas = EGY_black_monday
		set_country_flag = EGY_black_monday_has_hit_egypt
		add_stability = -0.10
		add_war_support = -0.10
	}
}
country_event = { # Farouk's Reforms Begin
	id = egy.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.4" }
	title = egy.4.t
	desc = egy.4.d
	picture = GFX_report_event_EGY_farouk_radio

	is_triggered_only = yes

	option = {
		name = egy.4.a
		set_country_flag = EGY_farouks_reforms_begun
		add_stability = 0.05
		add_war_support = 0.05
		hidden_effect = {
			set_country_flag = {
				flag = EGY_liberal_reforms
				value = 0
			}
			set_country_flag = {
				flag = EGY_conservative_reforms
				value = 0
			}
			set_country_flag = {
				flag = EGY_absolutist_reforms
				value = 0
			}
		}
	}
}
country_event = { # Election of 1936
	id = egy.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.5" }
	title = egy.5.t
	desc = egy.5.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

trigger = {
		tag = EGY
		NOT = {
			has_country_flag = EGY_1936_elections_held
		}
	}

	immediate = {
		hidden_effect = {
			remove_all_ministers = yes
			country_event = {
				id = egy.139
				days = 730
			}
		}
	}

	option = { # Liberal - Liberal Constitutional Party
		name = egy.5.a
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0 
				OR = {
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_MAR_LIB }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_SOC_CON }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_AUT_DEM }
				}
			}
		}
		set_politics = {
			ruling_party = social_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1936_elections_held
			add_ideas = EGY_Aly_Maher_hog_sli
			add_ideas = EGY_Kamil_Abdul_Rahim_for_sli
			add_ideas = EGY_Saba_Habachy_eco_sli
			add_ideas = EGY_Muhammad_Husayn_Haykal_sec_sli
		}
	}
	option = { # Liberal - Wafd Party
		name = egy.5.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0 
				OR = {
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_SOC_LIB }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_SOC_CON }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_AUT_DEM }
				}
			}
		}
		set_politics = {
			ruling_party = market_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1936_elections_held
			add_ideas = EGY_Mostafa_El_Nahas_hog_mli
			add_ideas = EGY_Hassan_Sabry_for_mli
			add_ideas = EGY_Makram_Ebeid_eco_mli
			add_ideas = EGY_Abbas_al_Aqqad_sec_mli
		}
	}
	option = { # Conservative - Watani Party
		name = egy.5.c
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0 
				OR = {
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_SOC_LIB }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_MAR_LIB }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_AUT_DEM }
				}
			}
		}
		set_politics = {
			ruling_party = social_conservative
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1936_elections_held
			add_ideas = EGY_Ahmed_Naguib_el_Hilaly_hog_sco
			add_ideas = EGY_Hussein_Serry_for_sco
			add_ideas = EGY_Hassan_Allam_eco_sco
			add_ideas = EGY_Abdelfattah_Amr_sec_sco
		}
	}
	option = { # Conservative - Ittihad Party
		name = egy.5.e
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0 
				OR = {
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_SOC_LIB }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_MAR_LIB }
					has_game_rule = { rule = EGY_election option = EGY_ELECTION_SOC_CON }
				}
			}
		}
		set_politics = {
			ruling_party = authoritarian_democrat
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1936_elections_held
			add_ideas = EGY_Hassan_al_Banna_hog_ade
			add_ideas = EGY_Sayyid_Qutb_for_ade
			add_ideas = EGY_Hassan_al_Hudaybi_eco_ade
			add_ideas = EGY_Hassan_al_Banna_sec_ade
		}
	}
}
country_event = { # General Elections(1941)
	id = egy.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.6" }
	title = egy.6.t
	desc = egy.6.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

trigger = {
		tag = EGY
		has_country_flag = EGY_1936_elections_held
		NOT = {
			has_country_flag = EGY_1941_elections_held
			has_country_flag = EGY_1948_elections_held
		}
	}

	immediate = {
		hidden_effect = {
			remove_all_ministers = yes
			end_coalition = yes
		}
	}

	option = { # Liberal - Liberal Constitutional Party
		name = egy.6.a
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = social_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1941_elections_held
			add_ideas = EGY_Mohamed_Mahmoud_hog_sli
			add_ideas = EGY_Abdul_Khalek_Hassouna_for_sli
			add_ideas = EGY_Saba_Habachy_eco_sli
			add_ideas = EGY_Taha_Hussein_sec_sli
		}
	}
	option = { # Liberal - Wafd Party
		name = egy.6.b
		ai_chance = {
			factor = 40
		}
		set_politics = {
			ruling_party = market_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1941_elections_held
			add_ideas = EGY_Ahmad_Mahir_hog_mli
			add_ideas = EGY_Ali_Shamsi_for_mli
			add_ideas = EGY_Talaat_Harb_eco_mli
			add_ideas = EGY_Abdel_Hamid_Badawi_sec_mli
		}
	}
	option = { # Conservative - Watani Party
		name = egy.6.c
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = social_conservative
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1941_elections_held
			add_ideas = EGY_Hussein_Serry_hog_sco
			add_ideas = EGY_Abdelfattah_Amr_for_sco
			add_ideas = EGY_Mohamed_Ahmed_Farghaly_eco_sco
			add_ideas = EGY_Sheikh_Mahmud_Shaltut_sec_sco
		}
	}
	option = { # Conservative - Ittihad Party
		name = egy.6.e
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = authoritarian_democrat
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.15
		}
		hidden_effect = {
			set_country_flag = EGY_1941_elections_held
			add_ideas = EGY_Hassan_al_Banna_hog_ade
			add_ideas = EGY_Hassan_al_Hudaybi_for_ade
			add_ideas = EGY_Mohamed_Tawfik_Naseem_eco_ade
			add_ideas = EGY_Sayyid_Qutb_sec_ade
		}
	}
	option = { # Social Democrats - Egyptian Social Democrats Party
		name = egy.6.f
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = social_democrat
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_democrat
			popularity = 0.35
		}
		hidden_effect = {
			add_ideas = EGY_Salah_Salem_for_sde
			add_ideas = EGY_Abdel_Latif_Boghdadi_eco_sde
			add_ideas = EGY_Muhammad_Anwar_el_Sadat_sec_sde
			country_event = {
				id = egy.207
			}
		}
	}
}
### Egyptian Reforms ###
country_event = { # Administrative Reform 1
	id = egy.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.7" }
	title = egy.7.t
	desc = egy.7.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes


	option = { # Liberal - elected governors
		name = egy.7.a
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_liberal_reforms
				value = 1
			}
		}
	}
	option = { # Conservative - noble governors
		name = egy.7.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0.5
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_conservative_reforms
				value = 1
			}
		}
	}
	option = { # absolute - appointed governors
		name = egy.7.c
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.5
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
				}
			}
		}
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_absolutist_reforms
				value = 1
			}
		}
	}
}
country_event = { # Judicial Reform
	id = egy.8
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.8" }
	title = egy.8.t
	desc = egy.8.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes


	option = { # Liberal - Judicial independence
		name = egy.8.a
		ai_chance = {
			factor = 40
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
	}
	option = { # Conservative - Judicial oversight
		name = egy.8.b
		ai_chance = {
			factor = 60
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
	}
}
country_event = { # Bureaucracy Reform
	id = egy.9
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.9" }
	title = egy.9.t
	desc = egy.9.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes


	option = { # civil service
		name = egy.9.a
		ai_chance = {
			factor = 60
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
	}
	option = { # appointed ministers
		name = egy.9.b
		ai_chance = {
			factor = 40
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
	}
}
country_event = { # Land Reform 2
	id = egy.10
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.10" }
	title = egy.10.t
	desc = egy.10.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes

	option = { # Liberal - redistribute the land
		name = egy.10.a
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		remove_ideas = EGY_iqta
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_liberal_reforms
				value = 1
			}
		}
	}
	option = { # Conservative - keep status quo
		name = egy.10.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0.5
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_conservative_reforms
				value = 1
			}
		}
	}
	option = { # absolute - nationalize the land
		name = egy.10.c
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.5
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
				}
			}
		}
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_absolutist_reforms
				value = 1
			}
		}
		swap_ideas = {
			remove_idea = EGY_iqta
			add_idea = EGY_iqta_nationalized
		}
	}
}
country_event = { # Legal Reform 3
	id = egy.11
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.11" }
	title = egy.11.t
	desc = egy.11.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes

	option = { # British Influence
		name = egy.11.a
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_liberal_reforms
				value = 1
			}
		}
	}
	option = { # French Influence
		name = egy.11.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_conservative_reforms
				value = 1
			}
		}
	}
	option = { # Muhammad Ali Influence
		name = egy.11.c
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
				}
			}
		}
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_absolutist_reforms
				value = 1
			}
		}
	}
}
country_event = { # Parliamentarian Reform 4
	id = egy.12
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.12" }
	title = egy.12.t
	desc = egy.12.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes


	option = { # Liberal - strengthen parliament
		name = egy.12.a
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_liberal_reforms
				value = 1
			}
		}
	}
	option = { # Conservative - keep the status quo
		name = egy.12.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0.5
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_conservative_reforms
				value = 1
			}
		}
	}
	option = { # absolute - strengthen the monarchy
		name = egy.12.c
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.5
				has_country_flag = NOR_uob_support
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
				}
			}
		}
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_absolutist_reforms
				value = 1
			}
		}
	}
}
country_event = { # Religious Reforms
	id = egy.13
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.13" }
	title = egy.13.t
	desc = egy.13.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes


	option = { # Egypt is Secular
		name = egy.13.a
		ai_chance = {
			factor = 30
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		hidden_effect = {
			set_country_flag = EGY_egypt_is_secular
		}
	}
	option = { # Egypt is Islamic
		name = egy.13.b
		ai_chance = {
			factor = 40
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		hidden_effect = {
			set_country_flag = EGY_egypt_is_muslim
		}
	}
}
country_event = { # Education Reforms
	id = egy.14
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.14" }
	title = egy.14.t
	desc = egy.14.d
	picture = GFX_report_event_EGY_farouk_education

	is_triggered_only = yes


	option = { # Pharohnist Identity
		name = egy.14.a
		ai_chance = {
			factor = 30
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
	}
	option = { # Islamic Identiy
		name = egy.14.b
		ai_chance = {
			factor = 40
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
	}
}
country_event = { # Tax Reforms 5
	id = egy.15
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.15" }
	title = egy.15.t
	desc = egy.15.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes


	option = { # Liberal - Land Tax
		name = egy.15.a
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_liberal_reforms
				value = 1
			}
		}
	}
	option = { # Conservative - Flat
		name = egy.15.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_ABSOLUTE }
				}
			}
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_conservative_reforms
				value = 1
			}
		}
	}
	option = { # absolute - Progressive
		name = egy.15.c
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_LIBERAL }
					has_game_rule = { rule = EGY_reform option = EGY_REFORM_CONSERVATIVE }
				}
			}
		}
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.03
		}
		hidden_effect = {
			modify_country_flag = {
				flag = EGY_absolutist_reforms
				value = 1
			}
		}
	}
}
country_event = { # Literacy Reforms
	id = egy.16
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.16" }
	title = egy.16.t
	desc = egy.16.d
	picture = GFX_report_event_EGY_farouk_education

	is_triggered_only = yes


	option = { # Focus on Egyptian Arabic
		name = egy.16.a
		ai_chance = {
			factor = 90
		}
		add_stability = 0.05
	}
	option = { # Lets Revive the Coptic Language
		name = egy.16.b
		ai_chance = {
			factor = 10
		}
		add_stability = -0.1
		hidden_effect = {
			country_event = {
				id = egy.28
				days = 690
			}
			country_event = {
				id = egy.29
				days = 750
			}
		}
	}
}
country_event = { # The New Egypt
	id = egy.17
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.17" }
	title = egy.17.t
	desc = egy.17.d
	picture = GFX_report_event_EGY_farouk_crowd

	is_triggered_only = yes

	option = {
		name = egy.4.a
		if = { # Liberal Reforms Win
			limit = {
				has_country_flag = {
					flag = EGY_liberal_reforms
					value > 2
				}
			}
			set_country_flag = EGY_liberal_reform_victory
			add_stability = 0.1
		}
		else_if = { # Cosnervative Reforms Win
			limit = {
				has_country_flag = {
					flag = EGY_conservative_reforms
					value > 2
				}
			}
			set_country_flag = EGY_conservative_reform_victory
			add_stability = 0.1
		}
		else_if = { # Absolutist Reforms Win
			limit = {
				has_country_flag = {
					flag = EGY_absolutist_reforms
					value > 2
				}
			}
			set_country_flag = EGY_absolutist_reform_victory
			add_stability = 0.1
		}
		else = { # tied - default to status quo
			set_country_flag = EGY_status_quo_reforms
			add_stability = 0.1
		}
	}
}
country_event = { # Liberal Egypt
	id = egy.18
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.18" }
	title = egy.18.t
	desc = egy.18.d
	picture = GFX_report_event_EGY_farouk_crowd

	is_triggered_only = yes

	option = {
		name = egy.18.a
		add_popularity = {
			ideology = social_liberal
			popularity = 0.08
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.08
		}
	}
}
country_event = { # Conservative Egypt
	id = egy.19
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.19" }
	title = egy.19.t
	desc = egy.19.d
	picture = GFX_report_event_EGY_farouk_crowd

	is_triggered_only = yes

	option = {
		name = egy.19.a
		add_popularity = {
			ideology = social_conservative
			popularity = 0.08
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.08
		}
	}
}
country_event = { # Absolutist Egypt
	id = egy.20
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.20" }
	title = egy.20.t
	desc = egy.20.d
	picture = GFX_report_event_EGY_farouk_crowd

	is_triggered_only = yes

	option = {
		name = egy.20.a
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.25
		}
		set_politics = {
			ruling_party = paternal_autocrat
			elections_allowed = no
		}
	}
}
country_event = { # German Investment in Egypt
	id = egy.23
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.23" }
	title = egy.23.t
	desc = egy.23.d
	picture = GFX_report_event_IRE_factory_construction

	is_triggered_only = yes

	option = {
		name = egy.23.a
		hidden_effect = {
			GER = {
				country_event = {
					id = egy.24
					days = 3
				}
			}
		}
	}
}
country_event = { # German Investment in Egypt(German)
	id = egy.24
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.24" }
	title = egy.24.t
	desc = egy.24.d
	picture = GFX_report_event_IRE_factory_construction

	is_triggered_only = yes

	option = {
		name = egy.24.a
		add_ideas = EGY_german_investments
	}
}
country_event = { # German Investment in Egypt
	id = egy.25
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.25" }
	title = egy.25.t
	desc = egy.25.d
	picture = GFX_report_event_IRE_factory_construction

	is_triggered_only = yes

trigger = {
		country_exists = GER
		has_war_with = GER
	}

	option = {
		name = egy.25.a
	}
}
country_event = { # German Investment in Egypt(German)
	id = egy.26
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.26" }
	title = egy.26.t
	desc = egy.26.d
	picture = GFX_report_event_IRE_factory_construction

	is_triggered_only = yes

trigger = {
		country_exists = EGY
		has_war_with = EGY
	}

	option = {
		name = egy.26.a
	}
}
country_event = { # New Officers (doesnt fire, moved to egy.206)
	id = egy.27
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.27" }
	title = egy.27.t
	desc = egy.27.d
	picture = GFX_report_event_EGY_egyptian_troops
	is_triggered_only = yes

	option = {
		name = egy.27.a
		create_corps_commander = { # Gamel Abdel Nasser
			name = "Gamel Abdel Nasser"
			portrait_path = "gfx/leaders/EGY/Portrait_EGY_Gamel_Abdel_Nasser.png"
			id = 693481
			traits = {
				career_officer
				media_personality
			}
			skill = 2
			attack_skill = 2
			defense_skill = 2
			planning_skill = 2
			logistics_skill = 1
		}
		create_corps_commander = { # Hussein el-Shafei
			name = " Hussein el-Shafei"
			portrait_path = "gfx/leaders/EGY/Portrait_EGY_Hussein_Al_Shafei.png"
			traits = {
				career_officer
			}
			skill = 2
			attack_skill = 3
			defense_skill = 1
			planning_skill = 2
			logistics_skill = 1
		}
		create_corps_commander = { # Abdel Hakim Amer
			name = "Abdel Hakim Amer"
			portrait_path = "gfx/leaders/EGY/Portrait_EGY_abdel_hakim_amer.png"
			traits = {
				career_officer
				trait_cautious
			}
			skill = 2
			attack_skill = 2
			defense_skill = 1
			planning_skill = 2
			logistics_skill = 2
		}
	}
}
country_event = { # Institute of Coptic studies
	id = egy.28
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.28" }
	title = egy.28.t
	desc = egy.28.d
	picture = GFX_report_event_EGY_institute_coptic_studies
	is_triggered_only = yes

	option = {
		name = egy.28.a
		add_stability = 0.01
	}
}
country_event = { # Women's suffrage.
	id = egy.29
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.29" }
	title = egy.29.t
	desc = egy.29.d
	picture = GFX_report_event_EGY_ladies
	is_triggered_only = yes

	option = { # Support female suffrage
		name = egy.29.a
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		add_stability = -0.05
	}
	option = { # Support traditional values
		name = egy.29.b
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		add_stability = 0.03
	}
}

### Egyptian - Ethiopian Rivalry ###
country_event = { # Egyptian - Ethiopian Rivalry
	id = egy.58
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.58" }
	title = egy.58.t
	desc = egy.58.d
	picture = GFX_report_event_SOM_referendum

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = egy.58.a
		add_opinion_modifier = {
			target = ETH
			modifier = KR_disapproves_of_govt
		}
		reverse_add_opinion_modifier = {
			target = ETH
			modifier = KR_disapproves_of_govt
		}
		hidden_effect = {
			ETH = {
				country_event = {
					id = egy.59
					days = 1
				}
			}
		}
	}
}
country_event = { # Egyptian - Ethiopian Rivalry
	id = egy.59
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.59" }
	title = egy.59.t
	desc = egy.59.d
	picture = GFX_report_event_SOM_referendum

	is_triggered_only = yes

	option = { # Send out the invites
		name = egy.59.a
		set_global_flag = EGY_ethiopian_rivalry_flag
		hidden_effect = {
			country_event = { id = egy.66 days = 60 random_days = 120 }
		}
	}
}
country_event = { # Dividing Ethiopia
	id = egy.63
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.63" }
	title = egy.63.t
	desc = egy.63.d
	picture = GFX_report_event_generic_diplomacy3

	is_triggered_only = yes

	option = {
		name = egy.63.a
		hidden_effect = {
			ETH = {
				country_event = { id = egy.6300 days = 10 random_days = 20 }
			}
		}
	}
}
country_event = {
	id = egy.6300
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.6300" }

	hidden = yes
	is_triggered_only = yes
	
	option = { # Ethiopia is divided
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.78
				has_completed_focus = ETH_Tribe_Intergration
			}
			modifier = {
				factor = 0.57
				has_completed_focus = ETH_Haile
			}
			modifier = {
				factor = 0.25
				has_completed_focus = ETH_Finish_The_Reforms
				OR = {
					has_completed_focus = ETH_Elections
					has_completed_focus = ETH_Lion_Of_Judah
					has_completed_focus = ETH_Power_Council
				}
			}
		}
		set_country_flag = EGY_ethiopian_disloyal_tribes_flag
		country_event = egy.64
	}
	
	option = { # Ethiopia isn't divided
		ai_chance = {
			factor = 10
			modifier = {
				factor = 3
				has_completed_focus = ETH_Tribe_Intergration
			}
			modifier = {
				factor = 2.34
				has_completed_focus = ETH_Haile
			}
			modifier = {
				factor = 1.29
				has_completed_focus = ETH_Finish_The_Reforms
				OR = {
					has_completed_focus = ETH_Elections
					has_completed_focus = ETH_Lion_Of_Judah
					has_completed_focus = ETH_Power_Council
				}
			}
		}
		country_event = egy.65
	}
}
country_event = { # discontent in the empire
	id = egy.64
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.64" }
	title = egy.64.t
	desc = egy.64.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes

	option = {
		name = egy.64.a
		add_stability = -0.05
		add_war_support = -0.05
	}
}
country_event = { # The Egyptian plan fails!
	id = egy.65
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.65" }
	title = egy.65.t
	desc = egy.65.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes

	option = {
		name = egy.65.a
		add_stability = 0.05
		add_war_support = 0.05
		custom_effect_tooltip = EGY_ethloytribe_tt
		hidden_effect = {
			division_template = {
				name = "Gosa Lalī"
				division_names_group = ETH_MIL_01
				regiments = {
					militia = { x = 0 y = 0 }
					militia = { x = 0 y = 1 }
					militia = { x = 0 y = 2 }
					militia = { x = 1 y = 0 }
					militia = { x = 1 y = 1 }
					militia = { x = 1 y = 2 }
					militia = { x = 2 y = 0 }
					militia = { x = 2 y = 1 }
					militia = { x = 2 y = 2 }
				}
			}
			random_owned_controlled_state = {
				prioritize = { 961 }
				create_unit = {
					division = "name = \"6th Gosa Lalī 'Tigray Sefari'\" division_template = \"Gosa Lalī\" start_experience_factor = 0.05 start_equipment_factor = 0.8"
					prioritize_location = 8043
					owner = ROOT
				}
			}
		}
	}
}
country_event = { # Egyptian - Ethiopian Tribal border Raids(egypt view)
	id = egy.66
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.66" }
	title = egy.66.t
	desc = egy.66.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			ETH = { country_event = egy.67 }
		}
	}

trigger = {
		owns_sudan = yes
		NOT = { has_war_with = ETH }
	}

	option = {
		name = egy.66.a
		add_stability = -0.01
	}
}
country_event = { # Egyptian - Ethiopian Tribal border Raids(Ethiopia view)
	id = egy.67
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.67" }
	title = egy.67.t
	desc = egy.67.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes

trigger = {
		NOT = { has_war_with = EGY }
	}

	option = {
		name = egy.67.a
		add_stability = -0.01
	}
}
country_event = { # try to stir up tension in Sudan
	id = egy.68
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.68" }
	title = egy.68.t
	desc = egy.68.d
	picture = GFX_report_event_SOM_intro

	fire_only_once = yes

trigger = {
		tag = ETH
		has_global_flag = EGY_ethiopian_rivalry_flag
		NOT = { has_war_with = EGY }
	}

	mean_time_to_happen = {
		months = 4
	}

	option = {
		name = egy.68.a
		hidden_effect = {
			EGY = {
				country_event = { id = egy.6800 days = 10 random_days = 20 }
			}
		}
	}
}
country_event = {
	id = egy.6800
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.6800" }

	hidden = yes
	is_triggered_only = yes
	
	option = { # Egypt is divided
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.78
				has_completed_focus = EGY_modernize_sudan
			}
			modifier = {
				factor = 0.57
				has_completed_focus = EGY_resources_of_the_south
			}
			modifier = {
				factor = 0.25
				has_completed_focus = EGY_finish_reforms
			}
		}
		set_country_flag = EGY_egyptian_disloyal_tribes_flag
		country_event = egy.69
	}
	
	option = { # Egypt isn't divided
		ai_chance = {
			factor = 10
			modifier = {
				factor = 3
				has_completed_focus = EGY_modernize_sudan
			}
			modifier = {
				factor = 2.34
				has_completed_focus = EGY_resources_of_the_south
			}
			modifier = {
				factor = 1.29
				has_completed_focus = EGY_finish_reforms
			}
		}
		country_event = egy.70
	}
}
country_event = { # Tribal tensions in Sudan!
	id = egy.69
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.69" }
	title = egy.69.t
	desc = egy.69.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes

	option = {
		name = egy.69.a
		add_stability = -0.05
		add_war_support = -0.05
	}
}
country_event = { # Sudanese Tribes pledge loyalty to the Sultan
	id = egy.70
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.70" }
	title = egy.70.t
	desc = egy.70.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes

	option = {
		name = egy.70.a
		add_stability = 0.05
		add_war_support = 0.05
		custom_effect_tooltip = EGY_sudloytribe_tt
		hidden_effect = {
			division_template = {
				name = "Al-Milishiya"
				division_names_group = EGY_MIL_01
				regiments = {
					militia = { x = 0 y = 0 }
					militia = { x = 0 y = 1 }
					militia = { x = 0 y = 2 }
					militia = { x = 1 y = 0 }
					militia = { x = 1 y = 1 }
					militia = { x = 1 y = 2 }
					militia = { x = 2 y = 0 }
					militia = { x = 2 y = 1 }
					militia = { x = 2 y = 2 }
				}
			}
			random_owned_controlled_state = {
				prioritize = { 544 }
				create_unit = {
					division = "name = \"Al-Milishiya 'Shilluk'\" division_template = \"Al-Milishiya\" start_experience_factor = 0.05 start_equipment_factor = 0.8"
					prioritize_location = 12744
					owner = ROOT
				}
				create_unit = {
					division = "name = \"Al-Milishiya 'Dinka'\" division_template = \"Al-Milishiya\" start_experience_factor = 0.05 start_equipment_factor = 0.8"
					prioritize_location = 12744
					owner = ROOT
				}
			}
		}
	}
}
country_event = { # Sudanese Tribes rise up for us(Ethiopia)
	id = egy.71
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.71" }
	title = egy.71.t
	desc = egy.71.d
	picture = GFX_report_event_SOM_intro

	fire_only_once = yes
	is_triggered_only = yes

trigger = {
		has_war_with = EGY
		has_country_flag = EGY_egyptian_disloyal_tribes_flag
	}

	option = {
		name = egy.71.a
		custom_effect_tooltip = EGY_sudloytribe_tt
		hidden_effect = {
			division_template = {
				name = "Gosa Lalī"
				division_names_group = ETH_MIL_01
				regiments = {
					militia = { x = 0 y = 0 }
					militia = { x = 0 y = 1 }
					militia = { x = 0 y = 2 }
					militia = { x = 1 y = 0 }
					militia = { x = 1 y = 1 }
					militia = { x = 1 y = 2 }
					militia = { x = 2 y = 0 }
					militia = { x = 2 y = 1 }
					militia = { x = 2 y = 2 }
				}
			}
			random_state = {
				prioritize = { 549 }
				limit = {
					owner = { has_war_with = ROOT }
					any_neighbor_state = { is_owned_and_controlled_by = ROOT }
				}
				create_unit = {
					division = "name = \"9th Gosa Lalī 'Shilluk Sefari'\" division_template = \"Gosa Lalī\" start_experience_factor = 0.05 start_equipment_factor = 0.8"
					allow_spawning_on_enemy_provs = yes
					prioritize_location = 2096
					owner = ROOT
				}
				create_unit = {
					division = "name = \"10th Gosa Lalī 'Dinka Sefari'\" division_template = \"Gosa Lalī\" start_experience_factor = 0.05 start_equipment_factor = 0.8"
					allow_spawning_on_enemy_provs = yes
					prioritize_location = 2096
					owner = ROOT
				}
			}
			EGY = { country_event = egy.73 }
		}
	}
}
country_event = { # Ethiopian Tribes rally to us(Egypt)
	id = egy.72
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.72" }
	title = egy.72.t
	desc = egy.72.d
	picture = GFX_report_event_SOM_intro

	fire_only_once = yes
	is_triggered_only = yes

trigger = {
		has_war_with = ETH
		has_country_flag = EGY_ethiopian_disloyal_tribes_flag
	}

	option = {
		name = egy.72.a
		custom_effect_tooltip = EGY_ethloytribe_tt
		hidden_effect = {
			division_template = {
				name = "Al-Milishiya"
				division_names_group = EGY_MIL_01
				regiments = {
					militia = { x = 0 y = 0 }
					militia = { x = 0 y = 1 }
					militia = { x = 0 y = 2 }
					militia = { x = 1 y = 0 }
					militia = { x = 1 y = 1 }
					militia = { x = 1 y = 2 }
					militia = { x = 2 y = 0 }
					militia = { x = 2 y = 1 }
					militia = { x = 2 y = 2 }
				}
			}
			random_state = {
				prioritize = { 550 }
				limit = {
					owner = { has_war_with = ROOT }
					any_neighbor_state = { is_owned_and_controlled_by = ROOT }
				}
				create_unit = {
					division = "name = \"Al-Milishiya 'Tigray'\" division_template = \"Al-Milishiya\" start_experience_factor = 0.05 start_equipment_factor = 0.8"
					allow_spawning_on_enemy_provs = yes
					prioritize_location = 12723
					owner = ROOT
				}
			}
			ETH = { country_event = egy.74 }
		}
	}
}
country_event = { # tribal militias rise up against us(egypt)
	id = egy.73
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.73" }
	title = egy.73.t
	desc = egy.73.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes

	option = {
		name = egy.73.a
		add_stability = -0.05
	}
}
country_event = { # tribal militias rise up against us(Ethiopia)
	id = egy.74
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.74" }
	title = egy.74.t
	desc = egy.74.d
	picture = GFX_report_event_SOM_intro

	is_triggered_only = yes

	option = {
		name = egy.74.a
		add_stability = -0.05
	}
}
### Sudan Rebellion ###
country_event = { # Lead up to the Rebellion
	id = egy.75
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.75" }
	title = egy.75.t
	desc = egy.75.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = EGY
		is_subject = no
		NOT = {
			has_global_flag = EGY_second_mahdist_war
		}
	}

	is_triggered_only = yes

	option = {
		name = egy.75.a
		set_country_flag = EGY_leadup_to_second_mahdist_war
	}
}
country_event = { # Sudan Revolts
	id = egy.76
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.76" }
	title = egy.76.t
	desc = egy.76.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = EGY
		is_subject = no
		NOT = {
			has_global_flag = EGY_second_mahdist_war
		}
	}

	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			every_state = {
				limit = { is_core_of = SUD }
				remove_core_of = EGY
				add_claim_by = EGY
			}
		}
	}

	option = { # Fight Sudan
		name = egy.76.a
		ai_chance = {
			factor = 100
		}
		set_global_flag = EGY_second_mahdist_war
		if = {
			limit = {
				has_country_flag = EGY_liberal_reform_victory
			}
			every_owned_state = {
				limit = {
					OR = {
						state = 551
						state = 862
						state = 1007
						state = 1010
						state = 1011
					}
				}
				SUD = {
					transfer_state = PREV
				}
			}
			hidden_effect = {
				EGY = {
					SUD = {
						transfer_technology = yes
					}
				}
				SUD = {
					load_oob = SUD_mahdist_militias
					add_ideas = SUD_mahdist_warriors1
				}
				country_event = {
					id = egy.77
					days = 1
				}
			}
			else = {
				every_owned_state = {
					limit = { is_core_of = SUD }
					SUD = {
						transfer_state = PREV
					}
				}
				hidden_effect = {
					EGY = {
						SUD = {
							transfer_technology = yes
						}
					}
					SUD = {
						load_oob = SUD_mahdist_militias
						add_ideas = SUD_mahdist_warriors2
					}
					country_event = {
						id = egy.78
						days = 1
					}
				}
			}
		}
		declare_war_on = {
			target = SUD
			type = annex_everything
		}
		hidden_effect = {
			news_event = {
				id = worldnews.201
			}
		}
	}
	option = { # Play as Sudan
		name = egy.76.b
		ai_chance = {
			factor = 0
		}
		set_global_flag = EGY_second_mahdist_war
		if = {
			limit = {
				has_country_flag = EGY_liberal_reform_victory
			}
			every_owned_state = {
				limit = { is_core_of = SUD }
				SUD = {
					transfer_state = PREV
				}
			}
			hidden_effect = {
				EGY = {
					SUD = {
						transfer_technology = yes
					}
				}
				SUD = {
					load_oob = SUD_mahdist_militias
					add_ideas = SUD_mahdist_warriors1
				}
				country_event = {
					id = egy.77
					days = 1
				}
			}
			else = {
				every_owned_state = {
					limit = { is_core_of = SUD }
					SUD = {
						transfer_state = PREV
					}
				}
				hidden_effect = {
					EGY = {
						SUD = {
							transfer_technology = yes
						}
					}
					SUD = {
						load_oob = SUD_mahdist_militias
						add_ideas = SUD_mahdist_warriors2
					}
					country_event = {
						id = egy.78
						days = 1
					}
				}
			}
		}
		declare_war_on = {
			target = SUD
			type = annex_everything
		}
		SUD = {
			change_tag_from = EGY
		}
		hidden_effect = {
			news_event = {
				id = worldnews.201
			}
		}
	}
}
country_event = { # South Sudan Tribes stays loyal
	id = egy.77
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.77" }
	title = egy.77.t
	desc = egy.77.d
	picture = GFX_report_event_EGY_sudan_rebels

	is_triggered_only = yes

	option = {
		name = egy.77.a
		hidden_effect = {
			load_oob = SUD_mahdist_loyal_militias
		}
		custom_effect_tooltip = EGY_sudloytribe_tt
		549 = {
			remove_claim_by = EGY
			add_core_of = EGY
		}
	}
}
country_event = { # South Sudan Joins the Rebellion
	id = egy.78
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.78" }
	title = egy.78.t
	desc = egy.78.d
	picture = GFX_report_event_EGY_sudan_rebels

	is_triggered_only = yes

	option = {
		name = egy.78.a
		# add_war_support = 0.03
	}
}
country_event = { # Support the Sudanese?
	id = egy.79
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.79" }
	title = egy.79.t
	desc = egy.79.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = ETH
		is_subject = no
	}

	is_triggered_only = yes

	option = { # Support Sudan
		name = egy.79.a
		ai_chance = {
			factor = 60
		}
		add_equipment_to_stockpile = {
			type = infantry_equipment_1
			amount = -2000
			producer = ETH
		}
		hidden_effect = {
			SUD = {
				country_event = {
					id = egy.80
					days = 1
				}
			}
		}
		add_stability = -0.05
	}
	option = { # don't Support Sudan
		name = egy.79.b
		ai_chance = {
			factor = 40
		}
		add_stability = 0.05
	}
}
country_event = { # Ethiopian Support
	id = egy.80
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.80" }
	title = egy.80.t
	desc = egy.80.d
	picture = GFX_report_event_EGY_sudan_rebels

	is_triggered_only = yes

	option = {
		name = egy.80.a
		add_equipment_to_stockpile = {
			type = infantry_equipment_1
			amount = 2000
			producer = ETH
		}
	}
}
country_event = { # Egypt Victory!
	id = egy.81
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.81" }
	title = egy.81.t
	desc = egy.81.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = EGY
		is_subject = no
		has_global_flag = EGY_second_mahdist_war
		owns_sudan = yes
		NOT = {
			country_exists = SUD
		}
	}

	is_triggered_only = yes


	option = {
		name = egy.81.a
		add_stability = 0.05
		hidden_effect = {
			EGY = {
				country_event = {
					id = egy.82
					days = 1
				}
			}
			862 = {
				remove_claim_by = EGY
				add_core_of = EGY
			}
			551 = {
				remove_claim_by = EGY
				add_core_of = EGY
			}
			1007 = {
				remove_claim_by = EGY
				add_core_of = EGY
			}
			1011 = {
				remove_claim_by = EGY
				add_core_of = EGY
			}
			549 = {
				remove_claim_by = EGY
				add_core_of = EGY
			}
			1010 = {
				remove_claim_by = EGY
				add_core_of = EGY
			}
		}
	}
}
country_event = { # Handling the Rebels?
	id = egy.82
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.82" }
	title = egy.82.t
	desc = egy.82.d
	picture = GFX_report_event_EGY_sudan_rebels

	is_triggered_only = yes

	option = { # be merciful
		name = egy.82.a
		add_stability = 0.03
	}
	option = { # be harsh
		name = egy.82.b
		add_political_power = 100
	}
}
country_event = { # Sudan Victory
	id = egy.83
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.83" }
	title = egy.83.t
	desc = egy.83.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = SUD
		is_subject = no
		has_global_flag = EGY_second_mahdist_war
		EGY = {
			NOT = {
				owns_sudan = yes
			}
		}
		country_exists = SUD
		EGY = {
			NOT = {
				has_war_with = SUD
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = egy.83.a
		add_stability = 0.15
		if = {
			limit = {
				has_idea = SUD_mahdist_warriors1
			}
			remove_ideas = SUD_mahdist_warriors1
		}
		if = {
			limit = {
				has_idea = SUD_mahdist_warriors2
			}
			remove_ideas = SUD_mahdist_warriors2
		}
		hidden_effect = {
			set_global_flag = EGY_second_mahdist_war_sudan_victory
		}
	}
}
country_event = { # Stay National-Populist or go Paternal Autocrat
	id = egy.84
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.84" }
	title = egy.84.t
	desc = egy.84.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = SUD
		is_subject = no
		has_dictatorship_government = yes
		has_global_flag = EGY_second_mahdist_war_sudan_victory
		owns_sudan = yes
	}

	is_triggered_only = yes

	option = { # Become National-Populist
		name = egy.84.a
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = national_populist
			elections_allowed = no
		}
	}
	option = { # Stay Paternal Autocrat
		name = egy.84.b
		ai_chance = {
			factor = 70
		}
		set_politics = {
			ruling_party = paternal_autocrat
			elections_allowed = no
		}
	}
}
country_event = { # Sudan spooks MittleAfrika
	id = egy.85
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.85" }
	title = egy.85.t
	desc = egy.85.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = MAF
		has_global_flag = EGY_second_mahdist_war_sudan_victory
	}

	is_triggered_only = yes

	option = {
		name = egy.85.a
		add_stability = -0.05
	}
}
country_event = { # Sudan looks to Ethiopia
	id = egy.86
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.86" }
	title = egy.86.t
	desc = egy.86.d
	picture = GFX_report_event_EGY_sudan_rebels

	fire_only_once = yes

trigger = {
		tag = SUD
		is_subject = no
		has_dictatorship_government = yes
		has_global_flag = EGY_second_mahdist_war_sudan_victory
	}

	is_triggered_only = yes

	option = { # War
		name = egy.86.a
		declare_war_on = {
			target = ETH
			type = annex_everything
		}
		hidden_effect = {
			ETH = {
				country_event = {
					id = egy.87
					days = 1
				}
			}
		}
	}
	option = { # Peace!
		name = egy.86.b
	}
}
country_event = { # War with Sudan!
	id = egy.87
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.87" }
	title = egy.87.t
	desc = egy.87.d
	picture = GFX_report_event_EGY_sudan_rebels

	is_triggered_only = yes

	option = {
		name = egy.87.a
		# add_war_support = 0.03
	}
}
### Pharaonism Events ###
country_event = { # Questions of Egyptian Identity
	id = egy.100
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.100" }
	title = egy.100.t
	desc = egy.100.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes

	option = {
		name = egy.100.a
		set_variable = { EGY_pharaonism = 0 }
	}
}
country_event = { # Library debate
	id = egy.101
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.101" }
	title = egy.101.t
	desc = egy.101.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes

	option = { # Library of Alexandria
		name = egy.101.a
		add_popularity = {
			ideology = social_liberal
			popularity = 0.03
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.03
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
	option = { # House of Knowledge
		name = egy.101.b
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
	}
}
country_event = { # Capital of Egypt
	id = egy.102
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.102" }
	title = egy.102.t
	desc = egy.102.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes

	option = { # Cairo
		name = egy.102.a
		ai_chance = {
			factor = 70
		}
		set_country_flag = EGY_capital_cairo
		set_capital = { state = 447 }
	}
	option = { # Alexandria
		name = egy.102.b
		ai_chance = {
			factor = 30
		}
		set_country_flag = EGY_capital_alexandria
		set_capital = { state = 446 }
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
}
country_event = { # A new Lighthouse for Egypt
	id = egy.103
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.103" }
	title = egy.103.t
	desc = egy.103.d
	picture = GFX_report_event_EGY_egyptian_palace

	fire_only_once = yes

	is_triggered_only = yes 

	option = { # a new Lighthouse of Alexandria
		name = egy.103.a
		ai_chance = {
			factor = 40
		}
		add_timed_idea = {
			idea = EGY_building_costs
			days = 120
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
		446 = {
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
	}
	option = { # spend the money elsewhere
		name = egy.103.b
		ai_chance = {
			factor = 60
		}
		add_stability = 0.01
	}
}
country_event = { # Minister of Education
	id = egy.104
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.104" }
	title = egy.104.t
	desc = egy.104.d
	picture = GFX_report_event_EGY_farouk_enthroned
	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			remove_ideas_with_trait = security_minister
		}
	}

	option = { # Let the Wafd appoint their ministers
		name = egy.104.a
		add_ideas = EGY_Taha_Hussein_sec_sli
		add_popularity = {
			ideology = social_liberal
			popularity = 0.05
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.05
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
	option = { # Unified Minister of Propaganda
		name = egy.104.b
		add_ideas = EGY_Sayyid_Qutb_sec_ade
		add_popularity = {
			ideology = social_conservative
			popularity = 0.05
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.05
		}
		hidden_effect = {
			country_event = {	
				id = egy.1043
				days = 32
			}
		}
	}
}
country_event = { # HoG
	id = egy.1042
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.1042" }
	title = egy.1042.t
	desc = egy.1042.d
	picture = GFX_report_event_EGY_hussein
	is_triggered_only = yes
	
trigger = {
		OR = {
			has_government = social_democrat
			has_government = social_liberal
			has_government = market_liberal
		}
	}

	option = { # Sec
		name = egy.1042.a
		ai_chance = {
			factor = 50
		}
		add_stability = 0.06
		add_political_power = 30
		add_popularity = {
			ideology = social_liberal
			popularity = 0.04
		}
	}
	option = { # Hog
		name = egy.1042.b
		ai_chance = {
			factor = 25
		}
		remove_ideas_with_trait = head_of_government
		add_ideas = EGY_Taha_Hussein_hog_sli
		add_to_variable = {
			var = EGY_pharaonism
			value = 2
		}
	}
	
	option = { # Hog + new name
		name = egy.1042.c
		ai_chance = {
			factor = 25
		}
		remove_ideas_with_trait = head_of_government
		add_ideas = EGY_Taha_Hussein_hog_sli
		set_cosmetic_tag = EGY_Kemet
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_KEMET }
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 4
		}
		if = {	
			limit = { has_country_leader = { name = "Farouk I" ruling_only = yes } }
			set_country_leader_portrait = {
				portrait = "gfx/leaders/EGY/Portrait_Egypt_Farouk_Pharaoh.png"
			}
		}			
	}
}
country_event = { # HoG
	id = egy.1043
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.1043" }
	title = egy.1043.t
	desc = egy.1043.d
	picture = GFX_report_event_EGY_shaykh_makhluf
	is_triggered_only = yes
	
trigger = {
		OR = {
			has_government = social_conservative
			has_government = authoritarian_democrat
			has_government = paternal_autocrat
		}
	}

	option = { # Egy
		name = egy.1043.a
		ai_chance = {
			factor = 75
		}
		add_stability = 0.02
	}
	option = { # Masr
		name = egy.1043.b
		ai_chance = {
			factor = 25
		}
		set_cosmetic_tag = EGY_Masr
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_EGYPT_KINGDOM }
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.03
		}
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.03
		}
	}
	
}
country_event = { # Literature Competition
	id = egy.105
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.105" }
	title = egy.105.t
	desc = egy.105.d
	picture = GFX_report_event_EGY_farouk_enthroned
	is_triggered_only = yes

	option = { # Pharohnist
		name = egy.105.a
		add_popularity = {
			ideology = social_liberal
			popularity = 0.05
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.05
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
	option = { # Islamist
		name = egy.105.b
		add_popularity = {
			ideology = social_conservative
			popularity = 0.05
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.05
		}
	}
}
country_event = { # New Grand Imam of the Al-Azhar University
	id = egy.106
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.106" }
	title = egy.106.t
	desc = egy.106.d
	picture = GFX_report_event_EGY_egyptian_palace

	is_triggered_only = yes

	option = { # Pharohnist
		name = egy.106.a
		add_popularity = {
			ideology = social_liberal
			popularity = 0.05
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.05
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
	option = { # Islamist
		name = egy.106.b
		add_popularity = {
			ideology = social_conservative
			popularity = 0.05
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.05
		}
	}
}
country_event = { # The Damming of the Nile
	id = egy.107
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.107" }
	title = egy.107.t
	desc = egy.107.d
	picture = GFX_report_event_MAF_highlands
	is_triggered_only = yes

	option = { # Pharohnist
		name = egy.107.a
		add_popularity = {
			ideology = social_liberal
			popularity = 0.05
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.05
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
	option = { # Islamist
		name = egy.107.b
		add_popularity = {
			ideology = social_conservative
			popularity = 0.05
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.05
		}
	}
}
country_event = { # Ministry of Awqaf
	id = egy.108
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.108" }
	title = egy.108.t
	desc = egy.108.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes

	option = { # Pharohnist
		name = egy.108.a
		decrease_ruling_party_popularity_by_5 = yes
		add_political_power = 25
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
	option = { # Islamist
		name = egy.108.b
		increase_ruling_party_popularity_by_5 = yes
		add_political_power = -25
	}
}
country_event = { # Antara is released to theatres
	id = egy.109
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.109" }
	title = egy.109.t
	desc = egy.109.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes

	option = { # Pharohnist
		name = egy.109.a
		add_popularity = {
			ideology = social_liberal
			popularity = 0.05
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.05
		}
		add_to_variable = {
			var = EGY_pharaonism
			value = 1
		}
	}
	option = { # Islamist
		name = egy.109.b
		add_popularity = {
			ideology = social_conservative
			popularity = 0.05
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.05
		}
	}
}
### Royal Events ###
country_event = { # Farouk's Royal Marriage
	id = egy.110
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.110" }
	title = egy.110.t
	desc = { # Egyptian bride only
		text = egy.110.d.egypt_bride_only
	trigger = {
			NOT = {
				country_exists = SAU
				PER = { has_completed_focus = PER_long_live }
			}
		}
	}
	desc = { # Egyptian and Arab bride
		text = egy.110.d.egypt_arab
	trigger = {
			country_exists = SAU
			NOT = {
				PER = { has_country_flag = monarchy_persia }
			}
		}
	}
	desc = { # Egyptian and Iranian Bride
		text = egy.110.d.egypt_iranian
	trigger = {
			NOT = { country_exists = SAU }
			PER = { has_country_flag = monarchy_persia }
		}
	}
	desc = { # All three Bride choices
		text = egy.110.d.all_brides
	trigger = {
			country_exists = SAU
			PER = { has_country_flag = monarchy_persia }
		}
	}
	picture = GFX_report_event_EGY_royal_marriage_egyptian
	is_triggered_only = yes

	option = { # Egyptian Noble
		name = egy.110.a
		ai_chance = {
			factor = 60
		}
		hidden_effect = {
			set_country_flag = EGY_egyptian_bride_flag
			EGY = {
				country_event = {
					id = egy.111
					days = 30
				}
			}
		}
	}
	option = { # Arab Bride
		name = egy.110.b
		ai_chance = {
			factor = 10
		}
	trigger = {
			SAU = {
				exists = yes
			}
		}
		hidden_effect = {
			set_country_flag = EGY_arab_bride_flag
			EGY = {
				country_event = {
					id = egy.111
					days = 30
				}
			}
			SAU = {
				country_event = {
					id = egy.111
					days = 30
				}
			}
		}
	}
	option = { # Persian Princess
		name = egy.110.c
		ai_chance = {
			factor = 20
		}
	trigger = {
			PER = { has_completed_focus = PER_long_live }
		}
		hidden_effect = {
			set_country_flag = EGY_persian_bride_flag
			EGY = {
				country_event = {
					id = egy.111
					days = 30
				}
			}
			PER = {
				country_event = {
					id = egy.117
					days = 10
				}
			}
		}
	}
}
country_event = {#Albania
	id = egy.1104
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.1104" }
	title = egy.1104.t
	desc = { #Less schizo schizoism
		text = egy.1104.d.nokemet
	trigger = {
			NOT = {
				OR = {
					has_country_leader_ideology = socdem_pharaonism_subtype 
					has_country_leader_ideology = pharaonism_subtype 
					has_country_leader_ideology = marlib_pharaonism_subtype 
				}
			}
		}
	}
	desc = { #Kemet, in the house
		text = egy.1104.d.kemet
	trigger = {
			OR = {
				has_country_leader_ideology = socdem_pharaonism_subtype 
				has_country_leader_ideology = pharaonism_subtype 
				has_country_leader_ideology = marlib_pharaonism_subtype 
			}
		}
	}
	picture = GFX_report_event_EGY_muhammad_ali_pasha

	fire_only_once = yes
	
	mean_time_to_happen = {
		days = 180
	}
	
trigger = {
		tag = EGY
		EGY = { 
		has_completed_focus = EGY_Claim_Albanian_Throne
		owns_state = 44
		owns_state = 766
		owns_state = 1268
		}
		NOT = {
		country_exists = ALB
		}
		NOT = {
			has_country_leader = {
				ruling_only = yes
				name = "Abbas Helmy III"
			}
		}
	}

	option = { #Skanderbeg
		name = egy.1104.a
		ai_chance = {
			factor = 25
		}
		if = {	
			limit = { has_country_leader = { name = "Farouk I" ruling_only = yes } }
			set_country_leader_name = {
				name = "Skanderbeg II"
			}
		}
		set_cosmetic_tag = EGY_ALB
		every_state = {
			limit = {
				OR = {
					is_core_of = ALB
					is_claimed_by = ALB
				}
			}
			add_core_of = EGY
		}
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_EGYPT_KINGDOM }
		}
	}

	option = {#Muhammad Ali
		name = egy.1104.b
		ai_chance = {
			factor = 25
		}
		if = {	
			limit = { has_country_leader = { name = "Farouk I" ruling_only = yes } }
			set_country_leader_name = {
				name = "Muhammad Ali II"
			}
		}
		set_cosmetic_tag = EGY_ALB_Ali
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_EGYPT_KINGDOM }
		}
		every_state = {
			limit = {
				OR = {
					is_core_of = ALB
					is_claimed_by = ALB
				}
			}
			add_core_of = EGY
		}
	}

	option = { #Mekemet
		name = egy.1104.c
	trigger = {
			OR = {
				has_country_leader_ideology = socdem_pharaonism_subtype 
				has_country_leader_ideology = pharaonism_subtype 
				has_country_leader_ideology = marlib_pharaonism_subtype 
			}
		}
		ai_chance = {
			factor = 25
		}
		if = {	
			limit = { has_country_leader = { name = "Farouk I" ruling_only = yes } }
			set_country_leader_name = {
				name = "Mekemet"
			}
		}
		set_cosmetic_tag = EGY_ALB_Kemet
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_KEMET }
		}
		every_state = {
			limit = {
				OR = {
					is_core_of = ALB
					is_claimed_by = ALB
				}
			}
			add_core_of = EGY
		}
	}

	option = {#Keep Farouk
		name = egy.1104.e
		ai_chance = {
			factor = 25
		}
		every_state = {
			limit = {
				OR = {
					is_core_of = ALB
					is_claimed_by = ALB
				}
			}
			add_core_of = EGY
		}
	}
}
country_event = {#Albania
	id = egy.1124
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.1124" }
	title = egy.1124.t
	desc = { #Greater Liberals
		text = egy.1124.d.unitedlib
	trigger = {
			OR = {
				has_country_leader_ideology = socdem_pharaonism_subtype 
				has_country_leader_ideology = pharaonism_subtype 
				has_country_leader_ideology = marlib_pharaonism_subtype 
			}
		}
	}
	desc = { #Greater Conservatives
		text = egy.1124.d.unitedcon
	trigger = {
			NOT = {
				OR = {
				  has_country_leader_ideology = socdem_pharaonism_subtype 
				  has_country_leader_ideology = pharaonism_subtype 
				  has_country_leader_ideology = marlib_pharaonism_subtype 
				}
			}
		}
	}
	picture = GFX_report_event_EGY_egypt_levant

	is_triggered_only = yes
	
trigger = {
		NOT = { has_country_flag = EGY_is_republic }
	}

	option = { #Keep
		name = egy.1124.a
		ai_chance = {
			factor = 65
		}
	}

	option = {#Second Empire
		name = egy.1124.b
	trigger = {
			OR = {
				has_country_leader_ideology = socdem_pharaonism_subtype 
				has_country_leader_ideology = pharaonism_subtype 
				has_country_leader_ideology = marlib_pharaonism_subtype 
			}
		}
		ai_chance = {
			factor = 25
		}
		set_cosmetic_tag = EGY_Greater_Empire
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_KEMET }
		}
	}

	option = { #Second Kemet
		name = egy.1124.c
	trigger = {
			AND = {
			OR = {
				has_country_leader_ideology = socdem_pharaonism_subtype 
				has_country_leader_ideology = pharaonism_subtype 
				has_country_leader_ideology = marlib_pharaonism_subtype 
			}
			OR = {
				has_cosmetic_tag = EGY_Kemet
				has_cosmetic_tag = EGY_ALB_Kemet
			}
			}
		}
		ai_chance = {
			factor = 25
		}
		set_cosmetic_tag = EGY_Greater_Kemet
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_KEMET }
		}
	}

	option = {#Alawiyya
		name = egy.1124.e
	trigger = {
			NOT = {
				OR = {
				has_country_leader_ideology = socdem_pharaonism_subtype 
				has_country_leader_ideology = pharaonism_subtype 
				has_country_leader_ideology = marlib_pharaonism_subtype 
				}
			}
		}
		ai_chance = {
			factor = 25
		}
		set_cosmetic_tag = EGY_Greater_Alawiyya
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_EGYPT }
		}
	}
}
country_event = { # Royal Wedding
	id = egy.111
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.111" }
	title = egy.111.t
	desc = { # Egyptian Wife
		text = egy.111.d.egyptian_bride
	trigger = {
			has_country_flag = EGY_egyptian_bride_flag
		}
	}
	desc = { # Arab Wife - Egypt
		text = egy.111.d.arab_bride
	trigger = {
			tag = EGY
			EGY = {
				has_country_flag = EGY_arab_bride_flag
			}
		}
	}
	desc = { # Persian wife - Egypt
		text = egy.111.d.persian_bride
	trigger = {
			tag = EGY
			EGY = {
				has_country_flag = EGY_persian_bride_flag
			}
		}
	}
	desc = { # Arab Wife - Saudis
		text = egy.111.d.arab_bride_saudi
	trigger = {
			tag = SAU
			EGY = {
				has_country_flag = EGY_arab_bride_flag
			}
		}
	}
	desc = { # Persian wife - Iranians
		text = egy.111.d.persian_bride_iranian
	trigger = {
			tag = PER
			EGY = {
				has_country_flag = EGY_persian_bride_flag
			}
		}
	}
	picture = GFX_report_event_EGY_royal_marriage_egyptian

	is_triggered_only = yes

	option = {
		name = egy.111.a
		add_stability = 0.01
		hidden_effect = {
			if = {
				limit = { tag = EGY }
				set_country_flag = EGY_royal_wedding_flag
				country_event = {
					id = egy.114
					days = 60
				}
			}
		}
	}
}
country_event = { # Heir Born
	id = egy.112
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.112" }
	title = egy.112.t
	desc = { # Egyptian Wife
		text = egy.112.d.egyptian_bride
	trigger = {
			has_country_flag = EGY_egyptian_bride_flag
		}
	}
	desc = { # Arab Wife
		text = egy.112.d.arab_bride
	trigger = {
			has_country_flag = EGY_arab_bride_flag
		}
	}
	desc = { # Persian wife
		text = egy.112.d.persian_bride
	trigger = {
			has_country_flag = EGY_persian_bride_flag
		}
	}
	picture = GFX_report_event_EGY_queen_farida

	fire_only_once = yes

trigger = {
		tag = EGY
		has_country_flag = EGY_royal_wedding_flag
		date > 1938.1.1
	}

	mean_time_to_happen = {
		months = 46
	}

	option = {
		name = egy.112.a
		add_stability = 0.01
	}
}
country_event = { # The Coronation of Farouk
	id = egy.113
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.113" }
	title = egy.113.t
	desc = egy.113.d
	picture = GFX_report_event_EGY_farouk_enthroned

	is_triggered_only = yes
trigger = {
		has_country_leader = {
			name = "Farouk I"
			ruling_only = yes
		}
	}

	option = {
		name = egy.113.a
		add_stability = 0.01
		hidden_effect = {
			country_event = {
				id = egy.110
				days = 110
			}
		}
	}
}
country_event = { # Sultana becomes head of Girl Guides
	id = egy.114
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.114" }
	title = egy.114.t
	desc = { # Egyptian Wife
		text = egy.114.d.egyptian_bride
	trigger = {
			has_country_flag = EGY_egyptian_bride_flag
		}
	}
	desc = { # Arab Wife
		text = egy.114.d.arab_bride
	trigger = {
			has_country_flag = EGY_arab_bride_flag
		}
	}
	desc = { # Persian wife
		text = egy.114.d.persian_bride
	trigger = {
			has_country_flag = EGY_persian_bride_flag
		}
	}
	picture = GFX_report_event_EGY_queen_farida
	is_triggered_only = yes

	option = {
		name = egy.114.a
		add_political_power = 20
	}
}
country_event = { # Egyptian Revival Architecture
	id = egy.115
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.115" }
	title = egy.115.t
	desc = { # Cairo is the capital
		text = egy.115.d.capital_cairo
	trigger = {
			has_country_flag = EGY_capital_cairo
		}
	}
	desc = { # Alexandria is the capital
		text = egy.115.d.capital_alexandria
	trigger = {
			has_country_flag = EGY_capital_alexandria
		}
	}
	picture = GFX_report_event_EGY_egyptian_palace

	fire_only_once = yes

trigger = {
		tag = EGY
		OR = {
			has_country_flag = EGY_capital_cairo
			has_country_flag = EGY_capital_alexandria
		}
		has_completed_focus = EGY_modernization_program
	}

	mean_time_to_happen = {
		months = 28
	}

	option = { # A new style for Egypt
		name = egy.115.a
		add_political_power = 20
	}
}
country_event = { # Spring Flower Show
	id = egy.116
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.116" }
	title = egy.116.t
	desc = egy.116.d
	picture = GFX_report_event_EGY_spring_flower_show

	is_triggered_only = yes

	option = { # Pharohnist
		name = egy.116.a
		add_political_power = 25
	}
}
country_event = { # A royal Wedding?
	id = egy.117
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.117" }
	title = egy.117.t
	desc = egy.117.d
	picture = GFX_report_event_EGY_royal_marriage_egyptian

	fire_only_once = yes

trigger = {
		tag = PER
		has_country_flag = monarchy_persia
	}

	is_triggered_only = yes

	option = { # Pharohnist
		name = egy.117.a
		ai_chance = {
			factor = 90
		}
		EGY = {
			country_event = {
				id = egy.118
				days = 30
			}
		}
		PER = {
			country_event = {
				id = egy.118
				days = 30
			}
		}
	}
	option = { # Islamist
		name = egy.117.b
		ai_chance = {
			factor = 10
		}
		EGY = {
			country_event = {
				id = egy.119
				days = 30
			}
		}
	}
}
country_event = { # A Royal Wedding
	id = egy.118
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.118" }
	title = egy.118.t
	desc = egy.118.d
	picture = GFX_report_event_EGY_royal_marriage_egyptian

	is_triggered_only = yes

	option = { # who doesn't love a royal wedding
		name = egy.118.a
		add_stability = 0.01
	}
}
country_event = { # The shah snubs Fawzia!
	id = egy.119
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.119" }
	title = egy.119.t
	desc = egy.119.d
	picture = GFX_report_event_EGY_royal_marriage_egyptian

	fire_only_once = yes

	is_triggered_only = yes

	option = { # damn Iranians
		name = egy.119.a
		add_opinion_modifier = {
			target = PER
			modifier = KR_disapproves_of_govt
		}
		reverse_add_opinion_modifier = {
			target = PER
			modifier = KR_disapproves_of_govt
		}
		set_country_flag = EGY_egyptian_bride_flag
	}
}
### Coptic Events ###
country_event = { # Coptic Papal Election
	id = egy.120
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.120" }
	title = egy.120.t
	desc = egy.120.d
	picture = GFX_report_event_EGY_coptic_pope

	is_triggered_only = yes

	option = {
		name = egy.120.a
		hidden_effect = {
			random_list = {
				40 = { # Theophilus is elected
					set_country_flag = EGY_theophilus_pope
					EGY = {
						country_event = {
							id = egy.121
							days = 30
						}
					}
				}
				30 = { # Yusab is elected
					set_country_flag = EGY_yusab_is_pope
					EGY = {
						country_event = {
							id = egy.121
							days = 30
						}
					}
				}
				30 = { # Macarius is elected
					set_country_flag = EGY_macarius_is_pope
					EGY = {
						country_event = {
							id = egy.121
							days = 30
						}
					}
				}
			}
		}
	}
}
country_event = { # The New Coptic Pope
	id = egy.121
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.121" }
	title = egy.121.t
	desc = { # Theophilus is pope
		text = egy.121.d.theophilus
	trigger = {
			has_country_flag = EGY_theophilus_pope
		}
	}
	desc = { # Yusab is pope
		text = egy.121.d.yusab
	trigger = {
			has_country_flag = EGY_yusab_is_pope
		}
	}
	desc = { # Macarius is pope
		text = egy.121.d.macarius
	trigger = {
			has_country_flag = EGY_macarius_is_pope
		}
	}
	picture = GFX_report_event_EGY_coptic_pope

	is_triggered_only = yes

	option = {
		name = egy.121.a
		add_stability = 0.01
	}
}
country_event = { # Coptic Renewal
	id = egy.122
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.122" }
	title = egy.122.t
	desc = egy.122.d
	picture = GFX_report_event_EGY_coptic_pope

	fire_only_once = yes

trigger = {
		tag = EGY
		has_country_flag = EGY_egypt_is_secular
		OR = {
			has_country_flag = EGY_macarius_is_pope
			has_country_flag = EGY_yusab_is_pope
		}
	}

	mean_time_to_happen = {
		months = 24
	}

	option = {
		name = egy.122.a
		add_stability = 0.01
	}
}
country_event = { # Coptic Orphans
	id = egy.123
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.123" }
	title = egy.123.t
	desc = egy.123.d
	picture = GFX_report_event_EGY_coptic_pope

	fire_only_once = yes

trigger = {
		tag = EGY
		OR = {
			has_country_flag = EGY_macarius_is_pope
			has_country_flag = EGY_yusab_is_pope
		}
	}

	mean_time_to_happen = {
		months = 24
	}

	option = {
		name = egy.123.a
		add_political_power = 25
	}
}
country_event = { # Nag Hammadi library Discovery
	id = egy.124
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.124" }
	title = egy.124.t
	desc = egy.124.d
	picture = GFX_report_event_EGY_coptic_pope

	is_triggered_only = yes

	option = {
		name = egy.124.a
		add_political_power = 25
	}
}
###Cultural Flavor Events ###
country_event = { # The French Legation leaves Egypt
	id = egy.125
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.125" }
	title = egy.125.t
	desc = egy.125.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes

	option = { # These ministers will find a speedy trip home.
		name = egy.125.a
		add_stability = -0.03
		hidden_effect = {
			country_event = {
				id = egy.126
				days = 60
			}
		}
	}
}
country_event = { # Replacing the French Ministers
	id = egy.126
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.126" }
	title = egy.126.t
	desc = egy.126.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes

	option = { # Let the Wafd appoint their ministers
		name = egy.126.a
		add_stability = 0.02
		add_popularity = {
			ideology = market_liberal
			popularity = 0.05
		}
	}
	option = { # Unified Minister of Propaganda
		name = egy.126.b
		add_stability = 0.05
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.05
		}
	}
}
country_event = { # German Tourism
	id = egy.127
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.127" }
	title = egy.127.t
	desc = egy.127.d
	picture = GFX_report_event_EGY_zeppellin_pyramid

	fire_only_once = yes

trigger = {
		tag = EGY
		has_completed_focus = EGY_cairo_institute_of_arms
		GER = {
			has_war = no
		}
		EGY = {
			has_war = no
		}
	}

	mean_time_to_happen = {
		days = 365
	}

	option = { # yay money!
		name = egy.127.a
		add_stability = 0.01
		add_timed_idea = {
			idea = EGY_german_tourists
			days = 120
		}
	}
}
country_event = { # Love and Revenge - film
	id = egy.128
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.128" }
	title = egy.128.t
	desc = egy.128.d
	picture = GFX_report_event_EGY_the_will_movie

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # A great movie, its tragic about the actress
		name = egy.128.a
		add_stability = 0.01
	}
}
country_event = { # The Will - film
	id = egy.129
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.129" }
	title = egy.129.t
	desc = egy.129.d
	picture = GFX_report_event_EGY_the_will_movie

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # Another Great film
		name = egy.129.a
		add_stability = 0.01
	}
}
country_event = { # Umm Kulthum Begins singing for Radio Cairo
	id = egy.130
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.130" }
	title = egy.130.t
	desc = egy.130.d
	picture = GFX_report_event_EGY_umm_kulthun

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # Another Great film
		name = egy.130.a
		add_stability = 0.01
	}
}
country_event = { # Umm Kulthum recieves the Nishan al-Kamal
	id = egy.131
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.131" }
	title = egy.131.t
	desc = egy.131.d
	picture = GFX_report_event_EGY_umm_kulthun

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # Another Great film
		name = egy.131.a
		add_political_power = 20
	}
}
country_event = { # 1937 Egypt Cup Finals
	id = egy.132
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.132" }
	title = egy.132.t
	desc = egy.132.d
	picture = GFX_report_event_EGY_egypt_football

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { #
		name = egy.132.a
		hidden_effect = {
			random_list = {
				90 = { # Al Ahly wins
					EGY = {
						country_event = {
							id = egy.133
							days = 10
						}
					}
				}
				10 = { # Al-Masry wins
					EGY = {
						country_event = {
							id = egy.134
							days = 5
						}
					}
				}
			}
		}
	}
}
country_event = { # Al Ahly wins the 1937 cup
	id = egy.133
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.133" }
	title = egy.133.t
	desc = egy.133.d
	picture = GFX_report_event_EGY_egypt_football

	is_triggered_only = yes

	option = { # Another Great film
		name = egy.133.a
		add_stability = 0.01
	}
}
country_event = { # Al-Masry wins the 1937 Cup!
	id = egy.134
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.134" }
	title = egy.134.t
	desc = egy.134.d
	picture = GFX_report_event_EGY_egypt_football

	is_triggered_only = yes

	option = { # Another Great film
		name = egy.134.a
		add_stability = 0.01
	}
}
country_event = { # The decline of Cricket
	id = egy.135
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.135" }
	title = egy.135.t
	desc = egy.135.d
	picture = GFX_report_event_EGY_egypt_crowd

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = egy.135.a
		add_political_power = 20
	}
}
country_event = { # Egyptian History Cultural Festival
	id = egy.136
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.136" }
	title = egy.136.t
	desc = egy.136.d
	picture = GFX_report_event_EGY_egypt_crowd

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # Another Great film
		name = egy.136.a
		add_stability = 0.01
		add_popularity = {
			ideology = social_liberal
			popularity = 0.05
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.05
		}
	}
}
country_event = { # General Elections(1946)
	id = egy.137
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.137" }
	title = egy.137.t
	desc = egy.137.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

trigger = {
		tag = EGY
		has_country_flag = EGY_1936_elections_held
		has_country_flag = EGY_1941_elections_held
		NOT = {
			has_country_flag = EGY_1948_elections_held
		}
	}

	immediate = {
		hidden_effect = {
			remove_all_ministers = yes
			end_coalition = yes
		}
	}

	option = { # Liberal - Liberal Constitutional Party
		name = egy.137.a
		ai_chance = {
			factor = 30
		}
		hidden_effect = {
			set_country_flag = EGY_1948_elections_held
		}
		set_politics = {
			ruling_party = social_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Taha_Hussein_hog_sli
			add_ideas = EGY_Abdul_Khalek_Hassouna_for_sli
			add_ideas = EGY_Saba_Habachy_eco_sli
			add_ideas = EGY_Taha_Hussein_sec_sli
			if = {
				limit = { has_country_flag = EGY_is_republic }
				if = { 
					limit = { has_country_flag = EGY_soclib_pharaon_flag }
					create_country_leader = {
						name = "Taha Hussein"
						picture = "gfx/leaders/EGY/Portrait_Egypt_Taha_Hussein.png"
						expire = "1.1.1"
						ideology = pharaonism_subtype
					}
				}
				else = {
					create_country_leader = {
						name = "Taha Hussein"
						picture = "gfx/leaders/EGY/Portrait_Egypt_Taha_Hussein.png"
						expire = "1.1.1"
						ideology = national_liberalism_subtype
					}
				}
			}
		}
	}
	option = { # Liberal - Wafd Party
		name = egy.137.b
		ai_chance = {
			factor = 40
		}
		hidden_effect = {
			set_country_flag = EGY_1948_elections_held
		}
		set_politics = {
			ruling_party = market_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Makram_Ebeid_hog_mli
			add_ideas = EGY_Ali_Shamsi_for_mli
			add_ideas = EGY_Talaat_Harb_eco_mli
			add_ideas = EGY_Abdel_Hamid_Badawi_sec_mli
			if = {
				limit = { has_country_flag = EGY_is_republic }
				if = { 
					limit = { has_country_flag = EGY_marlib_pharaon_flag }
					create_country_leader = {
						name = "Makram Ebeid"
						picture = "gfx/leaders/EGY/Portrait_Egypt_Makram_Ebeid.png"
						expire = "1.1.1"
						ideology = marlib_pharaonism_subtype
					}
				}
				else = {
					create_country_leader = {
						name = "Makram Ebeid"
						picture = "gfx/leaders/EGY/Portrait_Egypt_Makram_Ebeid.png"
						expire = "1.1.1"
						ideology = marlib_national_liberalism_subtype
					}
				}
			}
		}
	}
	option = { # Conservative - Watani Party
		name = egy.137.c
		ai_chance = {
			factor = 30
		}
		hidden_effect = {
			set_country_flag = EGY_1948_elections_held
		}
		set_politics = {
			ruling_party = social_conservative
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Hussein_Serry_hog_sco
			add_ideas = EGY_Abdelfattah_Amr_for_sco
			add_ideas = EGY_Mohamed_Ahmed_Farghaly_eco_sco
			add_ideas = EGY_Sheikh_Mahmud_Shaltut_sec_sco
		}
	}
	option = { # Conservative - Ittihad Party
		name = egy.137.e
		ai_chance = {
			factor = 30
		}
		hidden_effect = {
			set_country_flag = EGY_1948_elections_held
		}
		set_politics = {
			ruling_party = authoritarian_democrat
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Sayyid_Qutb_hog_ade
			add_ideas = EGY_Hassan_al_Hudaybi_for_ade
			add_ideas = EGY_Mohamed_Tawfik_Naseem_eco_ade
			add_ideas = EGY_Sayyid_Qutb_sec_ade
		}
	}
	option = { # Social Democrats - Egyptian Social Democrats Party
		name = egy.137.f
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = social_democrat
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_democrat
			popularity = 0.35
		}
		hidden_effect = {
			add_ideas = EGY_Salah_Salem_for_sde
			add_ideas = EGY_Abdel_Latif_Boghdadi_eco_sde
			add_ideas = EGY_Muhammad_Anwar_el_Sadat_sec_sde
			country_event = {
				id = egy.207
			}
		}
	}
}
country_event = { # General Elections(1951+)
	id = egy.138
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.138" }
	title = egy.138.t
	desc = egy.138.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

trigger = {
		tag = EGY
		has_country_flag = EGY_1936_elections_held
		has_country_flag = EGY_1941_elections_held
		has_country_flag = EGY_1948_elections_held
	}

	immediate = {
		hidden_effect = {
			remove_all_ministers = yes
			end_coalition = yes
		}
	}

	option = { # Liberal - Liberal Constitutional Party
		name = egy.138.a
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = social_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_liberal
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Taha_Hussein_hog_sli
			add_ideas = EGY_Abdul_Khalek_Hassouna_for_sli
			add_ideas = EGY_Saba_Habachy_eco_sli
			add_ideas = EGY_Taha_Hussein_sec_sli
			if = {
				limit = { has_country_flag = EGY_is_republic }
				if = { 
					limit = { has_country_flag = EGY_soclib_pharaon_flag }
					create_country_leader = {
						name = "Taha Hussein"
						picture = "gfx/leaders/EGY/Portrait_Egypt_Taha_Hussein.png"
						expire = "1.1.1"
						ideology = pharaonism_subtype
					}
				}
				else = {
					create_country_leader = {
						name = "Taha Hussein"
						picture = "gfx/leaders/EGY/Portrait_Egypt_Taha_Hussein.png"
						expire = "1.1.1"
						ideology = national_liberalism_subtype
					}
				}
			}
		}
	}
	option = { # Liberal - Wafd Party
		name = egy.138.b
		ai_chance = {
			factor = 40
		}
		set_politics = {
			ruling_party = market_liberal
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Fouad_Serageddin_hog_mli
			add_ideas = EGY_Ali_Shamsi_for_mli
			add_ideas = EGY_Talaat_Harb_eco_mli
			add_ideas = EGY_Abdel_Hamid_Badawi_sec_mli
			if = {
				limit = { has_country_flag = EGY_is_republic }
				if = { 
					limit = { has_country_flag = EGY_marlib_pharaon_flag }
					create_country_leader = {
						name = "Fouad Serageddin"
						picture = "gfx/leaders/EGY/Portrait_EGY_Fouad_Serageddin.png"
						expire = "1.1.1"
						ideology = marlib_pharaonism_subtype
					}
				}
				else = {
					create_country_leader = {
						name = "Fouad Serageddin"
						picture = "gfx/leaders/EGY/Portrait_EGY_Fouad_Serageddin.png"
						expire = "1.1.1"
						ideology = marlib_national_liberalism_subtype
					}
				}
			}
		}
	}
	option = { # Conservative - Watani Party
		name = egy.138.c
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = social_conservative
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_conservative
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Mohamed_Tawfik_Naseem_hog_sco
			add_ideas = EGY_Abdelfattah_Amr_for_sco
			add_ideas = EGY_Mohamed_Ahmed_Farghaly_eco_sco
			add_ideas = EGY_Sheikh_Mahmud_Shaltut_sec_sco
		}
	}
	option = { # Conservative - Ittihad Party
		name = egy.138.e
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = authoritarian_democrat
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.15
		}
		hidden_effect = {
			add_ideas = EGY_Hassan_al_Banna_hog_ade
			add_ideas = EGY_Hassan_al_Hudaybi_for_ade
			add_ideas = EGY_Mohamed_Tawfik_Naseem_eco_ade
			add_ideas = EGY_Sayyid_Qutb_sec_ade
		}
	}
	option = { # Social Democrats - Egyptian Social Democrats Party
		name = egy.138.f
		ai_chance = {
			factor = 30
		}
		set_politics = {
			ruling_party = social_democrat
			election_frequency = 60
			elections_allowed = yes
		}
		add_popularity = {
			ideology = social_democrat
			popularity = 0.35
		}
		hidden_effect = {
			add_ideas = EGY_Salah_Salem_for_sde
			add_ideas = EGY_Abdel_Latif_Boghdadi_eco_sde
			add_ideas = EGY_Muhammad_Anwar_el_Sadat_sec_sde
			country_event = {
				id = egy.207
			}
		}
	}
}
country_event = { # The Social Democratic Party
	id = egy.139
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.139" }
	title = egy.139.t
	desc = egy.139.d
	picture = GFX_report_event_EGY_egyptian_palace

	fire_only_once = yes
	is_triggered_only = yes

	option = { # interesting
		name = egy.139.a
		add_stability = 0.01
		add_popularity = {
			ideology = social_democrat
			popularity = 0.08
		}
	}
}
country_event = { # The Jaririya Sufi order has been founded
	id = egy.140
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.140" }
	title = egy.140.t
	desc = egy.140.d
	picture = GFX_report_event_EGY_egyptian_palace

	fire_only_once = yes
	is_triggered_only = yes

	option = { # great
		name = egy.140.a
		add_stability = 0.01
		add_political_power = 40
	}
}
country_event = { # Recognize the Ahmadiyya?
	id = egy.141
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.141" }
	title = egy.141.t
	desc = egy.141.d
	picture = GFX_report_event_EGY_egyptian_palace

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # Recognize them
		name = egy.141.a
		add_stability = -0.01
		add_political_power = 20
	}
	option = { # Don't Recogonize them
		name = egy.141.b
		add_stability = 0.01
	}
}
country_event = { # Theater Construction Boom
	id = egy.142
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.142" }
	title = egy.142.t
	desc = egy.142.d
	picture = GFX_report_event_EGY_egyptian_palace
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # Another Great film
		name = egy.142.a
		add_political_power = 20
	}
}
country_event = { # Ash-Shams founded
	id = egy.143
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.143" }
	title = egy.143.t
	desc = egy.143.d

	fire_only_once = yes

trigger = {
		tag = EGY
		NOT = {
			has_completed_focus = EGY_Victory_Levant
		}
	}

	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	
	mean_time_to_happen = {
		months = 12
	}

	option = { # great
		name = egy.143.a
		add_war_support = 0.01
	}
}
country_event = { # Death of Joseph de Picciotto Bey
	id = egy.144
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.144" }
	title = egy.144.t
	desc = egy.144.d

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { #
		name = egy.143.a
		add_political_power = 20
	}
}
country_event = { # The Death of Howard Carter
	id = egy.145
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.145" }
	title = egy.145.t
	desc = egy.145.d

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # he will be missed
		name = egy.145.a
		add_political_power = 20
	}
}
country_event = { # Anniversary of the 'Urabi Revolt
	id = egy.146
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.146" }
	title = egy.146.t
	desc = egy.146.d
	picture = GFX_report_event_EGY_egypt_crowd

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # go away british empire
		name = egy.146.a
		add_stability = 0.01
	}
}
country_event = { # Lotfia Elnadi flies across Egypt
	id = egy.147
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.147" }
	title = egy.147.t
	desc = egy.147.d
	picture = GFX_report_event_IRE_women_pilots

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # a new aviator takes flight
		name = egy.147.a
		air_experience = 10
	}
}
country_event = { # New Synagogues
	id = egy.148
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.148" }
	title = egy.148.t
	desc = egy.148.d
	picture = GFX_report_event_EGY_egypt_crowd

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { #
		name = egy.148.a
		add_stability = 0.01
		add_political_power = 20
	}
}
country_event = { # Young Men's Muslim Association
	id = egy.149
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.149" }
	title = egy.149.t
	desc = egy.149.d
	picture = GFX_report_event_EGY_egypt_crowd

	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = { # Another Great film
		name = egy.149.a
		add_stability = 0.01
	}
}
country_event = { # Farouk Univeristy
	id = egy.150
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.150" }
	title = egy.150.t
	desc = egy.150.d
	picture = GFX_report_event_EGY_farouk_science
	is_triggered_only = yes

	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	
	option = {
		name = egy.150.a
		add_stability = 0.01
		add_political_power = 50
	}
}
### Joining the Cairo Pact events ###
country_event = { # Egypt offers alliance
	id = egy.160
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.160" }
	title = egy.160.t
	
	desc = {
		text = egy.160.d.MOR
	trigger = { tag = MOR }
	}
	desc = {
		text = egy.160.d.SOM
	trigger = { tag = SOM }
	}
	desc = {
		text = egy.160.d.generic
	trigger = {
			NOT = {
				tag = MOR
				tag = SOM
			}
		}
	}
	
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = { # we shall join
		name = egy.160.a
		ai_chance = {
			base = 90
			modifier = {
				factor = 0
				AND = {
					tag = SUD
					SUD = {
						has_government = national_populist
					}
				}
			}
		}
		hidden_effect = {
			FROM = {
				country_event = {
					id = egy.161
					days = 1
				}
			}
		}
	}
	option = { # we shall not join
		name = egy.160.b
		ai_chance = {
			factor = 10
		}
		hidden_effect = {
			FROM = {
				country_event = {
					id = egy.162
					days = 1
				}
			}
		}
	}
}
country_event = { # Morroco accepts our alliance
	id = egy.161
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.161" }
	title = egy.161.t
	
	desc = {
		text = egy.161.d.SOM
	trigger = {
			FROM = { tag = SOM }
		}
	}
	desc = {
		text = egy.161.d.generic
	trigger = {
			FROM = { NOT = { tag = SOM } }
		}
	}
	
	picture = GFX_report_event_generic_diplomacy2
	
trigger = {
		FROM = { is_in_faction = no }
	}

	is_triggered_only = yes

	option = { # we shall join
		name = egy.161.a
		add_to_faction = FROM
	}
}
country_event = { # Morroco rejects our alliance
	id = egy.162
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.162" }
	title = egy.162.t
	
	desc = {
		text = egy.162.d.SOM
	trigger = {
			FROM = { tag = SOM }
		}
	}
	desc = {
		text = egy.162.d.generic
	trigger = {
			FROM = { NOT = { tag = SOM } }
		}
	}
	
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = { # we shall join
		name = egy.162.a
		add_opinion_modifier = {
			target = FROM
			modifier = KR_disapproves_of_govt
		}
		reverse_add_opinion_modifier = {
			target = FROM
			modifier = KR_disapproves_of_govt
		}
	}
}

country_event = { # Hidden event to remove cosmetic tag
	id = egy.181
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.181" }

	hidden = yes
	
	mean_time_to_happen = {
		days = 90
	}

trigger = {
		tag = EGY
		is_subject = no
		has_cosmetic_tag = EGYK
	}

	fire_only_once = yes

	option = { # remove cosmetic tag
		drop_cosmetic_tag = yes
	}
}

country_event = { #Egypt invites us to the Arab League
	id = egy.182
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.182" }
	title = egy.182.t
	desc = egy.182.d

	picture = GFX_OTT_Arab_Recruits

	is_triggered_only = yes

	option = {
		name = egy.182.a
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_dynamic_modifier = {
					modifier = IRQ_League_of_Arab_States_dynamic_modifier
					scope = IRQ
				}
			}
		}
		add_dynamic_modifier = {
			modifier = EGY_League_of_Arab_States_dynamic_modifier
			scope = EGY
		}
		set_country_flag = joined_fac
		EGY = {
			add_to_variable = {
				var = var_FAC_members
				value = 0.01
			}
			country_event = egy.183
		}
	}
	option = {
		name = egy.182.b
		ai_chance = {
			factor = 1
			modifier = {
				add = 300
				tag = YEM
			}
			modifier = {
				add = 200
				tag = IRQ
			}
			modifier = {
				add = 200
				tag = OMA
			}
		}
		EGY = {
			country_event = egy.184
		}
	}
}

country_event = { #Accepted to join the League
	id = egy.183
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.183" }
	title = egy.183.t
	desc = egy.183.d

	picture = GFX_OTT_Arab_Recruits

	is_triggered_only = yes

	option = {
		name = egy.183.a
		hidden_effect = {
			every_country = {
				limit = {
					has_dynamic_modifier = {
						modifier = EGY_League_of_Arab_States_dynamic_modifier
						scope = EGY
					}
				}
				force_update_dynamic_modifier = yes
			}
		}
	}
}

country_event = { #Refused to join the League
	id = egy.184
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.184" }
	title = egy.184.t
	desc = egy.184.d

	picture = GFX_OTT_Arab_Recruits

	is_triggered_only = yes

	option = {
		name = egy.184.a
		add_political_power = -5
	}
}

country_event = { # Egypt offers alliance
	id = egy.185
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.185" }
	title = egy.185.t
	desc = egy.185.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = { # we shall join
		name = egy.185.a
		ai_chance = {
			factor = 90
		}
		hidden_effect = {
			EGY = {
				country_event = {
					id = egy.186
					days = 1
				}
			}
		}
	}
	option = { # we shall not join
		name = egy.185.b
		ai_chance = {
			factor = 10
		}
		hidden_effect = {
			EGY = {
				country_event = {
					id = egy.187
					days = 1
				}
			}
		}
	}
}
country_event = { # Iraq accepts our alliance
	id = egy.186
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.186" }
	title = egy.186.t
	desc = egy.186.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.186.a
		add_to_faction = IRQ
	}
}
country_event = { # Iraq rejects our alliance
	id = egy.187
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.187" }
	title = egy.187.t
	desc = egy.187.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.187.a
		add_opinion_modifier = {
			target = IRQ
			modifier = KR_disapproves_of_govt
		}
		reverse_add_opinion_modifier = {
			target = IRQ
			modifier = KR_disapproves_of_govt
		}
	}
}

country_event = { # Egypt Promotes the HIMT
	id = egy.188
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.188" }
	title = egy.188.t
	desc = egy.188.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.188.a
		add_popularity = {
			ideology = national_populist
			popularity = 0.10
		}
	}
}

country_event = { # Egypt Promotes Pan-Arabist Propaganda
	id = egy.189
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.189" }
	title = egy.189.t
	desc = egy.189.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.189.a
	trigger = {
			NOT = { has_government = national_populist }
		}
		add_popularity = {
			ideology = national_populist
			popularity = 0.06
		}
		activate_mission = TRP_pan_arabist_propaganda
	}
}

country_event = { # Egypt Decries Tripolitanian Nationalism
	id = egy.190
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.190" }
	title = egy.190.t
	desc = egy.190.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.190.a
	trigger = {
			NOT = { has_government = national_populist }
		}
		add_popularity = {
			ideology = national_populist
			popularity = 0.03
		}
		activate_mission = TRP_decry_tripolitanian_nationalism
	}
}

country_event = { # HIMT Coup in Tripoli
	id = egy.192
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.192" }
	title = egy.192.t
	desc = egy.192.d
	picture = GFX_IRQ_Tank_Street

trigger = {
		NOT = { has_government = national_populist }
		national_populist > 0.19
	}

	is_triggered_only = yes

	option = {
		name = egy.192.a
		add_stability = -0.1
		set_politics = {
			ruling_party = national_populist
			elections_allowed = no
		}
		if = {
			limit = {
				is_in_faction = yes
				NOT = { is_in_faction_with = EGY }
			}
			leave_faction = yes
			faction_leader = { country_event = egy.193 }
		}
		EGY = { country_event = egy.193 }
	}
}

country_event = { # HIMT Coup in Tripoli (notification)
	id = egy.193
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.193" }
	title = egy.193.t
	desc = egy.193.d

	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.193.a
	trigger = { tag = EGY }
		if = {
			limit = { is_faction_leader = yes }
			add_to_faction = FROM
		}
	}
}

country_event = { # Egypt Proposes Unification
	id = egy.194
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.194" }
	title = egy.194.t
	desc = egy.194.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.194.a
		ai_chance = {
			factor = 100
		}
		if = {
			limit = { is_ai = no }
			EGY = { change_tag_from = ROOT }
		}
		EGY = {
			every_state = {
				limit = {
					is_core_of = TRP
				}
				add_core_of = PREV
			}
			annex_country = {
				target = ROOT
				transfer_troops = yes
			}
		}
	}

	option = {
		name = egy.194.b
		ai_chance = {
			factor = 0
		}
		FROM = { country_event = egy.196 }
	}
}

country_event = { # Tripolitania Refuses Unification
	id = egy.196
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.196" }
	title = egy.196.t
	desc = egy.196.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.196.a
		add_political_power = -50
		if = {
			limit = {
				is_faction_leader = yes
				is_in_faction_with = FROM
			}
			remove_from_faction = FROM
		}
		if = {
			limit = { can_declare_war_on = FROM }
			create_wargoal = {
				target = FROM
				type = annex_everything
			}
		}
	}
}

country_event = { # Tripolitania Counters Our Influence
	id = egy.197
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.197" }
	title = egy.197.t
	desc = egy.197.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	option = {
		name = egy.197.a
	}
}


country_event = { # Egypt Demands the Suez!
	id = egy.198
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.198" }
	title = egy.198.t
	desc = egy.198.d
	picture = GFX_report_event_GER_suez

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = egy.198.a
		ai_chance = {
			factor = 25
			modifier = {
			factor = 100
				has_war = yes
			}
		}
		if = {
			limit = {
				owns_state = 753
				}
			EGY = {
				transfer_state = 753
			}
		}
		if = {
			limit = {
				DJI = {
					owns_state = 753
					}
				}
			DJI = {
				EGY = {
					transfer_state = 753
				}
			}
		}
	}
	option = {
		name = egy.198.b
		ai_chance = {
			factor = 75
		}
		EGY = {
			country_event = {
				id = egy.199
				days = 3
			}
		}
	}
}

country_event = { # Germany Refuses!
	id = egy.199
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.199" }
	title = egy.199.t
	desc = egy.199.d
	picture = GFX_report_event_GER_suez

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = egy.199.a
		ai_chance = {
			factor = 80
			modifier = {
			factor = 0
				OR = {
					has_war = yes
					GER = { owns_state = 753 }
				}
			}
		}
		declare_war_on = {
			target = FROM
			type = annex_everything
		}
		hidden_effect = {
			FROM = {
				country_event = {
					id = egy.200
					days = 250
				}
			}
		}
	}
	option = {
		name = egy.199.b
		ai_chance = {
			factor = 20
		}
		add_stability = -0.10
		add_war_support = -0.10
	}
}
country_event = { # Peace With Egypt?
	id = egy.200
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.200" }
	title = egy.200.t
	desc = egy.200.d
	picture = GFX_report_event_GER_suez

	fire_only_once = yes
	
trigger = {
		OR = {
			tag = GER
			tag = DJI
		}
		has_war_with = EGY
		753 = {
			is_owned_by = ROOT
			is_fully_controlled_by = FROM
		}
		FROM = {
			surrender_progress < 0.1
		}
	}

	option = {
		name = egy.200.a
		ai_chance = {
			base = 100
			modifier = {
				factor = 2
				surrender_progress > 0.2
			}
		}
		753 = { transfer_state_to = FROM }
			every_country = { #white peace!
				limit = {
					has_war_with = FROM
					OR = {
						is_in_faction_with = GER
						is_in_faction_with = DJI
						is_subject_of = GER
						tag = GER
						tag = DJI
					}
				}
			FROM = {
				white_peace = PREV
			}
		}
	}
	option = {
		name = egy.200.b
		ai_chance = {
			base = 0
		}
		add_stability = -0.10
		add_war_support = -0.10
	}
}

country_event = { # Republic? 
	id = egy.201
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.201" }
	title = egy.201.t
	desc = egy.201.d
	picture = GFX_report_event_royal_parade

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = egy.201.a
		custom_effect_tooltip = EGY_down_with_monarchy_tt
		add_stability = -0.02
		add_political_power = 50
		hidden_effect = {
			EGY_create_republic = yes
			if = {
				limit = {
					has_government = market_liberal
					has_country_flag = EGY_marlib_pharaon_flag
				}
				set_country_leader_ideology = marlib_pharaonism_subtype
			}
			if = {
				limit = {
					has_government = social_liberal
					has_country_flag = EGY_soclib_pharaon_flag
				}
				set_country_leader_ideology = pharaonism_subtype
			}
			if = {
				limit = {
					has_government = social_democrat
					has_idea = EGY_Mohammed_Naguib_hog_sde
				}
				set_country_leader_ideology = socdem_left_nationalism_subtype
			}
		}
	}
	option = {
		name = egy.201.b
		add_stability = 0.02
		add_political_power = -25
	}
	option = {
		name = egy.201.c
		custom_effect_tooltip = EGY_down_with_monarchy_2_tt
		add_stability = 0.01
		add_political_power = 20
		add_popularity = {
			ideology = syndicalist
			popularity = 0.1
		}
		add_synd_to_coalition = yes
		hidden_effect = {
			create_country_leader = {
				name = "Abbas Helmy III"
				picture = "gfx/leaders/EGY/Portrait_EGY_Abbas_Halim.png"
				desc = "POLITICS_KING_ABBAS_DESC"
				expire = "1.1.1"
				ideology = socdem_pharaonism_subtype
			}
			create_country_leader = {
				name = "Abbas Helmy III"
				picture = "gfx/leaders/EGY/Portrait_EGY_Abbas_Halim.png"
				desc = "POLITICS_KING_ABBAS_DESC"
				expire = "1.1.1"
				ideology = national_liberalism_subtype
			}
			create_country_leader = {
				name = "Abbas Helmy III"
				picture = "gfx/leaders/EGY/Portrait_EGY_Abbas_Halim.png"
				desc = "POLITICS_KING_ABBAS_DESC"
				expire = "1.1.1"
				ideology = marlib_national_liberalism_subtype
			}
			create_country_leader = {
				name = "Abbas Helmy III"
				picture = "gfx/leaders/EGY/Portrait_EGY_Abbas_Halim.png"
				desc = "POLITICS_KING_ABBAS_DESC"
				expire = "1.1.1"
				ideology = soccon_islamism_subtype
			}
			create_country_leader = {
				name = "Abbas Helmy III"
				picture = "gfx/leaders/EGY/Portrait_EGY_Abbas_Halim.png"
				desc = "POLITICS_KING_ABBAS_DESC"
				expire = "1.1.1"
				ideology = islamism_subtype
			}
			create_country_leader = {
				name = "Abbas Helmy III"
				picture = "gfx/leaders/EGY/Portrait_EGY_Abbas_Halim.png"
				desc = "POLITICS_KING_ABBAS_DESC"
				expire = "1.1.1"
				ideology = absolute_monarchy_subtype
			}
			if = {
				limit = {
					has_government = market_liberal
					has_country_flag = EGY_marlib_pharaon_flag
				}
				set_country_leader_ideology = marlib_pharaonism_subtype
			}
			if = {
				limit = {
					has_government = social_liberal
					has_country_flag = EGY_soclib_pharaon_flag
				}
				set_country_leader_ideology = pharaonism_subtype
			}
			if = {
				limit = {
					has_government = social_democrat
					has_idea = EGY_Mohammed_Naguib_hog_sde
				}
				set_country_leader_ideology = socdem_left_nationalism_subtype
			}
		}
	}
}

country_event = {# kindgom or sultanate
	id = egy.202
	title = egy.202.t
	desc = egy.202.d
	picture = GFX_report_event_royal_parade

	is_triggered_only = yes

	option = {#king
		name = egy.202.a
		add_political_power = 30
		add_stability = -0.03
		GER = { add_opinion_modifier = { target = EGY modifier = small_increase } }
		CAN = { add_opinion_modifier = { target = EGY modifier = small_increase } }
		NFA = { add_opinion_modifier = { target = EGY modifier = small_increase } }
		set_cosmetic_tag = EGY_Kingdom
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = {
				set_cosmetic_tag = SUD_EGYPT_KINGDOM
			}
		}
	}
	option = {#sultan
		name = egy.202.b
		add_political_power = -30
		add_stability = 0.03
		SAU = { add_opinion_modifier = { target = EGY modifier = small_increase } }
		SYR = { add_opinion_modifier = { target = EGY modifier = small_increase } }
		IRQ = { add_opinion_modifier = { target = EGY modifier = small_increase } }
	}
}

country_event = {#muslim brotherhood mad of secularism
	id = egy.203
	title = egy.203.t
	desc = egy.203.d
	picture = GFX_report_event_EGY_hassan_al_banna

	is_triggered_only = yes

	option = {#dnc
		name = egy.203.a
		add_political_power = 50
		custom_effect_tooltip = EGY_muslim_bros_mad_tt
		add_popularity = {
			ideology = social_conservative
			popularity = 0.03
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.06
		}
		hidden_effect = {
			country_event = {
				id = egy.204
				days = 12
			}
		}
	}
	option = {#stop them
		name = egy.203.b
		add_political_power = -30
		add_stability = 0.04
	}
}

country_event = {#muslim brotherhood attempt coup
	id = egy.204
	title = egy.204.t
	desc = egy.204.d
	picture = GFX_report_event_EGY_sayyid_qutb

	is_triggered_only = yes

	option = {#we manage to beat them
		name = egy.204.a
		add_political_power = 50
		add_popularity = {
			ideology = social_conservative
			popularity = -0.10
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = -0.10
		}
	}
	option = {#they manage to beat us
		name = egy.204.b
		add_stability = -0.06
		add_popularity = {
			ideology = social_conservative
			popularity = 0.10
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.10
		}
		add_popularity = {
			ideology = paternal_autocrat
			popularity = 0.30
		}
		set_politics = {
			ruling_party = paternal_autocrat
			elections_allowed = no
		}
		add_soccon_to_coalition = yes
		add_authdem_to_coalition = yes
		set_party_name = {
			name = EGY_authoritarian_democrat_party
			long_name = EGY_authoritarian_democrat_party_long
			ideology = paternal_autocrat
		}
		create_country_leader = {
			name = "Sayyid Qutb"
			picture = "gfx/leaders/EGY/Portrait_Egypt_Sayyid_Qutb.png"
			expire = "1.1.1"
			ideology = pataut_islamism_subtype
		}
		hidden_effect = {
			remove_all_ministers = yes
			add_ideas = EGY_Sayyid_Qutb_hog_ade
			add_ideas = EGY_Hassan_al_Hudaybi_for_ade
			add_ideas = EGY_Mohamed_Tawfik_Naseem_eco_ade
			add_ideas = EGY_Sayyid_Qutb_sec_ade
		}
		set_cosmetic_tag = EGY_Caliphate
		set_country_flag = EGY_Brotherhood_Coup
		if = {
			limit = {
				SUD = {
					is_subject_of = EGY
				}
			}
			SUD = { set_cosmetic_tag = SUD_EGYPT }
		}
	}
}

country_event = {# saadists
	id = egy.205
	title = egy.205.t
	desc = egy.205.d
	picture = GFX_report_event_EGY_ibhraim_abdel_hady_pasha

	is_triggered_only = yes

	option = {#libs coalition
		name = egy.205.a
		add_political_power = 30
		add_stability = -0.03
		add_soclib_to_coalition = yes
		add_marlib_to_coalition = yes
		set_country_leader_ideology = pataut_authoritarian_liberalism_subtype
		set_party_name = {
			ideology = social_liberal
			name = EGY_saadist_party
			long_name = EGY_saadist_party_long
		}
		set_party_name = {
			ideology = market_liberal
			name = EGY_saadist_party
			long_name = EGY_saadist_party_long
		}
	}
	option = {#stay with cons
		name = egy.205.b
		add_political_power = -30
		add_stability = 0.03
		add_soccon_to_coalition = yes
		add_authdem_to_coalition = yes
	}
	option = {#dnc
		name = egy.205.c
		add_political_power = 10
		add_stability = 0.01
	}
}

country_event = {# nasser
	id = egy.206
	title = egy.206.t
	desc = egy.206.d
	picture = GFX_report_event_EGY_young_nasser

	is_triggered_only = yes

	option = {#zamn
		name = egy.206.a
		add_political_power = 30
		add_war_support = 0.03
		add_stability = -0.03
		add_popularity = {
			ideology = radical_socialist
			popularity = 0.03
		}
		add_popularity = {
			ideology = social_democrat
			popularity = 0.06
		}
		create_corps_commander = {# 
			name = "Gamel Abdel Nasser"
			portrait_path = "gfx/leaders/EGY/Portrait_EGY_Gamel_Abdel_Nasser.png"
			traits = {
				politically_connected
				career_officer
			}
			skill = 2
			attack_skill = 2
			defense_skill = 2
			planning_skill = 3
			logistics_skill = 2
		}
		create_corps_commander = { # Hussein el-Shafei
			name = " Hussein el-Shafei"
			portrait_path = "gfx/leaders/EGY/Portrait_EGY_Hussein_Al_Shafei.png"
			traits = {
				career_officer
			}
			skill = 2
			attack_skill = 3
			defense_skill = 1
			planning_skill = 2
			logistics_skill = 1
		}
		create_corps_commander = { # Abdel Hakim Amer
			name = "Abdel Hakim Amer"
			portrait_path = "gfx/leaders/EGY/Portrait_EGY_abdel_hakim_amer.png"
			traits = {
				career_officer
				trait_cautious
			}
			skill = 2
			attack_skill = 2
			defense_skill = 1
			planning_skill = 2
			logistics_skill = 2
		}
	}
}

country_event = { # sucdem pm picker
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.207" }
	id = egy.207
	title = egy.207.t
	desc = egy.207.d
	picture = GFX_report_event_EGY_socdem_pm

	is_triggered_only = yes

	option = { # naguib
		name = egy.207.a
		add_stability = 0.01
		add_popularity = {
			ideology = social_democrat
			popularity = 0.02
		}
		add_ideas = EGY_Mohammed_Naguib_hog_sde
		if = {
			limit = { has_country_flag = EGY_is_republic }
			create_country_leader = {
				name = "Mohammed Naguib"
				picture = "gfx/leaders/EGY/Portrait_EGY_Mohammed_Naguib.png"
				expire = "1.1.1"
				ideology = socdem_left_nationalism_subtype
			}
		}
		else = { set_country_leader_ideology = socdem_left_nationalism_subtype }
	}
	
	option = { # nasser
		name = egy.207.b
		add_political_power = 30
		add_popularity = {
			ideology = totalist
			popularity = 0.01
		}
		add_popularity = {
			ideology = radical_socialist
			popularity = 0.02
		}
		add_popularity = {
			ideology = national_populist
			popularity = 0.01
		}
		add_ideas = EGY_Gamal_Abdel_Nasser_hog_sde
		if = {
			limit = { has_country_flag = EGY_is_republic }
			create_country_leader = {
				name = "Gamel Abdel Nasser"
				picture = "gfx/leaders/EGY/Portrait_EGY_Gamel_Abdel_Nasser.png"
				expire = "1.1.1"
				ideology = socdem_pharaonism_subtype
			}
		}
		else = { set_country_leader_ideology = socdem_pharaonism_subtype }
	}
}

country_event = { # uganda conquest event
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.208" }
	id = egy.208
	title = egy.208.t
	desc = egy.208.d
	picture = GFX_report_event_EGY_uganda_map

	mean_time_to_happen = {
		months = 12
	}
	
trigger = {
		tag = EGY
		ETH = {
			OR = {
				is_subject_of = EGY
				exists = no
			}
		}
		549 = { is_controlled_by_ROOT_or_ally = yes } # Sudan
	}

	fire_only_once = yes

	option = {
		name = egy.208.a
		create_wargoal = {
			target = 548.owner
			type = annex_everything
		}
		create_wargoal = {
			target = 718.owner
			type = annex_everything
		}
		add_state_core = 548
		add_state_core = 718
		add_war_support = 0.05
		add_political_power = -50
	}
	
	option = {
		name = egy.208.b
		add_stability = 0.05
		add_political_power = 50
	}
}

country_event = { # Event for Arab League members to accept the Federation or nah
	immediate = { log = "[GetDateText]: [Root.GetName]: event egy.209" }
	id = egy.209
	title = egy.209.t
	desc = egy.209.d
	picture = GFX_report_event_royal_parade

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			every_state = {
				limit = {
					is_core_of = ROOT
				}
				add_core_of = EGY
			}
			remove_dynamic_modifier = { modifier = EGY_League_of_Arab_States_dynamic_modifier }
		}
	}

	option = { # We agree!
		name = egy.209.a
		custom_effect_tooltip = "We will switch to Egypt!"
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				EGY = { is_ai = yes }
				is_in_faction = yes
				NOT = { is_in_faction_with = EGY }
			}
		}
		EGY = {
			annex_country = {
				target = ROOT
				transfer_troops = yes
			}
			change_tag_from = ROOT
		}
	}

	option = { # Nah
		name = egy.209.b
		ai_chance = {
			base = 50
			modifier = {
				factor = 2
				is_in_faction_with = EGY
			}
		}
		if = {
			limit = {
				ROOT  = {
					is_in_faction_with = EGY
				}
			}
			ROOT = {
				leave_faction = yes
			}
		}
		EGY = {
			declare_war_on = {
				target = ROOT
				type = annex_everything
			}
		}
		add_war_support = 0.05
		add_command_power = 50
	}
}