########################################
# Major Flavor Events                  #
########################################

namespace = flavor_per
normal_or_historical_nations = yes

# Turko-Persian Conflicts: Shiite rebels
country_event = {
	id = flavor_per.3560
	title = "flavor_per.EVTNAME3560"
	desc = "flavor_per.EVTDESC3560"
	picture = ANGRY_MOB_eventPicture

	trigger = {
		NOT = { has_country_flag = PER_had_event_3560 }
		is_year = 1450
		NOT = { is_year = 1550 }
		tag = PER
		religion = shiite
		any_neighbor_country = {
			tag = TUR
			religion = sunni
			any_owned_province = {
				religion = shiite
			}
		}
		TUR = { is_free_or_tributary_trigger = yes }
		NOT = { alliance_with = TUR }
		NOT = { war_with = TUR }
	}

	mean_time_to_happen = {
		months = 2000
	}
	
	immediate = {
		set_country_flag = PER_had_event_3560
	}
	
	option ={ # Support the Turkish Shiites
		name = "flavor_per.EVTOPTA3560"
		add_stability_or_adm_power = yes
		add_years_of_income = -0.2
		TUR = {
			add_opinion = {
				who = ROOT
				modifier = supported_rebels
			}
			country_event = { id = flavor_tur.3360 days = 10 tooltip = "flavor_per.EVTTOOLTIP3560" }
		}
	}
	option = { # Leave them to their fate
		name = "flavor_per.EVTOPTB3560"
		add_stability = -1
	}
	option = {		# Betray the Turkish rebels
		name = "flavor_per.EVTOPTC3560"
		add_stability = -2
		add_opinion = {
			who = ROOT
			modifier = did_not_support_rebels
		}
	}
}

# Murad III's campaigns against Persia
country_event = {
	id = flavor_per.3562
	title = "flavor_per.EVTNAME3562"
	desc = "flavor_per.EVTDESC3562"
	picture = BATTLE_eventPicture

	is_triggered_only = yes

	option = { # Teach the Turks a lesson!
		name = "flavor_per.EVTOPTA3562"
		add_stability_or_adm_power = yes
		TUR = {
			random_owned_province = {
				limit = {
					NOT = { is_core = PER }
					NOT = { is_claim = PER }
					any_neighbor_province = {
						owned_by = PER
					}
				}
				add_claim = PER
			}
			add_opinion = {
				who = ROOT
				modifier = border_aggression
			}
		}
	}
	option = {		# Ignore the Turkish threats
		name = "flavor_per.EVTOPTB3562"
		add_stability = -1
	}
	option = {		# Seek a diplomatic solution
		name = "flavor_per.EVTOPTC3562"
		TUR = {
			add_opinion = {
				who = ROOT
				modifier = successful_diplomacy
			}
		}
	}
}

# Turko-Persian Tension
country_event = {
	id = flavor_per.3563
	title = "flavor_per.EVTNAME3563"
	desc = "flavor_per.EVTDESC3563"
	picture = LAND_MILITARY_eventPicture

	trigger = {
		NOT = { has_country_flag = PER_had_event_3563 }
		is_year = 1600
		NOT = { is_year = 1650 }
		tag = PER
		any_neighbor_country = {
			tag = TUR
			any_owned_province = {
				controlled_by = REB
			}
		}
		TUR = { is_free_or_tributary_trigger = yes }
		NOT = { alliance_with = TUR }
		NOT = { war_with = TUR }
	}

	mean_time_to_happen = {
		months = 1000
	}
	
	immediate = {
		set_country_flag = PER_had_event_3563
	}

	option = {		# Support the Turkish rebels and prepare for war
		name = "flavor_per.EVTOPTA3563"
		add_years_of_income = -0.2
		TUR = {
			add_opinion = {
				who = ROOT
				modifier = supported_rebels
			}
			country_event = { id = flavor_tur.3363 days = 10 tooltip = "flavor_per.EVTTOOLTIP3560" }
		}
	}
	option = {		# Concentrate on internal issues
		name = "flavor_per.EVTOPTB3563"
		add_adm_power = 25
	}
}


########################################
# Flavor Events for Persia
#
# written by Sara Wendel-rtqvist & Henrik Lohmander
########################################

#The Reforms of Ismail
country_event = {
	id = flavor_per.1
	title = "flavor_per.EVTNAME1"
	desc = "flavor_per.EVTDESC1"
	picture = REFORM_eventPicture
	
	is_triggered_only = yes
	
	option = { #Reform
		name = "flavor_per.EVTOPTA1"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
		if = {
			limit = {
				NOT = { government_rank = 3 }
			}
			set_government_rank = 3
		}
		416 = { #Tabriz
			add_base_tax = 2
			add_base_production = 2
			add_base_manpower = 1
		}
		429 = { #Isfahan
			add_base_tax = 3
			add_base_production = 3
			add_base_manpower = 1
		}
		2215 = { #Qazvin
			add_base_tax = 2
			add_base_production = 2
			add_base_manpower = 1
		}
		2218 = { #Shiraz
			add_base_tax = 2
			add_base_production = 2
		}
		428 = { #Teheran
			add_base_tax = 1
			add_base_production = 1
			add_base_manpower = 1
		}
		433 = { #Yazd
			add_base_tax = 1
			add_base_production = 1
		}
		2213 = { #Qom
			add_base_tax = 1
			add_base_production = 1
			add_base_manpower = 1
		}
		2212 = { #Zanjan
			add_base_tax = 1
			add_base_production = 1
			add_base_manpower = 1
		}
	}
}

#The Reforms of Abbas the Great
country_event = {
	id = flavor_per.2
	title = "flavor_per.EVTNAME2"
	desc = "flavor_per.EVTDESC2"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		is_year = 1580
		owns = 429
		NOT = {
			is_year = 1640
		}
	}

	mean_time_to_happen = {
		months = 150
	}
	
	option = { #Reform
		name = "flavor_per.EVTOPTA1"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
		add_piety = 0.25
		add_adm_power = 50
		add_mil_power = 50
		add_dip_power = 50
	}
}

# The Advisors of Abbas the Great
country_event = {
	id = flavor_per.3
	title = "flavor_per.EVTNAME3"
	desc = "flavor_per.EVTDESC3"
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		is_year = 1590
		owns = 429
		NOT = {
			is_year = 1640
		}
	}

	mean_time_to_happen = {
		months = 150
	}
	
	option = { # Hire the English advisors
		name = "flavor_per.EVTOPTA3"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
		add_ruler_modifier = { name = per_abbas_advisors }
		add_stability = -1
	}
	option = { # Rely on ones
		name = "flavor_per.EVTOPTB3"
		add_stability_or_adm_power = yes
	}
}

# Political Turmoil
country_event = {
	id = flavor_per.4
	title = "flavor_per.EVTNAME4"
	desc = "flavor_per.EVTDESC4"
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		tag = PER
		is_year = 1580
		NOT = {
			has_country_modifier = per_political_turmoil_timer
		}
		NOT = {
			mil = 4
		}
		NOT = {
			dip = 4
		}
		NOT = {
			adm = 4
		}
		has_regency = no
	}
	
	mean_time_to_happen = {
		months = 500
	}
	
	option = { #Let the Clans fight
		name = "flavor_per.EVTOPTA4"
		hidden_effect = {
			add_country_modifier = {
				name = per_political_turmoil_timer
				duration = 365
				hidden = yes
			}
		}
		add_stability = -1
	}
	option = { #Buy the loyalty of the Clans
		name = "flavor_per.EVTOPTB4"
		hidden_effect = {
			add_country_modifier = {
				name = per_political_turmoil_timer
				duration = 365
				hidden = yes
			}
		}
		add_years_of_income = -1
	}
}

# Political Fragmentation
country_event = {
	id = flavor_per.5
	title = "flavor_per.EVTNAME5"
	desc = "flavor_per.EVTDESC5"
	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		is_year = 1635
		NOT = {
			has_country_modifier = per_political_fragmentation_timer
		}
	}

	mean_time_to_happen = {
		months = 500
	}
	
	option = { # Let the factions conspire
		name = "flavor_per.EVTOPTA5"
		hidden_effect = {
			add_country_modifier = {
				name = per_political_fragmentation_timer
				duration = 365
				hidden = yes
			}
		}
		add_stability_or_adm_power = yes
	}
	option = { # Tighten state control
		name = "flavor_per.EVTOPTB5"
		hidden_effect = {
			add_country_modifier = {
				name = per_political_fragmentation_timer
				duration = 365
				hidden = yes
			}
		}
		add_stability = -1
		random_owned_province = {
			limit = {
				is_core = PER
			}
			add_base_tax = 1
			add_base_manpower = 1
		}
	}
}

#The Afghan Rebellions
country_event = {
	id = flavor_per.6
	title = "flavor_per.EVTNAME6"
	desc = "flavor_per.EVTDESC6"
	picture = ANGRY_MOB_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		NOT = { primary_culture = afghani }
		NOT = { exists = AFG }
		any_owned_province = { culture = afghani }
	}

	mean_time_to_happen = {
		months = 2000
	}
	
	option = { #Curses!
		name = "flavor_per.EVTOPTA6"
		random_owned_province = {
			limit = { culture = afghani }
			area = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = add_unrest_10_modifier
					duration = 1825
				}
			}
		}
	}
}

########################################
# Additional Flavor Events for Persia
#
# written by Henrik Lohmander
########################################

#Persian Miniature Painting
country_event = {
	id = flavor_per.7
	title = flavor_per.7.t
	desc = flavor_per.7.d
	picture = BIG_BOOK_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		NOT = { is_year = 1600 }
	}

	mean_time_to_happen = {
		months = 300
	}
	
	option = { #Ok
		name = flavor_per.7.a
		add_prestige = 10
		add_country_modifier = {
				name = per_miniature_school
				duration = 3650
		}
	}
}

#Iskander Munshi
country_event = {
	id = flavor_per.8
	title = flavor_per.8.t
	desc = flavor_per.8.d
	picture = BIG_BOOK_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		is_year = 1620
		NOT = { is_year = 1635 }
	}

	mean_time_to_happen = {
		months = 45
	}
	
	option = { #
		name = flavor_per.8.a
		add_legitimacy = 10
		add_prestige = 5
	}
}

#The Shrines of Najaf
country_event = {
	id = flavor_per.9
	title = flavor_per.9.t
	desc = flavor_per.9.d
	picture = PRAYING_eventPicture
	
	is_triggered_only = yes

	
	option = { #Whatever is needed we must provide.
		name = flavor_per.9.a
		ai_chance = {
			factor = 1
		}
		add_years_of_income = -0.1
		2311 = {
			add_province_modifier = {
				name = "per_najaf"
				duration = -1
			}
		}
	}
	
	option = { #We must practice restraint.
		name = flavor_per.9.b
		ai_chance = {
			factor = 0
		}
		2311 = {
			add_province_modifier = {
				name = "per_najaf"
				duration = 7300
			}
		}
	}
}

#Rise of the Mushashaiya
country_event = {
	id = flavor_per.10
	title = flavor_per.10.t
	desc = flavor_per.10.d
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		NOT = { tag = MSY }
		is_year = 1445
		NOT = { is_year = 1455 }
		any_owned_province = {
			is_core = MSY
		}
	}

	mean_time_to_happen = {
		months = 30
	}
	
	option = { #
		name = flavor_per.10.a
		every_province = {
			limit = {
				is_core = MSY
				NOT = { owned_by = MSY }
			}
			add_province_modifier = {
				name = "per_mushashaiya"
				duration = 3650
			}
		}
	}
	
}

#Rise of the Safawiya
country_event = {
	id = flavor_per.11
	title = flavor_per.11.t
	desc = flavor_per.11.d
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		NOT = { tag = ARL }
		is_year = 1455
		NOT = { is_year = 1465 }
		OR = {
			any_neighbor_country = {
					tag = ARL
			}
			any_owned_province = {
				is_core = ARL
			}
		}
	}

	mean_time_to_happen = {
		months = 30
	}
	
	option = { #
		name = flavor_per.11.a
		every_province = {
			limit = {
				NOT = { owned_by = ARL }
				OR = {
					is_core = ARL
					AND = {
						religion = shiite
						any_neighbor_province = {
							owned_by = ARL
						}
					}
				}
			}
			add_province_modifier = {
				name = "per_safawiya"
				duration = 3650
			}
		}
	}
}

#Qizilbash Tribesmen Assemble
country_event = {
	id = flavor_per.12
	title = flavor_per.12.t
	desc = flavor_per.12.d
	picture = RELIGIOUS_TURMOIL_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		exists = PER
		NOT = { tag = PER }
		is_year = 1450
		NOT = { is_year = 1580 }
		num_of_owned_provinces_with = {
				value = 6
				culture = persian
		}
	}

	mean_time_to_happen = {
		months = 390
		
		modifier = {
			factor = 0.75
			any_owned_province = {
				has_province_modifier = per_mushashaiya
			}
		}
		modifier = {
			factor = 0.75
			any_owned_province = {
				has_province_modifier = per_safawiya
			}
		}
		modifier = {
			factor = 0.75
			num_of_owned_provinces_with = {
				value = 8
				culture = persian
			}
		}
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_capital = no
					culture = persian
				}
				set_province_flag = per_qizilbash
			}
			random_owned_province = {
				limit = {
					is_capital = no
					culture = persian
					NOT = { has_province_flag = per_qizilbash }
				}
				set_province_flag = per_qizilbash
			}
			random_owned_province = {
				limit = {
					is_capital = no
					culture = persian
					NOT = { has_province_flag = per_qizilbash }
				}
				set_province_flag = per_qizilbash
			}
			random_owned_province = {
				limit = {
					is_capital = no
					is_core = PER
					culture = azerbaijani
					NOT = { has_province_flag = per_qizilbash }
				}
				set_province_flag = per_qizilbash
			}
		}
	}
	
	option = { #Ok.
		name = flavor_per.12.a
		random_owned_province = {
			limit = {
				has_province_flag = per_qizilbash
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 1
				friend = PER
			}
		}
		every_owned_province = {
			limit = {
				has_province_flag = per_qizilbash
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 1
				friend = PER
			}
			clr_province_flag = per_qizilbash
		}
	}
}

#Persia and Shiism

country_event = {
	id = flavor_per.13
	title = flavor_per.13.t
	desc = flavor_per.13.d
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		is_free_or_tributary_trigger = yes
		NOT = { is_year = 1630 }
	}

	mean_time_to_happen = {
		months = 30
	}
	
	option = { #
		name = flavor_per.13.a
		ai_chance = { factor = 1 }
		if = {
			limit = {
				NOT = { religion = shiite }
			}
			change_religion = shiite
		}
		add_country_modifier = {
			name = per_shia_conversion_policy
			duration = 3650
		}
		set_country_flag = per_shiite_policies
	}
	
	option = { #
		name = flavor_per.13.b
		ai_chance = { factor = 0 }
		add_stability_or_adm_power = yes
	}
}

#The Sunni Ulema
country_event = {
	id = flavor_per.14
	title = flavor_per.14.t
	desc = flavor_per.14.d
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		religion = shiite
		has_country_flag = per_shiite_policies
	}

	mean_time_to_happen = {
		months = 30
	}
	
	option = { # Carrot
		name = flavor_per.14.a
		ai_chance = { factor = 1 }
		add_country_modifier = {
			name = per_pragmatic_ulema
			duration = 3650
		}
	}
	
	option = { # Whip
		name = flavor_per.14.b
		ai_chance = { factor = 0 }
		add_country_modifier = {
			name = per_conversion_of_the_clergy
			duration = 1825
		}
	}
}

#Shiite Brain Drain

country_event = {
	id = flavor_per.15
	title = flavor_per.15.t
	desc = flavor_per.15.d
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		religion = shiite
		has_country_flag = per_shiite_policies
	}

	mean_time_to_happen = {
		months = 30
	}
	
	option = { # Welcome them with open arms
		name = flavor_per.15.a
		ai_chance = { factor = 1 }
		add_piety = 0.1
		every_country = {
			limit = {
				OR = {
					religion = shiite
					any_owned_province = {
						religion = shiite
					}
				}
			}
			add_opinion = { who = PER modifier = opinion_irritated }
		}
		add_country_modifier = {
			name = per_shiite_immigration
			duration = 7300
		}
	}
	
	#option = { # Turn them away
	#	name = flavor_per.15.b
	#	ai_chance = { factor = 0 }
	#	add_piety = -0.25
	#	add_stability_or_adm_power = yes
	#}
}

#Restructuring of Isfahan
country_event = {
	id = flavor_per.16
	title = flavor_per.16.t
	desc = flavor_per.16.d
	picture = CITY_VIEW_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		religion = shiite
		is_year = 1580
		NOT = { is_year = 1630 }
		owns_core_province = 429
		NOT = { capital = 429 }
		years_of_income = 0.2
	}

	mean_time_to_happen = {
		months = 150
	}
	
	option = { #Let us build a new, truly Persian capital.
		name = flavor_per.16.a
		ai_chance = {
			factor = 1
		}
		add_years_of_income = -0.15
		set_country_flag = per_isfahan_construction
		set_capital = 429
		429 = {
			add_province_modifier = {
				name = "per_building_isfahan"
				duration = -1
			}
		}
	}
	
	option = { #Our current capital fit our current needs
		name = flavor_per.16.b
		ai_chance = {
			factor = 0
		}
		add_stability_or_adm_power = yes
	}
}

#Isfahan - Finished
country_event = {
	id = flavor_per.17
	title = flavor_per.17.t
	desc = flavor_per.17.d
	picture = CITY_VIEW_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = PER
		had_country_flag = { flag = per_isfahan_construction days = 3650 }
		owns_core_province = 429
		429 = {
			has_province_modifier = per_building_isfahan
		}
	}

	mean_time_to_happen = {
		months = 168
	}
	
	option = { #Great!
		name = flavor_per.17.a
		add_prestige = 20
		429 = {
			remove_province_modifier = per_building_isfahan
			add_province_modifier = {
				name = "per_isfahan_maidan"
				duration = -1
			}
		}
	}
	
}

country_event = {
	id = flavor_per.18
	title = "flavor_per.18.t"
	desc = "flavor_per.18.d"
	picture = Kaabah_eventPicture
	
	is_triggered_only = yes
	
	option = { #Reform
		name = "flavor_per.18.a"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
		if = {
			limit = {
				NOT = { government_rank = 3 }
			}
			set_government_rank = 3
		}
		384 = { #medina
					add_base_tax = -2
					add_base_production = -2
					add_base_manpower = -2
			}
			385 = { #mecca
					add_base_tax = -3
					add_base_production = -3
					add_base_manpower = -3		
				}
	}
}

country_event = {
	id = flavor_per.19
	title = "flavor_per.19.t"
	desc = "flavor_per.19.d"
	picture = Persian_battle_eventPicture
	
	is_triggered_only = yes
	
	option = { #Reform
		name = "flavor_per.19.a"
		2340 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}
		2347 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}
		396 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}
		395 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}
		2333 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}
		397 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}
		397 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}
		398 = { #medina
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
			}	
	
		395 = { #mecca
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1	
				}
	}
}

country_event = {
	id = flavor_per.20
	title = "flavor_per.20.t"
	desc = "flavor_per.20.d"
	picture = CITY_DEVELOPMENT_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_per.20.a
		
		trigger = {
			owns = 429
			429 = {
				development = 30
			}
		}
		
		ai_chance = { factor = 0.33 }
		
		set_capital = 429
		429 = {
			add_base_tax = 3
			add_base_production = 2
			add_base_manpower = 2
			add_province_modifier = {
				name = persia_spahan_capital_modifier
				duration = -1
			}
		}
	}
}
	
	country_event = {
	id = flavor_per.21
	title = flavor_per.21.t
	desc = flavor_per.21.d
	picture = LIBERUM_VETO_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_per.21.a
		
		ai_chance = {
			factor = 0.5
			
			modifier = {
				factor = 0
				NOT = { num_of_free_diplomatic_relations = 1 }
			}
		}
		2306 = {
				limit = {
				NOT = { is_core = ARM }
				owned_by = ROOT
			}
			add_core = ARM
			}
		2305 = {
				limit = {
				NOT = { is_core = ARM }
				owned_by = ROOT
			}
			add_core = ARM
			}
		331 = {
				limit = {
				NOT = { is_core = ARM }
				owned_by = ROOT
			}
			add_core = ARM
			}
			
		kartli_kakheti_area = {
			limit = {
				NOT = { is_core = ARM }
				owned_by = ROOT
			}
			add_core = ARM
		}
		samtskhe_area = {
			limit = {
				NOT = { is_core = ARM }
				owned_by = ROOT
			}
			add_core = ARM
		}
		imereti_area = {
			limit = {
				NOT = { is_core = ARM }
				owned_by = ROOT
			}
			add_core = ARM
		}
		armenia_area = {
			limit = {
				NOT = { is_core = ARM }
				owned_by = ROOT
			}
			add_core = ARM
		}
		release = ARM
		ARM = {
		    add_adm_power = 350
			add_dip_power = 350
			add_mil_power = 350
			change_government = monarchy
			add_government_reform = feudalism_reform
		}
		if = {
			limit = {
				is_expanded_mod_active = { mod = subjects }
				can_be_overlord = persian_satrapy
			}
			create_subject = {
				subject = ARM
				subject_type = persian_satrapy
			}
		}
		else = {
			create_march = ARM
		}
	}
	
	option = {
		name = flavor_per.21.b
		
		ai_chance = { factor = 0.5 }
		
		add_prestige = 15
		if = {
			limit = {
				any_owned_province = {
					culture = armenian
				}
			}
			every_owned_province = {
				limit = {
					culture = armenian
				}
				change_culture = ROOT
			}
		}
	}
}

country_event = {
	id = flavor_per.22
	title = "flavor_per.22.t"
	desc = "flavor_per.22.d"
	picture = Persian_battle_eventPicture
	
	is_triggered_only = yes
	
	option = { #allow them
		name = "flavor_per.22.a"
		
		2303 = {
					change_culture = greek
					change_religion = orthodox
					add_base_production = 1
			}
		4310 = {
					change_culture = greek
					change_religion = orthodox
					add_base_production = 1
			}
		332 = {
					change_culture = greek
					change_religion = orthodox
					add_base_production = 1
			}
		4298 = {
					change_culture = greek
					change_religion = orthodox
					add_base_production = 1
			}
		2313 = {
					change_culture = greek
					change_religion = orthodox
					add_base_production = 1
			}
		377 = { 
					change_culture = greek
					change_religion = orthodox
					add_base_production = 1
			}
	}
	
	option = { #refuse
		name = "flavor_per.22.b"
		2303 = {

					add_base_production = -1
			}
		4310 = {

					add_base_production = -1
			}
		332 = {

					add_base_production = -1
			}
		4298 = {

					add_base_production = -1
			}
		2313 = {

					add_base_production = -2
			}
		377 = { 

					add_base_production = -3
			}
    }
}

country_event = {
	id = flavor_per.23
	title = flavor_per.23.t
	desc = flavor_per.23.d
	picture = you_have_my_back_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_per.23.a
		
		ai_chance = {
			factor = 0.5
			
			modifier = {
				factor = 0
				NOT = { num_of_free_diplomatic_relations = 1 }
			}
		}
		
			
			if = {
				limit = {
			exists = BYZ 
				}	
				 set_ai_attitude = {
			who = BYZ
			attitude = attitude_friendly
		}
			 add_opinion = {
				who = BYZ
				modifier = supported_independence
			}
				
		2303 = {
				limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			}
		4310 = {
				limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			}
		332 = {
				limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			}
			330 = {
				limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			}
		balkan_region = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		}
		aegean_archipelago_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		}
		cukurova_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		}
		germiyan_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		}
		hudavendigar_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		}
		aydin_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		}
		ankara_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		}
		karaman_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_religion = orthodox
			change_culture = greek
		}
		kastamonu_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek

			change_religion = orthodox
		}
		rum_area = {
			limit = {
				NOT = { is_core = BYZ }
				owned_by = ROOT
			}
			add_core = BYZ
			change_culture = greek
			change_religion = orthodox
		        }
				every_owned_province = {
				limit = {
				culture = greek
				religion = orthodox
				}	
			    cede_province = BYZ				
			}	
				BYZ = {
				 set_ai_attitude = {
			who = ROOT
			attitude = attitude_friendly
		}
			 add_opinion = {
				who = ROOT
				modifier = supported_independence
			}
			}
	    }
	
		
		if = {
				limit = {
				NOT = { exists = BYZ }
				}	
				 set_ai_attitude = {
			who = GRE
			attitude = attitude_friendly
		}
			 add_opinion = {
				who = GRE
				modifier = supported_independence
			}
				
		2303 = {
				limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			}
		4310 = {
				limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			}
		332 = {
				limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			}
			330 = {
				limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			}
		balkan_region = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		aegean_archipelago_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		cukurova_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		germiyan_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		hudavendigar_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		aydin_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		ankara_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		karaman_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_religion = orthodox
			change_culture = greek
		}
		kastamonu_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		rum_area = {
			limit = {
				NOT = { is_core = GRE }
				owned_by = ROOT
			}
			add_core = GRE
			change_culture = greek
			change_religion = orthodox
		}
		release = GRE
		add_opinion = {
				who = ROOT
				modifier = opinion_pleased
				}
		GRE = {
		     
			germiyan_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		}
		thrace_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		}
		aegean_archipelago_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		}
		macedonia_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		}
		northern_greece_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		}
		morea_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		}
		aydin_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		}
		hudavendigar_area = {
			limit = {
				NOT = { is_core = GRE }
			}
			add_core = GRE
		     }
			 
		 set_ai_attitude = {
			who = ROOT
			attitude = attitude_friendly
		}
			 add_opinion = {
				who = ROOT
				modifier = supported_independence
			}
			 
		    add_adm_power = 350
			add_dip_power = 350
			add_mil_power = 350
			change_government = monarchy
			add_government_reform = feudalism_reform
		     }
		}
	}
	    	
	
	option = {
		name = flavor_per.23.b
		
		ai_chance = { factor = 0.5 }
		
		add_prestige = 15
			every_owned_province = {
				limit = {
					culture = greek
				}
				add_province_modifier = {
					name = "persia_angry_greeks"
					duration = -1
				}
		}
	}
}

country_event = {
	id = flavor_per.24
	title = flavor_per.24.t
	desc = flavor_per.24.d
	picture = LIBERUM_VETO_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_per.24.a
		
		ai_chance = {
			factor = 0.5
			
			modifier = {
				factor = 0
				NOT = { num_of_free_diplomatic_relations = 1 }
			}
		}
		crimea_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}
		dagestan_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}
		circassia_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}
		astrakhan_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}
		azov_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}
		lower_don_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}
		zaporizhia_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}
		yedisan_area = {
			limit = {
				NOT = { is_core = SCH }
				owned_by = ROOT
			}
			add_core = SCH
			change_culture = scythian
		}

		release = SCH
		SCH = {
		    add_adm_power = 350
			add_dip_power = 350
			add_mil_power = 350
			change_government = monarchy
			add_government_reform = feudalism_reform
			zaporizhia_area = {
				limit = {
					NOT = { owned_by = ROOT }
					NOT = { is_core = ROOT }
				}
				add_permanent_claim = ROOT
		}
		yedisan_area = {
				limit = {
					NOT = { owned_by = ROOT }
					NOT = { is_core = ROOT }
				}
				add_permanent_claim = ROOT
			}
		lower_don_area = {
				limit = {
					NOT = { owned_by = ROOT }
					NOT = { is_core = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
		if = {
			limit = {
				is_expanded_mod_active = { mod = subjects }
				can_be_overlord = persian_satrapy
			}
			create_subject = {
				subject = SCH
				subject_type = persian_satrapy
			}
		}
		else = {
			create_march = SCH
		}
	}
	option = {
		name = flavor_per.24.b
		
		ai_chance = { factor = 0.5 }
		
		add_prestige = 15
		if = {
			limit = {
				any_owned_province = {
					culture = scythian
				}
			}
			every_owned_province = {
				limit = {
					culture = scythian
				}
				change_culture = ROOT
			}
		}
	}
}

country_event = {
	id = flavor_per.25
	title = "flavor_per.25.t"
	desc = "flavor_per.25.d"
	picture = Shahnameh_eventPicture
	
	is_triggered_only = yes
	
	option = { #Reform
		name = "flavor_per.25.a"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
			random_owned_province = {
				limit = {
					area = isfahan_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 2
				add_base_tax = 1
				change_religion = zoroastrian
			}
			random_owned_province = {
				limit = {
					area = gonabad_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 2
				add_base_tax = 1
				change_religion = zoroastrian
			}
			random_owned_province = {
				limit = {
					area = farsistan_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 1
				add_base_tax = 1
				change_religion = zoroastrian
			}
			random_owned_province = {
				limit = {
					area = azerbaijan_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 1
				add_base_tax = 1
				change_religion = zoroastrian
			}
				random_owned_province = {
				limit = {
					area = qom_area
					NOT = { religion = zoroastrian }
				}
				change_religion = zoroastrian
				add_base_production = 1
				add_base_tax = 2
			}
			
		change_religion = zoroastrian
		add_government_reform = persian_empire_reform
		add_stability = -2
		add_country_modifier = {
			name = per_reneissance
			duration = 7300
		
		
		}
	}
	
	option = { #Reform
		name = "flavor_per.25.b"
		add_stability = -1
		add_piety = 0.5
		random_owned_province = {
				limit = {
					area = isfahan_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 1
				add_base_tax = 1
				change_religion = zoroastrian
			}
			random_owned_province = {
				limit = {
					area = gonabad_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 1
				add_base_tax = 1
				change_religion = zoroastrian
			}
			random_owned_province = {
				limit = {
					area = farsistan_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 1
				add_base_tax = 1
				change_religion = zoroastrian
			}
			random_owned_province = {
				limit = {
					area = azerbaijan_area
					NOT = { religion = zoroastrian }
				}
				add_base_production = 1
				add_base_tax = 1
				change_religion = zoroastrian
			}
				random_owned_province = {
				limit = {
					area = qom_area
					NOT = { religion = zoroastrian }
				}
				change_religion = zoroastrian
				add_base_production = 1
				add_base_tax = 1
			}
		
        }
}

country_event = {
	id = flavor_per.26
	title = flavor_per.26.t
	desc = flavor_per.26.d
	picture = LIBERUM_VETO_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_per.26.a
		
		ai_chance = {
			factor = 0.5
			
			modifier = {
				factor = 0
				NOT = { num_of_free_diplomatic_relations = 1 }
			}
		}
		transcaspia_area = {
			limit = {
				NOT = { is_core = PRT }
				owned_by = ROOT
			}
			add_core = PRT
			change_culture = parthian
		}
		merv_area = {
			limit = {
				NOT = { is_core = PRT }
				owned_by = ROOT
			}
			add_core = PRT
			change_culture = parthian
		}
		khiva_area = {
			limit = {
				NOT = { is_core = PRT }
				owned_by = ROOT
			}
			add_core = PRT
			change_culture = parthian
		}
		transoxiana_area = {
			limit = {
				NOT = { is_core = PRT }
				owned_by = ROOT
			}
			add_core = PRT
			change_culture = parthian
		}
		central_asia_region = {
			limit = {
				NOT = { is_core = PRT }
				owned_by = ROOT
			}
			add_core = PRT
			change_culture = parthian
		}
		release = PRT
		PRT = {
		    add_adm_power = 350
			add_dip_power = 350
			add_mil_power = 350
			change_government = monarchy
			add_government_reform = feudalism_reform
			zaporizhia_area = {
				limit = {
					NOT = { owned_by = ROOT }
					NOT = { is_core = ROOT }
				}
		}
		yedisan_area = {
				limit = {
					NOT = { owned_by = ROOT }
					NOT = { is_core = ROOT }
				}
				add_permanent_claim = ROOT
			}
		lower_don_area = {
				limit = {
					NOT = { owned_by = ROOT }
					NOT = { is_core = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
		if = {
			limit = {
				is_expanded_mod_active = { mod = subjects }
				can_be_overlord = persian_satrapy
			}
			create_subject = {
				subject = PRT
				subject_type = persian_satrapy
			}
		}
		else = {
			create_march = PRT
		}
	}
	option = {
		name = flavor_per.26.b
		
		ai_chance = { factor = 0.5 }
		
		add_prestige = 15
		if = {
			limit = {
				any_owned_province = {
					culture = parthian
				}
			}
			every_owned_province = {
				limit = {
					culture = parthian
				}
				change_culture = ROOT
			}
		}
	}
}

country_event = { # changed from province to country event
	id = flavor_per.27
	title = "flavor_per.27.t"
	desc = "flavor_per.27.d"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes

	immediate = {
		set_global_flag = nationalist_revolts
		set_country_flag = nationalist_revolt_target # used in incident
	}
	
	option = {
		name = "flavor_per.27.a"
		
		add_stability = -2
		random_owned_province = {
			limit = {
				OR = {
					culture = al_iraqiya_arabic
				}
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 6
				friend = IRQ
			}
			set_province_flag = per_rebels_start_flag
		}
		
		random_owned_province = {
			limit = {
			NOT = { has_province_flag = per_rebels_start_flag }
				OR = {
					culture = azerbaijani
				}
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 5
				friend = ARL
			}
			set_province_flag = per_rebels_start_flag
		}
		random_owned_province = {
			limit = {
				NOT = { has_province_flag = per_rebels_start_flag }
				OR = {
					culture = al_suryah_arabic
				}
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 5
				friend = SYR
			}
			set_province_flag = per_rebels_start_flag
			set_province_flag = nationalist_revolts
		}
		
		if = {
			limit = {
				any_owned_province = {
			culture = turkish
		}
			}
			random_owned_province = {
			limit = {
				NOT = { has_province_flag = per_rebels_start_flag }
				OR = {
					culture = turkish
				}
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 5
				friend = RUM
			}
			set_province_flag = per_rebels_start_flag
			set_province_flag = nationalist_revolts
		}
	}
	
	if = {
			limit = {
				any_owned_province = {
			culture = al_misr_arabic
		}
			}
			random_owned_province = {
			limit = {
				NOT = { has_province_flag = per_rebels_start_flag }
				OR = {
					culture = al_misr_arabic
				}
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 7
				friend = EGY
			}
			set_province_flag = per_rebels_start_flag
			set_province_flag = nationalist_revolts
		}
	}
	
	if = {
			limit = {
				any_owned_province = {
			culture = bedouin_arabic
		}
			}
			random_owned_province = {
			limit = {
				NOT = { has_province_flag = per_rebels_start_flag }
				OR = {
					culture = bedouin_arabic
				}
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 4
				friend = ARB
			}
			set_province_flag = per_rebels_start_flag
			set_province_flag = nationalist_revolts
		}
	}
		
		
		hidden_effect = {
			every_owned_province = {
				limit = {
					OR = {
						culture = azerbaijani
				        culture = al_suryah_arabic
				        culture = al_iraqiya_arabic
				        culture = turkish
				        culture = bedouin_arabic
				        culture = al_misr_arabic
					}
				}
				add_province_modifier = {
					name = "per_revolt_modifier"
					duration = -1 # removed via the on_end event
				}
			}
		}
	}
}

country_event = {
	id = flavor_per.28
	title = "flavor_per.28.t"
	desc = {
		trigger = { 
			NOT = { exists = ARL }
			NOT = { exists = IRQ }
			NOT = { exists = SYR }
		}
		desc = "flavor_per.28.d" # everything went pretty well
	}
	desc = {
		trigger = {
		OR {
			exists = IRQ
			exists = SYR
			exists = ARL
		}
	}
		desc = "flavor_per.28.d2" # oh no the dutch are revolting
	}
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			set_country_flag = had_nationalist_revolts
			every_owned_province = {
				limit = {
					has_province_modifier = per_revolt_modifier
				}
				remove_province_modifier = per_revolt_modifier
			}
		}
	}
	
	option = {
		name = flavor_per.28.a
		trigger = {
			exists = ARL
		}
		add_stability = -1
		add_prestige = -25
	}
	option = {
		name = flavor_per.28.b
		trigger = {
			NOT = { exists = ARL }
		}
		every_owned_province = {
			limit = {
				culture = azerbaijani
				culture = bedouin_arabic
				culture = turkish
				culture = al_iraqiya_arabic
				culture = al_suryah_arabic
				culture = al_misr_arabic
			}
			add_local_autonomy = -25
		}
		
		add_prestige = 25
		add_stability_or_adm_power = yes 
	}
}

country_event = {
	id = flavor_per.29
	title = "flavor_per.29.t"
	desc = "flavor_per.29.d"
	picture = ANGRY_MOB_eventPicture

	major = yes
	is_triggered_only = yes
	fire_only_once = yes
	
	trigger = {
		is_free_or_tributary_trigger = yes
		num_of_owned_provinces_with = {
			value = 15
			OR = {
				controlled_by = REB
				local_autonomy = 90
			}
			OR = {
				culture = azerbaijani
				culture = al_suryah_arabic
				culture = al_iraqiya_arabic
				culture = turkish
				culture = bedouin_arabic
				culture = al_misr_arabic
			}
		}
	}
	
	immediate = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					OR = {
						culture = azerbaijani
					}
					is_capital = no
				}
				discover_country = ARL
				add_core = ARL
				clear_rebels = yes
			}
			
			if = {
			limit = {
				any_owned_province = {
			      culture = turkish
		         } 
			}
			every_owned_province = {
				limit = {
					OR = {
						culture = turkish
					}
					is_capital = no
				}
				discover_country = RUM
				add_core = RUM
				clear_rebels = yes
			}
			release = RUM
			RUM = {
				change_government = monarchy
				add_government_reform = feudalism_reform
				}
			
			
		}
		
		if = {
			limit = {
				any_owned_province = {
			      culture = al_misr_arabic
		         } 
			}
			every_owned_province = {
				limit = {
					OR = {
						culture = al_misr_arabic
					}
					is_capital = no
				}
				discover_country = EGY
				add_core = EGY
				clear_rebels = yes
			}
			release = EGY
			EGY = {
				change_government = monarchy
				add_government_reform = feudalism_reform
				}
			
			
		}
		
		if = {
			limit = {
				any_owned_province = {
			      culture = bedouin_arabic
		         } 
			}
			every_owned_province = {
				limit = {
					OR = {
						culture = bedouin_arabic
					}
					is_capital = no
				}
				discover_country = ARB
				add_core = ARB
				clear_rebels = yes
			}
			release = ARB
			ARB = {
				change_government = monarchy
				add_government_reform = feudalism_reform
				}
			
			
		}
			
			every_owned_province = {
				limit = {
					OR = {
						culture = al_iraqiya_arabic
					}
					is_capital = no
				}
				discover_country = IRQ
				add_core = IRQ
				clear_rebels = yes
			}
			every_owned_province = {
				limit = {
					OR = {
						culture = al_suryah_arabic
					}
					is_capital = no
				}
				discover_country = SYR
				add_core = SYR
				clear_rebels = yes
			}
			release = ARL
			release = SYR
			release = IRQ
			ARL = {
				change_government = monarchy
				add_government_reform = feudalism_reform
				}
				SYR = {
				change_government = monarchy
				add_government_reform = feudalism_reform
				}
			IRQ = {
				change_government = monarchy
				add_government_reform = feudalism_reform
			}
		}
	}
	
	option = {
		name = "flavor_per.29.a"
		ARL = {
			declare_war_with_cb = {
				who = ROOT
				casus_belli = cb_independence_war
			}
		}
		SYR = {
			declare_war_with_cb = {
				who = ROOT
				casus_belli = cb_independence_war
			}
		}
		IRQ = {
			declare_war_with_cb = {
				who = ROOT
				casus_belli = cb_independence_war
			}
		}
		ARB = {
			declare_war_with_cb = {
				who = ROOT
				casus_belli = cb_independence_war
			}
		}
		RUM = {
			declare_war_with_cb = {
				who = ROOT
				casus_belli = cb_independence_war
			}
		}
		
		EGY = {
			declare_war_with_cb = {
				who = ROOT
				casus_belli = cb_independence_war
			}
		}
		hidden_effect = {
			ARL = {
				country_event = { id = flavor_per.30 days = 1 }
				}
			SYR = {
				country_event = { id = flavor_per.31 days = 1 }
				}
			IRQ = {
				country_event = { id = flavor_per.32 days = 1 }
				
			EGY = {
				country_event = { id = flavor_per.34 days = 1 }
			}
			EGY = {
				country_event = { id = flavor_per.35 days = 1 }
			}
			ARB = {
				country_event = { id = flavor_per.36 days = 1 }
				}
			RUM = {
				country_event = { id = flavor_per.37 days = 1 }
				}
			}
		}
	}
}

country_event = {
	id = flavor_per.30
	title = "flavor_per.30.t"
	desc = "flavor_per.30.d"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_per.30.a"
		ARL = {
			capital_scope = {
				build_to_forcelimit = {
					infantry = 0.6
					cavalry = 0.3
					artillery = 0.1
				}
			}
			random_owned_province = {
				limit = {
					has_port = yes
				}
				build_to_forcelimit = {
					heavy_ship = 0.3
					light_ship = 0.3
					transport = 0.2
				}
			}
		}
	}
}

country_event = {
	id = flavor_per.31
	title = "flavor_per.31.t"
	desc = "flavor_per.31.d"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_per.31.a"
		SYR = {
			capital_scope = {
				build_to_forcelimit = {
					infantry = 0.6
					cavalry = 0.3
					artillery = 0.1
				}
			}
			random_owned_province = {
				limit = {
					has_port = yes
				}
				build_to_forcelimit = {
					heavy_ship = 0.3
					light_ship = 0.3
					transport = 0.2
				}
			}
		}
	}
}

country_event = {
	id = flavor_per.32
	title = "flavor_per.32.t"
	desc = "flavor_per.32.d"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_per.32.a"
		IRQ = {
			capital_scope = {
				build_to_forcelimit = {
					infantry = 0.6
					cavalry = 0.3
					artillery = 0.1
				}
			}
			random_owned_province = {
				limit = {
					has_port = yes
				}
				build_to_forcelimit = {
					heavy_ship = 0.3
					light_ship = 0.3
					transport = 0.2
				}
			}
		}
	}
}

country_event = {
	id = flavor_per.33
	title = "flavor_per.33.t"
	desc = "flavor_per.33.d"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes

	trigger = {
		any_owned_province = {
			NOT = { controlled_by = REB }
			NOT = { has_province_flag = nationalist_revolts }
			NOT = { has_province_flag = no_nationalist_revolts }
			OR = {
				culture = al_suryah_arabic
				culture = al_iraqiya_arabic
				culture = azerbaijani
				culture = al_misr_arabic
				culture = turkish
				culture = bedouin_arabic
			}
		}
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					NOT = { controlled_by = REB }
					NOT = { has_province_flag = nationalist_revolts }
					NOT = { has_province_flag = no_nationalist_revolts }
					OR = {
				culture = al_suryah_arabic
					}
				}
				save_event_target_as = nationalist_revolts_target
			}
		}
	}

	option = {
		name = "flavor_per.33.a"
		ai_chance = { factor = 100 }
		event_target:nationalist_revolts_target = {
			set_province_flag = nationalist_revolts
			spawn_rebels = {
				type = nationalist_rebels
				size = 4
			}
		}
	}
	option = {
		name = "flavor_per.33.b"
		ai_chance = { factor = 0 }
		event_target:nationalist_revolts_target = {
			add_local_autonomy = 100
			set_province_flag = no_nationalist_revolts
		}
	}
}

country_event = {
	id = flavor_per.34
	title = "flavor_per.34.t"
	desc = "flavor_per.34.d"
	picture = BATTLE_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_per.34.a"
		create_alliance = SYR
		join_all_offensive_wars_of = SYR
		set_ai_attitude = {
			who = SYR
			attitude = attitude_friendly
		}
		SYR = {
			add_opinion = {
				who = ROOT
				modifier = supported_independence
			}
		}
	}
}

country_event = {
	id = flavor_per.35
	title = "flavor_per.35.t"
	desc = "flavor_per.35.d"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_per.35.a"
		EGY = {
			capital_scope = {
				build_to_forcelimit = {
					infantry = 0.6
					cavalry = 0.3
					artillery = 0.1
				}
			}
			random_owned_province = {
				limit = {
					has_port = yes
				}
				build_to_forcelimit = {
					heavy_ship = 0.3
					light_ship = 0.3
					transport = 0.2
				}
			}
		}
	}
}

country_event = {
	id = flavor_per.36
	title = "flavor_per.36.t"
	desc = "flavor_per.36.d"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_per.36.a"
		ARB = {
			capital_scope = {
				build_to_forcelimit = {
					infantry = 0.6
					cavalry = 0.3
					artillery = 0.1
				}
			}
			random_owned_province = {
				limit = {
					has_port = yes
				}
				build_to_forcelimit = {
					heavy_ship = 0.3
					light_ship = 0.3
					transport = 0.2
				}
			}
		}
	}
}

country_event = {
	id = flavor_per.37
	title = "flavor_per.37.t"
	desc = "flavor_per.37.d"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_per.37.a"
		RUM = {
			capital_scope = {
				build_to_forcelimit = {
					infantry = 0.6
					cavalry = 0.3
					artillery = 0.1
				}
			}
			random_owned_province = {
				limit = {
					has_port = yes
				}
				build_to_forcelimit = {
					heavy_ship = 0.3
					light_ship = 0.3
					transport = 0.2
				}
			}
		}
	}
}

country_event = {
	id = per_new_heir
	title = "per_new_heir.t"
	desc = "per_new_heir.d"
	picture = BIG_BOOK_eventPicture
	
	mean_time_to_happen = {
		months = 60
	}

	trigger = {
	    religion = zoroastrian
		has_heir = no
		ai = no
		has_regency = no
		OR = {
			tag = PER
			tag = TAB
			tag = ARD
		}
	}
	
	option = {
		trigger = {
			OR = {
				tag = PER
				tag = TAB
				tag = ARD
			}
		}
		name = "per_new_heir.a"	
		add_legitimacy = 15
		define_heir = {
			claim = 50
			dynasty = "Achaemenid"
		}
		add_country_modifier = {
			name = per_achaemenid
			duration = -1
		}
	}
	
	option = {
		trigger = {
			OR = {
				tag = PER
				tag = TAB
				tag = ARD
			}
		}
		name = "per_new_heir.b"	
		add_legitimacy = 15
		define_heir = {
			claim = 50
			dynasty = "Sassanid"
		}
		add_country_modifier = {
			name = per_sassanid
			duration = -1
		}
	}
	
	option = {
		trigger = {
			OR = {
				tag = PER
				tag = TAB
				tag = ARD
			}
		}
		name = "per_new_heir.c"	
		add_legitimacy = 15
		define_heir = {
			claim = 50
			dynasty = "Zarathushtran"
		}
		add_country_modifier = {
			name = per_zarathushtran
			duration = -1
		}
	}
	
	option = {
		trigger = {
			OR = {
				tag = PER
				tag = TAB
				tag = ARD
			}
		}
		name = "per_new_heir.e"	
		add_legitimacy = 15
		define_heir = {
			claim = 50
			dynasty = "Ziyarid"
		}
		add_country_modifier = {
			name = per_ziyarid
			duration = -1
		}
	}
}
