###########################################
# Flavor Events for the Bahmani Sultanate
#
# Scripted by Henrik Lohmander
###########################################

namespace = flavor_bah
normal_or_historical_nations = yes

#Bidar, a true capital for the Bahmanis
country_event = {
	id = flavor_bah.1
	title = flavor_bah.1.t
	desc = flavor_bah.1.d
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = BAH
		religion_group = muslim
		has_ruler = "00000000000000 II"
		years_of_income = 0.25
	}
	
	mean_time_to_happen = {
		months = 18
	}

	option = {
		name = flavor_bah.1.a #Bidar must remain a capital worth of our dynasty.
		add_adm_power = -50
		add_years_of_income = -0.2
		capital_scope = {
			add_province_modifier = {
				name = "bah_bidar_fort"
				duration = -1
			}
		}
	}
	
	option = {
		name = flavor_bah.1.b #Let us not go overboard with this.
		add_prestige = -5
	}
}

#Attracting the Right People

country_event = {
	id = flavor_bah.2
	title = flavor_bah.2.t
	desc = flavor_bah.2.d
	picture = HARBOUR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = BAH
		religion_group = muslim
		NOT = { is_year = 1460 }
		NOT = { num_of_ports = 1 }
		years_of_income = 0.1
	}
	
	mean_time_to_happen = {
		months = 48
	}
	
	option = {
		name = flavor_bah.2.a #Let us double our efforts.
		ai_chance = { factor = 1 }
		add_years_of_income = -0.05
		add_prestige = 10
		add_country_modifier = {
			name = "bah_attracting_the_right_people"
			duration = 3650
		}
		set_country_flag = bah_pr_campaign
	}
	option = {
		name = flavor_bah.2.b #Let us make more use of the local expertise.
		ai_chance = { factor = 0 }
		add_stability = -1
		add_piety = -0.1
		
	}
}

#Mahmud Gawan
country_event = {
	id = flavor_bah.3
	title = flavor_bah.3.t
	desc = flavor_bah.3.d
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				NOT = {
					has_dlc = "Dharma"
				}
				OR = {
					prestige = 80
					has_country_flag = bah_pr_campaign
				}
				is_year = 1450
				NOT = { is_year = 1480 }
				tag = BAH
				religion_group = muslim
			}
			AND = {
				has_dlc = "Dharma"
				has_country_flag = mahmud_gawan_flag
			}
		}
	}
	
	mean_time_to_happen = {
		months = 90
	}

	option = {
		name = flavor_bah.3.a
		add_adm_power = 25
		add_dip_power = 25
		add_meritocracy_effect = yes
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
		define_advisor = {
			type = trader
			name = "00000000000"
			culture = persian
			religion = shiite
			skill = 3
			discount = yes
		}
	}
}

#The Loyal Habshis
country_event = {
	id = flavor_bah.4
	title = flavor_bah.4.t
	desc = flavor_bah.4.d
	picture = SHIP_SAILING_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = BAH
		religion_group = muslim
		has_country_flag = bah_deccanis_gharbians_conflict
	}
	
	mean_time_to_happen = {
		months = 90
	}

	option = {
		ai_chance = { factor = 90 }
		name = flavor_bah.4.a
		add_country_modifier = {
				name = "bah_habhsis"
				duration = -1
		}
	}
	
	option = {
		name = flavor_bah.4.b
		ai_chance = { factor = 10 }

	}
}

#Deccanis and Gharbians
#Court 2 sides etc
country_event = {
	id = flavor_bah.5
	title = flavor_bah.5.t
	desc = flavor_bah.5.d
	picture = BAD_WITH_MONARCH_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = BAH
		religion_group = muslim
		is_year = 1460
		NOT = { is_year = 1500 }
		has_country_flag = bah_pr_campaign
	}
	
	mean_time_to_happen = {
		months = 100
	}

	option = {	#Balanced approach
		ai_chance = { factor = 90 }
		name = flavor_bah.5.a
		set_country_flag = bah_deccanis_gharbians_conflict
		add_country_modifier = {
				name = "bah_deccanis_gharbians"
				duration = -1
		}
	}
	
	option = {	#Favor the Gharbians
		name = flavor_bah.5.b
		ai_chance = { factor = 5 }
		set_country_flag = bah_deccanis_gharbians_conflict
		add_stability = -1
		add_country_modifier = {
				name = "bah_gharbians"
				duration = -1
		}
	}
	
	option = {	#Favor the Deccanis
		name = flavor_bah.5.c
		ai_chance = { factor = 5 }
		set_country_flag = bah_deccanis_gharbians_conflict
		add_stability = -1
		add_country_modifier = {
				name = "bah_deccanis"
				duration = -1
		}
	}
}

#Bidriware
country_event = {
	id = flavor_bah.6
	title = flavor_bah.6.t
	desc = flavor_bah.6.d
	picture = IMPORTANT_STATUE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = BAH
		religion_group = muslim
		capital = 1948 #Bidar
		has_country_flag = bah_pr_campaign
	}
	
	mean_time_to_happen = {
		months = 180
	}

	option = {
		name = flavor_bah.6.a
		capital_scope = {
			add_base_production = 2
			add_province_modifier = {
					name = "bah_bidriware_boom"
					duration = 3650
			}
		}
	}
}

#Large Diamond found
country_event = {
	id = flavor_bah.7
	title = flavor_bah.7.t
	desc = flavor_bah.7.d
	picture = IMPORTANT_STATUE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = BAH
		religion_group = muslim
		owns = 542 #Golconda
	}
	
	mean_time_to_happen = {
		months = 468
	}

	option = {
		name = flavor_bah.7.a #I shall treasure it always
		add_prestige = 30
	}
	
	option = {
		name = flavor_bah.7.b #Sell it
		add_years_of_income = 0.25
	}
}

#Afanasy Nikitin
country_event = {
	id = flavor_bah.8
	title = flavor_bah.8.t
	desc = flavor_bah.8.d
	picture = IMPORTANT_STATUE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = BAH
		is_year = 1460
		NOT = { is_year = 1472 }
	}
	
	mean_time_to_happen = {
		months = 30
	}

	option = {
		name = flavor_bah.8.a #Interesting
		add_dip_power = 25
	}
	
}