####################################
# Mexico AI events 32900 - 32999 by Lothos
####################################
# Behavior Flags
#	MEXDDay		= Load DDay AI
################
# Minister of Security Section 32900 - 32909
#############################################
event = { # Andres F. Figueroa takes power
	id = 32900
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 36073 # Andres F. Figueroa
		NOT = { InCabinet = 36073 }
		OR = {
			manpower = 200
			AND = {
				NOT = { manpower = 200 }
				NOT = { minister = 36005 } # Francisco U. Benavides
			}
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 36073 }
		command = { type = dissent value = -1 }
	}
}
event = { # Francisco U. Benavides takes power
	id = 32901
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 36005 # Francisco U. Benavides
		NOT = { InCabinet = 36005 }
		OR = {
			NOT = { manpower = 200 }
			AND = {
				manpower = 200
				NOT = { minister = 36073 } # Andres F. Figueroa
			}
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 36005 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Staff Section 32910 - 32919
#############################################
event = { # Pablo Quiroga Escamillo takes power
	id = 32910
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 36095 # Pablo Quiroga Escamillo
		NOT = { InCabinet = 36095 }
		OR = {
			atwar = no
			NOT = { manpower = 200 }
			AND = {
				manpower = 200
				NOT = { minister = 36096 } # Gustavo Salinas Camina
			}
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 36095 }
		command = { type = dissent value = -1 }
	}
}
event = { # Gustavo Salinas Camina takes power
	id = 32911
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 36096 # Gustavo Salinas Camina
		NOT = { InCabinet = 36096 }
		OR = {
			manpower = 200
			AND = {
				NOT = { manpower = 200 }
				NOT = { minister = 36095 } # Pablo Quiroga Escamillo
			}
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 36096 }
		command = { type = dissent value = -1 }
	}
}
event = { # Benjamin G. Hill takes power
	id = 32912
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 36007 # Benjamin G. Hill
		NOT = { InCabinet = 36007 }
		NOT = { minister = 36096 } # Gustavo Salinas Camina
		OR = {
			manpower = 200
			AND = {
				NOT = { manpower = 200 }
				NOT = { minister = 36095 } # Pablo Quiroga Escamillo
			}
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 36007 }
		command = { type = dissent value = -1 }
	}
}
################
# Head of Intelligence Section 32920 - 32929
#############################################
event = { # Victor Muņoz Cardenas takes power
	id = 32920
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 36091 # Victor Muņoz Cardenas
		NOT = { InCabinet = 36091 }
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofintelligence which = 36091 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of the Army Section 32930 - 32939
#############################################
event = { # Matias Santos Ramos takes power
	id = 32930
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 36111 # Matias Santos Ramos
		NOT = { InCabinet = 36111 }
		OR = {
			atwar = no
			NOT = { minister = 36107 } # Gilberto Limon Marquez
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofarmy which = 36111 }
		command = { type = dissent value = -1 }
	}
}
event = { # Gilberto Limon Marquez takes power
	id = 32931
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 36107 # Gilberto Limon Marquez
		NOT = { InCabinet = 36107 }
		OR = {
			atwar = yes
			NOT = { minister = 36111 } # Matias Santos Ramos
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofarmy which = 36107 }
		command = { type = dissent value = -1 }
	}
}




#############################################
# Regular AI Events 32960 - 32999
#############################################
################
# Load D-Day AI
#############################################
event = {
	id = 32960
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		flag = DDay
		NOT = { local_flag = MEXDDay }
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = local_setflag which = MEXDDay }
		command = { type = ai which = "switch/Minor_DDay_USA.ai" }
	}
}
event = {
	id = 32961
	random = no 
	country = MEX
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		NOT = { flag = DDay }
		local_flag = MEXDDay
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = local_clrflag which = MEXDDay }
		command = { type = ai which = "switch/Minor_DDay_Retrack.ai" }
	}
}
################
# Shift Production
#############################################
event = {
	id = 32962
	random = no 
	country = MEX
	
	trigger = {
		ai = yes
		OR = {
			atwar = yes
			atwar = GER
			atwar = ENG
			atwar = FRA
			atwar = USA
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/max_factor_050.ai" }
	}
}
