#
# AI Events
#
#   written by 
#		Generalisimo
#
# C.O.R.E. v0.7 transition to CSV complete (not needed)


###########################################################################################
# Operation Dynamo/Dunkirk Evacuation (Historically May 27-June 4, 1940)
###########################################################################################
event = { 
	id = 272571
	random = no
	country = ENG
	
	trigger = {
		ai = yes
		
		alliance = { country = FRA country = ENG }
		war = { country = GER country = ENG }
		war = { country = GER country = FRA }
		NOT = { exists = VIC } 			#Before Vichy France event
		
		
		#Lille (Dunkerque) surrounded
		control = { province = 518 data = FRA }	 #Lille
		
		OR = {
			#Historical Trigger: Germany attacks through Belgium
			AND = {
				exists = BEL
				NOT = { control = { province = 548 data = BEL } } #Antwerpen
				alliance = { country = FRA country = BEL }
			}
		
			#Historical Trigger: Belgium surrendered 
			AND = {
				NOT = { exists = BEL }  
				OR = {
					#Antwerpen is controlled by an Axis country
					control = { province = 548 data = GER }
					control = { province = 548 data = ITA }
					control = { province = 548 data = HUN }
					control = { province = 548 data = ROM }
					control = { province = 548 data = SLO }
					control = { province = 548 data = FIN }
					control = { province = 548 data = SPA }
				}
			}
		
			#Ahistorical: Germany does not attack Belgium 
			NOT = { alliance = { country = FRA country = BEL } }
		}

		NOT = { control = { province = 520 data = FRA } } #Sedan
		NOT = { control = { province = 528 data = FRA } } #Amiens
		NOT = { control = { province = 522 data = FRA } } #Rouen
		
		#UK must control Channel ports and London
		control = { province = 499 data = ENG }	 #London
		control = { province = 501 data = ENG }	 #Plymouth
		control = { province = 502 data = ENG }	 #Southampton
		control = { province = 503 data = ENG }	 #Portsmouth
				
	}
	
	name = "Prepare for Operation Dynamo"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 9
	deathdate = { day = 1 month = january year = 1948 }

	action_a = {
		command = { type = trigger which = 272572 }
		command = { type = convoy which = 502 value = 518 when = 17 } #Southampton-Lille oil/supplies
		command = { type = convoy which = 502 value = 518 when = 17 } 
		command = { type = convoy which = 503 value = 518 when = 17 } #Portsmouth-Lille	oil/supplies
		command = { type = convoy which = 503 value = 518 when = 17 }
		command = { type = dissent value = -0.5 }
	}

}


event = {		
	id = 272572
	random = no
	country = FRA

	#Triggered by ENG 272571

	name = AI_EVENT
	desc = "Due to German advances on the western Front, the Allied Supreme Command has decided on initiating the Dunkirk evacuation. We must turn over Lille to the UK as they prepare for Operation Dynamo."
	style = 0

	action_a = {
		command = { type = secedeprovince which = ENG value = 518 } #Lille
				
	}
}

event = { 
	id = 272576 
	random = no
	country = ENG
	
	trigger = {
		ai = yes
		exists = PAR
		
		alliance = { country = FRA country = ENG }
		war = { country = GER country = ENG }
		war = { country = GER country = FRA }
		NOT = { exists = VIC } 			#Before Vichy France event
		
		event = 272572

		#Need to have at least 10 Allied units in Lille
		OR = {
			garrison = { country = FRA province = 518 size = 10 }
			garrison = { country = ENG province = 518 size = 10 }
			garrison = { country = BEL province = 518 size = 10 }
		
			AND = {
				garrison = { country = FRA province = 518 size = 9 }
				garrison = { country = ENG province = 518 size = 1 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 8 }
				garrison = { country = ENG province = 518 size = 2 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 7 }
				garrison = { country = ENG province = 518 size = 3 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 6 }
				garrison = { country = ENG province = 518 size = 4 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 5 }
				garrison = { country = ENG province = 518 size = 5 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 4 }
				garrison = { country = ENG province = 518 size = 6 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 3 }
				garrison = { country = ENG province = 518 size = 7 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 2 }
				garrison = { country = ENG province = 518 size = 8 }
			}
		
			AND = {
				garrison = { country = FRA province = 518 size = 1 }
				garrison = { country = ENG province = 518 size = 9 }
			}
						
		}

		#UK must control Channel ports and London
		control = { province = 499 data = ENG }	 #London
		control = { province = 501 data = ENG }	 #Plymouth
		control = { province = 502 data = ENG }	 #Southampton
		control = { province = 503 data = ENG }	 #Portsmouth

		convoypool = 100
				
	}
	
	name = "Execute Operation Dynamo"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1948 }

	action_a = {
		command = { type = secedeprovince which = PAR value = 518 } #Lille
		command = { type = convoypool which = ENG value = -40 } #Losses from Luftwaffe bombing 
		command = { type = dissent value = -2 }
	}

}

event = { 
	id = 272579 
	random = no
	country = PAR
	
	trigger = {
		event = 272576 #Execute Operation Dynamo
		control = { province = 518 data = PAR } #Andris: Need this trigger, otherwise event doesn't trigger properly		
	}
	
	name = AI_EVENT
	desc = "Return Lille to France to complete Dunkirk Evacuation event chain."
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 7
	deathdate = { day = 1 month = january year = 1948 }

	action_a = {
		command = { type = secedeprovince which = FRA value = 518 } #Lille
		command = { type = trigger which = 272580 }
	}

}

event = { 
	id = 272580 
	random = no
	country = FRA

	#Triggered by PAR 272579
		
	name = "Dunkerque Evacuation Complete"
	desc = "Now that the Allied evacuation is complete, Lille has been returned to us."
	style = 0

	action_a = {
		command = { type = dissent value = -2 } #Andris: France should probably have a new defensive AI focusing
							#on defending Paris and along the Seine, to counter Fall Rot
		
	}
}


########################################################################################### 
# Commonwealth Protection from Sealion Operation
############################################################################################

event = {
	id = 1510020
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }

	  	NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Portsmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 1510021 } # CAN
	}
}

event = {
	id = 1510021
	random = no
	country = CAN

	#Triggered by ENG 1510020

	name = AI_EVENT
	desc = "The United Kingdom is under imminent threat of invasion. They have asked for our more direct involvement in the European War against the Axis."
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 272601
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }

	  	NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Portsmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1940 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = march year = 1940 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272602 } # CAN
	}
}

event = {
	id = 272602
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}

event = {
	id = 272606
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }

	  	NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = april year = 1940 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = june year = 1940 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272607 } # CAN
	}
}

event = {
	id = 272607
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}

event = {
	id = 272611
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }

	  	NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = july year = 1940 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = september year = 1940 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272612 } # CAN
	}
}

event = {
	id = 272612
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}

event = {
	id = 272616
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }

	  	NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1940 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1940 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272617 } # CAN
	}
}

event = {
	id = 272617
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}

#################################################
# (AI) Operation Sea Lion (German Success)
#################################################

event = {
	id = 272619
	random = no
	country = GER
	
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }
		NOT = { war = { country = GER country = SOV } }
	  	
		#Need to control Perth/Glasgow/Aberdeen (Northern invasion) OR 
		#any 1 of the main southern cities (Southern invasion) to trigger 
		
		OR = {
				AND = { control = { province = 485 data = GER } # Perth
					control = { province = 486 data = GER } # Glasgow
					control = { province = 484 data = GER } # Aberdeen
					}  
				control = { province = 487 data = GER } # Edinburgh
				control = { province = 488 data = GER } # Newcastle
				control = { province = 489 data = GER } # Manchester
				control = { province = 490 data = GER } # Sheffield
				#control = { province = 491 data = GER } # Cardiff
				control = { province = 497 data = GER } # Birmingham
				control = { province = 498 data = GER } # Coventry
				control = { province = 499 data = GER } # London
				#control = { province = 500 data = GER } # Bristol
				control = { province = 501 data = GER } # Plymouth
				control = { province = 502 data = GER } # Southampton
				control = { province = 503 data = GER } # Portsmouth
		}
	}

	name = AI_EVENT #"Sea Lion Initial Success"
	desc = "We have achieved an initial landing on the British Isles, and will therefore postpone certain other strategic decisions such as a Balkan campaign and replacing Hjalmar Schacht as Armament Minister."
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 5 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		#Effects include delaying historical 1941 Balkan campaign (Yugoslavia/Greece)
		#Also, keeping Hjalmar Schacht as Armament Minister, instead of replacing w/Fritz Todt
		command = { type = setflag which = ger_SeaLion_success }	

	}
}


event = {
	id = 272620
	random = no
	country = GER
	
	
	trigger = {
      		ai = yes     
		flag = ger_SeaLion_success
		
		war = { country = GER country = ENG }
		NOT = { war = { country = GER country = SOV } }
	  	
		#Main goals achieved with Sea Lion: London, Midlands, and Scotland		
		#control = { province = 482 data = GER } # Scapa Flow
		control = { province = 483 data = GER } # Inverness
		control = { province = 484 data = GER } # Aberdeen
		control = { province = 485 data = GER } # Perth
		control = { province = 486 data = GER } # Glasgow 
		control = { province = 487 data = GER } # Edinburgh
		control = { province = 488 data = GER } # Newcastle
		control = { province = 489 data = GER } # Manchester
		control = { province = 490 data = GER } # Sheffield
		#control = { province = 491 data = GER } # Cardiff
		control = { province = 497 data = GER } # Birmingham
		control = { province = 498 data = GER } # Coventry
		control = { province = 499 data = GER } # London
		control = { province = 500 data = GER } # Bristol
		#control = { province = 501 data = GER } # Plymouth
		#control = { province = 502 data = GER } # Southampton
		#control = { province = 503 data = GER } # Portsmouth
		
	}

	name = AI_EVENT #"Sea Lion Goals Achieved, Switch to Balkans"
	desc = "We have achieved our primary goals in Operation Sea Lion with the capture of London, the Midlands, and most of Scotland. We will pause and consolidate our position, while turning our attention to the Balkans against Yugoslavia and Greece."
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		#Proceed with historical 1941 Balkan campaign (Yugoslavia/Greece)
		command = { type = setflag which = ger_SeaLion_pause }
		
	}
}

########################################################################################

event = {
	id = 272621
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }

	  	NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Portsmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1941 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = march year = 1941 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272622 } # CAN
	}
}

event = {
	id = 272622
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}

event = {
	id = 272626
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }

	  	NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = april year = 1941 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = june year = 1941 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272627 } # CAN
	}
}

event = {
	id = 272627
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}

event = {
	id = 272631
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }
	  	
		NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = july year = 1941 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1941 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272632 } # CAN
	}
}

event = {
	id = 272632
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}


#Late Sealion Defense

event = {
	id = 272636
	random = no
	country = ENG
	
	trigger = {
      		ai = yes     
		war = { country = GER country = ENG }
	  	
		NOT = {
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh
		}
	}

	name = AI_EVENT #"CW_Sealion"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1942 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 272637 } # CAN
	}
}

event = {
	id = 272637
	random = no
	country = CAN

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
	}
}

###############################################
#Germans Expelled from British Isles
###############################################
event = {
	id = 1510022
	random = no
	country = ENG
	persistent = yes #NOTE: PERSISTENT
	
	# Germans expelled from England, but UK only
	
	trigger = {
		ai = yes
		
		war = { country = GER country = ENG }
		NOT = { war = { country = GER country = SOV } } 
		NOT = { alliance = { country = ENG  country = USA } }
		
		OR = { #UK loses cores on part of British Isles
			event = 9503001
			event = 9503002
			event = 9503003
			event = 9503004
			event = 9503005
			event = 9503006
			event = 9503007
			event = 9503008
			event = 9503009
			event = 9503010
			event = 9503011
			event = 9503012
			event = 9503013
			event = 9503014
			event = 9503015
			event = 9503016
			event = 9503017
			event = 9503018
		} 

		control = { province = 482 data = ENG } # Scapa Flow
		control = { province = 483 data = ENG } # Inverness
		control = { province = 484 data = ENG } # Aberdeen
		control = { province = 485 data = ENG } # Perth
		control = { province = 486 data = ENG } # Glasgow 
		control = { province = 487 data = ENG } # Edinburgh
		control = { province = 488 data = ENG } # Newcastle
		control = { province = 489 data = ENG } # Manchester
		control = { province = 490 data = ENG } # Sheffield
		control = { province = 491 data = ENG } # Cardiff
		control = { province = 497 data = ENG } # Birmingham
		control = { province = 498 data = ENG } # Coventry
		control = { province = 499 data = ENG } # London
		control = { province = 500 data = ENG } # Bristol
		control = { province = 501 data = ENG } # Plymouth
		control = { province = 502 data = ENG } # Southampton
		control = { province = 503 data = ENG } # Portsmouth
	}
	
	name = AI_EVENT #"Germans expelled, core_ENG_BoB.ai" 
	desc = "The German attack has been repulsed and they have been expelled from Britain. However, without Allies, we are forced to continue a defensive-only strategy focusing on keeping Britain safe."
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 30 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = addcore which = 482 }
		command = { type = addcore which = 483 }
		command = { type = addcore which = 484 }
		command = { type = addcore which = 485 }
		command = { type = addcore which = 486 }
		command = { type = addcore which = 487 }
		command = { type = addcore which = 488 }
		command = { type = addcore which = 489 }
		command = { type = addcore which = 490 }
		command = { type = addcore which = 491 }
		command = { type = addcore which = 493 }
		command = { type = addcore which = 497 } #also Belfast
		command = { type = addcore which = 498 }
		command = { type = addcore which = 499 }
		command = { type = addcore which = 500 }
		command = { type = addcore which = 501 }
		command = { type = addcore which = 502 }
		command = { type = addcore which = 503 }	
		command = { type = ai which = core_ENG_BoB.ai }
		command = { type = trigger which =  272661 } # GER
		command = { type = trigger which = 1510023 } # CAN
	}
}

event = {
	id = 272661
	random = no
	country = GER
	#persistent = yes #Andris: may need to set persistent

	# Triggered by ENG 1510022 / 272701

	trigger = {
		ai = yes		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {	
		command = { type = clrflag which = ger_SeaLion_success } 
	}
}

event = {
	id = 1510023
	random = no
	country = CAN

	# Triggered by ENG 1510022 / 272701

	trigger = {
      		ai = yes     
	}

	name = AI_EVENT
	desc = ""
	style = 0 

	action_a = {
		command = { type = ai which = core_CAN_Defense.ai }
		#command = { type = ai which = core_Defensive.ai } #original Canada Defense file
	}
}


event = {
	id = 272701
	random = no
	country = ENG
	persistent = yes #NOTE: Persistent for multiple waves of German attacks
	
	# Germans expelled from England, but either USA allied or Barbarossa

	trigger = {
		ai = yes
		
		war = { country = GER country = ENG }
		OR = {
			war = { country = GER country = SOV }  
			alliance = { country = ENG  country = USA }
		}

		OR = { #UK loses cores on part of British Isles
			event = 9503001
			event = 9503002
			event = 9503003
			event = 9503004
			event = 9503005
			event = 9503006
			event = 9503007
			event = 9503008
			event = 9503009
			event = 9503010
			event = 9503011
			event = 9503012
			event = 9503013
			event = 9503014
			event = 9503015
			event = 9503016
			event = 9503017
			event = 9503018
		} 
		
		control = { province = 482 data = ENG } # Scapa Flow
		control = { province = 483 data = ENG } # Inverness
		control = { province = 484 data = ENG } # Aberdeen
		control = { province = 485 data = ENG } # Perth
		control = { province = 486 data = ENG } # Glasgow
		control = { province = 487 data = ENG } # Edinburgh
		control = { province = 488 data = ENG } # Newcastle
		control = { province = 489 data = ENG } # Manchester
		control = { province = 490 data = ENG } # Sheffield
		control = { province = 491 data = ENG } # Cardiff
		control = { province = 497 data = ENG } # Birmingham
		control = { province = 498 data = ENG } # Coventry
		control = { province = 499 data = ENG } # London
		control = { province = 500 data = ENG } # Bristol
		control = { province = 501 data = ENG } # Plymouth
		control = { province = 502 data = ENG } # Southampton
		control = { province = 503 data = ENG } # Portsmouth
	}
	
	name = AI_EVENT #"Germans expelled, core_ENG_Africa.ai" 
	desc = "The German attack has been repulsed and they have been expelled from Britain. Now that we have some Allies and the Germans are facing a multi-front war, we can start considering counter-attacks in areas like Africa."
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = addcore which = 482 }
		command = { type = addcore which = 483 }
		command = { type = addcore which = 484 }
		command = { type = addcore which = 485 }
		command = { type = addcore which = 486 }
		command = { type = addcore which = 487 }
		command = { type = addcore which = 488 }
		command = { type = addcore which = 489 }
		command = { type = addcore which = 490 }
		command = { type = addcore which = 491 }
		command = { type = addcore which = 493 } #also Belfast
		command = { type = addcore which = 497 }
		command = { type = addcore which = 498 }
		command = { type = addcore which = 499 }
		command = { type = addcore which = 500 }
		command = { type = addcore which = 501 }
		command = { type = addcore which = 502 }
		command = { type = addcore which = 503 }	
		command = { type = ai which = core_ENG_Africa.ai }
		command = { type = trigger which =  272661 } # GER
		command = { type = trigger which = 1510023 } # CAN
	}
}

#########################
#AI UK is defeated and becomes puppet of AI Germany
#########################
event = {
	id = 272651
	random = no
	country = ENG

	trigger = {
		ai = yes #AI UK
		NOT = { flag = eng_global_ger_HumanPlayer }  #AI Germany
		
		event = 5108   	#Britain a German puppet
		ispuppet = ENG 	#Britain a German puppet

		control = { province = 486 data = ENG } # Glasgow
		control = { province = 487 data = ENG } # Edinburgh
		control = { province = 489 data = ENG } # Manchester
		control = { province = 499 data = ENG } # London
					
	}

	name = "British War Reparations to Germany"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 30 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
	   command = { type = convoy which = 486 value = 588 when = 31 } #Glasgow-Hamburg coal/steel/oil/rubber/supply
	   command = { type = convoy which = 486 value = 588 when = 31 }
	   command = { type = convoy which = 487 value = 588 when = 31 } #Edinburgh-Hamburg coal/steel/oil/rubber/supply
	   command = { type = convoy which = 487 value = 588 when = 31 }
	   command = { type = convoy which = 489 value = 588 when = 31 } #Manchester-Hamburg coal/steel/oil/rubber/supply
	   command = { type = convoy which = 489 value = 588 when = 31 }
	   command = { type = convoy which = 489 value = 588 when = 31 } 
	   command = { type = convoy which = 489 value = 588 when = 31 }
	   command = { type = addcore which = 488 }			#Newcastle returned as core to maximize coal/steel production
			
	}
}

#########################
#AI Soviet Union and AI UK become allies against Germany
#########################

event = {
	id = 272801
	random = no
	country = ENG

	trigger = {
		ai = yes #UK not human
		
		NOT = {event = 1500006} #USSR not human
		event = 222084 # SOV Great Patriotic War
		
		#Added to avoid possible weirdness from PAN 492038 peace between USSR and Japan 
		#event = 492037 # PAN Soviet-Japanese Neutrality Treaty 	

		war = { country = GER country = ENG }
		war = { country = GER country = SOV }

		control = { province = 527 data = GER } #Paris
		control = { province = 643 data = GER } #Warsawa

		#UK controls British Isles	
		control = { province = 488 data = ENG } # Newcastle
		control = { province = 489 data = ENG } # Manchester
		control = { province = 490 data = ENG } # Sheffield
		control = { province = 491 data = ENG } # Cardiff
		control = { province = 497 data = ENG } # Birmingham
		control = { province = 498 data = ENG } # Coventry
		control = { province = 499 data = ENG } # London
		control = { province = 500 data = ENG } # Bristol
		control = { province = 501 data = ENG } # Plymouth
		control = { province = 502 data = ENG } # Southampton
		control = { province = 503 data = ENG } # Portsmouth	
					
	}

	name = "The Enemy of my Enemy is my Friend"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = trigger which = 272802 }	
		#command = { type = alliance which = SOV } #Andris: Full alliance causes weirdness
	}
}

event = {
	id = 272802
	random = no
	#persistent = yes
	country = SOV
	
	name = AI_EVENT #"Western Allies Supply Convoys Depart"
	desc = ""
	style = 0

	action_a = {
		command = { type = secedeprovince which = ENG value = 834 } #Kirovsk
		command = { type = secedeprovince which = ENG value = 839 } #Archangelsk
	}
}


event = {
	id = 272803
	random = no
	country = ENG

	trigger = {
	  	ai = yes	
	  	event = 272802 # Need separate events for alliances and convoys per AI convoy rule
	  
	  	#UK controls British Isles	
		control = { province = 488 data = ENG } # Newcastle
		control = { province = 489 data = ENG } # Manchester
		control = { province = 490 data = ENG } # Sheffield
		control = { province = 491 data = ENG } # Cardiff
		control = { province = 497 data = ENG } # Birmingham
		control = { province = 498 data = ENG } # Coventry
		control = { province = 499 data = ENG } # London
		control = { province = 500 data = ENG } # Bristol
		control = { province = 501 data = ENG } # Plymouth
		control = { province = 502 data = ENG } # Southampton
		control = { province = 503 data = ENG } # Portsmouth		
	}

	name = AI_EVENT #"England-USSR Resource Convoys"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 5 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 489 value = 834 when = 31 } #Manchester-Kirovsk:everything
		#command = { type = convoy which = 489 value = 834 when = 24} # Just rubber + supplies
		command = { type = convoy which = 489 value = 839 when = 31 } #Manchester-Archangelsk: everything
		#command = { type = convoy which = 489 value = 839 when = 24 } #Just rubber+supplies		
	}
}

event = {
	id = 272804
	random = no
	#persistent = yes
	country = ENG

	trigger = {
	  	ai = yes	
	  	event = 272803 	
	}
	
	name = AI_EVENT #"Western Allies Supply Convoys Arrive"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 45 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }


	action_a = {
		command = { type = secedeprovince which = SOV value = 834 } #Kirovsk
		command = { type = secedeprovince which = SOV value = 839 } #Archangelsk
	}
}


############################################################################################
# COMMONWEALTH AI CHANGES (PEACE TO WAR ECONOMY/MILITARY) (1510024-1510029)
############################################################################################

event = {
	id = 1510024
	random = no
	country = ENG

	trigger = {
		ai = yes
		OR = {
			control = { province = 578 data = GER }
			atwar = yes
			}
	}

	name = AI_EVENT #"core_ENG_38"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ENG_38.ai }
		command = { type = start_research which = 4400 } #In case tech share did not happen by now (small % chance)
		command = { type = prio_research which = 4400 } 
		#command = { type = sleepevent which = 272257 } 
		
	}
}

#event = {
#	id = 272257
#	random = no
#	country = ENG
#
#	trigger = {
#		ai = yes
#		atwar = no 
#		technology = 4600 #Early tech share
#		NOT = {event = 1510024} #Munich English ai has not happened
#			
#	}
#
#	name = AI_EVENT #"core_ENG_36_part2"
#	desc = ""
#	style = 0
#
#	date = { day = 1 month = january year = 1936 }
#	offset = 15 # Check for trigger conditions every 3 days
#	deathdate = { day = 30 month = december year = 1947 }
#
#	action_a = {
#		command = { type = ai which = core_ENG_36_part2.ai }
#		command = { type = start_research which = 4700 } 
#		command = { type = prio_research which = 4700 } #Catalytic Poly
#	}
#}

#Canada switches to Advanced Weapons Research for Allies (Ahistorical)
event = {
	id = 402131
	random = no
	country = CAN

	trigger = {
		ai = yes
		atwar = no 
		technology = 7100 #Military Testing and Research
		technology = 3103 #Basic Electromechanical Computer
		
	}

	name = AI_EVENT #"core_CAN_36_Research"
	desc = ""
	style = 0

	date = { day = 15 month = january year = 1937 }
	offset = 10 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		command = { type = start_research which = 7200 }
		command = { type = prio_research which = 7200 } 
		#command = { type = start_research which = 7001 }
		#command = { type = prio_research which = 7001 }
		command = { type = ai which = core_CAN_36_Research.ai }
		
	}
}

event = {
	id = 402132
	random = no
	country = CAN

	trigger = {
		ai = yes
		atwar = no 
		OR = {
			control = { province = 578 data = GER }	
			event = 2004 #ToM CZ is Axis			
			technology = 7300 #Jet Engine Design
		}			
		
			
	}

	name = AI_EVENT #"core_CAN_38"
	desc = ""
	style = 0

	date = { day = 1 month = september year = 1938 }
	offset = 3 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CAN_38.ai }
		
	}
}

event = {
	id = 1510025
	random = no
	country = CAN

	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CAN_Defense.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510026
	random = no
	country = AST
	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_AST_War_defensive.ai }
		command = { type = ai which = core_AST_Research.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510027
	random = no
	country = NZL

	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_NZL_War.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}



event = {
	id = 1510029
	random = no
	country = EGY

	trigger = {
		ai = yes
		atwar = yes
		alliance = { country = EGY  country = ENG }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_EGY_Allied.ai }
	}
}

############################################################################################
# COMMONWEALTH STRATEGY CHANGE (1510030-1510033)
############################################################################################

event = {
	id = 1510030
	random = no
	country = ENG

	# England Changes focus to North Africa, Mediterranean, and the Far East

	trigger = {
		ai = yes
		war = { country = ENG country = GER }
		war = { country = ENG country = ITA }
		war = { country = GER country = SOV } #Andris; added to defend against invasion	
		
		#Andris: The British Isles are under English Control
			control = { province = 482 data = ENG } # Scapa Flow
			control = { province = 483 data = ENG } # 
			control = { province = 484 data = ENG } # 
			control = { province = 485 data = ENG } # 
			control = { province = 486 data = ENG } # 
			control = { province = 487 data = ENG } # 
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Portsmouth

	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ENG_Africa.ai }
	}
}

event = {
	id = 1510031
	random = no
	country = CAN

	# Canada goes on the defensive after the fall of France, buiding up for D-Day

	trigger = {
		ai = yes
		atwar = yes
		exists = VIC
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CAN_Defense.ai }
		#command = { type = ai which = core_Defensive.ai }
	}
}

event = {
	id = 1510032
	random = no
	country = AST

	trigger = {
		ai = yes
		war = { country = PAN country = AST }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CW_Pacific.ai }
	}
}

event = {
	id = 1510033
	random = no
	country = NZL

	trigger = {
		ai = yes
		war = { country = PAN country = NZL }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CW_Pacific.ai }
	}
}

############################################################################################
# ALLIES D-DAY INVASION (1510034-1510038)
############################################################################################

event = {
	id = 1510034 
	random = no
	country = ENG

	trigger = {
		#ai = yes #Is disabled, because human player won't trigger ai shift for Canada, US
			
			alliance = { country = USA country = ENG }
		
			war = { country = ENG country = GER }
			war = { country = GER country = SOV }
		
		#England Controls British Isles
			control = { province = 488 data = ENG } # Newcastle 
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield				
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
			control = { province = 486 data = ENG } # Glasgow
			control = { province = 487 data = ENG } # Edinburgh

		#Germany hasn't beaten USSR
		
		OR = {

			NOT = {control = 	{ province = 846  data = GER } 	} #Moscow
			NOT = {control = 	{ province = 788  data = GER } 	} #Leningrad
			NOT = {control = 	{ province = 1359 data = GER} 	} #Baku
			NOT = {control = 	{ province = 1225 data = GER} 	} #Stalingrad
			NOT = {control = 	{ province = 1373 data = GER}	 } #Kujbishev

		}
	}
	
	name = AI_EVENT #"United Kingdom prepares for D-Day Invasion"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1944 }
	offset = 45 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_D-Day_ENG.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = trigger which = 1510035 } #Canada D-day AI (for now)
		command = { type = trigger which = 1510036} #France D-Day AI (for now)
		command = { type = trigger which = 1510037 } #US D-day AI
		#command = { type = addcore which = 522 }
		#command = { type = addcore which = 531 }
		#command = { type = addcore which = 518 }
		#command = { type = addcore which = 538 }
		#command = { type = addcore which = 537 }
		#command = { type = addcore which = 532 }
	}
}

event = {
	id = 1510035 #0035
	random = no
	country = CAN

	trigger = {
		ai = yes	
	}

	name = AI_EVENT #"Canada Prepares for D-Day Invasion"
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_D-Day_CAN.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = { #D-Day invasion for France using expeditionary forces
	id = 1510036 
	random = no
	country = FRA

	trigger = {
		ai = yes	
	}
	
	name = AI_EVENT #"The liberation of France"
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_D-Day_FRA.ai }
	}
}

event = {
	id = 1510037
	random = no
	country = USA

	trigger = {
		ai = yes	
	}

	name = AI_EVENT #"United States Prepares for D-Day Invasion"
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_D-Day_USA.ai }
	}
}

######################
#(AI) Convoys to precipitate breakout from Normandy
#######################

event = {
	id = 1512001
	random = no
	country = ENG
	persistent = yes
	
	trigger = {
		ai = yes 
		alliance = { country = USA country = ENG }
		event =  1510034 #D-day AI
		
		control = { province = 602 data = GER } #Berlin
		control = { province = 527 data = GER } #Paris
		
		OR = {
			control = { province = 531 data = ENG } #Caen
			control = { province = 531 data = USA} 
			control = { province = 531 data = FRA } 
		}
		
		OR = {
			garrison = { country = ENG province = 531 size = 8 } #Have enough troops for breakout
			garrison = { country = USA province = 531 size = 8 }
			garrison = { country = FRA province = 531 size = 8 }
		}

		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
		
		#Germany hasn't beaten USSR
		OR = {

			NOT = {control = 	{ province = 846  data = GER } 	} #Moscow
			NOT = {control = 	{ province = 788  data = GER } 	} #Leningrad
			NOT = {control = 	{ province = 1359 data = GER} 	} #Baku
			NOT = {control = 	{ province = 1225 data = GER} 	} #Stalingrad
			NOT = {control = 	{ province = 1373 data = GER}	 } #Kujbishev

		}
	}
	
	name = AI_EVENT #"Allies Breakout in Normandy"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1944 }
	offset = 5 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 502 value = 531 when = 17 } 
		command = { type = convoy which = 502 value = 531 when = 17 } # Southampton to Caen
		command = { type = convoy which = 502 value = 531 when = 17 }
		command = { type = convoy which = 502 value = 531 when = 17 }
		command = { type = trigger which = 1512002 } #US Sends Supplies
		
	}
}

event = {
	id = 1512002
	random = no
	country = USA
	persistent = yes
	
	action_a = {
		command = { type = convoy which = 124 value = 531 when = 17 } 
		command = { type = convoy which = 124 value = 531 when = 17 } # New York to Caen
		command = { type = convoy which = 124 value = 531 when = 17 }
		command = { type = convoy which = 124 value = 531 when = 17 }
		
		
	}
}

event = {
	id = 1512003
	random = no
	country = ENG
	persistent = yes
	
	trigger = {
		ai = yes 
		alliance = { country = USA country = ENG }
		event =  1510034 #D-day AI

		control = { province = 602 data = GER } #Berlin
		control = { province = 527 data = GER } #Paris
		
		OR = {
			control = { province = 532 data = ENG } #Cherbourg
			control = { province = 532 data = USA} 
			control = { province = 532 data = FRA } 
			}
		
		OR = {
			garrison = { country = ENG province = 532 size = 8 } #Have enough troops for breakout
			garrison = { country = USA province = 532 size = 8 }
			garrison = { country = FRA province = 532 size = 8 }
		}

		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
		
		#Germany hasn't beaten USSR
		OR = {

			NOT = {control = 	{ province = 846  data = GER } 	} #Moscow
			NOT = {control = 	{ province = 788  data = GER } 	} #Leningrad
			NOT = {control = 	{ province = 1359 data = GER} 	} #Baku
			NOT = {control = 	{ province = 1225 data = GER} 	} #Stalingrad
			NOT = {control = 	{ province = 1373 data = GER}	 } #Kujbishev

		}
	}
	
	name = AI_EVENT #"Allies Breakout in Normandy"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1944 }
	offset = 5 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 502 value = 532 when = 17 } 
		command = { type = convoy which = 502 value = 532 when = 17 } # Southampton to Cherbourg
		command = { type = convoy which = 502 value = 532 when = 17 }
		command = { type = convoy which = 502 value = 532 when = 17 }
		command = { type = trigger which = 1512004 } #US Sends Supplies
		
	}
}

event = {
	id = 1512004
	random = no
	country = USA
	persistent = yes
	
	action_a = {
		command = { type = convoy which = 124 value = 532 when = 17 } 
		command = { type = convoy which = 124 value = 532 when = 17 } # New York to Cherbourg
		command = { type = convoy which = 124 value = 532 when = 17 }
		command = { type = convoy which = 124 value = 532 when = 17 }
		
		
	}
}

event = {
	id = 1512005
	random = no
	country = ENG
	persistent = yes
	
	trigger = {
		ai = yes 
		alliance = { country = USA country = ENG }
		event =  1510034 #D-day AI
		
		control = { province = 602 data = GER } #Berlin
		control = { province = 527 data = GER } #Paris
		
		OR = {
			control = { province = 537 data = ENG } #St. Malo
			control = { province = 537 data = USA} 
			control = { province = 537 data = FRA } 
			}
		
		OR = {
			garrison = { country = ENG province = 537 size = 8 } #Have enough troops for breakout
			garrison = { country = USA province = 537 size = 8 }
			garrison = { country = FRA province = 537 size = 8 }
		}

		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
		
		#Germany hasn't beaten USSR or Allies have established a 
		#foothold in Normandy
		
		OR = {
			NOT = {control = 	{ province = 846  data = GER } 	} #Moscow
			NOT = {control = 	{ province = 788  data = GER } 	} #Leningrad
			NOT = {control = 	{ province = 1359 data = GER} 	} #Baku
			NOT = {control = 	{ province = 1225 data = GER} 	} #Stalingrad
			NOT = {control = 	{ province = 1373 data = GER}	 } #Kujbishev
		
			AND = {
				NOT = {control = { province = 532 data = GER }	} #Cherbourg
				NOT = {control = { province = 531 data = GER }	} #Caen
			}	
				
		}
		
	}
	
	name = AI_EVENT #"Allies Breakout in Cotentin Peninsula"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1944 }
	offset = 5 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 502 value = 537 when = 17 } 
		command = { type = convoy which = 502 value = 537 when = 17 } # Southampton to Saint-Malo
		command = { type = convoy which = 502 value = 537 when = 17 }
		command = { type = convoy which = 502 value = 537 when = 17 }
		command = { type = trigger which = 1512006 } #US Sends Supplies
		
	}
}

event = {
	id = 1512006
	random = no
	country = USA
	persistent = yes
	
	action_a = {
		command = { type = convoy which = 124 value = 537 when = 17 } 
		command = { type = convoy which = 124 value = 537 when = 17 } # New York to Saint-Malo
		command = { type = convoy which = 124 value = 537 when = 17 }
		command = { type = convoy which = 124 value = 537 when = 17 }
		
		
	}
}


#event = {
#	id = 1510038
#	random = no
#	country = HOL
#
#		ai = yes
#		war = { country = HOL country = GER }
#		war = { country = ENG country = GER }
#		war = { country = GER country = SOV }
#	}
#	
#	name = AI_EVENT
#	desc = ""
#	style = 0
#
#	date = { day = 1 month = january year = 1936 }
#	offset = 15 # Check for trigger conditions every 3 days
#	deathdate = { day = 30 month = december year = 1947 }
#
#	action_a = {
#		command = { type = ai which = core_D-Day.ai }
#	}
#}

############################################################################################
# FRANCE STRATEGY CHANGES (1510039-1510042, 433001-)
############################################################################################

event = {
	id = 433001
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_ger_HumanPlayer  #Human Germany	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 5 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = march year = 1936 }

	action_a = {
		command = { type = ai which = core_FRA_36_Mechanized.ai }	
	}
}

event = {
	id = 433002
	random = no
	country = FRA

	trigger = {
		ai = yes
		event = 1500061 #AI Germany
		NOT = { event = 9599512 }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 4 month = january year = 1936 }
	offset = 5 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = march year = 1936 }

	action_a = {
		command = { type = ai which = core_FRA_36_Infantry.ai }	
	}
}

event = {
	id = 433003
	random = no
	country = FRA

	trigger = {
		ai = yes
		
		OR = { 	
			AND = {
				flag = fra_global_ger_HumanPlayer 
				technology = 2250 #Christie Suspension	(Mechanized Focus)
			}

			AND = {
				NOT = { flag = fra_global_ger_HumanPlayer } 
				technology = 4405 # Small Arms Assembly Construction (Infantry Focus)	
			}

			#Andris: Need to add ToL as additional trigger

			war = { country = FRA country = GER } #Early War with Germany
			
			year = 1938 #Latest trigger
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 11 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = march year = 1938 }

	action_a = {
		command = { type = manpowerpool value = 150 }	
	}
}

#France Human Player Manpower 

event = {
	id = 433004
	random = no
	country = FRA

	trigger = {
		ai = no

	}

	name = AI_EVENT
	desc = "This is your additional manpower from the 1936 scenario start."
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = march year = 1936 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = manpowerpool value = 150 }	
	}
}

event = {
	id = 433016
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_ger_HumanPlayer  #Human Germany	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 20 month = january year = 1936 }
	offset = 5 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = august year = 1936 }

	action_a = {
		command = { type = trigger which = 433017 }
		command = { type = convoypool which = FRA value = -30 }		
	}
}

event = {
	id = 433017
	random = no
	country = BEL

	name = AI_EVENT
	desc = "France requests additional supplies and oil to power their industry. Will we help them? They are providing the transports for shipping."
	style = 0

	action_a = {
		command = { type = convoy which = 548 value = 929 when = 17 } #Antwerpen-Marseilles: oil/supplies
		command = { type = convoypool which = BEL value = 30 }
	}
}

event = {
	id = 433021
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_ger_HumanPlayer  #Human Germany

		event = 2000 #Re-occupation of the Rhineland
		NOT = { war = { country = FRA country = GER } }	
		alliance = { country = FRA  country = CAN }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = february year = 1936 }
	offset = 5 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = december year = 1936 }

	action_a = {
		command = { type = trigger which = 433022 }
		command = { type = convoypool which = FRA value = -25 }
		command = { type = convoy which = 532 value = 149 when = 25 } #Cherbourg-Montreal: oil/rubber + supplies (so AI fills convoy)	
	}
}

event = {
	id = 433022
	random = no
	country = CAN

	name = AI_EVENT
	desc = "Based on recent political developments with the reoccupation of the Rhineland, France is appealing to our French Canadian population for supplies in case of a showdown with Germany. Will we help them? They are providing the transports for shipping, plus oil/rubber/supplies."
	style = 0

	action_a = {
		command = { type = convoy which = 149 value = 532 when = 16 } #Montreal-Cherbourg: returns supplies to France
		command = { type = convoy which = 149 value = 532 when = 16 } #additional supplies
		command = { type = convoypool which = CAN value = 25 }
	}
}

#Reaction to German re-occupation of the Rhineland (Andris)
#AI France vs. HP Germany

event = { 
	id = 433027 
	random = no
	country = FRA
	
	# Triggered by GER 2000 

	trigger = { 
		ai = yes				#AI France vs.
		flag = fra_global_ger_HumanPlayer  	#Human Germany
	} 	
	
	name = CEVTNAME_432009
	desc = CEVTDESC_432009
	style = 0
	
	
	action_a = {
		name = CEVTACTC_432009 # Extend Maginot Line and partially mobilize
		command = { type = setflag which = extend_maginot_line }
		command = { type = trigger which = 172402 }		# Andris: German AI Tactical Manpowerpool Reduction
		command = { type = manpowerpool value = 150 } 		# Andris: reduced from 300
		command = { type = dissent value = 8 } 			# Mobilization (Andris: increased from 2) 
		command = { type = sleepevent which = 432009  }
	}
	action_b = {
		name = CEVTACTD_432009 # 
		command = { type = trigger which = 172064 } 		# Demand German Retreat
		command = { type = warentry which = USA value = -10 } 	# USA disengaging 
		command = { type = warentry which = ENG value =  -8 } 	# UK disengaging 
		command = { type = leave_alliance } 			# FRA on their own
		command = { type = dissent value = 10 } 		# Mobilization (Andris: increased from 2)
		command = { type = sleepevent which = 432009  }
	}
}

#AI France builds AA guns in northern France

event = {
	id = 433036
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_ger_HumanPlayer  #Human Germany

		NOT = { atwar = SPR } #Andris: This is trigger for SCW, where typical non-intervention gives +10 dissent to France. Good time for upgrades, while managing dissent.

		NOT = { war = { country = FRA country = GER } }	
		
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 15 month = june  year = 1936 }
	offset = 1 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = august year = 1936 }

	action_a = {
		command = { type = construct which = AA_batteries value = 522} #Rouen
		command = { type = construct which = AA_batteries value = 542} #Colmar
		command = { type = construct which = AA_batteries value = 543} #Nancy
		command = { type = construct which = AA_batteries value = 555} #Strasbourg	
	}
}

#Reaction to German occupation of the Sudetenland (Andris)
#AI France vs. AI Germany

event = {
	id = 1510039
	random = no
	country = FRA

	trigger = {
		ai = yes
		NOT = { flag = fra_global_ger_HumanPlayer } 

		manpower = 101 	#Andris: command "build_division which = infantry" 
				#requires the actual MP to be there for the country
				#otherwise it doesn't execute	 
		OR = {
			control = { province = 578 data = GER } #Karlsbad
			atwar = yes
		}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1944 }

	action_a = {
		command = { type = ai which = core_FRA_38_Infantry.ai }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = sleepevent which = 433041  }
	}
}

#Reaction to German occupation of the Sudetenland (Andris)
#AI France vs. HP Germany

event = {
	id = 433041
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_ger_HumanPlayer 

		manpower = 101 	#Andris: command "build_division which = infantry" 
				#requires the actual MP to be there for the country
				#otherwise it doesn't execute	 
		OR = {
			control = { province = 578 data = GER } #Karlsbad
			atwar = yes
		}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1944 }

	action_a = {			      
		command = { type = ai which = core_FRA_38_Mechanized.ai }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = motorized }
		command = { type = build_division which = motorized }
		command = { type = build_division which = motorized }
		command = { type = build_division which = motorized }
		command = { type = build_division which = motorized }
		command = { type = sleepevent which = 1510039  }
	}
}				

event = {
	id = 433051
	random = no
	country = FRA

	trigger = {
		ai = yes
		war = { country = CZE country = GER }
		NOT = {
			event = 2003 # Treaty of Munich sanctioned by Western Allies
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = august year = 1939 }

	action_a = {
		command = { type = ai which = core_FRA_attack.ai }
	}
}

# French political crisis over fortification effort 
# AI France vs. HP Germany

event = {
	id = 433076
	random = no
	country = FRA
	
	trigger = {
		ai = yes 
		flag = fra_global_ger_HumanPlayer #Human Germany

		NOT = {
			war = { country = GER country = FRA }
			war = { country = GER country = LUX }
			war = { country = GER country = HOL }
			war = { country = GER country = BEL }
			alliance = { country = GER country = FRA }
			alliance = { country = GER country = LUX }
			alliance = { country = GER country = HOL }
			alliance = { country = GER country = BEL }
			puppet = { country = FRA country = GER }
			puppet = { country = LUX country = GER }
			puppet = { country = HOL country = GER }
			puppet = { country = BEL country = GER }	
		}

		random = 70
	}

	name = CEVTNAME_15050
	desc = CEVTDESC_15050
	style = 0

	date = { day = 21 month = july year = 1939 } 
	offset = 10
	deathdate = { day = 5 month = august year = 1939 }

	action_a = {	#Andris: AI France now chooses this against HP Germany, if event triggers
		name = CEVTACTB_15050
		command = { type = dissent value = 15 }
		command = { type = trigger which = 433078 } 		# LUX reaction
		command = { type = trigger which = 433079 } 		# HOL reaction
		command = { type = trigger which = 433080 } 		# BEL reaction
		command = { type = sleepevent which = 15050 }
		command = { type = sleepevent which = 15063 }
	}
	#action_b = {
	#	name = CEVTACTA_15050
	#	command = { type = land_fort which = 518 value = -5 } 	#Lille 
	#	command = { type = land_fort which = 520 value = -5 } 	#Sedan
	#	command = { type = land_fort which = 556 value = -5 } 	#Chaumont
	#	command = { type = land_fort which = 522 value = -5 } 	#Rouen
	#	command = { type = land_fort which = 528 value = -5 } 	#Amiens
	#	command = { type = land_fort which = 529 value = -5 } 	#Reims
	#	command = { type = land_fort which = 525 value = -5 } 	#Troyes
	#		
	#	command = { type = dissent value = -10 }
	#	command = { type = industry which = 518 value = 3 }
	#	command = { type = industry which = 520 value = 3 }
	#	command = { type = industry which = 556 value = 3 }
	#
	#	command = { type = influence value = 30 }
	#	command = { type = sleepevent which = 15050 } 
	#	command = { type = sleepevent which = 15063 } 
	#}
	
}

# Benelux Outrage over French fortification efforts 
# AI France vs. HP Germany

event = { 
	id = 433078
	random = no
	country = LUX

	# Triggered by FRA 433076

	name = CEVTNAME_15051
	desc = CEVTDESC_15051
	style = 0
	
	action_a = {
		name = CEVTACTA_15051
		command = { type = alignment which = fascist value = 50 }
	}
	action_b = {
		name = CEVTACTB_15051
		command = { type = alignment which = fascist value = 100 }
		command = { type = trigger which = 15055 } # GER
		command = { type = switch_allegiance which = FRA value = -1 }
		command = { type = switch_allegiance which = FRA value = -1 }
	}
}

event = { 
	id = 433079
	random = no
	country = HOL

	# Triggered by FRA 433076

	name = CEVTNAME_15051
	desc = CEVTDESC_15051
	style = 0
	
	action_a = {
		name = CEVTACTA_15051
		command = { type = alignment which = fascist value = 50 }
	}
	action_b = {
		name = CEVTACTB_15051
		command = { type = alignment which = fascist value = 100 }
		#command = { type = trigger which = 15056 } # GER		#Andris: Removed possibility of German coup
		#command = { type = switch_allegiance which = FRA value = -1 }
		#command = { type = switch_allegiance which = FRA value = -1 }
		#command = { type = switch_allegiance which = FRA value = -1 }
		#command = { type = switch_allegiance which = FRA value = -1 }
		#command = { type = switch_allegiance which = FRA value = -1 }
	}
	#action_c = {								#Andris: Removed possibility of German coup + join Axis
	#	name = CEVTACTC_15051
	#	command = { type = alignment which = fascist value = 150 }
	#	#command = { type = alliance which = GER }
	#	command = { type = leave_alliance } 
	#	command = { type = trigger which = 15061 } # GER
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#}
}

event = { 
	id = 433080
	random = no
	country = BEL

	# Triggered by FRA 433076

	name = CEVTNAME_15051
	desc = CEVTDESC_15051
	style = 0
	
	action_a = {
		name = CEVTACTA_15051
		command = { type = alignment which = fascist value = 50 }
	}
	action_b = {
		name = CEVTACTB_15051
		command = { type = alignment which = fascist value = 100 }
		command = { type = trigger which = 15057 } # GER
		command = { type = switch_allegiance which = FRA value = -1 }
		command = { type = switch_allegiance which = FRA value = -1 }
		command = { type = switch_allegiance which = FRA value = -1 }
		command = { type = switch_allegiance which = FRA value = -1 }
		command = { type = switch_allegiance which = FRA value = -1 }
	}
	#action_c = {								#Andris: Removed possibility of German coup + join Axis
	#	name = CEVTACTC_15051
	#	command = { type = alignment which = fascist value = 150 }
	#	#command = { type = alliance which = GER }
	#	command = { type = leave_alliance } 
	#	command = { type = trigger which = 15062 } # GER
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#	command = { type = switch_allegiance which = FRA value = -1 }
	#}
}

#Resource Evacuation (Andris)
#AI France vs. HP Germany

event = {
	id = 433081
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_ger_HumanPlayer #Default French resource evacuation strategy also for MP games
		
		alliance = { country = FRA country = ENG } #France not alone against Germany
		war = { country = FRA country = GER }

		#Andris: AI France begins to evacuate resources vs. HP Germany typ. beginning in September 1939
		#However, this event also triggers, if there is an earlier war with CZE, BEL, or Poland (after Jan. 39)
		#It will NOT trigger for an 1936 FRA-GER war, as a result of the Re-occupation of the Rhineland

		OR = {	
			event = 2004 # Czechoslovakia joins the Axis
			alliance = { country = GER country = CZE } #Ahistorical German alliance with Czechoslovakia
			
			event = 2201 # End of Czechoslovakia: Install Tiso in Slovakia (Option A)
			event = 2202 # End of Czechoslovakia: Partition Czecho-Slovakia with Hungary (Option B)
			
			#Germany or Hungary controls Prague
			control = { province = 615 data = GER }	 #Prague
			control = { province = 615 data = HUN }
			
			#Any war with Poland after 1939, whether Poland is Allied or not
			AND = {
				year = 1939
				war = { country = GER country = POL }
			}

			war = { country = GER country = BEL }
		}	
		
		convoypool = 30 #Need to have the transports
	}

	name = AI_EVENT #"Begin Resource Evacuation against HP Germany"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1941 }

	action_a = {
		command = { type = convoy which = 929 value = 1156 when = 30 } #Marseilles-Cape Town: coal/steel/rubber/supplies (no actual supplies sent)
		command = { type = convoy which = 929 value = 1156 when = 28 } #		      coal/rubber	
		command = { type = convoy which = 929 value = 1480 when = 30 } #Marseilles-Colombo:   coal/steel/rubber/supplies (transfer to AST/NZL)
		command = { type = convoypool which = FRA value = -30 }

		#command = { type = trigger  which = 433082 }  #South Africa supply return convoys to France
		command = { type = trigger  which = 433083 }  #UK supply return convoys to France + Colombo-Adelaide + Colombo-Wellington
		command = { type = trigger  which = 433084 }  #Australia convoys to New Zealand  
		command = { type = trigger  which = 433085 }  #New Zealand supply return convoys to Australia
			
	}
}

#event = {
#	id = 433082
#	random = no
#	country = SAF
#
#	name = AI_EVENT
#	desc = ""
#	style = 0
#
#	action_a = {
#		command = { type = convoy which = 1156 value = 929 when = 16 } #Cape Town-Marseilles: returns supplies to France
#		command = { type = convoypool which = SAF value = 30 }
#	}
#}

event = {
	id = 433083
	random = no
	country = ENG

	name = AI_EVENT
	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany. They are sending a large portion of their resource reserves through naval convoys to Colombo. These are to be transferred and sent onto resource depots in Australia and New Zealand. France requests that additional supplies (app. 47/day) be returned to Marseilles, as these are meant to enlarge the convoy size only, and are required for full mobilization."
	style = 0

	action_a = {
		command = { type = convoy which = 1480 value =  929 when = 16 } #Colombo-Marseilles: returns supplies to France
		command = { type = convoypool which = ENG value = 30 }

		command = { type = convoy which = 1480 value = 2066 when = 28 } #Colombo-Adelaide: coal/rubber/supplies (no actual supplies sent)
		command = { type = convoy which = 1480 value = 2140 when = 30 } #Colombo-Wellington: coal/steel/rubber/supplies (no actual supplies sent)	
	}
}

event = {
	id = 433084
	random = no
	country = AST

	name = AI_EVENT
	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany. They have sent a portion of their resource reserves to us through Colombo. Additional naval convoys need to be sent to Wellington, New Zealand (with supplies, which will be returned), as they have more resource space to store the excess."
	style = 0

	action_a = {
		command = { type = convoy which = 2066 value = 2140 when = 28 } #Adelaide-Wellington: coal/rubber/supplies 
		command = { type = convoy which = 2066 value = 2140 when = 28 }
	}
}

event = {
	id = 433085
	random = no
	country = NZL

	name = AI_EVENT
	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany. They have sent a large portion of their resource reserves to us through Colombo and Adelaide. Australia requests that additional supplies (app. 2*31/day) be returned to Adelaide, as these are meant to enlarge the convoy size only, and are required for full mobilization."
	style = 0

	action_a = {
		command = { type = convoy which = 2140 value = 2066 when = 16 } #Wellington-Adelaide: returns supplies to Australia
		command = { type = convoy which = 2140 value = 2066 when = 16 } 
	}
}

#Resource Evacuation (Andris)
#AI France vs. HP Italy

event = {
	id = 433091
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_ita_HumanPlayer
		NOT = { flag = fra_global_ger_HumanPlayer } 
		
		alliance = { country = FRA country = ENG } #France not alone against Germany
		war = { country = FRA country = GER }
		
		#Andris: AI France begins to evacuate resources vs. HP Italy when German Fall Gelb begins
		OR = {
			war = { country = BEL country = GER }
			war = { country = HOL country = GER }
			war = { country = LUX country = GER }
		}

		convoypool = 30 #Need to have the transports
	}

	name = AI_EVENT #"Begin Resource Evacuation against HP Italy"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1941 }

	action_a = {
		command = { type = convoy which = 536 value = 1156 when = 30 } #Nantes-Cape Town: coal/steel/rubber/supplies (no actual supplies sent) (transfer to AST/NZL)
		command = { type = convoy which = 536 value = 1156 when = 28 } #		  coal/rubber	
		command = { type = convoy which = 536 value =  168 when = 30 } #Nantes-St. John's: coal/steel/rubber/supplies (no actual supplies sent)
		command = { type = convoypool which = FRA value = -30 }

		command = { type = trigger  which = 433092 }  #South Africa convoys to Australia
		command = { type = trigger  which = 433094 }  #Australia convoys to New Zealand + supply return convoys to South Africa
		command = { type = trigger  which = 433095 }  #New Zealand supply return convoys to Australia
			
	}
}

event = {
	id = 433092
	random = no
	country = SAF

	name = AI_EVENT
	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany and Italy. They are sending a large portion of their resource reserves through naval convoys to Cape Town. These are to be transferred and sent onto resource depots in Australia and New Zealand."
	style = 0

	action_a = {
		command = { type = convoy which = 1156 value = 2066 when = 30 } #Cape Town-Adelaide : coal/steel/rubber/supplies
		command = { type = convoy which = 1156 value = 2066 when = 28 } #		      coal/rubber	
		command = { type = convoypool which = SAF value = 30 }
	}
}

event = {
	id = 433094
	random = no
	country = AST

	name = AI_EVENT
	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany and Italy. They have sent a portion of their resource reserves to us through Cape Town. Additional naval convoys need to be sent to Wellington, New Zealand (with supplies, which will be returned), as they have more resource space to store the excess."
	style = 0

	action_a = {
		command = { type = convoy which = 2066 value = 2140 when = 30 } #Adelaide-Wellington: coal/steel/rubber/supplies 
		command = { type = convoy which = 2066 value = 2140 when = 28 }	#		      coal/rubber
		command = { type = convoy which = 2066 value = 1156 when = 16 } #Adelaide-Cape Town: returns supplies to South Africa
		command = { type = convoy which = 2066 value = 1156 when = 16 } 
	}
}

event = {
	id = 433095
	random = no
	country = NZL

	name = AI_EVENT
	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany and Italy. They have sent a large portion of their resource reserves to us through Cape Town and Adelaide. Australia requests that additional supplies (app. 2*31/day) be returned to Adelaide, as these are meant to enlarge the convoy size only, and are required for full mobilization."
	style = 0

	action_a = {
		command = { type = convoy which = 2140 value = 2066 when = 16 } #Wellington-Adelaide: returns supplies to Australia
		command = { type = convoy which = 2140 value = 2066 when = 16 } 
	}
}

event = {
	id = 433098
	random = no
	country = AST

	trigger = {
		event = 433092 #South Africa convoys to Australia
		event = 433094 #Australia convoys to New Zealand + supply return convoys to South Africa
		event = 433095 #New Zealand supply return convoys to Australia

		exists = PAR				
		OR = {
			exists = VIC #Andris: Need to add alternate option if Germany chooses full occupation in France
			
		}				
	}

	name = AI_EVENT #"Finish French Resource Evacuation against HP Italy"
	desc = "Turn over Adelaide to a neutral nation (Paraguay), to be returned in 2 weeks. This breaks the AI Allied convoys to Adelaide (from South Africa and New Zealand), and helps those nations not overfocus on convoys, now that the French Resource Evacuation against HP Italy event chain is complete."
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 9
	deathdate = { day = 1 month = january year = 1948 }

	action_a = {
		name = OK
		command = { type = secedeprovince which = PAR value = 2066 } #Adelaide
	}
}

event = { 
	id = 433099 
	random = no
	country = PAR
	
	trigger = {
		event = 433098 #Complete French Resource Evacuation against HP Italy
		control = { province = 2066 data = PAR } #Andris: Need this trigger, otherwise event doesn't trigger properly	
	}
	
	name = AI_EVENT
	desc = "Return Adelaide to Australia to complete French Resource Evacuation against HP Italy event chain."
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 22
	deathdate = { day = 1 month = january year = 1948 }

	action_a = {
		name = OK
		command = { type = secedeprovince which = AST value = 2066 } #Adelaide	
	}
}

#Resource Evacuation (Andris)
#AI France vs. HP Japan

event = {
	id = 433101
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = fra_global_pan_HumanPlayer
		NOT = { flag = fra_global_ger_HumanPlayer } 
		NOT = { flag = fra_global_ita_HumanPlayer }		
		
		
		alliance = { country = FRA country = ENG } #France not alone against Germany
		war = { country = FRA country = GER }
		
		#Andris: AI France begins to evacuate resources vs. HP Japan when German Fall Gelb begins
		OR = {
			war = { country = BEL country = GER }
			war = { country = HOL country = GER }
			war = { country = LUX country = GER }
		}

		#convoypool = 30 #Need to have the transports
	}

	name = AI_EVENT #"Begin Resource Evacuation against HP Japan"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1941 }

	action_a = {
		command = { type = convoy which = 536 value = 1156 when = 30 } #Nantes-Cape Town: coal/steel/rubber/supplies (no actual supplies sent) 
		command = { type = convoy which = 536 value = 1156 when = 28 } #		  coal/rubber	
		command = { type = convoy which = 536 value =  168 when = 30 } #Nantes-St. John's: coal/steel/rubber/supplies (no actual supplies sent)
		#command = { type = convoypool which = FRA value = -30 }

		#command = { type = trigger  which = 433102 }  #South Africa convoys to Australia
		#command = { type = trigger  which = 433104 }  #Australia convoys to New Zealand + supply return convoys to South Africa
		#command = { type = trigger  which = 433105 }  #New Zealand supply return convoys to Australia
			
	}
}

#event = {
#	id = 433102
#	random = no
#	country = SAF
#
#	name = AI_EVENT
#	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany. They are sending a large portion of their resource reserves through naval convoys to Cape Town. These are to be transferred and sent onto resource depots in Australia and New Zealand."
#	style = 0
#
#	action_a = {
#		command = { type = convoy which = 1156 value = 2066 when = 30 } #Cape Town-Adelaide : coal/steel/rubber/supplies
#		command = { type = convoy which = 1156 value = 2066 when = 28 } #		      coal/rubber	
#		command = { type = convoypool which = SAF value = 30 }
#	}
#}

#event = {
#	id = 433104
#	random = no
#	country = AST
#
#	name = AI_EVENT
#	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany. They have sent a portion of their resource reserves to us through Cape Town. Additional naval convoys need to be sent to Wellington, New Zealand (with supplies, which will be returned), as they have more resource space to store the excess."
#	style = 0
#
#	action_a = {
#		command = { type = convoy which = 2066 value = 2140 when = 30 } #Adelaide-Wellington: coal/steel/rubber/supplies 
#		command = { type = convoy which = 2066 value = 2140 when = 28 }	#		      coal/rubber
#		command = { type = convoy which = 2066 value = 1156 when = 16 } #Adelaide-Cape Town: returns supplies to South Africa
#		command = { type = convoy which = 2066 value = 1156 when = 16 } 
#	}
#}

#event = {
#	id = 433105
#	random = no
#	country = NZL
#
#	name = AI_EVENT
#	desc = "The French Interior Ministry has implemented a contingency plan for the coming war with Germany. They have sent a large portion of their resource reserves to us through Cape Town and Adelaide. Australia requests that additional supplies (app. 2*31/day) be returned to Adelaide, as these are meant to enlarge the convoy size only, and are required for full mobilization."
#	style = 0
#
#	action_a = {
#		command = { type = convoy which = 2140 value = 2066 when = 16 } #Wellington-Adelaide: returns supplies to Australia
#		command = { type = convoy which = 2140 value = 2066 when = 16 } 
#	}
#}

event = {
	id = 1510040
	random = no
	country = FRA

	#France trying to help out smaller European countries like Norway, Greece, and Yugoslavia
	
	trigger = {
		ai = yes
		exists = VIC
		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 3
	deathdate = { day = 30 month = december year = 1942} 

	action_a = {
		name = OK
		command = { type = ai which = core_FRA_After_Vichy.ai }
	}
}

event = {
	id = 1510041
	random = no
	country = FRA

	# France has fallen and Germany takes out Greece, Norway, and Yugoslavia

	trigger = { 
		ai = yes
		exists = VIC

		event = 752315 #Crete transfers to UK / End of Greece

		OR = 	
			{
			alliance = { country = NOR country = GER }	#Norway Axis
			NOT = {exists = NOR}				#End of Norway
			}

		OR = 	
			{
			alliance = { country = YUG country = GER }	#YUgoslavia Axis
			NOT = {exists = YUG}				#End of Yugoslavia
			}
					
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_Colonies.ai }
	}
}
		
###########################################################
# LIBERATION OF FRANCE - MODIFIED (by Copper)#
#
# This event makes Allied forces in France more agressive
#########################################################

event = {
	id = 1510042
	random = no
	country = FRA

	trigger = {
		ai = yes
		event = 2802 # Liberation of France event
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
				command = { type = ai which = core_FRA_attack.ai }
	}
}	

############################################################################################
# LOW COUNTRIES STRATEGY CHANGES (1510043-1510046)
############################################################################################

# Belgium AI

event = {
	id = 1510043
	random = no
	country = BEL
	
	trigger = { 
		ai = yes 
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 1 month = december year = 1946 }

	action_a = {
		name = Ok
		command = { type = ai which = core_BEL_War.ai }
	}
}

event = {
	id = 1510044
	random = no
	country = BEL
	
	trigger = { 
		ai = yes 
		OR = {
			control = { province = 548 data = GER }  #Antwerpen
			control = { province = 552 data = GER }  #Bruxelles
			control = { province = 557 data = GER }  #Arlon
		}                             
	}

	name = CEVTNAME_1510044
	desc = CEVTDESC_1510044
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3
	deathdate = { day = 1 month = december year = 1946 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = capital which = 1130 } # Leopoldville
		command = { type = ai which = core_Colonies.ai }

		#Supply remaining troops in Europe
		command = { type = convoy which = 1135 value = 548 when = 17 } #Banana-Antwerpen: oil/supplies
		command = { type = convoy which = 1135 value = 548 when = 17 } #Banana-Antwerpen: oil/supplies
		
	}
}

#Netherlands AI

event = {
	id = 1510045
	random = no
	country = HOL
	
	trigger = { 
		ai = yes 
		atwar = yes
	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936}
	offset = 1
	deathdate = { day = 1 month = december year = 1947 }

	action_a = {
		name = Ok
		command = { type = ai which = core_HOL_War.ai }
	}
}

event = {
	id = 1510046
	random = no
	country = HOL
	
	trigger = { 
		ai = yes 
		war = { country = GER country = HOL }
		
		#OR = {    
		#	control = { province = 561 data = GER } #Arnhem 
		#	control = { province = 590 data = GER } #Groningen 
		#	control = { province = 550 data = GER } #Amsterdam 
		#	control = { province = 551 data = GER } #Eindhoven
		#}
	}

	name = CEVTNAME_1510046
	desc = CEVTDESC_1510046
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3
	deathdate = { day = 1 month = december year = 1941 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = capital which = 1780 } # Batavia
		command = { type = ai which = core_HOL_Colonies.ai } #Needs to be updated
		command = { type = convoy which = 1779 value = 1773 when = 17 } #Yogyakarta-Palembang 
		command = { type = convoy which = 1779 value = 1968 when = 17 } #Yogyakarta-Makassar
		command = { type = convoy which = 1779 value =  550 when = 17 } #Yogyakarta-Amsterdam

		#Resource Evacuation
		command = { type = convoy which =  550 value = 1779 when = 30 } #Amsterdam-Yogyakarta (returns coal/steel/rubber/supplies convoy from 1936 starting scenario) 

		#Add Colonies
		command = { type = addcore   which = 1780} #Batavia
		command = { type = addcore   which = 1779} #Yogyakarta
		command = { type = addcore   which = 1950} #Surabaya
		command = { type = addcore   which = 1951} #Banjuwangi	
		
		#Lose Europe 
		#command = { type = removecore which = 561} #Arnhem 
		#command = { type = removecore which = 590} #Groningen
		#command = { type = removecore which = 550} #Amsterdam
		#command = { type = removecore which = 551} #Eindhoven
	}
}

############################################################################################
# ITALY STRATEGY CHANGES (1510047-1510050)
############################################################################################

event = {
	id = 1510047
	random = no
	country = ITA

	trigger = {
		ai = yes
			
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 15 month = may year = 1937 }
	offset = 1
	deathdate = { day = 30 month = january year = 1938 }

	action_a = {
		command = { type = ai which = core_ITA_38.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = construct which = coastal_fort value = 901 } # Napoli
				
		#command = { type = build_division which = infantry } #Andris
		#command = { type = build_division which = infantry } #Andris
	}
}

event = {
	id = 1510048
	random = no
	country = ITA

	# Italy joins the Axis
	# Note: No early German alliance (before 1938)
	trigger = {
		ai = yes
		OR = {
			alliance = { country = GER country = ITA }
			event = 10001 #GER_BoB.ai (German alliance imminent)
		}		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	
	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ITA_Axis.ai }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }

		#Defensive convoys across the central Mediterranean to Libya
		command = { type = convoy which = 901 value = 1085 when = 17 } #Napoli to Tripoli
		command = { type = convoy which = 901 value = 1087 when = 17 } #Napoli to Sirt
		command = { type = convoy which = 901 value = 1098 when = 17 } #Napoli to Benghazi
	}
}

event = {
	id = 1510049
	random = no
	country = ITA

	# Italy joins the Allies

	trigger = {
		ai = yes
		alliance = { country = ENG country = ITA }		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ITA_Allied.ai }
	}
}

event = {
	id = 1510050
	random = no
	country = ITA

	# Italy on the defensive

	trigger = {
		ai = yes
		NOT = {
			control = { province = 900 data = ITA } #Bari 
			control = { province = 901 data = ITA } #Napoli
			control = { province = 902 data = ITA } #Potenza
			control = { province = 903 data = ITA } #Cosenza
			control = { province = 905 data = ITA } #Bologna
			control = { province = 906 data = ITA } #Firenze
			control = { province = 907 data = ITA } #Ancona
			control = { province = 908 data = ITA } #Roma
			control = { province = 910 data = ITA } #Parma
			control = { province = 912 data = ITA } #Milano
			control = { province = 913 data = ITA } #La Spezia
			control = { province = 1085 data = ITA } # Tripoli
			control = { province = 1097 data = ITA } # Tobruk
		}
	}

	name = AI_EVENT #"Italy on Defensive"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_Defensive.ai }
	}
}

############################################################################################
# UNITED STATES STRATEGY CHANGES (1510051-1510054)
############################################################################################

event = {
	id = 1510051
	random = no
	country = USA

	# Pre-War AI file for the United States

	trigger = {
		ai = yes
		war = { country = GER country = ENG }		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_USA_39.ai }
	}
}

event = {
	id = 1510052
	random = no
	country = USA

	# US Goes on the offensive

	trigger = {
		ai = yes
		atwar = yes
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_USA_War.ai }
	}
}

event = {
	id = 1510053
	random = no
	country = USA

	# Target: Iberia
	
	trigger = {
		ai = yes     
		war = { country = USA country = POR }
		war = { country = USA country = SPA }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1940 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		name = West
		command = { type = ai which = core_USA_Iberia.ai }
	}
}

event = {
	id = 1510054
	random = no
	country = USA

	# USA Target: Italy and France
	
	trigger = {
      	ai = yes
		event = 1510053 # Spain and Portugal were targets
		war = { country = USA country = GER }
		control = { province = 451 data = USA } # Portugal and Spain
		control = { province = 1020 data = USA }
		control = { province = 1019 data = USA }
		control = { province = 975 data = USA }
		NOT = {
			control = { province = 956 data = SPA } # Spain
			control = { province = 988 data = SPA }
			control = { province = 996 data = SPA }
			control = { province = 981 data = SPA }
			control = { province = 990 data = SPA }
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1940 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_USA_War.ai }

	}
}

############################################################################################
# USSR Pre-Barbarossa STRATEGY CHANGES 
############################################################################################

# USSR base AI 1938 - mid/late 1939 (Andris)

event = { 
	id = 222151
	random = no
	country = SOV

	

	trigger = {
		ai = yes
		NOT = {
			war = { country = SOV country = POL }
			war = { country = SOV country = GER }
		}
	}
	
	name = AI_EVENT #"SOV_38 AI"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	
	action_a = {
		command = { type = ai which = core_SOV_38.ai }
	}
}


# USSR Prepares for Kalkin Gol - to deal with ahistorical 1939 war with Japan (by Copper)

event = {
	id = 9500205
	random = no
	country = SOV

	trigger = {
		ai = yes
		NOT = {
			war = { country = SOV country = GER }
			war = { country = SOV country = PAN }
		}
	}
	
	name = AI_EVENT
	desc =""
	style = 0

	date = { day = 1 month = may year = 1939 }
	offset = 3 
	deathdate = { day = 29 month = december year = 1939 }

	action_a = {
		command = { type = ai which = core_SOV_KalkinGol.ai }
		
	}
}


# USSR Unholy Alliance (by Copper)
## Needs to be integrated better!!!!!!!!!!!!!!!

event = {
	id = 9500206
	random = no
	country = SOV

	trigger = {
		ai = yes
		event = 2602 #alliance event between GER and SOV
		#alliance = { country = GER country = SOV }		
	}
	
	name = AI_EVENT #"Core SOV_Unholy.ai"
	desc =""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3 
	deathdate = { day = 29 month = december year = 1939 }

	action_a = {
		command = { type = ai which = core_SOV_Unholy.ai }
		command = { type = sleepevent which = 1510120 } # sleep Winter War AI
		command = { type = sleepevent which = 1510055 } # sleep standard 1940 AI		
	}
}


# USSR Prepares for Winter War (by Copper)

event = {
	id = 1510120 
	random = no
	country = SOV

	trigger = {
		ai = yes
		event = 2013 # Historical Molotov-Ribbentrop Pact #Andris: may need to add some alternate triggers	

		NOT = { 					#Not at war with Germany or Japan
			war = { country = SOV country = GER }
			war = { country = SOV country = PAN } 
		} 
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3
	deathdate = { day = 30 month = january year = 1940 }

	action_a = {
		command = { type = ai which = core_SOV_WinterWar.ai }
		command = { type = sleepevent which = 9500206 } # sleep Unholy Alliance AI
	}
}

# USSR Post-Winter War (whether it actually occured or not)

event = {
	id = 1510055
	random = no
	country = SOV

	trigger = {
		ai = yes
		
		OR = {  #Andris: USSR either at war with Finland and controls Viipuri/Vaasa/Turku,
			#OR it controls Helsinki, OR it is not at war with Finland (either Winter War ended
			#or no Winter War)

			AND = {
				control = { province = 787 data = SOV } #Viipuri
				control = { province = 798 data = SOV } #Vaasa
				control = { province = 705 data = SOV } #Turku
			}

			control = { province = 706 data = SOV } # Helsinki
			
			NOT = {
				war = { country = SOV country = FIN }
			}
		}

		NOT = { war = { country = SOV country = GER} 	}

		
	}
	
	name = AI_EVENT #"Core_SOV_40.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 }
	offset = 5 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }


	action_a = {
		command = { type = ai which = core_SOV_40.ai }
		
	}
}

event = { 
	id = 222152
	random = no
	country = SOV

	# Andris: Soviet IC/Tech AI from Finnish Winter War to Barbarossa

	trigger = {
		ai = yes
		NOT = {
			war = { country = SOV country = GER }
		}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 20 month = november year = 1939 }
	offset = 2 
	deathdate = { day = 1 month = february year = 1940 }
	
	action_a = {
		command = { type = ai which = core_SOV_40_IC_Tech.ai }
	}
}

###################################################
#USSR Barbarossa Strategy 
###################################################

# Phase 1: Border Battle (Historically, June - mid-July 1941)

event = {
	id = 1510201
	random = no
	country = SOV

	trigger = {
		ai = yes
		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }
		
		war = { country = GER country = SOV }
		under_attack = SOV  #Germany initiates German-Soviet war

	}
	
	name = AI_EVENT #"core_SOV_Barbarossa_Phase1_BorderBattle.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SOV_Barbarossa_Phase1_BorderBattle.ai }
	}
}

# Phase 2: Name TBD (Historically, mid-July - Oct 1941)

event = {
	id = 1510211
	random = no
	country = SOV

	trigger = {
		ai = yes
		event = 1510201 #SOV_Barbarossa_Phase1_BorderBattle

		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }
		war = { country = GER country = SOV }

		#German breakthrough along historical path of Army Group North/Center/South
		OR = {

			#Human Germany trigger: 2 of 3 Army Groups achieve Phase 1 targets 
			OR = {
				flag = sov_global_ger_HumanPlayer #Human Germany
				
				AND = {
					OR = { #Army Group North crosses Daugeva River
						NOT = { control = { province = 707 data = SOV } } #Tallinn
						NOT = { control = { province = 709 data = SOV } } #Riga
						NOT = { control = { province = 708 data = SOV } } #Rezekne
						NOT = { control = { province = 785 data = SOV } } #Pskov	
					}

					OR = { #Army Group Center reaches Belorussia
						NOT = { control = { province = 778 data = SOV } } #Minsk
						NOT = { control = { province = 779 data = SOV } } #Mogilev
						NOT = { control = { province = 772 data = SOV } } #Bobrujsk
					}

				} 

				AND = {
					OR = { #Army Group Center reaches Belorussia
						NOT = { control = { province = 778 data = SOV } } #Minsk
						NOT = { control = { province = 779 data = SOV } } #Mogilev
						NOT = { control = { province = 772 data = SOV } } #Bobrujsk
					}

					OR = { #Army Group South reaches central Ukraine
						NOT = { control = { province = 774 data = SOV } } #Zjitomir
						NOT = { control = { province = 766 data = SOV } } #Vinnytsa
						NOT = { control = { province = 769 data = SOV } } #Kotovsk
						#NOT = { control = { province = 764 data = SOV } } #Odessa					
						NOT = { control = { province = 865 data = SOV } } #Dnepropetrovsk
						NOT = { control = { province = 770 data = SOV } } #Kirovograd
					}
				}

				AND = {
					OR = { #Army Group North establishes bridgehead across Daugeva River
						NOT = { control = { province = 707 data = SOV } } #Tallinn
						NOT = { control = { province = 709 data = SOV } } #Riga
						NOT = { control = { province = 708 data = SOV } } #Rezekne
						NOT = { control = { province = 785 data = SOV } } #Pskov	
					}

					OR = { #Army Group South reaches central Ukraine
						NOT = { control = { province = 774 data = SOV } } #Zjitomir
						NOT = { control = { province = 766 data = SOV } } #Vinnytsa
						NOT = { control = { province = 769 data = SOV } } #Kotovsk
						#NOT = { control = { province = 764 data = SOV } } #Odessa					
						NOT = { control = { province = 865 data = SOV } } #Dnepropetrovsk
						NOT = { control = { province = 770 data = SOV } } #Kirovograd
					}
				}
			}
			
			#Ahistorical trigger (AI and Human Germany) : Bridgehead across Dniepr River
			
			OR = {
				NOT = { control = { province = 776 data = SOV } } #Chernigov
				NOT = { control = { province = 775 data = SOV } } #Kiev
				NOT = { control = { province = 857 data = SOV } } #Kharkov
				NOT = { control = { province = 864 data = SOV } } #Donetsk
				NOT = { control = { province = 863 data = SOV } } #Stalino
			}

			#AI Germany trigger: 3 of 3 Army Groups achieve Phase 1 targets 
			#USSR does not control Riga OR Pskov + Minsk + Zjitomir 
			
			AND = { 

				NOT = { flag = sov_global_ger_HumanPlayer } #AI Germany
				OR = {
					NOT = { control = { province = 709 data = SOV } } #Riga
					NOT = { control = { province = 785 data = SOV } } #Pskov
				}
				NOT = { control = { province = 778 data = SOV } } #Minsk
				NOT = { control = { province = 774 data = SOV } } #Zjitomir

			}

		}

	}
	
	name = AI_EVENT #"core_SOV_Barbarossa_Phase2.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SOV_Barbarossa_Phase2.ai }
	}
}

# Phase 3: Operation Typhoon (Historically, Oct-Dec 1941)

event = {
	id = 1510221
	random = no
	country = SOV

	trigger = {
		ai = yes
		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }
		war = { country = GER country = SOV }

	}
	
	name = AI_EVENT #"core_SOV_Barbarossa_Phase3_OperationTyphoon.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { }
		#command = { type = ai which = core_SOV_Barbarossa_Phase3_OperationTyphoon.ai }
	}
}

# Phase 4: Winter Counteroffensive (Historically, Dec. 1941-May 1942)

event = {
	id = 1510231
	random = no
	country = SOV

	trigger = {
		ai = yes
		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }
		
		war = { country = GER country = SOV }
		NOT = {
			war = { country = PAN country = SOV } #Can redeploy Siberian divisions
		}

	}
	
	name = AI_EVENT #"core_SOV_Barbarossa_Phase4_WinterCounteroffensive.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { }
		#command = { type = ai which = core_SOV_Barbarossa_Phase4_WinterCounteroffensive.ai }
	}
}

# USSR goes on the counter-offensive against Germany

event = {
	id = 1510056
	random = no
	country = SOV

	

	trigger = {
		ai = yes
		war = { country = GER country = USA }
		war = { country = GER country = ENG }
		war = { country = GER country = SOV }
		# event = 10012 # USSR_defense.ai (This event was blocked off)
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SOV_Rebound.ai }
	}
}


# USSR goes on Suvorov-style offensive

event = {
	id = 1510057
	random = no
	country = SOV

	trigger = {
		ai = yes
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SOV_Rebound.ai }
	}
}


###################################################
#USSR Post-Barbarossa Strategy 
###################################################

# End of Great Patriotic War (SOV AI alone) Normal

event = {
	id = 1510058  # Normal Termination of Soviet GPW vs Human Germany
	random = no
	country = SOV

	trigger = {
		ai = yes
		flag = sov_global_ger_HumanPlayer

		event = 222301 	# Great Patriotic War for SOV AI alone

		NOT = {
			war = { country = SOV country = ENG }
			war = { country = SOV country = USA }
		}
		
		NOT = {
			control = { province = 602 data = GER } # Berlin
			control = { province = 716 data = GER } # Polish territories
			control = { province = 717 data = GER } # Polish territories
			control = { province = 718 data = GER } # Polish territories
			control = { province = 721 data = GER } # Polish territories
			control = { province = 719 data = GER } # Polish territories
			control = { province = 725 data = GER } # Polish territories
			control = { province = 720 data = GER } # Polish territories
			control = { province = 722 data = GER } # Polish territories
			control = { province = 649 data = GER } # Polish territories
			control = { province = 723 data = GER } # Polish territories
			control = { province = 643 data = GER } # Polish territories
			control = { province = 642 data = GER } # Polish territories
			control = { province = 724 data = GER } # Polish territories
			control = { province = 707 data = GER } # Baltic territories
			control = { province = 708 data = GER } # Baltic territories
			control = { province = 709 data = GER } # Baltic territories
			control = { province = 713 data = GER } # Baltic territories
			control = { province = 712 data = GER } # Baltic territories
			control = { province = 711 data = GER } # Baltic territories
			control = { province = 714 data = GER } # Baltic territories
		}

		control = { province =  846 data = SOV } # Moscow
		control = { province =  788 data = SOV } # Leningrad
		control = { province = 1225 data = SOV } # Stalingrad
		control = { province = 1359 data = SOV } # Caucasus region
		control = { province = 1360 data = SOV } # Caucasus region
		control = { province = 1260 data = SOV } # Caucasus region
		control = { province = 1259 data = SOV } # Caucasus region
		control = { province = 1258 data = SOV } # Caucasus region
		control = { province = 1220 data = SOV } # Caucasus region
		control = { province = 1222 data = SOV } # Caucasus region
		control = { province = 1256 data = SOV } # Caucasus region
		control = { province =  862 data = SOV } # Western USSR border
		control = { province =  863 data = SOV } # Western USSR border
		control = { province =  764 data = SOV } # Western USSR border
		control = { province =  769 data = SOV } # Western USSR border
		control = { province =  766 data = SOV } # Western USSR border
		control = { province =  774 data = SOV } # Western USSR border
		control = { province =  773 data = SOV } # Western USSR border
		control = { province =  772 data = SOV } # Western USSR border
		control = { province =  778 data = SOV } # Western USSR border
		control = { province =  784 data = SOV } # Western USSR border
		control = { province =  785 data = SOV } # Western USSR border
		control = { province =  791 data = SOV } # Western USSR border		
	}
	
	name = "End of Great Patriotic War (Normal)"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 7
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = gain_tech which = 11514 } # End of GPW
		command = { type = ai which = core_SOV_Post.ai }
		command = { type = sleepevent which = 1510085 } # alternate GPW-end event
	}
}

# End of Great Patriotic War (SOV AI alone) Early

event = {
	id = 1510085  # Early  Termination of Soviet GPW vs AI Germany
	random = no
	country = SOV

	trigger = {
		ai = yes
		NOT = {	flag = sov_global_ger_HumanPlayer }

		event = 222301 	# Great Patriotic War for SOV AI alone

		NOT = {
			war = { country = SOV country = ENG }
			war = { country = SOV country = USA }
		}
		
		OR = {
			AND = {
				control = { province = 602 data = SOV } # Berlin
				control = { province = 607 data = SOV } # Landsberg
				control = { province = 604 data = SOV } # Dresden
				control = { province = 598 data = SOV } # Rostock	
			}
		
			AND = {
				NOT = {
					control = { province = 716 data = GER } # Polish territories
					control = { province = 717 data = GER } # Polish territories
					control = { province = 718 data = GER } # Polish territories
					control = { province = 721 data = GER } # Polish territories
					control = { province = 719 data = GER } # Polish territories
					control = { province = 725 data = GER } # Polish territories
					control = { province = 707 data = GER } # Baltic territories
					control = { province = 708 data = GER } # Baltic territories
				}

				control = { province =  846 data = SOV } # Moscow
				control = { province =  788 data = SOV } # Leningrad
				control = { province = 1225 data = SOV } # Stalingrad
				control = { province = 1359 data = SOV } # Caucasus region
				control = { province = 1360 data = SOV } # Caucasus region
				control = { province = 1260 data = SOV } # Caucasus region
				control = { province = 1259 data = SOV } # Caucasus region
				control = { province = 1258 data = SOV } # Caucasus region
				control = { province = 1220 data = SOV } # Caucasus region
				control = { province = 1222 data = SOV } # Caucasus region
				control = { province = 1256 data = SOV } # Caucasus region
				control = { province =  862 data = SOV } # Western USSR border
				control = { province =  863 data = SOV } # Western USSR border
				control = { province =  764 data = SOV } # Western USSR border
				control = { province =  769 data = SOV } # Western USSR border
				control = { province =  766 data = SOV } # Western USSR border
				control = { province =  774 data = SOV } # Western USSR border
				control = { province =  773 data = SOV } # Western USSR border
				control = { province =  772 data = SOV } # Western USSR border
				control = { province =  778 data = SOV } # Western USSR border
				control = { province =  784 data = SOV } # Western USSR border
				control = { province =  785 data = SOV } # Western USSR border
				control = { province =  791 data = SOV } # Western USSR border		
			}
		}
	}

	name = "End of Great Patriotic War (Early)"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 7
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = gain_tech which = 11514 } # End of GPW
		command = { type = ai which = core_SOV_Post.ai }
		command = { type = sleepevent which = 1510058 } # alternate GPW-end event
	}
}

# End of Great Patriotic War (SOV AI with Allied HP) Normal

event = {
	id = 222305  # Normal Termination of Soviet GPW vs Human Germany
	random = no
	country = SOV

	trigger = {
		ai = yes
		flag = sov_global_ger_HumanPlayer

		event = 222302 	# Great Patriotic War for SOV AI with Allied HP

		NOT = {
			war = { country = SOV country = ENG }
			war = { country = SOV country = USA }
		}
		
		NOT = {
			control = { province = 602 data = GER } # Berlin
			control = { province = 716 data = GER } # Polish territories
			control = { province = 717 data = GER } # Polish territories
			control = { province = 718 data = GER } # Polish territories
			control = { province = 721 data = GER } # Polish territories
			control = { province = 719 data = GER } # Polish territories
			control = { province = 725 data = GER } # Polish territories
			control = { province = 720 data = GER } # Polish territories
			control = { province = 722 data = GER } # Polish territories
			control = { province = 649 data = GER } # Polish territories
			control = { province = 723 data = GER } # Polish territories
			control = { province = 643 data = GER } # Polish territories
			control = { province = 642 data = GER } # Polish territories
			control = { province = 724 data = GER } # Polish territories
			control = { province = 707 data = GER } # Baltic territories
			control = { province = 708 data = GER } # Baltic territories
			control = { province = 709 data = GER } # Baltic territories
			control = { province = 713 data = GER } # Baltic territories
			control = { province = 712 data = GER } # Baltic territories
			control = { province = 711 data = GER } # Baltic territories
			control = { province = 714 data = GER } # Baltic territories
		}

		control = { province =  846 data = SOV } # Moscow
		control = { province =  788 data = SOV } # Leningrad
		control = { province = 1225 data = SOV } # Stalingrad
		control = { province = 1359 data = SOV } # Caucasus region
		control = { province = 1360 data = SOV } # Caucasus region
		control = { province = 1260 data = SOV } # Caucasus region
		control = { province = 1259 data = SOV } # Caucasus region
		control = { province = 1258 data = SOV } # Caucasus region
		control = { province = 1220 data = SOV } # Caucasus region
		control = { province = 1222 data = SOV } # Caucasus region
		control = { province = 1256 data = SOV } # Caucasus region
		control = { province =  862 data = SOV } # Western USSR border
		control = { province =  863 data = SOV } # Western USSR border
		control = { province =  764 data = SOV } # Western USSR border
		control = { province =  769 data = SOV } # Western USSR border
		control = { province =  766 data = SOV } # Western USSR border
		control = { province =  774 data = SOV } # Western USSR border
		control = { province =  773 data = SOV } # Western USSR border
		control = { province =  772 data = SOV } # Western USSR border
		control = { province =  778 data = SOV } # Western USSR border
		control = { province =  784 data = SOV } # Western USSR border
		control = { province =  785 data = SOV } # Western USSR border
		control = { province =  791 data = SOV } # Western USSR border		
	}
	
	name = "End of Great Patriotic War (Normal)"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 7
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = gain_tech which = 11534 } # End of GPW
		command = { type = ai which = core_SOV_Post.ai }
		command = { type = sleepevent which = 222306 } # alternate GPW-end event
	}
}

# End of Great Patriotic War (SOV AI with Allied HP) Early

event = {
	id = 222306  # Early  Termination of Soviet GPW vs AI Germany
	random = no
	country = SOV

	trigger = {
		ai = yes
		NOT = {	flag = sov_global_ger_HumanPlayer }

		event = 222302 	# Great Patriotic War for SOV AI with Allied HP

		NOT = {
			war = { country = SOV country = ENG }
			war = { country = SOV country = USA }
		}
		
		OR = {
			AND = {
				control = { province = 602 data = SOV } # Berlin
				control = { province = 607 data = SOV } # Landsberg
				control = { province = 604 data = SOV } # Dresden
				control = { province = 598 data = SOV } # Rostock	
			}
		
			AND = {
				NOT = {
					control = { province = 716 data = GER } # Polish territories
					control = { province = 717 data = GER } # Polish territories
					control = { province = 718 data = GER } # Polish territories
					control = { province = 721 data = GER } # Polish territories
					control = { province = 719 data = GER } # Polish territories
					control = { province = 725 data = GER } # Polish territories
					control = { province = 707 data = GER } # Baltic territories
					control = { province = 708 data = GER } # Baltic territories
				}

				control = { province =  846 data = SOV } # Moscow
				control = { province =  788 data = SOV } # Leningrad
				control = { province = 1225 data = SOV } # Stalingrad
				control = { province = 1359 data = SOV } # Caucasus region
				control = { province = 1360 data = SOV } # Caucasus region
				control = { province = 1260 data = SOV } # Caucasus region
				control = { province = 1259 data = SOV } # Caucasus region
				control = { province = 1258 data = SOV } # Caucasus region
				control = { province = 1220 data = SOV } # Caucasus region
				control = { province = 1222 data = SOV } # Caucasus region
				control = { province = 1256 data = SOV } # Caucasus region
				control = { province =  862 data = SOV } # Western USSR border
				control = { province =  863 data = SOV } # Western USSR border
				control = { province =  764 data = SOV } # Western USSR border
				control = { province =  769 data = SOV } # Western USSR border
				control = { province =  766 data = SOV } # Western USSR border
				control = { province =  774 data = SOV } # Western USSR border
				control = { province =  773 data = SOV } # Western USSR border
				control = { province =  772 data = SOV } # Western USSR border
				control = { province =  778 data = SOV } # Western USSR border
				control = { province =  784 data = SOV } # Western USSR border
				control = { province =  785 data = SOV } # Western USSR border
				control = { province =  791 data = SOV } # Western USSR border		
			}
		}
	}

	name = "End of Great Patriotic War (Early)"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 7
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = gain_tech which = 11534 } # End of GPW
		command = { type = ai which = core_SOV_Post.ai }
		command = { type = sleepevent which = 222305 } # alternate GPW-end event
	}
}

############################################################################################
# BRAZIL JOINS THE ALLIES (1510059)
############################################################################################

event = {
	id = 1510059
	random = no
	country = BRA

	trigger = {
		ai = yes
		atwar = yes
		alliance = { country = BRA  country = ENG }
		}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_Brazil_War_allies.ai }
	}
}


############################################################################################
# ETHIOPIA JOINS THE AXIS (1510062)
############################################################################################

event = {
	id = 1510062
	random = no
	country = ETH
	
	trigger = {
	      	ai = yes     
		OR = {
			puppet = { country = ETH country = ITA } 
			alliance = { country = ETH country = GER }
			}
		}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_ETH_Axis.ai }
	}
}

############################################################################################
# NATIONALIST CHINA JOINS THE ALLIES (1510063)
############################################################################################

event = {
	id = 1510063
	random = no
	country = CHI

	trigger = {
		ai = yes
		exists = ENG
		war = { country = PAN country = CHI } #Japan has DOW'ed China
		war = { country = PAN country = USA } #Japan has DOW'ed USA
		alliance = { country = PAN country = GER } #Japan has gone Axis
		NOT = {
			alliance = { country = CHI country = USA } #If UK is already annexed
			alliance = { country = CHI country = ENG } #China shouldn't be Allied yet
			alliance = { country = CHI country = GER } #China shouldn't be Axis either
			alliance = { country = CHI country = SOV } #China shouldn't be Comintern
			alliance = { country = GER country = ENG } #England shouldn't have left the Allies
			war = { country = ENG country = CHI } # China shouldn't be at war with England
	      }
	}

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	name = CEVTNAME_1510063
	desc = CEVTDESC_1510063
	style = 0

	action_a = {
		name = CEVTACTA_OK
		command = { type = alliance which = ENG }
		command = { type = alignment which = democratic value = 100 }
		command = { type = dissent value = -10 }
		}
	}

############################################################################################
# BALKANS AXIS, COMINTERM OR ALLIES (1510064-1510078)
############################################################################################

event = {
	id = 1510064
	random = no
	country = BUL

	# Bulgaria joins the Cominterm
	
	trigger = {
		NOT = { alliance = { Country = SOV country = ENG } }

		Alliance = { Country = SOV country = BUL }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 1510065
	random = no
	country = BUL

	# Bulgaria joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = BUL }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510066
	random = no
	country = CZE

	# Czechoslovakia joins the Allies
	
	trigger = {
		Alliance = { Country = ENG country = CZE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510067
	random = no
	country = CZE

	# Czechoslovakia joins the Cominterm
	
	trigger = {
		NOT = { alliance = { Country = SOV country = ENG } }
		Alliance = { Country = SOV country = CZE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 1510068
	random = no
	country = CZE

	# Czechoslovakia joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = CZE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510069
	random = no
	country = GRE

	# Greece joins the Allies
	
	trigger = {
		Alliance = { Country = ENG country = GRE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_GRE_Allied.ai }
	}
}

event = {
	id = 1510070
	random = no
	country = GRE

	# Greece joins the Cominterm
	
	trigger = {
		NOT = { alliance = { Country = SOV country = ENG } }
		Alliance = { Country = SOV country = GRE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 1510071
	random = no
	country = GRE

	# Greece joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = GRE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510072
	random = no
	country = HUN

	# Hungary joins the Cominterm
	
	trigger = {
		NOT = { alliance = { Country = SOV country = ENG } }
		alliance = { Country = SOV country = HUN }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 1510073
	random = no
	country = HUN

	# Hungary joins the Axis
	
	trigger = {
		OR = {
			alliance = { country = GER country = HUN }
			year = 1940 #Andris
		}	
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		#command = { type = ai which = core_BKN_Axis.ai }
		command = { type = ai which = core_HUN_40.ai }
	}
}

event = {
	id = 1510074
	random = no
	country = ROM

	# Romania joins the Cominterm
	
	trigger = {
		NOT = { alliance = { Country = SOV country = ENG } }
		Alliance = { Country = SOV country = ROM }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 1510075
	random = no
	country = ROM

	# Romania joins the Axis
	
	trigger = {
		OR = {
			#Option 1: German alliance
			alliance = { country = GER country = ROM }
			
			#Option 2: USSR gets Bessarabia (typ. June 1940)
			event = 2607  
			
			#Option 3: USSR gets Bessarabia by demanding territory (rare)
			AND = {      
				control = { province = 767 data = SOV }  #Beltsy
				control = { province = 763 data = SOV }  #Chisinau
			}
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		#command = { type = ai which = core_BKN_Axis.ai }
		command = { type = ai which = core_ROM_41.ai }
		command = { type = province_keypoints which = 761 value = -1 }	#Constanta
		command = { type = province_keypoints which = 739 value =  1 }	#Timisoara
	}
}

event = {
	id = 1510076
	random = no
	country = YUG

	# Yugoslavia joins the Allies
	
	trigger = {
		Alliance = { Country = ENG country = YUG }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_YUG_Allied.ai }
	}
}

event = {
	id = 1510077
	random = no
	country = YUG

	# Yugoslavia joins the Cominterm
	
	trigger = {
		NOT = { alliance = { Country = SOV country = ENG } }
		Alliance = { Country = SOV country = YUG }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 1510078
	random = no
	country = YUG

	# Yugoslavia joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = YUG }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

############################################################################################
# CONVOYS (1510079-1510080)
############################################################################################

event = {
	id = 1510079
	random = no
	country = USA

	# United States to United Kingdom sending Oil and Supplies
	# Note: event 322501 similar, but that event sends convoys when US and UK BOTH are AI

	trigger = {
		ai = yes
		war = { country = USA country = GER }
		war = { country = GER country = ENG }
		alliance = { country = USA country = ENG }
	}
	
	name = AI_Event
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 125 value = 489 when = 17 } # Boston to Manchester (supplies/oil)
	}
}

event = {
	id = 1510080
	random = no
	country = CAN

	# Canada to United Kingdom sending Steel and Supplies

	trigger = {
		ai = yes
		atwar = yes
		atwar = ENG
		alliance = { country = CAN country = ENG }
	}
	
	name = AI_Event
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 15 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 153 value = 489 when = 18 } # Halifax to Manchester (supplies/steel)
	}
}

###############################
### (AI) Commonwealth + Allied Resource Convoys: 
################################

#England-Canada (coal/rubber/supplies + coal/supplies) event ENG272165/ENG272166
#May need to add these convoys to UK272167 and 272168

#England-South Africa (coal/rubber/supplies + coal/supplies) event ENG272165/ENG272166
#May need to add these convoys to UK272167 and 272168

#England-Australia
#Typically, Australia starts to run low on coal beg. in 1941

event = { 
	id = 372401
	random = no 
	country = ENG 

	trigger = { 	
			ai = yes 
			atwar = yes
			atwar = AST

	}

	name = AI_EVENT #"England-Australia Resource Convoys"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1941 }
	action_a = { 
		name = OK		
		command = { type = convoy which =  489 value = 2075 when = 28 } #Manchester-Melbourne (Coal/Rubber)
 		command = { type = convoy which = 1459 value = 2075 when = 20 } #Bombay-Melbourne (just coal)
	}
}

#England-Poland
#Sends resources after alliance with Poland (typ. March 1939)

event = { 
	id = 372416
	random = no 
	country = ENG 

	trigger = { 	
			ai = yes 
			alliance = { country = POL country = ENG }	
	}

	name = AI_EVENT #"England-Poland Resource Convoys"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 10 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	action_a = { 
		name = OK		
		command = { type = convoy which = 489 value = 645 when = 30 } #Manchester-Danzig (Coal/Steel/Rubber/Supplies)
 		command = { type = convoy which = 489 value = 645 when = 20 } #Manchester-Danzig (Coal, supplies)
		command = { type = convoy which = 503 value = 645 when = 20 } #Portsmouth-Danzig (Coal, supplies)
		command = { type = convoy which = 503 value = 645 when = 20 }
	}
}


#This event triggers typ. if Allies declare war on Germany w/o Danzig or War event (702042)
#Also, if Germany chooses  172080B, then later (typ. human exploit) DOWs Poland
#Sends supplies back so Poland does not have large stockpile that Germany can take 

event = { 
	id = 372421
	random = no 
	country = POL 

	trigger = { 	
			ai = yes 
			event = 372416
			alliance = { country = POL country = ENG }
			war = { country = GER country = POL }
			NOT = {event = 702042} #Danzig or War-WAR!/Poland Allied
	}

	name = AI_EVENT #"Poland Evacuates Resources to England"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 10 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	action_a = { 
		name = OK		
		command = { type = convoy which = 645 value = 489 when = 30 } #Danzig-Manchester (Coal/Steel/Rubber/Supplies)
 		#command = { type = convoy which = 645 value = 503 when = 20 } #Danzig-Portsmouth (Coal)
	}
}

#England-Holland
#Sends supplies to new capital in East Indies

event = { 
	id = 372426
	random = no 
	country = ENG 

	trigger = { 	
			ai = yes 
			alliance = { country = ENG country = HOL }
			war = { country = GER country = HOL }	
		}

	name = AI_EVENT #"England-Dutch Resource Convoys"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 10 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	action_a = { 
		name = OK	
		
		command = { type = convoy which = 489 value = 1779 when = 17 } #Manchester-Yogyakarta (Supplies/oil)
		command = { type = convoy which = 1283 value = 1768 when = 17 } #Aden-Padang (Supplies/oil)

		#Replenish UK oil (1 of 2 will be filled per AI convoy rules)
		command = { type = convoy which = 1063 value = 491 when = 1 } #Lagos-Cardiff (oil)  
		command = { type = convoy which = 1065 value = 491 when = 1 } #Port Harcourt-Cardiff (oil) 				
	}
}

#England-Norway
#AI Norway is supplied when at war with anyone, human Norway only if at war with USSR or Germany

event = { 
	id = 1002300
	random = no 
	country = NOR

	trigger = { 	

			NOT = { event = 1500005 } #AI England
 
			alliance = { country = NOR country = ENG }
			OR = {
				AND = {
					ai = no #Human Norway	
					OR =  {
						war = { country = GER country = NOR }
						war = { country = SOV country = NOR }
					}
				}

				AND = { 
					#Attack on AI Norway by anyone 
					ai = yes #AI Norway
					under_attack = NOR
				}
			}

			NOT = { coal = 6000 } #Low on coal 
		}

	name = "Request Assistance from United Kingdom"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 5 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = december year = 1947 }
	action_a = { 
		name = OK		
		command = { } 
 		
	}
}

event = { 
	id = 1002301
	random = no 
	country = ENG

	trigger = { 	
			ai = yes 
			alliance = { country = NOR country = ENG }
			
			event = 1002300 #Norway requests assistance
			NOT = { event = 272619 } #Sea Lion Initial Success

			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 491 data = ENG } # Cardiff

			coal = 75000 
			
		}

	name = AI_EVENT #"England-Norway Resource Convoys"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 5 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = december year = 1947 }
	action_a = { 
		name = OK		
		command = { type = convoy which = 489 value = 680 when = 20 } #Manchester-Narvik (Coal/Supplies)
 		
	}
}

#England-Iceland

event = { 
	id = 1002302
	random = no
	country = ENG
	
	trigger = {
			alliance = { country = ICL country = ENG }
		}
		
	name = AI_EVENT #"England-Iceland Resource Convoys"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936}	
	offset = 5
	deathdate = { day = 30 month = december year = 1947 }
	action_a = {
		name = OK
		command = { type = convoy which = 489 value = 441 when = 30} #Manchester-Reyjkavik: coal/steel/rubber/supplies
	}
	
}

#South Africa-England

event = {
	id = 1510028 #This event also part of South Africa mobilization, thus added transports
	random = no
	country = SAF
	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SAF_War.ai }
		command = { type = convoy which = 1156 value = 489 when = 16 } #Cape Town-Manchester (returns supplies to UK)
		command = { type = convoy which = 1156 value = 489 when = 16 } 
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

#England-USA Rubber convoys

event = {
	id = 272176
	random = no
	country = ENG
	
	trigger = {
		ai = yes     
		alliance = { country = ENG  country = USA }
		war = { country = GER country = ENG }
	
	  	NOT = {
			event = 1500004 #USA not human 
		}
	}

	name = AI_EVENT #"British Resource Convoys to USA"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		
		command = { type = convoy which = 489 value = 124 when = 25 } # Manchester-New York (rubber/oil/supplies)
		#command = { type = convoy which = 489 value = 124 when = 24 }
		
		command = { type = convoy which = 489 value = 178 when = 25 } # Manchester-Washington DC (rubber/oil/supplies)
		#command = { type = convoy which = 489 value = 178 when = 24 }
				
	}
}


#England Wartime Resource Replenishments

event = { 
	id = 372501
	random = no 
	country = ENG 

	trigger = { 	
			ai = yes 
			atwar = yes
			
			year = 1940
			NOT = {rubber = 95000}
					
		}

	name = AI_EVENT #"England AI War Convoys Part 1"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = { 
		name = OK

		command = { type = convoy which = 1766 value = 1459 when = 8 } #Singapore - Bombay (rubber)  
		 		
	}
}


event = { 
	id = 372511
	random = no 
	country = ENG 

	trigger = { 	
			ai = yes 
			atwar = yes
			
			year = 1941
			
			#At least 2 of the 3 main resources need to be <90,000
			OR = { 
				AND = {
					NOT = {coal   = 90000}
					NOT = {steel  = 90000}
				}
				AND = {
					NOT = {coal   = 90000}
					NOT = {rubber = 90000}
				}
				AND = {
					NOT = {steel  = 90000}
					NOT = {rubber = 90000}
				}
			}
		
		}

	name = AI_EVENT #"England AI War Convoys Part 2"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1941 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = { 
		name = OK

		#Replenish UK resources (1 of 2 will be filled per AI convoy rules)
		command = { type = convoy which = 1309 value = 491 when = 15 } #Dar es Salaam - Cardiff (coal/steel/rubber/oil)  
		command = { type = convoy which = 1135 value = 491 when = 15 } #Banana - Cardiff (coal/steel/rubber/oil) 		
		 		
	}
}


###########################
#USA Supply convoys to Allies
############################

event = {
	id = 322501 
	random = no
	country = USA
	
	trigger = {
		ai = yes     
		alliance = { country = ENG  country = USA }
		war = { country = GER country = ENG }
	
	  	NOT = {
			event = 1500005 #England not human 
		}
	}
	name = AI_EVENT #"USA Lend-Lease Convoys to England"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		
		command = { type = convoy which = 124 value = 489 when = 20 } # New York-Manchester (supplies/coal)
		command = { type = convoy which = 124 value = 489 when = 20 } # 
		#command = { type = convoy which = 124 value = 489 when = 16 }
						
		command = { type = convoy which = 178 value = 489 when = 20 } #Washington DC-Manchester (supplies/coal)
		#command = { type = convoy which = 178 value = 489 when = 16 }
		
			
	}
}

event = {
	id = 322502 #
	random = no
	country = USA
	
	trigger = {
		ai = yes     
		alliance = { country = AST  country = USA }
		
	}
	name = AI_EVENT #"USA Allied Convoys Australia"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		
		command = { type = convoy which = 92 value = 2078 when = 16 } # Los Angeles-Sydney (supplies)
		
			
	}
}

event = {
	id = 322503 #
	random = no
	country = USA
	
	trigger = {
		ai = yes     
		alliance = { country = CAN  country = USA }
		
	}
	name = AI_EVENT #"USA Allied Convoys Canada"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
	
		command = { type = convoy which = 116 value = 2199 when = 18 } # Detroit-Toronto (Steel/Supplies)
		command = { type = convoy which = 116 value = 2199 when = 18 } # 
			
	}
}


#############################
# USA Lend-Lease convoys to USSR
############################

event = {
	id = 322521
	random = no
	country = USA
	
	trigger = {
		ai = yes     
		OR = {
			control = { province = 834 data = ENG } #Kirovsk
			control = { province = 839 data = ENG } #Archangelsk
		}
		
		alliance = { country = ENG  country = USA }
		
		war = { country = SOV country = GER }
		war = { country = USA country = GER }
	
	  	NOT = {
			event = 1500006 #USSR not human 
		}
	}
	name = AI_EVENT #"USA Lend-Lease Convoys to USSR"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 10 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		
		command = { type = convoy which = 125 value = 834 when = 29 } # Boston-Kirovsk (coal, oil, rubber, + supplies)
		command = { type = convoy which = 125 value = 834 when = 24 } # (rubber + supplies)
		
		command = { type = convoy which = 125 value = 839 when = 24 } # Boston-Archangelsk (rubber + supplies)
		command = { type = convoy which = 125 value = 839 when = 24 } 
		
	
	}
}

###########################
#Dutch East Indies to USA 
############################

event = {
	id = 322504 #
	random = no
	country = HOL
	
	trigger = {
		ai = yes     
		alliance = { country = HOL  country = USA }
	
	  	NOT = {
			event = 1500004 #USA not human 
		}

		event = 322505
	}
	name = AI_EVENT #"Dutch Rubber Convoys to USA"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		
		#command = { type = convoy which = 1969 value = 124 when = 18 } # Kendari-New York Steel
		#command = { type = convoy which = 311 value = 124 when = 2 } # Paramaribo-New York Steel
		command = { type = convoy which = 1779 value = 204 when = 25 } # Yogyakarta - New Orleans rubber/oil
		command = { type = convoy which = 1779 value = 204 when = 24 }
		command = { type = convoy which = 1779 value = 204 when = 24 }
		command = { type = convoy which = 1768 value = 204 when = 25 } # Padang (Sumatra)-New Orleans rubber/oil
		command = { type = convoy which = 1768 value = 204 when = 24 }
		command = { type = convoy which = 1768 value = 204 when = 24 }
		#command = { type = convoy which = 1785 value = 204 when = 24 } # Pontianek (Borneo)- New Orleans Rubber 
						
	}
}

event = {
	id = 322505 
	random = no
	country = USA
	
	trigger = {
		ai = yes     
		alliance = { country = HOL  country = USA }

		event = 1510046 #Dutch capital moves to Batavia
	}
	name = AI_EVENT #"USA Convoys to Dutch East Indies"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		
		#command = { type = convoy which = 1969 value = 124 when = 18 } # Kendari-New York Steel
		#command = { type = convoy which = 311 value = 124 when = 2 } # Paramaribo-New York Steel
		command = { type = convoy which = 204 value = 1779 when = 16 } # New Orleans-Yogyakarta 
		command = { type = convoy which = 204 value = 1779 when = 16 } # 
		command = { type = convoy which = 203 value = 1779 when = 16 } # returns Dutch supplies sent in event 322504 to activate Dutch rubber convoys 
		
	}
}

###########################
#Liberia to USA 
############################

event = {
	id = 552101
	random = no
	country = LIB
	
	trigger = {
		ai = yes     
		alliance = { country = LIB  country = USA }
	
	  	NOT = {
			event = 1500004 #USA not human 
		}
	}
	name = "Liberia Supports US Industry with Rubber"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = convoy which = 1040 value = 203 when = 24 } # Monrovia-Houston
		command = { type = convoy which = 1040 value = 203 when = 24 }
	}
}

event = {
	id = 552102
	random = no
	country = USA
	
	trigger = {
		ai = yes     
		alliance = { country = LIB  country = USA }
	
	  	event = 552101 #Liberia not human

	}
	name = AI_EVENT #"USA convoys to Liberia"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 } #
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = convoy which = 203 value = 1040 when = 16 } # Houston-Monrovia #(Returns supplies)
		command = { type = convoy which = 203 value = 1040 when = 16 }
	}
}

############################################################################################
# FRANCE HARD C.O.R.E. (1510081) (by Copper)
############################################################################################

event = {
	id = 1510081
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = ger_hard # Germans are using HARD C.O.R.E.
		war = { country = FRA country = GER }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_FRA_attack.ai }
	}
}

############################################################################################
# Germany Early War Strategy Changes
############################################################################################

# Fall Weiss: AI attack on Poland

event = {
	id = 1510082
	random = no
	country = GER
	
	trigger = {
		ai = yes 
		exists = POL
		war = { country = GER country = POL }

		NOT = { event = 10005 } #GER_Defense.ai file
		
		#AND = {
			#NOT = { event = 432011 }# French resistance to GER occupation of Rhineland
			#event = 9000203 # Poles have pressured Germany (not yet implemented)
			#NOT = { war = { country = GER country = FRA } }  # early war
		#}
	}

	name = AI_EVENT #"Switch to Fall_Weiss"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 4 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = june year = 1940 }
	
	action_a = {
		command = { type = ai which = core_GER_FallWeiss.ai }

		#Andris: Begin AI naval buildup for BoB				
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = submarine }
		command = { type = build_division which = submarine }
		command = { type = build_division which = submarine }
		command = { type = build_division which = submarine }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = destroyer }
		command = { type = build_division which = destroyer }
		command = { type = build_division which = destroyer }
		command = { type = build_division which = destroyer }
		
	}
}

# Fall Gelb: AI attack on France and Low Countries

event = {
	id = 1510083
	random = no
	country = GER
	persistent = yes
	
	#Will trigger when Germany finished with Poland and year is 1940, 
	#OR if France declares war earlier than Sept. 1939 
	
	#Needs to be reloaded in the very unique case that Germany finishes to Vichy in the West
	#before it starts to fight Poland in the East !!!!

	trigger = {
		ai = yes
		NOT = { flag = fall_gelb_sedan } #To avoid stopping, if attempting GER breakthrough in Belgium/northern France

		OR = {
			#Historical Trigger: when Germany finished with Poland 
			
			AND = { 
				year = 1940
				
				NOT = { 
					exists = POL
					war = { country = GER country = SOV }
					
					event = 10001 	#GER_BoB.ai
					event = 9500511 #Barbarossa.ai
					event = 10002 	#Barbarossa.ai (buildup)
					event = 10005	#Final_Defense.ai (unlikely this early)
				}	
			}
		
			#Ahistorical:
			#War with France only, and not Poland (If Poland joins, FallWeiss)
			
			AND = { 
				war = { country = FRA country = GER }
				NOT = { war = { country = GER  country = POL } 	}
				
				NOT = {event = 2021}	#Vichy Regime (to avoid using Fall_Gelb even 
							#if mainland France defeated)	

				NOT = {event = 2028}	#Danzig or War - WAR!	 					
			}

		}
	}

	name = AI_EVENT #"Switch to Fall_Gelb"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 10 # Check for trigger conditions every 15 days
	deathdate = { day = 15 month = june year = 1941 }
	
	action_a = {
		command = { type = ai which = core_GER_FallGelb.ai }
		#Andris: Continue AI naval buildup for BoB				
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = submarine }
		command = { type = build_division which = submarine }
		command = { type = build_division which = submarine }
		command = { type = build_division which = submarine }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = cruiser }
		command = { type = build_division which = destroyer }
		command = { type = build_division which = destroyer }
		command = { type = build_division which = destroyer }
		command = { type = build_division which = destroyer }
	}
}

event = {
	id = 172411
	random = no
	country = GER
	
	trigger = {
		#AI switch if Belgium/France is not overrun by Blitzkrieg, so German AI does not stall
		#in Belgium, really aggressive AI
		
		ai = yes
		flag = fall_gelb

		war = { country = FRA country = GER }

		OR = {
			
			#To breakthrough aggressive French defensive line in Belgium (historical)

			AND = {
				garrison = { country = BEL province = 548 size = 18 } #Antwerp
				garrison = { country = BEL province = 552 size = 18 } #Bruxelles	
			}

			AND = {
				garrison = { country = BEL province = 548 size = 18 } #Antwerp
				garrison = { country = BEL province = 557 size = 18 } #Arlon	
			}

			AND = {
				garrison = { country = BEL province = 552 size = 18 } #Bruxelles
				garrison = { country = BEL province = 557 size = 18 } #Arlon	
			}


			#To breakthrough French defensive line across northern France
			AND = {
				control = { province = 548 data = GER } #Antwerp
				control = { province = 552 data = GER } #Bruxelles
				control = { province = 557 data = GER }	#Arlon	
				
				garrison = { country = FRA province = 518 size = 11 } #Lille
				garrison = { country = FRA province = 520 size = 11 } #Sedan
				garrison = { country = FRA province = 556 size = 11 } #Chaumont
			}

		}
	}

	name = AI_EVENT #"Switch to Fall_Gelb_Sedan"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1940 }
	offset = 3 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1941 }
	
	action_a = {
		command = { type = ai which = core_GER_FallGelb_Sedan.ai } 
	}
}

event = {
	id = 172412
	random = no
	country = GER
	

	trigger = {
		#AI switch if Germany achieves breakthrough (less aggressive/more tactical)
		
		ai = yes
		flag = fall_gelb_sedan

		war = { country = FRA country = GER }

		#1st layer of French provinces
		OR = {	
			control = { province = 518 data = GER } #Lille
			control = { province = 520 data = GER } #Sedan
			control = { province = 556 data = GER }	#Chaumont
		}

		#2nd layer of French provinces
		OR = {
			control = { province = 522 data = GER } #Rouen
			control = { province = 528 data = GER } #Amiens
			control = { province = 529 data = GER }	#Rheims
			control = { province = 525 data = GER }	#Troyes
		}
		
	}

	name = AI_EVENT #"Switch to Fall_Gelb (Blitzkrieg)"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1940 }
	offset = 5 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1941 }
	
	action_a = {
		command = { type = ai which = core_GER_FallGelb.ai } 
	}
}

event = {
	id = 172401
	random = no
	country = GER
	

	trigger = {
		ai = yes
		
		war = { country = FRA country = GER }
		NOT = { exists = POL }
		NOT = { event = 2021}	#Vichy Regime (to avoid using Fall_Gelb even 
					#if mainland France defeated)	

		NOT = { event = 2028}   #Danzig or War - WAR!
	}

	name = AI_EVENT #"Switch to Fall_Gelb Part 2"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1941 }
	
	action_a = {
		command = { type = ai which = core_GER_FallGelb.ai } #Reloads FallGelb.ai after Poland is annexed
	}
}

###############################################################
#Germany Peace-time Strategy (GER_38 or GER_38_Westwall/GER_38_Munich/GER_mid39)
###############################################################

event = {
	id = 1510084
	random = no
	country = GER
	
	trigger = {
		ai = yes
		NOT = { flag = ger_global_fra_HumanPlayer } #AI France
		
		technology = 4401 	#Vehicle Assembly
		technology = 10102	#Basic Interceptor
		atwar = no
		
	}

	name = AI_EVENT #"Switch to GER_38 (AI France)"
	desc = ""
	style = 0
	
	date = { day = 1 month = february year = 1938 } #Andris: Trigger in Feb. 38 allows AI to build more ships
	offset = 3 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1939 }
	
	action_a = {
		command = { type = ai which = core_GER_38.ai }
		command = { type = sleepevent which = 172551  }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
	}
}

event = {
	id = 172551
	random = no
	country = GER
	
	trigger = {
		ai = yes
		flag = ger_global_fra_HumanPlayer #Human France

		technology = 4401 	#Vehicle Assembly
		technology = 10102	#Basic Interceptor
		atwar = no
		
	}

	name = AI_EVENT #"Switch to GER_38 (Human France)"
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1938 } #Andris: Trigger in Jan. 38 allows AI to start Westwall in 1938
	offset = 1 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = march year = 1938 }
	
	action_a = {
		command = { type = ai which = core_GER_38_Westwall.ai }
		command = { type = sleepevent which = 1510084  }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
	}
}

event = {
	id = 1510087
	random = no
	country = GER

	trigger = {
		ai = yes
		OR = {
			event = 1510084 #core_GER_38.ai
			event = 172551	#core_GER_38_Westwall.ai
		}	
		atwar = no
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1938 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1939 }
	
	action_a = {
		command = { type = ai which = core_GER_38_Munich.ai }
		
	}
}

event = {
	id = 1510092
	random = no
	country = GER

	trigger = {
		ai = yes
		atwar = no
		technology = 4401 # Vehicle assembly
		NOT = {
			event = 1510082  #FallWeiss AI
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = april year = 1939 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = may year = 1940 }
	
	action_a = {
		command = { type = ai which = core_GER_mid39.ai }
	}
}

#################################################
####For early war against France and war against Czechoslovakia 
################################################

event = {
	id = 1510097
	random = no
	country = GER
	
	trigger = {
		ai = yes
		atwar = yes
		NOT = {
			event = 1510092 #GER_Mid39.ai
			event = 1510083 #GER_FallGelb.ai
			event = 1510082 #GER_FallWeiss.ai
			event = 10003   #GER_Barbarossa (early English defeat)
		}	
	}

	name = AI_EVENT #"Switch to GER_FallRot"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 12
	deathdate = { day = 15 month = august year = 1939 }

	action_a = {
		command = { type = ai which = core_GER_FallRot.ai }
	}
}

event = {
	id = 1510098
	random = no
	country = GER
	
	#For Reoccupation of the Rhineland (historically March 7, 1936) 
	
	trigger = {
		ai = yes
		atwar = no
		
	}

	name = AI_EVENT #"Switch to GER_36_Rhineland"
	desc = ""
	style = 0

	date = { day = 22 month = february year = 1936 } 
	offset = 7
	deathdate = { day = 30 month = december year = 1937 }

	action_a = {
		command = { type = ai which = core_GER_36_Rhineland.ai }
	}
}

event = {
	id = 1510099
	random = no
	country = GER
	
	trigger = {
		ai = yes
		atwar = yes
		event = 1510098
		NOT = {
			event = 1510092 #GER_Mid39.ai
			event = 1510083 #GER_FallGelb.ai
			event = 1510082 #GER_FallWeiss.ai
			event = 10003   #GER_Barbarossa (early English defeat)
		}	
	}

	name = AI_EVENT #"Switch to GER_FallRot"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 14
	deathdate = { day = 30 month = august year = 1939 }

	action_a = {
		command = { type = ai which = core_GER_FallRot.ai }
	}
}

#########################################################
# USA worried about ahistorical surprise attack on mainland USA
# from Mexico or Canada, through military access or direct alliance with Mexico (Andris)
#########################################################
event = {
	id = 322436
	random = no
	country = USA

	trigger = {
		ai = yes
		atwar = no 

		OR = {
			#Possible German surprise attack from Mexican border 
			garrison = { country = GER province =  80 size = 1 } #Tijuana
			garrison = { country = GER province = 197 size = 1 } #Hermosillo
			garrison = { country = GER province = 199 size = 1 } #Chihuahua
			garrison = { country = GER province = 237 size = 1 } #Monterrey

			#Possible Italian surprise attack from Mexican border 
			garrison = { country = ITA province =  80 size = 1 } #Tijuana
			garrison = { country = ITA province = 197 size = 1 } #Hermosillo
			garrison = { country = ITA province = 199 size = 1 } #Chihuahua
			garrison = { country = ITA province = 237 size = 1 } #Monterrey

			#Possible Japanese surprise attack from Mexican border 
			garrison = { country = PAN province =  80 size = 1 } #Tijuana
			garrison = { country = PAN province = 197 size = 1 } #Hermosillo
			garrison = { country = PAN province = 199 size = 1 } #Chihuahua
			garrison = { country = PAN province = 237 size = 1 } #Monterrey

			#Possible Soviet surprise attack from Mexican border 
			garrison = { country = SOV province =  80 size = 1 } #Tijuana
			garrison = { country = SOV province = 197 size = 1 } #Hermosillo
			garrison = { country = SOV province = 199 size = 1 } #Chihuahua
			garrison = { country = SOV province = 237 size = 1 } #Monterrey

			#Ahistorical Mexican surprise attack (Human)  
			#AND = {
			#	NOT = { ai = MEX }  #Note: this doesn't work properly 
			#	OR = {
			#		garrison = { country = MEX province =  80 size = 3 } #Tijuana
			#		garrison = { country = MEX province = 197 size = 3 } #Hermosillo
			#		garrison = { country = MEX province = 199 size = 3 } #Chihuahua
			#		garrison = { country = MEX province = 237 size = 3 } #Monterrey	
			#	}
			#}

			#Ahistorical Mexican surprise attack (AI)  
			#AND = {
			#	ai = MEX  # Note: this doesn't work properly
			#	OR = {
			#		garrison = { country = MEX province =  80 size = 3 } #Tijuana
			#		garrison = { country = MEX province = 197 size = 3 } #Hermosillo
			#		garrison = { country = MEX province = 199 size = 3 } #Chihuahua
			#		garrison = { country = MEX province = 237 size = 3 } #Monterrey	
			#	}
			#	
			#	OR = {
			#		alliance = { country = MEX country =  GER }
			#		alliance = { country = MEX country =  ITA }
			#		alliance = { country = MEX country =  PAN }
			#		alliance = { country = MEX country =  SOV }
			#	}
			#}		
		}		
	}
	
	name = "Monroe Doctrine: Call up Texas and California National Guard" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 5
	deathdate = { day = 30 month = july year = 1940 }

	action_a = {
		command = { type = ai which = core_USA_36-40_EarlyThreat.ai }
		command = { type = manpowerpool value = 15 }
		command = { type = add_division which = infantry  value = artillery when = 156 } #San Bernandino
		command = { type = add_division which = motorized value = artillery when = 203 } #Houston
		
		#Militia destroy border roads and set up border checkpoints
		command = { type = infrastructure which =  92 value = -5 } #Los Angeles
		command = { type = infrastructure which = 156 value = -5 } #San Bernandino
		command = { type = infrastructure which =   9 value = -5 } #San Antonio
	}
}

######################################################
# USA goes defensive - Germany has won in Europe (by Copper)#
#
# This event makes US Army more willing to defend borders and beaches of the USA mainland
#########################################################

event = {
	id = 1510086
	random = no
	country = USA

	trigger = {
		ai = yes

		OR = {
			event = 5308 # Bitter peace events
			event = 5309 # Bitter peace events
			event = 5310 # Bitter peace events
			event = 5311 # Bitter peace events
			event = 5332 # Bitter peace events
			event = 5333 # Bitter peace events

			NOT = {
				event = 5360 # Total Victory
			}
		}


		OR = {

			ispuppet = ENG

			AND = {
				control = { province = 488 data = GER } # Newcastle
				control = { province = 489 data = GER } # Manchester
				control = { province = 490 data = GER } # Sheffield
				control = { province = 491 data = GER } # Cardiff
				control = { province = 497 data = GER } # Birmingham
				control = { province = 498 data = GER } # Coventry
				control = { province = 499 data = GER } # London
				control = { province = 500 data = GER } # Bristol
				control = { province = 501 data = GER } # Plymouth
				control = { province = 502 data = GER } # Southampton
				control = { province = 503 data = GER } # Portsmouth
			}

			NOT = {
				exists = ENG
			}
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
			command = { type = ai which = core_USA_defense.ai }
	}
}	

############################################################
#Republican Spain start of SCW (1510088)
############################################################
event = {
	id = 1510088
	random = no
	country = SPR

	# Start of SCW
	
	trigger = {
		ai = yes   
		exists = SPA
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 17 month = july year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_SPR_SCW.ai }
	}
}

############################################################
#Nationalist Spain General Offensive in SCW (802101)
############################################################

event = {
	id = 802101 
	random = no
	country = SPA

	trigger = {
		ai = yes   
		exists = SPR
		lost_VP = { country = SPR value = 49 } #control more than 49% of SPR's VP

		event = 802004 #SPA receives German support (typically Oct. 1936)	
		flag = Burgos_Capital	
	}

	name = AI_EVENT #"General Nationalist Offensive"
	desc = ""
	style = 0
	
	date = { day = 20 month = july year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = capital which = 957} #Burgos
		command = { type = secedeprovince which = FRA value = 1009 } #Lose Ceuta to break resource convoys
									     #Returned in a week	
		command = { type = ai which = core_SPA_SCW_Offensive.ai }
		command = { type = trigger which = 300053 } 		     #End of SPA Resource Convoys
	}
}

event = {
	id = 802102 
	random = no
	country = FRA

	trigger = { 
		event = 802101 
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 3
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = secedeprovince which = SPA value = 1009 } #Return Ceuta
	}
}
############################################################################################
# Spanish Civil War Results (1510060-1510061)
############################################################################################

event = {
	id = 1510060
	random = no
	country = SPA

	# Nationalist Spain wins 
	
	trigger = {
		ai = yes 
	      	NOT = { exists = SPR }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = august year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_SPA_SCW_Post_part1.ai }

		#Temp. remove cores on Ceuta/Canary Islands, so SPA doesn't build IC there 
		command = { type = removecore which = 1009 } # Ceuta
		command = { type = removecore which = 1017 } # Lanzarote
		command = { type = removecore which = 1018 } # Fuerteventura
		command = { type = removecore which = 1019 } # Las Palmas
		command = { type = removecore which = 1020 } # Santa Cruz de Tenerife
	}
}

event = {
	id = 1510061
	random = no
	country = SPR

	# Republican Spain wins 
	
	trigger = {
		ai = yes 
	      	NOT = { exists = SPA }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = august year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_SPR_SCW_After.ai }
	}
}

###########################################
# SPAIN : WAR IN EUROPE	(1510089 - 1510090) 
###########################################

event = {
	id = 1510089
	random = no
	country = SPA

	# Nationalist Spain cautious
	
	trigger = {
		ai = yes 

		#End of SCW
		NOT = { exists = SPR }
		NOT = {	exists = u04 } #Euskadi
		NOT = {	exists = u05 } #Catalunya
		
		#War in Europe
	      	OR = {
			atwar = POR
			atwar = GER
			atwar = FRA
			war = { country = ENG country = ITA }
			war = { country = ITA country = SPA }
			war = { country = ENG country = SPA }
			war = { country = USA country = SPA }	
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_SPA_39.ai }
		
		#Build coastal defenses in major cities/landing areas
		command = { type = construct which = coastal_fort value = 956 } #Gijón
		command = { type = construct which = coastal_fort value = 969 } #Barcelona
		command = { type = construct which = coastal_fort value = 988 } #Sevilla
		command = { type = construct which = coastal_fort value = 996 } #Cartagena
	}
}


event = {
	id = 1510090
	random = no
	country = SPR

	# Rep.Spain cautious
	
	trigger = {
		ai = yes 
		NOT = {
			exists = SPA
			}
	      	OR = {
			war = { country = GER country = ENG }
			war = { country = ITA country = ENG }	
			atwar = yes
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_39.ai }
		command = { type = construct which = coastal_fort value = 956 } #Gijón
		command = { type = construct which = coastal_fort value = 969 } #Barcelona
		command = { type = construct which = coastal_fort value = 981 } #València
	}
}

##########################################################
# Poland goes to war - early conflict on the Rheinland (by Copper)#
#
# This event makes Polish army more willing to conduct offensive against Germany
#########################################################

event = {
	id = 1510091
	random = no
	country = POL

	trigger = {
		ai = yes
		war = { country = FRA country = GER }

	NOT = {
		OR = {
			alliance = { country = POL country = GER }
			war = { country = POL country = SOV }
			}
		}
	}
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1938 }

	action_a = {
			command = { type = ai which = core_POL_36_attack.ai }
	}
}	

##################################
#Poland 1938 AI
#################################
event = {
	id = 702401
	random = no
	country = POL

	trigger = {
		ai = yes
		atwar = no
	}
	name = AI_EVENT #"core_POL_38.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1 # 
	deathdate = { day = 30 month = december year = 1938 }

	action_a = {
			command = { type = ai which = core_POL_38.ai }
	}
}
####################################
# SPAIN : WAR 	(1510093 - 1510096) 
####################################

event = {
	id = 1510093
	random = no
	country = SPA

	# Nationalist Spain Axis or atwar with allies/commies
	
	trigger = {
		ai = yes 
		event = 1510089 #ai_event SPA cautious
	      	OR = {
			war = { country = SPA country = ENG }
			war = { country = SPA country = FRA }	
			war = { country = SPA country = USA }
			war = { country = SPA country = SOV }	
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Axis.ai }
	}
}


event = {
	id = 1510094
	random = no
	country = SPA

	# Nat. Spain Allied or atwar with Axis
	
	trigger = {
		ai = yes 
		event = 1510089 #ai_event SPA cautious
	      	OR = {
			war = { country = SPA country = GER }
			war = { country = SPA country = ITA }	
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Allied.ai }
	}
}
 

event = {
	id = 1510095
	random = no
	country = SPR

	# Rep Spain Axis or atwar with allies/commies
	
	trigger = {
		ai = yes 
		event = 1510090 #ai_event SPR cautious
	      	OR = {
			war = { country = SPR country = ENG }
			war = { country = SPR country = FRA }	
			war = { country = SPR country = USA }	
			war = { country = SPR country = SOV }
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Axis.ai }
	}
}


event = {
	id = 1510096
	random = no
	country = SPR

	# Rep. Spain Allied or atwar with Axis
	
	trigger = {
		ai = yes 
		event = 1510090 #ai_event SPR cautious
	      	OR = {
			war = { country = SPR country = GER }
			war = { country = SPR country = ITA }	
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Allied.ai }
	}
}


###################################################################################################################
# (AI) German - Alternate Fall Weserubung (if conquered Poland, but peace with western Allies in 1940, 
#		so Altmark Incident hasn't occurred)
# ------- slightly different triggers and different search dates
###################################################################################################################

event = {
	id = 1510100
	random = no 
	country = GER
	
	trigger = {
		ai = yes

		atwar = no
		random = 55

		NOT = { event = 1002001 } #Altmark Incident
		event = 1510083 # Fall Gelb AI for Germany

		OR = {	#Poland puppeted or conquered
			ispuppet = POL
			NOT = { exists = POL }
		} 
                   
		NOT = {
			war = { country = NOR country = GER }
			war = { country = NOR country = ENG }
			war = { country = NOR country = SOV }

			alliance = { country = NOR country = GER }
			#alliance = { country = NOR country = ENG } #Andris: removed
			alliance = { country = NOR country = SOV }
			alliance = { country = DEN country = SOV }
			alliance = { country = SWE country = SOV }	
		}	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 14 month = february year = 1940 }
	offset = 18
	deathdate = { day = 30 month = may year = 1940 }

	action_a = {
		name = "Begin Operation Fall Weserubung: invade Denmark and Norway"
		command = { type = add_division which = transports } # mobilise German merchant fleet
		command = { type = add_division which = transports } # mobilise German merchant fleet
		command = { type = supplies value = -500 }
		command = { type = warentry which = USA value = 2 }
		command = { type = war which = NOR }
		command = { type = war which = DEN } #Andris
		command = { type = trigger which = 1002004 } # Norway
		command = { type = sleepevent which = 1002001 }	# Altmark Incident
		command = { type = sleepevent which =  172049 }	# standard Fall Weserubung
	}
	action_b = {
		name = "Delay the operation for now"
		command = { type = warentry which = USA value = -4 }
		command = { type = warentry which = NOR value = -2 }
		command = { type = warentry which = DEN value = -2 }
		command = { type = warentry which = SWE value = -2 }
		#command = { type = sleepevent which = 1002001 } # Altmark Incident
		#command = { type = sleepevent which = 1002002 } # Pressure on Denmark
		#command = { type = sleepevent which =  172049 } # standard Fall Weserubung
	}
	action_c = {
		name = "Expand the plan: invade Norway, Denmark, and Sweden"
		command = { type = add_division which = transports } # mobilise German merchant fleet
		command = { type = add_division which = transports } # mobilise German merchant fleet
		command = { type = supplies value = -500 }
		command = { type = warentry which = USA value = 4 }
		command = { type = war which = NOR }
		command = { type = war which = DEN } #Andris 
		command = { type = war which = SWE }
		command = { type = trigger which = 1002004 } # Norway
		command = { type = trigger which = 1002005 } # Sweden
		command = { type = sleepevent which = 1002001 } # Altmark Incident
		command = { type = sleepevent which =  172049 } # standard Fall Weserubung
	}
}

################
# (AI) German Tactical Decision
#################
event = {
	id = 1510101
	random = no
	country = GER
	
	trigger = {
		ai = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }

	action_a = {
		name = "We are on track with current research and production allocation" 
		command = { type = sleepevent which = 9500510 }	#GER_Panzers.ai
		command = { type = trigger which = 1500187 }	#Industry Rush
		
	}
	#action_b = { #Andris: removed
	#	name = "Favor Guderian and his concepts; develop the Tiger" 
	#	command = { type = ai which = core_GER_Guderian.ai }
	#	command = { type = prio_research which = 2300 }   #Basic Tanks
	#	command = { type = prio_research which = 4401 }   #Vehicle Mass Assembly
	#	command = { type = start_research which = 2200 }  #Amphibious Tanks
	#	command = { type = start_research which = 14200 } #Medium Artillery Pieces
	#	command = { type = prio_research which = 14200 }  #Medium Artillery Pieces
	#	command = { type = prio_research which = 2200 }   #Amphibious Tanks
	#	command = { type = trigger which = 1500187 }
	#}
	#action_c = { #Andris: removed
	#	name = "Develop the lethal Wolfpack and conquer England"
	#	command = { type = sleepevent which = 9500510 }
	#	command = { type = ai which = core_GER_Kriegsmarine.ai }
	#	command = { type = prio_research which = 4402 }   #Ship Mass Assembly
	#	command = { type = start_research which = 5300 }  #Early War Submarine Technology
	#	command = { type = prio_research which = 5300 }   #Early War Submarine Technology
	#	command = { type = start_research which = 13200 } #Interwar Naval Experience Doctrine
	#	command = { type = prio_research which = 13200 }  #Interwar Naval Experience Doctrine
	#	command = { type = trigger which = 1500187 }	#Industry Rush
	#}
}

event = {
	id = 1510102
	random = no
	country = GER
	
	trigger = {
		ai = yes
		year = 1939
		event = 1510101 # Kriegsmarine AI
		OR = {
			event = 1510084 # GER_38 AI
			event = 1510092 # GER_mid39 AI
		}
		NOT = { event = 1510093 } # GER_FallRot AI, thereby derailing naval builds
	}

	name = AI_EVENT
	desc = ""
	style = 0
 
	date = { day = 4 month = june year = 1940 } #changed from june 1939 Andris
	offset = 11
	deathdate = { day = 30 month = june year = 1941 } #changed from jan 1940

	action_a = {
		command = { type = ai which = core_GER_Wolfpack.ai }
	}
}

event = {
	id = 1510105
	random = no
	country = GER
	
	trigger = {
		ai = yes
		OR = {
			war = { country = GER country = SPA }
			war = { country = GER country = SPR }
			war = { country = GER country = POR }
		}
		OR = {
			event = 10001 # GER_BoB.ai
			AND = {
				year = 1941
				event = 1510101 # GER_Wolfpack.ai
			}			
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 25
	deathdate = { day = 1 month = january year = 1949 }

	action_a = { 
		command = { type = ai which = core_GER_Conquistador.ai }
	}
}



###############################
# Slovakia AI Strategy
###############################

# Slovakia loads aggressive AI for Fall Weiss and beyond

event = {
	id = 1510103
	random = no 
	country = SLO
	
	trigger = { 
		ai = yes
		exists = POL
		OR = {
			event = 2050 #MR Pact
			event = 2051 #MR Pact
			event = 1510092 #German_mid39 AI file
			war = { country = POL country = GER }
		}
		OR = {
			alliance = { country = GER country = SLO }
			puppet = { country = SLO country = GER }
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 2 month = april year = 1937 }
	offset = 29
	deathdate = { day = 30 month = may year = 1941 }

	action_a = {
		command = { type = ai which = core_SLO_FallWeiss.ai }
	}
}


# Slovakia reloads initial AI file for Home Defense

event = {
	id = 1510104
	random = no
	country = SLO
	
	trigger = {
		ai = yes
		atwar = yes
		OR = {
			NOT = { exists = POL }
			event = 2050 # FallWeiss has occurred
			event = 2051 # FallWeiss has occurred
		}
		event = 1510103 #load of previous SLO FallWeiss AI
		OR = {
			war = { country = SLO country = ROM }
			AND = {
				war = { country = SLO country = SOV }
				year = 1943
				OR = {
					control = { province = 721 data = SOV } #Soviets approaching!
					control = { province = 774 data = SOV }
					control = { province = 770 data = SOV }
					control = { province = 764 data = SOV }
					control = { province = 643 data = SOV } 
				}
			}
		}
	}

	name = AI_EVENT 
	desc = ""
	style = 0

	date = { day = 3 month = april year = 1939 } 
	offset = 18
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_SLO_39.ai }
	}
}

#################################################
# Romania AI Strategy
#################################################

event = {
	id = 1510111
	random = no
	country = ROM
	
	trigger = {
		ai = yes
		atwar = no
		
	}

	name = AI_EVENT 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1942 }

	action_a = {
		command = { type = ai which = core_ROM_39.ai }
	}
}

#################################################
# Finland AI Strategy
#################################################

event = {
	id = 1510121
	random = no
	country = FIN
	
	trigger = {
		ai = yes		
	}

	name = AI_EVENT #"Switch to core_FIN_38"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1939 }

	action_a = {
		command = { type = ai which = core_FIN_38.ai }
	}
}

event = {
	id = 1510122
	random = no
	country = FIN
	
	trigger = {
		ai = yes
		event = 2620 #Winter War (whether it actually occurs or not)
		
	}

	name = AI_EVENT #"Switch to core_FIN_39_Winter_War"
	desc = ""
	style = 0

	date = { day = 1 month = october year = 1939 } 
	offset = 1
	deathdate = { day = 1 month = january year = 1942 }

	action_a = {
		command = { type = ai which = core_FIN_39_Winter_War.ai }
		
		#Add resources, so AI doesn't get to <20000 coal/steel threshold and cancel trades on world market
		#Removed after Winter War in FIN 1002149
		command = { type = coalpool  value = 15000 }
		command = { type = steelpool value = 15000 }
		command = { type = oilpool   value =  5000 }
	}
}

############################################
# France goes offensive (by Copper Nicus)
# This event is designed for HARD C.O.R.E. add-on
#
###########################################################################



event = {
	id = 1510150
	random = no
	country = FRA

	trigger = {
		ai = yes
		event = 1400031 # Hard CORE is on!
		war = { country = FRA country = GER }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_FRA_attack.ai }
		#command = { type = sleepevent which = 1510039 } # No static defense (Andris: removed, as this is diff. event)
	}
}

############################
#  (AI) Italy 
############################


event = {
	id = 9500200
	random = no
	country = ITA

	trigger = {
		ai = yes
		NOT = { event = 1510048 }	#core_ITA_Axis.ai
		OR = {
			technology = 2316   #Basic Medium Tank (37mm+)
			technology = 2317   #Basic Medium Tank (40mm+)
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1949 }

	action_a = {
		command = { type = ai which = "core_ITA_CarriArmati.ai" }
		command = { type = build_division which = armor }
		command = { type = build_division which = armor }
	}
}


event = {
	id = 9500201
	random = no
	country = ITA

	trigger = {
		#Prepare for Italy-Albania war
		ai = yes
		exists = SAL #Albania
		NOT = {
			war = { country = ITA country = FRA }
			war = { country = ITA country = ENG }
		}
	}

	name = AI_EVENT #"Core_ITA_Zog"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 10
	deathdate = { day = 15 month = january year = 1939 }

	action_a = {
		command = { type = ai which = "core_ITA_Zog.ai" }
	}
}

event = {
	id = 9500202
	random = no
	country = ITA

	trigger = {
		ai = yes
		event = 9500201  # core_ITA_Zog.ai
		event = 462211	 # Shifted government to democrat, so AI doesn't cancel trades on world market
			
		#After Italy-Albania war 
		OR = {	
			NOT = { exists = SAL }
			NOT = { war = { country = ITA country = SAL} }
		}	
			
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 7 month = april year = 1939 }
	offset = 1
	deathdate = { day = 15 month = august year = 1939 }

	action_a = {
		command = { type = headofgovernment which = 3002 } #Back to Mussolini
		
	}
}

event = {
	id = 9500203
	random = no
	country = ITA

	trigger = {
		ai = yes
		event = 462203   #Old   2903 Annexation of Albania - Zog refuses
		war = { country = SAL country = ITA }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 25 month = march year = 1939 }
	offset = 1
	deathdate = { day = 15 month = august year = 1939 }

	action_a = {
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 9500204
	random = no
	country = ITA

	trigger = {
		ai = yes
		OR = {
			war = { country = GRE country = ITA }
			war = { country = YUG country = ITA }
		}
	}

	name = AI_EVENT #"ITA_Balkans"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 10
	deathdate = { day = 15 month = december year = 1947 }

	action_a = {
		command = {  }
		#command = { type = ai which = core_ITA_Balkans.ai } #Needs to be revised
	}
}


event = {
	id = 9500226
	random = no
	country = ITA

	trigger = {
		ai = yes
		alliance = { country = ITA  country = GER }
		war = { country = ITA country = ENG }
		
		event = 9500517  #Germany conquered Norway, and fully focused on UK
		#event = 272619   #Sea Lion succeeding
		
	}

	name = AI_EVENT #"ITA_Axis_BoB"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 10
	deathdate = { day = 15 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ITA_Axis_BoB.ai }
	}
}

event = {
	id = 9500227
	random = no
	country = ITA

	trigger = {
		ai = yes
		alliance = { country = ITA  country = GER }
		war = { country = ITA country = ENG }

		event = 9500226  
		 	  
		OR= { 
			event = 272701      #Sea Lion failed
		      	event = 1510022 
		}   
	}

	name = AI_EVENT #"ITA_Axis"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 10
	deathdate = { day = 15 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ITA_Axis.ai }
	}
}




##################################################################



##################################################################################
########## USA-UK Wars merge (AI UK and AI USA only) (by Copper)
##################################################################################

event = {
	id = 9500207
	random = no
	country = USA


	trigger = {		
		ai = yes
		warentry = 100
		war = { country = PAN country = USA }		
		war = { country = PAN country = ENG }
		
		event = 1500153 # ENG is AI too		

		NOT = {
			puppet = { country = ENG country = GER } 
			puppet = { country = USA country = GER } 
			alliance = { country = GER country = USA }		
			alliance = { country = ENG country = USA }
		}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = july year = 1939 }
	offset = 3 
	deathdate = { day = 29 month = december year = 1946 }

	action_a = {
		command = { type = alliance  which = ENG }

	}
}

##################################################################################
########## FRA prepares for war (by nachinus)
##################################################################################


event = {
	id = 9500208 
	random = no
	country = FRA

	trigger = {
		ai = yes
		event = 432100 		# France Re-Arms	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 10 month = september year = 1937 }
	offset = 30
	deathdate = { day = 30 month = january year = 1945 }

	action_a = {
		command = { type = manpowerpool value = -50 } #5 inf. divs mp cost
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }		
	}
}

##################################################################################
########## FRA prepares for war 2 (by nachinus)
##################################################################################


event = {
	id = 9500209 
	random = no
	country = FRA

	trigger = {
		ai = yes
		atwar = yes 		# France Re-Arms	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 10 month = september year = 1937 }
	offset = 30
	deathdate = { day = 30 month = january year = 1945 }

	action_a = {
		command = { type = manpowerpool value = -50 } #5 inf. divs mp cost
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = add_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
			
	}
}					

#############################################################################
#
# USA Invasion support events - AI France gives AI USA their territory
#
# 1500201-1500204
#
#
#


event = {

	id = 1500201
	random = no
	country = USA

	# France has fallen, USA get claims in Europe
	# Needed only, if BOTH USA and France are AI controlled

	trigger = { 

			ai = yes # Not needed for human USA

			event = 1500059 # France is AI as well
			event = 2021 # Germans had choice to create Vichy

			alliance = { country = USA country = FRA }


		# France not controls most of the provinces
			
			NOT = {

				control = { province = 527 data = FRA } # Paris
				control = { province = 526 data = FRA } # Orleans
				control = { province = 531 data = FRA } # Caen
				control = { province = 518 data = FRA } # Lille
				control = { province = 543 data = FRA } # Nancy
				control = { province = 555 data = FRA } # Strasbourg
				control = { province = 930 data = FRA } # Toulon
				control = { province = 950 data = FRA } # Bayonne
				control = { province = 538 data = FRA } # Brest
				control = { province = 931 data = FRA } # Grenoble
				control = { province = 929 data = FRA } # Marseilles			
			}
		}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 }
	offset = 3 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = trigger which = 1500202 } # French event with FF removing claims 
		command = { type = sleepevent which = 2802 } # Standard Liberation of France
		command = { type = addcore which = 522 }
		command = { type = addcore which = 523 }
		command = { type = addcore which = 524 }
		command = { type = addcore which = 525 }
		command = { type = addcore which = 526 }
		command = { type = addcore which = 527 }
		command = { type = addcore which = 531 }
		command = { type = addcore which = 532 }
		command = { type = addcore which = 534 }
		command = { type = addcore which = 535 }
		command = { type = addcore which = 536 }
		command = { type = addcore which = 915 }
		command = { type = addcore which = 917 }
		command = { type = addcore which = 518 }
		command = { type = addcore which = 520 }
		command = { type = addcore which = 528 }
		command = { type = addcore which = 529 }
		command = { type = addcore which = 542 }
		command = { type = addcore which = 543 }
		command = { type = addcore which = 544 }
		command = { type = addcore which = 554 }
		command = { type = addcore which = 555 }
		command = { type = addcore which = 556 }
		command = { type = addcore which = 935 }
		command = { type = addcore which = 545 }
		command = { type = addcore which = 926 }
		command = { type = addcore which = 927 }
		command = { type = addcore which = 928 }
		command = { type = addcore which = 929 }
		command = { type = addcore which = 930 }
		command = { type = addcore which = 931 }
		command = { type = addcore which = 934 }
		command = { type = addcore which = 944 }
		command = { type = addcore which = 945 }
		command = { type = addcore which = 951 }
		command = { type = addcore which = 533 }
		command = { type = addcore which = 537 }
		command = { type = addcore which = 538 }
		command = { type = addcore which = 539 }
		command = { type = addcore which = 918 }
		command = { type = addcore which = 919 }
		command = { type = addcore which = 922 }
		command = { type = addcore which = 923 }
		command = { type = addcore which = 947 }
		command = { type = addcore which = 948 }
		command = { type = addcore which = 949 }
		command = { type = addcore which = 950 }
		command = { type = addcore which = 937 }

	}
}		

event = {
	id = 1500202
	random = no
	country = FRA

	# France has fallen, USA get claims in Europe
	# Needed only, if BOTH USA and France are AI controlled

	# triggered by event 1500180 - USA takes France

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = removecore which = 522 }
		command = { type = removecore which = 523 }
		command = { type = removecore which = 524 }
		command = { type = removecore which = 525 }
		command = { type = removecore which = 526 }
		command = { type = removecore which = 527 }
		command = { type = removecore which = 531 }
		command = { type = removecore which = 532 }
		command = { type = removecore which = 534 }
		command = { type = removecore which = 535 }
		command = { type = removecore which = 536 }
		command = { type = removecore which = 915 }
		command = { type = removecore which = 917 }
		command = { type = removecore which = 518 }
		command = { type = removecore which = 520 }
		command = { type = removecore which = 528 }
		command = { type = removecore which = 529 }
		command = { type = removecore which = 542 }
		command = { type = removecore which = 543 }
		command = { type = removecore which = 544 }
		command = { type = removecore which = 554 }
		command = { type = removecore which = 555 }
		command = { type = removecore which = 556 }
		command = { type = removecore which = 935 }
		command = { type = removecore which = 545 }
		command = { type = removecore which = 926 }
		command = { type = removecore which = 927 }
		command = { type = removecore which = 928 }
		command = { type = removecore which = 929 }
		command = { type = removecore which = 930 }
		command = { type = removecore which = 931 }
		command = { type = removecore which = 934 }
		command = { type = removecore which = 944 }
		command = { type = removecore which = 945 }
		command = { type = removecore which = 951 }
		command = { type = removecore which = 533 }
		command = { type = removecore which = 537 }
		command = { type = removecore which = 538 }
		command = { type = removecore which = 539 }
		command = { type = removecore which = 918 }
		command = { type = removecore which = 919 }
		command = { type = removecore which = 922 }
		command = { type = removecore which = 923 }
		command = { type = removecore which = 947 }
		command = { type = removecore which = 948 }
		command = { type = removecore which = 949 }
		command = { type = removecore which = 950 }
		command = { type = removecore which = 937 }

	}
}


event = { 
	id = 1500203
	random = no
	country = USA
	
	trigger = {

		ai = yes

		NOT = { exists = GER }

		event = 1500202 # Previous events happened
		control = { province = 527 data = USA } # Paris	

		}
	
	date = { day = 1 month = january year = 1939 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }
	
	name = AI_EVENT
	desc = ""
	style = 0
	action_a = {
		command = { type = trigger which = 1500204 } # French event with FF recieving claims back
		command = { type = secedeprovince which = FRA value = 522 }
		command = { type = secedeprovince which = FRA value = 523 }
		command = { type = secedeprovince which = FRA value = 524 }
		command = { type = secedeprovince which = FRA value = 525 }
		command = { type = secedeprovince which = FRA value = 526 }
		command = { type = secedeprovince which = FRA value = 527 }
		command = { type = secedeprovince which = FRA value = 531 }
		command = { type = secedeprovince which = FRA value = 532 }
		command = { type = secedeprovince which = FRA value = 534 }
		command = { type = secedeprovince which = FRA value = 535 }
		command = { type = secedeprovince which = FRA value = 536 }
		command = { type = secedeprovince which = FRA value = 915 }
		command = { type = secedeprovince which = FRA value = 917 }
		command = { type = secedeprovince which = FRA value = 518 }
		command = { type = secedeprovince which = FRA value = 520 }
		command = { type = secedeprovince which = FRA value = 528 }
		command = { type = secedeprovince which = FRA value = 529 }
		command = { type = secedeprovince which = FRA value = 542 }
		command = { type = secedeprovince which = FRA value = 543 }
		command = { type = secedeprovince which = FRA value = 544 }
		command = { type = secedeprovince which = FRA value = 554 }
		command = { type = secedeprovince which = FRA value = 555 }
		command = { type = secedeprovince which = FRA value = 556 }
		command = { type = secedeprovince which = FRA value = 935 }
		command = { type = secedeprovince which = FRA value = 545 }
		command = { type = secedeprovince which = FRA value = 926 }
		command = { type = secedeprovince which = FRA value = 927 }
		command = { type = secedeprovince which = FRA value = 928 }
		command = { type = secedeprovince which = FRA value = 929 }
		command = { type = secedeprovince which = FRA value = 930 }
		command = { type = secedeprovince which = FRA value = 931 }
		command = { type = secedeprovince which = FRA value = 934 }
		command = { type = secedeprovince which = FRA value = 944 }
		command = { type = secedeprovince which = FRA value = 945 }
		command = { type = secedeprovince which = FRA value = 951 }
		command = { type = secedeprovince which = FRA value = 533 }
		command = { type = secedeprovince which = FRA value = 537 }
		command = { type = secedeprovince which = FRA value = 538 }
		command = { type = secedeprovince which = FRA value = 539 }
		command = { type = secedeprovince which = FRA value = 918 }
		command = { type = secedeprovince which = FRA value = 919 }
		command = { type = secedeprovince which = FRA value = 922 }
		command = { type = secedeprovince which = FRA value = 923 }
		command = { type = secedeprovince which = FRA value = 947 }
		command = { type = secedeprovince which = FRA value = 948 }
		command = { type = secedeprovince which = FRA value = 949 }
		command = { type = secedeprovince which = FRA value = 950 }
		command = { type = secedeprovince which = FRA value = 937 }
		command = { type = removecore which = 522 }
		command = { type = removecore which = 523 }
		command = { type = removecore which = 524 }
		command = { type = removecore which = 525 }
		command = { type = removecore which = 526 }
		command = { type = removecore which = 527 }
		command = { type = removecore which = 531 }
		command = { type = removecore which = 532 }
		command = { type = removecore which = 534 }
		command = { type = removecore which = 535 }
		command = { type = removecore which = 536 }
		command = { type = removecore which = 915 }
		command = { type = removecore which = 917 }
		command = { type = removecore which = 518 }
		command = { type = removecore which = 520 }
		command = { type = removecore which = 528 }
		command = { type = removecore which = 529 }
		command = { type = removecore which = 542 }
		command = { type = removecore which = 543 }
		command = { type = removecore which = 544 }
		command = { type = removecore which = 554 }
		command = { type = removecore which = 555 }
		command = { type = removecore which = 556 }
		command = { type = removecore which = 935 }
		command = { type = removecore which = 545 }
		command = { type = removecore which = 926 }
		command = { type = removecore which = 927 }
		command = { type = removecore which = 928 }
		command = { type = removecore which = 929 }
		command = { type = removecore which = 930 }
		command = { type = removecore which = 931 }
		command = { type = removecore which = 934 }
		command = { type = removecore which = 944 }
		command = { type = removecore which = 945 }
		command = { type = removecore which = 951 }
		command = { type = removecore which = 533 }
		command = { type = removecore which = 537 }
		command = { type = removecore which = 538 }
		command = { type = removecore which = 539 }
		command = { type = removecore which = 918 }
		command = { type = removecore which = 919 }
		command = { type = removecore which = 922 }
		command = { type = removecore which = 923 }
		command = { type = removecore which = 947 }
		command = { type = removecore which = 948 }
		command = { type = removecore which = 949 }
		command = { type = removecore which = 950 }
		command = { type = removecore which = 937 }
	}
}

event = { 
	id = 1500204
	random = no
	country = FRA
	
	# triggered by USA 1500203

	
	name = AI_EVENT
	desc = ""
	style = 0
	action_a = {
		command = { type = addcore which = 522 }
		command = { type = addcore which = 523 }
		command = { type = addcore which = 524 }
		command = { type = addcore which = 525 }
		command = { type = addcore which = 526 }
		command = { type = addcore which = 527 }
		command = { type = addcore which = 531 }
		command = { type = addcore which = 532 }
		command = { type = addcore which = 534 }
		command = { type = addcore which = 535 }
		command = { type = addcore which = 536 }
		command = { type = addcore which = 915 }
		command = { type = addcore which = 917 }
		command = { type = addcore which = 518 }
		command = { type = addcore which = 520 }
		command = { type = addcore which = 528 }
		command = { type = addcore which = 529 }
		command = { type = addcore which = 542 }
		command = { type = addcore which = 543 }
		command = { type = addcore which = 544 }
		command = { type = addcore which = 554 }
		command = { type = addcore which = 555 }
		command = { type = addcore which = 556 }
		command = { type = addcore which = 935 }
		command = { type = addcore which = 545 }
		command = { type = addcore which = 926 }
		command = { type = addcore which = 927 }
		command = { type = addcore which = 928 }
		command = { type = addcore which = 929 }
		command = { type = addcore which = 930 }
		command = { type = addcore which = 931 }
		command = { type = addcore which = 934 }
		command = { type = addcore which = 944 }
		command = { type = addcore which = 945 }
		command = { type = addcore which = 951 }
		command = { type = addcore which = 533 }
		command = { type = addcore which = 537 }
		command = { type = addcore which = 538 }
		command = { type = addcore which = 539 }
		command = { type = addcore which = 918 }
		command = { type = addcore which = 919 }
		command = { type = addcore which = 922 }
		command = { type = addcore which = 923 }
		command = { type = addcore which = 947 }
		command = { type = addcore which = 948 }
		command = { type = addcore which = 949 }
		command = { type = addcore which = 950 }
		command = { type = addcore which = 937 }
	}
}

#############################################
#  GERMANY STRATEGY CHANGES 
#############################################


event = {		# Follows core_GER_Guderian.ai
	id = 9500510
	random = no
	country = GER
	
	trigger = {
		ai = yes
		event = 1510084		#GER_38.ai
	#	OR = {
	#		technology = 2316	#Basic Medium Tank (37mm+)
	#		
	#	}
	}

	name = AI_EVENT #"Switch to GER_Panzers"
	desc = ""
	style = 0

	date = { day = 20 month = december year = 1937 } 
	offset = 30
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = "core_GER_Panzers.ai" }
	}
	
}

event = {
	id = 9500511
	random = no 
	country = GER
	
	trigger = {
		ai = yes
		random = 66 
		
		control = { province = 527 data = GER } # Germany controls Paris
		control = { province = 643 data = GER } # Germany controls Warszawa
		
		OR= {
			NOT = {exists = YUG}		#Yugoslavia partitioned or Axis
			alliance = { country = YUG country = GER }
		} 

		OR = {	
			NOT = { atwar = GRE  }		#Greece not involved or conquered (likely)
			
			NOT = { exists = GRE }
			control = { province = 891 data = GER }	#Athinai
			control = { province = 891 data = ITA } #Athinai		
		}	
			
		exists = SOV
		NOT = {	alliance = { country = SOV country = GER } } # Not when Unholy Allianced
		

		OR= {
			NOT = {exists = NOR}		#Norway conquered or Axis
			alliance = { country = NOR country = GER }
		} 

	}

	name = AI_EVENT #"Switch to regular core_GER_Barbarossa"
	desc = ""
	style = 0	
	
	date = { day = 15 month = june year = 1941 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = "core_GER_Barbarossa.ai" }
		command = { type = sleepevent which = 10003 } # other Barbarossa load
		command = { type = sleepevent which = 10002 } # other Barbarossa load
	}

}



event = {		# Loaded upon availability of MECHANIZED troops
	id = 9500512
	random = no
	country = GER
	
	trigger = {
		ai = yes
		OR = {  # Barbarossa AI file events
			event = 9500511
			event = 10002
			event = 10003
		}		
		technology = 11307	#Mechanized HQs
	}

	name = AI_EVENT 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 15
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = "core_GER_Hanomags.ai" }
	}
	
}

event = {		
	id = 9500513
	random = no
	country = GER
	
	trigger = {
		ai = yes
		technology = 11501	#Task Force Offensive Organization
	}

	name = AI_EVENT 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 } 
	offset = 30
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = "core_GER_Research.ai" }
	}
	
}


event = {
	id = 9500514
	random = no 
	country = GER
	
	trigger = {
		ai = yes
		random = 66
		OR= {
			event = 10003	# other Barbarossa load w/no Japan
			event = 10002
			event = 9500511	
					}
		event = 492095 #Japan DOWs Western Allies
	}

	name = AI_EVENT
	desc = ""
	style = 0	
	
	date = { day = 7 month = dec year = 1941 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = "core_GER_Barbarossa_Japan.ai" }
	}

}

###################################################
#(AI) Operation Barbarossa  
###################################################

# Phase 1: Border Battle (Historically, June - mid-July 1941)

event = {
	id = 9510201
	random = no
	country = GER

	trigger = {
		ai = yes
		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }

		war = { country = GER country = SOV }
		under_attack = SOV  #Germany initiates German-Soviet war

	}
	
	name = AI_EVENT #"core_GER_Barbarossa_Phase1_BorderBattle.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { }
		#command = { type = ai which = core_GER_Barbarossa_Phase1_BorderBattle.ai }
	}
}

# Phase 2: Name TBD (Historically, mid-July - Oct 1941)

event = {
	id = 9510211
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 9510201 #GER_Barbarossa_Phase1_BorderBattle

		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }
		war = { country = GER country = SOV }

		#German breakthrough along historical path of Army Group North/Center/South
		OR = {

			#Human Soviet Union trigger: 2 of 3 Army Groups achieve Phase 1 targets 
			OR = {
				flag = ger_global_sov_HumanPlayer #Human Soviet Union
				
				AND = {
					OR = { #Army Group North crosses Daugeva River
						NOT = { control = { province = 707 data = SOV } } #Tallinn
						NOT = { control = { province = 709 data = SOV } } #Riga
						NOT = { control = { province = 708 data = SOV } } #Rezekne
						NOT = { control = { province = 785 data = SOV } } #Pskov	
					}

					OR = { #Army Group Center reaches Belorussia
						NOT = { control = { province = 778 data = SOV } } #Minsk
						NOT = { control = { province = 779 data = SOV } } #Mogilev
						NOT = { control = { province = 772 data = SOV } } #Bobrujsk
					}

				} 

				AND = {
					OR = { #Army Group Center reaches Belorussia
						NOT = { control = { province = 778 data = SOV } } #Minsk
						NOT = { control = { province = 779 data = SOV } } #Mogilev
						NOT = { control = { province = 772 data = SOV } } #Bobrujsk
					}

					OR = { #Army Group South reaches central Ukraine
						NOT = { control = { province = 774 data = SOV } } #Zjitomir
						NOT = { control = { province = 766 data = SOV } } #Vinnytsa
						NOT = { control = { province = 769 data = SOV } } #Kotovsk
						#NOT = { control = { province = 764 data = SOV } } #Odessa					
						NOT = { control = { province = 865 data = SOV } } #Dnepropetrovsk
						NOT = { control = { province = 770 data = SOV } } #Kirovograd
					}
				}

				AND = {
					OR = { #Army Group North establishes bridgehead across Daugeva River
						NOT = { control = { province = 707 data = SOV } } #Tallinn
						NOT = { control = { province = 709 data = SOV } } #Riga
						NOT = { control = { province = 708 data = SOV } } #Rezekne
						NOT = { control = { province = 785 data = SOV } } #Pskov	
					}

					OR = { #Army Group South reaches central Ukraine
						NOT = { control = { province = 774 data = SOV } } #Zjitomir
						NOT = { control = { province = 766 data = SOV } } #Vinnytsa
						NOT = { control = { province = 769 data = SOV } } #Kotovsk
						#NOT = { control = { province = 764 data = SOV } } #Odessa					
						NOT = { control = { province = 865 data = SOV } } #Dnepropetrovsk
						NOT = { control = { province = 770 data = SOV } } #Kirovograd
					}
				}
			}
			
			#Ahistorical trigger (AI and Human Soviet Union) : Bridgehead across Dniepr River
			
			OR = {
				NOT = { control = { province = 776 data = SOV } } #Chernigov
				NOT = { control = { province = 775 data = SOV } } #Kiev
				NOT = { control = { province = 857 data = SOV } } #Kharkov
				NOT = { control = { province = 864 data = SOV } } #Donetsk
				NOT = { control = { province = 863 data = SOV } } #Stalino
			}

			#AI Soviet Union trigger: 3 of 3 Army Groups achieve Phase 1 targets 
			#USSR does not control Riga OR Pskov + Minsk + Zjitomir 
			
			AND = { 

				NOT = { flag = ger_global_sov_HumanPlayer } #AI Soviet Union
				OR = {
					NOT = { control = { province = 709 data = SOV } } #Riga
					NOT = { control = { province = 785 data = SOV } } #Pskov
				}
				NOT = { control = { province = 778 data = SOV } } #Minsk
				NOT = { control = { province = 774 data = SOV } } #Zjitomir

			}

		}

	}
	
	name = AI_EVENT #"core_GER_Barbarossa_Phase2.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { }
		#command = { type = ai which = core_GER_Barbarossa_Phase2.ai }
	}
}

# Phase 3: Operation Typhoon (Historically, Oct-Dec 1941)

event = {
	id = 9510221
	random = no
	country = GER

	trigger = {
		ai = yes
		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }
		war = { country = GER country = SOV }

	}
	
	name = AI_EVENT #"core_GER_Barbarossa_Phase3_OperationTyphoon.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { }
		#command = { type = ai which = core_GER_Barbarossa_Phase3_OperationTyphoon.ai }
	}
}

# Phase 4: Soviet 1941 Winter Counteroffensive (Historically, Dec. 1941-May 1942)

event = {
	id = 9510231
	random = no
	country = GER

	trigger = {
		ai = yes
		#war = { country = GER country = USA }
		#war = { country = GER country = ENG }
		
		war = { country = GER country = SOV }
		NOT = {
			war = { country = PAN country = SOV } #Soviet Union can redeploy Siberian divisions
		}

	}
	
	name = AI_EVENT #"core_GER_Barbarossa_Phase4_WinterCounteroffensive.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { }
		#command = { type = ai which = core_GER_Barbarossa_Phase4_WinterCounteroffensive.ai }
	}
}


###################################
# Germany Norway invasion AI
##################################

event = {		
	id = 9500516
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 10001	#GER_BoB.ai
		OR = {
			exists = VIC
			AND = {
				NOT = { control = { province = 944 data = FRA }	}  #Toulouse
				NOT = { control = { province = 929 data = FRA }	}  #Marseilles
				NOT = { control = { province = 538 data = FRA }	}  #Brest
			}
		}	
		OR = {
			war = { country = NOR country = GER }
			war = { country = SWE country = GER }
		}
		NOT = { 
			war = { country = SOV country = GER } 
			war = { country = SPR country = GER }
		}
	}

	name = AI_EVENT #"Switch to GER_Oslo" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 } 
	offset = 3
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_GER_Oslo.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {		
	id = 9500517
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 9500516   #GER_Oslo.ai
		OR = {
			
			AND = {
				#NOT = { exists = NOR }
				
				#Andris: Goal is for quick German victory, to leave time for Sea Lion
				control = { province = 664 data = GER }	#Oslo
				control = { province = 662 data = GER } #Stavanger
				control = { province = 663 data = GER } #Kristiansand
				control = { province = 671 data = GER } #Bergen
				control = { province = 674 data = GER } #Trondheim
				
				#Andris: Narvik captured overland
				#control = { province = 680 data = GER } #Narvik
				}
			puppet = { country = NOR country = GER }		

		}

		#NOT = { 
		#	war = { country = SOV country = GER } 
		#}
	}

	name = AI_EVENT #"Second GER_BoB with Norway convoys" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		
		#Replenish German resources (1 of 3 will be filled per AI convoy rules)
		#command = { type = convoy which = 662 value = 598 when = 6 } #Stavanger-Rostock steel,coal 
		#command = { type = convoy which = 664 value = 598 when = 6 } #Oslo-Rostock  
		#command = { type = convoy which = 680 value = 598 when = 6 } #Narvik-Rostock

		#Replenish German resources (Either Stavanger or Oslo will be filled per AI convoy rules)
		command = { type = convoy which = 662 value = 594 when = 22 } #Stavanger-Copenhagen (DEN), if Axis steel, coal
		command = { type = convoy which = 662 value = 594 when = 22 } #	
		command = { type = convoy which = 662 value = 594 when = 18 } #just steel		
		
		command = { type = convoy which = 664 value = 594 when = 22 } #Oslo-Copenhagen (DEN), if Axis steel, coal
		command = { type = convoy which = 664 value = 594 when = 22 } #	
		command = { type = convoy which = 664 value = 594 when = 22 } #	
		command = { type = convoy which = 664 value = 594 when = 18 } #just steel		

		command = { type = ai which = core_GER_BoB.ai }		#reloads BoB AI
		command = { type = ai which = core_GER_Tripartite.ai }  #reloads German Diplomatic AI for Axis minors
	}
}

event = {		
	id = 9500551
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 9500517   #GER_BoB.ai
		
	}

	name = AI_EVENT #"Second GER_BoB with Norway convoys" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_GER_BoB.ai }		#reloads BoB AI as Germany tends to stall
		command = { type = ai which = core_GER_Tripartite.ai }  #reloads German Diplomatic AI for Axis minors
	}
}

event = {		
	id = 9500561
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 1500153 # ENG is AI too

		flag = GER_BoB   #GER_BoB.ai
		NOT = { control = { province = 487 data = GER } } 	#Edinburgh
		garrison = { country = ENG province = 487 size = 7 }
	
		NOT = { control = { province = 485 data = GER } } 	#Perth
		
	}

	name = AI_EVENT #"Switch to GER_BoB_Perth" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_GER_BoB_Perth.ai }	#reloads Northern invasion BoB AI to avoid
									#throwing large number of troops at Edinburgh 
		
	}
}

###################################
# Germany Iberia invasion AI
##################################

event = {		
	id = 9500518
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 9500806 #SPR govt alignment check
		NOT = { 
			war = { country = YUG country = GER }
			war = { country = SOV country = GER }
			alliance = { country = SOV country = SPR }
		}
	}

	name = AI_EVENT 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_GER_Madrid.ai }
		command = { type = addcore which = 945 } #Montpelier (Vichy territory on Spanish border)
		command = { type = addcore which = 951 } #Tarbes (Vichy territory on Spanish border)
		command = { type = trigger which = 9500807 } # Vichy cedes territory
	}
	action_b = {
		command = { type = sleepevent which = 9500519 } #no invasion
	}
}

event = {		
	id = 9500519
	random = no
	country = GER

	trigger = {
		random = 20
		ai = yes
		event = 9500806 #SPR govt alignment check
		event = 9500518 #GER_Madrid.ai
		NOT = { 
			war = { country = YUG country = GER }
			war = { country = SOV country = GER }
			alliance = { country = SOV country = SPR }
		}
	}

	name = AI_EVENT 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = war which = SPR }
		command = { type = ai which = core_GER_Conquistador.ai }
	}
}

# 172392 - Operation Felix: Gibraltar to Nationalist Spain (Andris)

event = {
	id = 172392 
	random = no
	country = GER

	trigger = {	
		ai = yes #Andris: separate event for human
		
		war = { country = GER country = ENG }
		war = { country = SPA country = ENG }
		
		event = 802015 #Nationalist Spain wins SCW
		control = { province = 989 data = GER } # Gibraltar

	}

	name = "Operation Felix: Gibraltar to Nationalist Spain"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 30 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = { 
		name = "Let them have it"
		command = { type = dissent value = -0.5 } 
		command = { type = control which = SPA value = 989 } # Gibraltar
		command = { type = influence value = 3 }
	}
	
}

###################################
# Germany Balkans invasion AI + Final BoB AI
##################################

event = {		
	id = 9500520
	random = no
	country = GER

	trigger = {
		ai = yes
		
		exists = YUG
		OR = {
			event = 752353	#Yugoslavia leaves Axis
			event = 752356	#Yugoslavia leaves Axis
			alliance = { country = ENG country = YUG }
		}	
			
		NOT= {
			war = { country = SOV country = GER }
		}
	}

	name = AI_EVENT #"Switch to GER_Balkans" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_GER_Balkans.ai }
		command = { type = war which = YUG } #Andris: AI bug, won't attack
		
		
	}
}

event = {		
	id = 9500521
	random = no
	country = GER

	trigger = {
		ai = yes

		#Initial Sea Lion Goals have NOT been achieved, prior to Balkans campaign
		NOT = { flag = ger_SeaLion_pause }	
		event = 9500520 #GER_Balkans.ai

		NOT = { exists = YUG }
		OR = {
			NOT = { exists = GRE }
			control = { province = 875 data = GER }	#Lárisa (breakthrough Mataxas line)
			control = { province = 891 data = GER }	#Athinai
			control = { province = 891 data = ITA } #Athinai
			
		}
		
		war = { country = ENG country = GER }		#UK still fighting

		NOT= { 	war = { country = SOV country = GER } 	}		

		
	}

	name = AI_EVENT #"Third GER_BoB" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_GER_BoB.ai }		#reloads BoB AI
		command = { type = ai which = core_GER_Tripartite.ai } #reloads German Diplomatic AI for Axis minors
	}
}

event = {		
	id = 9500522
	random = no
	country = BUL

	trigger = {
		ai = yes
		event = 9500520 	#AI Germany Balkans
		NOT = {exists = YUG}	#Occurs after partition of Yugoslavia

		alliance = { country = BUL country = GER }
		war = { country = GER country = GRE }

		control = { province = 871 data = BUL }	#Plovdiv
		control = { province = 755 data = GER } #Skopje
		
		}

	name = AI_EVENT #"Plovdiv to Germany" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 2
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = secedeprovince which = GER value = 871 } #Andris, helps AI with attack vs Greece
		command = { type = dissent which = -0.25 } 
	}
}

event = {		
	id = 9500523
	random = no
	country = HUN

	trigger = {
		ai = yes
		event = 9500520 	#AI Germany Balkans
		exists = YUG		#Occurs during campaign against Yugoslavia

		alliance = { country = HUN country = GER }
		war = { country = GER country = YUG }
		
		OR = {
			control = { province = 740 data = HUN }	#Osijek
			control = { province = 740 data = GER }
		}
		
		OR = {
			control = { province = 741 data = HUN }	#Novi Sad
			control = { province = 741 data = GER }
		}
		
	}

	name = AI_EVENT #"Novi Sad and Osijek to Germany" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 3
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		#Andris, helps AI with attack vs Belgrade
		command = { type = control which = GER value = 740 } #Osijek
		command = { type = control which = GER value = 741 } #Novi Sad	 
		command = { type = dissent which = -0.25 } 
	}
}

event = {		
	id = 9500524
	random = no
	country = ROM

	trigger = {
		ai = yes
		event = 9500520 	#AI Germany Balkans
		exists = YUG		#Occurs during campaign against Yugoslavia

		alliance = { country = ROM country = GER }
		war = { country = GER country = YUG }
		
		control = { province = 740 data = GER } #Osijek
		control = { province = 735 data = ROM }	#Nis
			
	}

	name = AI_EVENT #"Nis to Germany" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 5
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		#Andris, helps AI with attack vs Belgrade
		command = { type = control which = GER value = 735 } #Nis 
		command = { type = dissent which = -0.25 } 
	}
}


event = {		
	id = 9500528
	random = no
	country = GER

	trigger = {
		ai = yes

		#Initial Sea Lion Goals have been achieved, 
		#either prior to Balkans campaign OR after Third GER_BoB
		
		OR = {
			AND = { 
				flag = ger_SeaLion_pause 	
				event = 9500520 #GER_Balkans.ai
			}
			
			AND = { 
				flag = ger_SeaLion_pause 
				event = 9500521 #Third GER_BoB
			}		
		}
		
		NOT = { exists = YUG }
		OR = {
			NOT = { exists = GRE }
			control = { province = 875 data = GER }	#Lárisa (breakthrough Mataxas line)
			control = { province = 891 data = GER }	#Athinai
			control = { province = 891 data = ITA } #Athinai
			
		}
		
		war = { country = ENG country = GER }	#UK still fighting (New Order West hasn't triggered)

		NOT= { 	war = { country = SOV country = GER } 	}		

		
	}

	name = AI_EVENT #"Third GER_BoB (Full Conquest)" 
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_GER_BoB_southampton.ai } #new aggressive BoB AI
		command = { type = ai which = core_GER_Tripartite.ai } #reloads German Diplomatic AI for Axis minors
	}
}


################################################################
# German convoy to Oslo or Stavanger during Norway campaign
###############################################################

event = {		
	id = 9000307
	random = no
	country = GER

	trigger = {
		ai = yes
		war = { country = GER country = NOR }
		control = { province = 664 data = GER }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = convoy which = 587 value = 664 when = 17 } #Lubeck to Oslo; oil/supplies
	}
}

event = {		
	id = 9000308
	random = no
	country = GER

	trigger = {
		ai = yes
		war = { country = GER country = NOR }
		control = { province = 662 data = GER }
		NOT = { control = { province = 664 data = GER } }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = convoy which = 587 value = 662 when = 17 } #Lubeck to Stavanger; oil/supplies
	}
}

###############################################################
#Convoy Reorganization in Preparation for Operation Sea Lion
###############################################################

event = {		
	id = 9000310
	random = no
	country = GER

	trigger = {
		ai = yes
		
		#Norway Convoys
		event = 9500516   #GER_Oslo.ai
		event = 9500517   #Second GER_BoB with Norway convoys
		
		NOT = { exists = NOR }
		
		OR = {
			war = { country = GER country = ENG }
			war = { country = GER country = SOV }
			war = { country = GER country = USA }
		}			
		
		control = { province = 664 data = GER }	#Oslo
		control = { province = 662 data = GER } #Stavanger
		#control = { province = 671 data = GER } #Bergen
		control = { province = 674 data = GER } #Trondheim
		control = { province = 680 data = GER } #Narvik

		#Italy Convoys
		alliance = { country = GER country = ITA }
		owned = { province = 565 data = GER } #Bregenz
				
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 9
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		#Ends Norway convoys	
		command = { type = secedeprovince which = SCH value = 662 } #Stavanger
		command = { type = secedeprovince which = SCH value = 674 } #Trondheim
		command = { type = secedeprovince which = SCH value = 680 } #Narvik
		#Ends Italy convoys
		command = { type = secedeprovince which = SCH value = 565 } #Bregenz
		command = { type = trigger which = 9000311 } #German temp. access, so doesn't redeploy forces
	}
}

event = { 
	id = 9000311 
	random = no
	country = SCH
	
	#triggered by GER9000310
	
	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = access which = GER }
		command = { type = dissent value = -0.25 }
	}

}

event = {		
	id = 9000312
	random = no
	country = SCH

	trigger = {
		event = 9000310
		#event = 9000311   		
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 22
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = secedeprovince which = GER value = 662 } #Stavanger
		command = { type = secedeprovince which = GER value = 674 } #Trondheim
		command = { type = secedeprovince which = GER value = 680 } #Narvik

		command = { type = secedeprovince which = GER value = 565 } #Bregenz
		command = { type = end_access which = GER }
	}
}

event = {		
	id = 9000313
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 9000312
		control = { province = 664 data = GER } #Oslo
	}

	name = AI_EVENT #"Convoy Reorganization"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 15
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		#New Norway convoys
		command = { type = convoy which = 664 value = 594 when = 22 } #Oslo-Copenhagen (DEN), if Axis steel, coal
		command = { type = convoy which = 664 value = 594 when = 22 } #	
		command = { type = convoy which = 664 value = 594 when = 22 } #	
		command = { type = convoy which = 664 value = 594 when = 18 } #just steel

		#New Italy convoys
		command = { type = capital which = 565 } #Capital to Bregenz so convoys actually filled by AI
		command = { type = convoy which = 565 value = 563 when = 30 } #Bregenz to Bolzano: coal,steel,rubber,supplies
		command = { type = convoy which = 565 value = 563 when = 30 }
		command = { type = convoy which = 565 value = 563 when = 22 } #coal,steel, supplies
		command = { type = convoy which = 565 value = 563 when = 22 } #coal,supplies
		command = { type = capital which = 602 } #Capital back to Berlin
		
	}
}



#########################################################################
## Operation Sea Lion: German Invasion (Ahistorical) Convoys
#########################################################################

# Southern Invasion convoys
event = {		
	id = 9000316
	random = no
	country = GER
	persistent = yes

	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 498 data = GER } #Coventry
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 498 when = 17 } #Kiel-Coventry: oil/supplies
		command = { type = convoy which = 588 value = 498 when = 17 } #Hamburg-Coventry: oil/supplies
	}
}

event = {		
	id = 9000317
	random = no
	country = GER
	persistent = yes
	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 503 data = GER } #Portsmouth
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 503 when = 17 } #Kiel-Portsmouth: oil/supplies
	}
}

event = {		
	id = 9000318
	random = no
	country = GER
	persistent = yes

	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 502 data = GER }  #Southampton
		NOT = { 
			control = { province = 503 data = GER } #Portsmouth: to avoid double convoys
			
		      }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 502 when = 17 } #Kiel-Southampton: oil/supplies
	}
}

# Northern Invasion convoys

event = {		
	id = 9000319
	random = no
	country = GER
	
	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 485 data = GER } #Perth
		
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 485 when = 17 } #Kiel-Perth: oil/supplies
	}
}

event = {		
	id = 9000320
	random = no
	country = GER
	
	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 482 data = GER } #Scapa Flow
		
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 482 when = 17 } #Kiel-Scapa Flow: oil/supplies
	}
}

event = {		
	id = 9000321
	random = no
	country = GER

	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 487 data = GER } #Edinburgh
		
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 487 when = 17 } #Kiel-Edinburgh: oil/supplies
		command = { type = convoy which = 588 value = 487 when = 17 } #Hamburg-Edinburgh: oil/supplies
	}
}

#Northern Ireland Convoys from Edinburgh
event = {		
	id = 9000381
	random = no
	country = GER
	
	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 487 data = GER } #Edinburgh
		control = { province = 493 data = GER } #Belfast
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 487 value = 493 when = 17 } #Edinburgh-Belfast: oil/supplies
	}
}

#Re-supply German Pockets in Scotland
event = {		
	id = 9000401
	random = no
	country = GER
	
	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 486 data = GER } #Glasgow pocket
		NOT = { control = { province = 485 data = GER } } #Perth
		NOT = { control = { province = 487 data = GER } } #Edinburgh
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 486 when = 17 } #Kiel-Glasgow: oil/supplies
		command = { type = convoy which = 586 value = 486 when = 17 }
	}
}

event = {		
	id = 9000402
	random = no
	country = GER
	
	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 483 data = GER } #Inverness pocket
		NOT = { control = { province = 482 data = GER } } #Scapa Flow
		NOT = { control = { province = 485 data = GER } } #Perth
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 483 when = 17 } #Kiel-Inverness: oil/supplies
		command = { type = convoy which = 586 value = 483 when = 17 }
	}
}

event = {		
	id = 9000403
	random = no
	country = GER
	
	trigger = {
		ai = yes
		war = { country = GER country = ENG }
		control = { province = 484 data = GER } #Aberdeen pocket
		NOT = { control = { province = 482 data = GER } } #Scapa Flow
		NOT = { control = { province = 485 data = GER } } #Perth
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1940 } 
	offset = 5
	deathdate = { day = 1 month = january year = 1943 }

	action_a = {
		command = { type = convoy which = 586 value = 484 when = 17 } #Kiel-Aberdeen: oil/supplies
		command = { type = convoy which = 586 value = 484 when = 17 }
	}
}


###############################################################
#Convoy Reorganization after Operation Sea Lion (full conquest)
###############################################################

event = {		
	id = 9000426
	random = no
	country = GER

	trigger = {
		ai = yes
			
		OR = {
			war = { country = GER country = ENG }
			war = { country = GER country = SOV }
			war = { country = GER country = USA }
		}			
		
		#All British Isles provinces German-controlled (full conquest) 		
		control = { province = 482 data = GER } # Scapa Flow
		control = { province = 483 data = GER } # Inverness
		control = { province = 484 data = GER } # Aberdeen
		control = { province = 485 data = GER } # Perth
		control = { province = 486 data = GER } # Glasgow 
		control = { province = 487 data = GER } # Edinburgh
		control = { province = 488 data = GER } # Newcastle
		control = { province = 489 data = GER } # Manchester
		control = { province = 490 data = GER } # Sheffield
		control = { province = 491 data = GER } # Cardiff
		control = { province = 497 data = GER } # Birmingham
		control = { province = 498 data = GER } # Coventry
		control = { province = 499 data = GER } # London
		control = { province = 500 data = GER } # Bristol
		control = { province = 501 data = GER } # Plymouth
		control = { province = 502 data = GER } # Southampton
		control = { province = 503 data = GER } # Portsmouth

		#Italy Convoys
		alliance = { country = GER country = ITA }
		owned = { province = 565 data = GER } #Bregenz
				
	}

	name = AI_EVENT #"German send convoys"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 9
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		#Ends Norway, Denmark, and UK convoys	
		command = { type = secedeprovince which = SCH value = 587 } #Lubeck
		command = { type = secedeprovince which = SCH value = 586 } #Kiel
		
		#Ends Hungary convoys
		#command = { type = secedeprovince which = SCH value = 621 } #Wien
		
		#Ends Italy convoys
		#command = { type = secedeprovince which = SCH value = 565 } #Bregenz
		command = { type = trigger which = 9000427 } #German temp. access, so doesn't redeploy forces
		#command = { type = control which = SCH value = 486 } #Glasgow
		
	}
}

event = { 
	id = 9000427 
	random = no
	country = SCH
	
	#triggered by GER9000426
	
	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = access which = GER }
		command = { type = dissent value = -0.25 }
	}

}

event = {		
	id = 9000428
	random = no
	country = SCH

	trigger = {
		event = 9000426
		#event = 9000427   		
	}

	name = AI_EVENT #"Swiss return"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 22
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = secedeprovince which = GER value = 587 } #Lubeck
		command = { type = secedeprovince which = GER value = 586 } #Kiel
		
		#command = { type = secedeprovince which = GER value = 621 } #Wien
		#command = { type = secedeprovince which = GER value = 565 } #Bregenz
		#command = { type = control which = GER value = 486 } #Glasgow
		command = { type = end_access which = GER }
	}
}

event = {		
	id = 9000429
	random = no
	country = GER

	trigger = {
		ai = yes
		event = 9000428

	}

	name = AI_EVENT #"Western European Convoy Reorganization"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 15
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		#New Norway convoys
		command = { type = convoy which = 587 value = 664 when = 17 } #Lubeck to Oslo; oil/supplies
		
		#New consolidated UK supply convoys (Coventry, Edinburgh)
		command = { type = convoy which = 586 value = 498 when = 17 } #Kiel-Coventry: oil/supplies
		command = { type = convoy which = 586 value = 487 when = 17 } #Kiel-Edinburgh: oil/supplies
				
		#New UK resource convoys (Edinburgh, Glasgow, Coventry, Newcastle -> AI chooses only 1)
		command = { type = convoy which = 487 value = 587 when = 30 } #Edinburgh-Lubeck: coal,steel,rubber
		command = { type = convoy which = 486 value = 587 when = 30 } #Glasgow-Lubeck: coal,steel,rubber
		command = { type = convoy which = 498 value = 587 when = 30 } #Coventry-Lubeck: coal,steel,rubber
		command = { type = convoy which = 488 value = 587 when = 30 } #Newcastle-Lubeck: coal,steel,rubber
		
		#New consolidated UK supply convoys (Inverness, Portsmouth)
		command = { type = convoy which = 586 value = 483 when = 17 } #Kiel-Inverness: oil/supplies
		command = { type = convoy which = 586 value = 503 when = 17 } #Kiel-Portsmouth: oil/supplies

		#New Denmark convoys
		command = { type = convoy which = 587 value = 594 when = 30 } #Lubeck-Copenhagen:  #Steel, coal, rubber, supplies
		
		#New Hungary convoys
		#command = { type = capital which = 621 } #Capital to Wien so convoys actually filled by AI
		#command = { type = convoy which = 621 value = 622 when = 30 } #Wien to Szombathely: steel, coal, rubber, supplies
		#command = { type = convoy which = 621 value = 622 when = 23 } #Steel, coal, oil, supplies 
		
		#New Italy convoys
		#command = { type = capital which = 565 } #Capital to Bregenz so convoys actually filled by AI
		#command = { type = convoy which = 565 value = 563 when = 30 } #Bregenz to Bolzano: coal,steel,rubber,supplies
		#command = { type = convoy which = 565 value = 563 when = 30 }
		#command = { type = convoy which = 565 value = 563 when = 22 } #coal,steel, supplies
		#command = { type = convoy which = 565 value = 563 when = 22 } #coal,supplies
		#command = { type = capital which = 602 } #Capital back to Berlin

		
		
	}
}


########################################################
# Chinese Strategy Changes (Nationalist China) 
########################################################

event = {
	id = 9500600
	random = no 
	country = CHI

	trigger = {
		ai = yes
		war = { country = PAN country = CHI }
		
		#NatChi alone against Japan
		NOT = {
			alliance = { country = CHI country = ENG }
			alliance = { country = CHI country = SOV }
			alliance = { country = CHI country = USA }
		}

		OR = {
			NOT = { control = { province = 1698 data = CHI }  }	#Shanghai
			NOT = { control = { province = 1695 data = CHI }  }	#Nanjing
		}
	}

	name = AI_EVENT #"Switch to CHI_38_Shanghai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = "core_CHI_38_Shanghai.ai" }
	}
}

event = {
	id = 9500601
	random = no 
	country = CHI

	trigger = {
		ai = yes
		atwar = yes
		alliance = { country = CHI country = USA }
		alliance = { country = ENG country = USA }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = "core_CHI_Allied.ai" }
	}
}

#AI NatChi vs. HP Japan

event = { 
	id = 9500641
	random = no
	country = CHI
	
	# Triggered by CHI 4101A 
	
	trigger = {
		ai = yes	
		flag = chi_global_pan_HumanPlayer	
	}

	name = AI_EVENT
	desc = "Continue to improve coastal defenses in Guangxi against the Empire of Japan."
	style = 0

	action_a = {
		#command = { type = construct which = land_fort    value = 1704 } # Guangzhou
		#command = { type = construct which = land_fort    value = 1701 } # Jiangmen
		command = { type = construct which = coastal_fort value = 1702 } # Bobai
		command = { type = construct which = coastal_fort value = 1700 } # Zhanjiang
		command = { type = construct which = coastal_fort value = 1703 } # Kowloon
	}
}

#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# MINORS STRATEGY CHANGES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

event = {
	id = 9500800
	random = no
	country = CRO

	# Croatia joins the Allies
	
	trigger = {
		Alliance = { Country = ENG country = CRO }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 9500801
	random = no
	country = CRO

	# Croatia joins the Cominterm
	
	trigger = {
		alliance = { Country = SOV country = CRO }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 9500802
	random = no
	country = CRO

	# Croatia joins the Axis
	
	trigger = {
		alliance = { Country = GER country = CRO }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 9500803
	random = no
	country = SER

	# Serbia joins the Allies
	
	trigger = {
		alliance = { Country = ENG country = SER }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 9500804
	random = no
	country = SER

	# Serbia joins the Cominterm
	
	trigger = {
		alliance = { Country = SOV country = SER }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Soviet.ai }
	}
}

event = {
	id = 9500805
	random = no
	country = SER

	# Serbia joins the Axis
	
	trigger = {
		alliance = { Country = GER country = SER }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 9500806
	random = no
	country = SPR

	trigger = {
		event = 10001	#GER_BoB.ai
		event = 802002  #SPR victory
		alignment = communist
		OR = {
			NOT = { exists = NOR }
			alliance = { country = NOR country = GER }
			NOT = { exists = ENG }
			AND = {
				control = { province = 664 data = GER }	#Oslo
				control = { province = 662 data = GER } #Stavanger
				control = { province = 663 data = GER } #Kristiansand
			}
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = dissent value = -2 }
		command = { type = alignment which = fascist value = -50 }
	}
}

event = {
	id = 9500807
	random = no
	country = VIC

	# Triggered by German event 9500518

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = secedeprovince which = GER value = 945 } #Montpelier (Vichy territory on Spanish border)
		command = { type = secedeprovince which = GER value = 951 } #Tarbes (Vichy territory on Spanish border)
	}
}



#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# AMERICAN STRATEGY CHANGES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

event = {
	id = 9500700
	random = no 
	country = USA

	trigger = {
		ai = yes
		war = { country = GER country = USA }
		war = { country = GER country = ENG }
		NOT = {
			war = { country = ENG country = USA }
			alliance = { country = ENG country = USA }
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = alliance which = ENG }
	}
}


#######

############################################################################################
# GERMANY STRATEGY CHANGES (10001-10005)
############################################################################################

event = {
	id = 10001
	random = no
	country = GER

	# Initial Battle of Britain AI
	
	trigger = {
		ai = yes     
		war = { country = GER country = ENG }
		control = { province = 527 data = GER } # Paris
		control = { province = 643 data = GER } # Warsaw
		
		NOT = { war = { country = GER country = SOV } }
		
		OR = {
			#Historical Trigger:
			AND = {
				event = 172402  # German Tactical Manpowerpool reduction (No early war)
				event = 492090  # Placeholder event for late-July, 1940	
			}
	
			#Ahistorical: (Andris: Not complete, need to add additional triggers for other early wars)	
			NOT = { event = 172402 } # Early war with France		
		}
	}

	name = AI_EVENT #"core_GER_BoB"
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_GER_BoB.ai }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
	}
}
		
event = {
	id = 10002
	random = no 
	country = GER

	# Operation Barbarossa: England still fighting
	
	trigger = {
		ai = yes
		random = 10 # Germany should not automatically switch strategy at this point 

		war = { country = GER country = ENG }
		
		control = { province = 527 data = GER } # Germany controls Paris
		control = { province = 643 data = GER } # Germany controls Warszawa
		
		OR= {
			NOT = {exists = YUG}		#Yugoslavia partitioned or Axis
			alliance = { country = YUG country = GER }
		} 

		OR = {					#Greece conquered
			NOT = { exists = GRE }
			control = { province = 891 data = GER }	#Athinai
			control = { province = 891 data = ITA } #Athinai		
		}	
			
		
		exists = SOV
		NOT = {	alliance = { country = SOV country = GER } } # Not when Unholy Allianced
		
		NOT = {	
			AND = {						#Norway conquered
				war = { country = NOR country = GER }
				
				OR = {
					control = { province = 664 data = NOR }	#Oslo
					control = { province = 662 data = NOR } #Stavanger
					control = { province = 663 data = NOR } #Kristiansand
					control = { province = 680 data = NOR } #Narvik
				}
			}
		}
	}

	name = AI_EVENT #"Switch to early core_GER_Barbarossa"
	desc = ""
	style = 0	
	
	date = { day = 1 month = january year = 1941 }
	offset = 30 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_GER_Barbarossa.ai }
		command = { type = sleepevent which = 10003 }   # other Barbarossa load
		command = { type = sleepevent which = 9500511 } # other Barbarossa load
	}

}

event = {
	id = 10003
	random = no 
	country = GER

	# Operation Barbarossa: England is defeated -or- USSR DoW Germany (most likely)

	trigger = {
		ai = yes
		control = { province = 527 data = GER } # Germany controls Paris
		control = { province = 643 data = GER } # Germany controls Warszawa
		OR = {
			war = { country = GER country = SOV }
			OR = {
				control = { province = 499 data = GER } # Germany controls London
				control = { province = 499 data = ITA } # Italy controls London
			}	
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_GER_Barbarossa.ai }
		command = { type = sleepevent which = 10002 }   # other Barbarossa load
		command = { type = sleepevent which = 9500511 } # other Barbarossa load (PhilK_AI.txt)
	}
}	

event = {
	id = 10004
	random = no
	country = GER

	# Operation Sealion: USSR Defeated

	trigger = {
		ai = yes
		OR = {
			event = 5308 # USSR - The Bitter Peace
			event = 5309 # USSR - The Bitter Peace
			event = 5315 # Victory in the East
			event = 5334 # Victory in the East
			NOT = { exists = SOV }
		}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1942 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_GER_LateSealion.ai }
	}
}

event = {
	id = 10005
	random = no
	country = GER

	# Germany goes on the defensive

	trigger = {
		ai = yes
		war = { country = USA country = GER } # The mighty US has entered the war
		war = { country = SOV country = GER }
		#If Germany has still a comfortable position on the continent, then nopes
		NOT = {
			control = { province = 527 data = GER } # Germany controls Paris 
			control = { province = 643 data = GER } # Germany controls Warszawa
		}

	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_GER_FinalDefense.ai }
	}
}

###################################################
# 9500210 - (ITA) Opportunistic Italy (by nachinus)
#####################################################

event = {
	id = 9500210
	random = no
	country = ITA

	trigger = {
		ai = yes
		event = 1500061 #GER is ai
		alignment = fascist
		headofgovernment = 3002 #Il 'Duce'
		OR = {
			event = 172027 #tripartite
			event = 172029 #tripartite not PAN
			}
		OR = { 
			AND = {
				control = { province = 527 data = GER } # Paris
				control = { province = 531 data = GER } # Caen
				}

			lost_national = { country = FRA value = 25 }
			}
		NOT = { 
			war = { country = GER country = SOV }
			
		}
		
		NOT = {	alliance = { country = ITA country = GER } } 
		
	 	random = 40	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = september year = 1939 }
	offset = 15
	deathdate = { day = 30 month = january year = 1942 }

	action_a = {
		command = { type = alliance which = GER }
					
	}
}

#############################################
# (9500211) - ENG for Early part of WWII until Battle of Britain
###################################################

event = {
	id = 9500211 
	random = no
	country = ENG


	trigger = {
		ai = yes
		war = { country = ENG country = GER }
		NOT = {
			war = { country = USA country = GER } #USA not involved yet
			}
		}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ENG_39-40.ai }
	}
}


#############################################
# (9500212) - ENG goes defensive after France fall, until Germany at war with either USA or SOV
###################################################

event = {
	id = 9500212 
	random = no
	country = ENG


	trigger = {
		ai = yes
		war = { country = ENG country = GER }

		exists = VIC
		NOT = {war = { country = GER country = SOV }} #England pretty much alone
		NOT = {war = { country = GER country = USA }}

		#NOT = {
		#	OR = {
		#		war = { country = ENG country = ITA }
		#		war = { country = ENG country = PAN }
		#		event = 1510030
		#		}
		#	}
		}

	name = AI_EVENT #"Core_ENG_BoB.ai"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ENG_BoB.ai }
	}
}	


##############################################################
#(492170) - Japan either after surrender of NatChi or very late war w/NatChi , but not at war with Allies
##############################################################
event = {
	id = 492170
	random = no
	country = PAN

	# Japan attacks remaining NatChi troops in western China, then Sinkiang (usually, but not always)

	trigger = {
		ai = yes
		event = 492150 #Marco Polo
		
		OR = { 
			#Option 1: Annexation of NatChi or Kiri Project ends war
			NOT = {	war = { country = PAN country = CHI }} 
			
			#Option 2: NatChi Lanzhou defense
			AND = { 
				flag = central_late

				#NatChi controls Lanzhou and Yinchuan
				control = { province = 1572 data = CHI } 		#Yinchuan 
				garrison = { country = CHI province = 1572 size = 21 }
				control = { province = 1574 data = CHI } 		#Lanzhou
				garrison = { country = CHI province = 1574 size = 18 }
				
				#Japan controls other major NatChi provinces
				control = { province = 1573 data = PAN } #Wudu 
				control = { province = 1611 data = PAN } #Kunming
				control = { province = 1612 data = PAN } #Wutunghliao
				control = { province = 1613 data = PAN } #Chengdu 
				control = { province = 1614 data = PAN } #Guiyang
				control = { province = 1615 data = PAN } #Zunyi 
				control = { province = 1616 data = PAN } #Chongqing
				control = { province = 1617 data = PAN } #Xi'an
			}

			#Option 3: NatChi Kunming defense (55-69 units)
			AND = { 
				flag = central_late

				#NatChi controls Kunming
				control = { province = 1611 data = CHI } 		#Kunming 
				garrison = { country = CHI province = 1611 size = 55 }
				NOT = { garrison = { country = CHI province = 1611 size = 70 }	}
			
				#Japan controls other major NatChi provinces
				control = { province = 1573 data = PAN } #Wudu 
				control = { province = 1612 data = PAN } #Wutunghliao
				control = { province = 1602 data = PAN } #Mojiang
				control = { province = 1613 data = PAN } #Chengdu 
				control = { province = 1614 data = PAN } #Guiyang
				control = { province = 1615 data = PAN } #Zunyi 
				control = { province = 1616 data = PAN } #Chongqing
				control = { province = 1617 data = PAN } #Xi'an
			}

			#Option 4: NatChi Kunming defense (70+ units)
			AND = { 
				flag = central_late

				#NatChi controls Kunming
				control = { province = 1611 data = CHI } 		#Kunming 
				garrison = { country = CHI province = 1611 size = 70 }
								
				#Japan controls other major NatChi provinces
				control = { province = 1573 data = PAN } #Wudu 
				control = { province = 1612 data = PAN } #Wutunghliao
				#control = { province = 1602 data = PAN } #Mojiang #Andris: removed Mojiang, when really big NatChi stack
				control = { province = 1613 data = PAN } #Chengdu 
				control = { province = 1614 data = PAN } #Guiyang
				control = { province = 1615 data = PAN } #Zunyi 
				control = { province = 1616 data = PAN } #Chongqing
				control = { province = 1617 data = PAN } #Xi'an
			}
		}
		
		NOT = {
			OR = {
				war = { country = PAN country = SOV }
				war = { country = PAN country = USA }
				war = { country = PAN country = ENG }
				}
			}
		}

	name = AI_EVENT #"Switch to JAP_deepchina"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_japan_deepchina.ai }
		
	}
}	

##############################################################
#(492171) - Japan after capturing Dutch Indies
##############################################################
event = {
	id = 492171
	random = no
	country = PAN

	
	trigger = {
		ai = yes
		NOT = {exists = HOL}
		atwar = yes
		NOT = {	war = { country = PAN country = CHI }}
		
		OR = {
			war = { country = PAN country = USA }
			war = { country = PAN country = ENG }
			}
			
		}

	name = AI_EVENT #"Core_JAP_South_part2"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_japan_south_part2.ai }
		
	}
}


##############################################################
#(492174-492178) - Japan convoys in SE Asia
##############################################################

event = {		
	id = 492174
	random = no
	country = PAN
	persistent = yes

	trigger = {
		ai = yes

		war = { country = PAN country = HOL }
		control = { province = 1780 data = PAN } #Batavia (Java)
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = july year = 1940 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1945 }

	action_a = {
		command = { type = convoy which = 1682 value = 1780 when = 17 } #Hiroshima - Batavia:   oil/supplies
		command = { type = convoy which = 1780 value = 1724 when = 25 } #Batavia-Haikou:  	oil/rubber/supplies

		#Andris: This convoy only created if Japan controls all of Indochina
		command = { type = convoy which = 1733 value = 1780 when = 16 } #Saigon-Batavia:  supplies
		command = { type = convoy which = 1780 value = 1733 when = 25 } #Batavia-Saigon:  oil/rubber/supplies
 	}
}

event = {		
	id = 492175
	random = no
	country = PAN
	persistent = yes

	trigger = {
		ai = yes

		war = { country = PAN country = HOL }
		control = { province = 1950 data = PAN } #Surabaya (Java)
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = july year = 1940 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1945 }

	action_a = {
		command = { type = convoy which = 1682 value = 1950 when = 17 } #Hiroshima - Surabaya: oil/supplies
		command = { type = convoy which = 1950 value = 1724 when = 25 } #Surabaya -Haikou:     oil/rubber/supplies

		#Andris: This convoy only created if Japan controls all of Indochina
		command = { type = convoy which = 1733 value = 1950 when = 16 } #Saigon-Surabaya:  supplies
		command = { type = convoy which = 1950 value = 1733 when = 25 } #Surabaya-Saigon:  oil/rubber/supplies
 	}
}

event = {		
	id = 492176
	random = no
	country = PAN
	persistent = yes

	trigger = {
		ai = yes

		war = { country = PAN country = HOL }
		control = { province = 1760 data = PAN } #Medan (Sumatra)
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = july year = 1940 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1945 }

	action_a = {
		command = { type = convoy which = 1682 value = 1760 when = 17 } #Hiroshima - Medan: oil/supplies
		
		#Andris: This convoy only created if Japan controls all of Indochina
		command = { type = convoy which = 1733 value = 1760 when = 16 } #Saigon-Medan:  supplies
		
 	}
}

event = {		
	id = 492177
	random = no
	country = PAN
	persistent = yes

	trigger = {
		ai = yes

		war = { country = PAN country = HOL }
		control = { province = 1774 data = PAN } #Oosthaven (Sumatra)
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = july year = 1940 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1945 }

	action_a = {
		command = { type = convoy which = 1682 value = 1774 when = 17 } #Hiroshima - Oosthaven: oil/supplies
		
		#Andris: This convoy only created if Japan controls all of Indochina
		command = { type = convoy which = 1733 value = 1774 when = 16 } #Saigon - Oosthaven:  supplies
		
 	}
}


event = {		
	id = 492178
	random = no
	country = PAN
	persistent = yes

	trigger = {
		ai = yes

		war = { country = PAN country = HOL }
		control = { province = 1968 data = PAN } #Makassar (Celebes)
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = july year = 1940 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1945 }

	action_a = {
		command = { type = convoy which = 1682 value = 1968 when = 17 } #Hiroshima - Makassar: oil/supplies
		
		#Andris: This convoy only created if Japan controls all of Indochina
		command = { type = convoy which = 1733 value = 1968 when = 16 } #Saigon - Makassar:  supplies
		
 	}
}

##############################################################
#(492186) - NatChi stack effect - Kunming
##############################################################
event = {
	id = 492186
	random = no
	country = CHI

	# JAP AI doesn't attack large stacks past a certain limit, even if easy win
	# This event reduces the stack 

	trigger = {
		
		event = 492150 #Marco Polo
		war = { country = PAN country = CHI }
		control = { province = 1611 data = CHI } #Kunming

		control = { province = 1612 data = PAN } #Wutunghliao
		control = { province = 1614 data = PAN } #Guiyang
		control = { province = 1606 data = PAN } #Kaiyuan
		control = { province = 1602 data = PAN } #Mojiang
		control = { province = 1601 data = PAN } #Baoshan
		supplies = 0 #NatChi out of supplies
		lost_VP = { country = CHI value = 93 }	#Only VP province is Kunming
	}
		
	name = "Desertion"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 10 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		name = OK
		command = { type = access which = TIB }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 } 
		
		command = { type = switch_allegiance which = CHC value = -1 } 
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 }
		
			
	}
}	


##############################################################
#(492187) - NatChi stack effect - Kunming
##############################################################
event = {
	id = 492187
	random = no
	country = CHI

	# JAP AI doesn't attack large stacks past a certain limit, even if easy win
	# This event reduces the stack by 22 divisions

	trigger = {
		random = 50
		event = 492150 
		event = 492186 #Stack Effect 
		war = { country = PAN country = CHI }
		control = { province = 1611 data = CHI } #Kunming

		control = { province = 1612 data = PAN } #Wutunghliao
		control = { province = 1614 data = PAN } #Guiyang
		control = { province = 1606 data = PAN } #Kaiyuan
		control = { province = 1602 data = PAN } #Mojiang
		control = { province = 1601 data = PAN } #Baoshan
		supplies = 0 #NatChi out of supplies
		lost_VP = { country = CHI value = 93 }	#Only VP province is Kunming
	}
		
	name = "Desertion"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		name = OK
		
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 } 
		
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 } 
		command = { type = switch_allegiance which = CHC value = -1 }
		
		
	}
}

##############################################################
#(492188) - NatChi stack effect - Chengdu
##############################################################
event = {
	id = 492188
	random = no
	country = CHI

	# JAP AI doesn't attack large stacks past a certain limit, even if easy win
	# This event reduces the stack 

	trigger = {
		
		event = 492150 
		
		war = { country = PAN country = CHI }
		control = { province = 1613 data = CHI } #Chengdu

		control = { province = 1612 data = PAN } #Wutunghliao
		control = { province = 1615 data = PAN } #Zunyi
		control = { province = 1616 data = PAN } #Chonqing
		control = { province = 1617 data = PAN } #Xi'an
		control = { province = 1573 data = PAN } #Wudu
		supplies = 0 #NatChi out of supplies
		lost_VP = { country = CHI value = 93 }	#Only VP province 
	}
		
	name = "Desertion"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		name = OK
		command = { type = access which = TIB }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 } 
		
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 } 
		command = { type = switch_allegiance which = CHC value = -1 }
		
		
		
	}
}

##############################################################
#(492189) - NatChi stack effect - Chengdu
##############################################################
event = {
	id = 492189
	random = no
	country = CHI

	# JAP AI doesn't attack large stacks past a certain limit, even if easy win
	# This event reduces the stack by 22 divisions

	trigger = {
		random = 50
		event = 492150 
		event = 492188 #Stack Effect 
		war = { country = PAN country = CHI }
		control = { province = 1613 data = CHI } #Chengdu

		control = { province = 1612 data = PAN } #Wutunghliao
		control = { province = 1615 data = PAN } #Zunyi
		control = { province = 1616 data = PAN } #Chonqing
		control = { province = 1617 data = PAN } #Xi'an
		control = { province = 1573 data = PAN } #Wudu
		supplies = 0 #NatChi out of supplies
		lost_VP = { country = CHI value = 93 }	#Only VP province 
	}
		
	name = "Desertion"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		name = OK
		
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 } 
		
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 } 
		command = { type = switch_allegiance which = CHC value = -1 }
		
		
	}
}

##############################################################
#(492190) - NatChi stack effect - Chonqqing
##############################################################
event = {
	id = 492190
	random = no
	country = CHI

	# JAP AI doesn't attack large stacks past a certain limit, even if easy win
	# This event reduces the stack by 22 divisions

	trigger = {
		
		event = 492150 
		
		war = { country = PAN country = CHI }
		control = { province = 1616 data = CHI } #Chonqing

		control = { province = 1691 data = PAN } #Xiangfan
		control = { province = 1615 data = PAN } #Zunyi
		control = { province = 1613 data = PAN } #Chengdu
		control = { province = 1617 data = PAN } #Xi'an
		
		supplies = 0 #NatChi out of supplies
		lost_VP = { country = CHI value = 93 }	#Only VP province 
	}
		
	name = "Desertion"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		name = OK
		command = { type = access which = TIB }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 } 
		
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 } 
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 }
		
		
		
	}
}

##############################################################
#(492191) - NatChi stack effect - Chonqqing
##############################################################
event = {
	id = 492191
	random = no
	country = CHI

	# JAP AI doesn't attack large stacks past a certain limit, even if easy win
	# This event reduces the stack by 22 divisions

	trigger = {
		random = 50
		event = 492150 
		event = 492190 #Stack Effect 
		war = { country = PAN country = CHI }
		control = { province = 1616 data = CHI } #Chonqing

		control = { province = 1691 data = PAN } #Xiangfan
		control = { province = 1615 data = PAN } #Zunyi
		control = { province = 1613 data = PAN } #Chengdu
		control = { province = 1617 data = PAN } #Xi'an
		supplies = 0 #NatChi out of supplies
		lost_VP = { country = CHI value = 93 }	#Only VP province 
	}
		
	name = "Desertion"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		name = OK
		
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 }
		command = { type = switch_allegiance which = TIB value = -1 } 
		
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 } 
		command = { type = switch_allegiance which = CHC value = -1 }
		command = { type = switch_allegiance which = CHC value = -1 }
		
		
	}
}

##############################################################
#(492196) - Japan gives access to remnants of NatChi Army to Tibet
##############################################################
event = {
	id = 492196
	random = no
	country = PAN

	trigger = {
		
		OR = {
			event = 492190 #Stackeffect Chonqqinq
			event = 492188 #Stackeffect Chengdu
			event = 492186 #Stackeffect Kunming
			}
		
		NOT = {	war = { country = PAN country = TIB }
			}

	}		
	name = AI_Event
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }	

	
	action_a = {
		
		name = OK
		command = { type = access which = TIB }		
		
	}
}


##############################################################
#(492197) - Japan gives access to remnants of NatChi Army to ComChi
##############################################################
event = {
	id = 492197
	random = no
	country = PAN

	trigger = {
		
		OR = {
			event = 492190 #Stackeffect Chonqqinq
			event = 492188 #Stackeffect Chengdu
			event = 492186 #Stackeffect Kunming
			}
		
		NOT = {	war = { country = PAN country = CHC }
			}

	}		
	name = AI_Event
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 }
	offset = 30 # Check for trigger conditions every 10 days
	deathdate = { day = 30 month = december year = 1947 }

	
	action_a = {
		
		name = OK
		command = { type = access which = CHC }		
		
	}
}

#############################
# 172400 (GER)(AI) Germany adopts conscription laws 
#############################

event = {
	id = 172400
	random = no
	country = GER

	trigger = { 
		government = fascist
		ai = yes
		OR= {
			technology = 4405 #Small Arms Assembly
			atwar = yes
		}
	}
	
	name = CEVTNAME_172144
	desc = CEVTDESC_172144
	style = 0

	date = { day = 24 month = august year = 1936 }
	offset = 15
	deathdate = { day = 29 month = december year = 1947 }

	action_a = {
		name = CEVTACTA_172144
		command = { type = dissent value = 2 }
		command = { type = manpowerpool value = 1150 } #Andris: 850MP added from scenario beg.
	}
}

##############################################
#(GER)(AI) German Tactical Manpowerpool Reduction/Increase (No early war)
# Allows it to really focus on research
##############################################

# 172402 (GER)(AI) German Tactical Manpowerpool Reduction 

event = {
	id = 172402
	random = no
	country = GER

	#Triggered by FRA 432009 A/B/C (Pacifist) or FRA 432011 B/C (Pacifist)

	trigger = { 
		ai = yes
		atwar = no
	} 		

	name = AI_EVENT #"German Tactical Manpowerpool Reduction"
	desc = ""
	style = 0

	action_a = {
		name = OK
		command = { type = province_manpower which = 558   value = -15 } #Koln
		command = { type = province_manpower which = 559   value = -15 } #Essen
		command = { type = province_manpower which = 560   value =  -5 } #Saarbrucken
		command = { type = province_manpower which = 562   value = -15 } #Munich
		command = { type = province_manpower which = 574   value =  -5 } #Nurnberg
		command = { type = province_manpower which = 577   value =  -5 } #Stuttgart
		command = { type = province_manpower which = 583   value =  -5 } #Hannover
 		command = { type = province_manpower which = 587   value = -10 } #Lubeck
		command = { type = province_manpower which = 588   value = -15 } #Hamburg
		command = { type = province_manpower which = 589   value =  -5 } #Wilhelmshafen
		command = { type = province_manpower which = 1961  value = -10 } #Frankfurt
		command = { type = province_manpower which = 602   value = -30 } #Berlin
		command = { type = province_manpower which = 604   value =  -5 } #Dresden
		command = { type = province_manpower which = 650   value =  -5 } #Konigsberg
		command = { type = province_manpower which = 580   value =  -5 } #Halle
		command = { type = province_manpower which = 585   value =  -5 } #Magdeburg
		command = { type = province_manpower which = 576   value =  -3 } #Wurzburg
		command = { type = province_manpower which = 575   value =  -3 } #Mannheim
		command = { type = province_manpower which = 579   value =  -3 } #Erfurt
		command = { type = province_manpower which = 605   value =  -3 } #Leipzig
		command = { type = province_manpower which = 547   value =  -3 } #Freiburg
		command = { type = province_manpower which = 603   value =  -3 } #Breslau	
		command = { type = province_manpower which = 599   value =  -2 } #Stettin
		command = { type = province_manpower which = 598   value =  -2 } #Rostock
		command = { type = province_manpower which = 646   value =  -2 } #Elbing
		command = { type = province_manpower which = 566   value =  -2 } #Konstanz
		command = { type = province_manpower which = 607   value =  -2 } #Landsberg
		command = { type = province_manpower which = 582   value =  -2 } #Munster
	}
}


# 172403 (GER) (AI) German Tactical Manpowerpool Increase 

event = {
	id = 172403
	random = no
	country = GER

	trigger = { 
		government = fascist
		ai = yes
		event = 172402
		
		OR= {
			event = 172404 #Placeholder triggers on March 18, 1937
			atwar = yes    #Early war trigger (Ahistorical)

			#Possible Soviet surprise attack through Poland  
			garrison = { country = SOV province = 606 size = 1 } #Poznan
			garrison = { country = SOV province = 645 size = 1 } #Danzig
			garrison = { country = SOV province = 648 size = 1 } #Torun
			garrison = { country = SOV province = 649 size = 1 } #Suwalki
			garrison = { country = SOV province = 639 size = 1 } #Lodz
			garrison = { country = SOV province = 640 size = 1 } #Radom
			garrison = { country = SOV province = 647 size = 1 } #Bydgoszcz
			garrison = { country = SOV province = 638 size = 1 } #Krakow
			garrison = { country = SOV province = 637 size = 1 } #Czestochowa
			garrison = { country = SOV province = 635 size = 1 } #Cieszyn
			garrison = { country = SOV province = 642 size = 1 } #Ostroleka
			garrison = { country = SOV province = 643 size = 1 } #Warszawa
			garrison = { country = SOV province = 723 size = 1 } #Lublin
			garrison = { country = SOV province = 720 size = 1 } #Sandomierz
			garrison = { country = SOV province = 724 size = 1 } #Przemysl

			#Possible Soviet surprise attack through Czechoslovakia
			garrison = { country = SOV province = 618 size = 1 } #Bratislava
			garrison = { country = SOV province = 631 size = 1 } #Ruzomberok
			garrison = { country = SOV province = 619 size = 1 } #Slavkov
			garrison = { country = SOV province = 614 size = 1 } #Troppau
			garrison = { country = SOV province = 613 size = 1 } #Reichenberg
			garrison = { country = SOV province = 615 size = 1 } #Praha
			garrison = { country = SOV province = 612 size = 1 } #Plzen
			garrison = { country = SOV province = 616 size = 1 } #Neuhaus
			garrison = { country = SOV province = 617 size = 1 } #Winterberg
			garrison = { country = SOV province = 578 size = 1 } #Karlsbad
			
			#Possible Soviet surprise attack through Denmark  
			garrison = { country = SOV province = 655 size = 1 } #Aarhus
			garrison = { country = SOV province = 652 size = 1 } #Rönne
			garrison = { country = SOV province = 594 size = 1 } #København
			garrison = { country = SOV province = 595 size = 1 } #Kolding
			garrison = { country = SOV province = 596 size = 1 } #Odense
		}
	}

	name = AI_EVENT #"German Manpowerpool Increase"
	desc = ""
	style = 0

	date = {  day = 1 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = july year = 1937 }

	action_a = {
		name = OK
		command = { type = manpowerpool value = 183 } #Built-up manpower: from Rhineland event to Jan 1937 minus 13 IC expansion in 1937 
		command = { type = province_manpower which = 558   value = 15 } #Koln
		command = { type = province_manpower which = 559   value = 15 } #Essen
		command = { type = province_manpower which = 560   value =  5 } #Saarbrucken
		command = { type = province_manpower which = 562   value = 15 } #Munich
		command = { type = province_manpower which = 574   value =  5 } #Nurnberg
		command = { type = province_manpower which = 577   value =  5 } #Stuttgart
		command = { type = province_manpower which = 583   value =  5 } #Hannover
 		command = { type = province_manpower which = 587   value = 10 } #Lubeck
		command = { type = province_manpower which = 588   value = 15 } #Hamburg
		command = { type = province_manpower which = 589   value =  5 } #Wilhelmshafen
		command = { type = province_manpower which = 1961  value = 10 } #Frankfurt
		command = { type = province_manpower which = 602   value = 30 } #Berlin
		command = { type = province_manpower which = 604   value =  5 } #Dresden
		command = { type = province_manpower which = 650   value =  5 } #Konigsberg
		command = { type = province_manpower which = 580   value =  5 } #Halle
		command = { type = province_manpower which = 585   value =  5 } #Magdeburg
		command = { type = province_manpower which = 576   value =  3 }	#Wurzburg
		command = { type = province_manpower which = 575   value =  3 }	#Mannheim
		command = { type = province_manpower which = 579   value =  3 }	#Erfurt
		command = { type = province_manpower which = 605   value =  3 }	#Leipzig
		command = { type = province_manpower which = 547   value =  3 }	#Freiburg
		command = { type = province_manpower which = 603   value =  3 }	#Breslau	
		command = { type = province_manpower which = 599   value =  2 }	#Stettin
		command = { type = province_manpower which = 598   value =  2 }	#Rostock
		command = { type = province_manpower which = 646   value =  2 }	#Elbing
		command = { type = province_manpower which = 566   value =  2 }	#Konstanz
		command = { type = province_manpower which = 607   value =  2 }	#Landsberg
		command = { type = province_manpower which = 582   value =  2 }	#Munster
	}
}

event = { 
	id = 172404
	random = no
	country = GER

	trigger = { 
		ai = yes
	}

	#Andris: Placeholder event for GER 172403

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 18 month = march year = 1937 }

	action_a = {
		name = OK
		command =  { }
	}
}

############################
#172451 (AI) (GER) Minor Axis Nations Invited into Tri-Partite Pact  
############################
event = {
	id = 172451
	random = no
	country = GER

	
	trigger = {
		ai = yes
		
		atwar = yes
		event = 492014 #Japan's event for Tripartite, meaning Germany went ahead with proposal
			
	}

	name = AI_EVENT #"Core_GER_Tripartite"
	desc = ""
	style = 0

	date = { day = 1 month = october year = 1940 }
	offset = 30 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_GER_Tripartite.ai }
		
	}
}

##################################
#(Both AI and Human) Germany Supply Convoys to Axis Minors
##################################

event = {
	id = 172461
	random = no
	country = GER

	
	trigger = {
		alliance = { country = GER country = HUN}
		NOT = { event = 2501 } #Hungary did not partition Czechoslovakia w/Germany

		control = { province = 621 data = GER }	 #Wien
		control = { province = 622 data = HUN }	 #Szombathely
		}

	name = "German Railway System Supplies Hungary"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = capital which = 621 } #Capital to Wien so that convoys will actually be filled by AI
		command = { type = convoy which = 621 value = 622 when = 30 } #Wien to Szombathely: steel, coal, rubber, supplies
		command = { type = convoy which = 621 value = 622 when = 23 } #Steel, coal, oil, supplies 
		#command = { type = convoy which = 621 value = 622 when = 22 } #Steel,coal, supplies
		#command = { type = convoy which = 621 value = 622 when = 20 } #Just coal, supplies
		command = { type = capital which = 602 } #Capital back to Berlin
	}
}

event = {
	id = 172466
	random = no
	country = GER

	
	trigger = {
		alliance = { country = GER country = FIN}
		control = { province = 706 data = SOV }     # Helsinki 
		}

	name = AI_EVENT #"German Convoys to Finland"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		command = { type = convoy which = 598 value = 702 when = 23 } #Rostock-Mariehamm: #Steel, coal, oil, supplies
		command = { type = convoy which = 598 value = 798 when = 21 } #Rostock-Vaasa: coal, oil, supplies
				
	}
}

event = {
	id = 172467
	random = no
	country = FIN

	
	trigger = {
		alliance = { country = GER country = FIN}
		war = { country = GER country = SOV }      #Only need convoys, during Continuation War 
		war = { country = FIN country = SOV }      #Just in case, no separate peace 
		oil = 15000
		}

	name = AI_EVENT #"Finland Evacuates Resources to Germany"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		command = { type = convoy which = 798 value = 598 when = 19 } #Vaasa - Rostock: steel,oil,supplies
		command = { type = convoy which = 798 value = 598 when = 19 }
		#command = { type = convoy which = 706 value = 598 when = 19 } #Helsinki - Rostock oil, supplies
		#command = { type = convoy which = 706 value = 598 when = 19 }
		#command = { type = convoy which = 706 value = 598 when = 19 }
				
	}
}


event = {
	id = 172471
	random = no
	country = GER

	
	trigger = {
		OR = {
			 alliance = { country = DEN country = GER}
			 puppet = { country = DEN country = GER }
			}
		}

	name = AI_EVENT #"German Convoys to Denmark"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		command = { type = convoy which = 587 value = 594 when = 22 } #Lubeck-Copenhagen:  #Steel, coal, supplies
		command = { type = convoy which = 587 value = 594 when = 22 } #Steel, coal, supplies				
	}
}

event = {
	id = 172472
	random = no
	country = DEN

	
	trigger = {
		event = 172471
		}

	name = AI_EVENT #"Danish Milk Convoys to Germany"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		command = { type = convoy which = 594 value = 598 when = 16 } #Copenhagen-Rostock:  supplies
		command = { type = convoy which = 594 value = 598 when = 16 } 
		
	}
}


event = {
	id = 704011
	random = no
	country = HUN
	
	trigger = {
		alliance = { country = GER country = HUN}
		alliance = { country = HUN country = ROM}
		NOT = { event = 2501 } #Hungary did not partition Czechoslovakia w/Germany
		event = 172461         #Germany supplies Hungary  
		}

	name = "Hungarian Railway System Supplies Romania"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		command = { type = convoy which = 630 value = 629 when = 22 } #Debrecen to Arad: Steel, coal, supplies
				
	}
}

event = {
	id = 704012
	random = no
	country = ROM
	
	trigger = {
		alliance = { country = GER country = ROM}
		alliance = { country = HUN country = ROM}
		NOT = { event = 2501 } #Hungary did not partition Czechoslovakia w/Germany
		event = 704011         #Hungary supplies Romania  
		}

	name = "Romanian Oil to Hungary"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 3 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		
		command = { type = convoy which = 629 value = 630 when = 17 } #Arad to Debrecen: oil, supplies
		
	}
}

######################################################
###(AI) German Industry Expansion 1937
######################################################

event = {
	id = 172501
	random = no
	country = GER
	
	name = AI_EVENT 
	desc = ""
	style = 0

	trigger = {
		ai = yes
		event = 172402 #German Tactical Manpowerpool Reduction 
		
	}

	date = { day = 9 month = january year = 1937 }
	offset = 1
	deathdate = { day = 20 month = january year = 1937 }

	action_a = {
		name = OK 
		command = { type = construct which = ic value = 650 }	#Königsberg
		command = { type = construct which = ic value = 646 }	#Elbing
		command = { type = construct which = ic value = 636 }	#Oppeln
		command = { type = construct which = ic value = 607 }	#Landsberg
		command = { type = construct which = ic value = 599 }	#Stettin
		command = { type = construct which = ic value = 579 }	#Erfurt
		command = { type = construct which = ic value = 605 }	#Leipzig
		command = { type = construct which = ic value = 604 }	#Dresden
		command = { type = construct which = ic value = 575 }	#Mannheim
		command = { type = construct which = ic value = 576 }	#Würzburg
		command = { type = construct which = ic value = 547 }	#Freiburg	
		command = { type = construct which = ic value = 566 }	#Konstanz
		command = { type = construct which = ic value = 582 } 	#Münster
	}
}
	

###############################
# 462262 (ITA) (AI) Italy Tactical Manpowerpool reduction (No early war with major powers)
# Allows it to really focus on research
####################################

event = {
	id = 462262
	random = no
	country = ITA

	trigger = { 
		ai = yes
		NOT = { 
			OR = 
				{
					war = { country = GER country = ITA } 
					war = { country = ENG country = ITA } 
					war = { country = SOV country = ITA } 
			}
		}
	} 


	date = {  day = 1 month = january year = 1937}
	offset = 1
	deathdate = { day = 15 month = january year = 1937 }

	name = AI_EVENT #"Italian Tactical Manpowerpool Reduction"
	desc = ""
	style = 0

	action_a = {
		name = OK
		command = { type = province_manpower which = 908   value = -1 } #Rome
		command = { type = province_manpower which = 932   value = -2 } #Torino
		command = { type = province_manpower which = 893   value = -2 } #Taranto
		command = { type = province_manpower which = 910   value = -2 } #Parma
		command = { type = province_manpower which = 901   value = -2 } #Napoli
		command = { type = province_manpower which = 912   value = -2 } #Milano
 		command = { type = province_manpower which = 906   value = -2 } #Firenze
		command = { type = province_manpower which = 913   value = -1 } #La Spezia
		command = { type = province_manpower which = 933   value = -1 } #Genoa
		command = { type = province_manpower which = 905   value = -1 } #Bologna
	
	}
}

#################################################
# 462263 (ITA) (AI) Italian Manpowerpool Increase 
##################################################

event = {    
	id = 462263
	random = no
	country = ITA

	trigger = { 
		government = fascist
		ai = yes
		event = 462262
		OR= {
			event = 462125 #Pariani Reform (Sept. 1938)
			war = { country = GER country = ITA } 
			war = { country = ENG country = ITA } 
			war = { country = SOV country = ITA } 
			}
		}
	name = AI_EVENT #"Italian Manpowerpool Increase"
	desc = ""
	style = 0

	date = {  day = 24 month = august year = 1936}
	offset = 15
	deathdate = { day = 29 month = december year = 1947 }

	action_a = {
		name = OK
		command = { type = manpowerpool value = 51 } #Built-up manpower from Jan 1937-Sept 1938 x 2 for School of Mass combat 
								#minus 22 for IC expansion in 1938 + 6 for remainder from beginning.
		command = { type = province_manpower which = 908   value = 1 } #Rome
		command = { type = province_manpower which = 932   value = 2 } #Torino
		command = { type = province_manpower which = 893   value = 2 } #Taranto
		command = { type = province_manpower which = 910   value = 2 } #Parma
		command = { type = province_manpower which = 901   value = 2 } #Napoli
		command = { type = province_manpower which = 912   value = 2 } #Milano
 		command = { type = province_manpower which = 906   value = 2 } #Firenze
		command = { type = province_manpower which = 913   value = 1 } #La Spezia
		command = { type = province_manpower which = 933   value = 1 } #Genoa
		command = { type = province_manpower which = 905   value = 1 } #Bologna
		}
}

#################################################
# 462142 (ITA) (AI) Italy 1938 Industry Expansion
##################################################
event = { 
	id = 462142
	random = no
	country = ITA

	trigger = {
			ai = yes
			atwar = no #Only after Ethiopian war, so AI doesn't build troops
		}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 20 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1938 } 
	
	action_a = {
		name = CEVTACTA_OK
		command = { type = manpowerpool value = 22} #Used by AI to construct 18 IC
		
	}
}


###(AI) Italian Industry Expansion 1939
###So these have 5 IC, and AI builds AA's

event = {
	id = 462157
	random = no
	country = ITA
	
	name = AI_EVENT 
	desc = ""
	style = 0

	trigger = {
		ai = yes
	}

	date = { day = 16 month = february year = 1939 }
	offset = 1
	deathdate = { day = 28 month = february year = 1939 }

	action_a = {
		name = OK
		command = { type = construct which = ic value = 900 }	#Bari
		command = { type = construct which = ic value = 902 }	#Potenza
		command = { type = construct which = ic value = 903 }	#Cosenza

		command = { type = start_research which = 2401 } 	#Improved Optical Sights (to Sup. Turret Optics)	
		command = { type = prio_research which = 2401 }	
	}
}

#####################################################################
#(AI Italy/AI United Kingdom/AI France) New Treaty of Locarno Chain
#####################################################################

# 462161 - (AI)  Mussolini Returns from Germany/Treaty of Locarno

event = { 
	id = 462161
	random = no 
	country = ITA

	trigger = {
		ai = yes					#AI Italy 
		alignment = fascist
		exists = ENG
		exists = FRA
		exists = GER

		flag = ita_global_ger_HumanPlayer		#Human Germany
		NOT = { flag = ita_global_fra_HumanPlayer }	#AI France
		NOT = { flag = ita_global_pan_HumanPlayer }	#AI Japan
		NOT = { flag = ita_global_sov_HumanPlayer }	#AI Soviet Union
		NOT = { flag = ita_global_eng_HumanPlayer }	#AI United Kingdom
		NOT = { flag = ita_global_usa_HumanPlayer }	#AI United States
		
		NOT = {	war = { country = ITA country = GER } }		
		NOT = {	war = { country = ITA country = ENG } }
		NOT = {	war = { country = ITA country = FRA } }
		NOT = {	war = { country = GER country = ENG } }
		NOT = {	war = { country = GER country = FRA } }		
		
		OR = {
			NOT = { event = 172240 } 		#Invite Mussolini event doesn't trigger 
								#typically due to supplies < 5000
			AND = {
				event = 172240			#No German Invitation
				NOT = { event = 462117 }	
			}
			
			AND = {
				event = 462117 			#Decline German invitation 
				flag = ita_major_ger_DeclineStateVisit
			}
			
			AND = { 
				event = 462118 			#Mussolini Visits Germany
				event = 172241 			#Mussolini Visits Germany
			}
		}	
	}

	date = { day = 29 month = december year = 1937 }
	offset = 30
	deathdate = { day = 15 month = september year = 1939 }

	name = "Negotiate with Allies for new Locarno Treaty"
	desc = ""
	style = 0

	action_a = {
		name = "Approach Allies for better deal and try to settle disputes"
		command = { } 
	}
}


event = { 
	id = 462162
	random = no 
	country = ITA

	trigger = {
		ai = yes
	}

	#Triggered by FRA 462169A

	name = AI_EVENT #"New Treaty of Locarno signed between United Kingdom, France, and Italy"
	desc = ""
	style = 0

	action_a = {
		name = "Excellent"
		command = { type = setflag which = ita_major_ger_Locarno }
		command = { type = alignment which = fascist value = -50 }
		command = { type = alignment which = democratic value = 100 }
		command = { type = clrflag which = ita_major_ger_DeclineStateVisit }
	}
}

event = { 
	id = 462165
	random = no 
	country = ENG

	trigger = {
		ai = yes
		exists = ITA
		exists = FRA
		exists = GER
	
		flag = eng_global_ger_HumanPlayer		#Human Germany
		NOT = { flag = eng_global_fra_HumanPlayer }	#AI France
		NOT = { flag = eng_global_ita_HumanPlayer }	#AI Italy
		NOT = { flag = eng_global_pan_HumanPlayer }	#AI Japan
		NOT = { flag = eng_global_sov_HumanPlayer }	#AI Soviet Union		
		NOT = { flag = eng_global_usa_HumanPlayer }	#AI United States
	
		NOT = {	war = { country = ITA country = GER } }		
		NOT = {	war = { country = ITA country = ENG } }
		NOT = {	war = { country = ITA country = FRA } }
		NOT = {	war = { country = GER country = ENG } }
		NOT = {	war = { country = GER country = FRA } }	

		event = 462161 #Italy proposes new Locarno Treaty
	}

	date = { day = 29 month = september year = 1937 }
	offset = 30
	deathdate = { day = 1 month = september year = 1939 }

	name = AI_EVENT #"English Decision on new Treaty of Locarno"
	desc = ""
	style = 0

	action_a = {
		name = "Interested in settling disputes and negotiating a new Locarno Treaty"
		command = { type = trigger which = 462166 } 	#British accept new Treaty of Locarno
	}
	action_b = {
		name = "Decline Italian offer"
		command = { type = sleepevent which = 462162 } 	#Italian acceptance of ToL
		command = { type = sleepevent which = 462166 }	#British acceptance of ToL
		command = { type = sleepevent which = 462168 }	#British response to French declining new ToL	
		command = { type = sleepevent which = 462169 }	#French decision on new ToL
	}
}

event = { 
	id = 462166
	random = no 
	country = ENG

	#Triggered by ENG 462165A

	name = AI_EVENT #"Accept new Locarno Treaty"
	desc = ""
	style = 0

	action_a = {
		name = "Accept"
		command = { type = setflag which = eng_major_ger_Locarno }
	}
}

event = { 
	id = 462168
	random = no 
	country = ENG

	#Triggered by FRA 462169B

	name = AI_EVENT #"French rejection of new Locarno Treaty"
	desc = ""
	style = 0

	action_a = {
		name = "Oh well"
		command = { type = clrflag which = eng_major_ger_Locarno }
	}
}

event = { 
	id = 462169
	random = no 
	country = FRA

	trigger = {
		ai = yes
		exists = ITA
		exists = ENG
		exists = GER
	
		flag = fra_global_ger_HumanPlayer		#Human Germany
		NOT = { flag = fra_global_ita_HumanPlayer }	#AI Italy
		NOT = { flag = fra_global_pan_HumanPlayer }	#AI Japan
		NOT = { flag = fra_global_sov_HumanPlayer }	#AI Soviet Union
		NOT = { flag = fra_global_eng_HumanPlayer }	#AI United Kingdom		
		NOT = { flag = fra_global_usa_HumanPlayer }	#AI United States
	
		NOT = {	war = { country = ITA country = GER } }		
		NOT = {	war = { country = ITA country = ENG } }
		NOT = {	war = { country = ITA country = FRA } }
		NOT = {	war = { country = GER country = ENG } }
		NOT = {	war = { country = GER country = FRA } }	
		
		event = 462166 #UK accepts new Treaty of Locarno
	}

	date = { day = 29 month = september year = 1937 }
	offset = 30
	deathdate = { day = 1 month = september year = 1939 }


	name = AI_EVENT #"French Decision on new Treaty of Locarno"
	desc = ""
	style = 0

	action_a = {
		name = "Accept Italian offer to revive Treaty of Locarno"
		command = { type = setflag which = fra_major_ger_Locarno }
		command = { type = trigger which = 462162 }	#Italian acceptance of ToL
	}
	action_b = {
		name = "Decline Italian offer"
		command = { type = sleepevent which = 462162 } 	#Italian acceptance of ToL
		command = { type = trigger which = 462168 }	#British response to French declining new ToL	
	}
}

#############################################################
# 462192 (AI) ITA turns over Gibraltar to Nationalist Spain
#############################################################

event = {
	id = 462192 
	random = no
	country = ITA

	trigger = {	
		ai = yes #Andris: separate event for human
		
		war = { country = ITA country = ENG }
		war = { country = SPA country = ENG }
		
		event = 802015 #Nationalist Spain wins SCW
		control = { province = 989 data = ITA } # Gibraltar

	}

	name = "Turn over Gibraltar to Nationalist Spain"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 30 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = { 
		name = "Let them have it"
		command = { type = dissent value = -0.5 } 
		command = { type = control which = SPA value = 989 } # Gibraltar
		command = { type = influence value = 3 }
	}
	
}

########################
#(AI) USSR Convoys
########################

event = {
	id =  222201
	random = no
	country = TAN
	
	trigger = {
		ai = yes
		alliance = { country = SOV country = TAN}
	}

	name = "USSR Convoys to Irkutsk"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1947 }

	action_a = {
		name = OK
		command = { type = convoy which = 1534 value = 1535 when = 31 } #resource convoy from Kyzyl to Irkutsk: steel, coal, oil, rubber
		
	}
}	


#event = {
#	id =  222202
#	random = no
#	country = SOV
#	
#	trigger = {
#		ai = yes
#		#OR = {
#		#	year = 1940
#		#	war = { country = GER country = SOV } 
#		#	war = { country = PAN country = SOV } 
#		#	}
#
#		#NOT = {coal = 90000}
#		#NOT = {steel = 90000}
#	}
#
#	name = AI_EVENT #"USSR Convoys to Far East"
#	desc = ""
#	style = 0
#
#	date = { day = 1 month = august year = 1936 } 
#	offset = 10
#	deathdate = { day = 1 month = january year = 1947 }
#	action_a = {
#		name = OK
#		command = { type = convoy which = 1855 value = 1847 when = 14 } #resource convoy to Commodore : steel, coal, rubber (needs originating province with some type of resource)
#		command = { type = convoy which = 1855 value = 1648 when = 14 } #resource convoy to Ocha 
#	}
#}	

event = {
	id =  222203
	random = no
	country = SOV
	
	trigger = {
		ai = yes
		OR = {
			year = 1940
			war = { country = GER country = SOV } 
			war = { country = PAN country = SOV } 
		}

		
	}

	name = AI_EVENT #"USSR Convoys from Far East"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1947 }

	action_a = {
		name = OK
		command = { type = convoy which = 1847 value = 1850 when = 14 } #resource convoy from Commodore to Viliga-Kuskje: steel, coal, rubber
		command = { type = convoy which = 1648 value = 1651 when = 14 } #resource convoy from Ocha to Vanino
	}
}

event = {
	id =  222204
	random = no
	country = SOV
	
	trigger = {
		ai = yes
		OR = {
			year = 1940
			war = { country = GER country = SOV } 
			war = { country = PAN country = SOV } 
		}
		
	}

	name = AI_EVENT #"USSR Convoys from Far East"
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1937 } 
	offset = 10
	deathdate = { day = 1 month = january year = 1947 }

	action_a = {
		name = OK
		command = { type = convoy which = 1847 value = 1855 when = 14 } #resource convoy from Commodore to Kamenskoje: steel, coal, rubber
		command = { type = convoy which = 1648 value = 1855 when = 14 } #resource convoy from Ocha to Kamenskoje
	}
}	