﻿#Special succession types
#If adding new types to the decision, use a trigger, otherwise they may break if the culture is split.

special_succession_witengamot_trigger = {
	culture = { has_cultural_parameter = witenagemot_succession_enabled }
}

special_succession_thing_trigger = {
	culture = { has_cultural_parameter = scandinavian_elective_enabled }
}

special_succession_tanistry_trigger = {
	culture = {
		OR = {
			has_cultural_pillar = heritage_brythonic
			has_cultural_pillar = heritage_goidelic
		}
	}
}

special_succession_jirga_trigger = {
	culture = { has_cultural_parameter = tribal_elective_enabled }
}

historical_succession_access_single_heir_succession_law_trigger = {
	trigger_if = {
		limit = { government_allows = administrative }
		OR = {
			tgp_japan_single_heir_succession_override_trigger = yes
			tgp_korea_single_heir_succession_override_trigger = yes
			has_title = title:e_hindustan
			has_title = title:h_china
			AND = {
				is_independent_ruler = yes
				government_has_flag = government_is_steppe_admin
			}
		}
	}
	trigger_else = {
		OR = {
			has_title = title:k_austria
			is_roman_emperor_trigger = yes
			AND = {
				has_title = title:e_france
				is_target_in_global_variable_list = {
					name = unavailable_unique_decisions
					target = flag:flag_reformed_carolingian_empire
				}
			}
			has_title = title:e_hindustan
			has_title = title:h_china
			AND = {
				government_has_flag = government_is_japan_feudal
				is_independent_ruler = yes
			}
			#Add any subsequent exceptions here.
		}
	}
}

historical_succession_access_single_heir_succession_law_youngest_trigger = {
	NOT = { government_allows = administrative }
	OR = {
		#has_title = title:e_byzantium
		#Add any subsequent exceptions here.
	}
}

historical_succession_access_single_heir_dynasty_house_trigger = {
	NOT = { government_allows = administrative }
	AND = {
		has_title = title:d_bohemia
		culture = { has_innovation = innovation_table_of_princes }
	}
}

can_have_meritocratic_regency_succession_law_trigger = {
	has_tgp_dlc_trigger = yes
	is_independent_ruler = yes
	highest_held_title_tier = tier_empire
	government_allows = administrative
	government_allows = merit
	NOT = { government_allows = obedience } # Stop Khanates
	OR = {
		# Ceremonial Monarch title always pairs with law
		exists = primary_title.var:administrative_ui_special_title
		# Jipjeong Jeong Jung-bu
		AND = {
			game_start_date = 1178.10.1
			has_title = title:e_goryeo
			months_from_game_start < 1
		}
	}
}
