SPR_historical_plan = {
	name = "Spanish historical plan"
	desc = "Historical behavior for Nationalist Spain"

	allowed = {
		original_tag = SPR
	}
	enable = {
		OR = {
			tag = SPR
			tag = SPA
		}
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = SPR_ai_behavior 
					option = DEFAULT
				}
			}
			has_country_flag = SPR_AI_RANDOM_NATIONALIST_HISTORICAL
			has_game_rule = {
				rule = SPR_ai_behavior 
				option = NATIONALIST_HISTORICAL
			}
		}
	}
	abort = {
		OR = {
			tag = SPD
			tag = SPC
			OR = {
				has_war_with = ENG
				has_war_with = GER
			}
		}
		
	}

	ai_national_focuses = {
		#1936
		SPA_a_great_spain
		SPA_hand_over_the_ceda_campaign_chest	
		SPA_negotiate_carlist_support
		SPA_the_army_of_africa
		SPA_secure_the_northern_garrisons
		SPA_foment_a_carlist_split
		SPA_con_paquito
		SPA_unify_the_nationalist_front
		SPA_save_the_alcazar #35
		SPA_the_condor_legion #35
		SPA_caudillo_of_spain #35
		SPA_martyrdom_for_primo_de_rivera #35

		#1937
		SPA_the_corpo_truppe_volontarie #35
		SPA_consolidate_the_north
		SPA_foment_a_carlist_split
		SPA_extol_the_martyrs_of_the_war
		SPA_banish_the_party_leaders
		SPA_fuse_the_parties #35
		SPA_a_methodical_approach #35
		SPA_portuguese_aid #35

		#1938
		SPA_tackle_the_vulnerable_fronts #35
		SPA_safeguard_the_freedom_of_worship
		SPA_expand_conscription
		SPA_integrate_the_requetes
		SPA_national_recovery

		#1939
		SPA_adopt_the_26_points
		SPA_autarky
		SPA_prepare_the_pyrenees_defenses
		SPA_dictator_for_life
		SPA_direct_the_universities
		SPA_stamp_out_the_maquis

		#1940
		SPA_the_national_and_popular_army_of_spain
		SPA_the_army_of_africa_model
		SPA_the_tangiers_enclave
		SPA_equipment_modernization
		SPA_artillery_modernization
		SPA_motorization
		SPA_reduce_reliance_on_foreign_resources
		SPA_invest_in_naval_infrastructure

		#1941
		SPA_la_division_azul #35
		SPA_expand_the_slipways
		SPA_restart_small_scale_shipbuilding
		SPA_the_plan_imperial
		SPA_defenses_against_strategic_bombing
		

	}

	focus_factors = {
		SPA_the_iberian_pact = 0
	}

	research = {

	}

	ideas = {

	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

}

SPR_historical_plan_war_with_allies = {
	name = "Spanish anti-Allied historical plan"
	desc = "Historical behavior for Nationalist Spain at war with the Allies"

	allowed = {
		original_tag = SPR
	}
	enable = {
		OR = {
			tag = SPR
			tag = SPA
		}
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = SPR_ai_behavior 
					option = DEFAULT
				}
			}
			has_country_flag = SPR_AI_RANDOM_NATIONALIST_HISTORICAL
			has_game_rule = {
				rule = SPR_ai_behavior 
				option = NATIONALIST_HISTORICAL
			}
		}
		OR = {
			has_war_with = ENG
			has_war_with = USA
		}
		NOT = { has_war_with = GER }
	}
	abort = {
		OR = {
			AND = {
				NOT = { tag = SPR }
				NOT = { tag = SPA }
			}
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = SPR_ai_behavior 
					option = DEFAULT
				}
			}
			has_war_with = GER
		}
		
	}

	ai_national_focuses = {
		SPA_join_the_axis
		SPA_fascist_economic_aid
		SPA_facilitate_pyrenees_freight_transports
		SPA_improve_cross_country_railways
		SPA_support_the_war_industry
		SPA_expand_the_war_industry
		SPA_the_duty_to_work
		SPA_a_great_spain
		SPA_hand_over_the_ceda_campaign_chest	
		SPA_negotiate_carlist_support
		SPA_the_army_of_africa
		SPA_secure_the_northern_garrisons
		SPA_foment_a_carlist_split
		SPA_con_paquito
		SPA_unify_the_nationalist_front
		SPA_consolidate_the_north
		SPA_save_the_alcazar
		SPA_martyrdom_for_primo_de_rivera
		SPA_caudillo_of_spain
		SPA_extol_the_martyrs_of_the_war
		SPA_banish_the_party_leaders
		SPA_safeguard_the_freedom_of_worship
		SPA_fuse_the_parties
		SPA_a_methodical_approach
		SPA_portuguese_aid
		SPA_tackle_the_vulnerable_fronts
		SPA_expand_conscription
		SPA_integrate_the_requetes
		SPA_the_iberian_pact
		SPA_national_recovery
		SPA_adopt_the_26_points
		SPA_prepare_the_pyrenees_defenses
		SPA_direct_the_universities
		SPA_dictator_for_life
		SPA_la_division_azul
		SPA_stamp_out_the_maquis
		SPA_the_tangiers_enclave
		SPA_the_national_and_popular_army_of_spain
		SPA_the_army_of_africa_model
		SPA_equipment_modernization
		SPA_motorization
		SPA_an_armored_corps
		SPA_invest_in_naval_infrastructure
		SPA_expand_the_slipways
		SPA_la_division_azul
		SPA_the_tangiers_enclave
		SPA_restart_small_scale_shipbuilding
		SPA_the_plan_imperial
		SPA_artillery_modernization
		SPA_defenses_against_strategic_bombing
		SPA_defenses_against_invasion
	}

	research = {

	}

	ideas = {

	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

}

SPR_historical_plan_war_with_axis = {
	name = "Spanish anti-Axis historical plan"
	desc = "Historical behavior for Nationalist Spain at war with the Axis"

	allowed = {
		original_tag = SPR
	}
	enable = {
		OR = {
			tag = SPR
			tag = SPA
		}
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = SPR_ai_behavior 
					option = DEFAULT
				}
			}
			has_country_flag = SPR_AI_RANDOM_NATIONALIST_HISTORICAL
			has_game_rule = {
				rule = SPR_ai_behavior 
				option = NATIONALIST_HISTORICAL
			}
		}
		OR = {
			has_war_with = GER
			has_war_with = ITA
		}
		NOT = {
			has_war_with = ENG
			has_war_with = USA
		}
	}
	abort = {
		OR = {
			AND = {
				NOT = { tag = SPR }
				NOT = { tag = SPA }
			}
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = SPR_ai_behavior 
					option = DEFAULT
				}
			}
			OR = {
				has_war_with = ENG
				has_war_with = USA
			}
		}
	}

	ai_national_focuses = {
		SPA_join_the_allies
		SPA_the_stabilization_plan
		SPA_expand_spanish_bases
		SPA_capitalist_economic_aid
		SPA_improve_living_standards
		SPA_domestic_industrial_developments
		SPA_the_spanish_miracle
		SPA_a_great_spain
		SPA_hand_over_the_ceda_campaign_chest	
		SPA_negotiate_carlist_support
		SPA_the_army_of_africa
		SPA_secure_the_northern_garrisons
		SPA_foment_a_carlist_split
		SPA_con_paquito
		SPA_unify_the_nationalist_front
		SPA_consolidate_the_north
		SPA_save_the_alcazar
		SPA_martyrdom_for_primo_de_rivera
		SPA_caudillo_of_spain
		SPA_consolidate_the_north
		SPA_extol_the_martyrs_of_the_war
		SPA_banish_the_party_leaders
		SPA_safeguard_the_freedom_of_worship
		SPA_fuse_the_parties
		SPA_a_methodical_approach
		SPA_portuguese_aid
		SPA_tackle_the_vulnerable_fronts
		SPA_expand_conscription
		SPA_integrate_the_requetes
		SPA_the_iberian_pact
		SPA_national_recovery
		SPA_adopt_the_26_points
		SPA_prepare_the_pyrenees_defenses
		SPA_autarky
		SPA_spanish_austerity
		SPA_direct_the_universities
		SPA_dictator_for_life
		SPA_la_division_azul
		SPA_stamp_out_the_maquis
		SPA_the_tangiers_enclave
		SPA_the_national_and_popular_army_of_spain
		SPA_the_army_of_africa_model
		SPA_equipment_modernization
		SPA_motorization
		SPA_reduce_reliance_on_foreign_resources
		SPA_invest_in_naval_infrastructure
		SPA_expand_the_slipways
		SPA_restart_small_scale_shipbuilding
		SPA_the_plan_imperial
		SPA_artillery_modernization
		SPA_defenses_against_strategic_bombing
		SPA_defenses_against_invasion
	}

	research = {

	}

	ideas = {

	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

}