###################################################
#
##	Fury of the Northmen Major Decisions List
#
##	Secure the High Kingdom of the North Sea - Bind England, Denmark, and Norway into one mighty de jure.
##	Found the Capital of the Rus' - Semi-dynamic founding of Kiev.
##	Elevate the Kingdom of the Isles - Make the Petty Kingdom of Mann & the Isles into the Perfectly Regular Kingdom of Mann & the Isles.
##	Forge the Jomsvikings - Sponsor the creation of a conservative Asatru holy fighting force.
#
###################################################
#
##############################################
## Secure the High Kingdom of the North Sea	#
## by Ewan Cowhig Croft						#
##############################################
#
#### Secure the High Kingdom of the North Sea ###
#secure_high_kingdom_north_sea_decision = {
#	picture = {
#		reference = "gfx/interface/illustrations/decisions/fp1_decision_raise_runestone.dds"
#	}
#	decision_group_type = major
#
#	ai_check_interval_by_tier = {
#		barony = 0
#		county = 0
#		duchy = 0
#		kingdom = 120
#		empire = 0
#		hegemony = 0
#	}
#
#	desc = secure_high_kingdom_north_sea_decision_desc
#	selection_tooltip = secure_high_kingdom_north_sea_decision_tooltip
#
#	is_shown = {
#		is_independent_ruler = yes
#		#DLC check.
#		has_fp1_dlc_trigger = yes
#		#Standard filter checks.
#		is_playable_character = yes
#		exists = dynasty
#		OR = {
#			government_has_flag = government_is_tribal
#			government_has_flag = government_is_feudal
#			government_has_flag = government_is_clan
#		}
#		#Must be within the North/West Germanic cultural sphere.
#		OR = {
#			culture = { has_cultural_pillar = heritage_north_germanic }
#			culture = { has_cultural_pillar = heritage_west_germanic }
#		}
#		#Can't already be an empire.
#		highest_held_title_tier = tier_kingdom
#		#Not repeatable.
#		NOT = {
#			is_target_in_global_variable_list = {
#				name = unavailable_unique_decisions
#				target = flag:flag_secured_high_kingdom_north_sea
#			}
#		}
#		# One of the original kingdoms is not titular
#		OR = {
#			title:k_england = { 
#				is_titular = no 
#				holder ?= root
#			}
#			title:k_denmark = {
#				is_titular = no 
#				holder ?= root
#			}
#			title:k_norway = {
#				is_titular = no 
#				holder ?= root
#			}
#		}
#		OR = { # Must hold one of the related king titles, and have part of your realm in the other region
#			AND = {
#				has_title = title:k_england
#				any_sub_realm_county = {
#					title_province = { geographical_region = world_europe_north }
#				}
#			}
#			AND = {
#				OR = {
#					has_title = title:k_norway
#					has_title = title:k_denmark
#				}
#				any_sub_realm_county = {
#					title_province = { geographical_region = world_europe_west_britannia }
#				}
#			}
#		}
#	}
#
#	is_valid = {
#		#Must be independent.
#		is_independent_ruler = yes
#		#Should have a decent prestige level.
#		prestige_level >= high_prestige_level
#		#Completely controls the core regions of their kingdoms.
#		completely_controls_region = dlc_fp1_region_core_north_sea
#		#Has ruled one of the kingdoms for a very long time.
#		trigger_if = {
#			limit = {
#				title:k_norway = { is_titular = no }
#			}
#			has_title = title:k_norway
#		}
#		trigger_if = {
#			limit = {
#				title:k_england = { is_titular = no }
#			}
#			has_title = title:k_england
#		}
#		trigger_if = {
#			limit = {
#				title:k_denmark = { is_titular = no }
#			}
#			has_title = title:k_denmark
#		}
#		OR = {
#			trigger_if = {
#				limit = {
#					title:k_norway = { is_titular = no }
#				}
#				title:k_norway = { 
#					save_temporary_scope_as = temp_scope
#					custom_tooltip = {
#						text = secure_high_kingdom_denmark_held_years
#						title_held_years >= 10 
#					}
#				}
#			}
#			trigger_if = {
#				limit = {
#					title:k_england = { is_titular = no }
#				}
#				title:k_england = {
#					save_temporary_scope_as = temp_scope
#					custom_tooltip = {
#						text = secure_high_kingdom_denmark_held_years
#						title_held_years >= 10 
#					}
#				}
#			}
#			trigger_if = {
#				limit = {
#					title:k_denmark = { is_titular = no }
#				}
#				title:k_denmark = {
#					save_temporary_scope_as = temp_scope
#					custom_tooltip = {
#						text = secure_high_kingdom_denmark_held_years
#						title_held_years >= 10 
#					}
#				}
#			}
#		}
#		#Just confirm that becoming an empire will prevent you from achieving this one.
#		highest_held_title_tier < tier_empire
#		# If the Danelaw is still in existence, this must be resolved first.
#		trigger_if = {
#			limit = {
#				title:k_danelaw = { is_titular = no }
#			}
#			custom_description = {
#				text = secure_high_kingdom_north_sea_decision_solve_danelaw
#				always = no
#			}
#		}
#	}
#
#	is_valid_showing_failures_only = {
#		is_alive = yes
#		not = { exists = involved_activity }
#		#Has to be around for the ceremony.
#		is_imprisoned = no
#		has_contagious_deadly_disease_trigger = no
#	}
#
#	effect = {
#		save_scope_as = founder
#		show_as_tooltip = { secure_high_kingdom_north_sea_scripted_effect = yes }
#		gain_heroic_legend_seed_tooltip_effect = yes
#		trigger_event = { id = fp1_major_decisions.0001 }
#		#Notify other players.
#		every_player = {
#			limit = {
#				capital_province = {
#					OR = {
#						geographical_region = world_europe_west
#						geographical_region = world_europe_north
#					}
#				}
#				#Obviously, we exempt scope:founder themselves.
#				this != scope:founder
#			}
#			#Vassal players get a separate event.
#			if = {
#				limit = {
#					any_liege_or_above = { this = scope:founder }
#				}
#				trigger_event = fp1_major_decisions.0002
#			}
#			#Everyone else within range gets a less personal version.
#			else = { trigger_event = fp1_major_decisions.0003 }
#		}
#		hidden_effect = {
#			add_to_global_variable_list = {
#				name = unavailable_unique_decisions
#				target = flag:flag_secured_high_kingdom_north_sea
#			}
#		}
#	}
#
#	cost = {
#		gold = {
#			value = 0
#			if = {
#				limit = {
#					has_treasury = no
#				}
#				add = 200
#			}
#		}
#		treasury = {
#			value = 0
#			if = {
#				limit = {
#					has_treasury = yes
#				}
#				add = 200
#			}
#		}
#		prestige = 1000
#	}
#
#	ai_potential = {
#		always = yes
#	}
#
#	ai_will_do = {
#		base = 100
#	}
#}
#
##############################################
## Found the Capital of the Rus'				#
## by Ewan Cowhig Croft						#
##############################################
#
#### Found the Capital of the Rus' ###
#found_capital_of_the_rus_decision = {
#	picture = {
#		reference = "gfx/interface/illustrations/decisions/fp1_decision_raise_runestone.dds"
#	}
#	decision_group_type = major
#
#	ai_check_interval_by_tier = {
#		barony = 0
#		county = 0
#		duchy = 0
#		kingdom = 120
#		empire = 120
#		hegemony = 120
#	}
#
#	desc = found_capital_of_the_rus_decision_desc
#	selection_tooltip = found_capital_of_the_rus_decision_tooltip
#
#	is_shown = {
#		#DLC check.
#		has_fp1_dlc_trigger = yes
#		#Standard filter checks.
#		is_playable_character = yes
#		exists = dynasty
#		#Must be within the North Germanic cultural sphere.
#		OR = {
#			culture = { has_cultural_pillar = heritage_north_germanic }
#			has_culture = culture:norman
#			has_character_modifier = embraced_local_traditions_modifier
#			dynasty ?= {
#				has_dynasty_modifier = settled_norse_dynasty_modifier
#			}
#		}
#		#Must be in the current de jure title:e_russia: since this decision involves title:e_russia very intimately, we don't want a custom region.
#		any_held_title = {
#			title_tier = county
#			empire = title:e_russia
#		}
#		#Aaaaaaand it's already happened in 1066, albeit with less gameplay benefits.
#		NOT = { game_start_date >= 1066.09.15 }
#		#Year is before 1100, just to keep this from getting weird if no one manages it early.
#		current_date < 1100.1.1
#		#Not repeatable.
#		NOT = {
#			is_target_in_global_variable_list = {
#				name = unavailable_unique_decisions
#				target = flag:flag_founded_capital_of_rus
#			}
#		}
#	}
#
#	is_valid = {
#		#Must be independent.
#		top_liege = this
#		#Has to be around to organise the construction.
#		is_imprisoned = no
#		#Must have a capital within title:e_russia, as we'll use this as a fallback.
#		capital_county.empire = title:e_russia
#		#Should have a decent prestige level.
#		OR = {
#			prestige_level >= very_high_prestige_level
#			AND = {
#				prestige_level >= high_prestige_level
#				completely_controls = title:c_kiev
#			}
#		}
#		#Repeat the time limit concern just so that the player knows it's a thing.
#		custom_description = {
#			text = found_capital_of_the_rus_decision_before_last_date
#			current_date <= 1100.1.1
#		}
#	}
#
#	is_valid_showing_failures_only = {
#		is_available_at_peace_adult = yes
#	}
#
#	effect = {
#		save_scope_as = founder
#		#Nab scope:founder's capital for the initial tooltip; this may be changed in the actual event.
#		scope:founder.capital_county = { save_scope_as = new_rus_capital }
#		show_as_tooltip = { found_capital_of_rus_scripted_effect = yes }
#		trigger_event = { id = fp1_major_decisions.0011 }
#		#Notifying other players is done in scope:founder's event, as scope:founder may change the circumstances of the decision with their option choice.
#		hidden_effect = {
#			add_to_global_variable_list = {
#				name = unavailable_unique_decisions
#				target = flag:flag_founded_capital_of_rus
#			}
#		}
#	}
#
#	cost = {
#		gold = {
#			value = 0
#			if = {
#				limit = {
#					has_treasury = no
#				}
#				add = 100
#			}
#		}
#		treasury = {
#			value = 0
#			if = {
#				limit = {
#					has_treasury = yes
#				}
#				add = 100
#			}
#		}
#		prestige = 500
#	}
#
#	ai_potential = {
#		always = yes
#	}
#
#	ai_will_do = {
#		base = 0
#
#		# Weight up for traits.
#		modifier = {
#			add = 25
#			has_trait = ambitious
#		}
#		modifier = {
#			add = 25
#			has_trait = arrogant
#		}
#		modifier = {
#			add = 25
#			has_trait = architect
#		}
#		modifier = {
#			add = 25
#			has_trait = administrator
#		}
#		modifier = {
#			add = 25
#			has_trait = viking
#		}
#
#		# Weight up for game year.
#		modifier = {
#			add = 25
#			current_year >= 920
#		}
#		modifier = {
#			add = 25
#			current_year >= 980
#		}
#	}
#}
#
##############################################
## Elevate the Kingdom of the Isles			#
## by Ewan Cowhig Croft						#
##############################################
#
## This decision is intentionally fairly whimsical, and in no way intended to reflect historical reality or possibility, nor is it in any way affiliated with affiliated with the Isle of Mann Tourism Board.
#### Elevate the Kingdom of Mann & the Isles ###
#elevate_mann_and_the_isles_decision = {
#	picture = {
#		reference = "gfx/interface/illustrations/decisions/decision_found_kingdom.dds"
#	}
#	decision_group_type = major
#
#	ai_check_interval_by_tier = {
#		barony = 0
#		county = 120
#		duchy = 120
#		kingdom = 0
#		empire = 0
#		hegemony = 0
#	}
#
#	desc = elevate_mann_and_the_isles_decision_desc
#	selection_tooltip = elevate_mann_and_the_isles_decision_tooltip
#
#	is_shown = {
#		#DLC check.
#		has_fp1_dlc_trigger = yes
#		#Standard filter checks.
#		is_playable_character = yes
#		exists = dynasty
#		OR = {
#			government_has_flag = government_is_tribal
#			government_has_flag = government_is_feudal
#			government_has_flag = government_is_clan
#		}
#		#Must be within the North Germanic cultural sphere.
#		OR = {
#			culture = { has_cultural_pillar = heritage_north_germanic }
#			has_culture = culture:norman
#		}
#		#Must be in the vague region.
#		any_held_title = {
#			title_tier = county
#			title_province = { geographical_region = world_europe_west_britannia }
#		}
#		#Can't already be a kingdom.
#		highest_held_title_tier <= tier_duchy
#		#Not repeatable.
#		NOT = {
#			is_target_in_global_variable_list = {
#				name = unavailable_unique_decisions
#				target = flag:flag_elevated_mann_and_the_isles
#			}
#		}
#	}
#
#	is_valid = {
#		#Must be independent.
#		top_liege = this
#		#Has to be around for the ceremony.
#		is_imprisoned = no
#		#Should have the highest prestige level.
#		prestige_level >= max_prestige_level
#		#Completely controls Mann.
#		has_title = title:c_isle_of_man
#		has_title = title:d_the_isles
#		#Can't already be a kingdom; show this here too so people aren't caught unawares.
#		highest_held_title_tier <= tier_duchy
#		#Must be in/adjacent to the Viking Age; show this here too so people aren't caught unawares.
#		NOT = {
#			culture = { has_cultural_era_or_later = culture_era_high_medieval }
#		}
#		#Must be a proven pirate.
#		has_trait = viking
#	}
#
#	is_valid_showing_failures_only = {
#		is_alive = yes
#		not = { exists = involved_activity }
#		is_imprisoned = no
#		has_contagious_deadly_disease_trigger = no
#	}
#
#	effect = {
#		gain_heroic_legend_seed_tooltip_effect = yes
#		save_scope_as = founder
#		# Trigger effects.
#		show_as_tooltip = { elevate_mann_and_the_isles_scripted_effect = yes }
#		trigger_event = { id = fp1_major_decisions.0021 }
#		#Notify other players.
#		every_player = {
#			limit = {
#				capital_province = { geographical_region = world_europe_west_britannia }
#				#Obviously, we exempt scope:founder themselves.
#				this != scope:founder
#			}
#			#Vassal players get a separate event.
#			if = {
#				limit = {
#					any_liege_or_above = { this = scope:founder }
#				}
#				trigger_event = fp1_major_decisions.0022
#			}
#			#Everyone else within range gets a less personal version.
#			else = { trigger_event = fp1_major_decisions.0023 }
#		}
#		hidden_effect = {
#			add_to_global_variable_list = {
#				name = unavailable_unique_decisions
#				target = flag:flag_elevated_mann_and_the_isles
#			}
#		}
#	}
#
#	cost = {
#		prestige = 2000
#	}
#
#	ai_potential = {
#		always = yes
#	}
#
#	ai_will_do = {
#		base = 100
#	}
#}
#
##############################################
## Forge the Jomsvikings						#
## by Ewan Cowhig Croft						#
##############################################
#
#### Forge the Jomsvikings ###
#forge_the_jomsvikings_decision = {
#	picture = {
#		reference = "gfx/interface/illustrations/decisions/fp1_decision_forge_jomsvikings.dds"
#	}
#	decision_group_type = major
#
#	ai_check_interval_by_tier = {
#		barony = 0
#		county = 0
#		duchy = 0
#		kingdom = 120
#		empire = 120
#		hegemony = 120
#	}
#
#	desc = forge_the_jomsvikings_decision_desc
#	selection_tooltip = forge_the_jomsvikings_decision_tooltip
#
#	is_shown = {
#		# DLC check.
#		has_fp1_dlc_trigger = yes
#		# Standard filter checks.
#		is_playable_character = yes
#		exists = dynasty
#		OR = {
#			government_has_flag = government_is_tribal
#			government_has_flag = government_is_feudal
#			government_has_flag = government_is_clan
#		}
#		# Must follow an unreformed Germanic faith.
#		faith = { fp1_valid_norse_faith_for_jomsvikings_trigger = yes }
#		# Jomsvikings cannot have existed already.
#		fp1_jomsvikings_have_not_existed_trigger = yes
#	}
#
#	is_valid = {
#		# Must be independent.
#		top_liege = this
#		# Should be decently famous in all fashions.
#		prestige_level >= high_prestige_level
#		piety_level >= medium_piety_level
#		# Repeat faith requirements
#		custom_tooltip = {
#			faith = { fp1_valid_norse_faith_for_jomsvikings_trigger = yes }
#			text = fp1_valid_norse_faith_for_jomsvikings_trigger_tt
#		}
#		# You hold land in a suitable region.
#		## Weird structure is to stop the decision window trying to parse duchies through the county filter, which it otherwise cannot be disuaded from doing.
#		any_held_title = {
#			trigger_if = {
#				limit = { tier = tier_county }
#				fp1_valid_county_for_jomsvikings_trigger = yes
#			}
#			trigger_else = { always = no }
#		}
#	}
#
#	is_valid_showing_failures_only = {
#		is_available_adult = yes
#	}
#
#	effect = {
#		save_scope_as = founder
#		# Show the results.
#		show_as_tooltip = { forge_the_jomsvikings_decision_tooltip_effect = yes }
#		# Send out events.
#		trigger_event = { id = fp1_major_decisions.0031 }
#		# Notification of other players is handled in the immediate block of scope:founder's event.
#		# Flag to stop this repeating is filed in the scripted effect, since we might forge them via event instead.
#	}
#
#	cost = {
#		piety = 500
#		prestige = 1000
#	}
#
#	ai_potential = {
#		always = yes
#	}
#
#	ai_will_do = {
#		base = 100
#	}
#}
#