add_namespace = jordan
add_namespace = syria
add_namespace = egypt
add_namespace = germany
add_namespace = border_conflicts_chuck

# Jordanian civil war
country_event = {
	id = jordan.1
	title = jordan.1.t
	desc = jordan.1.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = jordan.1.a
		if = { limit = { NOT = { has_global_flag = EGY_VOT_ETO_MENYA_VYEBAL } }
		news_event = { id = Samsonnews.1 days = 44 }
		}
		else = {
		news_event = { id = Samsonnews.27 days = 44 }
		}
		every_state = {
				limit = {
					is_core_of = JOR
				}
				add_core_of = JR2
			}
			JR2 = {
			transfer_state = 1432
			transfer_state = 1433
		}
		JR2 = {
		load_oob = JR2_2020
		}
		JR2 = {
		add_ideas = { JOR_jordanian_civil_war }
		}
		add_ideas = { JOR_jordanian_civil_war }
		declare_war_on = {
			target = JR2
			type = civil_war
		}
		JOR = {
		add_popularity = {
				ideology = authoritarian_democrat
				popularity = -0.5
			}
		}
	}
}

# Daesh expands
country_event = {
	id = jordan.2
	title = jordan.2.t
	desc = jordan.2.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		set_cosmetic_tag = ISS_caliphate
		set_global_flag = IRQ_syrian_occupation
		set_capital = {
				  state = 291
				  remember_old_capital = no
				}
		ISS = {
		load_oob = ISS_2020
		}
		ISS = {
		load_oob = ISS_2020
		}
		ISS = {
		load_oob = ISS_2020
		}
		declare_war_on = {
			target = ABK
			type = annex_everything
		}
		declare_war_on = {
			target = BUK
			type = annex_everything
		}
		declare_war_on = {
			target = KUR
			type = annex_everything
		}
		if = {
		limit = { country_exists = LEB }
		declare_war_on = {
			target = LEB
			type = annex_everything
			}
		}
		if = {
		limit = { IRQ = { is_subject = no } }
		declare_war_on = {
			target = IRQ
			type = annex_everything
			}
		}
		if = {
		limit = { FIA = { is_in_faction = no } }
		declare_war_on = {
			target = FIA
			type = annex_everything
			}
		}
	}
}

# Muslim Brotherhood post-war
country_event = {
	id = jordan.3
	title = jordan.3.t
	desc = jordan.3.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = jordan.3.a
		set_politics = {
			ruling_party = authoritarian_democrat
			elections_allowed = yes
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.6
		}
		set_cosmetic_tag = MUS_republic
		add_ideas = arab_league_member
		ai_chance = {
		factor = 6
		}
	}
	option = {
		name = jordan.3.b
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.2
		}
		ai_chance = {
		factor = 4
		}
	}
}

# UAR invades Lebanon if independent
country_event = {
	id = jordan.4
	title = jordan.4.t
	desc = jordan.4.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = jordan.4.a
		every_state = {
				limit = {
					is_core_of = LEB
				}
				add_core_of = BUK
			}
		declare_war_on = {
			target = LEB
			type = annex_everything
		}
	}
}

# Russia helps Assad prepare for Iron Dome
country_event = {
	id = jordan.5
	title = jordan.5.t
	desc = jordan.5.d
	picture = GFX_SOV_syria_iron_dome
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = jordan.5.a
		set_country_flag = SOV_building_Syrian_ID
		ai_chance = {
			factor = 7
		}
	}
	option = {
		name = jordan.5.b
		add_political_power = 50
		custom_effect_tooltip = SOV_unforseen_consequences_tt
		ai_chance = {
			factor = 3
		}
	}
}

# Germany puts Russian neonazis in charge
country_event = {
	id = jordan.6
	title = jordan.6.t
	desc = jordan.6.d
	picture = GFX_GER_Russian_dissidents_Moscow
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = jordan.6.a
		SOV = {
		set_cosmetic_tag = SOV_volkov
		set_party_name = {
				ideology = fascist
				name = SOV_fascist_party_puppet
				long_name = SOV_fascist_party_puppet_long
				}
		set_politics = { ruling_party = fascist }
		add_popularity = {
			ideology = fascist
			popularity = 0.32
		}
		create_country_leader = {
						name = MaksAnd
						picture = GFX_SOV_MaksAnd
						ideology = ethno_nationalism
						traits = {
					}
				}
			}
		ai_chance = {
			factor = 7
		}
	}
	option = {
		name = jordan.6.b
		SOV = {
		set_cosmetic_tag = SOV_volkov
		set_party_name = {
				ideology = national_socialist
				name = SOV_national_socialist_party_puppet
				long_name = SOV_national_socialist_party_puppet_long
				}
		set_politics = { ruling_party = national_socialist }
		add_popularity = {
			ideology = national_socialist
			popularity = 0.32
		}
		create_country_leader = {
						name = DenisKap
						picture = GFX_SOV_Denis_Kap
						ideology = neonazism
						traits = {
					}
				}
			}
		ai_chance = {
			factor = 3
		}
	}
}

country_event = {
	id = jordan.7
	title = jordan.7.t
	desc = jordan.7.d
	picture = GFX_SOV_syria_iron_dome
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = jordan.7.a
		set_capital = { state = 454 }
		ai_chance = {
			factor = 2
		}
	}
	option = {
		name = jordan.7.b
		set_capital = { state = 446 }
		ai_chance = {
			factor = 3
		}
	}
	option = {
		name = jordan.7.c
		set_capital = { state = 291 }
		ai_chance = {
			factor = 3
		}
	}
	option = {
		name = jordan.7.e
		set_capital = { state = 1032 }
		ai_chance = {
			factor = 2
		}
	}
}


#Fuck Israel
country_event = {
	id = syria.20
	title = syria.20.t
	desc = syria.20.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	trigger = {
		tag = SYR
	}
	option = {
		name = syria.20.a
		SOV = { clr_country_flag = SOV_building_Syrian_ID }
		news_event = {
			id = news.218
		}
		declare_war_on = {
			target = ISR
			type = annex_everything
		}
		create_faction = damascus_pact
		hidden_effect = {
			remove_faction_goal = faction_goal_the_atomic_race
			add_faction_goal = faction_goal_placeholder_long_term
			remove_faction_goal = faction_goal_a_military_base
			add_faction_goal = faction_goal_placeholder_medium_term
			add_faction_goal = faction_goal_placeholder_short_term
		}
		SYR = {
			add_to_faction = HEZ
			add_to_faction = PAL
		}
		HEZ = {
			declare_war_on = {
				target = ISR
				type = annex_everything
			}
		}
		hidden_effect = {
		if = {
		    limit = {
			   has_global_flag = nato_nato_won_nato_war
			}
		GER = { country_event = { id = germany.246 days = 7 } }
		}
		ISR = {
	    country_event = { id = israel.13 days = 0 }
		activate_mission = ISR_arab_war_countdown
		}
		country_event = { id = syria.31 days = 150 }
		    if = {
		        limit = {
		            EGY = {
		                has_war = no
		            }
		        }
		            country_event = { id = syria.32 days = 50 }
		    }
		}
	}
}

#Syria Collapses After Losing to Israel	
country_event = {
	id = syria.34
	title = syria.34.t
	desc = syria.34.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	trigger = {
		tag = SYR
		SYR = { exists = yes }
	}
	option = {
		name = syria.34.a
		if = {
			limit = { has_global_flag = ISR_arabs_defeated }
		set_global_flag = SYR_nuke_civil_war
		news_event = { id = Samsonnews.18 hours = 6 }
		ISS = {
			transfer_state = 1029
			transfer_state = 814
			transfer_state = 1035
			load_oob = "ISS_2020"
		}
		FSA = {
			transfer_state = 1028
			transfer_state = 680
			transfer_state = 1031
			set_cosmetic_tag = FSA_republic
			load_oob = "FSA_uprising"
		}
		HTS = {
			transfer_state = 1027
			transfer_state = 1108
			transfer_state = 677
			transfer_state = 1034
			transfer_state = 1030
			transfer_state = 1109
			load_oob = "HTS_2020"
			set_cosmetic_tag = FSA_Civ
		}
		SYR = {
			remove_ideas = {
				SYR_syrian_economic_renewal
				SYR_army_of_lions_idea
			}
			declare_war_on = {
				target = HTS
				type = annex_everything
			}
			declare_war_on = {
				target = FSA
				type = annex_everything
			}
			declare_war_on = {
				target = ISS
				type = annex_everything
			}
		}
		HTS = {
			declare_war_on = {
				target = FSA
				type = annex_everything
			}
			declare_war_on = {
				target = ISS
				type = annex_everything
			}
		}
		ISS = {
			declare_war_on = {
			target = FSA
			type = annex_everything
			}
		}
		ISS = { set_capital = { state = 1029 } }
		every_state = {
			limit = {
				is_core_of = SYR
			}
			add_core_of = HTS
			add_core_of = FSA
			add_core_of = ISS
		}
		every_state = {
			limit = {
				is_core_of = IRQ
			}
			add_core_of = ISS
			}
		}
		
		else = {
		set_global_flag = SYR_nuke_civil_war
		ISS = {
			transfer_state = 1029
			transfer_state = 814
			transfer_state = 1035
			load_oob = "ISS_2020"
		}
		FSA = {
			transfer_state = 1028
			transfer_state = 680
			transfer_state = 1031
			set_cosmetic_tag = FSA_republic
			load_oob = "FSA_uprising"
		}
		HTS = {
			transfer_state = 1027
			transfer_state = 1108
			transfer_state = 677
			transfer_state = 1034
			transfer_state = 1030
			transfer_state = 1109
			load_oob = "HTS_2020"
			set_cosmetic_tag = FSA_Civ
		}
		SYR = {
			remove_ideas = {
				SYR_syrian_economic_renewal
				SYR_army_of_lions_idea
			}
			declare_war_on = {
				target = HTS
				type = annex_everything
			}
			declare_war_on = {
				target = FSA
				type = annex_everything
			}
			declare_war_on = {
				target = ISS
				type = annex_everything
			}
		}
		HTS = {
			declare_war_on = {
				target = FSA
				type = annex_everything
			}
			declare_war_on = {
				target = ISS
				type = annex_everything
			}
		}
		ISS = {
			declare_war_on = {
			target = FSA
			type = annex_everything
			}
		}
		ISS = { set_capital = { state = 1029 } }
		every_state = {
			limit = {
				is_core_of = SYR
			}
			add_core_of = HTS
			add_core_of = FSA
			add_core_of = ISS
		}
		every_state = {
			limit = {
				is_core_of = IRQ
			}
			add_core_of = ISS
			}
		}
	}
}

#Protests over Failing Economy
country_event = {
	id = syria.13
	title = syria.13.t
	desc = syria.13.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	trigger = {
		tag = SYR
	}
	option = {
		name = syria.13.a
		add_stability = -0.03
		country_event = {
			id = syria.18
			days = 200
		}
		SOV = {
			country_event = {
			id = jordan.5
			days = 200
			}
		}
	}
}

#IT BEGINS
country_event = {
	id = egypt.16
	title = egypt.16.t
	desc = egypt.16.d
	picture = GFX_Cairo_bombing
	fire_only_once = yes
	is_triggered_only = yes
	trigger = {
		tag = EGY
	}
	immediate = {
		hidden_effect = {
			dismantle_faction = yes
			set_global_flag = EGY_nuke_civil_war
			set_global_flag = EGY_VOT_ETO_MENYA_VYEBAL
			MEK = {
				transfer_state = 453
				transfer_state = 813
				set_cosmetic_tag = EGY_Wilayah_Sina
				load_oob = "MEK_2020"
				every_state = {
					limit = {
						is_core_of = EGY
					}
					add_core_of = MEK
				}
				declare_war_on = {
					target = EGY
					type = civil_war
				}
			}
			MUS = {
				transfer_state = 552
				transfer_state = 452
				transfer_state = 447
				transfer_state = 457
				transfer_state = 1170
				transfer_state = 798
				load_oob = "MUS_2020"
				every_state = {
					limit = {
						is_core_of = EGY
					}
					add_core_of = MUS
				}
				declare_war_on = {
					target = MEK
					type = civil_war
				}
				declare_war_on = {
					target = EGY
					type = civil_war
				}
			}
			EGY = {
				set_variable = {
					disband_fraction = 0.5
				}
				disband_units_fraction = yes
				clear_variable = disband_fraction
			}
			if = {
				limit = {
					HRL = {
						has_government = nationalist
					}
				}
				HRL = {
					country_event = {
						id = libya.18
						days = 40
					}
				}
			}
			ETH = {
				annex_country = {
					target = TDF
					transfer_troops = no
				}
			}
		}
	}
	option = {
		name = egypt.16.a
		if = {
			limit = { has_global_flag = ISR_samson_used_flag }
		add_stability = -0.05
		effect_tooltip = {
			MEK = {
				transfer_state = 453
				transfer_state = 813
				load_oob = "MEK_2020"
				every_state = {
					limit = {
						is_core_of = EGY
					}
					add_core_of = MEK
				}
				declare_war_on = {
					target = EGY
					type = civil_war
				}
			}
			MUS = {
				transfer_state = 552
				transfer_state = 452
				transfer_state = 447
				transfer_state = 457
				transfer_state = 798
				load_oob = "MUS_2020"
				every_state = {
					limit = {
						is_core_of = EGY
					}
					add_core_of = MUS
				}
				declare_war_on = {
					target = MEK
					type = civil_war
				}
				declare_war_on = {
					target = EGY
					type = civil_war
					}
				}
				every_possible_country = { add_ideas = EGY_blocked_suez_canal }
			}
		}
		
		else = {
		add_stability = -0.05
		news_event = { id = Samsonnews.22 hours = 6 }
		effect_tooltip = {
			MEK = {
				transfer_state = 453
				transfer_state = 813
				load_oob = "MEK_2020"
				every_state = {
					limit = {
						is_core_of = EGY
					}
					add_core_of = MEK
				}
				declare_war_on = {
					target = EGY
					type = civil_war
				}
			}
			MUS = {
				transfer_state = 552
				transfer_state = 452
				transfer_state = 447
				transfer_state = 457
				transfer_state = 798
				load_oob = "MUS_2020"
				every_state = {
					limit = {
						is_core_of = EGY
					}
					add_core_of = MUS
				}
				declare_war_on = {
					target = MEK
					type = civil_war
				}
				declare_war_on = {
					target = EGY
					type = civil_war
					}
				}
			}
		}
	}
}

#Iranian Government Ready 
country_event = {
	id = germany.138
	title = germany.138.t
	desc = germany.138.d
	picture = GFX_NATO_Iran
	fire_only_once = yes
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			log = "[GetDateText]: [Root.GetName]: event germany.138 immediate"
		}
	}
	option = {
		name = germany.138.a
		ai_chance = {
		factor = 4
		}
		PER = {
		create_country_leader = {
			name = PER_maryam_rajavi_char
			picture = "MaryamRajavi.dds"
			ideology = reformist_socialism_socdem
			traits = {
			hos_aspiring_cult_of_personality
			hos_psychotic_cult_leader
				}
			}
		change_government_type_semi_presidential_system = yes
		remove_ideas = ZZZ_mixed_economy
		add_ideas = ZZZ_left_corporatism
		}
	}
	option = {
		name = germany.138.b
		ai_chance = {
		factor = 1
		}
		PER = {
		set_politics = { ruling_party = nationalist }
		change_government_type_absolute_monarchy = yes
		remove_ideas = ZZZ_mixed_economy
		add_ideas = ZZZ_capitalist_economy
		set_cosmetic_tag = PER_pahlavi
		hidden_effect = { retire_character = TAL_Sirajuddin_Haqqani }
		add_popularity = {
			ideology = nationalist
			popularity = 0.62
		}
		create_country_leader = {
							name = PER_reza_pahlavi_char
							picture = "RezaPahlavi.dds"
							ideology = absolute_monarchist
							traits = {
						}
					}
		set_party_name = {
				ideology = nationalist
				name = PER_nationalist_party_monarchist
				long_name = PER_nationalist_party_monarchist_long
			}
		}
	}
	option = {
		name = germany.138.c
		ai_chance = {
		factor = 2
		}
		PER = {
		set_politics = { ruling_party = authoritarian_democrat }
		change_government_type_semi_constitutional_monarchy = yes
		remove_ideas = ZZZ_mixed_economy
		add_ideas = ZZZ_capitalist_economy
		set_cosmetic_tag = PER_pahlavi
		hidden_effect = { retire_character = PER_ali_hosseini_khamenei_char }
		create_country_leader = {
							name = PER_reza_pahlavi_char
							picture = "RezaPahlavi.dds"
							ideology = hybrid_regime
							traits = {
						}
					}
		set_party_name = {
				ideology = authoritarian_democrat
				name = PER_authoritarian_democrat_party_monarchist
				long_name = PER_authoritarian_democrat_party_monarchist_long
			}
		}
	}
	option = {
		name = germany.138.e
		ai_chance = {
		factor = 3
		}
		PER = {
		set_politics = { ruling_party = conservative }
		change_government_type_constitutional_monarchy = yes
		remove_ideas = ZZZ_mixed_economy
		add_ideas = ZZZ_capitalist_economy
		set_cosmetic_tag = PER_pahlavi
		hidden_effect = { retire_character = PER_ali_hosseini_khamenei_char }
		add_popularity = {
			ideology = conservative
			popularity = 0.43
		}
		create_country_leader = {
							name = PER_reza_pahlavi_char
							picture = "RezaPahlavi.dds"
							ideology = neoconservative
							traits = {
						}
					}
		set_party_name = {
				ideology = conservative
				name = PER_conservative_party_monarchist
				long_name = PER_conservative_party_monarchist_long
			}
		}
	}
}

# Hatay border war
country_event = {
	id = border_conflicts_chuck.1
	title = border_conflicts_chuck.1.t
	desc = border_conflicts_chuck.1.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = border_conflicts_chuck.1.a
		transfer_state = 827
	}
}

# Semnan border war
country_event = {
	id = border_conflicts_chuck.2
	title = border_conflicts_chuck.2.t
	desc = border_conflicts_chuck.2.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = border_conflicts_chuck.2.a
		transfer_state = 416
	}
}

# Shiraz border war
country_event = {
	id = border_conflicts_chuck.3
	title = border_conflicts_chuck.3.t
	desc = border_conflicts_chuck.3.d
	picture = GFX_Hezbollah_Mobilizes
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = border_conflicts_chuck.3.a
		transfer_state = 412
	}
}