####################################
# Bulgaria AI events 32800 - 32899 by Lothos
####################################
################
# Minister of Security Section 32800 - 32809
#############################################
event = { # Nikolay Nikolaev takes power
	id = 32800
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 19092 # Nikolay Nikolaev
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BULSecurityNikolaev }
		}
	}

	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 = BULSecurityNikolaev }
		command = { type = local_clrflag which = BULSecuritySapov }
		command = { type = ministerofsecurity which = 19092 }
		command = { type = dissent value = -1 }
	}
}
event = { # Georgi Sapov takes power
	id = 32801
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 19005 # Georgi Sapov
		NOT = { minister = 19092 } # Nikolay Nikolaev
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BULSecuritySapov }
		}
	}

	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 = BULSecurityNikolaev }
		command = { type = local_setflag which = BULSecuritySapov }
		command = { type = ministerofsecurity which = 19005 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Staff Section 32810 - 32819
#############################################
event = { # Hristo Lukov takes power
	id = 32810
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 19007 # Hristo Lukov
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BULChiefLukov }
		}
	}

	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 = BULChiefLukov }
		command = { type = local_clrflag which = BULChiefDaskalov }
		command = { type = chiefofstaff which = 19007 }
		command = { type = dissent value = -1 }
	}
}
event = { # Teodosi Daskalov takes power
	id = 32811
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 19115 # Teodosi Daskalov
		NOT = { minister = 19007 } # Hristo Lukov
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BULChiefDaskalov }
		}
	}

	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 = BULChiefLukov }
		command = { type = local_setflag which = BULChiefDaskalov }
		command = { type = chiefofstaff which = 19115 }
		command = { type = dissent value = -1 }
	}
}
################
# Head of Intelligence Section 32820 - 32829
#############################################
event = { # Atanas Burov takes power
	id = 32820
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 19111 # Atanas Burov
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BULIntelligenceBurov }
		}
	}

	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 = BULIntelligenceBurov }
		command = { type = local_clrflag which = BULIntelligenceKirov }
		command = { type = ministerofintelligence which = 19111 }
		command = { type = dissent value = -1 }
	}
}
event = { # Sava Kirov takes power
	id = 32821
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 19107 # Sava Kirov
		NOT = { minister = 19111 } # Atanas Burov
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BULIntelligenceKirov }
		}
	}

	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 = BULIntelligenceBurov }
		command = { type = local_setflag which = BULIntelligenceKirov }
		command = { type = ministerofintelligence which = 19107 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of the Army Section 32830 - 32839
#############################################
event = { # Iordan Peev takes power
	id = 32830
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 19125 # Iordan Peev
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BULArmyPeev }
		}
	}

	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 = BULArmyPeev }
		command = { type = chiefofarmy which = 19125 }
		command = { type = dissent value = -1 }
	}
}







#############################################
# Regular AI Events 32860 - 32899
# Invasion Flags
#	BULInvadeYUG	= Invade Yugoslavia
#############################################
################
# Bulgaria exp forces to Germany
#############################################
event = {
	id = 32860
	random = no 
	country = BUL
	
	trigger = {
		ai = yes
		ai = GER
		alliance = { country = GER country = BUL }
		OR = {
			AND = {
				war = { country = GER country = SOV }
				war = { country = BUL country = SOV }
			}
			AND = {
				war = { country = GER country = YUG }
				war = { country = BUL country = YUG }
			}
		}
	}

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

	action_a = {
		command = { type = ai which = "switch/EXP_Russia.ai" }
		command = { type = ai which = "Air_Ground.ai" }
	}
}
################
# Bulgaria invades Yugoslavia
#############################################
event = {
	id = 32861
	random = no 
	country = BUL
	persistent = yes
	
	trigger = {
		ai = yes
		ai = GER
		exists = YUG
		flag = InvYugoslavia
		NOT = { war = { country = GER country = SOV } }
		NOT = { war = { country = BUL country = SOV } }
		NOT = { war = { country = BUL country = GER } }		
	}

	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 = BULInvadeYUG }
		command = { type = ai which = "switch/BUL_Invade_YUG_Buildup.ai" }
	}
}
event = {
	id = 32862
	random = no 
	country = BUL
	
	trigger = {
		ai = yes
		local_flag = BULInvadeYUG
		NOT = { flag = InvYugoslavia }
	}

	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 = war which = YUG }
		command = { type = local_clrflag which = BULInvadeYUG }
		command = { type = ai which = "switch/BUL_Invade_Release.ai" }
	}
}
