#French Intervention in Mexico
country_event = {
	
	id = 1130100
	title = "French debt" #The Treaty of Guadalupe Hidalgo
	desc = "We have been skimming over our instability with International debt, and now one of our debtors is asking for their money back"
	picture = "treaty"

	trigger = {
		tag = MEX
		year = 1855
		exists = CSA }

	fire_only_once = yes

		option = {
		name = "We refuse!"
		FRA = { country_event = 1130110 }
		prestige = 5
		set_country_flag = debt_with_france
		relation = { who = FRA value = -200 }
		ai_chance = {
			factor = 100
		}
	}
	
	option = {
		name = "We agree to their proposal."
		set_country_flag = no_debt_with_france
		prestige = -5
		treasury = -100000
		FRA = { treasury = 100000 }
		relation = { who = FRA value = 200 }
		ai_chance = {
			factor = 0
		}
	}
}
#French Intervention in Mexico - Mex refuses
country_event = {
	
	id = 1130110
	title = "French debt" #The Treaty of Guadalupe Hidalgo
	desc = "Mexico refuses paying its debt."
	picture = "treaty"

	is_triggered_only = yes

	option = {
		name = "Do nothing."
		set_country_flag = no_debt_with_france
		prestige = -25
		relation = { who = MEX value = -200 }
		ai_chance = {
			factor = 0
		}
	}

	option = {
		name = "We refuse to accept their refusal!"
		any_country = {
			limit = {
				alliance_with = MEX
			}
			leave_alliance = MEX
		}
        casus_belli = {
            target = MEX
            type = make_puppet
            months = 12
        }
			war = {
				target = MEX
				attacker_goal = {
					casus_belli = make_puppet }
			call_ally = no
			}
		ai_chance = {
			factor = 100
		}
	}
}
#Install a new Mexican government
country_event = {
	id = 1130120
	title = "EVTNAME1130120" #Haitian genocide
	desc = "EVTDESC1130120"
	picture = "revolutionnn"

	fire_only_once = yes

	trigger = {
		tag = FRA
		war_with = MEX
		2172 = { controlled_by = FRA } }

	mean_time_to_happen = {
		days = 10
		}
	option = {
		name = "EVT1130120OPT"
		MEX = {	any_owned = { limit = { 	is_core = MEX
						controlled_by = FRA }
			secede_province = FRA }
			end_war = FRA
			set_country_flag = the_true_mexico }
		FRA = {	any_owned = { limit = { 	is_core = MEX
						controlled_by = FRA }
			secede_province = MEE } }
		MEE = {	government = hms_government
			set_country_flag = the_true_mexico }

		diplomatic_influence = {
			who = MEE
			value = 400
		}
		relation = {
			who = MEE
			value = 200
		}
	}
}
#mexican war
country_event = {
	id = 1130121
	title = "EVTNAME1130121" #Haitian genocide
	desc = "EVTDESC1130121"
	picture = "revolutionnn"

	fire_only_once = yes

	trigger = {
		tag = MEX
		exists = MEE }

	mean_time_to_happen = {
		days = 10
		}
	option = {
		name = "EVT1130121AOPT"

		MEX = {	war = {
				target = MEE
				attacker_goal = {
					casus_belli = civil_war }
				defender_goal = {
					casus_belli = civil_war }
			} }
	}
	option = {
		name = "EVT1130121BOPT"

		MEX = {	war = {
				target = MEE
				attacker_goal = {
					casus_belli = civil_war }
				defender_goal = {
					casus_belli = civil_war }
			} }
		change_tag_no_core_switch = MEE
	}
}
#Mexico wins
country_event = {

	id = 1130130
	
	fire_only_once = yes

	trigger = {
		tag = MEX
		NOT = { exists = MEE }
		has_country_flag = the_true_mexico
		war = no
	}
		mean_time_to_happen = {

		days = 5
		}


	title = "EVTNAME1130130"
	desc = "EVTDESC1130130"

	option = {
		name = "EVTOPTA1130130"
		MEX = {
			capital = 2172
		}
	}
}
#The empire wins
country_event = {

	id = 1130131
	
	fire_only_once = yes

	trigger = {
		tag = MEE
		NOT = { exists = MEX }
		has_country_flag = the_true_mexico
		war = no
	}
		mean_time_to_happen = {

		days = 5
		}


	title = "EVTNAME1130131"
	desc = "EVTDESC1130131"

	option = {
		name = "EVTOPTA1130131"
		MEX = { all_core = { add_core = MEE
			remove_core = MEX } }
		MEE = {
			capital = 2172
		}
		FRA = { create_vassal = MEE }
	}
}