namespace = FEE_Ajuuraan_Events

#Integrating Mogadishu currency
country_event = {
	id = FEE_Ajuuraan_Events.1
	title = FEE_Ajuuraan_Events.1.T
	desc = FEE_Ajuuraan_Events.1.D
	picture = CORRUPTION_eventPicture

	fire_only_once = yes

	trigger = {
		tag = AJU
		OR = {
			AND = {
				NOT = {
					exists = MDI
				}
				owns_core_province = 1205
			}
			MDI = {
				is_subject_of = AJU
			}
		}
	}

	mean_time_to_happen = {
		months = 48
		modifier = {
			factor = 0.5
			has_idea_group = economic_ideas
		}
	}

	option = {
		name = FEE_Ajuuraan_Events.1.OPT1

		add_country_modifier = {
			name = fee_aju_mogadishu_currency
			duration = -1
		}
		1205 = {
			add_province_modifier = {
				name = fee_aju_mogadishu_administration
				duration = -1
			}
		}
	}

	option = {
		name = FEE_Ajuuraan_Events.1.OPT2

		add_stability_or_adm_power = yes
	}
}

#Toob Menadir
country_event = {
	id = FEE_Ajuuraan_Events.2
	title = FEE_Ajuuraan_Events.2.T
	desc = FEE_Ajuuraan_Events.2.D
	picture = HARBOUR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = AJU
			tag = MDI
		}
		owns_core_province = 1205
		is_at_war = no
		is_year = 1500
	}

	mean_time_to_happen = {
		months = 120
	}

	option = {
		name = FEE_Ajuuraan_Events.2.OPT1
		ai_chance = {
			factor = 95
		}

		1205 = {
			add_base_production = 1
			add_province_modifier = {
				name = fee_aju_toob_menadir
				duration = -1
			}
		}
		MAM = {
			country_event = { id = FEE_Ajuuraan_Events.3 }
		}
		SYR = {
			country_event = { id = FEE_Ajuuraan_Events.3 }
		}
		if = {
			limit = {
				TUR = {
					OR = {
						owns_core_province = 382
						owns_core_province = 361
					}
				}
			}
			country_event = { id = FEE_Ajuuraan_Events.3 }
		}
	}
	option = {
		name = FEE_Ajuuraan_Events.2.OPT2
		ai_chance = {
			factor = 5
		}

		add_prestige_or_monarch_power = { amount = 15 }
	}
}

# Toob Menadir Trade
country_event = {
	id = FEE_Ajuuraan_Events.3
	title = FEE_Ajuuraan_Events.3.T
	desc = FEE_Ajuuraan_Events.3.D
	picture = HARBOUR_eventPicture

	is_triggered_only = yes

	trigger = {
		has_opinion = {
			who = FROM
			value = -10
		}
	}

	option = {
		name = FEE_Ajuuraan_Events.3.OPT1
		add_treasury = 20

		add_opinion = {
			who = FROM
			modifier = fee_aju_toob_menadir_trade
		}
	}
}

#Ajuran Army
country_event = {
	id = FEE_Ajuuraan_Events.4
	title = FEE_Ajuuraan_Events.4.T
	desc = FEE_Ajuuraan_Events.4.D
	picture = LAND_MILITARY_eventPicture

	fire_only_once = yes

	trigger = {
		tag = AJU
		is_year = 1480
		NOT = {
			is_year = 1560
		}
	}

	mean_time_to_happen = {
		months = 240
	}

	option = {
		name = FEE_Ajuuraan_Events.4.OPT1

		add_stability = -1
		change_religious_influence_equivalent_fee = { add = 10 }
		add_country_modifier = {
			name = fee_aju_local_conscripts
			duration = -1
		}
	}

	option = {
		name = FEE_Ajuuraan_Events.4.OPT2

		add_stability_or_adm_power = yes
		add_years_of_income = -0.25
		add_country_modifier = {
			name = fee_aju_reliance_mercenaries
			duration = -1
		}
	}
}

# Islamic Immigration
country_event = {
	id = FEE_Ajuuraan_Events.5
	title = FEE_Ajuuraan_Events.5.T
	desc = FEE_Ajuuraan_Events.5.D
	picture = RELIGION_eventPicture

	trigger = {
		tag = AJU
		is_year = 1480
		NOT = { is_year = 1700 }
		OR = {
			GRA = {
				OR = {
					religion = sunni
					religion = shiite
					religion = ibadi
				}
				NOT = {
					num_of_cities = 6
				}
			}
			NOT = { exists = GRA }
			any_country = {
				capital_scope = {
					region = arabia_region
				}
				OR = {
					religion = sunni
					religion = shiite
					religion = ibadi
				}
				war_exhaustion = 3
			}
		}
	}

	mean_time_to_happen = {
		months = 1200
	}

	option = {
		name = FEE_Ajuuraan_Events.5.OPT1

		change_religious_influence_equivalent_fee = { add = 20 }
		add_prestige_or_monarch_power = { amount = 10 }
		add_adm_power = 25
		define_advisor = {
			type = theologian
			skill = 2
			discount = yes
		}
		define_advisor = {
			type = diplomat
			skill = 2
			discount = yes
		}
	}
	option = {
		name = FEE_Ajuuraan_Events.5.OPT2

		create_general = { tradition = 40 }
		change_religious_influence_equivalent_fee = { remove = 20 }
		add_prestige_or_monarch_power = { amount = 10 }
		add_mil_power = 25
	}

	option = {
		name = FEE_Ajuuraan_Events.5.OPT3

		add_dip_power = 25
		add_prestige_or_monarch_power = { amount = 5 }
		capital_scope = {
			add_base_production = 1
			add_base_tax = 1
			add_base_manpower = 1
		}
	}
}