country_event = {

	id = 44800

	trigger = {
		tag = MEX
		year = 1909
		war = no
		NOT = {
			year = 1913
			government = democracy
			government = hms_government
			poor_strata_everyday_needs = 0.75 #will not fire if poor are getting 75%+ everyday needs
		}
	}
	
	fire_only_once = yes
	
	mean_time_to_happen =  {
		months = 5

		modifier = {
			factor = 0.75 #increase likelihood to happen
			year = 1911
		}
		
		modifier = {
			factor = 0.95 #increase likelihood to happen
			year = 1912
		}
	}

	title = "EVTNAME44800"
	desc = "EVTDESC44800"
	picture = "Madero"

	option = {
		name = "EVTOPTA44800" 
		farmers = {
			militancy = 3
			consciousness = 3
		}
		labourers = {
			militancy = 3
			consciousness = 3
		}
		craftsmen = {
			militancy = 3
			consciousness = 3
		}
		artisans = {
			militancy = 3
			consciousness = 3
		}
		set_country_flag = Madero
	}

	option = {
		name = "EVTOPTB44800" 
		prestige = -50
		officers = {
			militancy = 3
			consciousness = 3
		}
		aristocrats = {
			militancy = 3
			consciousness = 3
		}
		capitalists = {
			militancy = 3
			consciousness = 3
		}
	}
}

country_event = {

	id = 44801

	trigger = {
		tag = MEX
		year = 1911
		war = no
		has_country_flag = Madero
		NOT = {
			year = 1914
			government = democracy
			government = hms_government
			poor_strata_everyday_needs = 0.95 #will not fire if poor are getting 95%+ everyday needs
		}
	}
	
	fire_only_once = yes
 
	mean_time_to_happen =  {
		months = 5

		modifier = {
			factor = 0.75 #increase likelihood to happen
			year = 1912
		}

		modifier = {
			factor = 0.95 #increase likelihood to happen
			year = 1913
		}
	}

	title = "EVTNAME44801"
	desc = "EVTDESC44801"
	picture = "Riot"

	option = {
		name = "EVTOPTA44801" 
		2137 = { #Hermosillo Sonora
			any_pop = {
				militancy = 8
			}
		}
		2139 = { #N Baja 
			any_pop = {
				militancy = 8
			}
		}
		2142 = { #Chihuahua
			any_pop = {
				militancy = 8
			}
		}
		2143 = { #Nogales
			any_pop = {
				militancy = 8
			}
		}
		set_country_flag = MaderoRevolt
	}
}

country_event = {

	id = 44802

	trigger = {
		tag = MEX
		year = 1911
		has_country_flag = MaderoRevolt
		NOT = {
			year = 1915
		}
	}
 
 	fire_only_once = yes
 
	mean_time_to_happen =  {
		months = 5

		modifier = {
			factor = 0.75 #increase likelihood to happen
			year = 1912
		}


		modifier = {
			factor = 0.95 #increase likelihood to happen
			year = 1913
		}
	}

	title = "EVTNAME44802"
	desc = "EVTDESC44802"
	picture = "churchmexico"

	option = {
		name = "EVTOPTA44802" 
		2177 = { # N Oaxaca
			any_pop = {
				militancy = 8
			}
		}
		2178 = { #S Oaxaca
			any_pop = {
				militancy = 8
			}
		}
	}

}

country_event = {

	id = 44803

	trigger = {
		tag = MEX
		has_country_flag = MaderoRevolt
		year = 1911
		NOT = {
			year = 1915
			}
	
	}
	
	fire_only_once = yes
 
	mean_time_to_happen =  {
		months = 5

		modifier = {
			factor = 0.75 #increase likelihood to happen
			year = 1912
		}
		
		modifier = {
			factor = 0.95 #increase likelihood to happen
			year = 1913
		}
	}

	title = "EVTNAME44803"
	desc = "EVTDESC44803"
	picture = "Posada"

	option = {
		name = "EVTOPTA44803" 
		farmers = {
			consciousness = 1
		}
		labourers = {
			consciousness = 1
		}
		craftsmen = {
			consciousness = 1
		}
		artisans = {
			consciousness = 1
		}
	}
}
#yucatecan revolution
country_event = {

	id = 112900
	title = "EVTNAME112900"
	desc = "EVTDESC112900"
	major = yes
	
	trigger = {
		tag = MEX
		NOT = { exists = MXS }
		NOT = { has_country_modifier = dismantled_thingy }
		year = 1841
		NOT = { 
			has_global_flag = yucatecan_revolution_has_happened
		}
	}

	
	option = {
		name = "EVTOPTA102900"
		any_pop = {
			consciousness = 1
			militancy = -1
		}
		any_owned = {
			limit = {
				is_core = MRD
			}
			secede_province = MRD
		}
		MRD = {
			capital = 2183
			leadership = 80
		}

		set_global_flag = yucatecan_revolution_has_happened
	}
	
	option = {
		name = "EVTOPTB102900"
		any_pop = {
			consciousness = 1
			militancy = -1
		}
		any_owned = {
			limit = {
				is_core = MRD
			}
			secede_province = MRD
		}
		MRD = {
			capital = 2183
			leadership = 80
		}

		set_global_flag = yucatecan_revolution_has_happened
		change_tag_no_core_switch = MRD
	}
}
#####MRD####
#yucatecan revolution
country_event = {

	id = 112901
	title = "EVTNAME112901"
	desc = "EVTDESC112901"
	major = yes
	
	trigger = {
		tag = MRD
		year = 1849
		has_global_flag = yucatecan_revolution_ended
	}

	
	option = {
		name = "EVTOPTA112901"
		MEX = {
			inherit = MRD
		}

		set_global_flag = yucatecan_revolution_ended
	}
	
	option = {
		name = "EVTOPTB112901"
		set_global_flag = yucatecan_revolution_ended
	}
}
#RioGrandense revolution
country_event = {

	id = 112902
	title = "EVTNAME112902"
	desc = "EVTDESC112902"
	major = yes
	
	trigger = {
		tag = MEX
		NOT = { exists = MXS }
		year = 1840
		NOT = { 
			has_global_flag = grande_revolution_has_happened
		}
	}

	
	option = {
		name = "EVTOPTA112902"
		any_pop = {
			consciousness = 1
			militancy = -1
		}
		any_owned = {
			limit = {
				is_core = RGR
			}
			secede_province = RGR
		}
		RGR = {
			capital = 138
			leadership = 80
		}

		set_global_flag = grande_revolution_has_happened
	}
	
	option = {
		name = "EVTOPTB112902"
		any_pop = {
			consciousness = 1
			militancy = -1
		}
		any_owned = {
			limit = {
				is_core = RGR
			}
			secede_province = RGR
		}
		RGR = {
			capital = 138
			leadership = 80
		}

		set_country_flag = grande_revolution_has_happened
		change_tag_no_core_switch = RGR
	}
}
country_event = {

	id = 112903 

	
	fire_only_once = yes

	trigger = {
		tag = MEX
		NOT = { exists = MXS }
		has_country_flag = grande_revolution_has_happened
		NOT = {
			has_global_flag = rio_wants_independence
		}
	}
 
	mean_time_to_happen =  {
		months = 1
	}

	title = "EVTNAME112903"
	desc = "EVTDESC112903"

	option = {
		set_global_flag = rio_wants_independence
		war = {
			target = RGR
			attacker_goal = {
				casus_belli = civil_war
			}
			
			defender_goal = {
				casus_belli = status_quo
			}	
		}
	}
}