####################################
# Sweden AI events 32600 - 32699 by Lothos
####################################
################
# Minister of Security Section 32600 - 32609
#############################################
event = { # K.G. Westman takes power
	id = 32600
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 7065 # K.G. Westman
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWESecurityWestman }
		}
		OR = {
			manpower = 200
			NOT = { minister = 7066 } # Arvid G. Richert
		}
	}

	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 = SWESecurityWestman }
		command = { type = local_clrflag which = SWESecurityAxel }
		command = { type = local_clrflag which = SWESecurityRichert }
		command = { type = ministerofsecurity which = 7065 }
		command = { type = dissent value = -1 }
	}
}
event = { # Axel T. Ädelsvärd takes power
	id = 32601
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { minister = 7065 } # K.G. Westman
		minister = 7060 # Axel T. Ädelsvärd
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWESecurityAxel }
		}
		OR = {
			manpower = 200
			NOT = { minister = 7066 } # Arvid G. Richert
		}
	}

	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 = SWESecurityWestman }
		command = { type = local_setflag which = SWESecurityAxel }
		command = { type = local_clrflag which = SWESecurityRichert }
		command = { type = ministerofsecurity which = 7060 }
		command = { type = dissent value = -1 }
	}
}
event = { # Arvid G. Richert takes power
	id = 32602
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { manpower = 200 }
		minister = 7066 # Arvid G. Richert
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWESecurityRichert }
		}
	}

	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 = SWESecurityWestman }
		command = { type = local_clrflag which = SWESecurityAxel }
		command = { type = local_setflag which = SWESecurityRichert }
		command = { type = ministerofsecurity which = 7066 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Staff Section 32610 - 32619
#############################################
event = { # Samuel Åkerhielm takes power
	id = 32610
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 7074 # Samuel Åkerhielm
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWEChiefSamuel }
		}
	}

	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 = SWEChiefSamuel }
		command = { type = local_clrflag which = SWEChiefNygren }
		command = { type = chiefofstaff which = 7074 }
		command = { type = dissent value = -1 }
	}
}
event = { # Sugiyama Hajime takes power
	id = 32611
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		NOT = { minister = 7074 } # Samuel Åkerhielm
		minister = 7007 # Oscar Nygren
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWEChiefNygren }
		}
	}

	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 = SWEChiefSamuel }
		command = { type = local_setflag which = SWEChiefNygren }
		command = { type = chiefofstaff which = 7007 }
		command = { type = dissent value = -1 }
	}
}
################
# Head of Intelligence Section 32620 - 32629
#############################################
event = { # Erik Palmstierna takes power
	id = 32620
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 7069 # Erik Palmstierna
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWEIntelligencePalmstierna }
		}
	}

	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 = SWEIntelligencePalmstierna }
		command = { type = ministerofintelligence which = 7069 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of the Army Section 32630 - 32639
#############################################
event = { # Oscar Nygren takes power
	id = 32630
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 7008 # Oscar Nygren
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWEArmyNygren }
		}
		OR = {
			atwar = no
			NOT = { minister = 7079 } # Per Sylvan
		}
	}

	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 = SWEArmyNygren }
		command = { type = local_clrflag which = SWEArmySylvan }
		command = { type = chiefofarmy which = 7008 }
		command = { type = dissent value = -1 }
	}
}
event = { # Per Sylvan takes power
	id = 32631
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 7079 # Per Sylvan
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWEArmySylvan }
		}
		OR = {
			atwar = yes
			NOT = { minister = 7008 } # Oscar Nygren
		}
	}

	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 = SWEArmyNygren }
		command = { type = local_setflag which = SWEArmySylvan }		
		command = { type = chiefofarmy which = 7079 }
		command = { type = dissent value = -1 }
	}
}
################
# Armament Minister Section 32640 - 32649
#############################################
event = { # Gustav Cassel takes power
	id = 32640
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 7049 # Gustav Cassel
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWEArmamentCassel }
		}
	}

	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 = SWEArmamentCassel }
		command = { type = local_clrflag which = SWEArmamentWigforss }
		command = { type = armamentminister which = 7049 }
		command = { type = dissent value = -1 }
	}
}
event = { # Ernst Wigforss takes power
	id = 32641
	random = no 
	country = SWE
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 7047 # Ernst Wigforss
		NOT = { minister = 7049 } # Gustav Cassel
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = SWEArmamentWigforss }
		}
	}

	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 = SWEArmamentCassel }
		command = { type = local_setflag which = SWEArmamentWigforss }
		command = { type = armamentminister which = 7047 }
		command = { type = dissent value = -1 }
	}
}
################
# Shift Production
#############################################
event = {
	id = 32642
	random = no 
	country = SWE
	
	trigger = {
		ai = yes
		OR = {
			atwar = yes
			atwar = GER
			atwar = SOV
			atwar = FIN
			atwar = NOR
			NOT = { ai = NOR }
			NOT = { ai = FIN }
			year = 1940
		}
	}

	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" }
	}
}
