#######################################################
# 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 = {
		tag = CSU
		has_ruler = "Pachacuti"
		NOT = { is_year = 1450 }
	}
	
	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
	}
}

# 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 = 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 = {
			808 = { has_province_modifier = inc_cusco_construction }
			808 = { has_province_modifier = inc_cusco_reconstructed }
		}
	}
	
	mean_time_to_happen = {
		months = 75
	}
	
	option = { #Make it great.
		name = flavor_inc.5.a
		goto = 808
		set_capital = 808
		808 = { add_base_tax = 4 }
		add_adm_power = -50
		add_years_of_income = -0.1
		if = {
			limit = {
				has_dlc = "Leviathan"
			}
			808 = {
				set_great_project_tier_2 = {
					type = machu_picchu
				}
			}
		}
		else = {
			808 = {
				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 = {
		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
	}
	
	mean_time_to_happen = {
		months = 48
	}
	
	option = { #Integrate them
		name = flavor_inc.7.a
		add_country_modifier = {
			name = "inc_chimu_integration"
			duration = -1
		}
		every_owned_province = {
			limit = { culture = chimuan }
			add_local_autonomy = 25 #Trusted to rule themselves a bit more.
		}
	}
	option = { #Don't integrate them.
		name = flavor_inc.7.b
		every_owned_province = {
			limit = { culture = chimuan }
			add_local_autonomy = -10 #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 }
		OR = {
			technology_group = north_american
			technology_group = mesoamerican
			technology_group = south_american
			technology_group = andean
		}
		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
			}
			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
			}
			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
		}
	}
	
}