#######################################################
# Flavor Events for the Incas
#
# Scripted by Sara Wendel-�rtqvist
#######################################################

namespace = flavor_inc
normal_or_historical_nations = yes

# The Incan Civil War
# Replaced by the Death of Huayna Capac
#country_event = {
#	id = flavor_inc.1
#	title = "flavor_inc.EVTNAME1"
#	desc = "flavor_inc.EVTDESC1"
#	picture = CIVIL_WAR_eventPicture
#	
#	fire_only_once = yes
#	
#	trigger = {
#		tag = INC
#		is_year = 1500 
#		NOT = { is_year = 1600 }
#		has_regency = no
#		OR = {
#			NOT = {
#				adm = 0
#			}
#			NOT = {
#				mil = 0
#			}
#			NOT = {
#				dip = 0
#			}
#		}
#	}
#	
#	mean_time_to_happen = {
#		months = 2000
#	}
#	
#	immediate = {
#		hidden_effect = {
#			random_owned_province = {
#				limit = {
#					is_core = ROOT
#				}
#				set_province_flag = incan_civil_war_flag1
#			}
#			random_owned_province = {
#				limit = {
#					is_core = ROOT
#					NOT = { has_province_flag = incan_civil_war_flag1 }
#				}
#				set_province_flag = incan_civil_war_flag2
#			}
#			random_owned_province = {
#				limit = {
#					is_core = ROOT
#					NOT = { has_province_flag = incan_civil_war_flag1 }
#					NOT = { has_province_flag = incan_civil_war_flag2 }
#				}
#				set_province_flag = incan_civil_war_flag2
#			}
#		}
#	}
#	
#	option = {
#		name = "flavor_inc.EVTOPTA1"
#		random_owned_province = {
#			limit = {
#				has_province_flag = incan_civil_war_flag1
#			}
#			clr_province_flag = incan_civil_war_flag1
#			spawn_rebels = {
#				type = pretender_rebels
#				size = 2
#				leader = "Huascar Inca"
#			}
#		}
#		every_owned_province = {
#			limit = {
#				has_province_flag = incan_civil_war_flag2
#			}
#			spawn_rebels = {
#				type = pretender_rebels
#				size = 1
#			}
#			clr_province_flag = incan_civil_war_flag2
#		}
#	}
#}

#######################################################
# Additional Flavor Events for the Incas
#
# Scripted by Henrik Lohmander
#######################################################

# Fall of the Chanka & the Rise of Cusco
country_event = {
	id = flavor_inc.2
	title = flavor_inc.2.t
	desc = flavor_inc.2.d
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				NOT = { has_dlc = "Winds of Change" }
				tag = CSU
				has_ruler = "000000"
				NOT = { is_year = 1450 }
			}
			AND = {
				has_country_flag = flavor_inc_2_can_fire
				has_dlc = "Winds of Change"
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = { #Long live Pacachuti, he who makes the Earth Shake!
		name = flavor_inc.2.a
		hidden_effect = {
			country_event = { id = flavor_inc.3 days = 185 }
		}
		add_years_of_income = 0.25
		add_adm_power = 75
		add_dip_power = 75
		add_mil_power = 75
		
		if = {
			limit = {
				has_dlc = "Winds of Change"
			}
			custom_tooltip = " "
			set_ruler_flag = CSU_pachakuti_upgrades_flag
			custom_tooltip = CSU_pachakuti_upgrades
			
			custom_tooltip = " "
			
			if = {
				limit = {
					has_dlc = "Leviathan"
					NOT = { is_year = 1480 }
					tag = CSU
				}
				custom_tooltip = CSU_if_we_form_inca_before_1480_machu_picchu
				set_country_flag = CSU_if_we_form_inca_before_1480_machu_picchu_flag
			}
		}
		else = {
			change_adm = 1
			change_dip = 1
			change_mil = 1
		}
	}
}

# Cusco - Navel of the World
country_event = {
	id = flavor_inc.3
	title = flavor_inc.3.t
	desc = flavor_inc.3.d
	picture = CITY_VIEW_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		owns = 808 #Though losing this is very unlikely.
	}
	
	option = { #Let us create a worthy capital!
		name = flavor_inc.3.a
		goto = 808
		set_country_flag = inc_cusco_began
		808 = {
			add_province_modifier = {
				name = "inc_cusco_construction"
				duration = 7300	#Illustrates the length of construction
			}
		}
		add_prestige_or_monarch_power = { amount = 10 }
		add_adm_power = -25
		add_dip_power = -25
	}
	option = { #Our resources are better used for other things.
		name = flavor_inc.3.b
		add_stability_or_adm_power = yes
	}
}

# Reconstruction of Cusco Complete 
country_event = {
	id = flavor_inc.4
	title = flavor_inc.4.t
	desc = flavor_inc.4.d
	picture = CITY_VIEW_eventPicture
	goto = 808
	fire_only_once = yes
	
	trigger = {
		tag = CSU
		had_country_flag = { flag = inc_cusco_began days = 7300 }
		owns = 808
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = { #Great!
		name = flavor_inc.4.a
		808 = {
			add_province_modifier = {
				name = "inc_cusco_reconstructed"
				duration = -1
			}
		}
	}
}

#Machu Pichu
country_event = {
	id = flavor_inc.5
	title = flavor_inc.5.t
	desc = flavor_inc.5.d
	picture = CITY_VIEW_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			tag = CSU
			tag = INC
		}
		is_year = 1450
		NOT = { is_year = 1475 }
		OR = {
			807 = { has_province_modifier = inc_cusco_construction }
			807 = { has_province_modifier = inc_cusco_reconstructed }
		}
	}
	
	mean_time_to_happen = {
		months = 75
	}
	
	option = { #Make it great.
		name = flavor_inc.5.a
		goto = 807
		set_capital = 807
		807 = { add_base_tax = 4 }
		add_adm_power = -50
		add_years_of_income = -0.1
		if = {
			limit = {
				has_dlc = "Leviathan"
			}
			807 = {
				set_great_project_tier_2 = {
					type = machu_picchu
				}
			}
		}
		else = {
			807 = {
				add_province_modifier = {
					name = "inc_machu_pichu"
					duration = -1
				}
			}
		}
	}
	option = { #Let's not get carried away.
		name = flavor_inc.5.b
		add_stability_or_adm_power = yes
	}
}

#The Huacas and the Royal Temple.
country_event = {
	id = flavor_inc.6
	title = flavor_inc.6.t
	desc = flavor_inc.6.d
	picture = RELIGION_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		num_of_cities = 8
	}
	
	mean_time_to_happen = {
		months = 120
	}
	
	option = { #Move the Huacas to the Temple.
		name = flavor_inc.6.a
		add_stability = -1
		add_legitimacy = -10
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
		add_country_modifier = {
			name = "inc_hostage_huacas"
			duration = -1
		}
	}
	option = { #Let them keep their petty gods.
		name = flavor_inc.6.b
		add_stability_or_adm_power = yes
	}
}

#The Coastal Peoples
country_event = {
	id = flavor_inc.7
	title = flavor_inc.7.t
	desc = flavor_inc.7.d
	picture = DIPLOMACY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = INC
				NOT =  { exists = CHM }
				NOT = { has_country_flag = INC_used_to_be_CHM }
				owns = 809 #Lima
				owns = 812 #Chanchan
				owns = 2821 #Piwra
				owns = 2822 #Tucume
			}
			has_country_flag = flavor_inc_7_flag
		}
	}
	
	mean_time_to_happen = {
		months = 48
	}
	
	option = { #Integrate them
		name = flavor_inc.7.a
		add_country_modifier = {
			name = "inc_chimu_integration"
			duration = -1
		}
		
		add_accepted_culture_or_dip_power = { culture = chimuan dip_reward = yes }
	}
	option = { #Don't integrate them.
		name = flavor_inc.7.b
		
		custom_tooltip = INC_every_province_in_chimu_area_loses_25_autonomy
		hidden_effect = {
			chimor_area = {
				limit = { country_or_non_sovereign_subject_holds = ROOT }
				add_local_autonomy = -25 #No special treatment.
			}
		}
	}
}

#Revolt of the Chimu
country_event = {
	id = flavor_inc.8
	title = flavor_inc.8.t
	desc = flavor_inc.8.d
	picture = ANGRY_MOB_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		NOT =  { exists = CHM }
		is_year = 1460
		NOT = { is_year = 1500 }
		NOT = { has_country_flag = INC_used_to_be_CHM }
		owns = 809 #Lima
		owns = 812 #Chanchan
		owns = 2821 #Piwra
		owns = 2822 #Tucume
		OR = {
			809 = { culture = chimuan } #Lima
			812 = { culture = chimuan } #Chanchan
			2821 = { culture = chimuan } #Piwra
			2822 = { culture = chimuan } #Tucume
		}
	}
	
	immediate = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					culture = chimuan
					NOT = { is_core = CHM }
				}
				add_core = CHM
			}
			random_owned_province = {
				limit = {
					culture = chimuan
				}
				set_province_flag = inc_chimu_revolter
				set_province_flag = inc_chimu_revolt_start
			}
			random_owned_province = {
				limit = {
					culture = chimuan
					not = { has_province_flag = inc_chimu_revolter }
				}
				set_province_flag = inc_chimu_revolter
			}
			random_owned_province = {
				limit = {
					culture = chimuan
					not = { has_province_flag = inc_chimu_revolter }
				}
				set_province_flag = inc_chimu_revolter
			}
		}
	}
	
	mean_time_to_happen = {
		months = 120
	}
	
	option = {
		name = flavor_inc.8.a
		set_country_flag = inc_chimu_revolt_happened
		random_owned_province = {
			limit = { has_province_flag = inc_chimu_revolt_start }
			spawn_rebels = {
				type = nationalist_rebels
				size = 2
				win = yes
				leader = "Chimu Capac"
			}
			
		}
		every_owned_province = {
			limit = {
				has_province_flag = inc_chimu_revolter
				NOT = { has_province_flag = inc_chimu_revolt_start }
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 1
			}
			clr_province_flag = inc_chimu_revolter
			clr_province_flag = inc_chimu_revolt_start
		}
		
	}
}

#End of the Chimu Revolt
country_event = {
	id = flavor_inc.9
	title = flavor_inc.9.t
	desc = flavor_inc.9.d
	picture = BATTLE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		has_country_flag = inc_chimu_revolt_happened
		NOT = { exists = CHM }
		NOT = {
			any_owned_province = {
				culture = chimuan
				controlled_by = REB
			}
		}
	}
	
	mean_time_to_happen = {
		months = 12
	}
	
	option = { #Forbid the Chimu to serve in our armies and resettle many of them.
		name = flavor_inc.9.a
		random_owned_province = {
			limit = { not = { culture = chimuan } }
			add_base_tax = 1
		}
		random_owned_province = {
			limit = { not = { culture = chimuan } }
			add_base_tax = 1
		}
		every_owned_province = {
			limit = {
				culture = chimuan
			}
			add_province_modifier = {
				name = "inc_no_chimu_soldiers"
				duration = -1
			}
		}
	}
	option = { #The revolters must be punished where they'll feel it the most.
		name = flavor_inc.9.b
		if = {
			limit = { has_country_modifier = inc_chimu_integration }
			remove_country_modifier = inc_chimu_integration
		}
		add_stability_or_adm_power = yes #The expected way to react.
		every_owned_province = {
			limit = {
				culture = chimuan
			}
			add_unrest = -5
		}
	}
}

#European Diseases
country_event = {
	id = flavor_inc.10
	title = flavor_inc.10.t
	desc = flavor_inc.10.d
	picture = PLAGUE_eventPicture
	
	
	trigger = {
		NOT = { has_country_flag = european_diseases_struck }
		capital_scope = {
			OR = {
				continent = south_america
				continent = new_world
			}
		}
		NOT = { has_institution = feudalism }
		any_known_country = {
			OR = {
				capital_scope = {
					continent = europe
				}
				colonial_parent = {
					capital_scope = {
						continent = europe
					}
				}
			}
			any_owned_province = {
				OR = {
					continent = south_america
					continent = new_world
				}
			}
		}
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = { is_capital = no }
				set_province_flag = inc_smallpox_here
				every_neighbor_province = {
					limit = {
						owned_by = ROOT
					}
					set_province_flag = inc_smallpox_here
				}
			}
		}
		set_country_flag = european_diseases_struck
	}
	
	mean_time_to_happen = {
		months = 3650
	}
	
	option = { #Horrible
		name = flavor_inc.10.a
		if = {
			limit = {
				NOT = { has_global_flag = inc_smallpox }
			}
			set_global_flag = inc_smallpox
		}
		every_province = {
			limit = { has_province_flag = inc_smallpox_here }
			add_province_modifier = {
				name = "inc_smallpox_outbreak"
				duration = 365
			}
			set_province_flag = had_smallpox_at_one_point
			clr_province_flag = inc_smallpox_here
		}
	}
}

#Death of Huayna Capac
country_event = {
	id = flavor_inc.11
	title = flavor_inc.11.t
	desc = flavor_inc.11.d
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		num_of_cities = 10
		government = monarchy
		any_owned_province = {
			has_province_modifier = inc_smallpox_outbreak
		}
		has_regency = no
	}
	
	mean_time_to_happen = {
		months = 12
	}
	
	option = { #Support Atahualpa
		name = flavor_inc.11.a
		set_country_flag = inc_civil_war_support_atahualpa
		add_stability = -2 #Unexpected death of king, civil war and epidemics
		add_legitimacy = -40 #Not rightful heir
		kill_heir = { allow_new_heir = no }
		define_ruler = {
			name = "Atahualpa"
			dynasty = ROOT
			change_dip = 5
		}
		if = {
			limit = {
				has_states_general_mechanic = yes
			}
			change_statists_vs_orangists = 1
		}
		if = {
			limit = {
				has_dlc = "Rights of Man" 
			}
			hidden_effect = { add_ruler_personality_ancestor = { key = inspiring_leader } }
		}
		capital_scope = {
			spawn_rebels = {
				type = pretender_rebels
				size = 3
				leader = "Huascar"
				leader_dynasty = "Inca"
			}
			every_neighbor_province = {
				limit = {
					owned_by = ROOT
				}
				spawn_rebels = {
					type = pretender_rebels
					size = 1
				}
			}
		}
	}
	option = { #Support Huascar
		name = flavor_inc.11.b
		set_country_flag = inc_civil_war_support_huascar
		add_stability = -2 #Unexpected death of king, civil war and epidemics
		add_legitimacy = -40 #Not a strong claim and most prefer Atahualpa.
		kill_heir = { allow_new_heir = no }
		define_ruler = {
			name = "Huascar"
			dynasty = ROOT
		}
		if = {
			limit = {
				has_states_general_mechanic = yes
			}
			change_statists_vs_orangists = 1
		}
		if = {
			limit = {
				has_dlc = "Rights of Man" 
			}
			hidden_effect = { add_ruler_personality_ancestor = { key = bold_fighter } }
		}
		random_owned_province = {
			limit = { not = { is_capital = yes } }
			spawn_rebels = {
				type = pretender_rebels
				size = 3
				leader = "Atahualpa"
				leader_dynasty = "Inca"
			}
			every_neighbor_province = {
				limit = {
					owned_by = ROOT
				}
				spawn_rebels = {
					type = pretender_rebels
					size = 1
				}
			}
		}
	}
}

#Policies of Huascar
country_event = {
	id = flavor_inc.12
	title = flavor_inc.12.t
	desc = flavor_inc.12.d
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		OR = {
			has_country_flag = inc_civil_war_support_huascar
			has_country_flag = inc_civil_war_support_atahualpa
		}
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	option = { #We must keep our true friends close, traditions are made to be broken.
		name = flavor_inc.12.a
		trigger = { has_country_flag = inc_civil_war_support_huascar }
		add_legitimacy = 20
	}
	option = { #Try to placate the traditional nobility.
		name = flavor_inc.12.b
		trigger = { has_country_flag = inc_civil_war_support_huascar }
		add_stability_or_adm_power = yes
	}
	
	option = { #We shall be everything Huascar is not.
		name = flavor_inc.12.c
		trigger = { has_country_flag = inc_civil_war_support_atahualpa }
		add_legitimacy = 10
	}
}

#End of the Civil War
country_event = {
	id = flavor_inc.13
	title = flavor_inc.13.t
	desc = flavor_inc.13.d
	picture = CIVIL_WAR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		OR = {
			has_country_flag = inc_civil_war_support_huascar
			has_country_flag = inc_civil_war_support_atahualpa
		}
		NOT = { num_of_rebel_armies = 1 }
		NOT = {
			any_owned_province = {
				controlled_by = REB
			}
		}
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	option = { #Let it be known what happens to those who would defy us.
		name = flavor_inc.13.a
		add_legitimacy = 25 #Those that did not support this candidate to start with are crushed.
		add_stability = -2 #Unusually harsh response, burning of mummified ancestor.
	}
	option = { #Let us exact more moderate retribution.
		name = flavor_inc.13.b
		add_stability_or_adm_power = yes #End of a civil war.
		add_legitimacy = -10 #Still doubt about the succession.
	}
}

#Capture and Ransom of the Sapa Inca
country_event = {
	id = flavor_inc.14
	title = flavor_inc.14.t
	desc = flavor_inc.14.d
	picture = EXPLORERS_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		capital_scope = { continent = europe }
		war_with = INC
		OR = {
			war_score_against = {
				who = INC
				value = 75
			}
			INC = {
				capital_scope = { controlled_by = ROOT }
				has_regency = no
			}
		}
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	option = { #Execute the Sapa Inca.
		name = flavor_inc.14.a
		ai_chance = { factor = 1 }
		add_legitimacy = -5 #An attack on the monarchy, see historical reaction of Spanish kings
		add_years_of_income = 0.5
		custom_tooltip = flavor_inc.14.a.tt
		tooltip = {
			INC = {
				kill_ruler = yes
				add_stability = -3
				add_years_of_income = -1
			}
		}
		INC = {
			every_owned_province = {
				add_claim = ROOT
			}
			country_event = { id = flavor_inc.15 }	#Revolt of Incan subjects.
		}
	}
	option = { #Keep him as a hostage.
		name = flavor_inc.14.b
		ai_chance = { factor = 0 }
		add_years_of_income = 0.5
		custom_tooltip = flavor_inc.14.b.tt
		tooltip = {
			INC = {
				add_stability = -3
				add_years_of_income = -1
				add_dip_power = -50
				add_mil_power = -50
				add_adm_power = -50
		
			}
		}
		INC = {
			every_owned_province = {
				add_claim = ROOT
			}
			country_event = { id = flavor_inc.16 } #Incan subjects won't revolt, 
		}
	}
}

#Capture and Ransom of the Sapa Inca
country_event = {
	id = flavor_inc.15
	title = flavor_inc.15.t
	desc = flavor_inc.15.d
	picture = EXPLORERS_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = { #We will not bow!
		name = flavor_inc.15.a
		add_stability = -3
		add_years_of_income = -1
		kill_ruler = yes
		random_owned_province = {
			limit = {
				can_spawn_rebels = nationalist_rebels
				controlled_by = ROOT
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 2
				win = yes
				friend = FROM
			}
		}
		random_owned_province = {
			limit = {
				can_spawn_rebels = nationalist_rebels
				controlled_by = ROOT
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 2
				win = yes
				friend = FROM
			}
		}
		random_owned_province = {
			limit = {
				can_spawn_rebels = nationalist_rebels
				controlled_by = ROOT
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 2
				win = yes
				friend = FROM
			}
		}
		random_owned_province = {
			limit = {
				can_spawn_rebels = nationalist_rebels
				controlled_by = ROOT
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 2
				win = yes
				friend = FROM
			}
		}
		random_owned_province = {
			limit = {
				can_spawn_rebels = nationalist_rebels
				controlled_by = ROOT
			}
			spawn_rebels = {
				type = nationalist_rebels
				size = 2
				win = yes
				friend = FROM
			}
		}
	}

}

#Capture and Ransom of the Sapa Inca
country_event = {
	id = flavor_inc.16
	title = flavor_inc.16.t
	desc = flavor_inc.16.d
	picture = EXPLORERS_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = { #His heir will take his place.
		name = flavor_inc.16.a
		trigger = { has_heir = yes }
		kill_ruler = yes
		add_stability = -3
		add_years_of_income = -1
		add_dip_power = -50 #Up until this point the ruler is locked up and can't rule.
		add_mil_power = -50 #Up until this point the ruler is locked up and can't rule.
		add_adm_power = -50 #Up until this point the ruler is locked up and can't rule.
		random_owned_province = {
			limit = {
				is_capital = no
			}
			spawn_rebels = {
				type = pretender_rebels
				size = 3
				win = yes
			}
		}
	}
	
	option = { #His brother will take his place.
		name = flavor_inc.16.b
		trigger = { has_heir = no }
		define_ruler = {
			dynasty = ROOT
		}
		if = {
			limit = {
				has_states_general_mechanic = yes
			}
			change_statists_vs_orangists = 1
		}
		add_stability = -3
		add_years_of_income = -1
		add_dip_power = -50 #Up until this point the ruler is locked up and can't rule.
		add_mil_power = -50 #Up until this point the ruler is locked up and can't rule.
		add_adm_power = -50 #Up until this point the ruler is locked up and can't rule.
		random_owned_province = {
			limit = {
				is_capital = no
			}
			spawn_rebels = {
				type = pretender_rebels
				size = 3
				win = yes
			}
		}
	}
}

#Seaborne Merchants
country_event = {
	id = flavor_inc.17
	title = flavor_inc.17.t
	desc = flavor_inc.17.d
	picture = HARBOUR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		is_year = 1460
		NOT = { is_year = 1495 }
		owns = 816
		government = monarchy
		has_heir = yes
		has_regency = no
		heir_age = 15
	}
	
	mean_time_to_happen = {
		months = 105
	}
	
	option = { #Mount an expedition into the Pacific to find these islands.
		name = flavor_inc.17.a
		add_dip_power = -5
		set_heir_flag = inc_pacific_exploration
		custom_tooltip = flavor_inc.17.a.tt
	}
	option = { #Let us focus on the here and now and not on distant dreams.
		name = flavor_inc.17.b
		add_stability_or_adm_power = yes
	}
}

#The Pacific Expedition - Tupac Returns
country_event = {
	id = flavor_inc.18
	title = flavor_inc.18.t
	desc = flavor_inc.18.d
	picture = SHIP_SAILING_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		has_heir_flag = inc_pacific_exploration
		had_heir_flag = { flag = inc_pacific_exploration days = 270 }
	}
	
	immediate = {
		hidden_effect = {
			clr_heir_flag = inc_pacific_exploration
		}
	}
	
	mean_time_to_happen = {
		months = 3
	}
	
	option = { #An interesting experience
		name = flavor_inc.18.a
		add_prestige = 10
		add_dip_power = 50
	}
	option = { #Let us use what we have learnt to improve the seafaring skills of our people.
		name = flavor_inc.18.b
		add_ruler_modifier = {
			name = "inc_pacific_expedition"
			duration = -1
		}
	}
}

#The Pacific Expedition - Prince Lost at Sea
country_event = {
	id = flavor_inc.19
	title = flavor_inc.19.t
	desc = flavor_inc.19.d
	picture = SHIP_SAILING_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = INC
		has_heir_flag = inc_pacific_exploration
		had_heir_flag = { flag = inc_pacific_exploration days = 270 }
	}
	
	immediate = {
		hidden_effect = {
			clr_heir_flag = inc_pacific_exploration
		}
	}
	
	mean_time_to_happen = {
		months = 3
	}
	
	option = { #Such a shame.
		name = flavor_inc.19.a
		kill_heir = {}
		add_stability = -1
	}
}

#European Epidemic
country_event = {
	id = flavor_inc.20
	title = flavor_inc.20.t
	desc = flavor_inc.20.d
	picture = PLAGUE_eventPicture
	
	trigger = {
		capital_scope = { continent = south_america }
		has_global_flag = inc_smallpox
		NOT = { had_global_flag = { flag = inc_smallpox days = 9125 } }
		NOT = { 
			any_owned_province = {
				has_province_modifier = inc_smallpox_outbreak
			}
		}
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = { is_capital = no }
				set_province_flag = inc_smallpox_here
				every_neighbor_province = { set_province_flag = inc_smallpox_here }
			}
		}
	}
	
	mean_time_to_happen = {
		months = 35
	}
	
	option = { #Horrible
		name = flavor_inc.20.a
		every_province = {
			limit = { has_province_flag = inc_smallpox_here }
			add_province_modifier = {
				name = "inc_smallpox_outbreak"
				duration = 365
			}
			set_province_flag = had_smallpox_at_one_point
			clr_province_flag = inc_smallpox_here
		}
	}
}

#The Oracle of Pachacamac
country_event = {
	id = flavor_inc.21
	title = flavor_inc.21.t
	desc = flavor_inc.21.d
	picture = RELIGION_eventPicture
	
	trigger = {
		NOT = { religion = inti }
		owns = 809
		809 = {
			has_province_modifier = inti_pachamac_oracle
		}
	}
	
	mean_time_to_happen = {
		months = 12
	}
	
	option = { #Destroy the Temple
		name = flavor_inc.21.a
		ai_chance = { factor = 1 }
		add_years_of_income = 0.01
		809 = {
			remove_province_modifier = inti_pachamac_oracle
			add_unrest = 5
		}
	}
	
	option = { #This is a fascinating religion, let us embrace it instead.
		ai_chance = { factor = 1 }
		name = flavor_inc.21.b
		trigger = {
			religion_group = pagan
			is_colonial_nation = no
			NOT = { religion = nahuatl }
			NOT = { religion = mesoamerican_religion }
		}
		change_religion = inti
		if = {
			limit = { government = native }
			change_government = tribal
			#set_legacy_government = tribal_despotism_legacy
		}
	}
	option = { #Let them worship the idol.
		name = flavor_inc.21.c
		trigger = { full_idea_group = humanist_ideas }
		ai_chance = { factor = 0 }
		add_stability = -1
		809 = {
			remove_province_modifier = inti_pachamac_oracle
			add_base_tax = 1
		}
	}
	
}

country_event = {
	id = flavor_inc.22
	title = flavor_inc.22.t
	desc = flavor_inc.22.d
	picture = CONQUEST_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_inc.22.a
		ai_chance = { factor = 1 }
		
		add_authority = 25
		
		custom_tooltip = " "
		
		antisuyu_area = {
			limit = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			add_local_autonomy = -33
			add_nationalism = -5
		}
	}
	
	option = {
		ai_chance = { factor = 0 }
		name = flavor_inc.22.b
		
		add_accepted_culture_or_dip_power = { culture = aimara dip_reward = yes }
	}
}


country_event = {
	id = flavor_inc.23
	title = flavor_inc.23.t
	desc = flavor_inc.23.d
	picture = CITY_VIEW_eventPicture
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.23.a
		
		add_country_modifier = {
			name = INC_the_mitma_for_control
			duration = -1
		}
		
		custom_tooltip = INC_how_mitma_works
		tooltip = {
			add_province_modifier = {
				name = INC_mitma_settlers
				duration = 10950
			}
		}
	}
	
	option = {
		ai_chance = { factor = 0 }
		name = flavor_inc.23.b
		
		add_adm_power = 100
		change_government_reform_progress = 50
	}
}


country_event = {
	id = flavor_inc.24
	title = flavor_inc.24.t
	desc = flavor_inc.24.d
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.24.a
		
		add_country_modifier = {
			name = INC_integrating_local_dieties
			duration = -1
		}
		
		define_advisor = {
			type = theologian
			skill = 3
			culture = ROOT
			religion = ROOT
			cost_multiplier = 0.33
		}
	}
	
	option = {
		ai_chance = { factor = 0 }
		name = flavor_inc.24.b
		
		add_country_modifier = {
			name = INC_not_integrating_foreign_dieties
			duration = -1
		}
		
		add_dip_power = 100
	}
}

country_event = {
	id = flavor_inc.25
	title = flavor_inc.25.t
	desc = flavor_inc.25.d
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.25.a
		
		set_country_flag = INC_divine_missionary
		custom_tooltip = INC_divine_missionary_tt
		
		custom_tooltip = " "
		
		add_adm_power = 100
	}
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.25.b
		
		set_country_flag = INC_divine_corruption
		custom_tooltip = INC_divine_corruption_tt
		
		custom_tooltip = " "
		
		add_corruption = -2
	}
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.25.c
		
		set_country_flag = INC_divine_unrest
		custom_tooltip = INC_divine_unrest_tt
		
		custom_tooltip = " "
		
		add_stability_or_adm_power = yes
	}
}

country_event = {
	id = flavor_inc.26
	title = flavor_inc.26.t
	desc = flavor_inc.26.d
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			pick_best_provinces = {
				1 = yes
				scale = higher_development_than
				scope = every_owned_province
				global_trigger = "
					NOT = { has_manpower_building_trigger = yes }
				"
				event_target_name = inca_manpower_prov
			}
			pick_best_provinces = {
				1 = yes
				scale = higher_development_than
				scope = every_owned_province
				global_trigger = "
					NOT = { has_production_building_trigger = yes }
					NOT = { trade_goods = gold }
				"
				event_target_name = inca_workshop_prov
			}
		}
	}
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.26.a
		
		add_yearly_manpower = 1
		
		if = {
			limit = {
				has_saved_event_target = inca_manpower_prov_1
			}
			custom_tooltip = " "
		
			event_target:inca_manpower_prov_1 = {
				add_building = barracks
			}
		}
	}
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.26.b
		
		add_years_of_income = 0.75
		
		custom_tooltip = " "
		
		if = {
			limit = {
				has_saved_event_target = inca_workshop_prov_1
			}
			custom_tooltip = " "
		
			event_target:inca_workshop_prov_1 = {
				add_building = workshop
			}
		}
	}
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.26.c
		
		add_prestige_or_monarch_power = { amount = 25 }
		
		custom_tooltip = " "
		
		add_authority = 15
		
		if = {
			limit = {
				has_dlc = "Mandate of Heaven"
			}
			custom_tooltip = " "
			add_splendor = 200
		}
	}
}

country_event = {
	id = flavor_inc.27
	title = flavor_inc.27.t
	desc = flavor_inc.27.d
	picture = DEATH_OF_HEIR_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		religion = inti
		NOT = { has_ruler_flag = INC_suffered_for_parent_death }
		if = {
			limit = {
				OR = {
					government = republic
					has_states_general_mechanic = yes
				}
			}
			has_country_flag = INC_republic_death
		}
		NOT = {
			AND = {
				has_government_attribute = has_ruler_election
				NOT = { is_subject_of_type = personal_union }
				NOT = { is_subject_of_type = integrated_personal_union }
				NOT = { has_country_flag = had_election_event }
				NOT = { has_ruler_flag = ruler_cant_trigger_this_event_flag }
				NOT = { has_country_flag = no_election_of_new_ruler_event_trigger }
			}
		}
	}
	
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.27.a
		change_estate_land_share = {
			estate = all
			share = 5
		}
		
		custom_tooltip = " "
		
		custom_tooltip = INC_increase_amount_of_mummified_rulers
		hidden_effect = {
			change_variable = {
				which = inca_amount_of_mummies
				value = 1
			}
		}
		hidden_effect = {
			if = {
				limit = {
					has_regency = yes
				}
				set_heir_flag = INC_suffered_for_parent_death
			}
		}
	}
}

country_event = {
	id = flavor_inc.28
	title = flavor_inc.28.t
	desc = flavor_inc.28.d
	picture = COUNTRY_COLLAPSE_eventPicture
	
	is_triggered_only = yes
	
	major = yes
	major_trigger = {
		is_neighbor_of = event_target:INC_target
	}
	
	immediate = {
		hidden_effect = {
			save_event_target_as = INC_target
		}
	}
	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.28.a
		
		tooltip = {
			add_government_power = {
				mechanic_type = divine_authority_mechanic
				power_type = divine_authority
				value = 25
			}
			
			custom_tooltip = " "
			
			add_stability = -1
			
			custom_tooltip = " "
			
			add_country_modifier = {
				name = INC_religious_reform
				duration = 3650
			}
			
			capital_scope = {
				pretender_rebels = 3
			}
		}
	}
}

country_event = {
	id = flavor_inc.29
	title = flavor_inc.29.t
	desc = flavor_inc.29.d
	picture = GOOD_WITH_MONARCH_eventPicture
	
	is_triggered_only = yes
	
	major = yes

	option = {
		ai_chance = { factor = 1 }
		name = flavor_inc.29.a
		
		tooltip = {
			add_government_power = {
				mechanic_type = divine_authority_mechanic
				power_type = divine_authority
				value = -75
			}
			
			custom_tooltip = " "
			
			change_adm = 1
			change_dip = 1
			change_mil = 1
			
			custom_tooltip = " "
			
			custom_tooltip = INC_destroy_all_mummies
			hidden_effect = {
				set_variable = {
					which = inca_amount_of_mummies
					value = 0
				}
			}
			
			custom_tooltip = " "
			
			add_ruler_modifier = {
				name = INC_pachakuti
				duration = -1
			}
		}
	}
}