#
# HoI - Nationalist Spain Events
#
#		written by Henrik Fahraeus
#

#########################################################################
#  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 = 1999 }

	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 = sleepminister which = 10279 } #Jos丒Sanjurjo as HoS
		command = { type = sleepminister which = 10281 } #Jos丒Sanjurjo as HoG
		command = { type = sleepminister which = 10188 } #Jos丒Sanjurjo as CoS
		command = { type = sleepminister which = 10211 } #Jos丒Sanjurjo as CoA
		command = { type = sleepleader which = 3460 }	#Sanjurjo

		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 = "戞1僼傽儔儞僿搣堳戉" value = militia when = 0 }
		command = { type = add_division which = "戞2僼傽儔儞僿搣堳戉" value = militia when = 0 }
		command = { type = add_division which = "僫僶儔椃抍" value = militia when = 0 }
		command = { type = add_corps which = "傾僼儕僇孯抍" value = land when = 3422 where = 347 } #Seville
		command = { type = add_division which = "儌儘僢僐惓婯暫晹戉" 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 }
	}
}


#########################################################################
#  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 = add_corps which = "僐儞僪儖孯抍" value = air when = 3493 where = 334 } 
		command = { type = add_division which = "僐儞僪儖孯抍敋寕婡戉" value = tactical_bomber when = 2 }
		command = { type = add_division which = "僐儞僪儖孯抍愴摤婡戉" value = interceptor when = 1 }
		command = { type = add_corps which = "僐儞僪儖孯抍" value = land when = 3466 where = 333 } 
		command = { type = add_division which = "僐儞僪儖孯抍憰峛晹戉" value = armor when = 1 }
		command = { type = transport_pool which = SPA value = 25 }
	   	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 = add_division value = destroyer when = 0 }
		command = { type = add_division value = submarine when = 1 }
		command = { type = add_corps which = "媊桬孯抍" value = land when = 3427 where = 333 }
		command = { type = add_division which = "儕僢僩儕僆晹戉" value = light_armor when = 0 }
		command = { type = add_division which = "僨傿僆丒儘丒償僅乕儗晹戉" value = infantry when = 1 }
		command = { type = add_division which = "僼傿傾儞儊丒僱乕儗晹戉" value = infantry when = 1 }
		command = { type = add_division which = "儁儞僱丒僱乕儗晹戉" value = infantry when = 1 }
		command = { type = add_corps which = "峲嬻孯抍" value = air when = 1 where = 334 } 
		command = { type = add_division which = "峲嬻孯抍敋寕婡戉" value = naval_bomber when = 0 }
		command = { type = add_division which = "峲嬻孯抍愴摤婡戉" value = interceptor when = 0 }
		command = { type = transport_pool which = SPA value = 25 }
	    	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 = 1999 }


	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 = sleepleader which = 3413 }
#		command = { type = sleepleader which = 3416 }
#        	command = { type = sleepleader which = 3427 }
#        	command = { type = sleepleader which = 3466 }
#		command = { type = sleepleader which = 3492 }
#		command = { type = sleepleader which = 3493 }
#		command = { type = sleepleader which = 3494 }

#		command = { type = sleepevent which = 2155 }
#		command = { type = sleepevent which = 2156 }
		command = { type = belligerence which = SPA value = -10 }
		command = { type = remove_division which = "僐儞僪儖孯抍敋寕婡戉" value = SPA }
		command = { type = remove_division which = "僐儞僪儖孯抍愴摤婡戉" value = SPA }
		command = { type = remove_division which = "僐儞僪儖孯抍憰峛晹戉" value = SPA }
		command = { type = remove_division which = "儕僢僩儕僆晹戉" value = SPA }
		command = { type = remove_division which = "僨傿僆丒儘丒償僅乕儗晹戉" value = SPA }
		command = { type = remove_division which = "僼傿傾儞儊丒僱乕儗晹戉" value = SPA }
		command = { type = remove_division which = "儁儞僱丒僱乕儗晹戉" value = SPA }
		command = { type = remove_division which = "峲嬻孯抍敋寕婡戉" value = SPA }
		command = { type = remove_division which = "峲嬻孯抍愴摤婡戉" value = SPA }

		# New Commands removing any surviving "Soviet" Units SPA recive through Anneks of SPR 
		command = { type = remove_division which = "僜價僄僩楢朚幵椉晹戉" value = SPA }	
		command = { type = remove_division which = "崙嵺椃抍" value = SPA }
		command = { type = remove_division which = "僜價僄僩楢朚愴摤婡戉" value = SPA }
		command = { type = remove_division which = "僜價僄僩楢朚敋寕婡戉" value = SPA }
		# New commands removing the communist and anarchist militias if SPA gets them, when they anneks SPR.
		command = { type = remove_division which = "慡崙楯摥幰楢崌媊桬晹戉" value = SPA }
		command = { type = remove_division which = "儅儖僋僗庡媊摑堦楯摥幰搣堳戉" value = SPA }
		# Remove GER & ITA logistic support
		command = { type = transport_pool which = SPA value = -50 }

		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		
	}

}