is_sami_land = {
		OR = {
			state = 666
			state = 918
			state = 923
			state = 144
			state = 924
			state = 925
			state = 148
			state = 722
			state = 213
			state = 929
			state = 147
		}
}

SWE_is_historical_ai = { 
		is_ai = yes 
		OR = {
			AND = {
				is_historical_focus_on = yes 
				has_game_rule = {
					rule = SWE_AI_BEHAVIOR
					option = DEFAULT
				}
			}
			has_country_flag = SWE_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = SWE_ai_behavior
				option = HISTORICAL
			}
		}	
}

SWE_AAT = { 
	AND = {
		tag = SWE
		original_tag = SWE
		has_dlc = "Arms Against Tyranny"
	}
}
is_eligible_for_train_the_sheltered = {
	#If any of FIN/NOR/DEN has capitulated and you do not have war with that country, OR if you have war with that country but any other of the 2 countries has capitulated 
	OR = {
		OR = {
			AND = {
				has_war_with = DEN
				OR = {
					FIN = { has_capitulated = yes }
					NOR = { has_capitulated = yes }
				}
			}
			AND = {
				NOT = { has_war_with = DEN }
				OR = {
					DEN = { has_capitulated = yes }
					DEN = { is_subject = yes }
				}

			}
		}

		OR = { 
			AND = {
				has_war_with = FIN
				OR = {
					DEN = { has_capitulated = yes }
					NOR = { has_capitulated = yes }
				}
			}
			AND = {
				NOT = { has_war_with = FIN }
				OR = {
					FIN = { has_capitulated = yes }
					FIN = { is_subject = yes }
				}
			}
		}

		OR = {
			AND = {
				has_war_with = NOR
				OR = {
					DEN = { has_capitulated = yes }
					FIN = { has_capitulated = yes }
				}
			}
			AND = {
				NOT = { has_war_with = NOR }
				OR = {
					NOR = { has_capitulated = yes }
					NOR = { is_subject = yes }
				}
			}
		}
	}
}

SWE_rapid_mob_manpower_law_trigger = {
	if = {
		limit = {
			hidden_trigger = { 
				original_tag = SWE
				has_dlc = "Arms Against Tyranny"
			}
		}

		has_completed_focus = SWE_rapid_mobilization
	}
	else = {
		hidden_trigger = { always = no }  #NEED TO HAVE AN ALWAYS AS AN END STATEMENT IF URE USING AN IF ELSE IN AN OR STATEMENT OTHERWISE THE EVALUATION BREAKS!!
	}
}

SWE_as_the_barometer_falls_trigger = {
		OR = {
			has_war_support > 0.35
			#threat > 0.80
			arms_factory > 16
		}
}


SWE_the_old_enemy_stirs_trigger = {
		OR = {
			has_war_support > 0.25
			threat > 0.25
			arms_factory > 11
		}
}

SWE_refuge_for_revolutionaries_trigger = {
	hidden_trigger = {
		SWE_AAT = yes
		SWE = { 
			has_completed_focus = SWE_refuge_from_war 
			exists = yes
			is_subject = no
		}
	}
}

#Used to change name of States and VPs when appropriate. Expected to be used inside on_state_control_changed. FROM.FROM is state / ROOT is new controller / FROM is former controller
SWE_state_or_vp_name_should_change = {
	OR = {
		AND = {
			ROOT = { original_tag = SWE }
			NOT = { FROM = { original_tag = SWE } } #Not civil wars
		}
		AND = {
			FROM = { original_tag = SWE }
			NOT = { ROOT = { original_tag = SWE } } #Not civil wars
		}
	}
	OR = {
		FROM.FROM = { state = 148 } # LAPPI / LAPPLAND (Tornio / Torneå) (Inari / Enare)
		FROM.FROM = { state = 929 } # OULU / ULEÅBORG // (Oulu / Uleåborg)
		FROM.FROM = { state = 149 } # VAASA / VASA // (Vaasa / Vasa) (Kokkola / Karleby) (Seinäjoki / Östermyra)
		FROM.FROM = { state = 926 } # TURKU / ÅBO // (Turku / Åbo) (Pori / Björneborg) (Rauma / Raumo)
		FROM.FROM = { state = 927 } # HÄME / TAMMERFORS // (Tampere / Tammerfors) (Hämeenlinna / Tavastehus) (Lahti / Lahtis)
		FROM.FROM = { state = 111 } # UUSIMAA / NYLAND // (Helsinki / Helsingfors) (Hanko / Hangö) (Porvoo / Borgå)
		FROM.FROM = { state = 146 } # KARJALA / KARELEN (Viipuri / Viborg)
		FROM.FROM = { state = 928 } # KYMI / VILLMANSTRAND (Lappeenranta / Villmanstrand)
		FROM.FROM = { state = 930 } # MIKKELI / ST MICHEL (Mikkeli / St Michel) (Savonlinna / Nyslott)
		FROM.FROM = { state = 150 } # KUOPIO / KUOPIO (Kajaani / Kajana)
	}
}

SWE_cross_we_bear_state_condition_trigger = {

	OR = {
		is_controlled_by = SWE
		is_controlled_by = THIS
		controller = {
			is_in_faction_with = SWE
			is_subject = no
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}
	}
}



SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = {
	controller = {
		OR = {
			has_government = fascism
			has_government = communism
			
			AND = {
				is_subject = yes
				OVERLORD = {
					OR = {
						has_government = fascism
						has_government = communism
					}
				}
			}
		}
	}
}