namespace = mmetr_FAT_mission_events

# The White Banner of the Shias
country_event = {
	id = mmetr_FAT_mission_events.1
	title = "mmetr_FAT_mission_events.1.t"
	desc = "mmetr_FAT_mission_events.1.desc"
	picture = PRAYING_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.1.a"
		
		add_country_modifier = {
			name = "me_fat_defensive_holy_war"
			duration = 10950
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.1.b"
		
		add_country_modifier = {
			name = "me_fat_offensive_holy_war"
			duration = 10950
		}
	}
}

# The Rock Crystal Ewers of the Caliph
country_event = {
	id = mmetr_FAT_mission_events.2
	title = "mmetr_FAT_mission_events.2.t"
	desc = "mmetr_FAT_mission_events.2.desc"
	picture = PAINTER_ARTIST_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.2.a"
		
		add_country_modifier = {
			name = "me_fat_rock_crystal_ewers"
			duration = -1
		}
	}
}

# The Pillars of Islam
country_event = {
	id = mmetr_FAT_mission_events.3
	title = "mmetr_FAT_mission_events.3.t"
	desc = "mmetr_FAT_mission_events.3.desc"
	picture = RELIGION_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.3.a"
		
		define_advisor = {
			type = theologian
			skill = 3
			discount = yes
		}
		add_country_modifier = {
			name = "me_fat_daaim_al_islam"
			duration = -1
		}
	}
}

# Flax, the Cash Crop of Egypt
country_event = {
	id = mmetr_FAT_mission_events.4
	title = "mmetr_FAT_mission_events.4.t"
	desc = "mmetr_FAT_mission_events.4.desc"
	picture = FARMING_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.4.a"
		
		add_dip_power = 50
		add_country_modifier = {
			name = "me_fat_the_flax_trade"
			duration = -1
		}
	}
}

# The City Victorious
country_event = {
	id = mmetr_FAT_mission_events.5
	title = "mmetr_FAT_mission_events.5.t"
	desc = "mmetr_FAT_mission_events.5.desc"
	picture = CITY_VIEW_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.5.a"
		
		add_country_modifier = {
			name = "me_fat_victorious_army"
			duration = 10950
		}
		egypt_region = {
			limit = {
				is_empty = no
				NOT = { owned_by = ROOT }
				NOT = { is_core = ROOT }
				NOT = { is_permanent_claim = ROOT }
			}
			add_permanent_claim = ROOT
		}
	}
}

# Great Palaces of al-Qahira
country_event = {
	id = mmetr_FAT_mission_events.6
	title = "mmetr_FAT_mission_events.6.t"
	desc = "mmetr_FAT_mission_events.6.desc"
	picture = CITY_VIEW_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.6.a"
		
		add_adm_power = 100
		361 = {
			add_province_modifier = {
				name = "me_fat_dar_al_khalifa"
				duration = -1
			}
		}
	}
}

# Egyptian Administration
country_event = {
	id = mmetr_FAT_mission_events.7
	title = "mmetr_FAT_mission_events.7.t"
	desc = "mmetr_FAT_mission_events.7.desc"
	picture = GOOD_WITH_MONARCH_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.7.a"
		
		add_country_modifier = {
			name = "me_fat_egyptian_local_administration"
			duration = 10950
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.7.b"
		
		add_country_modifier = {
			name = "me_fat_fatimid_centralization"
			duration = 10950
		}
	}
}

# The Sharif of Mecca
country_event = {
	id = mmetr_FAT_mission_events.8
	title = "mmetr_FAT_mission_events.8.t"
	desc = "mmetr_FAT_mission_events.8.desc"
	picture = muslimgfx_HAJJ_eventPicture		#Kaaba event picture from Sword and Crescent

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.8.a"
		
		add_country_modifier = {
			name = "me_fat_suzerain_of_hejaz"
			duration = 10950
		}
		mecca_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_loyal_sharifate_of_mecca"
				duration = 10950
			}
		}
	}
}

# Governors of Aleppo and Damascus
country_event = {
	id = mmetr_FAT_mission_events.9
	title = "mmetr_FAT_mission_events.9.t"
	desc = "mmetr_FAT_mission_events.9.desc"
	picture = CONQUEST_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.9.a"
		
		add_army_tradition = 15
		add_country_modifier = {
			name = "me_fat_reigned_in_governors"
			duration = 10950
		}
	}
}

# Patronage of Bayt al-Maqdis (Holy House)
country_event = {
	id = mmetr_FAT_mission_events.10
	title = "mmetr_FAT_mission_events.10.t"
	desc = "mmetr_FAT_mission_events.10.desc"
	picture = CITY_VIEW_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.10.a"
		
		379 = {
			add_province_modifier = {
				name = "me_fat_muslim_patronage"
				duration = 10950
			}
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.10.b"
		
		379 = {
			add_province_modifier = {
				name = "me_fat_dhimmi_protection"
				duration = 10950
			}
		}
	}
}

# Friends in Nubia
country_event = {
	id = mmetr_FAT_mission_events.11
	title = "mmetr_FAT_mission_events.11.t"
	desc = "mmetr_FAT_mission_events.11.desc"
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.11.a"
		
		add_country_modifier = {
			name = "me_fat_slave_soldiers"
			duration = 10950
		}
		if = {		#repeated here after already activating from mission effect
			limit = {
				MAK = {
					OR = {
						has_opinion = {
							who = ROOT
							value = 100
						}
						alliance_with = ROOT
						is_subject_of = ROOT
					}
				}
			}
			MAK = {
				add_historical_friend = ROOT
			}
			add_historical_friend = MAK
		}
		else_if = {
			limit = {
				NBI = {
					OR = {
						has_opinion = {
							who = ROOT
							value = 100
						}
						alliance_with = ROOT
						is_subject_of = ROOT
					}
				}
			}
			NBI = {
				add_historical_friend = ROOT
			}
			add_historical_friend = NBI
		}
	}
}

# Kutama Recruitment
country_event = {
	id = mmetr_FAT_mission_events.12
	title = "mmetr_FAT_mission_events.12.t"
	desc = "mmetr_FAT_mission_events.12.desc"
	picture = LAND_MILITARY_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.12.a"
		
		define_advisor = {
			type = army_organiser
			skill = 2
			discount = yes
			culture = berber
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.12.b"
		
		define_advisor = {
			type = quartermaster
			skill = 2
			discount = yes
			culture = berber
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.12.c"
		
		define_advisor = {
			type = grand_captain
			skill = 2
			discount = yes
			culture = berber
		}
	}
}

# The Martyrdom of Husayn ibn Ali
country_event = {
	id = mmetr_FAT_mission_events.13
	title = "mmetr_FAT_mission_events.13.t"
	desc = "mmetr_FAT_mission_events.13.desc"
	picture = RELIGION_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.13.a"
		
		add_power_projection = {
			type = mission_rewards_power_projection		#Adding Power Projection
			amount = 25
		}
		add_country_modifier = {
			name = "me_fat_memory_of_martyrdom"
			duration = 10950
		}
	}
}

# Greek Fire of the Fatimids
country_event = {
	id = mmetr_FAT_mission_events.14
	title = "mmetr_FAT_mission_events.14.t"
	desc = "mmetr_FAT_mission_events.14.desc"
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.14.a"
		
		add_country_modifier = {
			name = "me_fat_greek_fire"
			duration = 10950
		}
	}
}

# The Da'i of Yemen
country_event = {
	id = mmetr_FAT_mission_events.15
	title = "mmetr_FAT_mission_events.15.t"
	desc = "mmetr_FAT_mission_events.15.desc"
	picture = MMETR_SOUTH_ARABIAN_KING_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.15.a"
		
		add_country_modifier = {
			name = "me_fat_south_arabian_trade_networks"
			duration = -1
		}
		tihama_al_yemen_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_fatamid_dai_of_yemen"
				duration = 10950
			}
		}
		asir_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_fatamid_dai_of_yemen"
				duration = 10950
			}
		}
		upper_yemen_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_fatamid_dai_of_yemen"
				duration = 10950
			}
		}
		yemen_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_fatamid_dai_of_yemen"
				duration = 10950
			}
		}
		hadramut_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_fatamid_dai_of_yemen"
				duration = 10950
			}
		}
	}
}

# The Revolution Reaches Baghdad
country_event = {
	id = mmetr_FAT_mission_events.16
	title = "mmetr_FAT_mission_events.16.t"
	desc = "mmetr_FAT_mission_events.16.desc"
	picture = PRAYING_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.16.a"
		
		add_prestige = 25
		add_legitimacy = 50
		add_country_modifier = {
			name = "me_fat_caliphate_in_baghdad"
			duration = 10950
		}
	}
}

# Christian Cities of the Romans
country_event = {
	id = mmetr_FAT_mission_events.17
	title = "mmetr_FAT_mission_events.17.t"
	desc = "mmetr_FAT_mission_events.17.desc"
	picture = ROMAN_ROAD_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.17.a"
		
		anatolia_region = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_policy_of_tolerance"
				duration = 3650
			}
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.17.b"
		
		anatolia_region = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_policy_of_conversion"
				duration = 3650
			}
		}
	}
}

# The Caliph Enters Qustantiniyya
country_event = {
	id = mmetr_FAT_mission_events.18
	title = "mmetr_FAT_mission_events.18.t"
	desc = "mmetr_FAT_mission_events.18.desc"
	picture = MOSQUE_HAGA_SOPHIA_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.18.a"
		
		151 = {
			add_province_modifier = {
				name = "me_fat_treasures_untouched"
				duration = 10950
			}
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.18.b"
		
		trigger = {		#appears only if Constantinople is not the capital
			151 = {
				NOT = {
					is_capital_of = ROOT
				}
			}
		}
		
		151 = {
			add_province_modifier = {
				name = "me_fat_treasures_confiscated"
				duration = 10950
			}
		}
		capital_scope = {
			add_province_modifier = {
				name = "me_fat_treasures_of_constantinople"
				duration = 10950
			}
		}
	}
}

# The Neverending Revolution
country_event = {
	id = mmetr_FAT_mission_events.19
	title = "mmetr_FAT_mission_events.19.t"
	desc = "mmetr_FAT_mission_events.19.desc"
	picture = PRAYING_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.19.a"
		
		add_prestige = 40
		add_legitimacy = 100
		add_country_modifier = {
			name = "me_fat_leading_the_revolution"
			duration = -1
		}
	}
}

# The Fate of the Qarmatians
country_event = {
	id = mmetr_FAT_mission_events.20
	title = "mmetr_FAT_mission_events.20.t"
	desc = "mmetr_FAT_mission_events.20.desc"
	picture = IMPALED_SOLDIERS_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.20.a"
		
		bahrain_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_harsh_treatment"
				duration = 10950
			}
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.20.b"
		
		bahrain_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_qarmatians_forgiven"
				duration = 10950
			}
		}
	}
}

# The Fatimid Cities of Ifriqiyah
country_event = {
	id = mmetr_FAT_mission_events.21
	title = "mmetr_FAT_mission_events.21.t"
	desc = "mmetr_FAT_mission_events.21.desc"
	picture = CITY_DEVELOPMENT_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.21.a"
		
		add_prestige = 15
		4566 = {
			rename_capital = "El-Mansuriya"
		}
		4566 = {
			add_province_modifier = {
				name = "me_fat_fatimid_palace"
				duration = -1
			}
		}
		2473 = {
			add_province_modifier = {
				name = "me_fat_fatimid_palace"
				duration = -1
			}
		}
	}
}

# The Caliph in Rome
country_event = {
	id = mmetr_FAT_mission_events.22
	title = "mmetr_FAT_mission_events.22.t"
	desc = "mmetr_FAT_mission_events.22.desc"
	picture = POPE_PREACHING_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.22.a"
		
		italy_region = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_policy_of_tolerance"
				duration = 3650
			}
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.22.b"
		
		italy_region = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_province_modifier = {
				name = "me_fat_policy_of_conversion"
				duration = 3650
			}
		}
	}
}

# The House of Knowledge in Cairo
country_event = {
	id = mmetr_FAT_mission_events.23
	title = "mmetr_FAT_mission_events.23.t"
	desc = "mmetr_FAT_mission_events.23.desc"
	picture = UNIVERSITY_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.23.a"
		
		define_advisor = {
			type = philosopher
			skill = 3
			discount = yes
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.23.b"
		
		define_advisor = {
			type = natural_scientist
			skill = 3
			discount = yes
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.23.c"
		
		define_advisor = {
			type = theologian
			skill = 3
			discount = yes
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.23.d"
		
		define_advisor = {
			type = statesman
			skill = 3
			discount = yes
		}
	}
}

# An Emir of Italiya?
country_event = {
	id = mmetr_FAT_mission_events.24
	title = "mmetr_FAT_mission_events.24.t"
	desc = "mmetr_FAT_mission_events.24.desc"
	picture = COURT_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.24.a"	#Just in northern Italy
		
		tuscany_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			cede_province = IT0		#new Sultanate of Italiya tag
			add_core = IT0
		}
		emilia_romagna_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			cede_province = IT0		#new Sultanate of Italiya tag
			add_core = IT0
		}
		
		vassalize = IT0
		
		IT0 = {
			add_country_modifier = {
				name = "me_fun_granted_autonomy"
				duration = 1825
			}
			if = {
				limit = {
					religion = shiite
				}
				change_religion = shiite
			}
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.24.b"	#Grant it Rome / Central Italy
		
		tuscany_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			cede_province = IT0		#new Sultanate of Italiya tag
			add_core = IT0
		}
		emilia_romagna_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			cede_province = IT0		#new Sultanate of Italiya tag
			add_core = IT0
		}
		lazio_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			cede_province = IT0		#new Sultanate of Italiya tag
			add_core = IT0
		}
		central_italy_area = {
			limit = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			cede_province = IT0		#new Sultanate of Italiya tag
			add_core = IT0
		}
		
		vassalize = IT0
		
		IT0 = {
			add_country_modifier = {
				name = "me_fun_granted_autonomy"
				duration = 1825
			}
			if = {
				limit = {
					religion = shiite
				}
				change_religion = shiite
			}
		}
	}
	
	option = {
		name = "mmetr_FAT_mission_events.24.c"		#status quo
		
	}
}

# The Descendants of Ali
country_event = {
	id = mmetr_FAT_mission_events.25
	title = "mmetr_FAT_mission_events.25.t"
	desc = "mmetr_FAT_mission_events.25.desc"
	picture = BIG_BOOK_eventPicture

	is_triggered_only = yes
	
	option = {
		name = "mmetr_FAT_mission_events.25.a"
		
		override_country_name = ALID
		set_dynasty = "Alid"
	}
	
	option = {
		name = "mmetr_FAT_mission_events.25.b"
		
		
	}
}

