﻿title_succession_laws = {
	#Default Feudal Elective
	feudal_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				AND = {
					has_game_rule = allow_unplayables
					NOT = { has_government = tribal_government }
				}
			}
			highest_held_title_tier >= tier_duchy
			NOR = { #Cultures have their special flavor.
				culture = culture:anglo_saxon
				has_culture_group = culture_group:north_germanic_group
			}
		}
		can_pass = {
			can_change_title_law_trigger = yes
		}
		can_title_have = {
			tier >= tier_duchy
		}
		succession = {
			order_of_succession = election
			election_type = feudal_elective
		}
		flag = elective_succession_law
		modifier = {
			direct_vassal_opinion = 10
		}
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}

	#HRE Succession
	princely_elective_succession_law = {
		can_have = {
			has_government = feudal_government
			highest_held_title_tier = tier_empire
		}
		can_pass = {
			can_change_title_law_trigger = yes
		}
		can_title_have = {
			tier >= tier_duchy
			this = title:e_hre
		}
		succession = {
			order_of_succession = election
			election_type = princely_elective
		}
		flag = elective_succession_law
		modifier = {
			direct_vassal_opinion = 10
			vassal_limit = 20
		}
		revoke_cost = {
			prestige = change_hre_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}

	#Witenagemot
	saxon_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				has_government = tribal_government
				has_game_rule = allow_unplayables
			}
			highest_held_title_tier >= tier_kingdom
		}
		can_pass = {
			can_change_title_law_trigger = yes
			culture = culture:anglo_saxon
		}
		can_title_have = {
			tier >= tier_duchy
		}
		succession = {
			order_of_succession = election
			election_type = saxon_elective
		}
		flag = elective_succession_law
		modifier = {
			direct_vassal_opinion = 5
		}
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}
	#Thing
	scandinavian_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				has_government = tribal_government
				has_game_rule = allow_unplayables
			}
			highest_held_title_tier >= tier_duchy
		}
		can_pass = {
			can_change_title_law_trigger = yes
			has_culture_group = culture_group:north_germanic_group
		}
		can_title_have = {
			tier >= tier_duchy
		}
		succession = {
			order_of_succession = election
			election_type = scandinavian_elective
		}
		flag = elective_succession_law
		modifier = {
			direct_vassal_opinion = 5
		}
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}
	#Tanistry
	gaelic_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				has_government = tribal_government
				has_game_rule = allow_unplayables
			}
			highest_held_title_tier >= tier_duchy
		}
		can_pass = {
			can_change_title_law_trigger = yes
			custom_description = {
				OR = {
					has_culture_group = culture_group:brythonic_group
					has_culture_group = culture_group:goidelic_group
				}
				text = succession_laws_must_have_valid_tanistry_culture
			}
		}
		can_title_have = {
			tier >= tier_duchy
		}
		succession = {
			order_of_succession = election
			election_type = gaelic_elective
		}
		flag = elective_succession_law
		modifier = {
			direct_vassal_opinion = 5
		}
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}
}