
claims_on_poland = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		has_completed_focus = SOV_claims_on_poland
		country_exists = POL
	}
	abort = {
		NOT = {
			country_exists = POL
		}
	}

	ai_strategy = {
		type = antagonize
		id = "POL"
		value = 200
	}
}

claims_on_finland = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		has_completed_focus = SOV_secure_leningrad
		country_exists = FIN
		NOT = { controls_state = 146 } #Karelija
		date > 1940.8.1
	}
	abort = {
		OR = {
			NOT = {
				country_exists = FIN
			}
			FIN = {
				has_government = ROOT
			}
			controls_state = 146 #Karelija
		}
	}

	ai_strategy = {
		type = antagonize
		id = "FIN"
		value = 200
	}
}

claims_on_sinkiang = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		has_completed_focus = SOV_spheres_of_influence_in_china
		country_exists = CHI
	}
	abort = {
		NOT = {
			country_exists = CHI
		}
	}

	ai_strategy = {
		type = antagonize
		id = "CHI"
		value = 200
	}
}

japan_ally = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		has_completed_focus = SOV_reconcile_japan
		country_exists = JAP
	}
	abort = {
		NOT = { country_exists = JAP }
	}

	ai_strategy = {
		type = befriend
		id = "JAP"
		value = 200
	}
	ai_strategy = {
		type = alliance
		id = "JAP"
		value = 200
	}
}

germany_ally = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		OR = {
			has_completed_focus = SOV_anti_capitalist_policies
			GER = { has_completed_focus = GER_alliance_with_the_ussr }
		}
		country_exists = GER
	}
	abort = {
		NOT = { country_exists = GER }
	}

	ai_strategy = {
		type = befriend
		id = "GER"
		value = 200
	}
	ai_strategy = {
		type = alliance
		id = "GER"
		value = 200
	}
}

germany_enemy = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		has_completed_focus = SOV_anti_fascist_policies
		country_exists = GER
		OR = {
			date > 1942.1.1
			has_war_with = GER
		}
	}
	abort = {
		NOT = { country_exists = GER }
	}

	ai_strategy = {
		type = antagonize
		id = "GER"
		value = 200
	}
}

spanish_civil_war_SOV = {
	allowed = {
		original_tag = SOV
		NOT = { has_dlc = "La Resistance" }
	}
	enable = {
		has_government = communism
		has_global_flag = spanish_civil_war
		NOT = { has_global_flag = scw_over }
	}

	abort = {
		OR = {
			SPR = { has_civil_war = no }
			has_global_flag = scw_over
		}
	}

	ai_strategy = {
		type = befriend
		id = "SPR"
		value = 100
	}
}

spanish_civil_war_SOV_resistance = {
	allowed = {
		original_tag = SOV
		has_dlc = "La Resistance"
	}
	enable = {
		has_government = communism
		country_exists = SPD
		has_global_flag = spanish_civil_war
		NOT = { has_global_flag = scw_over }
	}

	abort = {
		has_global_flag = scw_over
	}

	ai_strategy = {
		type = befriend
		id = "SPD"
		value = 100
	}
	ai_strategy = {
		type = support
		id = "SPD"
		value = 100
	}
	ai_strategy = {
		type = send_volunteers_desire
		id = "SPD"
		value = 100
	}
}

SOV_play_nice_with_ribbentrop_pact = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		has_global_flag = sov_yes_pact
		GER = { has_war_with = POL }
		date < 1941.1.1
	}
	abort = {
		OR ={
			GER = { has_war_with = SOV }
			NOT = { GER = { has_war_with = POL } }
			date > 1941.1.1
		}
	}

	# respect the spirit of the law ;)
	ai_strategy = {
		type = send_volunteers_desire
		id = "POL"
		value = -100
	}
}

# Make people sceptic about sending support to the Whites - again
SOV_dont_support_whites = {

	allowed = { has_dlc = "No Step Back" }
	enable = {
		SOV = { SOV_is_exiles = yes}
		NOT = {
			tag = SOV
		}
	}

	abort = {
		has_global_flag = SOV_soviet_civil_war_over
	}

	ai_strategy = {
		type = alliance
		id = SOV
		value = -200
	}
	ai_strategy = {
		type = befriend
		id = SOV
		value = -100
	}
	ai_strategy = {
		type = support
		id = SOV
		value = -100
	}
	ai_strategy = {
		type = send_volunteers_desire
		id = SOV
		value = -200
	}
	ai_strategy = {
		type = send_lend_lease_desire
		id = SOV
		value = -200
	}
}

# Don't ally the Soviet Union if it has civil war
SOV_dont_ally_us_soviet_civil_was = {
	allowed = { always = yes }
	enable = {
		has_global_flag = SOV_soviet_civil_war
		NOT = {
			original_tag = SOV
		}
	}
	abort = {
		has_global_flag = SOV_soviet_civil_war_over
	}
	ai_strategy = {
		type = alliance
		id = SOU
		value = -500
	}
}

SOV_dont_join_wars_during_civil_war = {
	allowed = { always = yes }
	enable = {
		has_global_flag = SOV_soviet_civil_war
		NOT = {
			original_tag = SOV
		}
	}
	abort = {
		has_global_flag = SOV_soviet_civil_war_over
	}
	ai_strategy = {
		type = dont_join_wars_with
		id = SOU
		# target_country = SOV
		value = 200
	}
}

# Make countries want to support the opposition IF
SOV_support_opposition_with_arms = {

	allowed = { always = yes }
	enable = {
		OR = {
			AND = {
				tag = JAP
				SOV = { has_country_flag = SOV_CSW_transfer_vladivostok_flag }
			}
			AND = {
				tag = JAP
				SOV = { has_country_flag = SOV_CSW_transfer_sakhalin_flag }
			}
			AND = {
				tag = GER
				SOV = { has_country_flag = SOV_CSW_baku_oil_flag }
			}
			AND = {
				tag = GER
				SOV = { has_country_flag = SOV_CSW_ukraine_germany_flag }
			}
			AND = {
				tag = ENG
				SOV = { has_country_flag = SOV_CSW_belarus_uk_flag }
			}
			has_country_flag = SOV_supporting_trotsky_flag
		}
		NOT = {
			tag = SOV
		}
	}

	abort = {
		has_global_flag = SOV_soviet_civil_war_over
	}
	ai_strategy = {
		type = send_volunteers_desire
		id = SOV
		value = 100
	}
	ai_strategy = {
		type = send_lend_lease_desire
		id = SOV
		value = 300
	}
}

SOV_scorched_earth_german_front_baltics = {

	allowed = { original_tag = SOV }
	enable = {
		has_war_with = GER
		NOT = {
			has_country_flag = SOV_barbarossa_scorched_earth_delay #a 45 day delay at the start of the war before Soviets start doing this
		}
		NOT = { # please don't spend PP on blowing up your own stuff when you need it for manpower
			has_manpower < 1000000
			has_political_power < 200
			OR = {
				has_idea = volunteer_only
				has_idea = limited_conscription
				has_idea = extensive_conscription
			}
		}
		count_triggers = {
			amount = 4 #if 4 baltic states are owned by an enemy, burn the rest of the Baltics
			814 = { CONTROLLER = { has_war_with = SOV } }
			11 = { CONTROLLER = { has_war_with = SOV } }
			189 = { CONTROLLER = { has_war_with = SOV } }
			815 = { CONTROLLER = { has_war_with = SOV } }
			190 = { CONTROLLER = { has_war_with = SOV } }
			809 = { CONTROLLER = { has_war_with = SOV } }
			810 = { CONTROLLER = { has_war_with = SOV } }
			808 = { CONTROLLER = { has_war_with = SOV } }
			811 = { CONTROLLER = { has_war_with = SOV } }
			13 = { CONTROLLER = { has_war_with = SOV } }
			812 = { CONTROLLER = { has_war_with = SOV } }
			813 = { CONTROLLER = { has_war_with = SOV } }
			191 = { CONTROLLER = { has_war_with = SOV } }
		}
	}

	abort = {
		OR = {
			NOT = { has_war_with = GER }
			strength_ratio = { tag = GER ratio > 1.5 }
			date > 1944.1.1
		}
	}

	ai_strategy = {
		type = scorched_earth_prio
		id = SOV
		states = {
			814
			11
			189
			815
			190
			809
			810
			808
			811
			13
			812
			813
			191
		}
	}
}

SOV_scorched_earth_german_front_Poland = {

	allowed = { original_tag = SOV }
	enable = {
		has_war_with = GER
		NOT = {
			has_country_flag = SOV_barbarossa_scorched_earth_delay #a 45 day delay at the start of the war before Soviets start doing this
		}
		NOT = { # please don't spend PP on blowing up your own stuff when you need it for manpower
			has_manpower < 1000000
			has_political_power < 200
			OR = {
				has_idea = volunteer_only
				has_idea = limited_conscription
				has_idea = extensive_conscription
			}
		}
		count_triggers = {
			amount = 2 #if 2 states are owned by an enemy, burn the rest of the area
			784 = { CONTROLLER = { has_war_with = SOV } }
			96 = { CONTROLLER = { has_war_with = SOV } }
			95 = { CONTROLLER = { has_war_with = SOV } }
			94 = { CONTROLLER = { has_war_with = SOV } }
			93 = { CONTROLLER = { has_war_with = SOV } }
			91 = { CONTROLLER = { has_war_with = SOV } }
			89 = { CONTROLLER = { has_war_with = SOV } }

		}
	}

	abort = {
		OR = {
			NOT = { has_war_with = GER }
			strength_ratio = { tag = GER ratio > 1.5 }
			date > 1944.1.1
		}
	}

	ai_strategy = {
		type = scorched_earth_prio
		id = SOV
		states = {
			784
			96
			95
			94
			93
			91
			89
		}
	}
}

SOV_scorched_earth_german_front_north = {

	allowed = { original_tag = SOV }
	enable = {
		has_war_with = GER
		NOT = {
			has_country_flag = SOV_barbarossa_scorched_earth_delay #a 45 day delay at the start of the war before Soviets start doing this
		}
		NOT = { # please don't spend PP on blowing up your own stuff when you need it for manpower
			has_manpower < 1000000
			has_political_power < 200
			OR = {
				has_idea = volunteer_only
				has_idea = limited_conscription
				has_idea = extensive_conscription
			}
		}
		count_triggers = {
			amount = 2 #if 2 states are owned by an enemy, burn the rest of the area
			208 = { CONTROLLER = { has_war_with = SOV } }
			209 = { CONTROLLER = { has_war_with = SOV } }
			210 = { CONTROLLER = { has_war_with = SOV } }
			195 = { CONTROLLER = { has_war_with = SOV } }
			263 = { CONTROLLER = { has_war_with = SOV } }
			246 = { CONTROLLER = { has_war_with = SOV } }


		}
	}

	abort = {
		OR = {
			NOT = { has_war_with = GER }
			strength_ratio = { tag = GER ratio > 1.5 }
			date > 1944.1.1
		}
	}

	ai_strategy = {
		type = scorched_earth_prio
		id = SOV
		states = {
			208
			209
			210
			195
			263
			246
		}
	}
}

SOV_scorched_earth_german_front_center = {

	allowed = { original_tag = SOV }
	enable = {
		has_war_with = GER
		NOT = {
			has_country_flag = SOV_barbarossa_scorched_earth_delay #a 45 day delay at the start of the war before Soviets start doing this
		}
		NOT = { # please don't spend PP on blowing up your own stuff when you need it for manpower
			has_manpower < 1000000
			has_political_power < 200
			OR = {
				has_idea = volunteer_only
				has_idea = limited_conscription
				has_idea = extensive_conscription
			}
		}
		count_triggers = {
			amount = 4 #if 4 states are owned by an enemy, burn the rest of the area
			207 = { CONTROLLER = { has_war_with = SOV } }
			206 = { CONTROLLER = { has_war_with = SOV } }
			204 = { CONTROLLER = { has_war_with = SOV } }
			194 = { CONTROLLER = { has_war_with = SOV } }
			201 = { CONTROLLER = { has_war_with = SOV } }
			199 = { CONTROLLER = { has_war_with = SOV } }
			202 = { CONTROLLER = { has_war_with = SOV } }
			193 = { CONTROLLER = { has_war_with = SOV } }
			241 = { CONTROLLER = { has_war_with = SOV } }
			242 = { CONTROLLER = { has_war_with = SOV } }
			243 = { CONTROLLER = { has_war_with = SOV } }
			224 = { CONTROLLER = { has_war_with = SOV } }
		}
	}

	abort = {
		OR = {
			NOT = { has_war_with = GER }
			strength_ratio = { tag = GER ratio > 1.5 }
			date > 1944.1.1
		}
	}

	ai_strategy = {
		type = scorched_earth_prio
		id = SOV
		states = {
			207
			206
			204
			194
			201
			199
			202
			193
			241
			242
			243
			224
		}
	}
}

SOV_scorched_earth_german_front_moscow = {

	allowed = { original_tag = SOV }
	enable = {
		has_war_with = GER
		NOT = {
			has_country_flag = SOV_barbarossa_scorched_earth_delay #a 45 day delay at the start of the war before Soviets start doing this
		}
		NOT = { # please don't spend PP on blowing up your own stuff when you need it for manpower
			has_manpower < 1000000
			has_political_power < 200
			OR = {
				has_idea = volunteer_only
				has_idea = limited_conscription
				has_idea = extensive_conscription
			}
		}
		count_triggers = {
			amount = 1 #if 1 states are owned by an enemy, burn the rest of the area
			219 = { CONTROLLER = { has_war_with = SOV } }
			246 = { CONTROLLER = { has_war_with = SOV } }
			242 = { CONTROLLER = { has_war_with = SOV } }
			205 = { CONTROLLER = { has_war_with = SOV } }
			223 = { CONTROLLER = { has_war_with = SOV } }

		}
	}

	abort = {
		OR = {
			NOT = { has_war_with = GER }
			strength_ratio = { tag = GER ratio > 1.5 }
			date > 1944.1.1
			AND = {
				controls_state = 220
				controls_state = 224
				controls_state = 243
				controls_state = 207
				controls_state = 210
			}
		}

	}

	ai_strategy = {
		type = scorched_earth_prio
		id = SOV
		states = {
			# 219
			246
			242
			205
			223
		}
	}
}

SOV_scorched_earth_german_front_stalingrad = {

	allowed = { original_tag = SOV }
	enable = {
		has_war_with = GER
		NOT = {
			has_country_flag = SOV_barbarossa_scorched_earth_delay #a 45 day delay at the start of the war before Soviets start doing this
		}
		NOT = { # please don't spend PP on blowing up your own stuff when you need it for manpower
			has_manpower < 1000000
			has_political_power < 200
			OR = {
				has_idea = volunteer_only
				has_idea = limited_conscription
				has_idea = extensive_conscription
			}
		}
		count_triggers = {
			amount = 1 #if 1 states are owned by an enemy, burn the rest of the area
			217 = { CONTROLLER = { has_war_with = SOV } }
			265 = { CONTROLLER = { has_war_with = SOV } }
			245 = { CONTROLLER = { has_war_with = SOV } }
			238 = { CONTROLLER = { has_war_with = SOV } }
			829 = { CONTROLLER = { has_war_with = SOV } }

		}
	}

	abort = {
		OR = {
			NOT = { has_war_with = GER }
			strength_ratio = { tag = GER ratio > 1.5 }
			date > 1944.1.1
		}
		controls_state = 218
		controls_state = 228
		controls_state = 260
		controls_state = 239
	}

	ai_strategy = {
		type = scorched_earth_prio
		id = SOV
		states = {
			217
			265
			245
			238
			829
		}
	}
}

###########################
### MOLOTOV IN DA HOUSE ###
###########################
#Soviets
SOV_molotov_active_sov = {
	allowed = { original_tag = SOV }

	enable = {
		is_historical_focus_on = no #EAI
		has_idea = SOV_vyacheslav_molotov
	}

	abort = {
		NOT = { has_idea = SOV_vyacheslav_molotov }
	}

	ai_strategy = {
		type = befriend
		id = GER
		value = 35
	}

	ai_strategy = {
		type = befriend
		id = JAP
		value = 20
	}

	ai_strategy = {
		type = antagonize
		id = POL
		value = 25
	}

	ai_strategy = {
		type = antagonize
		id = FIN
		value = 25
	}

	ai_strategy = {
		type = antagonize
		id = ENG
		value = 15
	}

	ai_strategy = {
		type = antagonize
		id = USA
		value = 15
	}

	ai_strategy = {
		type = antagonize
		id = FRA
		value = 15
	}
}

#Countries that like Molotov
SOV_molotov_active_friendly_others = {
	allowed = {
		OR = {
			original_tag = GER
			original_tag = JAP
		}
	}

	enable = {
		is_historical_focus_on = no #EAI
		SOV = { has_idea = SOV_vyacheslav_molotov }
	}

	abort = {
		OR = {
			SOV = { NOT = { has_idea = SOV_vyacheslav_molotov } }
			has_capitulated = yes
			is_in_faction_with = SOV
		}
	}

	ai_strategy = {
		type = befriend
		id = SOV
		value = 25
	}
}

#Countries that dislike Molotov
SOV_molotov_active_hostile_others = {
	allowed = {
		OR = {
			original_tag = ENG
			original_tag = FRA
			original_tag = USA
			original_tag = POL
			original_tag = FIN
			original_tag = SAU #Khakimov incident
		}
	}

	enable = {
		is_historical_focus_on = no #EAI
		SOV = { has_idea = SOV_vyacheslav_molotov }
	}

	abort = {
		OR = {
			SOV = { NOT = { has_idea = SOV_vyacheslav_molotov } }
			has_capitulated = yes
			is_in_faction_with = SOV
		}
	}

	ai_strategy = {
		type = antagonize
		id = SOV
		value = 25
	}
}


############################
### LITVINOV IN DA HOUSE ###
############################
#Soviets
SOV_litvinov_active_sov = {
	allowed = { original_tag = SOV }

	enable = {
		is_historical_focus_on = no #EAI
		has_idea = SOV_maksim_litvinov
		is_subject = no
	}

	abort = {
		NOT = { has_idea = SOV_maksim_litvinov }
		is_subject = yes
	}

	ai_strategy = {
		type = befriend
		id = ENG
		value = 25
	}

	ai_strategy = {
		type = befriend
		id = USA
		value = 15
	}

	ai_strategy = {
		type = befriend
		id = FRA
		value = 35
	}

	ai_strategy = {
		type = befriend
		id = POL
		value = 25
	}

	ai_strategy = {
		type = antagonize
		id = GER
		value = 25
	}

	ai_strategy = {
		type = antagonize
		id = JAP
		value = 25
	}

	ai_strategy = {
		type = diplo_action_desire
		id = FRA
		target = improve_relation
		value = 25
	}

	ai_strategy = {
		type = diplo_action_desire
		id = POL
		target = improve_relation
		value = 15
	}
}

#Countries that like Litvinov
SOV_litvinov_active_friendly_others = {
	allowed = {
		OR = {
			original_tag = ENG
			original_tag = FRA
			original_tag = USA
			original_tag = POL
			original_tag = FIN
			original_tag = SAU #Khakimov incident
		}
	}

	enable = {
		is_historical_focus_on = no #EAI
		SOV = { has_idea = SOV_maksim_litvinov }
		is_subject = no
	}

	abort = {
		OR = {
			SOV = { NOT = { has_idea = SOV_maksim_litvinov } }
			has_capitulated = yes
			is_in_faction_with = SOV
			is_subject = yes
		}
	}

	ai_strategy = {
		type = befriend
		id = SOV
		value = 25
	}
}

#Countries that dislike Litvinov
SOV_litvinov_active_hostile_others = {
	allowed = {
		OR = {
			original_tag = GER
			original_tag = JAP
		}
	}

	enable = {
		is_historical_focus_on = no #EAI
		SOV = { has_idea = SOV_maksim_litvinov }
		is_subject = no
	}

	abort = {
		OR = {
			SOV = { NOT = { has_idea = SOV_maksim_litvinov } }
			has_capitulated = yes
			is_in_faction_with = SOV
			is_subject = yes
		}
	}

	ai_strategy = {
		type = antagonize
		id = SOV
		value = 25
	}
}

#########################
### FOREIGN RELATIONS ###
#########################

#Soviets
SOV_khakimov_proposal_sov = {
	allowed = {
		original_tag = SOV
	}

	enable = {
		is_historical_focus_on = no #EAI
		has_idea = SOV_maksim_litvinov
		has_completed_focus = SOV_the_khakimov_proposal
		SAU = {
			has_opinion = {
				target = SOV
				value < 0
			}
			is_subject = no
		}
		is_subject = no
	}

	abort = {
		OR = {
			NOT = { has_idea = SOV_maksim_litvinov }
			is_in_faction_with = SAU
			SAU = { has_capitulated = yes }
			SAU = { is_subject = no }
			SAU = {
				has_opinion = {
					target = SOV
					value > 75
				}
			}
			is_subject = yes
		}
	}

	ai_strategy = {
		type = diplo_action_desire
		id = SAU
		target = befriend
		value = 50
	}
	ai_strategy = {
		type = diplo_action_desire
		id = SAU
		target = improve_relation
		value = 50
	}
}

#Soviets
SOV_khakimov_proposal_sau = {
	allowed = {
		original_tag = SAU
	}

	enable = {
		SOV = {
			has_idea = SOV_maksim_litvinov
			has_completed_focus = SOV_the_khakimov_proposal
			is_subject = no
		}
		is_subject = no
	}

	abort = {
		OR = {
			SOV = { NOT = { has_idea = SOV_maksim_litvinov } }
			is_in_faction_with = SOV
			SOV = { has_capitulated = yes }
			is_subject = yes
		}
	}

	ai_strategy = {
		type = diplo_action_desire
		id = SOV
		target = befriend
		value = 25
	}
}

###########################
### avoid attacking Romania until we have sent ultimatum
###########################

SOV_ultimatum_ROM = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		is_historical_focus_on = yes
		OR = {
			AND = {
				NOT = { has_government = communism } #Non-commies don't have access to focus Claim in Bessarabia
				date < 1940.1.31 #Do not do it too early buddy
			}
			NOT = { has_completed_focus = SOV_claim_on_bessarabia }
		}
		ROM = {
			NOT = { has_country_flag = SOV_added_claimed_bessarabia } #Added via focus Claim Bessarabia
		}
		OR = {
			NOT = { owns_state = 78 } #Bessarabia
			78 = {
				owner = { NOT = { is_in_faction_with = ROOT } }
			}
		}
		OR = {
			NOT = { owns_state = 80 } #Bucovina
			80 = {
				owner = { NOT = { is_in_faction_with = ROOT } }
			}
		}
		OR = {
			NOT = { owns_state = 766 } #Southern Bessarabia
			766 = {
				owner = { NOT = { is_in_faction_with = ROOT } }
			}
		}
	}
	abort = {
		OR = {
			ROM = {
				has_country_flag = { flag = SOV_added_claimed_bessarabia value = 1 days > 15 }
			}
			date > 1941.12.31 #If it's late then it's fine
			AND = {
				OR = {
					owns_state = 78 #Bessarabia
					78 = {
						owner = { is_in_faction_with = ROOT }
					}
				}
				OR = {
					owns_state = 80 #Bucovina
					80 = {
						owner = { is_in_faction_with = ROOT }
					}
				}
				OR = {
					owns_state = 766 #Southern Bessarabia
					766 = {
						owner = { is_in_faction_with = ROOT }
					}
				}
			}
		}
	}

	ai_strategy = {
		type = ignore
		id = "ROM"
		value = 100
	}

	ai_strategy = {
		type = antagonize
		id = "ROM"
		value = -10
	}
	ai_strategy = {
		type = conquer
		id = "ROM"
		value = -200
	}
}

###########################
### avoid attacking Finland until we have sent ultimatum
###########################

SOV_ultimatum_FIN = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		is_historical_focus_on = yes
		FIN = {
			NOT = { has_country_flag = SOV_ultimatum_sent_flag } #Added via focus Secure Leningrad
		}
		OR = {
			NOT = { owns_state = 146 } #Karjala
			146 = {
				owner = { NOT = { is_in_faction_with = ROOT } }
			}
		}
	}
	abort = {
		OR = {
			FIN = {
				has_country_flag = { flag = SOV_ultimatum_sent_flag value = 1 days > 15 }
			}
			date > 1941.12.31 #If it's late then it's fine
			OR = {
				owns_state = 146 #Karjala
				146 = {
					owner = { is_in_faction_with = ROOT }
				}
			}
		}
	}

	ai_strategy = {
		type = antagonize
		id = FIN
		value = -30
	}
	ai_strategy = {
		type = conquer
		id = FIN
		value = -200
	}
}

###### Don't start ww3 until Japan is defeated

ALLIES_avoid_enemies_for_a_while_ww3 = {
	allowed = {
		OR = {
			original_tag = ENG
			is_in_faction_with = ENG
		}
	}
	enable = {
		is_historical_focus_on = yes
		date > 1943.1.1
		OR = {
			has_war_with = GER
			has_war_with = JAP
		}
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = conquer
		id = PER
		value = -200
	}
	ai_strategy = {
		type = conquer
		id = SOV
		value = -200
	}
}

SOV_dont_send_all_convoys_on_holiday_to_vladivostok = {
	allowed = { original_tag = SOV }
	enable = {
		has_equipment = {
			convoy < 500
		}
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = naval_avoid_region
		id = 79 #sea of japan
		value = 150
	}
}
