###########################
# AAT Finnish Events
###########################

add_namespace = AAT_finland_motti
add_namespace = AAT_finland_national_defense
add_namespace = AAT_finland_diplomacy
add_namespace = AAT_finland_winter_war
add_namespace = AAT_finland_continuation_war
add_namespace = AAT_finland_misc_events
add_namespace = AAT_finland_political
add_namespace = AAT_finland_kinship_war
add_namespace = AAT_finland_the_white_death



##     ##  #######  ######## ######## ####     ######  ##    ##  ######  ######## ######## ##     ## 
###   ### ##     ##    ##       ##     ##     ##    ##  ##  ##  ##    ##    ##    ##       ###   ### 
#### #### ##     ##    ##       ##     ##     ##         ####   ##          ##    ##       #### #### 
## ### ## ##     ##    ##       ##     ##      ######     ##     ######     ##    ######   ## ### ## 
##     ## ##     ##    ##       ##     ##           ##    ##          ##    ##    ##       ##     ## 
##     ## ##     ##    ##       ##     ##     ##    ##    ##    ##    ##    ##    ##       ##     ## 
##     ##  #######     ##       ##    ####     ######     ##     ######     ##    ######## ##     ## 


# Country gets heads-up about Finland using Motti Tactics - Event for Finland's enemies
country_event = {
	id = AAT_finland_motti.01
	title = AAT_finland_motti.01.t
	desc = AAT_finland_motti.01.desc
	picture = GFX_report_event_FIN_motti_tactics
	
	is_triggered_only = yes #Triggered when Finland apply Motti tactics to a state

	immediate = {
		hidden_effect = {
			set_country_flag = FIN_aware_about_motti_tactics_flag #Trigger only once per country
		}
	}
	
	#ACCEPT
	option = {
		name = AAT_finland_motti.01.a

		effect_tooltip = {
			FROM.FROM = {
				add_dynamic_modifier = { modifier = FIN_motti_tactics_modifier }
			}
		}

		custom_effect_tooltip = AAT_finland_motti_tt
	}
}



##      ## ########    ###    ########   #######  ##    ##     ######     ###     ######  ##     ## ########  ######  
##  ##  ## ##         ## ##   ##     ## ##     ## ###   ##    ##    ##   ## ##   ##    ## ##     ## ##       ##    ## 
##  ##  ## ##        ##   ##  ##     ## ##     ## ####  ##    ##        ##   ##  ##       ##     ## ##       ##       
##  ##  ## ######   ##     ## ########  ##     ## ## ## ##    ##       ##     ## ##       ######### ######    ######  
##  ##  ## ##       ######### ##        ##     ## ##  ####    ##       ######### ##       ##     ## ##             ## 
##  ##  ## ##       ##     ## ##        ##     ## ##   ###    ##    ## ##     ## ##    ## ##     ## ##       ##    ## 
 ###  ###  ######## ##     ## ##         #######  ##    ##     ######  ##     ##  ######  ##     ## ########  ######  


# Country gets heads-up about Finnish Weapon Caches - Event for Finland's enemies
country_event = {
	id = AAT_finland_national_defense.01
	title = AAT_finland_national_defense.01.t
	desc = AAT_finland_national_defense.01.desc
	picture = GFX_report_event_generic_rifles
	
	is_triggered_only = yes #Triggered when country controls a Finnish state with Weapon Caches

	immediate = {
		#log = "FROM is [FROM.GetName]"
		#log = "FROM.FROM is [FROM.FROM.GetName]"
		#log = "FROM.FROM.FROM is [FROM.FROM.FROM.GetName]"
		#log = "PREV is [PREV.GetName]"
		#log = "PREV.PREV is [PREV.PREV.GetName]"
		#log = "PREV.PREV.PREV is [PREV.PREV.GetName]"
		#log = "FROM.PREV is [FROM.PREV.GetName]"
		#log = "FROM.PREV.PREV is [PREV.PREV.GetName]"
		#log = "FIN_state_with_weapon_caches is [?FIN_state_with_weapon_caches.GetName]"

		hidden_effect = {
			set_country_flag = FIN_aware_about_weapon_caches_flag #Trigger only once per country
		}
	}
	
	#OK
	option = {
		name = AAT_finland_national_defense.01.a

		effect_tooltip = {
			var:FIN_state_with_weapon_caches = {
				add_dynamic_modifier = { modifier = FIN_weapon_caches_modifier }
			}
		}
		custom_effect_tooltip = FIN_weapon_caches_in_state_tt

		hidden_effect = {
			clear_variable = FIN_state_with_weapon_caches
		}
	}
}

# Weapon Caches Seized - Event for Finland's enemies
country_event = {
	id = AAT_finland_national_defense.02
	title = AAT_finland_national_defense.02.t
	desc = AAT_finland_national_defense.02.desc
	picture = GFX_report_event_china_ledo_road
	
	is_triggered_only = yes #Triggered when country controls a Finnish state with Weapon Caches

	#immediate = {
	#	log = "FROM is [FROM.GetName]"
	#	log = "FROM.FROM is [FROM.FROM.GetName]"
	#	log = "FROM.FROM.FROM is [FROM.FROM.FROM.GetName]"
	#}
	
	#OK
	option = {
		name = AAT_finland_national_defense.02.a

		ai_chance = {
			base = 0
		}

		FROM.FROM = { FROM = { FIN_seize_weapon_caches = yes } }

		custom_effect_tooltip = FIN_weapon_caches_seized_event_spam_tt
	}

	#OK - Leave me alone (no more events of this will show up)
	option = {
		name = AAT_finland_national_defense.02.b

		ai_chance = { #AI hates spam >:(
			base = 10
		}

		FROM.FROM = { FROM = { FIN_seize_weapon_caches = yes } }

		set_country_flag = FIN_weapon_caches_no_more_spam_tack_flag
		custom_effect_tooltip = FIN_weapon_caches_seized_event_no_spam_tt
	}
}

# Weapon Caches Seized by Enemy - Event for Finland
country_event = {
	id = AAT_finland_national_defense.03
	title = AAT_finland_national_defense.03.t
	desc = AAT_finland_national_defense.03.desc
	picture = GFX_report_event_china_ledo_road
	
	is_triggered_only = yes #Triggered when enemy country seizes Finnish weapon caches in a state

	#immediate = {
	#	log = "FROM is [FROM.GetName]"
	#	log = "FROM.FROM is [FROM.FROM.GetName]"
	#	log = "FROM.FROM.FROM is [FROM.FROM.FROM.GetName]"
	#}
	
	#OK
	option = {
		name = AAT_finland_national_defense.03.a

		ai_chance = {
			base = 0
		}

		effect_tooltip = {
			FROM.FROM.FROM = { remove_dynamic_modifier = { modifier = FIN_weapon_caches_modifier } }
		}
		custom_effect_tooltip = FIN_weapon_caches_seized_event_spam_tt
	}

	#OK - Leave me alone (no more events of this will show up)
	option = {
		name = AAT_finland_national_defense.03.b

		ai_chance = { #AI hates spam >:(
			base = 10
		}

		effect_tooltip = {
			FROM.FROM.FROM = { remove_dynamic_modifier = { modifier = FIN_weapon_caches_modifier } }
		}

		set_country_flag = FIN_weapon_caches_finland_no_more_spam_tack_flag
		custom_effect_tooltip = FIN_weapon_caches_seized_event_no_spam_tt
	}
}



##     ## ####  ######   ######  
###   ###  ##  ##    ## ##    ## 
#### ####  ##  ##       ##       
## ### ##  ##   ######  ##       
##     ##  ##        ## ##       
##     ##  ##  ##    ## ##    ## 
##     ## ####  ######   ######  


# Evacuation of Children - Event for FIN
country_event = {
	id = AAT_finland_misc_events.01
	title = AAT_finland_misc_events.01.t
	desc = AAT_finland_misc_events.01.desc
	picture = GFX_report_event_FIN_helsinki_bombed
	
	trigger = {
		original_tag = FIN
		any_enemy_country = {
			is_major = yes
		}
		surrender_progress > 0.05
	}

	mean_time_to_happen = {
		days = 20
	}

	fire_only_once = yes
	
	#OK
	option = {
		name = AAT_finland_misc_events.01.a

		add_stability = 0.05
	}
}

# Dancing Ban - Event for FIN
country_event = {
	id = AAT_finland_misc_events.02
	title = AAT_finland_misc_events.02.t
	desc = AAT_finland_misc_events.02.desc
	picture = GFX_report_event_generic_dancing
	
	trigger = {
		original_tag = FIN
		any_enemy_country = {
			is_major = yes
		}
	}

	mean_time_to_happen = {
		days = 90
	}

	fire_only_once = yes
	
	#Ban Dancing
	option = {
		name = AAT_finland_misc_events.02.a

		ai_chance = { #AI hates dancing (also historical)
			base = 10
		}

		add_stability = -0.02
		add_war_support = 0.02
	}

	#Wtf are you talking about
	option = {
		name = AAT_finland_misc_events.02.b

		ai_chance = {
			base = 0
		}

		add_stability = 0.01
	}
}

# Use faction leader for boosting the resource expansion - Event for FIN
country_event = {
	id = AAT_finland_misc_events.03
	title = AAT_finland_misc_events.03.t
	desc = AAT_finland_misc_events.03.desc
	picture = GFX_report_event_FIN_petsamo_melting_plant

	is_triggered_only = yes

	fire_only_once = yes
	
	#Expand resources development at the expense of resource rights
	option = {
		name = AAT_finland_misc_events.03.a

		ai_chance = {
			base = 10
		}

		add_to_variable = { FIN_mineral_wealth_development_resource_amount = 1 }
		add_to_variable = { FIN_mineral_wealth_development_aluminium_amount = 2 }
		#log = "My faction leader is [faction_leader.GetName]"
	}

	#We need no help
	option = {
		name = AAT_finland_misc_events.03.b

		ai_chance = {
			base = 0
		}

		clear_variable = FIN_faction_leader_recieving_resource_rights
	}
}

# Resource Rights for faction leader - Event for FIN (focus FIN_mineral_wealth_development)
country_event = {
	id = AAT_finland_misc_events.04
	title = AAT_finland_misc_events.04.t
	desc = AAT_finland_misc_events.04.desc
	picture = GFX_report_event_FIN_petsamo_mine

	is_triggered_only = yes

	fire_only_once = yes
	
	#Give resource rights in OULU
	option = {
		name = AAT_finland_misc_events.04.a

		ai_chance = {
			base = 10
		}

		929 = {
			add_resource = {
				type = steel
				amount = 6
				show_state_in_tooltip = no
			}
			add_resource = {
				type = chromium
				amount = 6
				show_state_in_tooltip = no
			}
			set_variable = { ROOT.FIN_state_given_for_resource_rights = THIS }
		}
		faction_leader = { #Done in this stupid way because the effect can't take vars, faction_leader scope and so on as receiver.
			#log = "I am faction leader [faction_leader.GetName]"
			ROOT = {
				#log = "THIS is [THIS.GetName] which is ROOT [ROOT.GetName]"
				#log = "PREV is [PREV.GetName]"
				give_resource_rights = {
					receiver = PREV
					state = 929
					resources = { steel chromium }
				}
			}
			hidden_effect = {
				country_event = { id = AAT_finland_misc_events.05 hours = 1 }
			}
		}
	}

	#Give resource rights in PETSAMO
	option = {
		name = AAT_finland_misc_events.04.b

		ai_chance = {
			base = 80
		}

		722 = {
			add_resource = {
				type = steel
				amount = 6
				show_state_in_tooltip = no
			}
			add_resource = {
				type = chromium
				amount = 6
				show_state_in_tooltip = no
			}
			set_variable = { ROOT.FIN_state_given_for_resource_rights = THIS }
		}
		faction_leader = {
			ROOT = {
				give_resource_rights = {
					receiver = ENG
					state = 722
					resources = { steel chromium }
				}
			}
			hidden_effect = {
				country_event = { id = AAT_finland_misc_events.05 hours = 1 }
			}
		}
	}

	#Give resource rights in TURKU
	option = {
		name = AAT_finland_misc_events.04.c

		ai_chance = {
			base = 5
		}

		926 = {
			add_resource = {
				type = steel
				amount = 6
				show_state_in_tooltip = no
			}
			add_resource = {
				type = chromium
				amount = 6
				show_state_in_tooltip = no
			}
			set_variable = { ROOT.FIN_state_given_for_resource_rights = THIS }
		}
		faction_leader = {
			ROOT = {
				give_resource_rights = {
					receiver = PREV
					state = 926
					resources = { steel chromium }
				}
			}
			hidden_effect = {
				country_event = { id = AAT_finland_misc_events.05 hours = 1 }
			}
		}
	}

	#Give resource rights in LAPPI
	option = {
		name = AAT_finland_misc_events.04.d

		ai_chance = {
			base = 5
		}

		148 = {
			add_resource = {
				type = steel
				amount = 6
				show_state_in_tooltip = no
			}
			add_resource = {
				type = chromium
				amount = 6
				show_state_in_tooltip = no
			}
			set_variable = { ROOT.FIN_state_given_for_resource_rights = THIS }
		}
		faction_leader = {
			ROOT = {
				give_resource_rights = {
					receiver = PREV
					state = 148
					resources = { steel chromium }
				}
			}
			hidden_effect = {
				country_event = { id = AAT_finland_misc_events.05 hours = 1 }
			}
		}
	}
}

# Faction leader gets resource rights - Event for FIN's faction leader
country_event = {
	id = AAT_finland_misc_events.05
	title = AAT_finland_misc_events.05.t
	desc = AAT_finland_misc_events.05.desc
	picture = GFX_report_event_FIN_petsamo_mine

	is_triggered_only = yes

	fire_only_once = yes
	
	#Cool
	option = {
		name = AAT_finland_misc_events.05.a

		set_country_flag = FIN_faction_leader_aid_for_mineral_wealth_flag

		effect_tooltip = {
			var:FIN.FIN_state_given_for_resource_rights = {
				add_resource = {
					type = steel
					amount = 6
					show_state_in_tooltip = no
				}
				add_resource = {
					type = chromium
					amount = 6
					show_state_in_tooltip = no
				}
				FROM = {
					give_resource_rights = {
						receiver = ROOT
						state = PREV
						resources = { steel chromium }
					}
				}
			}
		}
	}
}

# FIN builds Mils in TAG - event for TAG (via Incraease Military Investments focus)
country_event = {
	id = AAT_finland_misc_events.06
	title = AAT_finland_misc_events.06.t
	desc = AAT_finland_misc_events.06.desc
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	fire_only_once = yes
	
	#Cool
	option = {
		name = AAT_finland_misc_events.06.a

		effect_tooltip = {
			random_core_state = {
				limit = {
					is_fully_controlled_by = PREV
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}
}

# FIN invites us to research program - event for TAG (via Joint Scientific Program focus)
country_event = {
	id = AAT_finland_misc_events.07
	title = AAT_finland_misc_events.07.t
	desc = AAT_finland_misc_events.07.desc
	picture = GFX_report_event_generic_research_lab

	is_triggered_only = yes

	fire_only_once = yes
	
	#Cool
	option = {
		name = AAT_finland_misc_events.07.a

		effect_tooltip = {
			add_to_tech_sharing_group = FIN_joint_research_and_development_program
		}
	}
}



########  #### ########  ##        #######  ##     ##    ###     ######  ##    ## 
##     ##  ##  ##     ## ##       ##     ## ###   ###   ## ##   ##    ##  ##  ##  
##     ##  ##  ##     ## ##       ##     ## #### ####  ##   ##  ##         ####   
##     ##  ##  ########  ##       ##     ## ## ### ## ##     ## ##          ##    
##     ##  ##  ##        ##       ##     ## ##     ## ######### ##          ##    
##     ##  ##  ##        ##       ##     ## ##     ## ##     ## ##    ##    ##    
########  #### ##        ########  #######  ##     ## ##     ##  ######     ##    


# FIN wants to annex us (EST) / or ally with us - Event for EST (via Viron Kansa focus)
country_event = {
	id = AAT_finland_diplomacy.01
	title = AAT_finland_diplomacy.01.t
	desc = AAT_finland_diplomacy.01.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes

	fire_only_once = yes
	
	#Let's get annexed yay!
	option = {
		name = AAT_finland_diplomacy.01.a

		ai_chance = {
			base = 10
			modifier = { 
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = { 
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = { 
				factor = 5
				has_opinion = {
					target = FROM
					value > 89
				}
			}
			modifier = { 
				factor = 1.5
				is_guaranteed_by = FROM
			}
			modifier = { 
				factor = 5
				has_non_aggression_pact_with = FROM
			}
			modifier = { 
				factor = 5
				is_in_faction_with = FROM
			}
			modifier = { 
				factor = 100
				is_subject_of = FROM
			}
		}

		effect_tooltip = {
			FROM = {
				annex_country = {
					target = ROOT
					transfer_troops = yes
				}
			}
			custom_effect_tooltip = GAME_OVER_TT
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.02 hours = 1 } }
		}
	}

	#Let's join their faction
	option = {
		name = AAT_finland_diplomacy.01.b

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				is_subject_of = FROM
			}
		}

		trigger = {
			FROM = { is_in_faction = yes }
			NOT = { is_in_faction_with = FROM }
		}

		effect_tooltip = {
			if = {
				limit = {
					FROM = { is_faction_leader = yes }
				}
				FROM = { add_to_faction = ROOT }
			}
			else= {
				random_country = {
					limit = {
						is_in_faction_with = FROM
						is_faction_leader = yes
					}
					add_to_faction = ROOT
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.03 hours = 1 } }
		}
	}

	#Nope
	option = {
		name = AAT_finland_diplomacy.01.c

		ai_chance = {
			base = 200
			modifier = {
				factor = 0
				is_subject_of = FROM
			}
		}

		effect_tooltip = {
			every_state = {
				limit = {
					is_core_of = ROOT
					NOT = { is_owned_by = FROM }
				}
				add_claim_by = FROM
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.04 hours = 1 } }
		}
	}
}

# EST is annexed - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.02
	title = AAT_finland_diplomacy.02.t
	desc = AAT_finland_diplomacy.02.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes

	fire_only_once = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.02.a

		if = { #Bring unit leaders if NSB is active (otherwise is just generic people)
			limit = {
				has_dlc = "No Step Back"
			}
			if = { #Filter out ANti-Bolshevik generals if Finland is communist
				limit = {
					has_government = communism
				}
				FROM = {
					every_unit_leader = {
						limit = {
							NOT = { has_trait = BALTIC_anti_bolshevik }
						}
						hidden_effect = {
							if = {
								limit = {
									is_field_marshal = yes
								}
								demote_leader = yes
							}
						}
						set_nationality = ROOT
					}
					every_core_state = { add_core_of = ROOT }
				}
			}
			else = {
				FROM = {
					every_unit_leader = {
						hidden_effect = {
							if = {
								limit = {
									is_field_marshal = yes
								}
								demote_leader = yes
							}
						}
						set_nationality = ROOT
					}
					every_core_state = { add_core_of = ROOT }
				}
			}
		}
		annex_country = {
			target = FROM
			transfer_troops = yes
		}
	}
}

# EST joins faction - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.03
	title = AAT_finland_diplomacy.03.t
	desc = AAT_finland_diplomacy.03.desc
	picture = GFX_report_event_baltic_entente_one

	is_triggered_only = yes

	fire_only_once = yes
	
	#Cool!
	option = {
		name = AAT_finland_diplomacy.03.a

		if = {
			limit = {
				is_faction_leader = yes
			}
			add_to_faction = FROM
		}
		else = {
			faction_leader = {
				add_to_faction = FROM
			}
		}
	}
}

# EST refuses - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.04
	title = AAT_finland_diplomacy.04.t
	desc = AAT_finland_diplomacy.04.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes

	fire_only_once = yes
	
	#We respect their decision (lame)
	option = {
		name = AAT_finland_diplomacy.04.a

		ai_chance = {
			base = 1
		}
	}

	#Inte chicken
	option = {
		name = AAT_finland_diplomacy.04.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = {
					is_ai = no
				}
			}
		}

		every_state = {
			limit = {
				is_core_of = EST
				NOT = { is_owned_by = ROOT }
			}
			add_claim_by = ROOT
		}
	}
}


#############
### SAMI ####
#############

# FIN asks for transferring our controlled Sami core states to them - Event for controller of SMI cores
country_event = {
	id = AAT_finland_diplomacy.05
	title = AAT_finland_diplomacy.05.t
	desc = AAT_finland_diplomacy.05.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes
	
	#Accept
	option = {
		name = AAT_finland_diplomacy.05.a

		ai_chance = {
			base = 10
			modifier = { 
				factor = 1.5
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = { 
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = { 
				factor = 3
				has_opinion = {
					target = FROM
					value > 89
				}
			}
			modifier = { 
				factor = 1.5
				is_guaranteed_by = FROM
			}
			modifier = { 
				factor = 1.2
				has_non_aggression_pact_with = FROM
			}
			modifier = { 
				factor = 10
				is_in_faction_with = FROM
			}
			modifier = { 
				factor = 100
				is_subject_of = FROM
			}
			modifier = { #Be nice to player tack
				factor = 100
				FROM = { is_ai = no }
				OR = {
					is_in_faction_with = FROM
					is_subject_of = FROM
				}
			}
		}

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					is_core_of = SMI
				}
				add_core_of = FROM
				FROM = {
					transfer_state = PREV
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.06 hours = 1 } }
		}
	}

	#Nope
	option = {
		name = AAT_finland_diplomacy.05.b

		ai_chance = {
			base = 200
			modifier = {
				factor = 0
				is_subject_of = FROM
			}
		}

		custom_effect_tooltip = generic_could_lead_to_tt
		effect_tooltip = {
			every_controlled_state = {
				limit = {
					is_core_of = SMI
					NOT = { is_claimed_by = FROM }
				}
				add_claim_by = FROM
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.07 hours = 1 } }
		}
	}
}

# Country transfers SMI cores to us - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.06
	title = AAT_finland_diplomacy.06.t
	desc = AAT_finland_diplomacy.06.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.06.a

		FROM = {
			every_controlled_state = {
				limit = {
					is_core_of = SMI
				}
				add_core_of = ROOT
				ROOT = {
					transfer_state = PREV
				}
			}
		}
	}
}

# Country refuses to transfer SMI cores - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.07
	title = AAT_finland_diplomacy.07.t
	desc = AAT_finland_diplomacy.07.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes
	
	#We respect their decision (lame)
	option = {
		name = AAT_finland_diplomacy.07.a

		ai_chance = {
			base = 1
		}
	}

	#Inte chicken
	option = {
		name = AAT_finland_diplomacy.07.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = {
					is_ai = no
				}
			}
		}

		FROM = {
			every_controlled_state = {
				limit = {
					is_core_of = SMI
					NOT = { is_claimed_by = ROOT }
				}
				add_claim_by = ROOT
			}
		}
	}
}


#########################
### FLUX OF IRON ORE ####
#########################

# FIN asks for transferring Northern states - Event for SWE or controller of Norrbotten and Västerbotten
country_event = {
	id = AAT_finland_diplomacy.08
	title = AAT_finland_diplomacy.08.t
	desc = AAT_finland_diplomacy.08.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes
	
	#Accept
	option = {
		name = AAT_finland_diplomacy.08.a

		ai_chance = {
			base = 10
			modifier = { 
				factor = 1.5
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = { 
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = { 
				factor = 3
				has_opinion = {
					target = FROM
					value > 89
				}
			}
			modifier = { 
				factor = 1.5
				is_guaranteed_by = FROM
			}
			modifier = { 
				factor = 1.2
				has_non_aggression_pact_with = FROM
			}
			modifier = { 
				factor = 10
				is_in_faction_with = FROM
			}
			modifier = { 
				factor = 100
				is_subject_of = FROM
			}
			modifier = { #Be nice to player tack
				factor = 100
				FROM = { is_ai = no }
				OR = {
					is_in_faction_with = FROM
					is_subject_of = FROM
				}
			}
		}

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 666
						state = 918
						state = 144
						state = 924
						state = 925
					}
				}
				FROM = {
					transfer_state = PREV
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.09 hours = 1 } }
		}
	}

	#Nope
	option = {
		name = AAT_finland_diplomacy.08.b

		ai_chance = {
			base = 200
			modifier = {
				factor = 0
				is_subject_of = FROM
			}
		}

		custom_effect_tooltip = generic_could_lead_to_tt

		#Set up array to store all the states requested by Finland that this country controls
		hidden_effect = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 666
						state = 918
						state = 144
						state = 924
						state = 925
					}
				}
				add_to_array = { PREV.target_states_array = THIS }
			}
		}

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 666
						state = 918
						state = 144
						state = 924
						state = 925
					}
				}
				add_claim_by = FROM
			}
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = PREV
					generator = PREV.target_states_array
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.10 hours = 1 } }
		}
	}
}

# Country transfers Northern states to us - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.09
	title = AAT_finland_diplomacy.09.t
	desc = AAT_finland_diplomacy.09.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.09.a

		FROM = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 666
						state = 918
						state = 144
						state = 924
						state = 925
					}
				}
				ROOT = {
					transfer_state = PREV
				}
			}
		}
	}
}

# Country refuses to transfer Northern states - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.10
	title = AAT_finland_diplomacy.10.t
	desc = AAT_finland_diplomacy.10.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes
	
	#We respect their decision (lame)
	option = {
		name = AAT_finland_diplomacy.10.a

		ai_chance = {
			base = 1
		}
	}

	#Inte chicken
	option = {
		name = AAT_finland_diplomacy.10.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = {
					is_ai = no
				}
			}
		}

		FROM = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 666
						state = 918
						state = 144
						state = 924
						state = 925
					}
				}
				add_claim_by = ROOT
			}
		}
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = FROM.target_states_array
		}

		clear_array = FROM.target_states_array
	}
}



###################################
### INTEGRATE KOLA AND KARELIA ####
###################################

# FIN asks for transferring Kola and Karelia - Event for SOV or controller of Kola and Karelian states
country_event = {
	id = AAT_finland_diplomacy.11
	title = AAT_finland_diplomacy.11.t
	desc = AAT_finland_diplomacy.11.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes
	
	#Accept
	option = {
		name = AAT_finland_diplomacy.11.a

		ai_chance = {
			base = 10
			modifier = { 
				factor = 1.5
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = { 
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = { 
				factor = 3
				has_opinion = {
					target = FROM
					value > 89
				}
			}
			modifier = { 
				factor = 1.5
				is_guaranteed_by = FROM
			}
			modifier = { 
				factor = 1.2
				has_non_aggression_pact_with = FROM
			}
			modifier = { 
				factor = 10
				is_in_faction_with = FROM
			}
			modifier = { 
				factor = 100
				is_subject_of = FROM
			}
			modifier = { #Be nice to player tack
				factor = 100
				FROM = { is_ai = no }
				OR = {
					is_in_faction_with = FROM
					is_subject_of = FROM
				}
			}
		}

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 213
						state = 215
						state = 216
					}
				}
				FROM = {
					transfer_state = PREV
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.12 hours = 1 } }
		}
	}

	#Nope
	option = {
		name = AAT_finland_diplomacy.11.b

		ai_chance = {
			base = 200
			modifier = {
				factor = 0
				is_subject_of = FROM
			}
		}

		custom_effect_tooltip = generic_could_lead_to_tt

		#Set up array to store all the states requested by Finland that this country controls
		hidden_effect = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 213
						state = 215
						state = 216
					}
				}
				add_to_array = { PREV.target_states_array = THIS }
			}
		}

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 213
						state = 215
						state = 216
					}
				}
				add_claim_by = FROM
			}
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = PREV
					generator = PREV.target_states_array
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.13 hours = 1 } }
		}
	}
}

# Country transfers Kola and Karelian states to us - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.12
	title = AAT_finland_diplomacy.12.t
	desc = AAT_finland_diplomacy.12.desc
	picture = GFX_report_event_spr_occupation_of_tangiers

	is_triggered_only = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.12.a

		FROM = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 213
						state = 215
						state = 216
					}
				}
				ROOT = {
					transfer_state = PREV
				}
				add_compliance = 50
			}
		}
	}
}

# Country refuses to transfer Kola and Karelian states - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.13
	title = AAT_finland_diplomacy.13.t
	desc = AAT_finland_diplomacy.13.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes
	
	#We respect their decision (lame)
	option = {
		name = AAT_finland_diplomacy.13.a

		ai_chance = {
			base = 1
		}
	}

	#Inte chicken
	option = {
		name = AAT_finland_diplomacy.13.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = {
					is_ai = no
				}
			}
		}

		FROM = {
			every_controlled_state = {
				limit = {
					OR = {
						state = 213
						state = 215
						state = 216
					}
				}
				add_claim_by = ROOT
			}
		}
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = FROM.target_states_array
		}

		clear_array = FROM.target_states_array
	}
}


#####################################################################
### KEEPERS OF THE BALTIC COUNTRIES ####### KEEPERS OF THE NORTH ####
#####################################################################

# FIN wants to annex us (Baltic/Nordic) - Event for Baltic/Nordic (as Finnish puppet)
country_event = {
	id = AAT_finland_diplomacy.14
	title = AAT_finland_diplomacy.14.t
	desc = AAT_finland_diplomacy.14.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes
	
	#Let's get annexed yay!
	option = {
		name = AAT_finland_diplomacy.14.a

		ai_chance = {
			base = 1
		}

		effect_tooltip = {
			FROM = {
				annex_country = {
					target = ROOT
					transfer_troops = yes
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.15 hours = 1 } }
		}

		custom_effect_tooltip = GAME_OVER_TT
	}

	#No we are not ready
	option = {
		name = AAT_finland_diplomacy.14.b

		ai_chance = { #AI will always accept
			base = 0
		}

		#effect_tooltip = { #Don't show this, AI will always respect the decision and not get claims
		#	every_core_state = {
		#		limit = {
		#			is_controlled_by = ROOT
		#		}
		#		add_claim_by = FROM
		#	}
		#}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.16 hours = 1 } }
		}
	}
}

# Baltic/Nordic country is annexed - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.15
	title = AAT_finland_diplomacy.15.t
	desc = AAT_finland_diplomacy.15.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.15.a

		if = { #Bring unit leaders if NSB is active (otherwise is just generic people)
			limit = {
				has_dlc = "No Step Back"
			}
			FROM = {
				every_unit_leader = {
					hidden_effect = {
						if = {
							limit = {
								is_field_marshal = yes
							}
							demote_leader = yes
						}
					}
					set_nationality = ROOT
				}
				every_core_state = { add_core_of = ROOT }
			}
		}
		annex_country = {
			target = FROM
			transfer_troops = yes
		}
	}
}

# Baltic/Nordic country refuses - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.16
	title = AAT_finland_diplomacy.16.t
	desc = AAT_finland_diplomacy.16.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes
	
	#We respect their decision
	option = {
		name = AAT_finland_diplomacy.16.a

		ai_chance = {
			base = 1
		}
	}

	#Inte chicken
	option = {
		name = AAT_finland_diplomacy.16.b

		ai_chance = { #AI will leave player refusing in peace
			base = 0
		}

		FROM = {
			every_core_state = {
				limit = {
					is_controlled_by = FROM
				}
				add_claim_by = ROOT
			}
		}
	}
}

# FIN wants our Baltic/Nordic states/puppets - Event for a Finnish ally with Baltic/Nordic states or puppets
country_event = {
	id = AAT_finland_diplomacy.17
	title = AAT_finland_diplomacy.17.t
	desc = AAT_finland_diplomacy.17.desc
	picture = GFX_report_event_fascist_speech

	is_triggered_only = yes
	
	#Give FIN land
	option = {
		name = AAT_finland_diplomacy.17.a

		ai_chance = {
			base = 1
			modifier = {
				factor = 0.001 #Cant be 0 or AI gets borked forever
				OR = {
					NOT = { is_in_faction_with = FROM }
					has_civil_war = yes
					AND = { #Dont give Wilno away if Fin doesn't have (or will get) the rest of LIT
						original_tag = POL
						784 = {#WILNO
							is_controlled_by = ROOT
							owner = {
								original_tag = ROOT
							}
						}
						NOT = {
							LIT = {
								any_core_state = {
									controller = {
										OR = {
											original_tag = FROM #FROM is FIN
											AND = {
												has_civil_war = no
												OR = {
													is_subject_of = FROM
													AND = {
														is_subject = no
														is_in_faction_with = FROM
													}
												}
											}
											AND = {
												has_civil_war = no
												is_subject = yes
												overlord = {
													is_in_faction_with = FROM
												}
												is_ai = yes
											}
										}
									}
								}
							}
						}
					}
				}
			}
			modifier = { #Give Wilno away only if FIN has (or will get) the rest of LIT
				add = 100
				original_tag = POL
				784 = {#WILNO
					is_controlled_by = ROOT
					owner = {
						original_tag = ROOT
					}
				}
				LIT = {
					any_core_state = {
						controller = {
							OR = {
								original_tag = FROM #FROM is FIN
								AND = {
									has_civil_war = no
									OR = {
										is_subject_of = FROM
										AND = {
											is_subject = no
											is_in_faction_with = FROM
										}
									}
								}
								AND = {
									has_civil_war = no
									is_subject = yes
									overlord = {
										is_in_faction_with = FROM
									}
									is_ai = yes
								}
							}
						}
					}
				}
			}
		}

		effect_tooltip = {
			every_state = {
				limit = {
					is_in_array = {
						array = ROOT.FIN_states_requested_by_finland_array
						value = THIS
					}
				}
				display_individual_scopes = yes
				FROM = { transfer_state = PREV }
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.18 hours = 1 } }
		}
	}

	#No we are not ready
	option = {
		name = AAT_finland_diplomacy.17.b

		ai_chance = { #AI will always accept
			base = 0
			modifier = {
				add = 1
				OR = {
					has_civil_war = yes
					AND = { #Dont give Wilno away if Fin doesn't have (or will get) the rest of LIT
						original_tag = POL
						784 = {#WILNO
							is_controlled_by = ROOT
							owner = {
								original_tag = ROOT
							}
						}
						NOT = {
							LIT = {
								any_core_state = {
									controller = {
										OR = {
											original_tag = FROM #FROM is FIN
											AND = {
												has_civil_war = no
												OR = {
													is_subject_of = FROM
													AND = {
														is_subject = no
														is_in_faction_with = FROM
													}
												}
											}
											AND = {
												has_civil_war = no
												is_subject = yes
												overlord = {
													is_in_faction_with = FROM
												}
												is_ai = yes
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}

		effect_tooltip = {
			every_state = {
				limit = {
					is_in_array = {
						array = ROOT.FIN_states_requested_by_finland_array
						value = THIS
					}
				}
				display_individual_scopes = yes
				add_claim_by = FROM
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.19 hours = 1 } }
		}
	}
}

# Country gives us Baltic/Nordic states/puppets - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.18
	title = AAT_finland_diplomacy.18.t
	desc = AAT_finland_diplomacy.18.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.18.a

		effect_tooltip = {
			every_state = {
				limit = {
					is_in_array = {
						array = FROM.FIN_states_requested_by_finland_array
						value = THIS
					}
				}
				display_individual_scopes = yes
				ROOT = { transfer_state = PREV }
			}
		}

		hidden_effect = {
			for_each_scope_loop = {
				array = FROM.FIN_states_to_come_back_to_overlord_array			
				FROM = { transfer_state = PREV }
			}
			for_each_scope_loop = {
				array = FROM.FIN_states_requested_by_finland_array			
				ROOT = { transfer_state = PREV }
				add_compliance = 30
			}
		}
	}
}

# Country refuses to give us Baltic/Nordic states/puppets - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.19
	title = AAT_finland_diplomacy.19.t
	desc = AAT_finland_diplomacy.19.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes
	
	#We respect their decision
	option = {
		name = AAT_finland_diplomacy.19.a

		ai_chance = {
			base = 1
		}

		clear_array = FROM.FIN_states_requested_by_finland_array
	}

	#Inte chicken
	option = {
		name = AAT_finland_diplomacy.16.b

		ai_chance = { #AI will leave player refusing in peace
			base = 0
		}

		effect_tooltip = {
			every_state = {
				limit = {
					is_in_array = {
						array = FROM.FIN_states_requested_by_finland_array
						value = THIS
					}
				}
				display_individual_scopes = yes
				add_claim_by = ROOT
			}
		}

		hidden_effect = {
			for_each_scope_loop = {
				array = FROM.FIN_states_requested_by_finland_array
				add_claim_by = ROOT
			}
		}

		clear_array = FROM.FIN_states_requested_by_finland_array
	}
}


##############################################
### FIN-SOV MUTUALLY-BENEFITIAL AGREEMENT ####
##############################################

# FIN asks for NAP and peace between SOV-FIN - Event for SOV
country_event = {
	id = AAT_finland_diplomacy.20
	title = AAT_finland_diplomacy.20.t
	desc = AAT_finland_diplomacy.20.desc
	picture = GFX_report_event_SOV_litvinov_beck

	is_triggered_only = yes
	
	#Accept
	option = {
		name = AAT_finland_diplomacy.20.a

		ai_chance = {
			base = 10
			modifier = { 
				factor = 5
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = { 
				factor = 10
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = { 
				factor = 20
				has_opinion = {
					target = FROM
					value > 89
				}
			}
			modifier = { 
				factor = 1.5
				is_guaranteed_by = FROM
			}
			modifier = { 
				factor = 1.2
				has_non_aggression_pact_with = FROM
			}
			modifier = { 
				factor = 10
				is_in_faction_with = FROM
			}
			modifier = { 
				factor = 100
				is_subject_of = FROM
			}
			modifier = { #Be nice to player tack
				factor = 100
				FROM = { is_ai = no }
				OR = {
					is_in_faction_with = FROM
					is_subject_of = FROM
				}
			}
		}

		effect_tooltip = {
			if = {
				limit = {
					FROM = {
						any_controlled_state = {
							is_claimed_by = ROOT
						}
					}
				}
				FROM = {
					every_controlled_state = {
						limit = {
							is_claimed_by = ROOT
						}
						remove_claim_by = ROOT 
					}
				}
			}

			if = {
				limit = {
					any_controlled_state = {
						is_claimed_by = FROM
					}
				}
				every_controlled_state = {
					limit = {
						is_claimed_by = FROM
					}
					remove_claim_by = FROM 
				}
			}

			diplomatic_relation = { 
				country = FROM
				relation = non_aggression_pact 
			}
			give_guarantee = FROM

			diplomatic_relation = { 
				country = FROM
				relation = military_access 
			}
			diplomatic_relation = { 
				country = FROM
				relation = docking_rights 
			}

			add_opinion_modifier = {
				target = FROM
				modifier = FIN_finno_soviet_pact
			}

			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = FIN_finno_soviet_pact
				}
			}

			if = { #REPRESENT PETSAMO NAVAL BASE BY A NAVAL BASE IN KOLA
				limit = {
					has_full_control_of_state = 213 #KOLA
				}
				213 = {
					#Naval base and foritifcations in Petsamo area
					add_building_construction = {
						type = naval_base
						level = 4
						instant_build = yes
						province = 6117
					}
					add_building_construction = {
						type = bunker
						level = 2
						instant_build = yes
						province = 6117
					}
					add_building_construction = {
						type = coastal_bunker
						level = 2
						instant_build = yes
						province = 6117
					}

					#Fortifications in Murmansk
					add_building_construction = {
						type = bunker
						level = 2
						instant_build = yes
						province = 3134
					}
					add_building_construction = {
						type = coastal_bunker
						level = 2
						instant_build = yes
						province = 3134
					}

					#Railway Murmansk-Petsamoish naval base
					build_railway = {
						path = { 3134 11183 6117 }
					}
				}
			}

			unlock_national_focus = SOV_secure_leningrad #Handled via bypass trigger in the focus
		}

		hidden_effect = {
			set_country_flag = FIN_finno_soviet_pact_flag
			FROM = { country_event = { id = AAT_finland_diplomacy.21 hours = 1 } }

			# AI more friendly
			add_ai_strategy = { 
				type = befriend 
				id = FROM
				value = 40
			}
			FROM = {
				add_ai_strategy = { 
					type = befriend 
					id = ROOT
					value = 40
				}
			}

			#AI less hostile
			add_ai_strategy = { 
				type = antagonize 
				id = FROM
				value = -100
			}
			add_ai_strategy = { 
				type = conquer 
				id = FROM
				value = -100
			}
		}
	}

	#Nope
	option = {
		name = AAT_finland_diplomacy.20.b

		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					is_subject_of = FROM
					is_in_faction_with = FROM
				}
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.22 hours = 1 } }
		}
	}
}

# SOV signs the Finno-Soviet Pact - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.21
	title = AAT_finland_diplomacy.21.t
	desc = AAT_finland_diplomacy.21.desc
	picture = GFX_report_event_molotov_ribentrop_handshake

	is_triggered_only = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.21.a

		if = {
			limit = {
				FROM = {
					any_controlled_state = {
						is_claimed_by = ROOT
					}
				}
			}
			FROM = {
				every_controlled_state = {
					limit = {
						is_claimed_by = ROOT
					}
					remove_claim_by = ROOT 
				}
			}
		}

		if = {
			limit = {
				any_controlled_state = {
					is_claimed_by = FROM
				}
			}
			every_controlled_state = {
				limit = {
					is_claimed_by = FROM
				}
				remove_claim_by = FROM 
			}
		}

		diplomatic_relation = { 
			country = FROM
			relation = non_aggression_pact 
		}

		FROM = {
			give_guarantee = ROOT

			diplomatic_relation = { 
				country = FROM
				relation = military_access 
			}
			diplomatic_relation = { 
				country = FROM
				relation = docking_rights 
			}

		}

		hidden_effect = { #Not relevant for player and prevents issue with focus tooltip
			add_opinion_modifier = {
				target = FROM
				modifier = FIN_finno_soviet_pact
			}
		}

		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = FIN_finno_soviet_pact
			}
		}

		FROM = {
			if = { #REPRESENT PETSAMO NAVAL BASE BY A NAVAL BASE IN KOLA
				limit = {
					has_full_control_of_state = 213 #KOLA
				}
				213 = {
					#Naval base and foritifcations in Petsamo area
					add_building_construction = {
						type = naval_base
						level = 4
						instant_build = yes
						province = 6117
					}
					add_building_construction = {
						type = bunker
						level = 2
						instant_build = yes
						province = 6117
					}
					add_building_construction = {
						type = coastal_bunker
						level = 2
						instant_build = yes
						province = 6117
					}

					#Fortifications in Murmansk
					add_building_construction = {
						type = bunker
						level = 2
						instant_build = yes
						province = 3134
					}
					add_building_construction = {
						type = coastal_bunker
						level = 2
						instant_build = yes
						province = 3134
					}

					#Railway Murmansk-Petsamoish naval base
					build_railway = {
						path = { 3134 11183 6117 }
					}
				}
			}
		}
	}
}

# SOV refuses to sign Finno-Soviet Pact - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.22
	title = AAT_finland_diplomacy.22.t
	desc = AAT_finland_diplomacy.22.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes
	
	#We respect their decision
	option = {
		name = AAT_finland_diplomacy.22.a

		ai_chance = {
			base = 1
		}
		uncomplete_national_focus = {
			focus = FIN_approach_the_soviets
		}
		uncomplete_national_focus = {
			focus = FIN_finno_soviet_pact
		}
		set_country_flag = FIN_soviet_refused_finno_soviet_pact_flag
	}
}


###############################
### ANTAGONIZE THE SOVIETS ####
###############################

# FIN asks for a guarantee (for SOV) - Event for European democratic/commie majors (not SOV)
country_event = {
	id = AAT_finland_diplomacy.23
	title = AAT_finland_diplomacy.23.t
	desc = AAT_finland_diplomacy.23.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes
	
	#Accept
	option = {
		name = AAT_finland_diplomacy.23.a

		ai_chance = {
			base = 10
			modifier = { 
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = { 
				factor = 5
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = { 
				factor = 10
				has_opinion = {
					target = FROM
					value > 89
				}
			}
			modifier = { 
				factor = 1.5
				is_guaranteed_by = FROM
			}
			modifier = { 
				factor = 1.2
				has_non_aggression_pact_with = FROM
			}
			modifier = { 
				factor = 10
				is_in_faction_with = FROM
			}
			modifier = { 
				factor = 100
				is_subject_of = FROM
			}
			modifier = { #Be nice to player tack
				factor = 100
				FROM = { is_ai = no }
				OR = {
					is_in_faction_with = FROM
					is_subject_of = FROM
				}
			}
		}

		effect_tooltip = {
			give_guarantee = FROM
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.24 hours = 1 } }

			# AI more friendly
			add_ai_strategy = { 
				type = befriend 
				id = FROM
				value = 40
			}
			add_ai_strategy = { 
				type = send_volunteers_desire 
				id = FROM
				value = 100
			}
			FROM = {
				add_ai_strategy = { 
					type = befriend 
					id = ROOT
					value = 40
				}
			}

			#AI less hostile
			add_ai_strategy = { 
				type = antagonize 
				id = FROM
				value = -100
			}
			add_ai_strategy = { 
				type = conquer 
				id = FROM
				value = -100
			}
		}
	}

	#Nope
	option = {
		name = AAT_finland_diplomacy.23.b

		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					is_subject_of = FROM
					is_in_faction_with = FROM
				}
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.25 hours = 1 } }
		}
	}
}

# Country guarantees FIN - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.24
	title = AAT_finland_diplomacy.24.t
	desc = AAT_finland_diplomacy.24.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	#COOL!
	option = {
		name = AAT_finland_diplomacy.24.a

		FROM = {
			give_guarantee = ROOT
		}
	}
}

# Country refuses to guarantee FIN - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.25
	title = AAT_finland_diplomacy.25.t
	desc = AAT_finland_diplomacy.25.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes
	
	#We respect their decision
	option = {
		name = AAT_finland_diplomacy.25.a

		ai_chance = {
			base = 1
		}

	}
}


###############################
### SEEK GERMAN PROTECTION ####
###############################

# FIN proposes German guarantee in exchange for resources - Event for GER
country_event = {
	id = AAT_finland_diplomacy.26
	title = AAT_finland_diplomacy.26.t
	desc = AAT_finland_diplomacy.26.desc
	picture = GFX_report_event_german_italian_pact

	is_triggered_only = yes

	fire_only_once = yes
	
	#Sure!
	option = {
		name = AAT_finland_diplomacy.26.a

		ai_chance = {
			base = 100
			modifier = { #In case more modifiers are added
				factor = 10
				is_historical_focus_on = yes
				has_government = fascism
			}
			modifier = {
				factor = 0
				OR = {
					has_wargoal_against = FROM
					is_justifying_wargoal_against = FROM
					is_in_faction_with = SOV
					has_subject = SOV
					has_guaranteed = SOV
				}
			}
		}

		effect_tooltip = {
			FROM = {
				give_military_access = ROOT
				diplomatic_relation = { 
					country = ROOT
					relation = docking_rights 
					active = yes
				}
				diplomatic_relation = { 
					country = ROOT
					relation = non_aggression_pact 
					active = yes
				}
			}
			give_guarantee = FROM

			FROM = {
				give_resource_rights = {
					receiver = ROOT
					state = 148
				}
			}
		}

		hidden_effect = {
			# AI more friendly
			add_ai_strategy = { 
				type = befriend 
				id = FROM
				value = 40
			}
			FROM = {
				add_ai_strategy = { 
					type = befriend 
					id = ROOT
					value = 40
				}
			}

			#AI less hostile
			add_ai_strategy = { 
				type = antagonize 
				id = FROM
				value = -100
			}
			add_ai_strategy = { 
				type = conquer 
				id = FROM
				value = -100
			}
			FROM = {
				add_ai_strategy = { 
					type = antagonize 
					id = ROOT
					value = -100
				}
				add_ai_strategy = { 
					type = conquer 
					id = ROOT
					value = -100
				}
			}

			FROM = { country_event = { id = AAT_finland_diplomacy.27 hours = 2 } }
		}
	}

	#Inte chicken
	option = {
		name = AAT_finland_diplomacy.26.b

		ai_chance = {
			base = 0
			modifier = {
				add = 100
				OR = {
					has_wargoal_against = FROM
					is_justifying_wargoal_against = FROM
					is_in_faction_with = SOV
					has_subject = SOV
					has_guaranteed = SOV
				}
			}
		}

		effect_tooltip = {
			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_rejected_our_proposal
				}
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_diplomacy.28 hours = 2 } }
		}
	}
}


# GER agrees to guarantee for resources - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.27
	title = AAT_finland_diplomacy.27.t
	desc = AAT_finland_diplomacy.27.desc
	picture = GFX_report_event_FIN_finnish_german_pact

	is_triggered_only = yes

	fire_only_once = yes
	
	#Cool! See you in June 1941
	option = {
		name = AAT_finland_diplomacy.27.a
		
		give_military_access = FROM
		diplomatic_relation = { 
			country = FROM
			relation = docking_rights 
			active = yes
		}
		diplomatic_relation = { 
			country = FROM
			relation = non_aggression_pact 
			active = yes
		}
		FROM = {
			give_guarantee = ROOT
		}

		give_resource_rights = {
			receiver = FROM
			state = 148
		}
	}
}

# GER refuses to guarantee for resources - Event for FIN
country_event = {
	id = AAT_finland_diplomacy.28
	title = AAT_finland_diplomacy.28.t
	desc = AAT_finland_diplomacy.28.desc
	picture = GFX_report_event_FIN_risto_ryti_speech

	is_triggered_only = yes

	fire_only_once = yes
	
	#Oh nej
	option = {
		name = AAT_finland_diplomacy.28.a

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_rejected_our_proposal
		}

		set_country_flag = FIN_germans_rejected_to_protect_finland_flag
		uncomplete_national_focus = {
			focus = FIN_seek_german_protection
		}
	}
}






##      ## #### ##    ## ######## ######## ########     ##      ##    ###    ########  
##  ##  ##  ##  ###   ##    ##    ##       ##     ##    ##  ##  ##   ## ##   ##     ## 
##  ##  ##  ##  ####  ##    ##    ##       ##     ##    ##  ##  ##  ##   ##  ##     ## 
##  ##  ##  ##  ## ## ##    ##    ######   ########     ##  ##  ## ##     ## ########  
##  ##  ##  ##  ##  ####    ##    ##       ##   ##      ##  ##  ## ######### ##   ##   
##  ##  ##  ##  ##   ###    ##    ##       ##    ##     ##  ##  ## ##     ## ##    ##  
 ###  ###  #### ##    ##    ##    ######## ##     ##     ###  ###  ##     ## ##     ## 


# Request Swedish Assistance? - Event for FIN 
country_event = {
	id = AAT_finland_winter_war.01
	title = finland.2.t
	desc = finland.2.d
	picture = GFX_report_event_soviet_finnish_pact
	
	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = finland.2.a

		ai_chance = {
			base = 10
		}

		SWE = {
			country_event = { id = finland.3 }
		}
	}

	option = {
		name = finland.2.b

		ai_chance = {
			base = 0
		}
	}
}

# Finnish demands available - event for FIN (after completing mission and taking the decision to send demands)
country_event = {
	id = AAT_finland_winter_war.02
	title = AAT_finland_winter_war.02.t
	desc = AAT_finland_winter_war.02.desc
	picture = GFX_report_event_soviet_invasion_map
	
	is_triggered_only = yes

	#OK
	option = {
		name = AAT_finland_winter_war.02.a
		
		unlock_decision_tooltip = FIN_demand_peace_negotiations
	}
}

# FIN demands white peace after turning the tables in Winter War - Event for SOV (after FIN occupies either Leningrad)
country_event = {
	id = AAT_finland_winter_war.03
	title = AAT_finland_winter_war.03.t
	desc = AAT_finland_winter_war.03.desc
	picture = GFX_report_event_soviet_soldiers
	
	fire_only_once = yes

	is_triggered_only = yes

	#Accept
	option = {
		name = AAT_finland_winter_war.03.a
		
		ai_chance = {
			base = 1 #Soviets should always surrender territory otherwise Finnish player can get screwed
		}

		effect_tooltip = {
			white_peace = FROM
			if = {
				limit = {
					FROM = {
						is_faction_leader = yes
					}
				}
				every_enemy_country = {
					limit = {
						is_in_faction_with = FROM
					}
					ROOT = { white_peace = PREV }
				}
			}
			else_if = {
				limit = {
					FROM = {
						is_subject = yes
					}
				}
				FROM = {
					overlord = {
						ROOT = { white_peace = PREV }
					}
				}
				if = {
					limit = {
						FROM = {
							any_allied_country = {
								has_war_with = ROOT
							}
						}
					}
					every_other_country = {
						limit = {
							is_in_faction_with = FROM
							has_war_with = ROOT
						}
						ROOT = { white_peace = PREV }
					}
				}
			}
			FROM = {
				every_owned_state = {
					limit = {
						is_claimed_by = ROOT
					}
					remove_claim_by = ROOT
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_winter_war.04 hours = 1 } }
		}
	}

	#Reject
	option = {
		name = AAT_finland_winter_war.03.b

		ai_chance = {
			base = 0
		}

		add_stability = -0.1
		add_war_support = -0.1
		SOV_paranoia_medium_increase_effect = yes
		add_timed_idea = {
			idea = FIN_public_opposition_to_the_winter_war
			days = 730
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_winter_war.05 hours = 1 } }
		}
	}
}

# Soviets accept white peace - event for FIN
country_event = {
	id = AAT_finland_winter_war.04
	title = AAT_finland_winter_war.04.t
	desc = AAT_finland_winter_war.04.desc
	picture = GFX_report_event_soviet_finnish_pact
	
	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = AAT_finland_winter_war.04.a
		
		white_peace = FROM
		if = {
			limit = {
				is_faction_leader = yes
			}
			every_other_country = {
				limit = {
					is_in_faction_with = ROOT
				}
				white_peace = FROM
			}
		}
		else_if = {
			limit = {
				is_subject = yes
			}
			overlord = {
				white_peace = FROM
			}
			if = {
				limit = {
					any_allied_country = {
						has_war_with = FROM
					}
				}
				every_other_country = {
					limit = {
						is_in_faction_with = ROOT
						has_war_with = FROM
					}
					white_peace = FROM
				}
			}
		}

		every_owned_state = {
			limit = {
				is_claimed_by = FROM
			}
			remove_claim_by = FROM
		}
		hidden_effect = { #Prevent Soviet AI from insta-justify on Finland after peacing out.
			FROM = {
				add_ai_strategy = { 
					type = antagonize 
					id = ROOT
					value = -200
				}
			}
		}
	}
}

# Soviets reject white peace - event for FIN
country_event = {
	id = AAT_finland_winter_war.05
	title = AAT_finland_winter_war.05.t
	desc = AAT_finland_winter_war.05.desc
	picture = GFX_report_event_soviet_finnish_pact
	
	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = AAT_finland_winter_war.05.a
		
		effect_tooltip = {
			FROM = {
				add_stability = -0.1
				add_war_support = -0.1
				SOV_paranoia_medium_increase_effect = yes
				add_timed_idea = {
					idea = FIN_public_opposition_to_the_winter_war
					days = 730
				}
			}
		}	
	}
}

# FIN demands peace and territorial concessions after turning the tables in Winter War - Event for SOV (after FIN occupies either Leningrad)
country_event = {
	id = AAT_finland_winter_war.06
	title = AAT_finland_winter_war.06.t
	desc = AAT_finland_winter_war.06.desc
	picture = GFX_report_event_soviet_soldiers
	
	fire_only_once = yes

	is_triggered_only = yes

	#Accept
	option = {
		name = AAT_finland_winter_war.06.a
		
		ai_chance = {
			base = 1 #Soviets should always surrender territory otherwise Finnish player can get screwed
		}

		effect_tooltip = {
			white_peace = FROM
			if = {
				limit = {
					FROM = {
						is_faction_leader = yes
					}
				}
				every_enemy_country = {
					limit = {
						is_in_faction_with = FROM
					}
					ROOT = { white_peace = PREV }
				}
			}
			else_if = {
				limit = {
					FROM = {
						is_subject = yes
					}
				}
				FROM = {
					overlord = {
						ROOT = { white_peace = PREV }
					}
				}
				if = {
					limit = {
						FROM = {
							any_allied_country = {
								has_war_with = ROOT
							}
						}
					}
					every_other_country = {
						limit = {
							is_in_faction_with = FROM
							has_war_with = ROOT
						}
						ROOT = { white_peace = PREV }
					}
				}
			}

			FROM = {
				every_owned_state = {
					limit = {
						is_claimed_by = ROOT
					}
					remove_claim_by = ROOT
				}
			}

			#MURMANSK
			if = {
				limit = {
					213 = { has_state_flag = FIN_demanded_by_finland_in_winter_war_flag }
				}
				FROM = { transfer_state = 213 }
			}
			#ONEGA
			if = {
				limit = {
					215 = { has_state_flag = FIN_demanded_by_finland_in_winter_war_flag }
				}
				FROM = { transfer_state = 215 }
			}
			#OLONETS
			if = {
				limit = {
					216 = { has_state_flag = FIN_demanded_by_finland_in_winter_war_flag }
				}
				FROM = { transfer_state = 216 }
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_winter_war.07 hours = 1 } }
		}
	}

	#Reject
	option = {
		name = AAT_finland_winter_war.06.b

		ai_chance = {
			base = 0
		}

		add_stability = -0.1
		add_war_support = -0.1
		SOV_paranoia_medium_increase_effect = yes
		add_timed_idea = {
			idea = FIN_public_opposition_to_the_winter_war
			days = 730
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_winter_war.08 hours = 6 random_hours = 4 } }
		}
	}
}

# Soviets accept peace demands - event for FIN
country_event = {
	id = AAT_finland_winter_war.07
	title = AAT_finland_winter_war.04.t #intentional
	desc = AAT_finland_winter_war.07.desc
	picture = GFX_report_event_soviet_finnish_pact
	
	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = AAT_finland_winter_war.07.a
		
		white_peace = FROM
		if = {
			limit = {
				is_faction_leader = yes
			}
			every_other_country = {
				limit = {
					is_in_faction_with = ROOT
				}
				white_peace = FROM
			}
		}
		else_if = {
			limit = {
				is_subject = yes
			}
			overlord = {
				white_peace = FROM
			}
			if = {
				limit = {
					any_allied_country = {
						has_war_with = FROM
					}
				}
				every_other_country = {
					limit = {
						is_in_faction_with = ROOT
						has_war_with = FROM
					}
					white_peace = FROM
				}
			}
		}

		every_owned_state = {
			limit = {
				is_claimed_by = FROM
			}
			remove_claim_by = FROM
		}

		hidden_effect = { #Prevent Soviet AI from insta-justify on Finland after peacing out.
			FROM = {
				add_ai_strategy = { 
					type = antagonize 
					id = ROOT
					value = -200
				}
			}
		}

		#MURMANSK
		if = {
			limit = {
				213 = { has_state_flag = FIN_demanded_by_finland_in_winter_war_flag }
			}
			transfer_state = 213
		}
		#ONEGA
		if = {
			limit = {
				215 = { has_state_flag = FIN_demanded_by_finland_in_winter_war_flag }
			}
			transfer_state = 215
		}
		#OLONETS
		if = {
			limit = {
				216 = { has_state_flag = FIN_demanded_by_finland_in_winter_war_flag }
			}
			transfer_state = 216
		}
	}
}

# Soviets reject peace demands - event for FIN
country_event = {
	id = AAT_finland_winter_war.08
	title = AAT_finland_winter_war.05.t #intentional
	desc = AAT_finland_winter_war.08.desc
	picture = GFX_report_event_soviet_finnish_pact
	
	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = AAT_finland_winter_war.08.a
		
		effect_tooltip = {
			FROM = {
				add_stability = -0.1
				add_war_support = -0.1
				SOV_paranoia_medium_increase_effect = yes
				add_timed_idea = {
					idea = FIN_public_opposition_to_the_winter_war
					days = 730
				}
			}
		}
	}
}



 ######   #######  ##    ## ######## #### ##    ## ##     ##    ###    ######## ####  #######  ##    ##    ##      ##    ###    ########  
##    ## ##     ## ###   ##    ##     ##  ###   ## ##     ##   ## ##      ##     ##  ##     ## ###   ##    ##  ##  ##   ## ##   ##     ## 
##       ##     ## ####  ##    ##     ##  ####  ## ##     ##  ##   ##     ##     ##  ##     ## ####  ##    ##  ##  ##  ##   ##  ##     ## 
##       ##     ## ## ## ##    ##     ##  ## ## ## ##     ## ##     ##    ##     ##  ##     ## ## ## ##    ##  ##  ## ##     ## ########  
##       ##     ## ##  ####    ##     ##  ##  #### ##     ## #########    ##     ##  ##     ## ##  ####    ##  ##  ## ######### ##   ##   
##    ## ##     ## ##   ###    ##     ##  ##   ### ##     ## ##     ##    ##     ##  ##     ## ##   ###    ##  ##  ## ##     ## ##    ##  
 ######   #######  ##    ##    ##    #### ##    ##  #######  ##     ##    ##    ####  #######  ##    ##     ###  ###  ##     ## ##     ## 


# FIN proposes pact for Continuation War - Event for GER
country_event = {
	id = AAT_finland_continuation_war.01
	title = AAT_finland_continuation_war.01.t
	desc = AAT_finland_continuation_war.01.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	fire_only_once = yes
	
	#Sure!
	option = {
		name = AAT_finland_continuation_war.01.a

		ai_chance = {
			base = 100
			modifier = { #In case more modifiers are added
				factor = 10
				is_historical_focus_on = yes
				has_government = fascism
			}
			modifier = {
				factor = 0
				OR = {
					has_wargoal_against = FROM
					is_justifying_wargoal_against = FROM
					is_in_faction_with = SOV
					has_subject = SOV
					has_guaranteed = SOV
				}
			}
		}

		effect_tooltip = {
			FROM = {
				give_military_access = ROOT
				diplomatic_relation = { 
					country = ROOT
					relation = docking_rights 
					active = yes
				}
				diplomatic_relation = { 
					country = ROOT
					relation = non_aggression_pact 
					active = yes
				}
			}
			give_guarantee = FROM

			FROM = {
				if = {
					limit = {
						has_dlc = "No Step Back"
					}
					add_equipment_to_stockpile = { 
						type = light_tank_chassis_1
						amount = 50
						producer = ROOT
					}
				}
				else = {
					add_equipment_to_stockpile = { 
						type = light_tank_equipment_1
						amount = 50
						producer = ROOT
					}
				}
				if = {
					limit = {
						has_dlc = "By Blood Alone"
					}
					add_equipment_to_stockpile = { 
						type = small_plane_airframe_1
						amount = 50
						producer = ROOT
					}
				}
				else = {
					add_equipment_to_stockpile = { 
						type = fighter_equipment_1
						amount = 50
						producer = ROOT
					}
				}
				add_equipment_to_stockpile = { 
					type = convoy_1
					amount = 50
					producer = ROOT
				}
				add_equipment_to_stockpile = { 
					type = artillery_equipment_1
					amount = 50
					producer = ROOT
				}
				add_equipment_to_stockpile = { 
					type = anti_air_equipment_1
					amount = 25
					producer = ROOT
				}
				add_equipment_to_stockpile = { 
					type = infantry_equipment_1
					amount = 3000
					producer = ROOT
				}
				add_equipment_to_stockpile = { 
					type = support_equipment_1
					amount = 300
					producer = ROOT
				}
			}
		}
		custom_effect_tooltip = FIN_pact_for_continuation_war_ger_tt

		hidden_effect = {
			#For ease of use inside on_action
			set_country_flag = FIN_pact_for_continuation_war_flag
			FROM = { set_country_flag = FIN_pact_for_continuation_war_flag }

			# AI more friendly
			add_ai_strategy = { 
				type = befriend 
				id = FROM
				value = 40
			}
			FROM = {
				add_ai_strategy = { 
					type = befriend 
					id = ROOT
					value = 40
				}
			}

			#AI less hostile
			add_ai_strategy = { 
				type = antagonize 
				id = FROM
				value = -100
			}
			add_ai_strategy = { 
				type = conquer 
				id = FROM
				value = -100
			}
			FROM = {
				add_ai_strategy = { 
					type = antagonize 
					id = ROOT
					value = -100
				}
				add_ai_strategy = { 
					type = conquer 
					id = ROOT
					value = -100
				}
			}

			FROM = { country_event = { id = AAT_finland_continuation_war.02 hours = 2 } }
		}
	}

	#Inte chicken
	option = {
		name = AAT_finland_continuation_war.01.b

		ai_chance = {
			base = 0
			modifier = {
				add = 100
				OR = {
					has_wargoal_against = FROM
					is_justifying_wargoal_against = FROM
					is_in_faction_with = SOV
					has_subject = SOV
					has_guaranteed = SOV
				}
			}
		}

		effect_tooltip = {
			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_rejected_our_proposal
				}
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = AAT_finland_continuation_war.03 hours = 2 } }
		}
	}
}


# GER agrees to the pact for Continuation War - Event for FIN
country_event = {
	id = AAT_finland_continuation_war.02
	title = AAT_finland_continuation_war.02.t
	desc = AAT_finland_continuation_war.02.desc
	picture = GFX_report_event_FIN_finnish_german_pact

	is_triggered_only = yes

	fire_only_once = yes
	
	#Cool! See you in June 1941
	option = {
		name = AAT_finland_continuation_war.02.a
		
		ROOT = {
			if = {
				limit = {
					has_dlc = "No Step Back"
				}
				add_equipment_to_stockpile = { 
					type = light_tank_chassis_1
					amount = 50
					producer = FROM
				}
			}
			else = {
				add_equipment_to_stockpile = { 
					type = light_tank_equipment_1
					amount = 50
					producer = FROM
				}
			}
			if = {
				limit = {
					has_dlc = "By Blood Alone"
				}
				add_equipment_to_stockpile = { 
					type = small_plane_airframe_1
					amount = 50
					producer = FROM
				}
			}
			else = {
				add_equipment_to_stockpile = { 
					type = fighter_equipment_1
					amount = 50
					producer = FROM
				}
			}
			add_equipment_to_stockpile = { 
				type = convoy_1
				amount = 50
				producer = FROM
			}
			add_equipment_to_stockpile = { 
				type = artillery_equipment_1
				amount = 50
				producer = FROM
			}
			add_equipment_to_stockpile = { 
				type = anti_air_equipment_1
				amount = 25
				producer = FROM
			}
			add_equipment_to_stockpile = { 
				type = infantry_equipment_1
				amount = 3000
				producer = FROM
			}
			add_equipment_to_stockpile = { 
				type = support_equipment_1
				amount = 300
				producer = FROM
			}
		}

		FIN_pact_for_continuation_war_start = yes
		custom_effect_tooltip = FIN_pact_for_continuation_war_fin_tt
	}
}

# GER rejects the pact for Continuation War - Event for FIN
country_event = {
	id = AAT_finland_continuation_war.03
	title = AAT_finland_continuation_war.03.t
	desc = AAT_finland_continuation_war.03.desc
	picture = GFX_report_event_FIN_risto_ryti_speech

	is_triggered_only = yes

	fire_only_once = yes
	
	#Oh nej
	option = {
		name = AAT_finland_continuation_war.03.a

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_rejected_our_proposal
		}
	}
}

# Pact for continuation war broken - Event for FIN & GER
country_event = {
	id = AAT_finland_continuation_war.04
	title = AAT_finland_continuation_war.04.t
	desc = AAT_finland_continuation_war.04.desc
	picture = GFX_report_event_soviet_german_soldier_handshake

	is_triggered_only = yes

	fire_only_once = yes
	
	#Oh nej
	option = {
		name = AAT_finland_continuation_war.04.a

		custom_effect_tooltip = FIN_pact_for_continuation_war_broken_tt
		hidden_effect = {
			#Clear flag
			clr_country_flag = FIN_pact_for_continuation_war_flag

			#Reset AI strats added previously	
			if = {
				limit = {
					original_tag = FIN
				}
				add_ai_strategy = { 
					type = befriend 
					id = GER
					value = -40
				}
				add_ai_strategy = { 
					type = antagonize 
					id = GER
					value = 100
				}
				add_ai_strategy = { 
					type = conquer 
					id = GER
					value = 100
				}
			}
			else_if = {
				limit = {
					original_tag = GER
				}
				add_ai_strategy = { 
					type = befriend 
					id = FIN
					value = -40
				}
				add_ai_strategy = { 
					type = antagonize 
					id = FIN
					value = 100
				}
				add_ai_strategy = { 
					type = conquer 
					id = FIN
					value = 100
				}
			}
		}
	}
}

# CONTINUATION WAR STARTS - Event for FIN
country_event = {
	id = AAT_finland_continuation_war.05
	title = AAT_finland_continuation_war.05.t
	desc = AAT_finland_continuation_war.05.desc
	picture = GFX_report_event_FIN_continuation_war

	is_triggered_only = yes

	fire_only_once = yes
	
	immediate = {
		hidden_effect = {
			FIN_pact_for_continuation_war_start = yes
			declare_war_on = {
				target = SOV
				type = topple_government
			}
			add_ideas = FIN_defense_idea
		}
	}

	#Go go go
	option = {
		name = AAT_finland_continuation_war.05.a

		effect_tooltip = {
			FIN_pact_for_continuation_war_start = yes #In case some treaty was missing
			add_to_war = {
				targeted_alliance = GER
				enemy = SOV
				hostility_reason = asked_to_join
			}
		}

		hidden_effect = {
			#Clear flag
			clr_country_flag = FIN_pact_for_continuation_war_flag
		}
	}
}

# Continuation War Starts - Event for GER
country_event = {
	id = AAT_finland_continuation_war.06
	title = AAT_finland_continuation_war.05.t #intentional
	desc = AAT_finland_continuation_war.06.desc
	picture = GFX_report_event_FIN_continuation_war

	is_triggered_only = yes

	fire_only_once = yes
	
	#Goes
	option = {
		name = AAT_finland_continuation_war.06.a

		effect_tooltip = {
			FIN = {
				FIN_pact_for_continuation_war_start = yes #In case some treaty was missing
				add_to_war = {
					targeted_alliance = ROOT
					enemy = SOV
					hostility_reason = asked_to_join
				}
			}
		}
		hidden_effect = {
			#Clear flag
			clr_country_flag = FIN_pact_for_continuation_war_flag
		}
	}
}

# Continuation War Starts - Event for SOV
country_event = {
	id = AAT_finland_continuation_war.07
	title = AAT_finland_continuation_war.05.t #intentional
	desc = AAT_finland_continuation_war.07.desc
	picture = GFX_report_event_FIN_continuation_war

	is_triggered_only = yes

	fire_only_once = yes
	
	#Oh nej
	option = {
		name = AAT_finland_continuation_war.07.a

		effect_tooltip = {
			FIN = {
				FIN_pact_for_continuation_war_start = yes #In case some treaty was missing
				add_to_war = {
					targeted_alliance = GER
					enemy = ROOT
					hostility_reason = asked_to_join
				}
			}
		}
	}
}

# Soviet response to Finish Armistice of Moscow request - Event for SOV
country_event = {
	id = AAT_finland_continuation_war.08
	title = AAT_finland_continuation_war.08.t
	desc = AAT_finland_continuation_war.08.desc
	picture = GFX_report_event_FIN_armistice_of_moscow_negotiations
	
	is_triggered_only = yes

	# Let us sign the Armistice of Moscow
	option = {
		name = AAT_finland_continuation_war.08.a
		ai_chance = {
			base = 9
		}

		white_peace = FIN

		### TRANSFER STATES ###
		#KARJALA
		IF = {
			limit = {	
				146 = {
					is_owned_by = FROM
				}
			}
			transfer_state = 146
		}

		#SALLA
		IF = {
			limit = {
				147 = {
					is_owned_by = FROM
				}
			}
			transfer_state = 147
		}

		#PETSAMO
		IF = {
			limit = {
				722 = {	
					is_owned_by = FROM
				}
			}
			transfer_state = 722
		}

		FIN = {
			add_ai_strategy = {
				type = antagonize
				id = "SOV"			
				value = -200
			}
		}
	
		FIN = {
			add_ai_strategy = {
				type = befriend
				id = "GER"			
				value = -200
			}
		}

		GER = {
			add_ai_strategy = {
				type = befriend 
				id = "FIN"			
				value = -200
			}
		}

		FROM = {
			send_equipment = {
				equipment = infantry_equipment
				amount = 2500
				target = ROOT
			}	
			send_equipment = {
				equipment = support_equipment
				amount = 500
				target = ROOT
			}
			send_equipment = {
				equipment = artillery_equipment
				amount = 150
				target = ROOT
			}
		}

		army_experience = 25

		navy_experience = 25

		air_experience = 25

		add_political_power = 100

		hidden_effect = {
			news_event = { id = aat_news.120 hours = 12 }

			IF = {
				limit = {
					OR = {
						666 = {
							is_controlled_by = GER
							
							any_country = {
								OR = {
									is_in_faction_with = GER
									is_subject_of = GER
								}
								controls_state = PREV
							}
						}

						925 = {
							is_controlled_by = GER
							
							any_country = {
								OR = {
									is_in_faction_with = GER
									is_subject_of = GER
								}
								controls_state = PREV
							}
						}

						924 = {
							is_controlled_by = GER
							
							any_country = {
								OR = {
									is_in_faction_with = GER
									is_subject_of = GER
								}
								controls_state = PREV
							}
						}
					}

					GER = {
						has_military_access_to = FIN 
					}
				}
				# The Soviets Forcing us to oust German Troops from our territory
				FROM = { 
					country_event = { 
						id = AAT_finland_continuation_war.10
						days = 3
						random_days = 5
					} 
				}
			}
		}
		hidden_effect = { # Used to prevent Finland to activate both Armistice and Switch sides decisions at the same time
			FROM = { clr_country_flag = FIN_negotiating_armistice_flag }
		}
	}

	# They will not get off easy this time!
	option = {
		name = AAT_finland_continuation_war.08.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}			
		}
		# The Soviets Reject
		FROM = { 
			country_event = { 
				id = AAT_finland_continuation_war.09 
				days = 1
				random_days = 2
			} 
		}

		add_command_power = -25

		add_political_power = -50

		hidden_effect = { # Used to prevent Finland to activate both Armistice and Switch sides decisions at the same time
			FROM = { clr_country_flag = FIN_negotiating_armistice_flag }
		}
	}
}

# Soviet response to Finish Armistice of Moscow request - Event for FIN
country_event = {
	id = AAT_finland_continuation_war.09
	title = AAT_finland_continuation_war.09.t
	desc = AAT_finland_continuation_war.09.desc
	picture = GFX_report_event_FIN_armistice_of_moscow_negotiations
	
	is_triggered_only = yes

	# Prepare the defenses!
	option = {
		name = AAT_finland_continuation_war.09.a

		army_experience = 25

		add_stability = -0.05

		add_war_support = 0.05
		
	}
}

# The Soviets Forcing us to oust German Troops from our territory (Start of the Lapland War) - Event for FIN
country_event = {
	id = AAT_finland_continuation_war.10
	title = AAT_finland_continuation_war.10.t
	desc = AAT_finland_continuation_war.10.desc
	picture = GFX_report_event_FIN_three_country_cairn_flag_raising
	
	is_triggered_only = yes

	# We must comply, lest we have another war on our hands
	option = {
		name = AAT_finland_continuation_war.10.a

		IF = {
			limit = {
				GER = {
					has_military_access_to = ROOT
				}
			}
			FIN = {
				diplomatic_relation = { 
					country = GER
					relation = military_access 
					active = no
				}
				diplomatic_relation = { 
					country = GER
					relation = docking_rights 
					active = no
				}
				diplomatic_relation = { 
					country = GER
					relation = non_aggression_pact 
					active = no
				}
			}
			GER = {
				diplomatic_relation = { 
					country = FIN
					relation = guarantee 
					active = no
				}
			}
		}

		add_popularity = {
			ideology = communism
			popularity = 0.15
		}	

		add_stability = -0.02
		add_war_support = 0.01

		add_timed_idea = {
			idea = FIN_the_lapland_war
			days = 186
		}	

		add_equipment_to_stockpile = { 
			type = convoy_1
			amount = -25
			producer = FIN
		}	

		add_equipment_to_stockpile = { 
			type = infantry_equipment
			amount = -250
			producer = FIN
		}

		hidden_effect = {
			
			# Officers Initiate Operation Birke (Lapland War start)
			GER = { 
				country_event = { 
					id = AAT_finland_continuation_war.11
					days = 1
					random_days = 2
				} 
			}
			
		}	
		
	}
}

# Officers Initiate Operation Birke - Event for GER
country_event = {
	id = AAT_finland_continuation_war.11
	title = AAT_finland_continuation_war.11.t
	desc = AAT_finland_continuation_war.11.desc
	picture = GFX_report_event_finnish_soldiers_snow
	
	is_triggered_only = yes

	# Secure all the nickel we can! (Main goals of Operation Birke)
	option = {
		name = AAT_finland_continuation_war.11.a
		ai_chance = {
			base = 50
		}	
		
		add_equipment_to_stockpile = { 
			type = convoy_1
			amount = -30
			producer = GER
		}	

		add_equipment_to_stockpile = { 
			type = infantry_equipment
			amount = -250
			producer = GER
		}

		add_equipment_to_stockpile = { 
			type = support_equipment
			amount = -200
			producer = GER
		}

		add_equipment_to_stockpile = { 
			type = artillery_equipment
			amount = -150
			producer = GER
		}

		64 = { #Berlin - Simulates their siezure of Finnish Resources when retreating
			add_resource = {
				type = tungsten
				amount = 2
			}
			add_resource = {
				type = chromium
				amount = 2
			}
			add_resource = {
				type = steel
				amount = 2
			}
		}

		add_timed_idea = {
			idea = FIN_the_lapland_war
			days = 186
		}

		# The Lapland War
		hidden_effect = {
			news_event = { id = aat_news.121 hours = 24 }
		}
	}

	# Fall back and preserve as much equipment as possible! (Operation Nordlicht)
	option = {
		name = AAT_finland_continuation_war.11.b
		ai_chance = {
			base = 50
		}	

		add_equipment_to_stockpile = { 
			type = convoy_1
			amount = -10
			producer = GER
		}	

		add_equipment_to_stockpile = { 
			type = infantry_equipment
			amount = -150
			producer = GER
		}

		add_equipment_to_stockpile = { 
			type = support_equipment
			amount = -100
			producer = GER
		}

		add_equipment_to_stockpile = { 
			type = artillery_equipment
			amount = -50
			producer = GER
		}

		add_timed_idea = {
			idea = FIN_the_lapland_war
			days = 186
		}
		
		# The Lapland War
		hidden_effect = {
			news_event = { id = aat_news.121 hours = 24 }
		}
	}
}

# Finland wishes to switch sides - Event for Aliied Leader
country_event = {
	id = AAT_finland_continuation_war.12
	title = AAT_finland_continuation_war.12.t
	desc = AAT_finland_continuation_war.12.desc
	picture = GFX_report_event_FIN_armistice_of_moscow_negotiations
	
	is_triggered_only = yes

	# Very well, let's just hope Stalin is fine with it...
	option = {
		name = AAT_finland_continuation_war.12.a
		ai_chance = {
			base = 10
			modifier = { #Don't if FIN is AI and this might screw a player in either side
				factor = 0.01
				FROM = { is_ai = yes }
				OR = {
					FROM = {
						any_allied_country = {
							is_ai = no
						}
					}
					any_allied_country = {
						is_ai = no
					}
				}
			}
		}	

		add_political_power = 75
		
		every_country = {
			limit = {
				has_war_with = FROM
			}
			white_peace = FROM
		}

		IF = {
			limit = {
				GER = {
					has_military_access_to = FIN
				}
			}
			FIN = {
				diplomatic_relation = { 
					country = GER
					relation = military_access 
					active = no
				}
				diplomatic_relation = { 
					country = GER
					relation = docking_rights 
					active = no
				}
				diplomatic_relation = { 
					country = GER
					relation = non_aggression_pact 
					active = no
				}
			}
			GER = {
				diplomatic_relation = { 
					country = FIN
					relation = guarantee 
					active = no
				}
			}
		}

		SOV = {
			add_timed_idea = {
				idea = FIN_compensation_for_side_switch_good
				days = 365
			}	
		}
		FROM = {
			add_timed_idea = {
				idea = FIN_compensation_for_side_switch_bad
				days = 365
			}
		}

		IF = {
			limit = {
				FIN = {
					has_idea = FIN_the_lone_wolf
				}
			}
			FIN = {
				remove_ideas = FIN_the_lone_wolf
			}
		}

		ROOT = {
			add_to_faction = FROM
		}

		FROM = {
			add_to_war = {
			    targeted_alliance = ROOT
			    enemy = GER
			    hostility_reason = asked_to_join
			}
		}

		FROM = {
			add_popularity = {
				ideology = democratic
				popularity = 0.1
			}	
		}
		
		hidden_effect = { # Used to prevent Finland to activate both Armistice and Switch sides decisions at the same time
			FROM = { clr_country_flag = FIN_negotiating_switching_sides_flag }
		}
	}

	# We cannot risk provoking the Soviet Union
	option = {
		name = AAT_finland_continuation_war.12.b
		ai_chance = {
			base = 2
			modifier = { #Be nice to player
				factor = 0.01
				FROM = { is_ai = no }
			}
		}	

		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_rejected_our_proposal
			}
		}

		add_stability = 0.02
		add_war_support = -0.01
		
		hidden_effect = { # Used to prevent Finland to activate both Armistice and Switch sides decisions at the same time
			FROM = { clr_country_flag = FIN_negotiating_switching_sides_flag }
		}
	}
}

# Finland is attempting to switch sides - Event for SOV
country_event = {
	id = AAT_finland_continuation_war.13
	title = AAT_finland_continuation_war.13.t
	desc = AAT_finland_continuation_war.13.desc
	picture = GFX_report_event_FIN_armistice_of_moscow_negotiations
	
	is_triggered_only = yes

	# Very well, but only if we get compensated
	option = {
		name = AAT_finland_continuation_war.13.a
		
		add_political_power = 25

		add_war_support = 0.05

	}
}


########   #######  ##       #### ######## ####  ######     ###    ##       
##     ## ##     ## ##        ##     ##     ##  ##    ##   ## ##   ##       
##     ## ##     ## ##        ##     ##     ##  ##        ##   ##  ##       
########  ##     ## ##        ##     ##     ##  ##       ##     ## ##       
##        ##     ## ##        ##     ##     ##  ##       ######### ##       
##        ##     ## ##        ##     ##     ##  ##    ## ##     ## ##       
##         #######  ######## ####    ##    ####  ######  ##     ## ######## 


# Motion of No Confidence against Svinhufvud - Event for FIN
country_event = {
	id = AAT_finland_political.01
	title = AAT_finland_political.01.t
	desc = AAT_finland_political.01.desc
	picture = GFX_report_event_FIN_svinhufvud_speech

	is_triggered_only = yes

	fire_only_once = yes
	
	#Ok
	option = {
		name = AAT_finland_political.01.a

		FIN_kallio_becomes_country_leader = yes
	}
}

# Term ended for Svinhufvud - Event for FIN
country_event = {
	id = AAT_finland_political.02
	title = AAT_finland_political.02.t
	desc = AAT_finland_political.02.desc
	picture = GFX_report_event_FIN_svinhufvud_speech

	is_triggered_only = yes

	fire_only_once = yes

	trigger = {
		has_country_leader = {
			ruling_only = yes
			character = FIN_pehr_evind_svinhufvud
		}
	}
	
	#Re-elect!
	option = {
		name = AAT_finland_political.02.a

		ai_chance = {
			base = 1
			modifier = {
				add = 4
				is_historical_focus_on = no
			}
			modifier = {
				factor = 0
				FIN_is_historical_ai = yes
			}
		}

		add_political_power = -30
	}

	# Elect Kyosti Kallio!
	option = {
		name = AAT_finland_political.02.b

		ai_chance = {
			base = 10
		}

		FIN_kallio_becomes_country_leader = yes
	}
}

# Motion of No Confidence against Kallio - Event for FIN
country_event = {
	id = AAT_finland_political.03
	title = AAT_finland_political.01.t #intentional
	desc = AAT_finland_political.03.desc
	picture = GFX_report_event_FIN_kallio_president

	is_triggered_only = yes

	fire_only_once = yes
	
	#Ok
	option = {
		name = AAT_finland_political.03.a

		FIN_ryti_becomes_country_leader = yes
	}
}

# Death of Kyosti Kallio - Event for FIN
country_event = {
	id = AAT_finland_political.04
	title = AAT_finland_political.04.t
	desc = AAT_finland_political.04.desc
	picture = GFX_report_event_FIN_kallio_president

	trigger = {
		has_country_leader = {
			ruling_only = yes
			character = FIN_kyosti_kallio
		}
		date > 1940.08.27
	}

	mean_time_to_happen = {
		days = 30
	}

	fire_only_once = yes
	
	#Ok
	option = {
		name = AAT_finland_political.04.a

		FIN_ryti_becomes_country_leader = yes
	}
}

# Resignation of Kallio - Event for FIN
country_event = {
	id = AAT_finland_political.05
	title = AAT_finland_political.05.t
	desc = AAT_finland_political.05.desc
	picture = GFX_report_event_FIN_kallio_president

	is_triggered_only = yes

	fire_only_once = yes
	
	#Ok
	option = {
		name = AAT_finland_political.05.a

		FIN_ryti_becomes_country_leader = yes
	}
}

# Motion of No Confidence against Ryti - Event for FIN
country_event = {
	id = AAT_finland_political.06
	title = AAT_finland_political.01.t #intentional
	desc = AAT_finland_political.06.desc
	picture = GFX_report_event_FIN_risto_ryti_speech

	is_triggered_only = yes

	fire_only_once = yes
	
	#Ok
	option = {
		name = AAT_finland_political.06.a

		FIN_paasikivi_becomes_country_leader = yes
	}
}

# Mannerheim Appointed as President of a Military Government - Event for FIN
country_event = {
	id = AAT_finland_political.07
	title = AAT_finland_political.07.t
	desc = AAT_finland_political.07.desc
	picture = GFX_report_event_FIN_mannerheim_president

	is_triggered_only = yes

	fire_only_once = yes
	
	#Ok
	option = {
		name = AAT_finland_political.07.a

		FIN_mannerheim_becomes_country_leader = yes
		add_war_support = 0.05
	}
}

# Time to go back to a civilian government? - Event for FIN
country_event = {
	id = AAT_finland_political.08
	title = AAT_finland_political.08.t
	desc = AAT_finland_political.08.desc
	picture = GFX_report_event_FIN_paasikivi_president

	trigger = {
		has_country_leader = {
			ruling_only = yes
			character = FIN_carl_mannerheim
		}
		has_war = no
	}

	mean_time_to_happen = {
		days = 90
	}

	fire_only_once = yes
	
	#Mannerheim Resigns
	option = {
		name = AAT_finland_political.08.a

		FIN_paasikivi_becomes_country_leader = yes
		add_stability = 0.05
	}

	#Keep Mannerheim
	option = {
		name = AAT_finland_political.08.b

		add_stability = -0.05
		unlock_decision_tooltip = FIN_resignation_of_mannerheim
		set_country_flag = FIN_resignation_of_mannerheim_available_flag
	}
}

# Resignation of Mannerheim - Event for FIN
country_event = {
	id = AAT_finland_political.09
	title = AAT_finland_political.05.t #intentional
	desc = AAT_finland_political.09.desc
	picture = GFX_report_event_FIN_paasikivi_president
	
	is_triggered_only = yes

	fire_only_once = yes
	
	#Mannerheim Resigns
	option = {
		name = AAT_finland_political.09.a

		FIN_paasikivi_becomes_country_leader = yes
	}
}


######## ########  #### ########     ###    ##          ##      ##    ###    ########  
   ##    ##     ##  ##  ##     ##   ## ##   ##          ##  ##  ##   ## ##   ##     ## 
   ##    ##     ##  ##  ##     ##  ##   ##  ##          ##  ##  ##  ##   ##  ##     ## 
   ##    ########   ##  ########  ##     ## ##          ##  ##  ## ##     ## ########  
   ##    ##   ##    ##  ##     ## ######### ##          ##  ##  ## ######### ##   ##   
   ##    ##    ##   ##  ##     ## ##     ## ##          ##  ##  ## ##     ## ##    ##  
   ##    ##     ## #### ########  ##     ## ########     ###  ###  ##     ## ##     ## 


# Anti-Soviet Sentiment in Karelia! - Event for SOV
country_event = {
	id = AAT_finland_kinship_war.01
	title = AAT_finland_kinship_war.01.t
	desc = AAT_finland_kinship_war.01.desc
	picture = GFX_report_event_FIN_karelian_forest_guerillas
	
	is_triggered_only = yes

	fire_only_once = yes
	
	option = {
		name = AAT_finland_kinship_war.01.a

		unlock_decision_tooltip = FIN_crush_the_karelian_insurrection
		custom_effect_tooltip = AAT_finland_kinship_war_dynamic_modifier_tt
		custom_effect_tooltip = germany.126.warning
	}
}

# Karelian Uprising! - Event for FIN
country_event = {
	id = AAT_finland_kinship_war.02
	title = AAT_finland_kinship_war.02.t
	desc = AAT_finland_kinship_war.02.desc
	picture = GFX_report_event_FIN_heimosodat_volunteers
	
	is_triggered_only = yes

	fire_only_once = yes
	
	# Full Support = Puppet + Join War
	option = {
		name = AAT_finland_kinship_war.02.a
		
		#ONEGA
		if = {
			limit = {
				215 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 215 }
			hidden_effect = {
				215 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 213 #MURMANSK
					}
				}
			}
			#Add Repola and Uhtua VPs
			add_victory_points = {
				province = 6098 #Repola
				value = 1
			}
			add_victory_points = {
				province = 3067 #Uhtua
				value = 1
			}
		}
		#OLONETS
		if = {
			limit = {
				216 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 216 }
			hidden_effect = {
				216 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 264 #TIKHVIN
					}
				}
			}
			#Add Porajärvi VP
			add_victory_points = {
				province = 2998 #Porajärvi
				value = 1
			}
		}

		#KARJALA
		if = {
			limit = {
				146 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 146 }
			hidden_effect = {
				146 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 195 #LENINGRAD
					}
				}
			}
		}

		#SALLA
		if = {
			limit = {
				147 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 147 }
			hidden_effect = {
				147 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 213 #MURMANSK
					}
				}
			}
		}

		#Need to puppet before war and politics otherwise the puppet action will overrule them
		puppet = KAR

		hidden_effect = {
			KAR = {
				if = {
					limit = {
						owns_state = 215
					}
					set_capital = {
						state = 215
					}
				}
				
				division_template = {
				    name = "Karjalan Metsäsissit"
					is_locked = yes
					priority = 1
					template_counter = 27
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
					}
				}
				every_owned_state = {
					limit = { is_core_of = KAR }
					create_unit = { 
						division = "name = \"Karjalan Metsäsissit\" division_template = \"Karjalan Metsäsissit\" start_experience_factor = 0.05 start_equipment_factor = 0.95"
						owner = KAR
						count = 1
					}
				}
				random_owned_state = {
					limit = { 
						is_core_of = KAR 
						is_capital = yes
					}
					create_unit = { 
						division = "name = \"Karjalan Metsäsissit\" division_template = \"Karjalan Metsäsissit\" start_experience_factor = 0.05 start_equipment_factor = 0.95"
						owner = KAR
						count = 2
					}
				}

				#Add some equipment to Stockpile (Finland sent equipment for the uprising)
				add_equipment_to_stockpile = { 
					type = infantry_equipment_1
					amount = 2000
					producer = ROOT
				}
				add_equipment_to_stockpile = { 
					type = support_equipment
					amount = 500
					producer = ROOT
				}
			}

			if = {
				limit = {
					has_government = fascism
				}
				KAR = {
					set_politics = { 
						ruling_party = fascism
						elections_allowed = no
					}
					set_popularities = {
						fascism = 75
						neutrality = 20
						democratic = 5
					}
				}
			}
			else = {
				KAR = {
					set_politics = { 
						ruling_party = neutrality
						elections_allowed = no
					}
					set_popularities = {
						neutrality = 60
						fascism = 35
						democratic = 5
					}
				}
			}
			KAR = {
				# Add extra country leader trait to the possible leaders (fascist & non-aligned)
				KAR_ukki_vainamoinen = {
					add_country_leader_trait = {
					 	ideology = fascism_ideology
					 	trait = veteran_guerrilla_fighter
					 }
				}
				KAR_jalmari_takkinen = {
					add_country_leader_trait = veteran_guerrilla_fighter
				}

				add_opinion_modifier = {
					target = ROOT
					modifier = FIN_support_for_east_karealian_independence_big
				}
			}
		}
		set_country_flag = FIN_full_support_for_karelia_flag #Used for the effect tooltip in the Soviet event
		KAR = {
			if = {
				limit = {
					any_other_country = {
						original_tag = SOV
						has_civil_war = yes
					}
				}
				# This is AI Stalin in the CW, no need for event, just declare on them
				random_other_country = {
					limit = {
						original_tag = SOV
						has_civil_war = yes
						has_country_leader_ideology = stalinism
					}
					PREV = {
						declare_war_on = {
							target = PREV
							type = independence_wargoal
						}
					}
					ROOT = {
						if = {
							limit = {
								NOT = { has_war_with = PREV }
							}
							add_to_war = {
								targeted_alliance = KAR
								enemy = PREV
								hostility_reason = asked_to_join
							}
						}
					}
				}
				SOV = {
					#Send event to the other side of the civil war - Actual original SOV (Trotskyist or Bukharinist)
					set_variable = { SOV_nationalist_country = KAR }
					set_country_flag = KAR_uprising_flag
					country_event = NSB_soviet_nationalist.001
				}
			}
			else = {
				declare_war_on = {
					target = SOV
					type = independence_wargoal
				}

				if = {
					limit = {
						ROOT = { NOT = { has_war_with = SOV } }
					}
					ROOT = {
						set_country_flag = FIN_joining_war_against_sov_flag #For Soviet tooltip
						add_to_war = {
							targeted_alliance = KAR
							enemy = SOV
							hostility_reason = asked_to_join
						}
					}
				}
			}
		}

		hidden_effect = {
			if = { #Send Karelian Uprising event if Finland has triggered the Karelian Uprising
				limit = {
					SOV = { NOT = { has_country_flag = KAR_uprising_flag } }
				}
				SOV = { country_event = { id = AAT_finland_kinship_war.03 hours = 1 } }
			}
		}
	}

	# Good luck to them = Minor support + Military Access
	option = {
		name = AAT_finland_kinship_war.02.b

		#ONEGA
		if = {
			limit = {
				215 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 215 }
			hidden_effect = {
				215 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 213 #MURMANSK
					}
				}
			}
			#Add Repola and Uhtua VPs
			add_victory_points = {
				province = 6098 #Repola
				value = 1
			}
			add_victory_points = {
				province = 3067 #Uhtua
				value = 1
			}
		}

		#OLONETS
		if = {
			limit = {
				216 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 216 }
			hidden_effect = {
				216 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 264 #TIKHVIN
					}
				}
			}
			#Add Porajärvi VP
			add_victory_points = {
				province = 2998 #Porajärvi
				value = 1
			}
		}

		#KARJALA
		if = {
			limit = {
				146 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 146 }
			hidden_effect = {
				146 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 195 #LENINGRAD
					}
				}
			}
		}

		#SALLA
		if = {
			limit = {
				147 = {
					has_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					controller = {
						original_tag = SOV
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			KAR = { transfer_state = 147 }
			hidden_effect = {
				147 = {
					remove_dynamic_modifier = { modifier = FIN_anti_soviet_sentiment }
					teleport_armies = {
						limit = {
							original_tag = SOV 
						}
						to_state = 213 #MURMANSK
					}
				}
			}
		}

		hidden_effect = {	
			KAR = {
				if = {
					limit = {
						owns_state = 215
					}
					set_capital = {
						state = 215
					}
				}

				division_template = {
				    name = "Karjalan Metsäsissit"
					is_locked = yes
					priority = 1
					template_counter = 27
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
					}
				}
				every_owned_state = {
					limit = { is_core_of = KAR }
					create_unit = { 
						division = "name = \"Karjalan Metsäsissit\" division_template = \"Karjalan Metsäsissit\" start_experience_factor = 0.05 start_equipment_factor = 0.95"
						owner = KAR
						count = 1
					}
				}
				random_owned_state = {
					limit = { 
						is_core_of = KAR 
						is_capital = yes
					}
					create_unit = { 
						division = "name = \"Karjalan Metsäsissit\" division_template = \"Karjalan Metsäsissit\" start_experience_factor = 0.05 start_equipment_factor = 0.95"
						owner = KAR
						count = 2
					}
				}

				#Add some equipment to Stockpile (Finland sent equipment for the uprising)
				add_equipment_to_stockpile = { 
					type = infantry_equipment_1
					amount = 2000
					producer = ROOT
				}
				add_equipment_to_stockpile = { 
					type = support_equipment
					amount = 500
					producer = ROOT
				}
			}

			if = {
				limit = {
					has_government = fascism
				}
				KAR = {
					set_politics = { 
						ruling_party = fascism
						elections_allowed = no
					}
					set_popularities = {
						fascism = 75
						neutrality = 20
						democratic = 5
					}
				}
			}
			else = {
				KAR = {
					set_politics = { 
						ruling_party = neutrality
						elections_allowed = no
					}
					set_popularities = {
						neutrality = 60
						fascism = 35
						democratic = 5
					}
				}
			}
			KAR = {
				# Add extra country leader trait to the possible leaders (fascist & non-aligned)
				KAR_ukki_vainamoinen = {
					add_country_leader_trait = {
					 	ideology = fascism_ideology
					 	trait = veteran_guerrilla_fighter
					 }
				}
				KAR_jalmari_takkinen = {
					add_country_leader_trait = veteran_guerrilla_fighter
				}

				add_opinion_modifier = {
					target = ROOT
					modifier = FIN_support_for_east_karealian_independence_small
				}
			}
		}

		#TODO_Manu: Relation modifier so that FIN can send more volunteers to Karelia

		KAR = {
			if = {
				limit = {
					any_other_country = {
						original_tag = SOV
						has_civil_war = yes
					}
				}
				# This is AI Stalin in the CW, no need for event, just declare on them
				random_other_country = {
					limit = {
						original_tag = SOV
						has_civil_war = yes
						has_country_leader_ideology = stalinism
					}
					PREV = {
						declare_war_on = {
							target = PREV
							type = independence_wargoal
						}
					}
				}
				SOV = {
					#Send event to the other side of the civil war - Actual original SOV (Trotskyist or Bukharinist)
					set_variable = { SOV_nationalist_country = KAR }
					set_country_flag = KAR_uprising_flag
					country_event = NSB_soviet_nationalist.001
				}
			}
			else = {
				declare_war_on = {
					target = SOV
					type = independence_wargoal
				}
			}

			# Military access FIN-KAR
			give_military_access = ROOT
			ROOT = { give_military_access = PREV }
		}

		hidden_effect = {
			if = { #Send Karelian Uprising event if Finland has triggered the Karelian Uprising
				limit = {
					SOV = { NOT = { has_country_flag = KAR_uprising_flag } }
				}
				SOV = { country_event = { id = AAT_finland_kinship_war.03 hours = 1 } }
			}
		}
	}
}

# Karelian Uprising! - Event for SOV
country_event = {
	id = AAT_finland_kinship_war.03
	title = AAT_finland_kinship_war.02.t #intentional
	desc = AAT_finland_kinship_war.03.desc
	picture = GFX_report_event_FIN_karelian_forest_guerillas
	
	is_triggered_only = yes

	#fire_only_once = yes #Can be sent to both Soviet sides in the Soviet CW
	
	option = {
		name = AAT_finland_kinship_war.03.a

		ai_chance = {
			base = 2
		}

		effect_tooltip = {
			if = {
				limit = {
					KAR = { owns_state = 215}
				}
				KAR = { transfer_state = 215 }
			}
			if = {
				limit = {
					KAR = { owns_state = 216}
				}
				KAR = { transfer_state = 216 }
			}
			if = {
				limit = {
					KAR = { owns_state = 146}
				}
				KAR = { transfer_state = 146 }
			}
			if = {
				limit = {
					KAR = { owns_state = 147}
				}
				KAR = { transfer_state = 147 }
			}

			if = { #FULL FINNISH SUPPORT
				limit = {
					FROM = {
						has_country_flag = FIN_full_support_for_karelia_flag
					}
				}
				FROM = {
					puppet = KAR
				}
				KAR = {
					declare_war_on = {
						target = ROOT
						type = independence_wargoal
					}
				}
				if = {
					limit = {
						FROM = { has_country_flag = FIN_joining_war_against_sov_flag }
					}
					FROM = {
						add_to_war = {
							targeted_alliance = KAR
							enemy = ROOT
							hostility_reason = asked_to_join
						}
					}
				}
			}
			else = { #UNOFFICIAL FINNISH SUPPORT
				effect_tooltip = {
					KAR = {
						declare_war_on = {
							target = ROOT
							type = independence_wargoal
						}

						give_military_access = ROOT
					}
					give_military_access = KAR
				}
			}

			if = {
				limit = {
					has_civil_war = yes
					NOT = {
						has_country_leader_ideology = stalinism
					}
				}
				if = { #FULL FINNISH SUPPORT
					limit = {
						FROM = {
							has_country_flag = FIN_full_support_for_karelia_flag
						}
					}
					KAR = {
						declare_war_on = {
							target = SOU
							type = independence_wargoal
						}
					}
					if = {
						limit = {
							FROM = { has_country_flag = FIN_joining_war_against_sov_flag }
						}
						FROM = {
							add_to_war = {
								targeted_alliance = KAR
								enemy = SOU
								hostility_reason = asked_to_join
							}
						}
					}
				}
				else = { #UNOFFICIAL FINNISH SUPPORT
					effect_tooltip = {
						KAR = {
							declare_war_on = {
								target = SOU
								type = independence_wargoal
							}

							give_military_access = SOU
						}
						give_military_access = KAR
					}
				}
			}
		}

		#Clean flags
		hidden_effect = {
			FROM = {
				if = {
					limit = {
						has_country_flag = FIN_joining_war_against_sov_flag
					}
					clr_country_flag = FIN_joining_war_against_sov_flag
				}
				if = {
					limit = {
						has_country_flag = FIN_full_support_for_karelia_flag
					}
					clr_country_flag = FIN_full_support_for_karelia_flag
				}
			}
		}
	}

	option = {
		name = AAT_finland_diplomacy.26.b #Intentional

		trigger = {
			has_civil_war = yes
			NOT = {
				has_country_leader_ideology = stalinism
			}
		}

		ai_chance = {
			base = 1
		}

		effect_tooltip = {
			if = {
				limit = {
					KAR = { owns_state = 215}
				}
				KAR = { transfer_state = 215 }
			}
			if = {
				limit = {
					KAR = { owns_state = 216}
				}
				KAR = { transfer_state = 216 }
			}
			if = {
				limit = {
					KAR = { owns_state = 146}
				}
				KAR = { transfer_state = 146 }
			}
			if = {
				limit = {
					KAR = { owns_state = 147}
				}
				KAR = { transfer_state = 147 }
			}

			if = { #FULL FINNISH SUPPORT
				limit = {
					FROM = {
						has_country_flag = FIN_full_support_for_karelia_flag
					}
				}
				FROM = {
					puppet = KAR
				}
				KAR = {
					declare_war_on = {
						target = SOU
						type = independence_wargoal
					}
				}
				if = {
					limit = {
						FROM = { has_country_flag = FIN_joining_war_against_sov_flag }
					}
					FROM = {
						add_to_war = {
							targeted_alliance = KAR
							enemy = SOU
							hostility_reason = asked_to_join
						}
					}
				}
			}
			else = { #UNOFFICIAL FINNISH SUPPORT
				effect_tooltip = {
					KAR = {
						declare_war_on = {
							target = SOU
							type = independence_wargoal
						}

						give_military_access = SOU
					}
					give_military_access = KAR
				}
			}
		}

		#Clean flags
		hidden_effect = {
			FROM = {
				if = {
					limit = {
						has_country_flag = FIN_joining_war_against_sov_flag
					}
					clr_country_flag = FIN_joining_war_against_sov_flag
				}
				if = {
					limit = {
						has_country_flag = FIN_full_support_for_karelia_flag
					}
					clr_country_flag = FIN_full_support_for_karelia_flag
				}
			}
		}
	}
}

# Karelian Rebellion Crushed - Event for FIN
country_event = {
	id = AAT_finland_kinship_war.04
	title = AAT_finland_kinship_war.04.t
	desc = AAT_finland_kinship_war.04.desc
	picture = GFX_report_event_FIN_armistice_of_moscow_negotiations
	
	is_triggered_only = yes

	fire_only_once = yes

	immediate = {
		hidden_effect = {
			set_country_flag = FIN_karelian_rebellion_crushed_flag
		}
	}
	
	option = {
		name = AAT_finland_kinship_war.04.a

		custom_effect_tooltip = AAT_finland_kinship_war_rebellion_crushed_fin_tt
	}
}

# Karelian Rebellion Crushed - Event for SOV
country_event = {
	id = AAT_finland_kinship_war.05
	title = AAT_finland_kinship_war.04.t #intentional
	desc = AAT_finland_kinship_war.05.desc
	picture = GFX_report_event_FIN_armistice_of_moscow_negotiations
	
	is_triggered_only = yes

	fire_only_once = yes
	
	option = {
		name = AAT_finland_kinship_war.05.a

		custom_effect_tooltip = AAT_finland_kinship_war_rebellion_crushed_sov_tt
	}
}

# Karelian Rebellion in the Soviet Civil War - Event for FIN
country_event = {
	id = AAT_finland_kinship_war.06
	title = AAT_finland_kinship_war.06.t
	desc = AAT_finland_kinship_war.06.desc
	picture = GFX_report_event_FIN_heimosodat_volunteers
	
	is_triggered_only = yes

	fire_only_once = yes
	
	# We should support them
	option = {
		name = AAT_finland_kinship_war.06.a

		add_stability = -0.1

		add_manpower = -1000

		KAR = {
			add_manpower = 1000
			#Add some equipment to Stockpile (Finland sent equipment for the uprising)
			add_equipment_to_stockpile = { 
				type = infantry_equipment_1
				amount = 2000
				producer = FIN
			}
			add_equipment_to_stockpile = { 
				type = support_equipment
				amount = 500
				producer = FIN
			}
		}

		add_relation_rule_override = {
			target = KAR
			can_send_volunteers = yes
		}

		hidden_effect = {
			ROOT = {
				set_rule = { can_send_volunteers = yes }
				add_timed_idea = {
					idea = ETH_aid_SPC
					days = 730
				}
				add_ai_strategy = {
					type = send_volunteers_desire
					id = KAR
					value = 200
				}
			}
		}	
		
	}

	# We shouldn't risk anything
	option = {
		name = AAT_finland_kinship_war.06.b

		add_political_power = 30
		
	}
}


##      ## ##     ## #### ######## ########    ########  ########    ###    ######## ##     ## 
##  ##  ## ##     ##  ##     ##    ##          ##     ## ##         ## ##      ##    ##     ## 
##  ##  ## ##     ##  ##     ##    ##          ##     ## ##        ##   ##     ##    ##     ## 
##  ##  ## #########  ##     ##    ######      ##     ## ######   ##     ##    ##    ######### 
##  ##  ## ##     ##  ##     ##    ##          ##     ## ##       #########    ##    ##     ## 
##  ##  ## ##     ##  ##     ##    ##          ##     ## ##       ##     ##    ##    ##     ## 
 ###  ###  ##     ## ####    ##    ########    ########  ######## ##     ##    ##    ##     ## 



# Our Snipers Are Proving Highly Effecive
country_event = {
	id = AAT_finland_the_white_death.1
	title = AAT_finland_the_white_death.1.t
	desc = AAT_finland_the_white_death.1.desc
	picture = GFX_report_event_FIN_camouflaged_white_death

	trigger = {
		tag = FIN
		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_defensive_war = yes
		has_civil_war = no
		
		is_subject = no

		any_country = {
			has_war_with = FIN
			has_variable = FIN_white_death_target_country
		}
		
	}

	mean_time_to_happen = { days = 42 }

	hidden = no

	fire_only_once = yes

	# Erinomainen! (Excellent!)
	option = {
		name = AAT_finland_the_white_death.1.a
		ai_chance = {
			base = 100
		}

		add_war_support = 0.02

		add_political_power = 10

		hidden_effect = {

			#random_country = {
			#	limit = {
			#		has_war_with = ROOT
			#		has_variable = FIN_white_death_target_country
			#	}
			#	country_event = {
			#		id = AAT_finland_the_white_death.2
			#		days = 3
			#		random_days = 5
			#	}	
			#}

			set_global_flag = FIN_snipers_active

			news_event = { id = aat_news.105 days = 12 }
		}

	}

	# We should endeavor to distribute more arms to the hunters
	option = {
		name = AAT_finland_the_white_death.1.b
		ai_chance = {
			base = 50
			
			modifier = {
				add = 100
				has_equipment = {
					infantry_equipment > 1500
				}	
			}
		}

		add_war_support = 0.02

		add_equipment_to_stockpile = { 
			type = infantry_equipment
			amount = -1000
			producer = FIN
		}	

		custom_effect_tooltip = FIN_our_snipers_will_be_more_deadly_tt

		hidden_effect = {

			#random_country = {
			#	limit = {
			#		has_war_with = ROOT
			#		has_variable = FIN_white_death_target_country
			#	}
			#	country_event = {
			#		id = AAT_finland_the_white_death.2
			#		days = 3
			#		random_days = 5
			#	}	
			#}

			set_global_flag = FIN_snipers_active_with_extra_arms

			news_event = { id = aat_news.105 days = 12 }
		}

	}
}

# Finnish Snipers Putting Fear into the Hearts of our Soldiers - Event for FIN_white_death_target_country
country_event = {
	id = AAT_finland_the_white_death.2
	title = AAT_finland_the_white_death.2.t 
	desc = AAT_finland_the_white_death.2.desc
	picture = GFX_report_event_FIN_camouflaged_white_death

	fire_only_once = yes

	trigger = {

		has_variable = FIN_white_death_target_country

		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_offensive_war_with = FIN
		
		is_subject = no

		OR = {
			has_global_flag = FIN_snipers_active
			has_global_flag = FIN_snipers_active_with_extra_arms
		}
		
	}

	mean_time_to_happen = { days = 14 }
	
	# There is no need to worry about them
	option = {
		name = AAT_finland_the_white_death.2.a
		ai_chance = {
			base = 50
		}
		
		IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -100
			add_war_support = -0.01
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -250
			add_war_support = -0.01
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -200
			add_war_support = -0.02
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -400
			add_war_support = -0.02
		}

		add_command_power = 10

		hidden_effect = {
			
			random_list =  {
				70 = {
					set_global_flag = FIN_simo_hayha_appears_flag
				}
				30 = {
					set_global_flag = FIN_simo_hayha_appears_and_is_wounded_flag
				}
			}

			#FROM = {
			#	country_event = {
			#		id = AAT_finland_the_white_death.3
			#		days = 5
			#		random_days = 9
			#	}	
			#}
			
		}

	}

	# Hunt them down!
	option = {
		name = AAT_finland_the_white_death.2.b
		ai_chance = {
			base = 50
			
			modifier = {
				add = 100
				OR = {
					has_equipment = {
						infantry_equipment > 1500
					}
					is_historical_focus_on = yes
				}
			}
		}

		IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -100
			add_war_support = -0.01
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -250
			add_war_support = -0.01
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -200
			add_war_support = -0.02
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -400
			add_war_support = -0.02
		}

		add_equipment_to_stockpile = { 
			type = infantry_equipment
			amount = -1400
			producer = ROOT
		}	

		add_command_power = -25

		custom_effect_tooltip = FIN_we_will_be_more_likely_to_put_down_the_finnish_snipers_tt

		hidden_effect = {

			random_list =  {
				40 = {
					set_global_flag = FIN_simo_hayha_appears_flag
				}
				50 = {
					set_global_flag = FIN_simo_hayha_appears_and_is_wounded_flag
				}
				10 = {
					set_global_flag = FIN_simo_hayha_appears_and_is_killed_flag
				}
			}

			#FROM = {
			#	country_event = {
			#		id = AAT_finland_the_white_death.3
			#		days = 5
			#		random_days = 9
			#	}	
			#}

		}
		
	}
}

# Outcome for the Actual Simo Häyhä chain - Event for FIN
#country_event = {
#	id = AAT_finland_the_white_death.3
#	title = AAT_finland_the_white_death.3.t 
#	desc = AAT_finland_the_white_death.3.desc
#	picture = GFX_report_event_FIN_camouflaged_white_death
#	
#	is_triggered_only = yes
#
#	fire_only_once = yes
#
#	# This decides which outcome will happen with Simo Häyhä 
#	hidden = yes
#
#	immediate = {
#		IF = {
#			limit = {
#				has_global_flag = FIN_simo_hayha_appears_flag
#				FIN = {
#					has_war = yes
#				}
#			}
#			ROOT = {
#				country_event = {
#					id = AAT_finland_the_white_death.4
#					hours = 12
#					random_hours = 24
#				}	
#			}
#			clr_global_flag = FIN_simo_hayha_appears_flag
#		}
#		ELSE_IF = {
#			limit = {
#				has_global_flag = FIN_simo_hayha_appears_and_is_wounded_flag
#				FIN = {
#					has_war = yes
#				}
#			}
#			ROOT = {
#				country_event = {
#					id = AAT_finland_the_white_death.5
#					hours = 12
#					random_hours = 24
#				}	
#			}
#			clr_global_flag = FIN_simo_hayha_appears_and_is_wounded_flag
#		}
#		ELSE_IF = {
#			limit = {
#				has_global_flag = FIN_simo_hayha_appears_and_is_killed_flag
#				FIN = {
#					has_war = yes
#				}
#			}
#			ROOT = {
#				country_event = {
#					id = AAT_finland_the_white_death.6
#					hours = 12
#					random_hours = 24
#				}	
#			}
#			clr_global_flag = FIN_simo_hayha_appears_and_is_killed_flag
#		}
#	}
#	
#	option = {
#		name = AAT_finland_the_white_death.3.a
#		ai_chance = {
#			base = 100
#		}
#	}
#}

# Simo Häyhä acredited as the White Death (and will not get wounded later) - Event for FIN
country_event = {
	id = AAT_finland_the_white_death.4
	title = AAT_finland_the_white_death.4.t 
	desc = AAT_finland_the_white_death.4.desc
	picture = GFX_report_event_FIN_simo_hayha

	fire_only_once = yes

	trigger = {

		tag = FIN
		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_defensive_war = yes
		has_civil_war = no
		
		is_subject = no

		any_country = {
			has_war_with = FIN
			has_variable = FIN_white_death_target_country
		}

		has_global_flag = FIN_simo_hayha_appears_flag
		
	}

	mean_time_to_happen = { days = 7 }
	
	# We should propagate tales of this Modern Finnish Hero
	option = {
		name = AAT_finland_the_white_death.4.a
		ai_chance = {
			base = 80
		}
		
		add_war_support = 0.05

		add_political_power = 50

		add_command_power = 20

		add_manpower = 12000

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_has_appeared_flag
		}
		

		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		random_country = {
		#			limit = {
		#				has_war_with = ROOT
		#				has_variable = FIN_white_death_target_country
		#			}
		#			# The White Death Embraces us
		#			country_event = {
		#				id = AAT_finland_the_white_death.7
		#				days = 8
		#				random_days = 22
		#			}
		#		}
		#	}
		#}

	}

	# The White Death is the Embodiment of Finland, not some person!
	option = {
		name = AAT_finland_the_white_death.4.b
		ai_chance = {
			base = 20
		}

		add_political_power = -25

		add_timed_idea = {
			idea = FIN_we_are_the_white_death_idea
			days = 180
		}	

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_has_appeared_flag
		}
		

		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		random_country = {
		#			limit = {
		#				has_war_with = ROOT
		#				has_variable = FIN_white_death_target_country
		#			}
		#			# The White Death Embraces us
		#			country_event = {
		#				id = AAT_finland_the_white_death.7
		#				days = 8
		#				random_days = 22
		#			}
		#		}
		#	}
		#}
		
	}
}

# Simo Häyhä acredited as the White Death (and will get wounded later) - Event for FIN
country_event = {
	id = AAT_finland_the_white_death.5
	title = AAT_finland_the_white_death.5.t 
	desc = AAT_finland_the_white_death.4.desc
	picture = GFX_report_event_FIN_simo_hayha

	fire_only_once = yes

	trigger = {

		tag = FIN
		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_defensive_war = yes
		has_civil_war = no
		
		is_subject = no

		any_country = {
			has_war_with = FIN
			has_variable = FIN_white_death_target_country
		}

		has_global_flag = FIN_simo_hayha_appears_and_is_wounded_flag
		
	}

	mean_time_to_happen = { days = 7 }
	
	# We should propagate tales of this Modern Finnish Hero
	option = {
		name = AAT_finland_the_white_death.4.a
		ai_chance = {
			base = 80
		}

		add_war_support = 0.05

		add_political_power = 50

		add_command_power = 20

		add_manpower = 12000

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_will_be_wounded_flag
		}
		
		
		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		random_country = {
		#			limit = {
		#				has_war_with = ROOT
		#				has_variable = FIN_white_death_target_country
		#			}
		#			# Our Soldiers successfully hunt The White Death
		#			country_event = {
		#				id = AAT_finland_the_white_death.8
		#				days = 8
		#				random_days = 22
		#			}
		#		}
		#	}
		#}

	}

	# The White Death is the Embodiment of Finland, not some person!
	option = {
		name = AAT_finland_the_white_death.4.b
		ai_chance = {
			base = 20
		}

		add_political_power = -25

		add_timed_idea = {
			idea = FIN_we_are_the_white_death_idea
			days = 180
		}	

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_will_be_wounded_flag
		}
		

		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		random_country = {
		#			limit = {
		#				has_war_with = ROOT
		#				has_variable = FIN_white_death_target_country
		#			}
		#			# Our Soldiers successfully hunt The White Death
		#			country_event = {
		#				id = AAT_finland_the_white_death.8
		#				days = 8
		#				random_days = 22
		#			}
		#		}
		#	}
		#}
		
	}
}

# Simo Häyhä acredited as the White Death (and will get killed later) - Event for FIN
country_event = {
	id = AAT_finland_the_white_death.6
	title = AAT_finland_the_white_death.6.t 
	desc = AAT_finland_the_white_death.4.desc
	picture = GFX_report_event_FIN_simo_hayha

	fire_only_once = yes

	trigger = {

		tag = FIN
		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_defensive_war = yes
		has_civil_war = no
		
		is_subject = no

		any_country = {
			has_war_with = FIN
			has_variable = FIN_white_death_target_country
		}

		has_global_flag = FIN_simo_hayha_appears_and_is_killed_flag
		
	}

	mean_time_to_happen = { days = 7 }
	
	# We should propagate tales of this Modern Finnish Hero
	option = {
		name = AAT_finland_the_white_death.4.a
		ai_chance = {
			base = 80
		}

		add_war_support = 0.05

		add_political_power = 50

		add_command_power = 20

		add_manpower = 12000

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_will_be_killed_flag
		}
		
		
		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		random_country = {
		#			limit = {
		#				has_war_with = ROOT
		#				has_variable = FIN_white_death_target_country
		#			}
		#			# The White Death is dead!
		#			country_event = {
		#				id = AAT_finland_the_white_death.9
		#				days = 8
		#				random_days = 22
		#			}
		#		}
		#	}
		#}

	}

	# The White Death is the Embodiment of Finland, not some person!
	option = {
		name = AAT_finland_the_white_death.4.b
		ai_chance = {
			base = 20
		}

		add_political_power = -25

		add_timed_idea = {
			idea = FIN_we_are_the_white_death_idea
			days = 180
		}	

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_will_be_killed_flag
		}
		

		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#			 	has_war = yes
		#			}
		#		}
		#		random_country = {
		#			limit = {
		#				has_war_with = ROOT
		#				has_variable = FIN_white_death_target_country
		#			}
		#			# The White Death is dead!
		#			country_event = {
		#				id = AAT_finland_the_white_death.9
		#				days = 8
		#				random_days = 22
		#			}
		#		}
		#	}
		#}
		
	}
}

# The White Death Embraces Us! - Event for FIN_white_death_target_country
country_event = {
	id = AAT_finland_the_white_death.7
	title = AAT_finland_the_white_death.7.t 
	desc = AAT_finland_the_white_death.7.desc
	picture = GFX_report_event_FIN_camouflaged_white_death

	fire_only_once = yes

	trigger = {

		has_variable = FIN_white_death_target_country

		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_offensive_war_with = FIN
		
		is_subject = no

		
		has_global_flag = FIN_simo_hayha_has_appeared_flag
		
	}

	mean_time_to_happen = { days = 24 }
	
	# This is bad...
	option = {
		name = AAT_finland_the_white_death.7.a
		ai_chance = {
			base = 100
		}

		IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -300
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -350
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -320
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -500
			add_war_support = -0.1
		}

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_is_safe_flag
		}

		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		FROM = {
		#			# The White Death continues to stalk his prey
		#			country_event = {
		#				id = AAT_finland_the_white_death.10
		#				days = 10
		#				random_days = 15
		#			}	
		#		}
		#	}
		#}

	}
}

# Despite Heavy Losses, Our troops successfully wound The White Death - Event for FIN_white_death_target_country
country_event = {
	id = AAT_finland_the_white_death.8
	title = AAT_finland_the_white_death.8.t 
	desc = AAT_finland_the_white_death.8.desc
	picture = GFX_report_event_FIN_camouflaged_white_death

	fire_only_once = yes

	trigger = {

		has_variable = FIN_white_death_target_country

		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_offensive_war_with = FIN
		
		is_subject = no

		
		has_global_flag = FIN_simo_hayha_will_be_wounded_flag
		
	}

	mean_time_to_happen = { days = 24 }
	
	# We have rid ourselves of a pesky fly!
	option = {
		name = AAT_finland_the_white_death.8.a
		ai_chance = {
			base = 100
		}
		
		IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -300
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -350
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -320
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -500
			add_war_support = -0.1
		}

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_has_been_inured_flag
		}

		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		FROM = {
		#			# Simo Häyhä is injured and brought off of the battlefield
		#			country_event = {
		#				id = AAT_finland_the_white_death.11
		#				days = 10
		#				random_days = 15
		#			}	
		#		}
		#	}
		#}

	}
}

# Despite Heavy Losses, Our troops have killed The White Death! - Event for FIN_white_death_target_country
country_event = {
	id = AAT_finland_the_white_death.9
	title = AAT_finland_the_white_death.9.t 
	desc = AAT_finland_the_white_death.9.desc
	picture = GFX_report_event_FIN_camouflaged_white_death

	fire_only_once = yes

	trigger = {

		has_variable = FIN_white_death_target_country

		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_offensive_war_with = FIN
		
		is_subject = no

		
		has_global_flag = FIN_simo_hayha_will_be_killed_flag
		
	}

	mean_time_to_happen = { days = 24 }
	
	# He stood no chance against us
	option = {
		name = AAT_finland_the_white_death.9.a
		ai_chance = {
			base = 100
		}
		
		IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -300
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				NOT = {
					FIN = {
						has_completed_focus = FIN_winter_warfare
					}
				}
			}
			add_manpower = -350
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -320
			add_war_support = -0.05
		}
		ELSE_IF = {
			limit = {
				has_global_flag = FIN_snipers_active_with_extra_arms
				FIN = {
					has_completed_focus = FIN_winter_warfare
				}
			}
			add_manpower = -500
			add_war_support = -0.1
		}

		hidden_effect = {
			set_global_flag = FIN_simo_hayha_is_dead_flag
		}

		#hidden_effect = {
		#	IF = {
		#		limit = {
		#			FIN = {
		#				has_war = yes
		#			}
		#		}
		#		FROM = {
		#			# Simo Häyhä has been killed!
		#			country_event = {
		#				id = AAT_finland_the_white_death.12
		#				days = 10
		#				random_days = 15
		#			}	
		#		}
		#	}
		#}

	}
}

# The White Death Continues to Stalk his prey - Event for FIN (end of the chain)
country_event = {
	id = AAT_finland_the_white_death.10
	title = AAT_finland_the_white_death.10.t 
	desc = AAT_finland_the_white_death.10.desc
	picture = GFX_report_event_FIN_camouflaged_white_death

	trigger = {

		tag = FIN
		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_defensive_war = yes
		has_civil_war = no
		
		is_subject = no

		any_country = {
			has_war_with = FIN
			has_variable = FIN_white_death_target_country
		}

		has_global_flag = FIN_simo_hayha_is_safe_flag
		
	}

	mean_time_to_happen = { days = 20 }

	fire_only_once = yes
	
	# They will know true fear
	option = {
		name = AAT_finland_the_white_death.10.a
		ai_chance = {
			base = 100
		}

		add_war_support = 0.04

		random_country = {
			limit = {
				has_war_with = ROOT
				has_variable = FIN_white_death_target_country
			}
			add_timed_idea = {
				idea = FIN_embraced_by_the_white_death
				days = 360
			}	
		}

	}
}

# Simo Häyhä has been injured and brought off of the battlefield - Event for FIN (end of the chain)
country_event = {
	id = AAT_finland_the_white_death.11
	title = AAT_finland_the_white_death.11.t 
	desc = AAT_finland_the_white_death.11.desc
	picture = GFX_report_event_FIN_simo_hayha

	fire_only_once = yes

	trigger = {

		tag = FIN
		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_defensive_war = yes
		has_civil_war = no
		
		is_subject = no

		any_country = {
			has_war_with = FIN
			has_variable = FIN_white_death_target_country
		}

		has_global_flag = FIN_simo_hayha_has_been_inured_flag
		
	}

	mean_time_to_happen = { days = 20 }
	
	# Nevertheless, he is a true Finnish Hero!
	option = {
		name = AAT_finland_the_white_death.11.a
		ai_chance = {
			base = 100
		}

		add_war_support = 0.03

		army_experience = 30

	}
}

# Simo Häyhä has been killed! - Event for FIN (end of the chain)
country_event = {
	id = AAT_finland_the_white_death.12
	title = AAT_finland_the_white_death.12.t 
	desc = AAT_finland_the_white_death.12.desc
	picture = GFX_report_event_europe_funeral

	fire_only_once = yes

	trigger = {

		tag = FIN
		FIN = {
			NOT = {
				has_government = communism
			}
		}

		has_defensive_war = yes
		has_civil_war = no
		
		is_subject = no

		any_country = {
			has_war_with = FIN
			has_variable = FIN_white_death_target_country
		}

		has_global_flag = FIN_simo_hayha_is_dead_flag
		
	}

	mean_time_to_happen = { days = 20 }
	
	# May his soul rest amongst the heroes of old
	option = {
		name = AAT_finland_the_white_death.12.a
		ai_chance = {
			base = 100
		}

		add_stability = 0.02

		add_war_support = 0.04

	}
}





