########################################
# Flavor Events for Mewar
#
# Scripted by Henrik Lohmander
########################################

namespace = flavor_mer
normal_or_historical_nations = yes

#Vijaya Sthambha
country_event = {
	id = flavor_mer.1
	title = "flavor_mer.1.t"
	desc = "flavor_mer.1.d"
	picture = GOOD_WITH_MONARCH_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = MER
		is_year = 1446
		not = { is_year = 1452 }
	}
	
	mean_time_to_happen = {
		months = 18
	}
	
	option = {
		name = "flavor_mer.1.a"	#Perfection!
		add_country_modifier = {
				name = "mer_vijaya_sthambha"
				duration = 3650
		}
	}
}

#The return of Rana Jodha Rathore
country_event = {
	id = flavor_mer.2
	title = "flavor_mer.2.t"
	desc = "flavor_mer.2.d"
	picture = MILITARY_CAMP_eventPicture
	
	fire_only_once = yes

	trigger = {
		TAG = MER
		NOT = { exists = MAW }
		is_year = 1455
		NOT = { is_year = 1490 }
		owns = 514
		num_of_cities = 3
	}
	
	mean_time_to_happen = {
		months = 105
	}
	
	immediate = {
		hidden_effect = {
			MAW = {
				514 = {
					cede_province = MAW
					add_core = MAW
				}
				define_ruler = {
					name = "Jodha"
					dynasty = "0000"
					culture = rajput
					religion = hinduism
					claim = 100
					DIP = 2
					MIL = 4
					ADM = 4
				}
				adopt_reform_progress = ROOT
			}
		}
	}
	
	option = {
		name = "flavor_mer.2.a"	#This means war.
		ai_chance = {
			factor = 1
		}
		custom_tooltip = flavor_mer.2.a.tt
		MAW = {
			declare_war_with_cb = {
				who = ROOT
				casus_belli = cb_independence_war
			}
		}
	}
	option = {
		name = "flavor_mer.2.b"	#Let bygones be bygones.
		ai_chance = {
			factor = 0
		}
		custom_tooltip = flavor_mer.2.a.tt
	}
}

#Kumbalgarh
country_event = {
	id = flavor_mer.3
	title = "flavor_mer.3.t"
	desc = "flavor_mer.3.d"
	picture = FORT_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = MER
		NOT = { is_year = 1460 }
		owns_core_province = 2067
	}
	
	mean_time_to_happen = {
		months = 48
	}
	
	option = {
		name = "flavor_mer.3.a"	#Build Kumbalgarh
		ai_chance = {
			factor = 1
		}
		add_years_of_income = -0.1
		2067 = {
			add_province_modifier = {
				name = "mer_kumbalgarh"
				duration = -1
			}
		}
	}
	option = {
		name = "flavor_mer.3.b"	#Fortify the countryside instead.
		ai_chance = {
			factor = 0
		}
		add_country_modifier = {
				name = "mer_fortification_effort"
				duration = 1825
		}
	}
}

#Mira Bai
country_event = {
	id = flavor_mer.4
	title = "flavor_mer.4.t"
	desc = "flavor_mer.4.d"
	picture = PRAYING_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = MER
		is_year = 1480
		not = { is_year = 1550 }
	}
	
	mean_time_to_happen = {
		months = 210
	}
	
	option = {
		name = "flavor_mer.4.a"	#Ok.
		add_prestige = 20
	}
}

#The Plot against Rana Kumbha
country_event = {
	id = flavor_mer.5
	title = "flavor_mer.5.t"
	desc = "flavor_mer.5.d"
	picture = ASSASSINATION_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = MER
		has_ruler = "0000000000"
		is_year = 1460
		NOT = { is_year = 1470 }
	}

	mean_time_to_happen = {
		months = 30
	}
	
	option = {
		name = "flavor_mer.5.a" #Support Udai
		add_stability = -1
		define_ruler = {
			name = "0000000"
			dynasty = "00000"
			religion = hinduism
			culture = rajput
		}
		if = {
			limit = {
				has_states_general_mechanic = yes
			}
			change_statists_vs_orangists = 1
		}
		random_owned_province = {
			limit = { is_capital = no }
			spawn_rebels = {
				type = pretender_rebels
				size = 2
				leader = "Raimal"
				leader_dynasty = "Sisodiya"
			}
		}
	}
	option = {
		name = "flavor_mer.5.b"	#Support Raimal
		add_stability = -1
		define_ruler = {
			name = "00000"
			dynasty = "00000"
			culture = rajput
			religion = hinduism
		}
		if = {
			limit = {
				has_states_general_mechanic = yes
			}
			change_statists_vs_orangists = 1
		}
		random_owned_province = {
			limit = { is_capital = no }
			spawn_rebels = {
				type = pretender_rebels
				size = 2
				leader = "Udai"
				leader_dynasty = "Sisodiya"
			}
		}
	}
}