add_namespace = mexico

#----------------------------------------------------
#Plan of Tacubaya
#----------------------------------------------------
country_event = {
		id = mexico.1
		title = mexico.1.t
		desc= mexico.1.d
		picture = GFX_report_event_plan_tacubaya
		
		fire_only_once = yes
		is_triggered_only = yes
		
		trigger = {
			TAG = MEX
			#date > 1857.12.16
			has_country_leader = { id = 18621 ruling_only = yes name = "Ignacio Comonfort" }
		}
		
		option = {
			name = mexico.1.a
			add_stability = -0.02
			hidden_effect = {
				MEX = { country_event = { id = mexico.2 days = 2 } }
			}
		}
}

#The President's Pragmitism
country_event = {
		id = mexico.2
		title = mexico.2.t
		desc= mexico.2.d
		picture = GFX_report_event_mexican_constitution_of_1857
		
		is_triggered_only = yes
		
		option = {
			name = mexico.2.c
			trigger = { TAG = MEX }
			add_stability = -0.05
			hidden_effect = {
				decrease_ps_by_one = yes
			}
		}
		option = {
			name = mexico.2.c
			trigger = { TAG = MEC }
			add_stability = 0.025
			hidden_effect = {
				MEC = { country_event = { id = mexico.3 days = 5 } }
			}
		}
}


#imprisions political oponnents
country_event = {
		id = mexico.3
		title = mexico.3.t
		desc = {
			text = mexico.3.d
			trigger = { TAG = MEC }
		}
		desc = {
			text = mexico.3.e
			trigger = { TAG = MEX }
		}
		picture = GFX_report_event_mex_old_prison
		
		is_triggered_only = yes
		
		option = {
			name = mexico.3.a
			trigger = { TAG = MEC }
			add_political_power = -25
			add_stability = -0.025
			hidden_effect = {
				MEX = { country_event = { id = mexico.3 days = 3 } }
			}
		}
		
		option = {
			name = mexico.3.b
			trigger = { TAG = MEX }
			add_political_power = -100
			add_stability = -0.025
			hidden_effect = {
				MEX = { country_event = { id = mexico.4 days = 15 } }
			}
		}
}

#Declairation of extraordinary powers
country_event = {
		id = mexico.4
		title = mexico.4.t
		desc= mexico.4.d
		picture = GFX_report_event_ignacio_comonfort
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.4.a
			add_political_power = -10
			add_stability = -0.10
			complete_national_focus = MEX_liberate_juarez
		}
}

#Forced resignation
country_event = {
		id = mexico.5
		title = mexico.5.t
		desc= mexico.5.d
		picture = GFX_report_event_felix_maria_zuloaga
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.5.a
			add_stability = -0.05
			create_country_leader = {
				name = "Benito Juárez"
				desc = "POLITICS_TEMP_DESC"
				picture = GFX_Portrait_MEX_Benito_Juarez
				expire = 1872.7.18
				ideology = conserv_liberal
				id = 18623
			}
			set_politics = { ruling_party = traditional_conservatism elections_allowed = yes }
			hidden_effect = {
				MEX = { country_event = { days = 10 id = mexico.43 } }
			}
		}
}

#Mexican Civil War erupts
#country_event = {
#		id = mexico.6
#		title = mexico.6.t
#		desc = mexico.6.d
#		picture = GFX_report_event_mex_civil_war
#		fire_only_once = yes
#
#		is_triggered_only = yes
#		trigger = {
#			MXE = { exists = no }
#			MEX = { exists = yes }
#		}
#		immediate={
#			set_global_flag = MEX_MEC_CIVIL_WAR
#		}		
#		
#		option = {
#			name = mexico.6.a
#			custom_effect_tooltip = MEX_1857_Civilwar
#			hidden_effect = {
#				set_global_flag = MEX_MEC_CIVIL_WAR_side_chosen
#				set_politics = { ruling_party = centrism elections_allowed = yes }
#				increase_ps_by_one = yes
#				MEC = { inherit_technology = MEX }
#				MEC = { transfer_state = 277 }
#				277 = { add_core_of = MEC }
#				MEC = { transfer_state = 474 }
#				474 = { add_core_of = MEC }
#				MEC = { transfer_state = 475 }
#				475 = { add_core_of = MEC }
#				MEC = { transfer_state = 476 }
#				476 = { add_core_of = MEC }
#				MEC = { transfer_state = 481 }
#				481 = { add_core_of = MEC }
#				MEC = { transfer_state = 482 }
#				482 = { add_core_of = MEC }
#				MEC = { transfer_state = 483 }
#				483 = { add_core_of = MEC }
#				MEC = { transfer_state = 484 }
#				484 = { add_core_of = MEC }
#				MEC = { transfer_state = 1359 }
#				1359 = { add_core_of = MEC }
#				MEC = { transfer_state = 1113 }
#				1113 = { add_core_of = MEC }
#				MEC = { transfer_state = 1114 }
#				1114 = { add_core_of = MEC }
#				MEC = { transfer_state = 1125 }
#				477 = { add_core_of = MEC }
#				479 = { add_core_of = MEC }
#				480 = { add_core_of = MEC }
#				1112 = { add_core_of = MEC }
#				478 = { add_core_of = MEC }
#				1124 = { add_core_of = MEC }
#				485 = { add_core_of = MEC }
#				MEX = {
#					transfer_units_fraction= {
#						target = MEC
#						size = 0.5
#						stockpile_ratio = 0
#						army_ratio = 0.5
#						navy_ratio = 0
#						air_ratio = 0
#						keep_unit_leaders_trigger = {
#							OR = {
#								has_id = 18625 
#								has_id = 186210
#							}
#						}
#					}
#					every_unit_leader = {
#						limit = {
#							OR = {
#								has_id = 18626 
#								has_id = 186211
#							}
#						}
#						set_nationality = MEC
#					}
#					declare_war_on = {
#              			target = MEC
#						 type = annex_everything
#        				}
#					load_oob = "Mex_civil_war_liberals"
#					country_event = { days = 2 id = mexico.15 }
#				}
#				MEC = {
#					load_oob = "Mex_civil_war_conservatives"
#					MEX = { country_event = { days = 2 id = mexico.14 } }
#					news_event = news.4
#					if = {
#						limit = { ROOT = { is_ai = no } }
#						MEC = { change_tag_from = ROOT }
#					}
#				}
#				set_variable = { MEC.debt_level = MEX.debt_level }
#				set_variable = { MEC.SPR_debt_repayments_level = MEX.SPR_debt_repayments_level }
#				if = {
#					limit = { MEC = { NOT = { has_idea = egy_vic_debt } } }
#					MEC = { add_ideas = egy_vic_debt }
#				}
#			}
#			MEC = { complete_national_focus = MEX_support_tacubaya_plan }
#		}
#		option = {
#			name = mexico.6.b
#			custom_effect_tooltip = MEX_1857_Civilwar
#			complete_national_focus = MEX_defend_the_constitution
#			hidden_effect = {
#				set_global_flag = MEX_MEC_CIVIL_WAR_side_chosen
#				set_politics = { ruling_party = centrism elections_allowed = yes }
#				increase_ps_by_one = yes
#				MEC = { inherit_technology = MEX }
#				MEC = { transfer_state = 277 }
#				277 = { add_core_of = MEC }
#				MEC = { transfer_state = 474 }
#				474 = { add_core_of = MEC }
#				MEC = { transfer_state = 475 }
#				475 = { add_core_of = MEC }
#				MEC = { transfer_state = 476 }
#				476 = { add_core_of = MEC }
#				MEC = { transfer_state = 481 }
#				481 = { add_core_of = MEC }
#				MEC = { transfer_state = 482 }
#				482 = { add_core_of = MEC }
#				MEC = { transfer_state = 483 }
#				483 = { add_core_of = MEC }
#				MEC = { transfer_state = 484 }
#				484 = { add_core_of = MEC }
#				MEC = { transfer_state = 1359 }
#				1359 = { add_core_of = MEC }
#				MEC = { transfer_state = 1113 }
#				1113 = { add_core_of = MEC }
#				MEC = { transfer_state = 1114 }
#				1114 = { add_core_of = MEC }
#				MEC = { transfer_state = 1125 }
#				477 = { add_core_of = MEC }
#				479 = { add_core_of = MEC }
#				480 = { add_core_of = MEC }
#				1112 = { add_core_of = MEC }
#				478 = { add_core_of = MEC }
#				1124 = { add_core_of = MEC }
#				485 = { add_core_of = MEC }
#				MEX = {
#					transfer_units_fraction= {
#						target = MEC
#						size = 0.5
#						stockpile_ratio = 0
#						army_ratio = 0.5
#						navy_ratio = 0
#						air_ratio = 0
#						keep_unit_leaders_trigger = {
#							OR = {
#								has_id = 18625 
#								has_id = 186210
#							}
#						}
#					}
#					every_unit_leader = {
#						limit = {
#							OR = {
#								has_id = 18626 
#								has_id = 186211
#							}
#						}
#						set_nationality = MEC
#					}
#					declare_war_on = {
#              			target = MEC
#						 type = annex_everything
#        				}
#					load_oob = "Mex_civil_war_liberals"
#					country_event = { days = 2 id = mexico.15 }
#				}
#				MEC = {
#					load_oob = "Mex_civil_war_conservatives"
#					country_event = { days = 2 id = mexico.14 }
#					news_event = news.4
#				}
#				set_variable = { MEC.debt_level = MEX.debt_level }
#				set_variable = { MEC.SPR_debt_repayments_level = MEX.SPR_debt_repayments_level }
#				if = {
#					limit = { MEC = { NOT = { has_idea = egy_vic_debt } } }
#					MEC = { add_ideas = egy_vic_debt }
#				}
#			}
#		}
#}

#Start of the plan de Navidad (happens for the next 3)
country_event = {
		id = mexico.7
		title = mexico.7.t
		desc= mexico.7.d
		picture = GFX_report_event_plan_de_navidad
		
		fire_only_once = yes
		is_triggered_only = yes
		
		trigger = {
			original_tag = MEC
			#date > 1858.12.23
			has_war_with = MEX
		}
		
		option = {
			name = mexico.7.a
			retire_country_leader = yes	
			create_country_leader = {
				name = "Manuel Robles Pezuela"
				desc = "POLITICS_TEMP_DESC"
				picture = GFX_Portrait_MEC_Manuel_Robles_Pezuela
				expire = 1862.3.23
				ideology = conserv
				id = 186312
			}
			
		}
}

country_event = {
		id = mexico.8
		title = mexico.8.t
		desc= mexico.8.d
		picture = GFX_report_event_jose_mariano_salas
		
		fire_only_once = yes
		is_triggered_only = yes
		
		trigger = {
			original_tag = MEC
			#date > 1859.1.20
			has_war_with = MEX
		}
		
		option = {
			name = mexico.8.a
			hidden_effect = {
				country_event = { days = 12 id = mexico.9 }
			}
			retire_country_leader = yes
			create_country_leader = {
				name = "Jóse Mariano Salas"
				desc = "POLITICS_TEMP_DESC"
				picture = "GFX_Portrait_MEC_Jose_Mariano_Salas"
				expire = 1867.12.24
				ideology = conserv
				id = 186313
			}

			
		}
}

country_event = {
		id = mexico.9
		title = mexico.9.t
		desc= mexico.9.d
		picture = GFX_report_event_miguel_miramon
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.9.a
			retire_country_leader = yes
			create_country_leader = {
				name = "Miguel Miramón"
				desc = "POLITICS_TEMP_DESC"
				picture = "gfx/leaders/MEC/Portrait_MEC_Miguel_Miramon.png"
				expire = 1867.6.19
				ideology = conserv
				id = 186314
			}

			
			every_unit_leader = {
				limit = { has_id = 18628 }
				retire = yes
			}
		}
}

#Murder of Melchor Ocampo
country_event = {
		id = mexico.10
		title = mexico.10.t
		desc= mexico.10.d
		picture = GFX_report_event_melchor_ocampo_execution
		
		fire_only_once = yes
		is_triggered_only = yes
		
		trigger = {
			original_tag = MEX 
			#date > 1861.6.1
			has_war_with = MEC
		}
		
		option = {
			name = mexico.10.a
			add_stability = -0.05
			add_war_support = 0.05
		}
}

#Benito Juarez moves the capital to Veracruz
country_event = {
		id = mexico.11
		title = mexico.11.t
		desc= mexico.11.d
		picture = GFX_report_event_map_of_veracruz
		
		fire_only_once = yes
		is_triggered_only = yes
		
		trigger = {
			original_tag = MEX 
			#date > 1858.5.2
			has_war_with = MEC
		}
		
		option = {
			name = mexico.11.a
			set_capital = { state = 477 }
		}
}

#The End of the Reform War
country_event = {
		id = mexico.12
		title = mexico.12.t
		desc= mexico.12.d
		picture = GFX_report_event_reform_war_end
		
		fire_only_once = yes
		is_triggered_only = yes
		
		immediate = { 
			hidden_effect = { 
				if = { 
					limit = { MEC = { check_variable = { var = SPR_debt_repayments_level value = 0 compare = greater_than } } }
					MEX = { set_variable = { var = MEX.SPR_debt_repayments_level_from_war_temp value = MEC.SPR_debt_repayments_level } }
					MEX = { subtract_from_variable = { var = MEX.SPR_debt_repayments_level_from_war_temp value = MEX.SPR_debt_repayments_level } }
					MEX = { set_variable = { var = MEX.SPR_debt_repayments_level value = MEX.SPR_debt_repayments_level_from_war_temp } }
					#MEX = { add_to_variable = { var = MEX.debt_level value = MEX.SPR_debt_repayments_level_from_war_temp } }
				}
			}
			hidden_effect = { 
				USA = { clr_country_flag = USA_mexican_reform_war_loans_flag }
				MEX = { remove_ideas = MEX_reform_war_itinerant_government }
				MEC = {
					drop_cosmetic_tag = yes
					clr_country_flag = SPR_gives_loan_support_flag
					if = { 
						limit = { has_template = "Spanish Volunteers" }
						set_division_template_lock = {
							division_template = "Spanish Volunteers"
							is_locked = no
						}
					}
					delete_unit_template_and_units = {
						division_template = "Local Militia"
						disband = yes #will refund equipment and manpower
					}
				}
				MEX = {
					delete_unit_template_and_units = {
						division_template = "Local Militia"
						disband = yes #will refund equipment and manpower
					}
				}
			}
		}
		
		trigger = {
			has_global_flag = MEX_MEC_CIVIL_WAR_side_chosen
			has_global_flag = MEX_MEC_CIVIL_WAR
			original_tag = MEX 
			MEC = {
				OR={
					has_capitulated = yes
					exists = no
				}
			}
		}
		
		option = {
			name = mexico.12.a
			add_stability = 0.1
			add_ideas = MEX_idea_scars_of_the_civil_war
			hidden_effect = {
				load_focus_tree = mexico_vic_liberal_ft
				set_country_flag = MEX_civ_ended_liberals
				clr_global_flag = MEX_MEC_CIVIL_WAR
			}	
			complete_national_focus = MEX_rep_secure_reform_war_victory
		}
}
#Leonardo Márquez
country_event = {
		id = mexico.13
		title = mexico.13.t
		desc= mexico.13.d
		picture = GFX_report_event_mexican_recruitment_1857
		
		fire_only_once = yes
		is_triggered_only = yes
		
		trigger = {
			original_tag = MEC
			date > 1859.4.10
			#date < 1867.6.21
			has_war_with = MEX
		}
		
		option = {
			name = mexico.13.a
			add_political_power = -5
			hidden_effect = {
				create_corps_commander = {
  					name = "Leonardo Márquez"
 					picture = "gfx/leaders/MEC/Portrait_MEC_Leonard_Marquez.png"
					traits = { harsh_leader }
 					skill = 4
					id = 18634
  					attack_skill = 4
					defense_skill = 3
					planning_skill = 3
					logistics_skill = 2
				}
			}
		}
}

# Miguel Miramon
country_event = {
    id = mexico.14
    title = mexico.14.t
    desc = mexico.14.d
    picture = GFX_report_event_mexican_recruitment_1857
    
    fire_only_once = yes
    is_triggered_only = yes
    
    option = {
        name = mexico.14.a
        add_political_power = -5
        hidden_effect = {
            generate_character = {
                token_base = miguel_miramon
                name = "Miguel Miramón"
                portraits = {
                    army = {
                        large = "gfx/leaders/MEC/Portrait_MEC_Miguel_Miramon.png"
                    }
                }
                corps_commander = {
                    traits = { }
                    skill = 1
                    attack_skill = 2
                    defense_skill = 2
                    planning_skill = 2
                    logistics_skill = 1
                }
            }
        }
    }
}

# Leandro Valle Martínez
country_event = {
    id = mexico.15
    title = mexico.15.t
    desc = mexico.15.d
    picture = GFX_report_event_mexican_recruitment_1857
    
    fire_only_once = yes
    is_triggered_only = yes
    
    option = {
        name = mexico.15.a
        add_political_power = -5
        hidden_effect = {
            generate_character = {
                token_base = leonardo_valle
                name = "Leonardo Valle Martínez"
                portraits = {
                    army = {
                        large = "gfx/leaders/MEX/Portrait_MEX_Leonardo_Valle.png"
                    }
                }
                corps_commander = {
                    traits = { }
                    skill = 1
                    attack_skill = 2
                    defense_skill = 2
                    planning_skill = 1
                    logistics_skill = 2
                }
            }
        }
    }
}

# Porfirio Díaz
country_event = {
    id = mexico.16
    title = mexico.16.t
    desc = mexico.16.d
    picture = GFX_report_event_mexican_recruitment_1857
    
    fire_only_once = yes
    is_triggered_only = yes
    
    trigger = {
        original_tag = MEX
        date < 1872.10.1
        has_war_with = FRA
    }
    
    option = {
        name = mexico.16.a
        add_political_power = -5
        hidden_effect = {
            generate_character = {
                token_base = porfirio_diaz
                name = "Porfirio Díaz"
                portraits = {
                    army = {
                        large = "GFX_Portrait_MEX_Porfirio_Diaz_Young"
                    }
                }
                corps_commander = {
                    traits = { brilliant_strategist }
                    skill = 2
                    attack_skill = 1
                    defense_skill = 2
                    planning_skill = 2
                    logistics_skill = 3
                }
            }
        }
    }
}

country_event = {
		id = mexico.17
		title = mexico.17.t
		desc = mexico.17.d
		picture = GFX_report_event_luis_gonzaga_osollo_death
		
		fire_only_once = yes
		is_triggered_only = yes
		
		trigger = {
			original_tag = MEC
			#date > 1858.6.16
			has_war_with = MEX
		}
		
		option = {
			name = mexico.17.a
			hidden_effect = {
				every_unit_leader = {
					limit = {
						OR = {
							has_id = 186211
						}
					}
					retire = yes
				}
			}
		}
}

country_event = {
		id = mexico.18
		title = mexico.18.t
		desc= mexico.18.d
		picture = GFX_report_event_jose_santos_degollado_death
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.18.a
			hidden_effect = {
				every_unit_leader = {
					limit = {
						OR = {
							has_id = 186210
						}
					}
					retire = yes
				}
			}
		}
}

country_event = {
		id = mexico.19
		title = mexico.19.t
		desc= mexico.19.d
		picture = GFX_report_event_leandro_valle_martinez_death
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.19.a
			hidden_effect = {
				every_unit_leader = {
					limit = {
						OR = {
							has_id = 18629
						}
					}
					retire = yes
				}
			}
		}
}

#The End of the Reform War
country_event = {
		id = mexico.20
		title = mexico.20.t
		desc= mexico.20.d
		picture = GFX_report_event_reform_war_end
		
		is_triggered_only = yes
		
		immediate = { 
			hidden_effect = { 
				if = { 
					limit = { MEX = { check_variable = { var = USA_debt_repayments_level value = 0 compare = greater_than } } }
					MEC = { set_variable = { var = MEC.USA_debt_repayments_level_from_war_temp value = MEX.USA_debt_repayments_level } }
					MEC = { subtract_from_variable = { var = MEC.USA_debt_repayments_level_from_war_temp value = MEC.USA_debt_repayments_level } }
					MEC = { set_variable = { var = MEC.USA_debt_repayments_level value = MEC.USA_debt_repayments_level_from_war_temp } }
					#MEC = { add_to_variable = { var = MEC.debt_level value = MEC.USA_debt_repayments_level_from_war_temp } }
				}
			}
			hidden_effect = { 
				USA = { clr_country_flag = USA_mexican_reform_war_loans_flag }
				MEX = { remove_ideas = MEX_reform_war_itinerant_government }
				MEC = {
					clr_country_flag = SPR_gives_loan_support_flag
					if = { 
						limit = { has_template = "Spanish Volunteers" }
						set_division_template_lock = {
							division_template = "Spanish Volunteers"
							is_locked = no
						}
					}
					delete_unit_template_and_units = {
						division_template = "Local Militia"
						disband = yes #will refund equipment and manpower
					}
				}
				MEX = {
					delete_unit_template_and_units = {
						division_template = "Local Militia"
						disband = yes #will refund equipment and manpower
					}
				}
			}
		}
		
		trigger = {
			original_tag = MEC 
			MEX = {
				OR={
					has_capitulated = yes
					exists = no
				}
			}	
			date < 1872.1.1
			has_global_flag = MEX_MEC_CIVIL_WAR
			has_global_flag = MEX_MEC_CIVIL_WAR_side_chosen
		}
		
		option = {
			name = mexico.20.b 
			add_stability = 0.1
			hidden_effect = {
				set_country_flag = MEX_civ_ended_conservatives
				clr_global_flag = MEX_MEC_CIVIL_WAR
			}	
			add_ideas = MEX_idea_scars_of_the_civil_war
		}
}

country_event = {
		id = mexico.21
		title = mexico.21.t
		desc= mexico.21.d
		picture = GFX_report_event_jose_santos_degollado_death
		
		is_triggered_only = yes
		
		option = {
			name = mexico.21.e
			hidden_effect = {
				set_country_flag = MEC_the_theocracy
			}	
		}
		
		option = {
			name = mexico.21.b
			hidden_effect = {
				set_country_flag = MEC_the_moderates
			}	
		}
		
		option = {
			name = mexico.21.c
			hidden_effect = {
				set_country_flag = MEC_the_autocracy
			}	
		}
}

country_event = {
		id = mexico.22
		title = mexico.22.t
		desc= mexico.22.d
		
		is_triggered_only = yes
		
		option = {
			name = mexico.22.a
			add_political_power = 50
			add_opinion_modifier = { target = MEC modifier = eoanb_om_PRS_focus_like }
			MEC = {
				add_popularity = {
					ideology = fundamentalism
					popularity = 0.10
				}
			add_opinion_modifier = { target = PAP modifier = eoanb_om_PRS_focus_like }
			}	
		}
	}
	
	country_event = {
		id = mexico.23
		title = mexico.23.t
		desc= mexico.23.d
		picture = GFX_report_event_jose_santos_degollado_death
		
		is_triggered_only = yes
		
		option = {
			name = mexico.23.a
			add_political_power = 25
			set_party_name = { 
				ideology = centrism 
				name = MEX_centrism_party 
				long_name = MEX_centrism_party 
			}
		}
	}
	
	country_event = {
		id = mexico.24
		title = mexico.24.t
		desc= mexico.24.d
		picture = GFX_report_event_jose_santos_degollado_death
		
		is_triggered_only = yes
		
		option = {
			name = mexico.24.a
			add_opinion_modifier = {
				target = MEC
				modifier = offered_support
			}
			hidden_effect = {
				load_oob = MEX_volunteers_USA
			}	
				
		}
	}
	
	country_event = {
		id = mexico.25
		title = mexico.25.t
		desc= mexico.25.d
		picture = GFX_report_event_luis_gonzaga_osollo_death
		
		is_triggered_only = yes
		
		option = {
			name = mexico.25.a 
			add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.10
				}		
		}
	}
	
	country_event = {
		id = mexico.26
		title = mexico.26.t
		desc= mexico.26.d
		picture = GFX_report_event_luis_gonzaga_osollo_death
		
		is_triggered_only = yes
		
		option = {
			name = mexico.26.a 
			add_opinion_modifier = {
				target = MEC
				modifier = offered_support
			}
			hidden_effect = {
				load_oob = MEC_volunteers_CSA
			}	
		}
	}

	country_event = { # Mexico Requests naval guidance (UK)
		id = mexico.27
		title = mexico.27.t
		desc= mexico.27.d
		picture = GFX_britain_admiral_cap
		
		is_triggered_only = yes
		
		option = {
			name = mexico.27.a # Accept
			MEC = {
				add_doctrine_cost_reduction = { cost_reduction = 2 uses = 2 category = naval_doctrine }
    			add_tech_bonus = { bonus = 1 uses = 3 category = naval_equipment }
    			navy_experience = 45
    			country_event = {
    				id = mexico.28
    				days = 8
				}
    		}
    		diplomatic_relation = {
    			country = MEC
    			relation = docking_rights
   			 	active = yes
			}
			diplomatic_relation = {
    			country = MEC
    			relation = non_aggression_pact
   			 	active = yes
			}
			reverse_add_opinion_modifier = { target = MEC modifier = eoanb_om_RUS_increase_small }
			add_opinion_modifier = { target = MEC modifier = eoanb_om_RUS_increase_small }
			ai_chance = { factor = 75 }
		}

		option = {
			name = mexico.27.b # Refuse
			country_event = {
    			id = mexico.29
    			days = 8
			}
			effect_tooltip = {
				MEC = { add_opinion_modifier = { target = ENG modifier = eoanb_om_RUS_decrease_very_small } }
			}
			ai_chance = { factor = 25 }
		}
	}

	country_event = { # Mexico Requests naval guidance (UK Accepted)
		id = mexico.28
		title = mexico.28.t
		desc= mexico.28.d
		picture = GFX_britain_admiral_cap
		
		is_triggered_only = yes
		
		option = {
			name = mexico.28.a #
			effect_tooltip = {
    			add_doctrine_cost_reduction = { cost_reduction = 2 uses = 2 category = naval_doctrine }
    			add_tech_bonus = { bonus = 1 uses = 3 category = naval_equipment }
    			navy_experience = 45
    			ENG = {
    				diplomatic_relation = {
    					country = MEC
    					relation = docking_rights
   			 			active = yes
					}
					diplomatic_relation = {
    					country = MEC
    					relation = non_aggression_pact
   			 			active = yes
					}
					reverse_add_opinion_modifier = { target = MEC modifier = eoanb_om_RUS_increase_small }
					add_opinion_modifier = { target = MEC modifier = eoanb_om_RUS_increase_small }
				}
			}
		}
	}

	country_event = { # Mexico Requests naval guidance (UK Refused)
		id = mexico.29
		title = mexico.29.t
		desc= mexico.29.d
		picture = GFX_britain_admiral_cap
		
		is_triggered_only = yes
		
		option = {
			name = mexico.29.a #
			add_opinion_modifier = { target = ENG modifier = eoanb_om_RUS_decrease_very_small }
		}
	}
	
	
	country_event = {
		id = mexico.30
		title = mexico.30.t
		desc= mexico.30.d
		picture = GFX_report_event_leandro_valle_martinez_death
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.30.a
			add_stability = -0.05
			kill_country_leader = yes
			create_country_leader = {
				name = "Leonardo Márquez"
				desc = "POLITICS_TEMP_DESC"
				picture = "Portrait_MEX_Leonard_Marquez.dds"
				expire = 1872.7.18
				ideology = conserv
			}
			
			create_corps_commander = {
				name = "Leonardo Márquez"
 				picture = "Portrait_MEX_Leonard_Marquez.dds"
				traits = { harsh_leader }
 				skill = 4
  				attack_skill = 4
				defense_skill = 3
				planning_skill = 3
				logistics_skill = 2
			}
			set_politics = { ruling_party = traditional_conservatism elections_allowed = yes }
			add_ideas = MEX_idea_military_privileges
		}
	}	

#----------------------------------------------------
#Pre Civil War
#----------------------------------------------------

	country_event = {
		id = mexico.31
		title = mexico.31.t
		desc= mexico.31.d
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.31.a
			swap_ideas = {
				remove_idea = MEX_idea_uncontrolled_catholic_church_0
				add_idea = MEX_idea_uncontrolled_catholic_church_1
			}
		}
	}
	
	country_event = {
		id = mexico.32
		title = mexico.32.t
		desc= mexico.32.d
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.32.a
			swap_ideas = {
				remove_idea = limited_exports
				add_idea = free_trade
			}
			swap_ideas = {
				remove_idea = state_religion
				add_idea = secular_state
			}
			swap_ideas = {
				remove_idea = foa_non_socialist
				add_idea = foa_free_assembly
			}
			swap_ideas = {
				remove_idea = pp_ban_extremist_parties
				add_idea = pp_open_politics
			}
		}
	}
	
	country_event = {
		id = mexico.33
		title = mexico.33.t
		desc= mexico.33.d
	
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.33.a
			swap_ideas = {
				remove_idea = MEX_idea_uncontrolled_catholic_church_1
				add_idea = MEX_idea_uncontrolled_catholic_church_2
			}
		}
	}
	
	country_event = {
		id = mexico.34
		title = mexico.34.t
		desc= mexico.34.d
	
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.34.a
			add_stability = 0.075
		}
	}
	
	country_event = {
		id = mexico.35
		title = mexico.35.t
		desc= mexico.35.d
		picture = GFX_report_event_ignacio_comonfort
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.35.a
			add_stability = 0.05
			add_war_support = 0.12
			hidden_effect = { MEC = { country_event = { id = mexico.36 days = 3 } } }
		}
	}
	
	country_event = {
		id = mexico.36
		title = mexico.36.t
		desc = mexico.36.d
		picture = GFX_report_event_felix_maria_zuloaga
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.36.a
			add_stability = 0.05
			add_war_support = 0.12
			
			set_politics = { 
				ruling_party = traditional_conservatism 
				elections_allowed = yes 
			}
			
			complete_national_focus = MEX_get_rid_of_confort
			hidden_effect = { 
				MEX = { country_event = { id = mexico.37 } }
			}
		}
	}
	
	country_event = {
		id = mexico.37
		title = mexico.37.t
		desc= mexico.37.d
		picture = GFX_report_event_felix_maria_zuloaga
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.37.a
			create_country_leader = {
				name = "Benito Juárez"
				desc = "POLITICS_TEMP_DESC"
				picture = GFX_Portrait_MEX_Benito_Juarez
				expire = 1872.7.18
				ideology = conserv_liberal
				id = 18623
			}
			declare_war_on = {
				target = MEC
				type = annex_everything
			}
			hidden_effect = {
				MEX = {
					add_ai_strategy = {
						type = front_control
					
						#you can define a target in following ways. you can define more than one
						
						tag = MEC 							# target against a specific country
						state = 277 						# target on a state
						strategic_region = 123				# target on a strategic region
						#area = caribbean					# target on a specific ai area
						country_trigger = { has_global_flag = MEX_MEC_CIVIL_WAR } 	# a trigger to check agaisnt a specific country. scope is enemy country from scope is our country
						#state_trigger = { always = no } 	# a trigger to check agaisnt a state. scope is state. from scope is enemy country from.from scope is our country
						
						ratio = 0.0 						# the strategy is enabled only if ratio of the front covered by this strat's targets greater than this ratio
						
						priority = 200 						# default 0, higher prio strats will override lower
						ordertype = front	 				# front or invasion. if set this strategy will only apply to that specific order type
						execution_type = balanced 			# one of careful balanced rush rush_weak. if set will override the execution type of front (only for front orders)
						execute_order = yes 				# yes or no. if set will override execute or not decision of front
						manual_attack = yes 				# default yes. if no ai will not do manual pokes at enemy (only for front orders)
					}
				}
				MEC = {
					add_ai_strategy = {
						type = front_control
					
						#you can define a target in following ways. you can define more than one
						
						tag = MEX 							# target against a specific country
						state = 477 						# target on a state
						strategic_region = 123				# target on a strategic region
						#area = caribbean					# target on a specific ai area
						country_trigger = { has_global_flag = MEX_MEC_CIVIL_WAR } 	# a trigger to check agaisnt a specific country. scope is enemy country from scope is our country
						#state_trigger = { always = no } 	# a trigger to check agaisnt a state. scope is state. from scope is enemy country from.from scope is our country
						
						ratio = 0.0 						# the strategy is enabled only if ratio of the front covered by this strat's targets greater than this ratio
						
						priority = 200 						# default 0, higher prio strats will override lower
						ordertype = front 					# front or invasion. if set this strategy will only apply to that specific order type
						execution_type = careful 			# one of careful balanced rush rush_weak. if set will override the execution type of front (only for front orders)
						execute_order = yes 				# yes or no. if set will override execute or not decision of front
						manual_attack = yes 				# default yes. if no ai will not do manual pokes at enemy (only for front orders)
					}
				}
			}
		}
	}
	
	#Liberal or Conservative Resistance
	state_event = {
		id = mexico.38
		hidden = yes
		is_triggered_only = yes
		
		immediate = {
			hidden_effect = { 
				OWNER = {
					random_state = {
						limit = { STATE = ROOT }
						OWNER = { PREV = { state_event = { id = mexico.39 } } }
					}
				}
			}
		}
	}
	state_event = {
		id = mexico.39
		hidden = yes
		is_triggered_only = yes
		
		immediate = { hidden_effect = { OWNER = { country_event = { id = mexico.40 } } } }
	}
	country_event = {
		id = mexico.40
		title = mexico.40.t
		desc = {
			text = mexico.40.d
			trigger = { TAG = MEX }
		}
		desc = {
			text = mexico.40.e
			trigger = { TAG = MEC }
		}
		picture = GFX_report_event_reform_war_end
		is_triggered_only = yes
		trigger = { 
			OR = {
				TAG = MEX
				TAG = MEC
			}
		}
		
		option = {
			name = mexico.40.a
			trigger = { TAG = MEX }
			every_owned_state = {
				limit = { 
					is_core_of = MEC
					has_resistance = yes
				}
				add_resistance = 35
			}
		}
		option = {
			name = mexico.40.b
			trigger = { TAG = MEC }
			every_owned_state = {
				limit = { is_core_of = MEX }
				start_resistance = yes
				add_resistance = 35
			}
		}
	}

#----------------------------------------------------
#Mexico In Debt? Finding Relief
#----------------------------------------------------
country_event = {
	id = mexico.41
	title = mexico.41.t
	desc = mexico.41.d

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = mexico.41.a
		#Cease Debt payments
		ai_chance = {
			base = 50
		}
		set_global_flag = MEX_cease_foreign_debt_repayments_flag
		clr_country_flag = MEX_foreign_debt_repayments_flag
		hidden_effect = { SPR = { country_event = { id = SPR_mexican_expedition.5 days = 3 } } }
	}
	
	#option = {
	#	name = mexico.41.b
	#	#Find Relief
	#	ai_chance = { 
	#		base = 50
	#		modifier = {
	#			factor = 0
	#			is_historical_focus_on = yes
	#		}
	#	}
	#}
}

country_event = { #Debt system initial announcement
	id = mexico.42
	title = mexico.42.t
	desc = mexico.42.d

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = mexico.42.a
		ai_chance = { base = 100 }
	}
	
	option = {
		name = mexico.42.b
		ai_chance = { base = 0 }
	}
}


#----------------------------------------------------
# Liberal-Conservative Civil War
#----------------------------------------------------

	#Tacubaya Coup Erupts
	country_event = {
		id = mexico.43
		title = mexico.43.t
		desc = mexico.43.d
		picture = GFX_report_event_plan_tacubaya
		fire_only_once = yes

		is_triggered_only = yes
		trigger = {
			MXE = { exists = no }
			MEX = { exists = yes }
		}
		immediate={
			set_global_flag = MEX_MEC_CIVIL_WAR
		}		
		
		option = {
			name = mexico.43.a
			custom_effect_tooltip = MEX_1857_Civilwar
			hidden_effect = {
				set_global_flag = MEX_MEC_CIVIL_WAR_side_chosen
				set_politics = { ruling_party = centrism elections_allowed = yes }
				add_popularity = { ideology = centrism popularity = 0.4}
				increase_ps_by_one = yes
				MEC = { transfer_state = 277 }
				277 = { add_core_of = MEC }
				MEC = { transfer_state = 1114 }
				1114 = { add_core_of = MEC }
				MEC = { transfer_state = 1113 }
				1113 = { add_core_of = MEC }
				MEC = { inherit_technology = MEX }
				set_variable = { var = MEC.SPR_debt_repayments_level value = MEX.SPR_debt_repayments_level }
				if = { 
					limit = { check_variable = { var = MEC.SPR_debt_repayments_level value = 0 compare = greater_than } }
					MEC = { set_country_flag = SPR_paying_debt_interest_flag }
				}
				MEX = {
					every_owned_state = { 
						limit = { is_core_of = MEX }
						add_core_of = MEC
					}
					transfer_units_fraction= {
						target = MEC
						size = 0.5
						stockpile_ratio = 0
						army_ratio = 0.5
						navy_ratio = 0
						air_ratio = 0
						keep_unit_leaders_trigger = {
							OR = {
								has_id = 18625 
								has_id = 186210
							}
						}
					}
					every_unit_leader = {
						limit = {
							OR = {
								has_id = 18626 
								has_id = 186211
							}
						}
						set_nationality = MEC
					}
					load_oob = "MEX_civil_war_liberals"
					country_event = { id = mexico.15 days = 2 }
				}
				MEC = {
					load_oob = "MEX_civil_war_conservatives"
					MEX = { country_event = { id = mexico.14 days = 2 } }
					news_event = news.4
					if = {
						limit = { ROOT = { is_ai = no } }
						MEC = { change_tag_from = ROOT }
					}
					set_war_support = 0.6
				}
				#set_variable = { MEC.debt_level = MEX.debt_level }
				set_variable = { MEC.SPR_debt_repayments_level = MEX.SPR_debt_repayments_level }
				MEX = { complete_national_focus = MEX_defend_the_constitution }
				#Southern States
				random_state = {
					limit = { STATE = 476 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 3 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 475 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 3 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 474 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 3 trigger_for = controller } } }
				}
				#Northern States
				random_state = {
					limit = { STATE = 481 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 5 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 482 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 5 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 483 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 4 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 484 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 6 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 1125 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 4 trigger_for = controller } } }
				}
				MEX = { country_event = { id = mexico.2 days = 3 } }
				MEC = { country_event = { id = mexico.2 days = 3 } }
			}
			MEC = { complete_national_focus = MEX_support_tacubaya_plan }
			hidden_effect = {
				MEC = {
					add_ai_strategy = {
						type = prepare_for_war
						id = MEX
						value = 200
					}
				}
				MEX = {
					add_ai_strategy = {
						type = prepare_for_war
						id = MEC
						value = 200
					}
				}
			}
		}
		option = {
			name = mexico.43.b
			custom_effect_tooltip = MEX_1857_Civilwar
			MEX = { complete_national_focus = MEX_defend_the_constitution }
			hidden_effect = {
				set_global_flag = MEX_MEC_CIVIL_WAR_side_chosen
				set_politics = { ruling_party = centrism elections_allowed = yes }
				increase_ps_by_one = yes
				MEC = { transfer_state = 277 }
				277 = { add_core_of = MEC }
				MEC = { transfer_state = 1114 }
				1114 = { add_core_of = MEC }
				MEC = { transfer_state = 1113 }
				1113 = { add_core_of = MEC }
				MEX = {
					every_owned_state = { 
						limit = { is_core_of = MEX }
						add_core_of = MEC
					}
					transfer_units_fraction= {
						target = MEC
						size = 0.5
						stockpile_ratio = 0
						army_ratio = 0.5
						navy_ratio = 0
						air_ratio = 0
						keep_unit_leaders_trigger = {
							OR = {
								has_id = 18625 
								has_id = 186210
							}
						}
					}
					every_unit_leader = {
						limit = {
							OR = {
								has_id = 18626 
								has_id = 186211
							}
						}
						set_nationality = MEC
					}
					load_oob = "MEX_civil_war_liberals"
					country_event = { id = mexico.15 days = 2  }
					set_war_support = 0.6
				}
				MEC = {
					load_oob = "MEX_civil_war_conservatives"
					country_event = { id = mexico.14 days = 2 }
					news_event = news.4
				}
			#	set_variable = { MEC.debt_level = MEX.debt_level }
				set_variable = { MEC.SPR_debt_repayments_level = MEX.SPR_debt_repayments_level }
				MEC = { complete_national_focus = MEX_support_tacubaya_plan }
				#Southern States
				random_state = {
					limit = { STATE = 476 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 3 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 475 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 3 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 474 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 3 trigger_for = controller } } }
				}
				#Northern States
				random_state = {
					limit = { STATE = 481 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 5 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 482 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 5 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 483 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 4 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 484 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 6 trigger_for = controller } } }
				}
				random_state = {
					limit = { STATE = 1125 }
					OWNER = { PREV = { state_event = { id = mexico.44 days = 1 random_days = 4 trigger_for = controller } } }
				}
				MEX = { country_event = { id = mexico.2 days = 3 } }
				MEC = { country_event = { id = mexico.2 days = 3 } }
			}
			hidden_effect = {
				MEC = {
					add_ai_strategy = {
						type = prepare_for_war
						id = MEX
						value = 200
					}
				}
				MEX = {
					add_ai_strategy = {
						type = prepare_for_war
						id = MEC
						value = 200
					}
				}
			}
		}
	}
	
	#State Breaks Off
	state_event = {
		id = mexico.44
		hidden = yes
		is_triggered_only = yes
		
		immediate = {
			hidden_effect = { 
				OWNER = {
					random_state = {
						limit = { STATE = ROOT }
						OWNER = { PREV = { state_event = { id = mexico.45 } } }
					}
				}
			}
		}
	}
	state_event = {
		id = mexico.45
		hidden = yes
		is_triggered_only = yes
		
		immediate = { 
			hidden_effect = { 
				MEC = { country_event = { id = mexico.46 } }
				MEX = { country_event = { id = mexico.46 } }
				MEC = { transfer_state = ROOT }
				ROOT = { add_core_of = MEC }
				if = {
					limit = { ROOT = { STATE = 484 } }
					MEC = { transfer_state = 1359 }
					1359 = { add_core_of = MEC }
				}
			}
		}
	}
	country_event = {
		id = mexico.46
		title = mexico.46.t
		desc = {
			text = mexico.46.d
			trigger = { TAG = MEX }
		}
		desc = {
			text =mexico.46.e
			trigger = { TAG = MEC }
		}
		picture = GFX_report_event_treaty_of_coche
		is_triggered_only = yes
		
		option = {
			name = mexico.46.a
			trigger = { TAG = MEX }
			add_stability = -0.01
		}
		option = {
			name = mexico.46.b
			trigger = { TAG = MEC }
			add_war_support = 0.015
			FROM = {
				create_unit = {
					division = "name = \"Local Militia\" division_template = \"Local Militia\" start_experience_factor = 0.1 start_equipment_factor = 0.70"
					owner = ROOT
				}
				create_unit = {
					division = "name = \"Local Militia\" division_template = \"Local Militia\" start_experience_factor = 0.1 start_equipment_factor = 0.70"
					owner = ROOT
				}
			}
		}
	}
	
	#Enact Five Laws
	country_event = {
		id = mexico.47
		title = mexico.47.t
		desc= mexico.47.d
		picture = GFX_report_event_mex_civil_war
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.47.a
			swap_ideas = {
				remove_idea = MEX_idea_uncontrolled_catholic_church_2
				add_idea = MEX_idea_uncontrolled_catholic_church_0
			}
			swap_ideas = {
				remove_idea = free_trade
				add_idea = limited_exports
			}
			swap_ideas = {
				remove_idea = secular_state
				add_idea = state_religion
			}
			swap_ideas = {
				remove_idea = foa_free_assembly
				add_idea = foa_non_socialist
			}
			swap_ideas = {
				remove_idea = pp_open_politics
				add_idea = pp_ban_extremist_parties
			}
		}
	}
	
	#Make Itinerant Government
	country_event = {
		id = mexico.48
		title = mexico.48.t
		desc= mexico.48.d
		picture = GFX_report_event_mex_civil_war
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.48.a
			
		}
	}
	
	#Secularize the Country
	country_event = {
		id = mexico.49
		title = mexico.49.t
		desc= mexico.49.d
		picture = GFX_report_event_mex_civil_war
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.49.a
			
		}
	}
	
	#Ask USA for Help
	country_event = {
		id = mexico.50
		title = mexico.50.t
		desc= mexico.50.d
		picture = GFX_report_event_mex_civil_war
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = {
			name = mexico.50.a
			hidden_effect = {
				MEX = { country_event = { id = mexico.51 days = 3 } }
			}
		}
	}
	country_event = {
		id = mexico.51
		title = mexico.51.t
		desc= mexico.51.d
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = { #Accept Loans
			name = mexico.51.a
			ai_chance = { base = 100 }
			hidden_effect = {
				USA = { set_country_flag = USA_mexican_reform_war_loans_flag }
			}
		}
		option = { #Decline Loans
			name = mexico.51.b
			ai_chance = { 
				base = 0 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
		}
	}
	
	#Ask Spain for Help
	country_event = {
		id = mexico.53
		title = mexico.53.t
		desc= mexico.53.d
		picture = GFX_report_event_mex_civil_war
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = { #Money and Volunteers
			name = mexico.53.a
			ai_chance = { 
				base = 90 
			}
			hidden_effect = {
				SPR = { country_event = { id = mexico.54 days = 3 } }
			}
		}
		option = { #Just Money
			name = mexico.53.b
			ai_chance = { 
				base = 10 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			hidden_effect = {
				SPR = { country_event = { id = mexico.55 days = 3 } }
			}
		}
	}
	#Money and Volunteers
	country_event = {
		id = mexico.54
		title = mexico.54.t
		desc= mexico.54.d
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = { #Nothing
			name = mexico.54.a
			ai_chance = { 
				base = 0 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			hidden_effect = {
				MEC = { country_event = { id = mexico.56 days = 3 } }
			}
		}
		option = { #Just Money
			name = mexico.54.b
			ai_chance = { 
				base = 05 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			hidden_effect = {
				MEC = { country_event = { id = mexico.57 days = 3 } }
			}
		}
		option = { #Money and Volunteers
			name = mexico.54.c
			ai_chance = { 
				base = 40 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			hidden_effect = {
				MEC = { country_event = { id = mexico.58 days = 3 } }
				USA = { country_event = { id = mexico.64 days = 3 } }
			}
		}
		option = { #Money and Volunteers
			name = mexico.54.e
			ai_chance = { 
				base = 55 
			}
			hidden_effect = {
				MEC = { country_event = { id = mexico.58 days = 3 } }
				random_list = {
					50 = { USA = { country_event = { id = mexico.59 days = 9 } } }
					50 = { 
						MEC = { country_event = { id = mexico.63 days = 15 } } 
						SPR = { country_event = { id = mexico.63 days = 15 } }
					}
				}
			}
		}
	}
	#Money
	country_event = {
		id = mexico.55
		title = mexico.55.t
		desc= mexico.55.d
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = { #Nothing
			name = mexico.55.a
			ai_chance = { 
				base = 0 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			hidden_effect = {
				MEC = { country_event = { id = mexico.56 days = 3 } }
			}
		}
		option = { #Just Money
			name = mexico.55.b
			ai_chance = { 
				base = 100 
			}
			hidden_effect = {
				MEC = { country_event = { id = mexico.57 days = 3 } }
			}
		}
	}
	#Reply - Nothing
	country_event = {
		id = mexico.56
		title = mexico.56.t
		desc= mexico.56.d
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = { #Nothing
			name = mexico.56.a
			
		}
	}
	#Reply - Money
	country_event = {
		id = mexico.57
		title = mexico.57.t
		desc= mexico.57.d
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = { #Money
			name = mexico.57.a
			set_country_flag = SPR_gives_loan_support_flag
		}
	}
	#Reply - Money and Volunteers
	country_event = {
		id = mexico.58
		title = mexico.58.t
		desc= mexico.58.d
		
		fire_only_once = yes
		
		is_triggered_only = yes
		
		option = { #Money and Volunteers
			name = mexico.58.a
			set_country_flag = SPR_gives_loan_support_flag
		}
	}
	#USA Exposes Spanish Volunteers
	country_event = {
		id = mexico.59
		title = mexico.59.t
		desc= mexico.59.d
		picture = GFX_report_event_royal_blockade
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = { #Dont Confront Spain
			name = mexico.59.a
			ai_chance = { 
				base = 80 
			}
			hidden_effect = { SPR = { country_event = { id = mexico.60 days = 3 } } }
		}
		option = { #Confront Spain
			name = mexico.59.b
			ai_chance = { 
				base = 20 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			custom_effect_tooltip = mexico_civil_war_59
			SPR = {
				add_opinion_modifier = {
					target = USA
					modifier = large_decrease
				}
			}
			MEX = { country_event = { id = mexico.74 days = 3 } }
			hidden_effect = { SPR = { country_event = { id = mexico.61 days = 3 } } }
		}
	}
	#USA Does Not Confront Spain
	country_event = {
		id = mexico.60
		title = mexico.60.t
		desc= mexico.60.d
		picture = GFX_report_event_royal_blockade
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.60.a
			USA = {
				add_opinion_modifier = {
					target = SPR
					modifier = small_decrease
				}
			}
			MEC = { country_event = { id = mexico.74 } }
		}
	}
	#USA Confronts Spain
	country_event = {
		id = mexico.61
		title = mexico.61.t
		desc= mexico.61.d
		picture = GFX_report_event_royal_blockade
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.61.a
			ai_chance = { 
				base = 75 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			if = {
				limit = { has_government = traditional_conservatism }
				add_popularity = { ideology = traditional_conservatism popularity = -0.075 }
			}
			if = {
				limit = { has_government = centrism }
				add_popularity = { ideology = centrism popularity = -0.075 }
			}
			USA = {
				add_opinion_modifier = {
					target = SPR
					modifier = medium_decrease
				}
			}
			hidden_effect = { news_event = { id = mexico.62 days = 3 } }
		}
		option = { #Path Not Used/Created Yet
			name = mexico.61.b
			trigger = { always = no }
			ai_chance = { 
				base = 25 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			custom_effect_tooltip = mexico_civil_war_59
			USA = {
				add_opinion_modifier = {
					target = SPR
					modifier = large_decrease
				}
			}
		}
	}
	#Spain Apologizes for Monroe Doctrine Violation
	news_event = {
		id = mexico.62
		title = mexico.62.t
		desc= mexico.62.d
		major = yes
		show_major = {
			OR = {
				TAG = USA
				TAG = SPR
				is_subject_of = USA
				is_subject_of = SPR
				TAG = MEX
				TAG = MEC
				TAG = FRA
				TAG = ENG
				TAG = HOL
				TAG = MAY
				TAG = DOM
				TAG = HAI
				TAG = GUA
				TAG = ELS
				TAG = HON
				TAG = NIC
				TAG = COS
				TAG = COL
				TAG = VEN
				TAG = ECU
				TAG = PRU
				TAG = PRR
				TAG = BOL
				TAG = CHL
				TAG = BUE
				TAG = URG
				TAG = ARG
				TAG = PAR
				TAG = BRA
			}
		}
		fire_only_once = no
		is_triggered_only = yes
		
		option = {
			name = mexico.62.a
			trigger = { TAG = USA }
		}
		option = {
			name = mexico.62.b
			trigger = { TAG = SPR }
		}
		option = {
			name = mexico.62.c
			trigger = { is_subject_of = SPR }
		}
		option = {
			name = mexico.62.e
			trigger = { TAG = MEX }
		}
		option = {
			name = mexico.62.f
			trigger = { TAG = MEC }
		}
		option = {
			name = mexico.62.g
			trigger = { 
				OR = {
					TAG = FRA
					TAG = ENG
					TAG = HOL
				}
			}
		}
		option = {
			name = mexico.62.h
			trigger = { 
				NOT = { 
					TAG = USA
					TAG = SPR
					TAG = MEX
					TAG = MEC
					TAG = FRA
					TAG = ENG
					TAG = HOL
					is_subject_of = SPR
				}
			}
		}
	}
	#Volunteers Evade US Coast Guard
	country_event = {
		id = mexico.63
		title = mexico.63.t
		desc= mexico.63.d
		
		is_triggered_only = yes
		
		immediate = { 
			hidden_effect = { 
				MEC = { 
					if = { 
						limit = { NOT = { has_tech = tech_infantry_colonial_marines } }
						set_technology = {
							tech_infantry_colonial_marines = 1
							popup = yes
						}
					}
				}
			}
		}
		
		option = { 
			name = mexico.63.a
			trigger = { TAG = MEC }
			add_war_support = 0.075
			army_experience = 25
			add_manpower = 6000
			set_province_controller = 12810
			hidden_effect = {
				division_template = {
					name = "Spanish Volunteers"
					priority = 1
					regiments = {
						early_marine = { x = 0 y = 0 }
						early_marine = { x = 0 y = 1 }
						early_marine = { x = 1 y = 0 }
						early_marine = { x = 1 y = 1 }
					}
					is_locked = yes
				}
				447 = {
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
				}
			}
		}
		option = { 
			name = mexico.63.b
			trigger = { TAG = SPR }
			add_war_support = 0.025
		}
	}
	#Request US to Allow Spanish Volunteers
	country_event = {
		id = mexico.64
		title = mexico.64.t
		desc= mexico.64.d
		
		is_triggered_only = yes
		
		#option = { #Escalate and prevent volunteers?
		#	name = mexico.64.a
		#	ai_chance = { 
		#		base = 0 
		#	}
		#	hidden_effect = {
		#		MEC = { country_event = { id = mexico.67 days = 3 } }
		#		SPR = { country_event = { id = mexico.67 days = 3 } }
		#		MEX = { country_event = { id = mexico.67 days = 3 } }
		#	}
		#}
		option = { #Outrage and Tension Increase
			name = mexico.64.b
			ai_chance = { 
				base = 100 
			}
			hidden_effect = {
				MEC = { country_event = { id = mexico.65 days = 3 } }
				SPR = { country_event = { id = mexico.65 days = 3 } }
				MEX = { country_event = { id = mexico.65 days = 3 } }
				MEC = { country_event = { id = mexico.66 days = 9 } }
				SPR = { country_event = { id = mexico.66 days = 9 } }
			}
		}
	}
	#USA Sanctions the Volunteers
	country_event = {
		id = mexico.65
		title = mexico.65.t
		desc= mexico.65.d
		
		is_triggered_only = yes
		
		option = { #Uh oh!
			name = mexico.65.a
			trigger = { TAG = MEX }
		}
		option = { #Hurray!
			name = mexico.65.b
			trigger = { TAG = MEC }
		}
		option = { #Excellent
			name = mexico.65.c
			trigger = { TAG = SPR }
		}
	}
	#Sanctioned Volunteers Arrive
	country_event = {
		id = mexico.66
		title = mexico.66.t
		desc= mexico.66.d
		
		is_triggered_only = yes
		
		immediate = { 
			hidden_effect = { 
				MEC = { 
					if = { 
						limit = { NOT = { has_tech = tech_infantry_colonial_marines } }
						set_technology = {
							tech_infantry_colonial_marines = 1
							popup = yes
						}
					}
				}
			}
		}
			
		
		option = { 
			name = mexico.66.a
			trigger = { TAG = MEC }
			add_war_support = 0.075
			army_experience = 25
			add_manpower = 6000
			set_province_controller = 12810
			hidden_effect = {
				division_template = {
					name = "Spanish Volunteers"
					priority = 1
					regiments = {
						early_marine = { x = 0 y = 0 }
						early_marine = { x = 0 y = 1 }
						early_marine = { x = 1 y = 0 }
						early_marine = { x = 1 y = 1 }
					}
					is_locked = yes
				}
				447 = {
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
					create_unit = {
						division = "name = \"Spanish Volunteers\" division_template = \"Spanish Volunteers\" start_experience_factor = 1 start_equipment_factor = 1" 
						owner = MEC
						prioritize_location = 12810
					}
				}
			}
		}
		option = { 
			name = mexico.66.b
			trigger = { TAG = SPR }
			add_war_support = 0.025
		}
	}
	#USA Dont Sanction the Volunteers
	country_event = {
		id = mexico.67
		title = mexico.67.t
		desc= mexico.67.d
		
		is_triggered_only = yes
		
		option = { #Viva La America!
			name = mexico.67.a
			trigger = { TAG = MEX }
		}
		option = { #Damn!
			name = mexico.67.b
			ai_chance = { 
				base = 75 
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			trigger = { 
				OR = {
					TAG = MEC 
					TAG = SPR
				}
			}
		}
		option = { #Secretly send them anyway
			name = mexico.67.c
			trigger = { always = no }
			ai_chance = { 
				base = 25 
			}
		}
	}
	
#----------------------------------------------------
#Reform War Consv ask for French Monarchy
#----------------------------------------------------
	country_event = { #Meet with France
		id = mexico.68
		title = mexico.68.t
		desc = {
			text = mexico.68.d
			trigger = { FRA = { NOT = { has_country_leader = { name = "Eugénie I" ruling_only = yes } } } }
		}
		desc = {
			text = mexico.68.e
			trigger = { FRA = { has_country_leader = { name = "Eugénie I" ruling_only = yes } } }
		}
	
		fire_only_once = yes
		is_triggered_only = yes
		
		option = { #No
			name = mexico.68.a
			ai_chance = { 
				base = 90
				modifier = {
					add = -85
					FRA = { has_country_leader = { name = "Eugénie I" ruling_only = yes } }
				}
			}
			hidden_effect = { MEC = { country_event = { id = mexico.69 days = 7 } } }
		}
		option = { #Yes
			name = mexico.68.b
			ai_chance = { 
				base = 10 
				modifier = {
					add = 85
					FRA = { has_country_leader = { name = "Eugénie I" ruling_only = yes } }
				}
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			hidden_effect = { MEC = { set_country_flag = MEC_france_accepts_monarch_choice_flag } }
			hidden_effect = { MEC = { country_event = { id = mexico.70 days = 7 } } }
		}
	}
	country_event = { #No - But I'll try to convince my husband
		id = mexico.69
		title = mexico.69.t
		desc= mexico.69.d
	
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.69.a
		}
	}
	country_event = { #Yes - But we must try to find someone
		id = mexico.70
		title = mexico.70.t
		desc= mexico.70.d
	
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.70.a
			hidden_effect = { MEC = { country_event = { id = mexico.72 days = 90 } } }
			add_stability = 0.07
			add_war_support = 0.1
		}
	}
	country_event = { #Empress of France is in Charge now - But we must try to find someone
		id = mexico.71
		title = mexico.71.t
		desc= mexico.71.d
		
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.71.a
			hidden_effect = { MEC = { country_event = { id = mexico.72 days = 60 } } }
			add_stability = 0.07
			add_war_support = 0.1
		}
	}
	country_event = { #Maximillian is found!
		id = mexico.72
		title = mexico.72.t
		desc= mexico.72.d
	
		fire_only_once = yes
		is_triggered_only = yes
		
		option = {
			name = mexico.72.a
			hidden_effect = { MEC = { clr_country_flag = MEC_france_accepts_monarch_choice_flag } }
			set_cosmetic_tag = MEC_monarchy
			add_stability = 0.15
		}
	}
	
	
#----------------------------------------------------
#Reform War Consv ask for Spanish Monarchy
#----------------------------------------------------	
	country_event = {
		id = mexico.73
		title = mexico.73.t
		desc = mexico.73.d

		fire_only_once = yes
		is_triggered_only = yes

		option = { #No
			name = mexico.73.a
			ai_chance = { 
				base = 0
				modifier = {
					factor = 0
					is_historical_focus_on = yes
				}
			}
			hidden_effect = { MEC = { country_event = { id = mexico.75 days = 7 } } }
		}
		option = { #Yes
			name = mexico.73.b
			ai_chance = { 
				base = 100 
			}
			hidden_effect = {
				USA = { 
					diplomatic_relation = {
						country = MEX
						relation = guarantee
						active = no
					}
				}
			}
			hidden_effect = { MEC = { set_country_flag = autonomy_hispanic_crown_union_flag } }
			if = {
				limit = { country_exists = SPR }
				SPR = {
					hidden_effect = { MEC = { store_current_ideologies = yes } }
					set_autonomy = {
						target = MEC
						autonomy_state = autonomy_hispanic_crown_union
						freedom_level = 0.80
						end_wars = no
						end_civil_wars = no
					}
					hidden_effect = { MEC = { load_prevous_ideologies = yes } }
				}
			}
			else = { 
				hidden_effect = { MEC = { store_current_ideologies = yes } }
				set_autonomy = {
					target = MEC
					autonomy_state = autonomy_puppet
					freedom_level = 0.80
					end_wars = no
					end_civil_wars = no
				}
				hidden_effect = { MEC = { load_prevous_ideologies = yes } }
			}
			news_event = { id = mexico.77 days = 3 }
			hidden_effect = { 
				USA = { country_event = { id = mexico.78 days = 5 } } 
				MEC = { country_event = { id = mexico.76 days = 7 } } 
				MEX = { country_event = { id = mexico.76 days = 7 } }
				SPR = { country_event = { id = mexico.76 days = 7 } }
			}
		}
	}

	#Mexico is notified that USA Discovered Spanish Troops
	country_event = {
		id = mexico.74
		title = mexico.74.t
		desc= mexico.74.d
		
		is_triggered_only = yes
		
		option = { #Viva La America!
			name = mexico.74.a
			trigger = { TAG = MEX }
			add_war_support = 0.05
		}
		option = { #Damn!
			name = mexico.74.b
			trigger = { TAG = MEC }
			add_war_support = -0.05
		}
	}

	country_event = { #No 
		id = mexico.75
		title = mexico.75.t
		desc= mexico.75.d
	
		fire_only_once = no
		is_triggered_only = yes
		
		option = {
			name = mexico.75.a
		}
	}
	country_event = { #Yes 
		id = mexico.76
		title = mexico.76.t
		desc= mexico.76.d
	
		fire_only_once = no
		is_triggered_only = yes
		
		option = {
			name = mexico.76.a
			trigger = { TAG = SPR }
			add_stability = 0.10
			add_war_support = 0.15
			MEC = { 
				add_to_war = { 
					targeted_alliance = SPR 
					enemy = MEX 
					hostility_reason = asked_to_join
				}
			}
			USA = { custom_effect_tooltip = mexico_civil_war_usa_stops_guarantee_tooltip }
			hidden_effect = {
					add_ai_strategy = {
						type = front_control
					
						#you can define a target in following ways. you can define more than one
						
						tag = MEX 							# target against a specific country
						state = 477 						# target on a state
						strategic_region = 123				# target on a strategic region
						#area = caribbean					# target on a specific ai area
						country_trigger = { has_global_flag = MEX_MEC_CIVIL_WAR } 	# a trigger to check agaisnt a specific country. scope is enemy country from scope is our country
						#state_trigger = { always = no } 	# a trigger to check agaisnt a state. scope is state. from scope is enemy country from.from scope is our country
						
						ratio = 0.0 						# the strategy is enabled only if ratio of the front covered by this strat's targets greater than this ratio
						
						priority = 200 						# default 0, higher prio strats will override lower
						ordertype = invasion 				# front or invasion. if set this strategy will only apply to that specific order type
						execution_type = balanced 			# one of careful balanced rush rush_weak. if set will override the execution type of front (only for front orders)
						execute_order = yes 				# yes or no. if set will override execute or not decision of front
						manual_attack = yes 				# default yes. if no ai will not do manual pokes at enemy (only for front orders)
					}
			}
		}
		
		option = {
			name = mexico.76.b
			trigger = { TAG = MEX }
			add_stability = -0.05
			USA = { custom_effect_tooltip = mexico_civil_war_usa_stops_guarantee_tooltip }
		}
		
		option = {
			name = mexico.76.c
			trigger = { TAG = MEC }
			set_cosmetic_tag = MEC_SPR_crown_union
			add_stability = 0.15
			add_war_support = 0.1
			USA = { custom_effect_tooltip = mexico_civil_war_usa_stops_guarantee_tooltip }
			hidden_effect = { set_variable = { most_favoured_country = SPR.id } }
		}
	}
	
	#Spain Announces Intervention in Mexican Civil War
	news_event = {
		id = mexico.77
		title = mexico.77.t
		desc= mexico.77.d
		major = yes
		show_major = {
			OR = {
				TAG = PAP
				TAG = USA
				TAG = FRA
				TAG = ENG
				TAG = SPR
				is_subject_of = USA
				is_subject_of = SPR
				TAG = MEX
				TAG = MEC
				TAG = FRA
				TAG = ENG
				TAG = HOL
				TAG = MAY
				TAG = DOM
				TAG = HAI
				TAG = GUA
				TAG = ELS
				TAG = HON
				TAG = NIC
				TAG = COS
				TAG = COL
				TAG = VEN
				TAG = ECU
				TAG = PRU
				TAG = PRR
				TAG = BOL
				TAG = CHL
				TAG = BUE
				TAG = URG
				TAG = ARG
				TAG = PAR
				TAG = BRA
			}
		}
		fire_only_once = no
		is_triggered_only = yes
		
		option = {
			name = mexico.77.a
			trigger = { TAG = USA }
			hidden_effect = { USA = { set_variable = { rival_country = SPR.id } } }
		}
		option = {
			name = mexico.77.b
			trigger = { TAG = SPR }
			add_opinion_modifier = {
				target = PAP
				modifier = PAP_catholic_union
			}
			add_opinion_modifier = {
				target = MEC
				modifier = PAP_catholic_union
			}
			hidden_effect = { SPR = { set_variable = { rival_country = USA.id } } }
		}
		option = {
			name = mexico.77.c
			trigger = { is_subject_of = SPR }
		}
		option = {
			name = mexico.77.e
			trigger = { TAG = MEX }
		}
		option = {
			name = mexico.77.f
			trigger = { TAG = MEC }
			add_opinion_modifier = {
				target = SPR
				modifier = PAP_catholic_union
			}
			add_opinion_modifier = {
				target = PAP
				modifier = PAP_catholic_union
			}
		}
		option = {
			name = mexico.77.g
			trigger = { 
				OR = {
					TAG = FRA
					TAG = ENG
					TAG = HOL
				}
			}
		}
		option = {
			name = mexico.77.h
			trigger = { 
				NOT = { 
					TAG = PAP
					TAG = USA
					TAG = SPR
					TAG = MEX
					TAG = MEC
					TAG = FRA
					TAG = ENG
					TAG = HOL
					is_subject_of = SPR
				}
			}
		}
		option = {
			name = mexico.77.i
			trigger = { 
				NOT = { 
					TAG = PAP
					TAG = MAY
					TAG = BRA
					TAG = USA
					TAG = SPR
					TAG = MEX
					TAG = MEC
					TAG = FRA
					TAG = ENG
					TAG = HOL
					is_subject_of = SPR
					is_subject_of = USA
				}
				has_government = centrism
			}
		}
		option = {
			name = mexico.77.j
			trigger = { 
				NOT = { 
					TAG = PAP
					TAG = MAY
					TAG = BRA
					TAG = USA
					TAG = SPR
					TAG = MEX
					TAG = MEC
					TAG = FRA
					TAG = ENG
					TAG = HOL
					is_subject_of = SPR
					is_subject_of = USA
				}
				has_government = traditional_conservatism
			}
		}
		option = {
			name = mexico.77.k
			trigger = { TAG = PAP }
			add_opinion_modifier = {
				target = SPR
				modifier = PAP_catholic_union
			}
			add_opinion_modifier = {
				target = MEC
				modifier = PAP_catholic_union
			}
		}
	}
	
	country_event = { #Yes 
		id = mexico.78
		title = mexico.78.t
		desc= mexico.78.d
	
		fire_only_once = no
		is_triggered_only = yes
		
		option = {
			name = mexico.78.a
			trigger = { TAG = USA }
			USA = { custom_effect_tooltip = mexico_civil_war_usa_stops_guarantee_tooltip }
		}
	}

	country_event = { #Mexico Falls
		id = mexico.79
		title = mexico.79.t
		desc= mexico.79.d
	
		fire_only_once = yes
		is_triggered_only = yes
		
		immediate = { 
			hidden_effect = {
				MEC = {
					remove_opinion_modifier = {
						target = PAP
						modifier = PAP_catholic_union
					}
					remove_opinion_modifier = {
						target = SPR
						modifier = PAP_catholic_union
					}
				}
			}
		}
		
		option = {
			name = mexico.79.a
			MEC = { become_exiled_in = { target = SPR legitimacy = 50 } }
			every_country = {
				limit = { OR = { TAG = SPR is_subject_of = SPR } }
				white_peace = MEX
			}
			news_event = { id = mexico.80 }
		}
	}
	
	news_event = { #Mexico Falls
		id = mexico.80
		title = mexico.80.t
		desc= mexico.80.d
		major = yes
		show_major = {
			OR = {
				TAG = PAP
				TAG = USA
				TAG = FRA
				TAG = ENG
				TAG = SPR
				is_subject_of = USA
				is_subject_of = SPR
				TAG = MEX
				TAG = MEC
				TAG = FRA
				TAG = ENG
				TAG = HOL
				TAG = MAY
				TAG = DOM
				TAG = HAI
				TAG = GUA
				TAG = ELS
				TAG = HON
				TAG = NIC
				TAG = COS
				TAG = COL
				TAG = VEN
				TAG = ECU
				TAG = PRU
				TAG = PRR
				TAG = BOL
				TAG = CHL
				TAG = BUE
				TAG = URG
				TAG = ARG
				TAG = PAR
				TAG = BRA
			}
		}
	
		fire_only_once = no
		is_triggered_only = yes
		
		option = {
			name = mexico.80.a
			trigger = { 
				NOT = { 
					TAG = PAP
					TAG = MAY
					TAG = BRA
					TAG = USA
					TAG = SPR
					TAG = MEC
					TAG = FRA
					TAG = ENG
					TAG = HOL
					is_subject_of = SPR
					is_subject_of = USA
				}
				OR = {
					has_government = centrism
					TAG = MEX
				}
			}
		}
		
		option = {
			name = mexico.80.b
			trigger = { 
				OR = {
					TAG = USA 
					is_subject_of = USA
				}
			}
			if = { 
				limit = { TAG = USA } 
				give_guarantee = MEX
			}
		}
		
		option = {
			name = mexico.80.c
			trigger = { 
				OR = {
					TAG = SPR 
					is_subject_of = SPR
				}
			}
			if = { 
				limit = { TAG = SPR }
				remove_opinion_modifier = {
					target = PAP
					modifier = PAP_catholic_union
				}
				remove_opinion_modifier = {
					target = MEC
					modifier = PAP_catholic_union
				}
			}
		}
		
		option = {
			name = mexico.80.e
			trigger = { TAG = PAP }
			remove_opinion_modifier = {
				target = SPR
				modifier = PAP_catholic_union
			}
			remove_opinion_modifier = {
				target = MEC
				modifier = PAP_catholic_union
			}
		}
		
		option = {
			name = mexico.80.f
			trigger = { 
				NOT = {
					TAG = MEX 
					TAG = USA
					is_subject_of = USA
					TAG = SPR
					is_subject_of = SPR
					TAG = PAP
				}
			}
		}
	}
