####################################
# Brazil AI events 33000 - 33099 by Lothos
####################################
################
# Minister of Security Section 33000 - 33009
#############################################
event = { # Marcondes Filho takes power
	id = 33000
	random = no 
	country = BRA
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 34005 # Marcondes Filho
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BRASecurityFilho }
		}
		OR = {
			manpower = 200
			AND = {
				NOT = { manpower = 200 }
				NOT = { minister = 34115 } # Manuel A. Venāncio
			}
		}
	}

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

	action_a = {
		command = { type = local_setflag which = BRASecurityFilho }
		command = { type = local_clrflag which = BRASecurityManuel }
		command = { type = ministerofsecurity which = 34005 }
		command = { type = dissent value = -1 }
	}
}
event = { # Manuel A. Venāncio takes power
	id = 33001
	random = no 
	country = BRA
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 34115 # Manuel A. Venāncio
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BRASecurityManuel }
		}
		OR = {
			NOT = { manpower = 200 }
			AND = {
				manpower = 200
				NOT = { minister = 34005 } # Marcondes Filho
			}
		}
	}

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

	action_a = {
		command = { type = local_clrflag which = BRASecurityFilho }
		command = { type = local_setflag which = BRASecurityManuel }
		command = { type = ministerofsecurity which = 34115 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Staff Section 33010 - 33019
#############################################
event = { # Luis Carlos Prestes takes power
	id = 33010
	random = no 
	country = BRA
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 34150 # Luis Carlos Prestes
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BRAChiefPrestes }
		}
		OR = {
			atwar = no
			NOT = { manpower = 200 }
			AND = {
				manpower = 200
				NOT = { minister = 34007 } # Gaspar Dutra
			}
		}
	}

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

	action_a = {
		command = { type = local_setflag which = BRAChiefPrestes }
		command = { type = local_clrflag which = BRAChiefDutra }
		command = { type = chiefofstaff which = 34150 }
		command = { type = dissent value = -1 }
	}
}
event = { # Gaspar Dutra takes power
	id = 33011
	random = no 
	country = BRA
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 34007 # Gaspar Dutra
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BRAChiefDutra }
		}
		OR = {
			manpower = 200
			AND = {
				NOT = { manpower = 200 }
				NOT = { minister = 34150 } # Luis Carlos Prestes
			}
		}
	}

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

	action_a = {
		command = { type = local_clrflag which = BRAChiefPrestes }
		command = { type = local_setflag which = BRAChiefDutra }
		command = { type = chiefofstaff which = 34007 }
		command = { type = dissent value = -1 }
	}
}
################
# Head of Intelligence Section 33020 - 33029
#############################################
################
# Chief of the Army Section 33030 - 33039
#############################################
event = { # Henrique Teixeira Lott takes power
	id = 33030
	random = no 
	country = BRA
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 34168 # Henrique Teixeira Lott
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BRAArmyLott }
		}
	}

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

	action_a = {
		command = { type = local_setflag which = BRAArmyLott }
		command = { type = chiefofarmy which = 34168 }
		command = { type = dissent value = -1 }
	}
}
################
# Armament Minister Section 33040 - 33049
#############################################
event = { # Getulio Vargas takes power
	id = 33040
	random = no 
	country = BRA
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 34095 # Getulio Vargas
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BRAArmamentVargas }
		}
	}

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

	action_a = {
		command = { type = local_setflag which = BRAArmamentVargas }
		command = { type = armamentminister which = 34095 }
		command = { type = dissent value = -1 }
	}
}




#############################################
# Regular AI Events 33060 - 33099
#############################################
################
# Shift Production
#############################################
event = {
	id = 33060
	random = no 
	country = BRA
	
	trigger = {
		ai = yes
		OR = {
			atwar = yes
			atwar = GER
			atwar = ENG
			atwar = FRA
			atwar = USA
			year = 1939
			NOT = { ai = ARG }
		}
	}

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

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