foreign_politics = {
	MEX_join_mexican_faction = {

		icon = generic_civil_support

		fire_only_once = yes

		visible = {
			OR = {
				has_country_flag = received_MEX_synarchist_influence
				has_country_flag = received_MEX_bolivarian_agitation
			}
		}
		available = {
			NOT = {
				has_war_with = MEX
			}
			is_in_faction = no
			OR = {
				AND = {
					has_government = fascism
					MEX = {
						is_in_faction = yes
						has_government = fascism
					}
				}
				AND = {
					has_government = communism
					MEX = {
						is_in_faction = yes
						has_government = communism
					}
				}
			}
		}		
		complete_effect = {
			MEX = {
				country_event = {
					id = generic.2
				}				
			}
		}
		ai_will_do = {
			factor = 10
		}		
	}
}
# Category for Mexican military issues 
MEX_category_military_issues = {

	# Mission to deal with Cedillo before he rebels (historic date was January 1939)

	MEX_mission_cedillos_rebellion = {

		icon = generic_civil_support

		allowed = {
			original_tag = MEX
		}
		
		available = {
			OR = {
				has_completed_focus = MEX_focus_support_general_cedillo
				has_completed_focus = MEX_focus_arrest_general_cedillo
			}
		}

		days_mission_timeout = 150
		#days_remove = 1

		activation = {
			AND = {
				OR = {
					date>1936.1.1
					is_ai = no
				}
				OR = {
					has_idea = MEX_cedillo_tension
					has_idea = MEX_cedillo_tension_2
					has_idea = MEX_cedillo_tension_3
					has_idea = MEX_cedillo_tension_4
				}
			}
		}

		fixed_random_seed = no

		fire_only_once = no

		is_good = no

		timeout_effect = {
			if = {
				limit = {
					has_idea = MEX_cedillo_tension_4
				}

				remove_ideas = MEX_cedillo_tension_4

				country_event = {
					id = mexico.1
				}
			}
			else_if = {
				limit = {
					has_idea = MEX_cedillo_tension_3
				}
				swap_ideas = {
					remove_idea = MEX_cedillo_tension_3
					add_idea = MEX_cedillo_tension_4
				}
			}
			else_if = {
				limit = {
					has_idea = MEX_cedillo_tension_2
				}
				swap_ideas = {
					remove_idea = MEX_cedillo_tension_2
					add_idea = MEX_cedillo_tension_3
				}
			}
			else_if = {
				limit = {
					has_idea = MEX_cedillo_tension
				}
				swap_ideas = {
					remove_idea = MEX_cedillo_tension
					add_idea = MEX_cedillo_tension_2
				}
			}
		}
	}

	# Second Cristiada

	MEX_mission_second_cristiada = {

		icon = generic_civil_support

		available = {
			OR = {
				NOT = { has_idea = MEX_church_power_1 }
				has_stability > 0.6
				has_government = democratic
				has_global_flag = flag_second_mexican_civil_war
				has_civil_war = yes
			}
		}

		days_mission_timeout = 150

		activation = {
			has_idea = MEX_church_power_1

			has_stability < 0.6

			NOT = { has_global_flag = flag_second_mexican_civil_war } # Second Cristiada / Second Mexican Revolution are mutually exclusive

			NOT = { has_government = democratic } # Government has a genuine commitment to reform

			has_civil_war = no
			
			OR = { # Domestic violence or antagonised world powers
				has_completed_focus = MEX_focus_triumph_over_the_cristeros
				has_completed_focus = MEX_focus_the_red_shirts
				has_completed_focus = MEX_focus_international_proletarianism
				has_completed_focus = MEX_focus_ejido_worker_militias
				has_completed_focus = MEX_focus_bolivarian_alliance
			}
		}

		allowed = {
			original_tag = MEX
		}

		fixed_random_seed = no

		fire_only_once = no

		is_good = no

		timeout_effect = {
			set_global_flag = flag_second_mexican_civil_war
			country_event = {
				id = mexico.28
			}
		}
	}

	# Dummy decision to warn of Second Cristiada

	MEX_mission_second_cristiada_dummy = {

		icon = generic_civil_support

		available = {
			has_idea = MEX_church_power_1

			has_stability < 0.6

			NOT = { has_global_flag = flag_second_mexican_civil_war } # Second Cristiada / Second Mexican Revolution are mutually exclusive

			has_civil_war = no
			
			NOT = { has_government = democratic } # Government has a genuine commitment to reform
			
			OR = { # Domestic violence or antagonised world powers
				has_completed_focus = MEX_focus_triumph_over_the_cristeros
				has_completed_focus = MEX_focus_the_red_shirts
				has_completed_focus = MEX_focus_international_proletarianism
				has_completed_focus = MEX_focus_ejido_worker_militias
				has_completed_focus = MEX_focus_bolivarian_alliance
			}
		}

		days_remove = 150

		allowed = {
			original_tag = MEX
		}

		visible = {
			NOT = { has_global_flag = flag_second_mexican_civil_war }
			OR = {
				NOT = {
					OR = {
						has_completed_focus = MEX_focus_triumph_over_the_cristeros
						has_completed_focus = MEX_focus_the_red_shirts
						has_completed_focus = MEX_focus_international_proletarianism
						has_completed_focus = MEX_focus_ejido_worker_militias
						has_completed_focus = MEX_focus_bolivarian_alliance
					}
				}
				has_stability > 0.6
				has_idea = MEX_church_power_2
				has_idea = MEX_church_power_3
				has_idea = MEX_church_power_4
				has_idea = MEX_church_power_5
			}
			has_civil_war = no
		}

		fixed_random_seed = no

		fire_only_once = no

		is_good = no

		remove_effect = {
			set_global_flag = flag_second_mexican_civil_war
			country_event = {
				id = mexico.28
			}
		}
	}

	# Second Revolution by anti-Church and far-left groups

	MEX_mission_second_revolution = {

		icon = generic_civil_support

		available = {
			OR = {
				NOT = { has_idea = MEX_church_power_5 }
				has_stability > 0.6
				has_government = communism
				has_global_flag = flag_second_mexican_civil_war
				has_civil_war = yes
			}
		}

		days_mission_timeout = 150

		activation = {
			has_idea = MEX_church_power_5

			has_stability < 0.6

			NOT = { has_global_flag = flag_second_mexican_civil_war } # Second Cristiada / Second Mexican Revolution are mutually exclusive

			has_civil_war = no
			
			NOT = { has_government = communism } # Pro-Church communism (liberation theology?) in this context is ahistorical, but if the player pulls it off kudos

			OR = { # Dissent from the people or elite
				has_completed_focus = MEX_focus_purge_the_bureaucracy
				has_completed_focus = MEX_focus_womens_suffrage
				has_completed_focus = MEX_focus_end_land_reform
				has_completed_focus = MEX_focus_royal_dutch_shell
				has_completed_focus = MEX_focus_reform_the_cristero_guard
			}
		}

		allowed = {
			original_tag = MEX
		}

		fixed_random_seed = no

		fire_only_once = no

		is_good = no

		timeout_effect = {
			set_global_flag = flag_second_mexican_civil_war
			country_event = {
				id = mexico.30
			}
		}
	}

	# Dummy decision to warn of Second Revolution

	MEX_mission_second_revolution_dummy = {

		icon = generic_civil_support

		available = {
			has_idea = MEX_church_power_5

			has_stability < 0.6

			NOT = { has_global_flag = flag_second_mexican_civil_war } # Second Cristiada / Second Mexican Revolution are mutually exclusive

			has_civil_war = no
			
			NOT = { has_government = communism } # Pro-Church communism (liberation theology?) in this context is ahistorical, but if the player pulls it off kudos

			OR = { # Dissent from the people or elite
				has_completed_focus = MEX_focus_purge_the_bureaucracy
				has_completed_focus = MEX_focus_womens_suffrage
				has_completed_focus = MEX_focus_end_land_reform
				has_completed_focus = MEX_focus_royal_dutch_shell
				has_completed_focus = MEX_focus_reform_the_cristero_guard
			}
		}

		days_remove = 150

		allowed = {
			original_tag = MEX
		}

		visible = {
			NOT = { has_global_flag = flag_second_mexican_civil_war }
			OR = {
				NOT = {
					OR = {
						has_completed_focus = MEX_focus_purge_the_bureaucracy
						has_completed_focus = MEX_focus_womens_suffrage
						has_completed_focus = MEX_focus_end_land_reform
						has_completed_focus = MEX_focus_royal_dutch_shell
						has_completed_focus = MEX_focus_reform_the_cristero_guard
					}
				}
				has_stability > 0.6
				has_idea = MEX_church_power_1
				has_idea = MEX_church_power_2
				has_idea = MEX_church_power_3
				has_idea = MEX_church_power_4
			}
			has_civil_war = no
		}

		fixed_random_seed = no

		fire_only_once = no

		is_good = no

		remove_effect = {
			set_global_flag = flag_second_mexican_civil_war
			country_event = {
				id = mexico.30
			}
		}
	}

	# Seizure of the Panama Canal if Mexico controls the rest of Panama
	# Can trigger an American declaration of war
	
	MEX_decision_operation_just_cause = { # Bahahaha
	
		icon = generic_nationalism

		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_seize_the_panama_canal
			NOT = {
				has_war_with = USA
			}
			NOT = {
				is_in_faction_with = USA
			}
			NOT = {
				controls_state = 685
			}
			USA = {
				owns_state = 685
			}
		}
		
		available = {
			NOT = {
				has_non_aggression_pact_with = USA
			}
			NOT = {
				has_war_with = USA
			}
			NOT = {
				is_in_faction_with = USA
			}
			controls_state = 304
			OR = {
				owns_state = 304
				"PAN" = {
					owns_state = 304
					has_war_with = MEX
				}
			}
			USA = {
				owns_state = 685
			}
		}

		cost = 25
		
		fire_only_once = yes

		complete_effect = {
			if = {
				limit = {
					304 = {
						is_owned_by = "PAN"
						is_controlled_by = ROOT
					}
					ROOT = {
						has_war_with = "PAN"
					}
				}
				annex_country = { target = "PAN" }
			}
			add_named_threat = {
				threat = 5
				name = threat_mexico_attacks_panama_canal
			}
			start_border_war = {
				change_state_after_war = no
				attacker = {
					state = 304
					num_provinces = 2
					on_win = mexico.40
					on_lose = mexico.42
					#on_cancel = 
				}
				
				defender = {
					state = 685
					num_provinces = 1
					on_win = mexico.41
					on_lose = mexico.43
					#on_cancel = 
				}
			}

			add_opinion_modifier = {
				target = USA
				modifier = mexico_attack_on_panama_canal
			}
			
			USA = {
				add_opinion_modifier = {
					target = ROOT
					modifier = mexico_attack_on_panama_canal
				}
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	# Decision to send support to the communists in the Spanish Civil War

	MEX_decision_support_spanish_loyalists = {
	
		icon = generic_nationalism
		
		fire_only_once = no

		fixed_random_seed = no
		
		days_remove = 7

		allowed = {
			original_tag = MEX
		}

		visible = {
			is_subject = no

			has_completed_focus = MEX_focus_spanish_civil_war_refugees

			NOT = { has_completed_focus = MEX_focus_falangist_veterans }

			FROM = {
				OR = {
					has_government = communism
					has_government = democratic
				}
				has_civil_war = yes
				NOT = { has_war_with = ROOT }
			}
		}

		target_root_trigger = {
			is_subject = no

			has_completed_focus = MEX_focus_spanish_civil_war_refugees

			NOT = { has_completed_focus = MEX_focus_falangist_veterans }
		}

		targets = { SPR SPD }
		targets_dynamic = yes

		target_trigger = {
			FROM = {
				original_tag = SPR
				OR = {
					has_government = communism
					has_government = democratic
				}
				has_civil_war = yes
			}
		}
		
		available = {
			has_completed_focus = MEX_focus_support_spains_loyalists

			has_equipment = {
				convoy > 2
			}
			
			has_equipment = {
				infantry_equipment > 249
			}
			
			any_other_country = {
				original_tag = SPR
				has_civil_war = yes
			}
			
			hidden_trigger = {
				NOT = { has_global_flag = scw_over }
			}
		}

		modifier = {
			
		}
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = convoy_1
				amount = -3
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}			
		}

		remove_effect = {
			random_list = {
				60 = { # Shipment gets through
					army_experience = 20
					add_equipment_to_stockpile = {
						type = convoy_1
						amount = 3
					}
					FROM = {
						country_event = { id = mexico.50 }
					}
				}
				40 = { # Sunk by Italians
					navy_experience = 25
					country_event = { id = mexico.51 }
				}
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	# Decision to send support to the fascists in the Spanish Civil War

	MEX_decision_support_spanish_fascists = {
	
		icon = generic_nationalism
		
		fire_only_once = no
		
		fixed_random_seed = no

		days_remove = 7

		allowed = {
			original_tag = MEX
		}

		visible = {
			is_subject = no

			has_completed_focus = MEX_focus_spanish_civil_war_refugees

			NOT = { has_completed_focus = MEX_focus_support_spains_loyalists }

			FROM = {
				OR = {
					has_government = fascism
					has_country_leader = {
						ruling_only = yes
						character = SPA_francisco_franco
					}
				}
				has_civil_war = yes
				NOT = { has_war_with = ROOT }
			}
		}

		target_root_trigger = {
			is_subject = no

			has_completed_focus = MEX_focus_spanish_civil_war_refugees

			NOT = { has_completed_focus = MEX_focus_support_spains_loyalists }
		}
		
		targets = { SPR }
		targets_dynamic = yes

		target_trigger = {
			FROM = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_country_leader = {
						ruling_only = yes
						character = SPA_francisco_franco
					}
				}
				has_civil_war = yes
			}
		}

		available = {
			has_completed_focus = MEX_focus_falangist_veterans

			has_equipment = {
				convoy > 2
			}
			
			has_equipment = {
				infantry_equipment > 249
			}
			
			any_other_country = {
				original_tag = SPR
				has_civil_war = yes
			}
			hidden_trigger = {
				NOT = { has_global_flag = scw_over }
			}
		}

		modifier = {
			
		}
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = convoy_1
				amount = -3
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = -250
			}			
		}

		remove_effect = {
			random_list = {
				60 = { # Shipment gets through
					army_experience = 20
					add_equipment_to_stockpile = {
						type = convoy_1
						amount = 3
					}
					FROM = {
						country_event = { id = mexico.50 }
					}
				}
				40 = { # Sunk by loyalists
					navy_experience = 25
					country_event = { id = mexico.51 }
				}
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}
	
	MEX_decision_interior_defence_plan = {
	
		icon = generic_operation
		
		available = {
			has_war_with = USA
		}
		
		visible = {
			has_completed_focus = MEX_focus_interior_defence_plan
		}
		
		ai_will_do = {
			factor = 1
		}
		
		fire_only_once = yes
		
		days_remove = 180
		
		targeted_modifier = {
			tag = USA
			attack_bonus_against = 0.15
			defense_bonus_against = 0.15
		}
	}

	MEX_decision_coastal_defence_plan = {
	
		icon = generic_operation
		
		available = {
			has_defensive_war = yes
		}
		
		visible = {
			has_completed_focus = MEX_focus_coastal_defence_plan
		}
		
		ai_will_do = {
			factor = 1
		}
		
		fire_only_once = yes
		
		days_remove = 180
		
		modifier = {
			army_core_attack_factor = 0.15
			army_core_defence_factor = 0.15
		}
	}

}

MEX_category_territorial_integration = {

	MEX_decision_integrate_guatamala = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			OR = {
				NOT = {
					313 = { is_core_of = ROOT }
				}
				GUA = {
					is_subject_of = ROOT
				}
			}
		}
		
		available = {
			OR = {
				controls_state = 313
				GUA = {
					is_subject_of = ROOT
				}
			}
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 50

		days_remove = 60

		cancel_if_not_visible = yes
		
		remove_effect = {
			annex_country = { target = GUA }

			add_state_core = 313

			hidden_effect = {
				remove_state_claim = 313
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	MEX_decision_integrate_honduras = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			OR = {
				NOT = {
					312 = { is_core_of = ROOT }
				}
				HON = {
					is_subject_of = ROOT
				}
			}
		}
		
		available = {
			OR = {
				controls_state = 312
				HON = {
					is_subject_of = ROOT
				}
			}
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 50

		days_remove = 60

		cancel_if_not_visible = yes
		
		remove_effect = {
			annex_country = { target = HON }

			add_state_core = 312

			hidden_effect = {
				remove_state_claim = 312
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	MEX_decision_integrate_el_salvador = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			OR = {
				NOT = {
					314 = { is_core_of = ROOT }
				}
				ELS = {
					is_subject_of = ROOT
				}
			}
		}
		
		available = {
			OR = {
				controls_state = 314
				ELS = {
					is_subject_of = ROOT
				}
			}
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 50

		days_remove = 60

		cancel_if_not_visible = yes
		
		remove_effect = {
			annex_country = { target = ELS }

			add_state_core = 314

			hidden_effect = {
				remove_state_claim = 314
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	MEX_decision_integrate_nicaragua = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			OR = {
				NOT = {
					317 = { is_core_of = ROOT }
				}
				NIC = {
					is_subject_of = ROOT
				}
			}
		}
		
		available = {
			OR = {
				controls_state = 317
				NIC = {
					is_subject_of = ROOT
				}
			}
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 50

		days_remove = 60

		cancel_if_not_visible = yes
		
		remove_effect = {
			annex_country = { target = NIC }

			add_state_core = 317

			hidden_effect = {
				remove_state_claim = 317
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	MEX_decision_integrate_costa_rica = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			OR = {
				NOT = {
					316 = { is_core_of = ROOT }
				}
				COS = {
					is_subject_of = ROOT
				}
			}
		}
		
		available = {
			OR = {
				controls_state = 316
				COS = {
					is_subject_of = ROOT
				}
			}
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 50

		days_remove = 60

		cancel_if_not_visible = yes
		
		remove_effect = {
			annex_country = { target = COS }
			
			add_state_core = 316

			hidden_effect = {
				remove_state_claim = 316
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	MEX_decision_integrate_panama = {
	
		icon = generic_nationalism

		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			OR = {
				NOT = {
					304 = { is_core_of = ROOT }
				}
				"PAN" = {
					is_subject_of = ROOT
				}
			}
		}
		
		available = {
			OR = {
				controls_state = 304
				"PAN" = {
					is_subject_of = ROOT
				}
			}
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 50

		days_remove = 60
		
		cancel_if_not_visible = yes

		remove_effect = {
			annex_country = { target = "PAN" }
			
			add_state_core = 304

			hidden_effect = {
				remove_state_claim = 304
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	MEX_decision_integrate_panama_canal = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			NOT = {
				685 = { is_core_of = ROOT }
			}
		}
		
		available = {
			controls_state = 685
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 25

		days_remove = 30
		
		remove_effect = {
			add_state_core = 685

			hidden_effect = {
				remove_state_claim = 685
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}

	MEX_decision_integrate_belize = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_unify_centroamerica
			OR = {
				NOT = {
					311 = { is_core_of = ROOT }
				}
				BLZ = {
					is_subject_of = ROOT
				}
			}
		}
		
		available = {
			OR = {
				controls_state = 311
				BLZ = {
					is_subject_of = ROOT
				}
			}
			has_completed_focus = MEX_focus_integrate_the_south
		}

		cost = 25

		days_remove = 30
		
		cancel_if_not_visible = yes

		remove_effect = {
			annex_country = { target = BLZ }
			
			add_state_core = 311

			311 = {
				set_state_name = "Belice"
			}

			hidden_effect = {
				remove_state_claim = 311
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}
	MEX_decision_integrate_cuba = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_liberate_the_caribbean
			NOT = {
				315 = { is_core_of = ROOT }
			}
		}
		
		available = {
			controls_state = 315
			has_completed_focus = MEX_focus_integrate_the_caribbean
		}

		cost = 25

		days_remove = 30
		
		remove_effect = {
			add_state_core = 315

			hidden_effect = {
				remove_state_claim = 315
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}
	MEX_decision_integrate_haiti = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_liberate_the_caribbean
			NOT = {
				318 = { is_core_of = ROOT }
			}
		}
		
		available = {
			controls_state = 318
			has_completed_focus = MEX_focus_integrate_the_caribbean
		}

		cost = 25

		days_remove = 30
		
		remove_effect = {
			add_state_core = 318

			hidden_effect = {
				remove_state_claim = 318
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}
	MEX_decision_integrate_the_dominican_republic = {
	
		icon = generic_nationalism
		
		allowed = {
			original_tag = MEX
		}

		visible = {
			has_completed_focus = MEX_focus_liberate_the_caribbean
			NOT = {
				319 = { is_core_of = ROOT }
			}
		}
		
		available = {
			controls_state = 319
			has_completed_focus = MEX_focus_integrate_the_caribbean
		}

		cost = 25

		days_remove = 30
		
		remove_effect = {
			add_state_core = 319

			hidden_effect = {
				remove_state_claim = 319
			}
		}
		
		ai_will_do = {
			factor = 1
		}
	}		
}

# Category related to the Catholic Church in Mexico

MEX_category_church_power = {

	MEX_decision_transfer_lands_to_church = {
	
		icon = generic_operation
		
		fire_only_once = no
		
		days_remove = 90
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			has_completed_focus = MEX_focus_antidisestablishmentarianism
			NOT = { has_idea = MEX_church_power_5 }

		}

		cost = 75
		
		complete_effect = {
			MEX_increase_church_power = yes		
		}
		
		ai_will_do = {
			factor = 0
			modifier = {
				add = 10
				has_active_mission = MEX_mission_second_cristiada
				date > 1938.1.1
			}
		}
	}
	
	MEX_decision_nationalize_church_lands = {
	
		icon = generic_scorched_earth
		
		fire_only_once = no
		
		days_remove = 90
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			NOT = { has_idea = MEX_church_power_1 }
		}

		cost = 75
		
		complete_effect = {
			MEX_decrease_church_power = yes
		}

		ai_will_do = {
			factor = 0
			modifier = {
				add = 10
				has_active_mission = MEX_mission_second_revolution
				date > 1938.1.1
			}
		}
	}
	
	MEX_decision_pardon_cristero_fighter = {
	
		icon = generic_army_support
		
		fire_only_once = no
		
		days_remove = 30
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			has_war_support < 0.95
			has_completed_focus = MEX_focus_rewrite_the_constitution
			OR = {
				has_idea = MEX_church_power_4
				has_idea = MEX_church_power_5
			}
		}

		cost = 75
		
		remove_effect = {
			add_war_support = 0.02
			army_experience = 10
		}

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				has_war_support < 0.6
				date > 1940.1.1
			}
		}
	}
	
	MEX_decision_assassinate_cristero_traitor = {
	
		icon = generic_prepare_civil_war
		
		fire_only_once = no
		
		days_remove = 30
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			has_war_support < 0.95
			OR = {
				has_idea = MEX_church_power_1
				has_idea = MEX_church_power_2
			}
		}

		cost = 75
		
		remove_effect = {
			add_war_support = 0.02
			army_experience = 10
		}

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				has_war_support < 0.6
				date > 1940.1.1
			}
		}
	}
	
	MEX_decision_attend_public_mass = {
	
		icon = generic_nationalism
		
		fire_only_once = no
		
		days_remove = 30
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			has_stability < 0.95
			has_completed_focus = MEX_focus_rewrite_the_constitution
			OR = {
				has_idea = MEX_church_power_4
				has_idea = MEX_church_power_5
			}
		}

		cost = 75
		
		remove_effect = {
			add_stability = 0.03
		}

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				has_stability < 0.6
				date > 1940.1.1
			}
		}
	}

	MEX_decision_prosecute_clergyman = {
	
		icon = oppression
		
		fire_only_once = no
		
		days_remove = 30
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			has_stability < 0.95
			OR = {
				has_idea = MEX_church_power_1
				has_idea = MEX_church_power_2
			}
		}

		cost = 75
		
		remove_effect = {
			add_stability = 0.03
		}

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				has_stability < 0.6
				date > 1940.1.1
			}
		}
	}
	
	MEX_decision_reconciliation_committee = {
	
		icon = generic_political_discourse
		
		fire_only_once = no
		
		days_remove = 90
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			has_war_support > 0.1
			has_stability < 0.95
			NOT = {
				OR = {
					has_idea = MEX_church_power_5
					has_idea = MEX_church_power_1 
				} 
			}
		}

		cost = 25
		
		remove_effect = {
			add_stability = 0.05
			add_war_support = -0.05
		}

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				has_stability < 0.6
			}
		}
	}

	MEX_decision_incite_tensions = {
	
		icon = generic_break_treaty
		
		fire_only_once = no
		
		days_remove = 90
		
		allowed = {
			original_tag = MEX
		}
		
		available = {
			has_stability > 0.1
			has_war_support < 0.95
			NOT = {
				OR = {
					has_idea = MEX_church_power_5
					has_idea = MEX_church_power_1 
				} 
			}
		}

		cost = 25
		
		remove_effect = {
			add_stability = -0.05
			add_war_support = 0.05
		}

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				has_stability > 0.66
				has_war_support < 0.5
				date > 1940.1.1
			}
		}
	}
}
MEX_category_hispanic_solidarity = {

	MEX_decision_invite_tag_to_the_hispanic_alliance = {
	
		icon = generic_political_discourse
		
		fire_only_once = no
		
		days_remove = 150

		allowed = {
			original_tag = MEX
		}
		
		visible = {
			is_faction_leader = yes
		}
		
		target_root_trigger = {
			OR = {
				has_completed_focus = MEX_focus_hispanic_alliance
				has_completed_focus = MEX_focus_bolivarian_alliance
			}
		}

		target_trigger = {
			FROM = {
				NOT = { is_in_faction_with = ROOT }
				capital_scope = {
					is_on_continent = south_america
				}
			}
        }

		available = {
			OR = {
				has_opinion = {
					target = FROM
					value > 49
				}
				FROM = {
					has_opinion = {
						target = ROOT
						value > 49
					}
				}
			}
			FROM = {
				is_in_faction = no
				is_subject = no
				has_rule = can_join_factions
			}
			if = {
				limit = {
					FROM = {
						original_tag = BRA
					}
				}
				has_completed_focus = MEX_focus_invite_brazil
			}
		}

		cost = 25
		
		complete_effect = {
			FROM = {
				country_event = {
					id = generic.5
				}				
			}
		}
		
		ai_will_do = {
			factor = 100
		}
	}
}
