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

#########################################################################
#  Spanish Civil War - Fascist Nation
#########################################################################
event = {
	id = 3001
	random = no
	country = SPA

	trigger = {
		event = 3100
		#event = 3107
	}

	name = "EVT_3001_NAME"
	desc = "EVT_3001_DESC"
	style = 0
	picture = "SPA_fascist"

	date = { day = 17 month = july year = 1936 }
#	date = { day = 11 month = january year = 1936 }
#	offset = 3
#	deathdate = { day = 30 month = december year = 1963 }

	action_a = {
		name = "OK" # Anarchism and Communism must fall!

		command = { type = set_domestic which = democratic value = 2 }
		command = { type = set_domestic which = political_left value = 3 }

		command = { type = headofstate which = 10001 }
		command = { type = headofgovernment which = 10002 }
		command = { type = foreignminister which = 10003 }
		command = { type = armamentminister which = 10004 }
		command = { type = ministerofsecurity which = 10005 }
		command = { type = ministerofintelligence which = 10006 }
		command = { type = chiefofstaff which = 10007 }
		command = { type = chiefofarmy which = 10008 }
		command = { type = chiefofnavy which = 10009 }
		command = { type = chiefofair which = 10010 }

		command = { type = sleepleader which = 3460 }	#Sanjurjo
		command = { type = sleepminister which = 10188 } #José Sanjurjo as CoS
		#command = { type = sleepminister which = 10279 } #José Sanjurjo as HoS
		#command = { type = sleepminister which = 10281 } #José Sanjurjo as HoG
		#command = { type = sleepminister which = 10211 } #José Sanjurjo as CoA

		command = { type = supplies value = 5000 }
		command = { type = oilpool value = 25000 }
		command = { type = metalpool value = 25000 }
		command = { type = energypool value = 50000 }
		command = { type = rarematerialspool value = 25000 }

		#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 = add_division which = "1a Milicia Falangista" value = militia when = 0 }
		command = { type = add_division which = "2a Milicia Falangista" value = militia when = 0 }
		command = { type = add_division which = "Brigadas Navarras" value = militia when = 0 }
		command = { type = add_corps which = "Tropas de África" value = land when = 3422 where = 347 } #Seville
		command = { type = add_division which = "Regulares Marroquíes" value = infantry when = 0 }
		command = { type = add_division value = militia }
		command = { type = add_division value = militia }
		command = { type = add_division value = militia }
		command = { type = add_division value = militia }
		command = { type = add_division value = militia }
		command = { type = convoy which = 334 value = 347 when = 16 } #Supplies to Seville
		command = { type = add_division value = transport when = 0 }
		command = { type = add_division value = transport when = 0 }
		command = { type = manpowerpool value = 500 }
		
		command = { type = sleepleader which = 3413 }
		command = { type = sleepleader which = 3416 }
		command = { type = sleepleader which = 3427 }
		command = { type = sleepleader which = 3455 }
		command = { type = sleepleader which = 3466 }
		command = { type = sleepleader which = 3492 }
		command = { type = sleepleader which = 3493 }
		command = { type = sleepleader which = 3494 }
	}
}


#########################################################################
#  Spanish Civil War - German Intervention
#########################################################################
event = {
	id = 3002
	random = no
	country = SPA

	# Triggered by GER 2023

	name = "EVT_3002_NAME"
	desc = "EVT_3002_DESC"
	style = 0
	picture = "SCW_German Intervention"

	action_a = {
		name = "OK" # Great!
		command = { type = supplies value = 5000 }
		command = { type = wakeleader which = 3466 }
		command = { type = wakeleader which = 3492 }
		command = { type = wakeleader which = 3493 }
		command = { type = wakeleader which = 3494 }
		command = { type = add_corps which = "Legión Cóndor" value = air when = 3493 where = 334 } 
		command = { type = add_division which = "Bombarderos Legión Cóndor" value = tactical_bomber when = 2 }
		command = { type = add_division which = "Cazas Legión Cóndor" value = interceptor when = 1 }
		command = { type = add_corps which = "Legión Cóndor" value = land when = 3466 where = 333 } 
		command = { type = add_division which = "Blindada Legión Cóndor" value = armor when = 1 }
		command = { type = transport_pool which = SPA value = 25 } 	# New for Armageddon 1.3
	   	command = { type = gain_tech which = 1020 } #36 inf	
        	command = { type = gain_tech which = 9020 } #Flying circus doc
       		command = { type = steal_tech which = GER }
	    	command = { type = steal_tech which = GER }
	}
}
#########################################################################
#  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
	picture = "SCW_Italian Intervention"

	action_a = {
		name = "OK" # Great!
		command = { type = manpowerpool value = 10 }
		command = { type = supplies value = 5000 }
		command = { type = wakeleader which = 3413 }
		command = { type = wakeleader which = 3416 }
		command = { type = wakeleader which = 3427 }
		command = { type = wakeleader which = 3455 }
		command = { type = add_division value = destroyer when = 0 }
		command = { type = add_division value = submarine when = 1 }
		command = { type = add_corps which = "Corpo Truppe Voluntario" value = land when = 3427 where = 333 }
		command = { type = add_division which = "Littorio" value = light_armor when = 0 }
		command = { type = add_division which = "Dio lo Vuole" value = infantry when = 1 }
		command = { type = add_division which = "Fiamme Nere" value = infantry when = 1 }
		command = { type = add_division which = "Penne Nere" value = infantry when = 1 }
		command = { type = add_corps which = "Aviación Legionaria" value = air when = 1 where = 334 } 
		command = { type = add_division which = "Bombarderos Aviación Legionaria" value = naval_bomber when = 0 }
		command = { type = add_division which = "Cazas Aviación Legionaria" value = interceptor when = 0 }
		command = { type = transport_pool which = SPA value = 25 } 	# New for Armageddon 1.3
	    	command = { type = gain_tech which = 2320 } #Early field arty
        	command = { type = steal_tech which = ITA }
#		command = { type = province_keypoints which = -1 value = 1 }
#		command = { type = province_keypoints which = -1 value = 1 }

	}
}
#########################################################################
#  Spanish Civil War - Victory!!!
#########################################################################
event = {
	id = 3004
	random = no
	country = SPA

	trigger = {
		owned = { province = 341 data = SPA }
		NOT = { 
			exists = SPR 
			event = 3108 
			}
	}

	name = "EVT_3004_NAME"
	desc = "EVT_3004_DESC"
	style = 0
	picture = "SPA_Victory"
	
	date = { day = 18 month = july year = 1936 }
	offset = 5
	deathdate = { day = 30 month = december year = 1963 }


	action_a = {
		name = "OK" # Great!
		command = { type = capital which = 341 }
		command = { type = set_domestic which = democratic value = 3 } 
		command = { type = set_domestic which = political_left value = 4 }
		command = { type = headofstate which = 10032 }
		command = { type = headofgovernment which = 10046 }
		command = { type = foreignminister which = 10057 }
		command = { type = armamentminister which = 10090 }
		command = { type = ministerofsecurity which = 10129 }
		command = { type = ministerofintelligence which = 10162 }
		command = { type = chiefofstaff which = 10183 }
		command = { type = chiefofarmy which = 10206 }
		command = { type = chiefofnavy which = 10230 }

		command = { type = belligerence which = SPA value = -10 }
		command = { type = remove_division which = "Bombarderos Legión Cóndor" value = SPA }
		command = { type = remove_division which = "Cazas Legión Cóndor" value = SPA }
		command = { type = remove_division which = "Blindada Legión Cóndor" value = SPA }
		command = { type = remove_division which = "Littorio" value = SPA }
		command = { type = remove_division which = "Dio lo Vuole" value = SPA }
		command = { type = remove_division which = "Fiamme Nere" value = SPA }
		command = { type = remove_division which = "Penne Nere" value = SPA }
		command = { type = remove_division which = "Bombarderos Aviación Legionaria" value = SPA }
		command = { type = remove_division which = "Cazas Aviación Legionaria" value = SPA }

		# New for Armageddon 1.3 removing any surviving "Soviet" Units SPA recive through Anneks of SPR 
		command = { type = remove_division which = "Carros Soviéticos" value = SPA }	
		command = { type = remove_division which = "Brigadas Internacionales" value = SPA }
		command = { type = remove_division which = "Cazas soviéticos" value = SPA }
		command = { type = remove_division which = "Katiuskas soviéticos" value = SPA }
		# New for Armageddon 1.3 removing the communist and anarchist militias if SPA gets them, when they anneks SPR.
		command = { type = remove_division which = "Milicias POUM" value = SPA }
		command = { type = remove_division which = "Milicias CNT" value = SPA }
		# New for Armageddon 1.3 Remove GER & ITA logistic support
		command = { type = transport_pool which = SPA value = -50 } # New for Armageddon 1.3

		command = { type = sleepleader which = 3413 }
		command = { type = sleepleader which = 3416 }
		command = { type = sleepleader which = 3427 }
		command = { type = sleepleader which = 3455 }
		command = { type = sleepleader which = 3466 }
		command = { type = sleepleader which = 3492 }
		command = { type = sleepleader which = 3493 }
		command = { type = sleepleader which = 3494 }

		Command = { type = sleepevent which = 3108 } # Repuplican SCW win event
		Command = { type = sleepevent which = 2662 } # USSR SCW Victory event
		Command = { type = sleepevent which = 2803 } # France SCW Victory event
		Command = { type = sleepevent which = 3901 } # UK SCW Victory event		
	}

}
