####################################################################
#
# HoI - CORE IBERIA
#
# LIMIT:  802000 - 851999
#
####################################################################

#
# HoI - Republican Spain Events
#
#		written by Henrik Fåhraeus
#
#
# HoI - Republican Spain Events
#
#		written by Henrik Fåhraeus
#

#########################################################################
# Spanish Civil War
# MODIFIED
#########################################################################
event = { 
	id = 3100
	random = no
	country = SPR

	trigger = {
		NOT = {
			exists = SPA	
		}
		atwar = no
	}

	name = "EVT_3100_NAME"
	desc = "EVT_3100_DESC"
	style = 0

	date = { day = 17 month = july year = 1936 }

	action_a = {
		name = "OK"
		command = { type = civil_war which = SPA }
		command = { type = dissent value = 40 }
		command = { type = headofstate which = 11202 }  # Azaña
		command = { type = headofgovernment which = 11189 } # Largo Caballero
		command = { type = foreignminister which = 11161 } # Alvarez del Vayo
		command = { type = armamentminister which = 11198 } # Negrin
		command = { type = ministerofsecurity which = 11179 } # Galarza 
		command = { type = ministerofintelligence which = 11006 }  # Sarabia
		command = { type = chiefofstaff which = 11027 }  # Estrada 
		command = { type = chiefofarmy which = 11118 }  # Castelló Pantoja
		command = { type = chiefofnavy which = 11069 } # Prieto
		command = { type = chiefofair which = 11070 } # Prieto
		command = { type = manpowerpool value = -100 } #Civil war
		command = { type = secedeprovince which = SPA value = 1009 } #Ceuta
		command = { type = secedeprovince which = SPA value = 1020 } #S. Cruz de tenerife
		command = { type = secedeprovince which = SPA value = 1019 } #Las Palmas
		command = { type = secedeprovince which = SPA value = 1018 } #Fuerteventura
		command = { type = secedeprovince which = SPA value = 1017 } #Lanzarote
				
	}
}

#########################################################################
# Communist Coup - Anarchist movement crushed
# MODIFIED
#########################################################################
event = { 
	id = 3101
	random = no
	country = SPR

	name = "EVT_3101_NAME"
	desc = "EVT_3101_DESC"
	style = 0

	trigger = {
		random = 10
		event = 3102 # SOV supports SPR
		NOT = {
			government = communist
		}
			exists = SPA
			alignment = communist
	}

	# Note: historical date: May 3, 1937
	date = { day = 3 month = april year = 1937 }
	offset = 7
	deathdate = { day = 3 month = june year = 1937 }

	action_a = {
		name = "OK"
		command = { type = alignment which = communist value = 75 }
		command = { type = headofstate which = 11202 } # Azaña
		command = { type = headofgovernment which = 11032 } # Negrín
		command = { type = foreignminister which = 11197 } # Giral
		command = { type = armamentminister which = 11198 } # Negrín
		command = { type = ministerofsecurity which = 11199 } # Zugazagoitia
		command = { type = ministerofintelligence which = 11200 } # angel pestana
		command = { type = chiefofstaff which = 11192 } # Rojo
		command = { type = chiefofarmy which = 11201 } # Líster
		command = { type = chiefofnavy which = 11069 } # Prieto
		command = { type = chiefofair which = 11070 } # Prieto
		command = { type = dissent value = 5 }
	}
}

#########################################################################
#  Spanish Civil War - Soviet Intervention (modified by nachinus)
#########################################################################
event = { 
	id = 3102
	random = no
	country = SPR
	
	# Triggered by SOV 2623
	
	name = "EVT_3102_NAME"
	desc = "EVT_3102_DESC"
	style = 0
	
	action_a = {
		name = "OK" # Great!
		command = { type = manpowerpool value = 5 }
		command = { type = supplies value = 3000 }
		#command = { type = gain_tech which = 2993 } #Andris: removed Infantry Tank Batallion
		#Andris: armor division moved to SPR 802006 
		command = { type = gain_tech which = 10101 } # Basic Light Single Engine Fighter - project
		command = { type = gain_tech which = 10002 } # Basic Airframes
		command = { type = gain_tech which = 10003 } # Basic Aerodynamics
		command = { type = gain_tech which =  9001 } # Basic 750+ hp Engines
		command = { type = gain_tech which = 14995 } # 7.7mm+ MGs (air)
		command = { type = gain_tech which = 10100 } # Basic Fighter Development
		#command = { type = gain_tech which = 10001 } #Andris: removed (Basic Interceptor Prototype)
		command = { type = gain_tech which = 10102 } # Basic Interceptor (I-16)
		
	}
}


#########################################################################
#  Spanish Civil War - UK Intervention
#########################################################################
event = { 
	id = 3103
	random = no
	country = SPR
	
	# Triggered by UK3400B
	
	name = "EVT_3103_NAME"
	desc = "EVT_3103_DESC"
	style = 0
	
	action_a = {
		name = "OK" # Great!
		command = { type = manpowerpool value = 5 }
		command = { type = supplies value = 1500 }
		command = { type = gain_tech which = 2986 } #Tankette Prototype
		command = { type = add_division which = infantry }
#		command = { type = province_keypoints which = -1 value = 1 }
#		command = { type = province_keypoints which = -1 value = 1 }
	}
}
#########################################################################
#  Spanish Civil War - French Intervention
#########################################################################
event = { 
	id = 3104
	random = no
	country = SPR
	
	# Triggered by FRA
	
	name = "EVT_3104_NAME"
	desc = "EVT_3104_DESC"
	style = 0
	
	action_a = {
		name = "OK" # Great!
		command = { type = manpowerpool value = 5 }
		command = { type = supplies value = 1500 }
		command = { type = gain_tech which = 2986 } #Tankette Prototype
		command = { type = add_division which = infantry }
#		command = { type = province_keypoints which = -1 value = 1 }
#		command = { type = province_keypoints which = -1 value = 1 }
	}
}

#
# HoI - Nationalist Spain Events
#
#		written by Henrik Fåhraeus
#

#########################################################################
#  Vichy France - Return of occupied provinces (if Spain is Axis)
#########################################################################
#event = { 
#	id = 3000
#	random = no
#	country = SPA
#	
#	trigger = {
#		exists = VIC
#		alliance = { country = GER country = SPA }
#	} 
#	
#	name = "EVT_3000_NAME"
#	desc = "EVT_3000_DESC"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 4
#	deathdate = { day = 30 month = december year = 1947 }
#	
#	action_a = {
#		name = "OK" # Return occupied provinces as per agreement
#		command = { type = control which = VIC value = 545 }
#		command = { type = control which = VIC value = 915 }
#		command = { type = control which = VIC value = 917 }
#		command = { type = control which = VIC value = 923 }
#		command = { type = control which = VIC value = 926 }
#		command = { type = control which = VIC value = 927 }
#		command = { type = control which = VIC value = 928 }
#		command = { type = control which = VIC value = 929 }
#		command = { type = control which = VIC value = 930 }
#		command = { type = control which = VIC value = 931 }
#		command = { type = control which = VIC value = 934 }
#		command = { type = control which = VIC value = 935 }
#		command = { type = control which = VIC value = 937 }
#		command = { type = control which = VIC value = 944 }
#		command = { type = control which = VIC value = 945 }
#		command = { type = control which = VIC value = 947 }
#		command = { type = control which = VIC value = 949 }
#		command = { type = control which = VIC value = 951 }
#	}
#}

#########################################################################
#  Spanish Civil War - Fascist Nation
#########################################################################
event = { 
	id = 3001
	random = no
	country = SPA
	
	trigger = {
		event = 3100
	}
	
	name = "EVT_3001_NAME"
	desc = "EVT_3001_DESC"
	style = 0
	
	date = { day = 18 month = july year = 1936 }
	offset = 2
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		name = "OK" # Anarchism and Communism must fall!

		command = { type = trigger which = 300001} # (AI) Nat. Spain only convoy reorganization
		#command = { type = capital which = 988} #Sevilla

		command = { type = headofstate which = 10032 } 			# José Sanjurjo Sacanell 
		command = { type = headofgovernment which = 10034 }		# José Sanjurjo Sacanell
		command = { type = foreignminister which = 10003 } 		# Fernando Serrat y Bonastre
		command = { type = armamentminister which = 10004 } 		# Gérman Gil y Yuste
		command = { type = ministerofsecurity which = 10005 } 		# Miguel Ponte Mansó de Zúñiga
		command = { type = ministerofintelligence which = 10072 }  	# José Luís Arrese Magra 
		command = { type = chiefofstaff which = 10007 } 		# Fidel Dávila Arrondo
		command = { type = chiefofarmy which = 10008 }			# Emilio Mola Vidal
		command = { type = chiefofnavy which = 10009 }			# Francisco Moreno Fernández
		command = { type = chiefofair which = 10010 }			# Alfredo Kindelán Duany 
		command = { type = supplies value = 100 }
		command = { type = oilpool value = 100 }
		command = { type = steelpool value = 100 }
		command = { type = coalpool value = 100 }
		command = { type = rubberpool value = 100 }
		
		command = { type = trigger which = 2023 } # German intervention
		command = { type = trigger which = 2623 } # Soviet intervention
		command = { type = trigger which = 2801 } # French intervention
		command = { type = trigger which = 2901 } # Italian intervention
		command = { type = trigger which = 3400 } # UK intervention
		
		command = { type = alignment which = fascist value = 50 }
		command = { type = alignment which = democratic value = 25 }
		command = { type = dissent value = 10 }
		
		command = { type = add_division which = infantry value = artillery when = 957 } #Burgos
		command = { type = add_division which = infantry when = 988} #Sevilla

		command = { type = add_division which = transports when = 988 }
		command = { type = manpowerpool value = -100 } #Civil war
		
		#Valencia pocket (may not trigger)
		command = { type = convoy which = 954  value = 981 when = 17 } 	 #Bilbao-Valencia 
		
		command = { type = trigger which = 802014 } # SPR core_Iberia
		command = { type = trigger which = 802017 } # SPA core_Iberia
		
	}
}

#########################################################################
#  Spanish Civil War - German Intervention (modified by nachinus)
#########################################################################
event = { 
	id = 3002
	random = no
	country = SPA
	
	# Triggered by GER 2023
	
	name = "EVT_3002_NAME"
	desc = "EVT_3002_DESC"
	style = 0
	
	action_a = {
		name = "OK" # Great!
		command = { type = manpowerpool value = 5 }
		command = { type = supplies value = 3000 }
		#command = { type = gain_tech which = 2993 } #Andris: removed Infantry Tank Batallion
		command = { type = add_division which = dive_bomber }
		command = { type = add_division which = tactical_bomber }
		#Andris: armor division moved to SPA 802004
		command = { type = gain_tech which = 10101 } # Basic Light Single Engine Fighter - project
		command = { type = gain_tech which = 10002 } # Basic Airframes
		command = { type = gain_tech which = 10003 } # Basic Aerodynamics
		command = { type = gain_tech which =  9001 } # Basic 750+ hp Engines
		command = { type = gain_tech which = 14995 } # 7.7mm+ MGs (air)
		command = { type = gain_tech which = 10100 } # Basic Fighter Development
		#command = { type = gain_tech which = 10001 } #Andris: removed Basic Interceptor Prototype
		command = { type = gain_tech which = 10102 } #Basic Interceptor (Me-109)
	}
}

#########################################################################
#  Spanish Civil War - Italian Intervention
#########################################################################
event = { 
	id = 3003
	random = no
	country = SPA
	
	# Triggered by ITA 2901
	
	name = "EVT_3003_NAME"
	desc = "EVT_3003_DESC"
	style = 0
	
	action_a = {
		name = "OK" # Great!
		command = { type = manpowerpool value = 10 }
		command = { type = supplies value = 3000 }
		#command = { type = gain_tech which = 2993 } #Andris: removed Infantry Tank Batallion
		#command = { type = add_division which = armor }
		command = { type = add_division which = infantry value = artillery when = 953} #Pamplona
		command = { type = add_division which = infantry when = 957} #Burgos

	}
}

#########################################################################
#  Spanish Civil War - Victory!!!
#########################################################################
event = { 
	id = 3004
	random = no
	country = SPA
	
	trigger = {
		owned = { province = 972 data = SPA } #Madrid
		NOT = {
			exists = SPR
	   	}
	}

	name = "EVT_3004_NAME"
	desc = "EVT_3004_DESC"
	style = 0

	date = { day = 1 month = august year = 1936 }
	offset = 2
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		name = "OK" # Great!

		#Relocate capital
		command = { type = capital which = 972 } #Madrid
		command = { type = clrflag which = Burgos_Capital }

		#Reduced international tension
		command = { type = warentry which = USA value =  -5 }
		command = { type = warentry which = FRA value = -20 } #0.72
		command = { type = warentry which = ENG value = -20 } ##0.72
		command = { type = warentry which = BEL value = -20 } ##0.72
		command = { type = warentry which = HOL value = -20 } ##0.72

		#Lose German/Italian SCW leaders
		command = { type = sleepleader which = 3412 } #Bergonzoli
                command = { type = sleepleader which = 3425 } #Gambara
                command = { type = sleepleader which = 3449 } #Roatta
		command = { type = sleepleader which = 3486 } #von Moreau
		command = { type = sleepleader which = 3487 } #von Richthofen
		command = { type = sleepleader which = 3488 } #Sperrle

		#Reprisals against Republicans
		command = { type = province_manpower which = 988 value = -1 } #Sevilla
		command = { type = province_manpower which = 954 value = -1 } #Bilbao
		command = { type = province_manpower which = 987 value = -1 } #Cordoba
		command = { type = province_manpower which = 990 value = -1 } #Malaga
		command = { type = manpowerpool value = -40 } #Refugees/Return of Italian and German Exp. Forces 

		command = { type = removecore which = 1027 } #Villa Cisneros
		command = { type = removecore which = 1121 } #Bata	
	}
}

#########################################################
# SPR gets humanitary help
# by nachinus
#########################################################

event = {
	id = 802000 # 50101
	random = no
	country = SPR

	#Triggered by USA 322006

	name = CEVTNAME_802000
	desc = CEVTDESC_802000
	style = 0

	action_a = {
		name = CEVTACTA_802000
		command = { type = alignment which = democratic value = 5 }
		command = { type = supplies value = 50 }
		command = { type = dissent value = -1 }
	}
}

#########################################################
# SPA- Los Maquis: the anti-fascist guerrillas
# by nachinus
#########################################################

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

	trigger = {
		
		alignment = fascist
		event = 3004 # Nationalist Spain wins SCW
		manpower = 10 

		NOT = {
			OR = {
				alliance = { country = FRA country = SPA }
				alliance = { country = SOV country = SPA } 
			}
		}
	}
	
	name = CEVTNAME_802001
	desc = CEVTDESC_802001
	style = 0

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

	action_a = {
		name = CEVTACTA_802001
		command = { type = dissent value = 3 }
		command = { type = supplies value = -200 }   
		command = { type = manpowerpool value = -15 } 
		command = { type = infrastructure which = 952 value = -5 } #Huesca (Andris) need to verify correct location
		command = { type = infrastructure which = 953 value = -5 } #Pamplona (Andris) need to verify correct location
		command = { type = coalpool value = -100 }
	}
	action_b = {
		name = CEVTACTB_802001
		command = { type = dissent value = 6 }
		command = { type = supplies value = -100 }
		command = { type = infrastructure which = -1 value = -10 }
		command = { type = infrastructure which = -1 value = -10 }
		command = { type = coalpool value = -500 }
		command = { type = industry which = -1 value = -1 }
		command = { type = industry which = -1 value = -1 }
	}
}

#########################################################
#  SPR- Spanish Civil War - Viva la República!!!
# by nachinus
#########################################################

event = {
	id = 802002 # 50103
	random = no
	country = SPR

	trigger = {
		NOT = {
			exists = SPA
	   	}
	}
	name = CEVTNAME_802002
	desc = CEVTDESC_802002
	style = 0

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


	action_a = {
		name = CEVTACTA_802002
		command = { type = dissent value = -5 }
		command = { type = warentry which = SPR value = -20 }
		command = { type = warentry which = USA value = -7 }
		command = { type = warentry which = FRA value = -20 } #0.72
		command = { type = warentry which = ENG value = -20 } ##0.72
		command = { type = warentry which = BEL value = -20 } ##0.72
		command = { type = warentry which = HOL value = -20 } ##0.72
		command = { type = capital which = 972 } #Madrid
		command = { type = manpowerpool value = -50 } #Refugees
		command = { type = removecore which = 1027 } #Villa Cisneros
		command = { type = removecore which = 1121 } #Bata
	}
}

#########################################################
#SPA- Incidente Unamuno- Let´s give SPA some dissent!
# by nachinus
#########################################################

event = {
	id = 802003 # 50104
	trigger = {
		atwar = yes
		alignment = fascist
		control = { province = 978 data = SPA } #Salamanca
		control = { province = 957 data = SPA } #Burgos
		control = { province = 959 data = SPA } #Vigo
		control = { province = 966 data = SPA } #Valladolid
		control = { province = 967 data = SPA } #Zaragoza
		control = { province = 977 data = SPA } #Badajoz
		control = { province = 988 data = SPA } #Sevilla
		random = 65
	}
	random = no
	country = SPA

	name = CEVTNAME_802003
	desc = CEVTDESC_802003
	style = 0

	date = { day = 22 month = october year = 1936 }
	offset = 60 # Check for trigger conditions every 60 days
	deathdate = { day = 22 month = april year = 1937 }

	action_a = {
		name = CEVTACTA_802003
		command = { type = dissent value = 4 }
		command = { type = influence value = -2 }
		command = { type = alignment which = democratic value = -2 }
	}
	action_b = {
		name = CEVTACTB_802003
		command = { type = dissent value = 8 }
		command = { type = influence value = -4 }
		command = { type = alignment which = fascist value = 10 }
	}
	action_c = {
		name = CEVTACTC_802003
		command = { type = dissent value = 3 }
		command = { type = alignment which = fascist value = -3 }
	}
}



###########################################################
#SPA-Receives GER commanders and tech support
# by nachinus
#########################################################

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

	#Triggered by GER 172033

	name = CEVTNAME_802004
	desc = CEVTDESC_802004
	style = 0

	action_a = {
		name = CEVTACTA_802004
		command = { type = alignment which = fascist value = 2 }
		command = { type = supplies value = 500 }
		command = { type = add_division which = fighter }
		command = { type = gain_tech which = 11100 } # Pre-War Field Testing
		command = { type = gain_tech which = 11101 } # Tactical Offensive Regimen
		command = { type = gain_tech which = 11103 } # Motorized HQs
		command = { type = gain_tech which = 12002 } # Blitz Bombing Doctrine
		command = { type = gain_tech which = 14004 } # Infantry Gun 70mm+
		command = { type = gain_tech which = 14012 } # Anti-Air Gun 20mm+
		command = { type = gain_tech which =  1210 } # Improved Light Machine Gun
		command = { type = gain_tech which = 14154 } # Basic Anti-Tank Prototype Tests
		command = { type = gain_tech which = 14008 } # Anti-Tank Gun 37mm+
		command = { type = gain_tech which =  2986 } # Tankette Prototype
		command = { type = gain_tech which =  2988 } # Tankette (.50 MG)
		command = { type = add_division which = armor when = 957 } #Burgos
		command = { type = dissent value = -2 }

	}
}

###########################################################
#SPA-Receives ITA advisors and tech support
# by nachinus
#########################################################

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

	#Triggered by ITA 462029 

	name = CEVTNAME_802005
	desc = CEVTDESC_802005
	style = 0

	action_a = {
		name = CEVTACTA_802004
		command = { type = alignment which = fascist value = 1 }
		command = { type = supplies value = 300 }
		command = { type = gain_tech which = 11100 } # Pre-War Field Testing
		command = { type = gain_tech which = 11103 } # Motorized HQs
		command = { type = gain_tech which =  1210 } # Improved Light Machine Gun
		command = { type = gain_tech which = 14004 } # Infantry Gun 70mm+
		command = { type = gain_tech which = 14012 } # Anti-Air Gun 20mm+
		command = { type = gain_tech which =  2986 } # Tankette Prototype
		command = { type = gain_tech which =  2987 } # Tankette (.30 MG)
		command = { type = dissent value = -1 }
	}
}

###########################################################
#SPR Receives SOV advisors and tech support
# by nachinus 
#########################################################

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

	#Triggered by SOV 222013 

	name = CEVTNAME_802006
	desc = CEVTDESC_802006

	style = 0

	action_a = {
		name = CEVTACTA_802004
		command = { type = alignment which = communist value = 2 }
		command = { type = supplies value = 500 }
		command = { type = add_division which = fighter }
		command = { type = gain_tech which = 1210 } #Improved Light MG
		command = { type = gain_tech which = 11100 } #Pre-War testing
		command = { type = gain_tech which = 11104 } #Tactical defensive regime
		command = { type = gain_tech which = 11103 } #Motorized HQs
		command = { type = gain_tech which = 2986 } #Tankette prototype
		command = { type = gain_tech which = 2987 } #Tankette 30 cal
		command = { type = add_division which = armor }	
		command = { type = gain_tech which = 14154 } #basic AT prototype
	}
}

###########################################################
#SPR Receives ENG advisors and tech support
# by nachinus
#########################################################

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

	#Triggered by ENG 272007B

	name = CEVTNAME_802007
	desc = CEVTDESC_802007
	style = 0

	action_a = {
		name = CEVTACTA_802004
		command = { type = alignment which = democratic value = 2 }
		command = { type = supplies value = 300 }
		command = { type = gain_tech which = 11100 } #Pre-War testing
		command = { type = gain_tech which = 2987 } #Tankette 30 cal	
		#command = { type = gain_tech which = 11103 } #Motorized HQs
		command = { type = gain_tech which = 14154 } #basic AT prototype
		command = { type = gain_tech which = 14152 } #basic light artillery prototype
		command = { type = gain_tech which = 14156 } #motorized artillery carriers
	}
}

###########################################################
#SPR Receives FRA advisors and tech support
# by nachinus
#########################################################

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

	#Triggered by FRA 432002

	name = CEVTNAME_802008
	desc = CEVTDESC_802008
	style = 0

	action_a = {
		name = CEVTACTA_802004
		command = { type = alignment which = democratic value = 2 }
		command = { type = supplies value = 300 }
		command = { type = gain_tech which = 2987 } #Tankette 30 cal	
		command = { type = gain_tech which = 1210 } #Improved Light MG
		command = { type = gain_tech which = 14154 } #basic ATG prototype
		command = { type = gain_tech which = 14009 } #basic ATG 40mm
		#command = { type = gain_tech which = 11100 } #Pre-War testing
		#command = { type = gain_tech which = 11103 } #Motorized HQs
				
	}
}

######################################################################################
#SPR- After Victorious in civil war, decide which type of government
# by nachinus
#########################################################

event = {
	id = 802009 # 50105
	trigger = {
		event = 802016 #SPR wins the war
		event = 802006 #SPR gets SOV tech support
		alignment = democratic
		atwar = no
		NOT = {
			OR = {
				alliance = { country = GER country = SPR }
				alliance = { country = SOV country = SPR }
				alliance = { country = ENG country = SPR }
				event = 3101 #Communist coup
				}
	   		}
	}
	random = no
	country = SPR

	name = CEVTNAME_802009
	desc = CEVTDESC_802009
	style = 0

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

	action_a = {
		name = CEVTACTA_802009
		command = { type = influence value = 2 }
		command = { type = alignment which = democratic value = 5 }
	}
	action_b = {
		name = CEVTACTB_802009
		command = { type = dissent value = 10 }
		command = { type = alignment which = communist value = 150 }
		command = { type = headofstate which = 11151 }
		command = { type = headofgovernment which = 11196 }
		command = { type = foreignminister which = 11197 }
		command = { type = armamentminister which = 11198 }
		command = { type = ministerofsecurity which = 11199 }
		command = { type = ministerofintelligence which = 11200 }
		command = { type = chiefofstaff which = 11192 }
		command = { type = chiefofarmy which = 11201 }
		command = { type = chiefofnavy which = 11194 }
		command = { type = chiefofair which = 11195 }
		}
}



#---------------------------------------

##################################################
#Hendaya meeting-SPA decides its participation in WWII (Historically, Blue Division only)
# by nachinus
##############################################

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

	trigger = {
		#German victory in Western Europe
		control = { province = 552 data = GER } # Brussels
		control = { province = 553 data = GER } # Luxembourg
		control = { province = 527 data = GER } # Paris
		control = { province = 948 data = GER } # Bordeaux
		control = { province = 950 data = GER } # Bayonne
	
		event = 3002 #SPA gets GER support in SCW
		
		#Either not at war or ONLY at war with Morocco
		OR = {
			atwar = no
			war = { country = SPA country = MOR }
		}

		headofstate = 10031 #Francisco Franco Bahamonde (Historical)
		government = fascist
		
		NOT = {
			exists = SPR
			exists = POL
			alliance = { country = GER country = SPA }
			war = { country = GER country = USA }
		}

	}

	name = CEVTNAME_802010
	desc = CEVTDESC_802010
	style = 0

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

	action_a = { 
		name = CEVTACTA_802010
		command = { type = manpowerpool value = -25 } 
		command = { type = supplies value = -100 }
		command = { type = coalpool value = -1000 } # GER control of Wolframium mines
		command = { type = steelpool value = -1000 }
		command = { type = trigger which = 172035 } #Blue Division only
		command = { type = alignment which = fascist value = -5 }
		command = { type = sleepevent  which = 802610 } # Hendaya meeting (Ahistorical)
	}
	action_b = { 
		name = CEVTACTB_802010
		command = { type = trigger which = 172036 } # SPA offers to join Axis
		command = { type = sleepevent  which = 802610 } # Hendaya meeting (Ahistorical)
	}
	action_c = { 
		name = CEVTACTC_802010
		command = { type = influence value = -10 }
		command = { type = alignment which = fascist value = -10 }
		command = { type = sleepevent  which = 802610 } # Hendaya meeting (Ahistorical)
	}
}


#SPA joins Axis (by nachinus)

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

	#Triggered by GER 172036A

	name = CEVTNAME_802011
	desc = CEVTDESC_802011
	style = 0

	action_a = { 
		name = CEVTACTA_802011
		command = { type = alliance which = GER }
		command = { type = supplies value = 2000 }
		command = { type = coalpool value = 2000 }
		command = { type = steelpool value = 2000 }
		command = { type = rubberpool value = 1000 }
		command = { type = oilpool value = 1000 }
		command = { type = alignment which = fascist value = 10 }
		command = { type = steal_tech which = GER } 
		command = { type = steal_tech which = GER } 
		command = { type = steal_tech which = GER } 
		command = { type = steal_tech which = GER } 
		command = { type = addcore which = 1012 } #Fez
		command = { type = addcore which = 1011 } #Casablanca
		command = { type = addcore which = 1022 } #Agadir
		command = { type = addcore which = 1007 } #Tuggurt
		command = { type = addcore which = 1023 } #Tafilalt
	} 
} 


#SPA doesn´t join Axis- GER rejects offer (by nachinus)

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

	#Triggered by GER 172036B

	name = CEVTNAME_802012
	desc = CEVTDESC_802012
	style = 0

	action_a = { 
		name = CEVTACTA_802012
		command = { type = manpowerpool value = -25 } 
		command = { type = supplies value = -100 }
		command = { type = coalpool value = -1000 } # GER took control over Wolframium mines, but there is no Wolframium in the game!
		command = { type = steelpool value = -1000 }
		command = { type = trigger which = 172035 }
	} 
}

##############################################
#SPA joins the axis before Hendaya Meeting
# by Generalisimo
##############################################

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

	trigger = {
		alliance = { country = GER country = SPA } 
		NOT = {
			event = 802010 #Normal Hendaya meeting
		}
	} 

	name = CEVTNAME_802013
	desc = CEVTDESC_802013
	style = 0

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

	action_a = { 
		name = CEVTACTA_802013
		command = { type = alignment which = fascist value = 10 }
		command = { type = steal_tech which = GER } 
		command = { type = steal_tech which = GER } 
		command = { type = steal_tech which = GER } 
		command = { type = steal_tech which = GER } 
		command = { type = addcore which = 1012 } #Fez
		command = { type = addcore which = 1011 } #Casablanca
		command = { type = addcore which = 1022 } #Agadir
		command = { type = addcore which = 1007 } #Tuggurt
		command = { type = addcore which = 1023 } #Tafilalt

	} 
}

##############################################
# 802014 - (SPR) Start of the SCW (by Generalisimo)
##############################################

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

	name = CEVTNAME_802014
	desc = CEVTDESC_802014
	style = 0

	action_a = { 
		name = CEVTACTA_802014
		
		# Remove all VPs
		command = { type = province_keypoints which = 959 value = -1 } # Vigo
		command = { type = province_keypoints which = 957 value = -1 } # Burgos
		command = { type = province_keypoints which = 966 value = -1 } # Valladolid
		command = { type = province_keypoints which = 969 value = -2 } # Barcelona
		command = { type = province_keypoints which = 972 value = -3 } # Madrid
		command = { type = province_keypoints which = 981 value = -2 } # Valencia
		command = { type = province_keypoints which = 988 value = -1 } # Sevilla
		command = { type = province_keypoints which = 990 value = -1 } # Malaga
		
		# Now add 1 VP to each SCW province
		command = { type = province_keypoints which = 959 value = 1 } # Vigo
		command = { type = province_keypoints which = 957 value = 1 } # Burgos
		command = { type = province_keypoints which = 966 value = 1 } # Valladolid
		command = { type = province_keypoints which = 969 value = 1 } # Barcelona
		command = { type = province_keypoints which = 972 value = 1 } # Madrid
		command = { type = province_keypoints which = 981 value = 1 } # Valencia
		command = { type = province_keypoints which = 988 value = 1 } # Sevilla
		command = { type = province_keypoints which = 990 value = 1 } # Malaga
		command = { type = province_keypoints which = 952 value = 1 } # Huesca
		command = { type = province_keypoints which = 954 value = 1 } # Bilbao
		command = { type = province_keypoints which = 953 value = 1 } # Pamplona
		command = { type = province_keypoints which = 967 value = 1 } # Zaragoza
		command = { type = province_keypoints which = 971 value = 1 } # Tortosa
		command = { type = province_keypoints which = 970 value = 1 } # Lleida
		command = { type = province_keypoints which = 980 value = 1 } # Cuenca
		command = { type = province_keypoints which = 996 value = 1 } # Cartagena
		command = { type = province_keypoints which = 983 value = 1 } # Albacete
		command = { type = province_keypoints which = 995 value = 1 } # Almeria
		command = { type = province_keypoints which = 991 value = 1 } # Granada
		command = { type = province_keypoints which = 987 value = 1 } # Cordoba
		command = { type = province_keypoints which = 977 value = 1 } # Badajoz
		command = { type = province_keypoints which = 978 value = 1 } # Salamanca
		command = { type = province_keypoints which = 956 value = 1 } # Gijon	

	} 
}

##############################################
# 802015 - (SPA) End of the SCW (by Generalisimo)
##############################################

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

	trigger = {
		event = 802017
	
		NOT = {
			exists = SPR # Nationalist Spain wins
		}
	} 

	name = CEVTNAME_802015
	desc = CEVTDESC_802015
	style = 0

	date = { day = 5 month = january year = 1936 }
	offset = 15
	deathdate = { day = 29 month = december year = 1947 } 

	action_a = { 
		name = CEVTACTA_802015
		
		# Remove all SCW VPs
		command = { type = province_keypoints which = 959 value = -1 } # Vigo
		command = { type = province_keypoints which = 957 value = -1 } # Burgos
		command = { type = province_keypoints which = 966 value = -1 } # Valladolid
		command = { type = province_keypoints which = 969 value = -1 } # Barcelona
		command = { type = province_keypoints which = 972 value = -1 } # Madrid
		command = { type = province_keypoints which = 981 value = -1 } # Valencia
		command = { type = province_keypoints which = 988 value = -1 } # Sevilla
		command = { type = province_keypoints which = 990 value = -1 } # Malaga
		command = { type = province_keypoints which = 952 value = -1 } # Huesca
		command = { type = province_keypoints which = 954 value = -1 } # Bilbao
		command = { type = province_keypoints which = 953 value = -1 } # Pamplona
		command = { type = province_keypoints which = 967 value = -1 } # Zaragoza
		command = { type = province_keypoints which = 971 value = -1 } # Tortosa
		command = { type = province_keypoints which = 970 value = -1 } # Lleida
		command = { type = province_keypoints which = 980 value = -1 } # Cuenca
		command = { type = province_keypoints which = 996 value = -1 } # Cartagena
		command = { type = province_keypoints which = 983 value = -1 } # Albacete
		command = { type = province_keypoints which = 995 value = -1 } # Almeria
		command = { type = province_keypoints which = 991 value = -1 } # Granada
		command = { type = province_keypoints which = 987 value = -1 } # Cordoba
		command = { type = province_keypoints which = 977 value = -1 } # Badajoz
		command = { type = province_keypoints which = 978 value = -1 } # Salamanca
		command = { type = province_keypoints which = 956 value = -1 } # Gijon
		
		# Now add back 1 VP to each province
		command = { type = province_keypoints which = 959 value = 1 } # Vigo
		command = { type = province_keypoints which = 957 value = 1 } # Burgos
		command = { type = province_keypoints which = 966 value = 1 } # Valladolid
		command = { type = province_keypoints which = 969 value = 2 } # Barcelona
		command = { type = province_keypoints which = 972 value = 3 } # Madrid
		command = { type = province_keypoints which = 981 value = 2 } # Valencia
		command = { type = province_keypoints which = 988 value = 1 } # Sevilla
		command = { type = province_keypoints which = 990 value = 1 } # Malaga
	
	} 
}

##############################################
# 802016 - (SPR) End of the SCW (by Generalisimo)
##############################################

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

	trigger = {
		event = 802014 
	
		NOT = {
			exists = SPA # Republican Spain wins
		}
	} 

	name = CEVTNAME_802016
	desc = CEVTDESC_802016
	style = 0

	date = { day = 5 month = january year = 1936 }
	offset = 15
	deathdate = { day = 29 month = december year = 1947 } 

	action_a = { 
		name = CEVTACTA_802016
	
		# Remove all SCW VPs
		command = { type = province_keypoints which = 959 value = -1 } # Vigo
		command = { type = province_keypoints which = 957 value = -1 } # Burgos
		command = { type = province_keypoints which = 966 value = -1 } # Valladolid
		command = { type = province_keypoints which = 969 value = -1 } # Barcelona
		command = { type = province_keypoints which = 972 value = -1 } # Madrid
		command = { type = province_keypoints which = 981 value = -1 } # Valencia
		command = { type = province_keypoints which = 988 value = -1 } # Sevilla
		command = { type = province_keypoints which = 990 value = -1 } # Malaga
		command = { type = province_keypoints which = 952 value = -1 } # Huesca
		command = { type = province_keypoints which = 954 value = -1 } # Bilbao
		command = { type = province_keypoints which = 953 value = -1 } # Pamplona
		command = { type = province_keypoints which = 967 value = -1 } # Zaragoza
		command = { type = province_keypoints which = 971 value = -1 } # Tortosa
		command = { type = province_keypoints which = 970 value = -1 } # Lleida
		command = { type = province_keypoints which = 980 value = -1 } # Cuenca
		command = { type = province_keypoints which = 996 value = -1 } # Cartagena
		command = { type = province_keypoints which = 983 value = -1 } # Albacete
		command = { type = province_keypoints which = 995 value = -1 } # Almeria
		command = { type = province_keypoints which = 991 value = -1 } # Granada
		command = { type = province_keypoints which = 987 value = -1 } # Cordoba
		command = { type = province_keypoints which = 977 value = -1 } # Badajoz
		command = { type = province_keypoints which = 978 value = -1 } # Salamanca
		command = { type = province_keypoints which = 956 value = -1 } # Gijon
		
		# Now add back 1 VP to each province
		command = { type = province_keypoints which = 959 value = 1 } # Vigo
		command = { type = province_keypoints which = 957 value = 1 } # Burgos
		command = { type = province_keypoints which = 966 value = 1 } # Valladolid
		command = { type = province_keypoints which = 969 value = 2 } # Barcelona
		command = { type = province_keypoints which = 972 value = 3 } # Madrid
		command = { type = province_keypoints which = 981 value = 2 } # Valencia
		command = { type = province_keypoints which = 988 value = 1 } # Sevilla
		command = { type = province_keypoints which = 990 value = 1 } # Malaga

	} 
}

##############################################
# 802017 - (SPA) Start of the SCW (by Generalisimo)
##############################################

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

	name = CEVTNAME_802017
	desc = CEVTDESC_802017
	style = 0

	action_a = { 
		name = CEVTACTA_802017
	
		# Remove all VPs
		command = { type = province_keypoints which = 959 value = -1 } # Vigo
		command = { type = province_keypoints which = 957 value = -1 } # Burgos
		command = { type = province_keypoints which = 966 value = -1 } # Valladolid
		command = { type = province_keypoints which = 969 value = -2 } # Barcelona
		command = { type = province_keypoints which = 972 value = -3 } # Madrid
		command = { type = province_keypoints which = 981 value = -2 } # Valencia
		command = { type = province_keypoints which = 988 value = -1 } # Sevilla
		command = { type = province_keypoints which = 990 value = -1 } # Malaga
	
		# Now add 1 VP to each SCW province
		command = { type = province_keypoints which = 959 value = 1 } # Vigo
		command = { type = province_keypoints which = 957 value = 1 } # Burgos
		command = { type = province_keypoints which = 966 value = 1 } # Valladolid
		command = { type = province_keypoints which = 969 value = 1 } # Barcelona
		command = { type = province_keypoints which = 972 value = 1 } # Madrid
		command = { type = province_keypoints which = 981 value = 1 } # Valencia
		command = { type = province_keypoints which = 988 value = 1 } # Sevilla
		command = { type = province_keypoints which = 990 value = 1 } # Malaga
		command = { type = province_keypoints which = 952 value = 1 } # Huesca
		command = { type = province_keypoints which = 954 value = 1 } # Bilbao
		command = { type = province_keypoints which = 953 value = 1 } # Pamplona
		command = { type = province_keypoints which = 967 value = 1 } # Zaragoza
		command = { type = province_keypoints which = 971 value = 1 } # Tortosa
		command = { type = province_keypoints which = 970 value = 1 } # Lleida
		command = { type = province_keypoints which = 980 value = 1 } # Cuenca
		command = { type = province_keypoints which = 996 value = 1 } # Cartagena
		command = { type = province_keypoints which = 983 value = 1 } # Albacete
		command = { type = province_keypoints which = 995 value = 1 } # Almeria
		command = { type = province_keypoints which = 991 value = 1 } # Granada
		command = { type = province_keypoints which = 987 value = 1 } # Cordoba
		command = { type = province_keypoints which = 977 value = 1 } # Badajoz
		command = { type = province_keypoints which = 978 value = 1 } # Salamanca
		command = { type = province_keypoints which = 956 value = 1 } # Gijon
	
	} 
}

##############################################
## 802018 - (SPR) Tarradellas Plan (by mfigueras)
##############################################
event = {
	id = 802018
	trigger = { 
		war = { country = SPR country = SPA }

		owned = { province = 969 data = SPR }
		control = { province = 969 data = SPR }
		owned = { province = 970 data = SPR }
		control = { province = 970 data = SPR }
		owned = { province = 971 data = SPR }
		control = { province = 971 data = SPR }
		}
	random = no
	country = SPR

	name = CEVTNAME_802018
	desc = CEVTDESC_802018
	style = 0

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

	action_a = { name = CEVTACTA_802018
		command = { type = dissent value = 4 } 
		command = { type = province_manpower which = 969 value = -2 } 
		command = { type = manpowerpool value = -2 } # problems with colect. and anarcos
		command = { type = industry which = 969 value = 2 }
		command = { type = industry which = 970 value = 1 }
		command = { type = industry which = 971 value = 1 } # enforcement of war industry
	}
	action_b = { name = CEVTACTB_802018
		command = { type = dissent value = 2 } 
		command = { type = industry which = 969 value = -1 }
		command = { type = industry which = 970 value = -1 } # not enforcement of war industry
		command = { type = add_division which = militia when = 969 }
	}
}


######################################################################
# 802019 - (SPR) Polish carbines to Spain (by Halibutt)
######################################################################

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

	# triggered by POL 702056 A

	name = CEVTNAME_802019
	desc = CEVTDESC_802019
	style = 0

	action_a = {
		name = CEVTACTA_802019
		command = { type = trigger which = 702057 } # POL sending them
		command = { type = supplies value = 100 }
		command = { type = gain_tech which = 1200 } #Basic Inf Weapons
		command = { type = gain_tech which = 1201 } # Semi-Automatic Rifle
		command = { type = steelpool value = -250 }
		#command = { type = manpowerpool value = 5 } # Brigadas Internacionales
		}
	action_b = {
		name = CEVTACTB_802019
		command = { type = trigger which = 702058 } # POL NOT sending them
		}
}

############################################
# 802020 - (SPR) Euskadi Autonomy Statute (by Generalisimo)
############################################

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

trigger = {
	# triggers if Bilbao is surrounded by Nat. Spain
	random = 30
	war = { country = SPA country = SPR }
	control = { province = 954 data = SPR } # Bilbao
	OR = {
		control = { province = 959 data = SPR } # vigo
		control = { province = 957 data = SPR } # burgos
		control = { province = 966 data = SPR } # valladolid
		control = { province = 969 data = SPR } # barcelona
		control = { province = 972 data = SPR } # Madrid
		control = { province = 981 data = SPR } # Valencia
		control = { province = 988 data = SPR } # sevilla
		control = { province = 990 data = SPR } # malaga
		control = { province = 952 data = SPR } # huesca
		control = { province = 953 data = SPR } # pamplona
		control = { province = 967 data = SPR } # zaragoza
		control = { province = 971 data = SPR } # tortosa
		control = { province = 970 data = SPR } # lleida
		control = { province = 980 data = SPR } # cuenca
		control = { province = 996 data = SPR } # cartagena
		control = { province = 983 data = SPR } # albacete
		control = { province = 995 data = SPR } # almeria
		control = { province = 991 data = SPR } # granada
		control = { province = 987 data = SPR } # cordoba
		control = { province = 977 data = SPR } # badajoz
		control = { province = 978 data = SPR } # salamanca
		control = { province = 956 data = SPR } # gijon
		
		}
	control = { province = 971 data = SPA } # Tortosa
	control = { province = 957 data = SPA } # Burgos
	control = { province = 959 data = SPA } # Vigo
	OR = {
		AND = {
			control = { province = 956 data = SPA } # Gijon
			control = { province = 953 data = SPA } # Pamplona
			}
		AND = {
			control = { province = 956 data = SPA } # Gijon
			control = { province = 952 data = SPA } # Huesca 
			}
		AND = {
			control = { province = 953 data = SPA } # Pamplona
			control = { province = 952 data = SPA } # Huesca 
			}
		}
	}

name = CEVTNAME_802020
desc = CEVTDESC_802020
style = 0

date = { day = 1 month = august year = 1936 }
offset = 10
deathdate = { day = 30 month = december year = 1940 }

action_a = {
	name = CEVTACTA_802020
	command = { type = dissent value = 5 }
	command = { type = independence which = u04 value = 1 }
	command = { type = influence value = -4 }
	command = { type = manpowerpool value = -80 }
	command = { type = supplies value = -500 }
	command = { type = trigger which = 802021 } # ESK setup
	}
action_b = {
	name = CEVTACTB_802020
	command = { type = dissent value = 10 }
	command = { type = sleepevent which = 802021 } # U04 independence
	command = { type = sleepevent which = 802022 } # SPA doesn't recognize
	command = { type = sleepevent which = 172130 } # GER doesn't recognize
	}
}

##########################
# 802021 - (U04) Euskadi Independence (by Generalisimo)
##########################
event = { 
id = 802021
random = no
country = U04

# Triggered by SPR 802020

name = CEVTNAME_802021
desc = CEVTDESC_802021
style = 0

action_a = {
name = CEVTACTA_OK 
	command = { type = alignment which = communist value = -10 }
	command = { type = dissent value = 10 }
	command = { type = access which = SPR }

	#command = { type = headofstate which = }
	#command = { type = headofgovernment which = }
	#command = { type = foreignminister which = }
	#command = { type = ministerofsecurity which = }
	#command = { type = ministerofintelligence which = }
	#command = { type = chiefofstaff which = }
	#command = { type = chiefofarmy which = }
	#command = { type = chiefofnavy which = }
	#command = { type = chiefofair which = }

	command = { type = add_division which = infantry when = 954 }
	command = { type = add_division which = militia  when = 954 }
	command = { type = add_division which = militia  when = 954 }
	command = { type = manpowerpool value = 80 }
	command = { type = supplies value = 5000 }
	command = { type = coalpool value = 500 }
	command = { type = steelpool value = 500 }
	command = { type = oilpool value = 500 }
	command = { type = rubberpool value = 500 }

	command = { type = trigger which = 802022 } # SPA declaration of war
	command = { type = trigger which = 172130 } # GER declaration of war
	}	
}

###############################
# 802022 - (SPA) Nat.Spain doesn't recognize Euskadi (by Generalisimo)
###############################
event = { 
id = 802022
random = no
country = SPA

trigger = {
	exists = U04
	war = { country = SPR country = SPA }
	NOT = {
	OR = {
		war = { country = SPA country = U04 }
		alliance = { country = SPA country = U04 }
		}
		}
	}

name = CEVTNAME_802022
desc = CEVTDESC_802022
style = 0

date = { day = 1 month = august year = 1936 }
offset = 2
deathdate = { day = 30 month = december year = 1940 }

action_a = {
	name = CEVTACTA_802022
	command = { type = war which = U04 }
	command = { type = dissent value = -2 } # offset dissent hit from DOW
	}
}


############################################
# 802023 - (SPR) Catalunya Autonomy Statute (by Generalisimo)
############################################

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

	trigger = {
		# triggers if Barcelona is surrounded by Nat. Spain
		random = 30
		war = { country = SPA country = SPR }
		control = { province = 969 data = SPR } # Barcelona
	
		OR = {
			control = { province = 959 data = SPR } # vigo
			control = { province = 957 data = SPR } # burgos
			control = { province = 966 data = SPR } # valladolid
			control = { province = 972 data = SPR } # Madrid
			control = { province = 981 data = SPR } # Valencia
			control = { province = 988 data = SPR } # sevilla
			control = { province = 990 data = SPR } # malaga
			control = { province = 952 data = SPR } # huesca
			control = { province = 954 data = SPR } # bilbo
			control = { province = 953 data = SPR } # pamplona
			control = { province = 967 data = SPR } # zaragoza
			control = { province = 971 data = SPR } # tortosa
			control = { province = 980 data = SPR } # cuenca
			control = { province = 996 data = SPR } # cartagena
			control = { province = 983 data = SPR } # albacete
			control = { province = 995 data = SPR } # almeria
			control = { province = 991 data = SPR } # granada
			control = { province = 987 data = SPR } # cordoba
			control = { province = 977 data = SPR } # badajoz
			control = { province = 978 data = SPR } # salamanca
			control = { province = 956 data = SPR } # gijon
		}
	
		control = { province = 957 data = SPA } # Burgos
		#control = { province = 959 data = SPA } # Vigo
	
		OR = {
			AND = {
				control = { province = 953 data = SPA } # Pamplona
				control = { province = 952 data = SPA } # Huesca
				}
			AND = {
				control = { province = 953 data = SPA } # Pamplona
				control = { province = 971 data = SPA } # Tortosa 
				}
			AND = {
				control = { province = 952 data = SPA } # Huesca
				control = { province = 971 data = SPA } # Tortosa 
				}
			}
	}

	name = CEVTNAME_802023
	desc = CEVTDESC_802023
	style = 0

	date = { day = 1 month = august year = 1936 }
	offset = 10
	deathdate = { day = 30 month = december year = 1940 }

	action_a = {
		name = CEVTACTA_802023
		command = { type = independence which = u05 value = 1 }
		command = { type = influence value = -4 }
		command = { type = manpowerpool value = -80 }
		command = { type = supplies value = -500 }
		command = { type = trigger which = 802024 } # CAT setup
		command = { type = dissent value = 5 }
		}
	action_b = {
		name = CEVTACTB_802023
		command = { type = dissent value = 10 }
		command = { type = sleepevent which = 802024 } # U05 independence
		command = { type = sleepevent which = 802025 } # SPA doesn't recognize
		command = { type = sleepevent which = 172131 } # GER doesn't recognize
		}
}

##########################
# 802024 - (U05) Catalunya Independence (by Generalisimo)
##########################
event = { 
	id = 802024
	random = no
	country = U05

	# Triggered by SPR 802023

	name = CEVTNAME_802024
	desc = CEVTDESC_802024
	style = 0

	action_a = {
		name = CEVTACTA_OK 
		command = { type = alignment which = communist value = -10 }
		command = { type = dissent value = 10 }
		command = { type = access which = SPR }

		#command = { type = headofstate which = }
		#command = { type = headofgovernment which = }
		#command = { type = foreignminister which = }
		#command = { type = ministerofsecurity which = }
		#command = { type = ministerofintelligence which = }
		#command = { type = chiefofstaff which = }
		#command = { type = chiefofarmy which = }
		#command = { type = chiefofnavy which = }
		#command = { type = chiefofair which = }

		command = { type = add_division which = infantry }
		command = { type = add_division which = militia }
		command = { type = add_division which = militia }
		command = { type = manpowerpool value = 80 }
		command = { type = supplies value = 5000 }
		command = { type = supplies value = 500 }
		command = { type = coalpool value = 500 }
		command = { type = steelpool value = 500 }
		command = { type = oilpool value = 500 }
		command = { type = rubberpool value = 500 }

		command = { type = trigger which = 802025 } # SPA declaration of war
		command = { type = trigger which = 172131 } # GER declaration of war
	}	
}

###############################
# 802025 - (SPA) Nat.Spain doesn't recognize Catalunya (by Generalisimo)
###############################
event = { 
	id = 802025
	random = no
	country = SPA

	trigger = {
		exists = U05 #Catalunya
		war = { country = SPR country = SPA }
		NOT = {
			OR = {
				war = { country = SPA country = U05 }
				alliance = { country = SPA country = U05 }
				}
			}
	}

	name = CEVTNAME_802025
	desc = CEVTDESC_802025
	style = 0

	date = { day = 1 month = august year = 1936 }
	offset = 2
	deathdate = { day = 30 month = december year = 1940 }

	action_a = {
		name = CEVTACTA_802025
		command = { type = war which = U05 } 
		command = { type = dissent value = -2 } # offset dissent hit from DOW
	}
}

#########################################################################
#  802026 - (SPR) Political Assassinations in Madrid (by Fallout_Boy)
#########################################################################
event = {
	id = 802026 # 41021
	random = no
	country = SPR
	trigger = { dissent = 10 }
	name = CEVTNAME_802026
	desc = CEVTDESC_802026
	style = 0

	date = { day = 12 month = july year = 1936 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = dissent value = 6 }
		command = { type = sleepminister which = 11144 } # Sotelo
	}
}

#########################################################################
#  802027 - (SPA) Uprising Fails in Barcelona, General Goded Arrested and Executed (by Fallout_Boy)
#########################################################################
event = {
	id = 802027 # 45080
	random = no
	country = SPA
	name = CEVTNAME_802027
	desc = CEVTDESC_802027

	style = 0
	trigger = { 
		war = { country = SPA country = SPR }
		control = { province = 969 data = SPR } 
		random = 75 
	}
	date = { day = 20 month = july year = 1936 }
	offset = 7
	deathdate = { day = 30 month = september year = 1936 }
	action_a = {
		name = CEVTACTA_OK
		command = { type = dissent value = 1 }
		command = { type = sleepleader which = 3429 }  # Goded Llopis
		command = { type = sleepleader which = 3423 }  # Fernandez Burriel
	}
}

#########################################################################
#  802028 - (SPA) General Sanjurjo Dies in Plane Crash (by Fallout_Boy)
#########################################################################
event = {
	id = 802028
	random = no
	country = SPA
	name = CEVTNAME_802028
	desc = CEVTDESC_802028

	style = 0
	trigger = { 
		war = { country = SPA country = SPR }
		random = 75 #Andris
	}

	date = { day = 20 month = july year = 1936 } #Historical date July 20, 1936
	offset = 7
	deathdate = { day = 20 month = august year = 1936 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = sleepminister which = 10032 }  	# Sanjurjo (headofstate)
		command = { type = sleepminister which = 10034 }  	# Sanjurjo (headofgov)
		command = { type = sleepleader   which = 3454 }   	# Sanjurjo (leader)
		command = { type = headofstate   which = 10001 }  	# Miguel Cabanellas Ferrer
		command = { type = headofgovernment which = 10002 }	# Fidel Dávila Arrondo
		command = { type = dissent value = 1 }
	}
}

#########################################################################
#  802029 - (SPR) International Brigades Formed (by Fallout_Boy)
#########################################################################
event = {
	id = 802029 # 49141
	random = no
	country = SPR
	
	name = CEVTNAME_802029
	desc = CEVTDESC_802029
	style = 0
	trigger = {
		random = 25
		war = { country = SPR country = SPA }
		event = 3102	# USSR Intervention
		OR = {
			event = 3002	# German intervention
			event = 3003	# Italian intervention
		}
	}	
	date = { day = 12 month = august year = 1936 }
	offset = 14
	deathdate = { day = 1 month = january year = 1939 }
	
	action_a = {
		name = CEVTACTA_OK
		#command = { type = dissent value = -2 }
		command = { type = add_division which = infantry }
		command = { type = manpowerpool value = 20 }
		command = { type = alignment which = communist value = 15 }
	}
}

#########################################################################
#  802030 - (SPA) Generalissimo Franco Named Head of State (by Fallout_Boy)
#########################################################################
event = {
	id = 802030
	random = no
	country = SPA
	
	name = CEVTNAME_802030
	desc = CEVTDESC_802030
	style = 0

	trigger = { 
		OR = {
		   AND = {
			headofstate = 10032 #Sanjurjo alive
			random = 50
			} 
		   event = 802028 	#Sanjurjo dead
		}	
	}

	date = { day = 21 month = september year = 1936 } 
	
	action_a = {
		name = CEVTACTA_OK
		command = { type = headofstate which = 10031 } 		# Francisco Franco Bahamonde
		command = { type = headofgovernment which = 10033 } 	# Francisco Franco Bahamonde
		command = { type = ministerofsecurity which = 10061 } 	# Manuel Hedilla Larrey
		#command = { type = sleepminister which = 10008 }	# Emilio Mola Vidal (initial)
		command = { type = chiefofarmy which = 10083 }		# Emilio Mola Vidal 
		command = { type = dissent value = -3 }
	}
}

#########################################################################
#  802031 - (SPA) General Mola Dies in a Plane Crash (by Fallout_Boy)
#########################################################################

event = {
	id = 802031 
	random = no
	country = SPA
	name = CEVTNAME_802031
	desc = CEVTDESC_802031
	style = 0
	trigger = { 
		war = { country = SPA country = SPR }
		random = 75 #Andris
	}

	date = { day = 2 month = june year = 1937 } #Historical date June 2, 1937
	offset = 7
	deathdate = { day = 25 month = june year = 1937 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = sleepminister which = 10083}  # Mola (minister)
		command = { type = sleepminister which = 10008}  # Mola (minister)
		command = { type = sleepleader   which = 3438 }  # Mola (leader)
		command = { type = dissent value = 1 }
	}
}

#########################################################################
#  802077 - (SPA) Lieutenant Colonel Ramon Franco Dies in a Plane Crash (by Fallout_Boy)
#########################################################################
event = {
	id = 802077  
	random = no
	country = SPA
	name = "Colonel Ramon Franco dies in a Plane Crash"
	desc = ""
	style = 0
	trigger = { 
		war = { country = SPA country = SPR }
		random = 75 #Andris
	}

	date = { day = 28 month = october year = 1938 } #Historical date October 28, 1938
	offset = 7
	deathdate = { day = 25 month = november year = 1938 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = sleepminister which = 10054}  # R. Franco (minister)
		command = { type = sleepminister which = 10093}  # R. Franco (minister)
		command = { type = sleepleader   which = 3479 }  # R. Franco (leader)
		command = { type = dissent value = 1 }
	}
}
#########################################################################
#  802032 - (SPA) Pope Pius XI Gives his blessing to Spanish Nationalists (by Fallout_Boy)
#########################################################################
event = {
	id = 802032 # 41170
	random = no
	country = SPA

	name = CEVTNAME_802032
	desc = CEVTDESC_802032
	style = 0

	trigger = { 
		war = { country = SPA country = SPR }
		event = 3003 # Italy supports SPA
		event = 3102   # USSR
		lost_VP = { country = SPR value = 15 }
		random = 25
	}

	date =  { day = 14 month = september year = 1936 }
	offset = 14
	deathdate =  { day = 30 month = december year = 1939 }

	action_a = {
		name = CEVTACTA_OK 
		command = { type = dissent value = -2 }
		command = { type = alignment which = communist value = -10 }
		command = { type = influence value = 1 }
		command = { type = warentry which = ENG value = -1 }
		command = { type = warentry which = FRA value = -2 }
		command = { type = warentry which = USA value = -2 }
	}
}

#########################################################################
#  1936 General Elections
#  remove 1936 election section of ministers_spr.csv to avoid having 2 elections
#########################################################################

event = {
	id = 802033
	random = no
	country = SPR
	name = CEVTNAME_802033
	desc = CEVTDESC_802033
	style = 0

	trigger = { alignment = democratic }
	
	date = { day = 16 month = february year = 1936 }

	action_a = {
		name = CEVTACTA_802033
		command = { type = dissent value = 4 }
		command = { type = alignment which = communist value = 20 }
		command = { type = alignment which = fascist value = -10 }
		command = { type = headofgovernment which = 11203 } # Azana
		command = { type = foreignminister which = 11023 } # Barcia Trelles
		command = { type = armamentminister which = 11206 } # Franco Lopez
		command = { type = ministerofsecurity which = 11025 } # Salvador Carreras
		command = { type = chiefofstaff which = 11027 }  # Estrada
		command = { type = chiefofarmy which = 11193 }  # Masquelet
		command = { type = chiefofnavy which = 11049 }  # Giral
	}
	action_b = {
		name = CEVTACTB_802033
		command = { type = dissent value = 4 }
		command = { type = alignment which = fascist value = 20 }
		command = { type = alignment which = communist value = -10 }
		command = { type = headofgovernment which = 11122 } # Gil-Robles
		command = { type = foreignminister which = 11103 } # Jímenez Fernández
		command = { type = armamentminister which = 11144 } # Calvo-Sotelo
		command = { type = ministerofsecurity which = 11105 } # Portela Valladares
		command = { type = ministerofintelligence which = 11146 } # Orgaz Yoldi
		command = { type = sleepevent which = 802034  }  
	}	
}

#########################################################################
#  President Alcalá-Zamora deposed
#########################################################################
event = {
	id = 802034
	random = no
	country = SPR
	name = CEVTNAME_802034
	desc = CEVTDESC_802034
	style = 0

	trigger = { headofgovernment = 11203 } # Azana
	date = { day = 10 month = may year = 1936 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = dissent value = 2 }  
		command = { type = alignment which = communist value = 10 }
		command = { type = headofstate which = 11202 }  # Azana
		command = { type = headofgovernment which = 11062 }  # Casares
	}
}

#########################################################################
#  802035 - (SPA) Nationalist Spain receives oil from US (by Fallout_Boy)
#########################################################################
event = { 
	id = 802035 # 45011
	random = no
	country = SPA
	
	# Triggered by USA 322056 (45010)
	
	name = CEVTNAME_802035
	desc = CEVTDESC_802035
	style = 0
	
	action_a = {
		name = CEVTACTA_OK
		command = { type = dissent value = -1 }  
		command = { type = supplies value = 800 }
		command = { type = oilpool value = 1000 }
		command = { type = infrastructure which = -1 value = 2 }
		command = { type = infrastructure which = -1 value = 2 }
		command = { type = infrastructure which = -1 value = 2 }
		command = { type = gain_tech which = -1 }
	}
}

######################################################################
#  802036 - (SPR) Spanish Colonial Policy (by Fallout_Boy)
######################################################################
event = {
	id = 802036 # 
	random = no
	country = SPR

	name = CEVTNAME_802036
	desc = CEVTDESC_802036
	style = 0
	
	trigger = {
		random = 25
		war = { country = SPR country = SPA }
		lost_VP = { country = SPR value = 40 }
		NOT = { #Either France or England or both does not send supplies
			AND = { 
				event = 3103  # supplies from ENG
				event = 3104  # supplies from FRA
			}
		}
		NOT = {
			alliance = { country = SPR country = ENG }
			war = { country = ENG country = SPA }
			war = { country = ENG country = GER }
			war = { country = SOV country = SPA }
		}
	}

	date = { day = 1 month = october year = 1936 }
	offset = 7
	deathdate = { day = 30 month = december year = 1939 }


	action_a = {
		name = CEVTACTA_802036
		command = { type = dissent value = 4 }  
		command = { type = trigger which = 432043 }  #  French Response
		command = { type = sleepevent which = 802039 } # (SPA) Moroccan Revolt against Nationalist Spain
		command = { type = sleepevent which = 552017 } # (MOR) Independent Morocco Setup
		command = { type = sleepevent which = 432044 } # (FRA) Moroccan Revolt Causes Dissent in French Africa
		command = { type = sleepevent which = 272099 } # (ENG) Moroccan Revolt Causes Dissent in British Africa
		command = { type = sleepevent which = 432045 } # (FRA) Revolt Spills Over Into French Morocco
		command = { type = sleepevent which = 552018 } # (MOR) French Morocco Joins Independent Moroccan State
	}
	action_b = {
		name = CEVTACTB_802036
		command = { type = dissent value = 1 }  
		command = { type = alignment which = democratic value = -10 }
		command = { type = influence value = -10 }
		command = { type = supplies value = -200 }
		command = { type = removecore which = 1009 }
		command = { type = trigger which = 802039 }  #  Moroccan Independence
		command = { type = sleepevent which = 432043 } # (FRA) Spain offers Morocco to France in Exchange for Military Aid
		command = { type = sleepevent which = 802037 } # (SPR) France Agrees to Colonies-for-Arms trade
		command = { type = sleepevent which = 802038 } # (SPR) Following Republican Victory, France gets African Colonies
	}
	action_c = {
		name = CEVTACTC_802036
		command = { type = sleepevent which = 802039 } # (SPA) Moroccan Revolt against Nationalist Spain
		command = { type = sleepevent which = 552017 } # (MOR) Independent Morocco Setup
		command = { type = sleepevent which = 432044 } # (FRA) Moroccan Revolt Causes Dissent in French Africa
		command = { type = sleepevent which = 272099 } # (ENG) Moroccan Revolt Causes Dissent in British Africa
		command = { type = sleepevent which = 432045 } # (FRA) Revolt Spills Over Into French Morocco
		command = { type = sleepevent which = 552018 } # (MOR) French Morocco Joins Independent Moroccan State
	}
}

#########################################################################
#  802037 - (SPR) France Agrees to Colonies-for-Arms trade (by Fallout_Boy)
#########################################################################
event = {
	id = 802037 # 
	random = no
	country = SPR

	#Triggered by FRA 432043 

	name = CEVTNAME_802037
	desc = CEVTDESC_802037
	style = 0

	action_a = {
		name = CEVTACTA_GREAT
		command = { type = alignment which = democratic value = 10 }
		command = { type = supplies value = 1000 }
		command = { type = oilpool value = 250 }
		command = { type = add_division which = infantry }
	}
}

#########################################################################
#  802038 - (SPR) Following Republican Victory, France gets African Colonies (by Fallout_Boy)
#########################################################################
event = {
	id = 802038 # 
	random = no
	country = SPR

	name = CEVTNAME_802038
	desc = CEVTDESC_802038
	style = 0

	trigger = { 
		event = 802037   # France accepts the offer
		NOT = { exists = SPA } # SPR wins the war
		OR = {  
			control = { province = 1009 data = SPR } # Ceuta
			control = { province = 1027 data = SPR } # Villa Cisernos
		}
	}
	date = { day = 1 month = october year = 1936 }
	offset = 7
	deathdate = { day = 30 month = december year = 1947 } 

	action_a = {
		name = CEVTACTA_OK
		command = { type = secedeprovince which = FRA value = 1009 }  # Transfer both to France
		command = { type = secedeprovince which = FRA value = 1027 }
	}
}

#########################################################################
#  802039 - (SPA) Moroccan Revolt against Nationalist Spain (by Fallout_Boy)
#########################################################################
event = { 
	id = 802039 #
	random = no
	country = SPA
	
	# Triggered by SPR 802036B 

	name = CEVTNAME_802039
	desc = CEVTDESC_802039
	style = 0
	
	action_a = {
		name = CEVTACTA_802039
		command = { type = independence which = MOR value = 1 }
		command = { type = dissent value = 5 }
		command = { type = manpowerpool value = -50 }
		command = { type = supplies value = -150 }
		command = { type = oilpool value = -50 }
		command = { type = steelpool value = -250 }
		command = { type = coalpool value = -250 }
		command = { type = rubberpool value = -25 }
		command = { type = trigger which = 552017 }  # MOR Independent Morocco Setup
		command = { type = trigger which = 432044 }  # FRA Dissent in French Africa
		command = { type = trigger which = 272099 }  # ENG Dissent in British Africa
	}
}

#########################################################################
# 802040 - (SPR) Nationalist Revolt Sparks Popular Uprising (by Fallout_Boy)
#########################################################################
event = {
	id = 802040 # 41028
	random = no
	country = SPR

	name = CEVTNAME_802040
	desc = CEVTDESC_802040
	style = 0

	trigger = { war = { country = SPR country = SPA } }

	date = { day = 18 month = july year = 1936 }

	action_a = {
		name = CEVTACTA_802040
		command = { type = alignment which = communist value = 20 }
		command = { type = add_division which = militia }
#		command = { type = add_division which = militia }
	}
}

# These are ibirean event for the political events pack #

###########################
# Nationalist Spain
###########################
###########################
# 802041 (SPA)Spain withdraws from League of Nations(by Ghost_dk)
###########################

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

	trigger = {
		government = fascist
		}
	name = CEVTNAME_802041
	desc = CEVTDESC_802041
	style = 0

	date = { day = 8 month = may year = 1939 }

	action_a = {
		name = CEVTACTA_802041
		command = { type = influence value = -2 }
		}
}
#################################
# 802042 (SPA)US pressure on Spanish trade with germany(by Ghost_dk)
#################################

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

	# triggered by USA 322090

	name = CEVTNAME_802042
	desc = CEVTDESC_802042
	style = 0

	action_a = {
		name = CEVTACTA_802042
		command = { type = influence value = -4 }
		command = { type = oilpool value = 1000 }
		command = { type = trigger which = 322095 }
		}
	action_b = {
		name = CEVTACTB_802042
		command = { type = trigger which = 322096 }
		}
}
#################################
# 802066 (SPA)Vatican recognition of Spanish Nationalist Government(by Ghost_dk)
#################################

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

	# triggered by ITA 462121

	name = CEVTNAME_802066
	desc = CEVTDESC_802066
	style = 0

	action_a = {
		name = CEVTACTA_802066
		command = { type = influence value = 1 }
		command = { type = dissent value = -1 }  
		command = { type = alignment which = democratic value = 5 }
		}
}
###########################
# 802067 (SPA)U.S. Recognition of Spanish Nationalist Government(by Ghost_dk)
###########################
event = {
	id = 802067
	random = no
	country = SPA

	# triggered by USA 322122

	name = CEVTNAME_802067
	desc = CEVTDESC_802067
	style = 0

	action_a = {
		name = CEVTACTA_802067
		command = { type = influence value = 2 }
		command = { type = dissent value = -1 }  
		command = { type = alignment which = democratic value = 10 }
		}
}
############################
# Portugal
############################
############################
# 802068 (POR)Anglo-portuguese Agreement(by Ghost_dk)
############################

event = {
	id = 802068
	random = no
	country = POR

	# triggered by ENG 272139

	name = CEVTNAME_802068
	desc = CEVTDESC_802068
	style = 0

	action_a = {
		name = CEVTACTA_802068
		command = { type = alignment which = communist value = -15 }
		command = { type = trigger which = 272140 }
		}
	action_b = {
		name = CEVTACTB_802068
		command = { type = dissent value = 2 }
		command = { type = trigger which = 272141 }
		}
}

##################################################
# 802069 - Portugal Mobilizes
##################################################

event = { 
	id = 802069
	random = no
	country = POR

	trigger = {
		OR = {
			atwar = yes
			}
		}

	name = CEVTNAME_802069
	desc = CEVTDESC_802069
	style = 0

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

	action_a = {
		name = CEVTACTA_OK
		command = { type = manpowerpool value = 80 }
		command = { type = province_manpower which = 975   value = 10 } #Lissaban
		command = { type = province_manpower which = 964   value = 4 } #Porto
		command = { type = province_manpower which = 974   value = 1 } #Portalegre
		command = { type = province_manpower which = 976   value = 2 } #Evora
		command = { type = province_manpower which = 986   value = 2 } #Faro
	}
}

###########################
# 802044 - (POR) The Tejo warship mutiny (by Gwalcmai)
###########################
event = {
	id = 802044
	random = no
	country = POR

	trigger = { 
		exists = SPR
		exists = SPA
		event = 3100
		NOT = {
			war = { country = POR country = SPA }
		}
	}

	name = CEVTNAME_802044
	desc = CEVTDESC_802044
	style = 0 

	date = { day = 17 month = september year = 1936 }

	action_a = { # attack the ships
		name = CEVTACTA_802044
		command = { type = dissent value = 5 }
		command = { type = sleepevent which = 802045 }
		command = { type = sleepevent which = 802046 }
	}
	action_b = { # negotiate
		name = CEVTACTB_802044
		command = { }
	} #Im concerned humans will always choose b. So theres an event that could hurt you if you choose this.
}

# 802045 - (POR) Negotiations go poorly (by Gwalcmai)
event = {
	id = 802045
	random = no
	country = POR

	trigger = {
		event = 802044
		random = 50
		NOT = {
			event = 802046
		}
	}

	name = CEVTNAME_802045
	desc = CEVTDESC_802045
	style = 0

	date = { day = 19 month = september year = 1936 }
	offset = 1
	deathdate = { day = 29 month = september year = 1936 }
	action_a = {
		name = CEVTACTA_802045
		command = { type = dissent value = 10 }
	}
}

# 802046 - (POR) Negotiations effective (by Gwalcmai)
event = {
	id = 802046
	random = no
	country = POR

	trigger = {
		event = 802044
		random = 50
		NOT = {
			event = 802045
		}
	}


	name = CEVTNAME_802046
	desc = CEVTDESC_802046
	style = 0

	date = { day = 19 month = september year = 1936 }
	offset = 1
	deathdate = { day = 29 month = september year = 1936 }

	action_a = {
		name = CEVTACTA_GREAT
		command = { type = sleepevent which = 802045 }
		command = { type = alignment which = communist value = 5 }
	}
}
# end mutiny event #


#########################
# 802047 - (POR) Salazar assassination (by Gwalcmai)
#########################
event = {
	id = 802047
	random = no
	country = POR

	trigger = {
		headofgovernment = 9002
	}

	name = CEVTNAME_802047
	desc = CEVTDESC_802047
	style = 0

	date = { day = 15 month = june year = 1937 }
	offset = 50
	deathdate = { day = 15 month = june year = 1938 }

	action_a = {
		name = CEVTACTA_802047
		command = { type = alignment which = fascist value = 5 }
		command = { type = dissent value = -2 }
	}
	action_b = {
		name = CEVTACTB_802047
		command = { type = alignment which = fascist value = -10 }
		command = { type = dissent value = 5 }
	}
}
# end assassins event #

  
################
# Iberian pact (by Gwalcmai)
################
### 802048 - (POR) The Iberian Pact (by Gwalcmai)

event = {
	id = 802048
	random = no
	country = POR

	name = CEVTNAME_802048
	desc = CEVTDESC_802048

	action_a = {
		name = CEVTACTA_802048
		command = { type = alignment which = fascist value = -25 }
	}
}

#### 802049 - (SPA) The Iberian Pact (by Gwalcmai)

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

	trigger = {
		event = 3004 #SPA won the SCW
		NOT = { war = { country = SPA country = POR } }
	}

	name = CEVTNAME_802049
	desc = CEVTDESC_802048

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

	action_a = {
	name = CEVTACTA_802049
		command = { type = alignment which = fascist value = -25 }
		command = { type = trigger which = 802048 }
	}
}
# end iberian pact events #


##################
# 802050 - (POR) Anti-Comintern (by Gwalcmai)
##################
event = {
	id = 802050
	random = no
	country = POR

	trigger = {
		NOT = { 
			alliance = { country = GER country = POR }
			alliance = { country = POR country = SOV }
			alliance = { country = POR country = ENG }
		}
		exists = GER
		exists = ITA
		exists = PAN
		event = 172024
	}


	name = CEVTNAME_802050
	desc = CEVTDESC_802050
	style = 0

	date = { day = 1 month = april year = 1939 }
	offset = 15
	deathdate = { day = 1 month = april year = 1941 }

	action_a = {
		name = CEVTACTA_802050
		command = { type = alignment which = democratic value = 10 }
		command = { type = alignment which = communist value = 5 }
	}
	action_b = {
		name = CEVTACTB_802050
		command = { type = alignment which = communist value = -50 }
	}
}
# end anti-comintern #


###################
# 802051 - (POR) British support (by Gwalcmai)
###################
event = {
	id = 802051
	random = no
	country = POR

	name = CEVTNAME_802051
	desc = CEVTDESC_802051
	style = 0

	action_a = {
		name = CEVTACTA_THANKS
		command = { type = coalpool value = 100 }
		command = { type = steelpool value = 50 }
		command = { type = rubberpool value = 50 }
		command = { type = oilpool value = 10 }
		command = { type = alignment which = democratic value = 15 }
	} #should also reduce ENG's pools, but...
}

### 802052 - (POR) British support for portuguese rearmament (by Gwalcmai)

event = {
	id = 802052
	random = no
	country = POR

	name = CEVTNAME_802052
	desc = CEVTDESC_802052
	style = 0

	action_a = {
		name = CEVTACTA_THANKS
		command = { type = steelpool value = 500 }
		command = { type = rubberpool value = 500 }
		command = { type = alignment which = democratic value = 30 }
		command = { type = steal_tech which = ENG } 
	}
}



##################
# 802053 - (POR) Portugal world fair (by Gwalcmai)
##################
event = {
	id = 802053
	random = no
	country = POR

	trigger = { atwar = no }

	name = CEVTNAME_802053
	desc = CEVTDESC_802053
	style = 0

	date = { day = 23 month = june year = 1940 }

	action_a = {
		name = CEVTACTA_802053
		command = { type = dissent value = -10 }
		command = { type = supplies value = -200 }
	} #Any other effects? This is double 'parade in capital'
}
# end POR world fair #


#################
# 802054 - (POR) volfram trade (by Gwalcmai)
#################
event = {
	id = 802054
	random = no
	country = POR

	trigger = {
		NOT = { alliance = { country = ENG country = POR } }
		not = { alliance = { country = SOV country = POR } }
		war = { country = GER country = SOV }
		war = { country = ENG country = GER }
		atwar = no
	}

	name = CEVTNAME_802054
	desc = CEVTDESC_802054
	style = 0

	date = { day = 3 month = january year = 1941 }
	offset = 10
	deathdate = { day = 1 month = may year = 1942 }

	action_a = { 
		name = CEVTACTA_802054
		command = { type = steelpool value = 360 }
		command = { type = coalpool value = 720 }
		command = { type = rubberpool value = 180 }
		command = { type = industry which = -1 value = 1 } #1 IC and raws to keep it going for 1 year.
		command = { type = infrastructure which = -1 value = 10 } #rail wagons and OPEL trucks
		command = { type = steal_tech which = GER }
		command = { type = steal_tech which = GER }
		command = { type = trigger which = 172164 }
	}
}

### 802055 - (POR) Germany renews the trade deals (by Gwalcmai)

event = { 
	id = 802055
	random = no
	country = POR

	trigger = {
		NOT = {
			OR = { #checking neutrality
			alliance = { country = SOV country = POR }
			alliance = { country = ENG country = POR }
			}
		}
		war = { country = GER country = SOV }
		war = { country = ENG country = GER }
	}



	name = CEVTNAME_802055
	desc = CEVTDESC_802055
	style = 0

	date = { day = 2 month = december year = 1942 }
	offset = 10
	deathdate = { day = 1 month = january year = 1944 }

	action_a = { 
		name = CEVTACTA_802054
		command = { type = steelpool value = 360 }
		command = { type = coalpool value = 720 }
		command = { type = rubberpool value = 180 }
		command = { type = infrastructure which = -1 value = 10 }
		command = { type = industry which = -1 value = 1 }
		command = { type = steal_tech which = GER }
		command = { type = trigger which = 172164 } #trigger Tungsten trade GER.
	}
}

### 802056 - (POR) Germany wishes to renew trade deals (by Gwalcmai)

event = {
	id = 802056
	random = no
	country = POR

	trigger = {
		event = 802055
		NOT = {
			OR = { #checking neutrality
			alliance = { country = SOV country = POR }
			alliance = { country = ENG country = POR }
			}
		}
		war = { country = GER country = SOV }
		war = { country = ENG country = GER }
	}



	name = CEVTNAME_802056
	desc = CEVTDESC_802056
	style = 0

	date = { day = 2 month = may year = 1944 }
	offset = 10
	deathdate = { day = 1 month = january year = 1946 }

	action_a = { 
		name = CEVTACTA_802054
		command = { type = steelpool value = 300 }
		command = { type = coalpool value = 600 }
		command = { type = infrastructure which = -1 value = 10 }
		command = { type = steal_tech which = GER }
		command = { type = steal_tech which = GER }
		command = { type = industry which = -1 value = 1 }
		command = { type = trigger which = 172164 } # trigger Tungsten trade GER.
  }
}



#########################
# The spanish civil war #
#########################
# Over 8000 portuguese served in Franco's forces, and it was Salazar's
# first intention to send an expeditionary force to help the rebels.
# Portugal also loaned the nationalist government over 1 million pounds.

### 802057 - (POR) The Spanish Federalist Menace (by Gwalcmai)
event = {
	id = 802057
	random = no
	country = POR

	trigger = {
		event = 3100
		exists = SPA
		exists = SPR
		NOT = {
			war = { country = POR country = SPA }
		}
	}


	name = CEVTNAME_802057
	desc = CEVTDESC_802057
	# better desc required. This one is really crummy, sorry.
	style = 0

	date = { day = 1 month = august year = 1936 }
	offset = 5
	deathdate = { day = 29 month = december year = 1947 }

	action_a = {
		name = CEVTACTA_802057
		#command = { type = access which = SPA } was hurting SPA
		command = { type = alignment which = communist value = -30 }
		command = { type = trigger which = 802058 }
	}
}  

### 802058 - (SPA) Portuguese Volunteers (by Gwalcmai)

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

	name = CEVTNAME_802058
	desc = CEVTDESC_802058

	action_a = {
		name = CEVTACTA_OK
		command = { type = add_division which = infantry }
		command = { type = supplies value = 1000 }
		command = { type = dissent value = -5 }
	}
}
# end SCW #


##################
# Embargo events #
##################
### 802059 - (POR) British Demand Embargo (by Gwalcmai)
event = {
	id = 802059
	random = no
	country = POR

	trigger = {
	event = 802055
	NOT = {
		alliance = { country = GER country = POR }
		alliance = { country = SOV country = POR }
		alliance = { country = ENG country = POR }
	}
	atwar = no
	}


	name = CEVTNAME_802059
	desc = CEVTDESC_802059
	style = 0

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

	action_a = {
		name = CEVTACTA_802059
		command = { type = sleepevent which = 802056 }
		command = { type = alignment which = democratic value = 10 }
		command = { type = trigger which = 172165 }
	}
	action_b = {
		name = CEVTACTB_802059
		command = { type = trigger which = 272152 }
	}
}

### 802060 - (POR) Britain Repeat Demands (by Gwalcmai)

event = {
	id = 802060
	random = no
	country = POR

	name = CEVTNAME_802060
	desc = CEVTDESC_802060
	style = 0

	action_a = {
		name = CEVTACTA_802059
		command = { type = sleepevent which = 802056 }
		command = { type = alignment which = democratic value = 10 }
		command = { type = trigger which = 172165 }
	}
	action_b = {
		name = CEVTACTB_802059
		command = { type = trigger which = 272153 }
	}
}

### 802061 - (POR) Germany declares war (by Gwalcmai)

event = {
	id = 802061
	random = no
	country = POR

	name = CEVTNAME_802061
	desc = CEVTDESC_802061
	style = 0

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

### 802062 - (POR) Allies declare war (by Gwalcmai)

event = {
	id = 802062
	random = no
	country = POR

	name = CEVTNAME_802062
	desc = CEVTDESC_802062
	style = 0

	action_a = {
		name = CEVTACTA_OK
		command = { type = trigger which = 172166 }
	}
}


################################################################################
#                 HlvtnCndn's portuguese events
################################################################################

##############################################
#802063 - (POR) Portuguese Neutrality (by HlvtnCndn)
##############################################

event = {
	id = 802063
	random = no
	country = POR

	trigger = {
		alignment = fascist
		war = { country = ENG country = GER }
		NOT = { #Don't trigger if Portugal is at war with Allies or Axis
			war = { country = POR country = GER }
			war = { country = POR country = ENG }
		}
	}

	name = CEVTNAME_802063
	desc = CEVTDESC_802063
	style = 0

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

	action_a = {
		name = CEVTACTA_802063
		command = { type = alignment which = democratic value = 30 }
		command = { type = alignment which = fascist value = -30 }
	}

	action_b = {
		name = CEVTACTB_802063
		command = { }
	}
}

##############################################
#802064 - (POR) Azores Negotiations (by HlvtnCndn)
##############################################

event = {
	id = 802064
	random = no
	country = POR

	trigger = {
		alignment = fascist
		war = { country = ENG country = GER }
		NOT = { #Don't trigger if Portugal is at war with Allies or Axis
			war = { country = POR country = GER }
			war = { country = POR country = ENG }
		}
	}

	name = CEVTNAME_802064
	desc = CEVTDESC_802064
	style = 0

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

	action_a = {
		name = CEVTACTA_802064
		command = { type = alignment which = democratic value = 30 }
		command = { type = alignment which = fascist value = -30 }
	}

	action_b = {
		name = CEVTACTB_802064
		command = { type = secedeprovince which = ENG value = 451 } # Province seceded since one-province access is impossible
		command = { type = sleepevent which = 802065 } # No need to trigger the other base-access event
		command = { type = alignment which = democratic value = 40 }
		command = { type = alignment which = fascist value = -40 }
	}

	action_c = {
		name = CEVTACTC_802064
		command = { type = access which = ENG } # Represents bigger commitment than just the Azores bases
		command = { type = sleepevent which = 802065 } # No need to trigger the other base-access event
		command = { type = alignment which = democratic value = 50 }
		command = { type = alignment which = fascist value = -50 }
		command = { type = dissent value = 5 } # Pro-fascist elements angered
	}

	action_d = {
		name = CEVTACTD_802064
		command = { type = sleepevent which = 802065 } # Removes possibility of allowing basing rights
		command = { type = dissent value = 10 } # Pro-British elements angered
	}
}

##############################################
#802065 - (POR) Azores Basing Rights (by HlvtnCndn)
##############################################

event = {
	id = 802065
	random = no
	country = POR

	trigger = {
		war = { country = ENG country = GER }
		NOT = { #Don't trigger if Portugal is at war with Allies or Axis
			war = { country = POR country = GER }
			war = { country = POR country = ENG }
		}
	}


	name = CEVTNAME_802065
	desc = CEVTDESC_802065
	style = 0

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

	action_a = {
		name = CEVTACTA_802065
		command = { type = secedeprovince which = ENG value = 451 } # Province seceded since one-province access is impossible
		command = { type = alignment which = democratic value = 40 }
		command = { type = alignment which = fascist value = -40 }
	}

	action_b = {
		name = CEVTACTB_802065
		command = { type = access which = ENG } # Represents bigger commitment than just the Azores bases
		command = { type = alignment which = democratic value = 50 }
		command = { type = alignment which = fascist value = -50 }
		command = { type = dissent value = 5 } # Pro-fascist elements angered
	}

	action_c = {
		name = CEVTACTC_802065
		command = { type = dissent value = 10 } # Pro-British elements angered
	}
}

################################################## #######################
# 802070 - Franco rebuild Spain SPA
################################################## #######################
event = {
	id = 802070
	random = no
	country = SPA

	# Triggered by ITA 462132

	name = CEVTNAME_802070
	desc = CEVTDESC_802070
	style = 0

	action_a = {
		name = CEVTACTA_802070
		command = { type = dissent value = -5 }
		command = { type = alignment which = fascist value = 5 }
	}
	action_b = {
		name = CEVTACTB_802070
		command = { type = coalpool value = 1000 }
		command = { type = steelpool value = 1000 }
		command = { type = rubberpool value = 1000 } 
		command = { type = supplies value = 500 }
		command = { type = alignment which = fascist value = 5 }
	}
}


################################################## #######################
# 802071 - Republic rebuild Spain SPR
################################################## #######################
event = {
	id = 802071
	random = no
	country = SPR

	#triggered by SOV 222109

	name = CEVTNAME_802071
	desc = CEVTDESC_802071
	style = 0

	action_a = {
		name = CEVTACTA_802071
		command = { type = coalpool value = 1000 }
		command = { type = steelpool value = 1000 }
		command = { type = rubberpool value = 1000 } 
		command = { type = supplies value = 500 }
		command = { type = alignment which = communist value = 5 }
	}
	action_b = {
		name = CEVTACTB_802071
		command = { type = dissent value = -5 }
		command = { type = alignment which = communist value = 5 }
	}
}

##########################
# 802072 - (U05) Catalunya Post-war government (by Nachinus)
##########################
event = { 
	id = 802072
	random = no
	country = U05

	trigger = {
		atwar = no
		NOT = {
			war = { country = SPR country = SPA }
			}
		} 

	name = CEVTNAME_802072
	desc = CEVTDESC_802072
	style = 0

	action_a = {
		name = CEVTACTA_802072
		command = { type = alignment which = democratic value = 10 }
		command = { type = dissent value = -2 }	
		command = { type = headofstate which = 101011 }
		command = { type = headofgovernment which = 101119 }
	}
	action_b = {
		name = CEVTACTB_802072
		command = { type = dissent value = 4 }
		command = { type = alignment which = democratic value = -10 }
		command = { type = alignment which = fascist value = 5 }
	}	
}

##########################
# 802073 - (U04) Euskadi Post-war government (by Nachinus)
##########################
event = { 
	id = 802073
	random = no
	country = U04

	trigger = {
		atwar = no
		NOT = {
			war = { country = SPR country = SPA }
		}
	} 

	name = CEVTNAME_802073
	desc = CEVTDESC_802073
	style = 0

	action_a = {
		name = CEVTACTA_802072
		command = { type = alignment which = democratic value = 10 }
		command = { type = dissent value = -2 }	
		command = { type = headofstate which = 100011 }
		command = { type = headofgovernment which = 100062 }
	}
	action_b = {
		name = CEVTACTB_802073
		command = { type = dissent value = 4 }
		command = { type = alignment which = democratic value = -10 }
		command = { type = alignment which = fascist value = 5 }
	}	
}

###############################
# 802074 - (SPA) Nat.Spain doesn't recognize Morocco (by nachinus)
###############################
event = { 
id = 802074
random = no
country = SPA

#triggered by MOR 552017 # 

name = CEVTNAME_802074
desc = CEVTDESC_802074
style = 0


action_a = {
	name = CEVTACTA_802074
	command = { type = war which = MOR }
	command = { type = dissent value = -3 } # offset dissent hit from DOW
	}
}

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

		# triggered by 172315 event

	name = CEVTNAME_802075
	desc = CEVTDESC_802075
	style = 0


	action_a = {
		name = CEVTACTA_802075
		command = { type = trigger which = 172317 }
		command = { type = dissent value = 1 }
		command = { type = sleepevent which = 172316 }
	}
	action_b = {
		name = CEVTACTB_802075
		command = { type = trigger which = 172316 }
		command = { type = dissent value = -3 }
		command = { type = sleepevent which = 172317 }
	}

}

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

		# triggered by another event

	name = CEVTNAME_802076
	desc = CEVTDESC_802076
	style = 0

	action_a = {
		name = CEVTACTA_802076
		command = { type = trigger which = 272199 }
		command = { type = dissent value = -3 }
		command = { type = sleepevent which = 272200 }
		command = { type = alignment which = democratic value = 10 } #added
		command = { type = influence value = 5 } #added
	}
	action_b = {
		name = CEVTACTB_802076
		command = { type = dissent value = 3 }
		command = { type = alignment which = communist value = 5 } #added
		command = { type = trigger which = 272200 }
		command = { type = sleepevent which = 272199 }
	}
}

####################################
# 802201 (SPA) Demobilisation after end of SCW (Andris)
####################################

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

	trigger = { 

		manpower = 22 

		event = 3004 	#Nationalist Spain victory in SCW
		event = 802015 	#End of SCW (Nationalist victory) 
		event = 802001 	#Los Maquis: the anti-fascist guerrillas

		owned = { province = 972 data = SPA } #Madrid (eliminated Republican Spain)
		owned = { province = 969 data = SPA } #Barcelona (eliminated Catalunya)
		owned = { province = 954 data = SPA } #Bilbao (eliminated Euskadi)
		
		#Either not at war or ONLY at war with Morocco
		OR = {
			atwar = no
			war = { country = SPA country = MOR }
		}
	} 

	name = "Post Civil War Demobilisation"
	desc = "Historically, following the Spanish Civil War, the victorious Nationalist side led by General Franco began the slow process of rebuilding Spain."
	style = 0

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

	action_a = {
		name = "OK"

		#Maintain Army in Nationalist strongholds + Madrid/Barcelona
		command = { type = province_manpower which = 996   value = -7 } #Cartagena 0
		command = { type = province_manpower which = 972   value = -4 } #Madrid 2
		command = { type = province_manpower which = 969   value = -4 } #Barcelona 2
		command = { type = province_manpower which = 981   value = -4 } #Valencia 1
		command = { type = province_manpower which = 988   value = -3 } #Sevilla* 0
		command = { type = province_manpower which = 967   value = -2 } #Zaragoza 1
		command = { type = province_manpower which = 987   value = -2 } #Cordoba* 0
 		command = { type = province_manpower which = 957   value = -1 } #Burgos 2
		command = { type = province_manpower which = 954   value = -2 } #Bilbao* 0
		command = { type = province_manpower which = 995   value = -3 } #Almeria 0
		command = { type = province_manpower which = 959   value = -1 } #Vigo 1
		command = { type = province_manpower which = 966   value = -1 } #Valladolid 1
		command = { type = province_manpower which = 978   value = -1 } #Salamanca 1
		command = { type = province_manpower which = 953   value = -1 } #Pamplona 1
		command = { type = province_manpower which = 990   value = -1 } #Malaga* 0
		command = { type = province_manpower which = 970   value = -2 } #Lleida 0
		command = { type = province_manpower which = 991   value = -1 } #Granada 1
		command = { type = province_manpower which = 956   value = -2 } #Gijon 0
		command = { type = province_manpower which = 980   value = -2 } #Cuenca 0
		command = { type = province_manpower which = 983   value = -2 } #Albacate 0
		command = { type = province_manpower which = 971   value = -1 } #Tortosa 0
		command = { type = province_manpower which = 997   value = -1 } #Palma 0	
		command = { type = province_manpower which = 1019  value = -1 } #Las Palmas 0
		command = { type = province_manpower which = 952   value = -1 } #Huesca 0
		command = { type = province_manpower which = 1009  value = -1 } #Ceuta 0
		command = { type = province_manpower which = 977   value = -1 } #Badajoz 0
					
	}
}

####################################
# 802204 (SPA) (AI) Demobilisation after end of SCW (Andris)
####################################

event = {
	id = 802204
	random = no
	country = SPA
	
	trigger = {
		ai = yes 
	      	event = 1510060 #SPA_SCW_Post_part1.ai
		event = 802201  #Demobilization
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = august year = 1936 }
	offset = 3
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		#Switch AI to normal peace-time military build-up
		command = { type = ai which = core_SPA_SCW_Post_part2.ai }

		#Add back cores on Ceuta/Canary Islands temporarily removed
		#in SPA 1510060, so that SPA doesn't build IC there
		command = { type = addcore which = 1009 } # Ceuta
		command = { type = addcore which = 1017 } # Lanzarote
		command = { type = addcore which = 1018 } # Fuerteventura
		command = { type = addcore which = 1019 } # Las Palmas
		command = { type = addcore which = 1020 } # Santa Cruz de Tenerife
	}
}

####################################
# 802217-19 (SPA) (AI) Production Build Error Handling 1937-39 (Andris)
####################################

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

	trigger = {
			ai = yes

			#Manpower should be >10 and <15, otherwise triggers prematurely
			manpower = 10
			NOT = { manpower = 15 }

			event = 802204 # Demobilisation after end of SCW 
			#random = 90    # Need to add some randomness to allow for cases, where AI builds divisions properly
		}	
		
	name = "Production Build AI Stuck"
	desc = ""
	style = 0

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

	action_a = {
		#AI sometimes gets permanently stuck, if MP>10 and it doesn't build anything
		#It then leaves research/production allocation at an equal amount, wasting a lot IC
		#that could be used for research. This forces it to build an infantry div., which
		#unlocks the AI to allocate research/production properly
		
		command = { type = build_division which = infantry }
	}
}

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

	trigger = {
			ai = yes

			#Manpower should be >10 and <15, otherwise triggers prematurely
			manpower = 10
			NOT = { manpower = 15 }

			event = 802204 # Demobilisation after end of SCW 
			#random = 90    # Need to add some randomness to allow for cases, where AI builds divisions properly
		}	
		
	name = "Production Build AI Stuck"
	desc = ""
	style = 0

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

	action_a = {
		#AI sometimes gets permanently stuck, if MP>10 and it doesn't build anything
		#It then leaves research/production allocation at an equal amount, wasting a lot IC
		#that could be used for research. This forces it to build an infantry div., which
		#unlocks the AI to allocate research/production properly
		
		command = { type = build_division which = infantry }
	}
}

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

	trigger = {
			ai = yes

			#Manpower should be >10 and <15, otherwise triggers prematurely
			manpower = 10
			NOT = { manpower = 15 }

			event = 802204 # Demobilisation after end of SCW 
			#random = 90    # Need to add some randomness to allow for cases, where AI builds divisions properly
		}	
		
	name = "Production Build AI Stuck"
	desc = ""
	style = 0

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

	action_a = {
		#AI sometimes gets permanently stuck, if MP>10 and it doesn't build anything
		#It then leaves research/production allocation at an equal amount, wasting a lot IC
		#that could be used for research. This forces it to build an infantry div., which
		#unlocks the AI to allocate research/production properly
		
		command = { type = build_division which = infantry }
	}
}

####################################
# 802231 (SPA) Partial Mobilisation in response to War in Europe (Andris)
####################################

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

	trigger = { 
		
		event = 802201 #Demobilisation after end of SCW 
		
		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 = "Partial Mobilization"
	desc = ""
	style = 0

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

	action_a = {
		name = "OK"

		#Andris: Nationalist Spain can access ~40% of original 1936 MP (28/69 MP)
		command = { type = province_manpower which = 996   value = 1 } #Cartagena 1
		command = { type = province_manpower which = 972   value = 1 } #Madrid 2+1 = 3
		command = { type = province_manpower which = 969   value = 1 } #Barcelona 2+1 = 3
		command = { type = province_manpower which = 981   value = 1 } #Valencia 1+1 = 2
		command = { type = province_manpower which = 988   value = 1 } #Sevilla* 1
		command = { type = province_manpower which = 967   value = 1 } #Zaragoza 1+1 = 2 
		command = { type = province_manpower which = 987   value = 1 } #Cordoba* 1
 		command = { type = province_manpower which = 957   value = 1 } #Burgos 2+1 = 3
		command = { type = province_manpower which = 954   value = 1 } #Bilbao* 1
		command = { type = province_manpower which = 995   value = 1 } #Almeria 1
		command = { type = province_manpower which = 959   value = 1 } #Vigo 1+1 = 2
		command = { type = province_manpower which = 966   value = 1 } #Valladolid 1+1 = 2
		command = { type = province_manpower which = 978   value = 1 } #Salamanca 1+1 = 2
		command = { type = province_manpower which = 953   value = 1 } #Pamplona 1+1 = 2
		command = { type = province_manpower which = 990   value = 0 } #Malaga* 0
		command = { type = province_manpower which = 970   value = 0 } #Lleida 0
		command = { type = province_manpower which = 991   value = 1 } #Granada 1+1 = 2
		command = { type = province_manpower which = 956   value = 0 } #Gijon 0
		command = { type = province_manpower which = 980   value = 0 } #Cuenca 0
		command = { type = province_manpower which = 983   value = 0 } #Albacate 0
		command = { type = province_manpower which = 971   value = 0 } #Tortosa 0
		command = { type = province_manpower which = 997   value = 0 } #Palma 0	
		command = { type = province_manpower which = 1019  value = 0 } #Las Palmas 0
		command = { type = province_manpower which = 952   value = 0 } #Huesca 0
		command = { type = province_manpower which = 1009  value = 0 } #Ceuta 0
		command = { type = province_manpower which = 977   value = 0 } #Badajoz 0

		command = { type = start_research which = 4405 } #Small Arms Assembly
		command = { type = prio_research which = 4405 }
				
	}
}


####################################################
# 802232 (SPA) Nationalist Spain Mobilizes (Regular) (Andris)
####################################################

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

	trigger = { 
		
		event = 802231  
		NOT = { event = 802235 } #Nationalist Spain Mobilizes (Secret)

		OR = {
			war = { country = POR country = SPA }
			war = { country = GER country = SPA }
			war = { country = SOV country = SPA }
			war = { country = FRA country = SPA }
			war = { country = ITA country = SPA }
			war = { country = ENG country = SPA }
			war = { country = USA country = SPA }
		}
	} 

	name = "Complete Mobilization"
	desc = "Following the devastations of the Spanish Civil War, the country had only just started to recover in 1939 when World War II started in Europe. Historically, Franco avoided joining the Axis side, as he knew that Spain was not prepared to fight another war so soon."
	style = 0

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

	action_a = {
		name = "OK"

		#Andris: Nationalist Spain can access ~87% of original 1936 MP (60/69 MP)
		command = { type = province_manpower which = 996   value = 4 } #Cartagena 1+4 = 5
		command = { type = province_manpower which = 972   value = 3 } #Madrid 2+1+3 = 6
		command = { type = province_manpower which = 969   value = 2 } #Barcelona 2+1+2 = 5
		command = { type = province_manpower which = 981   value = 3 } #Valencia 1+1+3 = 5
		command = { type = province_manpower which = 988   value = 2 } #Sevilla* 1+2 = 3
		command = { type = province_manpower which = 967   value = 1 } #Zaragoza 1+1+1 = 3 
		command = { type = province_manpower which = 987   value = 1 } #Cordoba* 1+1 =2
 		command = { type = province_manpower which = 957   value = 0 } #Burgos 2+1 = 3
		command = { type = province_manpower which = 954   value = 1 } #Bilbao* 1+1 = 2
		command = { type = province_manpower which = 995   value = 2 } #Almeria 1+2 =3
		command = { type = province_manpower which = 959   value = 0 } #Vigo 1+1 = 2
		command = { type = province_manpower which = 966   value = 0 } #Valladolid 1+1 = 2
		command = { type = province_manpower which = 978   value = 0 } #Salamanca 1+1 = 2
		command = { type = province_manpower which = 953   value = 0 } #Pamplona 1+1 = 2
		command = { type = province_manpower which = 990   value = 1 } #Malaga* 1
		command = { type = province_manpower which = 970   value = 1 } #Lleida 1
		command = { type = province_manpower which = 991   value = 0 } #Granada 1+1 = 2
		command = { type = province_manpower which = 956   value = 2 } #Gijon 2
		command = { type = province_manpower which = 980   value = 2 } #Cuenca 2
		command = { type = province_manpower which = 983   value = 2 } #Albacate 2
		command = { type = province_manpower which = 971   value = 1 } #Tortosa 1
		command = { type = province_manpower which = 997   value = 1 } #Palma 1	
		command = { type = province_manpower which = 1019  value = 1 } #Las Palmas 1
		command = { type = province_manpower which = 952   value = 1 } #Huesca 1
		command = { type = province_manpower which = 1009  value = 0 } #Ceuta 0
		command = { type = province_manpower which = 977   value = 1 } #Badajoz 1
		command = { type = sleepevent  which = 802235 }	#Nationalist Spain Mobilizes (Secret)			
	}
}

########################################################
# 802235 (SPA) Nationalist Spain Mobilizes (Secret) (Andris)
########################################################

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

	trigger = { 
		
		event = 802231  
		NOT = { event = 802232 } #Nationalist Spain Mobilizes (Regular)

		OR = {
			AND = {
				event = 1500005 	# Human UK
				NOT = { garrison = { country = ENG province = 989 size = 6 } } #Gibraltar
			}			
			AND = {
				NOT = {event = 1500005 } # AI UK
				NOT = { garrison = { country = ENG province = 989 size = 4 } } #Gibraltar
			}			
		}

		random = 50
		
	} 

	name = "Complete Mobilization (Stealth)"
	desc = "Following the devastations of the Spanish Civil War, the country had only just started to recover in 1939 when World War II started in Europe. However, with England on its own and distracted, the opportunity to recapture Gibraltar was too great to pass up, so the new Spanish government began to prepare to fight on the Axis side."
	style = 0

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

	action_a = {
		name = "OK"

		#Andris: Nationalist Spain can access ~87% of original 1936 MP (60/69 MP)
		command = { type = province_manpower which = 996   value = 4 } #Cartagena 1+4 = 5
		command = { type = province_manpower which = 972   value = 3 } #Madrid 2+1+3 = 6
		command = { type = province_manpower which = 969   value = 2 } #Barcelona 2+1+2 = 5
		command = { type = province_manpower which = 981   value = 3 } #Valencia 1+1+3 = 5
		command = { type = province_manpower which = 988   value = 2 } #Sevilla* 1+2 = 3
		command = { type = province_manpower which = 967   value = 1 } #Zaragoza 1+1+1 = 3 
		command = { type = province_manpower which = 987   value = 1 } #Cordoba* 1+1 =2
 		command = { type = province_manpower which = 957   value = 0 } #Burgos 2+1 = 3
		command = { type = province_manpower which = 954   value = 1 } #Bilbao* 1+1 = 2
		command = { type = province_manpower which = 995   value = 2 } #Almeria 1+2 =3
		command = { type = province_manpower which = 959   value = 0 } #Vigo 1+1 = 2
		command = { type = province_manpower which = 966   value = 0 } #Valladolid 1+1 = 2
		command = { type = province_manpower which = 978   value = 0 } #Salamanca 1+1 = 2
		command = { type = province_manpower which = 953   value = 0 } #Pamplona 1+1 = 2
		command = { type = province_manpower which = 990   value = 1 } #Malaga* 1
		command = { type = province_manpower which = 970   value = 1 } #Lleida 1
		command = { type = province_manpower which = 991   value = 0 } #Granada 1+1 = 2
		command = { type = province_manpower which = 956   value = 2 } #Gijon 2
		command = { type = province_manpower which = 980   value = 2 } #Cuenca 2
		command = { type = province_manpower which = 983   value = 2 } #Albacate 2
		command = { type = province_manpower which = 971   value = 1 } #Tortosa 1
		command = { type = province_manpower which = 997   value = 1 } #Palma 1	
		command = { type = province_manpower which = 1019  value = 1 } #Las Palmas 1
		command = { type = province_manpower which = 952   value = 1 } #Huesca 1
		command = { type = province_manpower which = 1009  value = 0 } #Ceuta 0
		command = { type = province_manpower which = 977   value = 1 } #Badajoz 1
		command = { type = sleepevent  which = 802232 }	#Nationalist Spain Mobilizes (Regular)	
	}
}

#########################################################
# Nationalist Spain (AI Only) minister events
#########################################################

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

	trigger = {
		ai = yes
		event = 802101 # Nationalist Spain General Offensive
		
		#SPA controls more than 65% of SPR's VP, or SPR annexed
		OR = {
			lost_VP = { country = SPR value = 65 } 
			NOT = { exists = SPR }
		}
	}

	name = AI_EVENT 
	desc = ""
	style = 0 

	date = { day = 3 month = january year = 1937 }
	offset = 3 
	deathdate = { day = 30 month = december year = 1939 } 

	action_a = { 
		command = { type = ministerofintelligence which = 10074 } 	# José Ungría Jímenez
		} 
}

event = {
	id = 802502
	random = no
	country = SPA
	
	
	trigger = { 
		ai = yes
		event = 802031 #General Emilio Mola Vidal dies
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 3 month = january year = 1938 }
	
	action_a = {
		command = { type = chiefofarmy which = 10084 } 			# José Enrique Varela Iglesias
		}
}

event = {
	id = 802503
	random = no
	country = SPA
	
	
	trigger = { 
		ai = yes
		event = 802030 #Generalissimo Franco Named Head of State (Historical)
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = february year = 1938 }
	
	action_a = {

		command = { type = sleepminister which = 10061 }		# Manuel Hedilla Larrey
		command = { type = ministerofsecurity which = 10065 } 		# Ramon Serrano Suñer
		command = { type = armamentminister which = 10048 } 		# Juan March Ordinas
		}
}

###########################################################################################################
# Nationalist Spain (AI only) Ahistorical path, if General Sanjurjo survives and remains Head of State 
###########################################################################################################

event = {
	id = 802603
	random = no
	country = SPA
	
	
	trigger = { 
		ai = yes
		headofstate = 10032 #José Sanjurjo Sacanell (Ahistorical)

		NOT = { event = 802028 } #General José Sanjurjo Sacanell does NOT die 
		NOT = { event = 802030 } #Generalissimo Franco NOT named Head of State
			
 	}

	name = "Remove Franco's Advisors from power (Ahistorical)"
	desc = ""
	style = 0

	date = { day = 1 month = february year = 1938 }
	
	action_a = {

		command = { type = sleepminister which = 10047 }		# Nicolás Franco Bahamonde
		command = { type = sleepminister which = 10064 }		# Nicolás Franco Bahamonde
		command = { type = sleepminister which = 10065 } 		# Ramon Serrano Suñer
		command = { type = armamentminister which = 10048 } 		# Juan March Ordinas
		}
}


#Hendaya meeting-SPA decides its participation in WWII (Ahistorical, full alliance w/Germany)

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

	trigger = {
		#German victory in Western Europe
		control = { province = 552 data = GER } # Brussels
		control = { province = 553 data = GER } # Luxembourg
		control = { province = 527 data = GER } # Paris
		control = { province = 948 data = GER } # Bordeaux
		control = { province = 950 data = GER } # Bayonne
	
		event = 3002 #SPA gets GER support in SCW
		
		#Either not at war or ONLY at war with Morocco
		OR = {
			atwar = no
			war = { country = SPA country = MOR }
		}

		headofstate = 10032 #José Sanjurjo Sacanell (Ahistorical)
		government = fascist
		
		NOT = {
			exists = SPR
			exists = POL
			alliance = { country = GER country = SPA }
			war = { country = GER country = USA }
		}

	}

	name = CEVTNAME_802010
	desc = CEVTDESC_802010
	style = 0

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

	action_a = { 
		name = CEVTACTB_802010
		command = { type = trigger which = 172036 } # SPA offers to join Axis
		command = { type = sleepevent  which = 802010 } # Hendaya meeting (historical)
	}
	action_b = { 
		name = CEVTACTA_802010
		command = { type = manpowerpool value = -25 } 
		command = { type = supplies value = -100 }
		command = { type = coalpool value = -1000 } # GER control of Wolframium mines
		command = { type = steelpool value = -1000 }
		command = { type = trigger which = 172035 } #Blue Division only
		command = { type = alignment which = fascist value = -5 }
		command = { type = sleepevent  which = 802010 } # Hendaya meeting (historical)
	}
	action_c = { 
		name = CEVTACTC_802010
		command = { type = influence value = -10 }
		command = { type = alignment which = fascist value = -10 }
		command = { type = sleepevent  which = 802010 } # Hendaya meeting (historical)
	}
}