
#
# HoI - France Events
#
#		written by Henrik Fåhraeus
#

#########################################################################
#  The Vichy Regime
#########################################################################
event = {
	id = 2800
	random = no
	country = FRA

	# Triggered by GER 2021

	name = "EVT_2800_NAME"
	desc = "EVT_2800_DESC"
	style = 0
	picture = "VIC"

	action_a = {
		name = "ACTIONNAME2800A" # We have no choice but to accept
		ai_chance = 97
		command = { type = capital which = 1075 } # Brazzaville
		command = { type = construct which = air_base where = 1075 value = 4 } #Brazzaville
		command = { type = construct which = flak where = 1075 value = 2 } #Brazzaville
		command = { type = independence which = VIC value = 1 }

		# Delete the original French Army and Airforce
		command = { type = delete_unit which = -1 when = 100 }
		command = { type = delete_unit which = -3 when = 100 }

		# French Navy Switch mostly to Vichy
		command = { type = switch_allegiance which = -2 where = VIC when = 90 }


		command = { type = add_corps which = "Troupes d'Afrique Centrale" value = land where = 1075 }  
		command = { type = add_division which = "1ére Division française libre" value = infantry when = 1 }
		command = { type = add_division which = "2e Division française libre" value = infantry when = 1 }
		command = { type = add_division which = "3e Division française libre" value = infantry when = 1 }

		command = { type = secedeprovince which = GER value = 40 }
		command = { type = secedeprovince which = GER value = 41 }
		command = { type = secedeprovince which = GER value = 42 }
		command = { type = secedeprovince which = GER value = 43 }
		command = { type = secedeprovince which = GER value = 44 }
		command = { type = secedeprovince which = GER value = 32 }
		command = { type = secedeprovince which = GER value = 33 }
		command = { type = secedeprovince which = GER value = 34 }
		command = { type = secedeprovince which = GER value = 35 }
		command = { type = secedeprovince which = GER value = 36 }
		command = { type = secedeprovince which = GER value = 37 }
		command = { type = secedeprovince which = GER value = 38 }
		command = { type = secedeprovince which = GER value = 39 }
		command = { type = secedeprovince which = GER value = 70 }
		command = { type = secedeprovince which = GER value = 18 }
		command = { type = secedeprovince which = GER value = 326 }
		command = { type = secedeprovince which = GER value = 364 }
		command = { type = secedeprovince which = GER value = 62 }
		command = { type = secedeprovince which = GER value = 63 }
		command = { type = secedeprovince which = GER value = 64 }
		command = { type = secedeprovince which = GER value = 60 }
		command = { type = secedeprovince which = GER value = 61 }
		command = { type = secedeprovince which = GER value = 53 }
		command = { type = secedeprovince which = GER value = 54 }
		command = { type = secedeprovince which = GER value = 55 }
		command = { type = secedeprovince which = GER value = 325 }
		command = { type = secedeprovince which = GER value = 323 }
		command = { type = secedeprovince which = GER value = 56 }
		command = { type = secedeprovince which = GER value = 57 }
		command = { type = secedeprovince which = GER value = 58 }
		command = { type = secedeprovince which = GER value = 59 }
		command = { type = secedeprovince which = GER value = 317 }
		command = { type = secedeprovince which = GER value = 318 }
		command = { type = secedeprovince which = GER value = 316 }
		command = { type = secedeprovince which = GER value = 72 }
		command = { type = secedeprovince which = GER value = 73 }

		#if italy loses stuff, they should have it back..
		command = { type = control which = ITA value = 525 }
		command = { type = control which = ITA value = 526 }
		command = { type = control which = ITA value = 524 }
		command = { type = control which = ITA value = 523 }
		command = { type = control which = ITA value = 522 }
		command = { type = control which = ITA value = 521 }
		command = { type = control which = ITA value = 520 }
		command = { type = control which = ITA value = 519 }
		command = { type = control which = ITA value = 518 }
		command = { type = control which = ITA value = 517 }
		command = { type = control which = ITA value = 516 }
		command = { type = control which = ITA value = 515 }
		command = { type = control which = ITA value = 513 }
		command = { type = control which = ITA value = 514 } 
		command = { type = control which = ITA value = 512 }
		command = { type = control which = ITA value = 379 }
		command = { type = control which = ITA value = 369 }
		command = { type = control which = ITA value = 368 }
		command = { type = control which = ITA value = 531 }
		command = { type = control which = ITA value = 370 }
		command = { type = control which = ITA value = 378 }
		command = { type = control which = ITA value = 534 }
	
		command = { type = trigger which = 3803 } # Japan might demand Vichy territories
		command = { type = trigger which = 3850 } # Japan might demand Vichy territories - Axis Japan
		#command = { type = sleepevent which = 2103 }

		command = { type = trigger which = 4003 } 

		##Moved ministerial changes to new event with options##
		command = { type = trigger which = 2103 } # Sleeping of leaders & such
		command = { type = trigger which = 970 } #Leadership of Free France
		
	}

	action_b = {
		name = "ACTIONNAME2800B" # Never! Vive la France!
		ai_chance = 3
		command = { type = relation which = ENG value = 15 }
		command = { type = relation which = USA value = 5 }
		command = { type = relation which = SOV value = 10 }
	}
}

#########################################################################
#  Spanish Civil War - Intervention
#########################################################################
event = {
	id = 2801
	random = no
	country = FRA

	trigger = {
		war = { country = SPA country = SPR }
		event = 3100 #SPA fascist nation
		NOT = {
			OR = {
			government = fascist
			alliance = { country = FRA country = SPR }
			war = { country = FRA country = SPR }
			war = { country = FRA country = SOV }
			war = { country = FRA country = ENG }
			war = { country = FRA country = USA }
			war = { country = ENG country = FRA }
			}
		}
	        }

	name = "EVT_2801_NAME"
	desc = "EVT_2801_DESC"
	style = 0
	picture = "SCW_French_Intervention"

	date = { day = 19 month = july year = 1936 }
	offset = 5
	deathdate = { day = 30 month = december year = 1999 }

	action_a = {
		name = "ACTIONNAME2801A" # Why support anarchist rabble?
		ai_chance = 97
		command = { type = dissent value = 10 }
		command = { type = domestic which = interventionism value = -1 }
		command = { type = domestic which = political_left value = -1 }
		command = { type = relation which = SPR value = -20 }
		command = { type = relation which = SPA value = 5 }
		command = { type = relation which = SOV value = -5 }
	}
	action_b = {
		ai_chance = 3
		name = "ACTIONNAME2801B" # Send materiel and volunteers
		command = { type = dissent value = 5 }
		command = { type = money value = -200 }
		command = { type = manpowerpool value = -10 }
		command = { type = resource which = supplies value = -1000 } # % of max daily income
		
		command = { type = trigger which = 3104 } #SPR
		command = { type = trigger which = 3723 } #USA
		command = { type = domestic which = interventionism value = 2 }
		command = { type = relation which = SPR value = 20 }
		command = { type = relation which = SPA value = -15 }
		command = { type = relation which = GER value = -10 }
		command = { type = relation which = ITA value = -5 }
		command	= { type = setflag which = SCW_allied_intervention }
	}
}

#########################################################################
#  Liberation of France-Metropolitain and Africa-not Indochina
#########################################################################
event = {
	id = 2802
	random = no
	country = FRA

	#triggered by GER event

	name = "EVT_2802_NAME"
	desc = "EVT_2802_DESC"
	style = 0
	picture = "Fra_Liberated"

	action_a = {
		name = "OK" # Vive la France!
		command = { type = capital which = 56 }
		command = { type = inherit which = VIC }
		command = { type = dissent value = -100 }
		##Algeria added as cores##
		command = { type = addcore which = 953 } #Algeria
		command = { type = addcore which = 952 } 
		command = { type = addcore which = 970 }
		command = { type = addcore which = 942 }
		command = { type = addcore which = 943 }
		command = { type = addcore which = 944 }
		command = { type = addcore which = 945 }
		command = { type = addcore which = 946 }
		command = { type = addcore which = 947 }
		command = { type = addcore which = 948 }
		command = { type = addcore which = 949 }
		command = { type = addcore which = 950 }
		command = { type = addcore which = 951 }
		command = { type = addcore which = 969 }
		command = { type = addcore which = 970 }
		command = { type = addcore which = 1013 }
		command = { type = addcore which = 1014 }
		command = { type = set_domestic which = democratic value = 8 }
		command = { type = set_domestic which = political_left value = 3 }
		command = { type = domestic which = freedom value = 1 }
		command = { type = headofstate which = 2031 }
		command = { type = headofgovernment which = 2046 }
		command = { type = foreignminister which = 2056 }
		command = { type = armamentminister which = 2089 }
		command = { type = ministerofsecurity which = 2115 }
		command = { type = ministerofintelligence which = 2136 }
		command = { type = chiefofstaff which = 2152 }
		command = { type = chiefofarmy which = 2164 } 
		command = { type = chiefofnavy which = 2178 }
		command = { type = chiefofair which = 2194 }

		command = { type = free_ic value = 0 }
		command = { type = free_energy value = 0 }
		command = { type = free_metal value = 0 }
		command = { type = free_oil value = 0 }
		command = { type = free_rare_materials value = 0 }
	}
}

##################################################  #######################
#  Spanish Civil War ends - An important experience (France)
##################################################  #######################
event = {
	id = 2803
	random = no
	country = FRA

	trigger = {
		# pre-requisites for event to trigger: 
		government = democratic
		flag = SCW_allied_intervention
		NOT = { exists = SPA }
		
		# conditions that prevent event:
		NOT = {
			OR = {
			war = { country = FRA country = SPA }
			war = { country = FRA country = SPR }
			war = { country = FRA country = SOV }
			war = { country = FRA country = GER }
			war = { country = FRA country = ENG }
			war = { country = FRA country = ITA }
			}
		}
	}

	name = "EVT_2803_NAME"
	desc = "EVT_2803_DESC"
	style = 0
	#picture = "InternationalBrigadesPoster"

	date = { day = 18 month = july year = 1936 }
	offset = 5
	deathdate = { day = 30 month = december year = 1999 }

	action_a = {
		name = "ACTIONNAME2803A" # Great! 
		command = { type = relation which = SPR value = 10 }	# 
		command = { type = manpowerpool value = 5 }	 	# Soldiers return home
		command = { type = dissent value = -1 }
		command = { type = gain_tech which = -1 } 		# get random tech blueprints
	}
}

##############################################################################
# German or Italian direct intervention in Spanish Civil War - French Reaction
##############################################################################

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

	trigger = {
		flag = Axis_SCW_Invasion
	}

	name = "EVT_2804_NAME"
	desc = "EVT_2804_DESC"
	style = 0

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

	action_a = {
		
		name = "EVT_2804_ACTION_A"
		command = { type = domestic which = defense_lobby value = 1 }
		command = { type = domestic which = interventionism value = 1 }

	}
}

#########################################################################
#  Flanking the Maginot Line
#########################################################################
event = { 
	id = 2789
	random = no
	country = FRA

	
	name = "EVT_2789_NAME"
	desc = "EVT_2789_DESC"
	style = 0
	picture = "fort_sabotaged"

	trigger = {
		NOT = {
			control = { province = 64 data = FRA } # Reims
			control = { province = 317 data = FRA } # Chaumont
			control = { province = 63 data = FRA } # Troyes
			control = { province = 53 data = FRA } # Valenciennes
			control = { province = 55 data = FRA } # Compiègne
			exists = VIC
		}
	}

	date = { day = 2 month = january year = 1936 }
	offset = 2 # Check for trigger conditions day
	deathdate = { day = 30 month = december year = 1940 }

	action_a = {
		name = "EVT_2789_ACTA" #
		command = { type = construct which = land_fort where = 72 value = -7 }
		command = { type = construct which = land_fort where = 73 value = -7 }
		command = { type = construct which = land_fort where = 316 value = -7 }
	}
}

