SPD_historical_plan = {
	name = "Spanish Democratic historical plan"
	desc = "Historical behavior for Democratic Spain"

	allowed = {
		original_tag = SPR
	}
	enable = {
		tag = SPD
		SOV = { is_ai = no }
		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 = {
		has_global_flag = SOV_covert_support_for_poum_flag #Soviet Right Opposition is providing support to the POUM
		NOT = { has_completed_focus = SPR_maintain_the_second_republic }
	}

	ai_national_focuses = {
		SPR_the_popular_front
		SPR_secure_the_guardia_de_asalto
		SPR_train_the_union_youth
		SPR_enlarge_the_weapon_caches
		SPR_distribute_arms_to_the_people
		SPR_disband_the_army
		SPR_maintain_the_second_republic
		SPR_new_leadership
		SPR_the_future_of_the_republic
		SPR_reaffirm_the_popular_front_strategy
		SPR_relocate_the_gold_reserves


		SPR_ensure_loyalty
		SPR_enlist_the_carabineros
		SPR_the_popular_army
		SPR_take_the_initiative
		SPR_no_pasaran
		SPR_strengthen_the_anti_fascist_coalition
		SPR_a_frontline_suited_for_intellectuals
		SPR_end_fascism_at_all_costs
	}

	focus_factors = {
		SPR_against_fascism = 0
		SPR_join_the_global_fight_against_fascism = 0
		SPR_appeal_for_increased_autonomy = 0
		SPR_expand_soviet_aid = 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
		}
	}

}

SPD_historical_plan_b = {
	name = "Spanish Democratic historical plan"
	desc = "Historical behavior for Democratic Spain"

	allowed = {
		original_tag = SPR
	}
	enable = {
		tag = SPD
		SOV = { is_ai = yes }
		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 = {
		has_global_flag = SOV_covert_support_for_poum_flag #Soviet Right Opposition is providing support to the POUM
		NOT = { has_completed_focus = SPR_maintain_the_second_republic }
	}

	ai_national_focuses = {
		SPR_the_popular_front
		SPR_secure_the_guardia_de_asalto
		SPR_train_the_union_youth
		SPR_enlarge_the_weapon_caches
		SPR_distribute_arms_to_the_people
		SPR_disband_the_army
		SPR_maintain_the_second_republic		
		SPR_strengthen_the_euzko_gudarostea
		SPR_new_leadership
		SPR_the_future_of_the_republic
		SPR_reaffirm_the_popular_front_strategy
		SPR_anti_fascist_unity
		SPR_enlist_the_carabineros
		SPR_ensure_loyalty
		SPR_the_popular_army

		SPR_crush_the_revolution
		SPR_relocate_the_gold_reserves

		SPR_fortify_the_iron_ring
		SPR_take_the_initiative
		SPR_no_pasaran
		SPR_strengthen_the_anti_fascist_coalition
		SPR_a_frontline_suited_for_intellectuals
		SPR_end_fascism_at_all_costs

		SPR_communists_in_the_government
		SPR_stabilize_the_nation
		SPR_engineering_advances
		SPR_rebuild_the_nation
		SPR_provide_for_the_people
		SPR_connect_the_country
		SPR_collectivize_industry
		SPR_transplant_soviet_industry
		SPR_the_five_year_plan
		SPR_reprofessionalize_the_military
	}

	focus_factors = {
		SPR_against_fascism = 0
		SPR_join_the_global_fight_against_fascism = 0
		SPR_appeal_for_increased_autonomy = 0
	}

	research = {

	}

	ideas = {
		gran_carabinero = 200
	}

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

}