SPD_alternate_plan = {
	name = "Spanish Democratic alternate plan"
	desc = "Alternate behavior for Democratic Spain" # Actually smart!

	allowed = {
		original_tag = SPR
	}
	enable = {
		OR = {
			tag = SPR
			tag = SPD
		}
		OR = {
			has_country_flag = SPR_AI_RANDOM_SECOND_REPUBLIC
			has_game_rule = {
				rule = SPR_ai_behavior 
				option = SECOND_REPUBLIC
			}
		}
	}
	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_petition_for_french_aid
		SPR_reaffirm_the_popular_front_strategy
		SPR_anti_fascist_unity
		SPR_strengthen_the_euzko_gudarostea
		SPR_fortify_the_iron_ring
		SPR_crush_the_revolution
		SPR_relocate_the_gold_reserves
		SPR_ensure_loyalty
		SPR_enlist_the_carabineros
		SPR_the_popular_army
		SPR_no_pasaran
		SPR_take_the_initiative
		SPR_a_frontline_suited_for_intellectuals
		SPR_expand_soviet_aid
		SPR_soviet_equipment_shipments
		SPR_soviet_military_advisors
		SPR_soviet_industrial_aid
		SPR_soviet_technological_advancements
		SPR_strengthen_the_anti_fascist_coalition
		SPR_oppose_the_communists
		SPR_fortify_the_central_government
		SPR_soviet_recovery_aid
		SPR_secure_democratic_principles
		SPR_stabilize_the_nation
		SPR_restore_higher_education
		SPR_engineering_advances
		SPR_reprofessionalize_the_military
		SPR_experiences_from_the_civil_war
		SPR_a_new_military_academy
		SPR_subvert_soviet_control
		SPR_war_of_independence
	}

	focus_factors = {
		SPR_against_fascism = 0
		SPR_join_the_global_fight_against_fascism = 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_alternate_plan_2 = {
	name = "Spanish Stalinist alternate plan"
	desc = "Alternate behavior for Stalinist Spain"

	allowed = {
		original_tag = SPR
	}
	enable = {
		OR = {
			tag = SPD
			tag = SPR
		}
		OR = {
			has_country_flag = SPR_AI_RANDOM_STALINIST
			has_game_rule = {
				rule = SPR_ai_behavior 
				option = STALINIST
			}
		}
	}
	abort = {
		has_global_flag = SOV_covert_support_for_poum_flag #Soviet Right Opposition is providing support to the POUM
		NOT = { has_completed_focus = SPR_the_stalinist_doctrine }
	}

	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_the_anti_fascist_workers_revolution
		SPR_strengthen_the_euzko_gudarostea
		SPR_fortify_the_iron_ring
		SPR_arm_the_workers_militias
		SPR_demand_ministerial_positions
		SPR_the_stalinist_doctrine
		SPR_reaffirm_the_popular_front_strategy
		SPR_crush_the_revolution
		SPR_international_brigades
		SPR_relocate_the_gold_reserves
		SPR_expand_soviet_aid
		SPR_soviet_equipment_shipments
		SPR_soviet_military_advisors
		SPR_soviet_industrial_aid
		SPR_soviet_technological_advancements
		SPR_strengthen_the_anti_fascist_coalition
		SPR_an_army_of_all_classes
		SPR_secularize_the_new_state
		SPR_appropriate_church_riches
		SPR_invite_socialist_intellectuals
		SPR_solidify_government_control
		SPR_reeducate_the_bourgeoisie
		SPR_soviet_recovery_aid
		SPR_provide_for_the_people
		SPR_collectivize_industry
		SPR_connect_the_country
		SPR_transplant_soviet_industry
		SPR_the_five_year_plan
		SPR_nationalize_the_industry
		SPR_beacon_of_socialism
		SPR_the_spanish_red_army
		SPR_red_bulwark_in_the_west
		SPR_appeal_for_increased_autonomy
		SPR_modernize_the_armed_forces
		SPR_a_red_iberia
		SPR_support_french_communists
	}

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

}