﻿# The entry should be named in the same way that the elective succession law is named to define it's voter's logic.
# Root scope - Elector, the character voting in the election.
# scope:candidate scope - Candidate, Character considered for the title.
# scope:title scope - Title, The title the nomination is for.
# scope:holder scope - Ruler, The ruler currently holding the title.
# scope:holder_candidate scope - Favored Candidate, The title owner's candidate.
# The voter will vote for the top score candidate calculated from this script.

lwxxx_last_will_elective = {
	elector_vote_strength = {
		base = 1
	}
	
	electors = {
		add = holder
	}

	candidate_score = {
		base = 0
		##########################	Holder voting pattern	##########################
		#
		# TODO willthe AI be blocked from using this law?
		# TODO is this actually needed if the AI will not be allowed to use this law?
		#
		holder_voting_pattern_lwxxx_last_will_elective_modifier = yes
	}
	
	#scope:candidate = Candidate, scope:title = Title, scope:holder_candidate = Candidate currently selected by ruler.
	candidates = {
		add = {
			type = holder_close_or_extended_family
		}
		add = {
			type = holder_spouses
		}
		add = {
			type = holder_dynasty
		}
		add = {
			type = holder
		}
		add = {
			type = title_claimants
			limit = {
				or = {
					scope:title = { tier = tier_county }
					is_landed = yes
					lwxxx_elected_to_any_county_trigger = { HOLDER = scope:title.holder }
				}
			}
		}
	}
}
