# Mexico's quest for independence
country_event = {

	id = 1027
	
	trigger = {
		NOT = { exists = MEX }
		NOT = { has_country_flag = mexican_nationalism }
		MEX = {
			NOT = {
				OR = {
					is_core = 844		# Zapotec
					is_core = 845		# Campeche
					is_core = 846		# Yucatan
					is_core = 847		# Mixtec
					is_core = 848		# Tohancapan
					is_core = 849		# Tlapanec
					is_core = 850		# Tlaxcala
					is_core = 851		# Tarasco
					is_core = 852		# Mexico
					is_core = 853		# Huastec
					is_core = 854		# Sayultecas
					is_core = 856		# Zacatecas
					is_core = 858		# Tamaulipas
					is_core = 859		# Sinaloa
					is_core = 860		# Tepehuan
					is_core = 861		# Coahuila
					is_core = 862		# Yaqui
					is_core = 863		# Suma
					is_core = 864		# Concho
				}
			}
		}		
		OR = {
			owns = 844		# Zapotec
			owns = 847		# Mixtec
			owns = 850		# Tlaxcala
			owns = 852		# Mexico
			owns = 853		# Huastec
		}
		year = 1750
	}
	
	mean_time_to_happen = {
		months = 480

		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = 0 }
		}
		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = -2 }
		}
		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = -4 }
		}
		modifier = {
			factor = 1.1
			centralization_decentralization = 1
		}
		modifier = {
			factor = 1.1
			centralization_decentralization = 3
		}
		modifier = {
			factor = 1.1
			centralization_decentralization = 5
		}
		modifier = {
			factor = 0.9
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -1 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -2 }
		}
		modifier = {
			factor = 1.1
			stability = 1
		}
		modifier = {
			factor = 1.1
			stability = 2
		}
		modifier = {
			factor = 1.1
			stability = 3
		}		
		modifier = {
			factor = 0.9
			year = 1760
		}
		modifier = {
			factor = 0.8
			year = 1780
		}
	}
	
	title = "EVTNAME1027"
	desc = "EVTDESC1027"
	
	option = {
		name = "EVTOPTA1027"
		set_country_flag = mexican_nationalism
		MEX = {
			add_core = 844		# Zapotec
			add_core = 845		# Campeche
			add_core = 846		# Yucatan
			add_core = 847		# Mixtec
			add_core = 848		# Tohancapan
			add_core = 849		# Tlapanec
			add_core = 850		# Tlaxcala
			add_core = 851		# Tarasco
			add_core = 852		# Mexico
			add_core = 853		# Huastec
			add_core = 854		# Sayultecas
			add_core = 856		# Zacatecas
			add_core = 858		# Tamaulipas
			add_core = 859		# Sinaloa
			add_core = 860		# Tepehuan
			add_core = 861		# Coahuila
			add_core = 862		# Yaqui
			add_core = 863		# Suma
			add_core = 864		# Concho
		}
		colonists = -1
		random_owned = {
			limit = { is_colony = yes }
			create_revolt = 1
		}
	}
}


# Colonial assembly
province_event = {

	id = 1039
	
	trigger = {
		is_colony = yes
		owner = {
			has_country_flag = mexican_nationalism
			NOT = { stability = 0 }
			NOT = { advisor = colonial_governor }
		}
	}
	
	mean_time_to_happen = {
		months = 60

		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -2 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { advisor = statesman } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { ADM = 4 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { DIP = 4 } }
		}
		modifier = {
			factor = 1.1
			owner = { ADM = 8 }
		}
		modifier = {
			factor = 1.1
			owner = { DIP = 8 }
		}
		modifier = {
			factor = 1.1
			owner = { advisor = statesman }
		}
	}
	
	title = "EVTNAME1023"
	desc = "EVTDESC1023"
	
	option = {
		name = "EVTOPTA1023"		# Attempt to find a diplomatic solution
		owner = {
			clr_country_flag = mexican_nationalism
			add_country_modifier = {
				name = "diplomatic_negotiation"
				duration = 300
			}
		}
	}
		
	option = {
		name = "EVTOPTB1023"		# The days of diplomacy are over
		owner = { stability = -1 }
		add_province_modifier = {
			name = "colonial_tensions"
			duration = 300
		}
	}
}