﻿can_be_spouse_councillor_trigger = {
	save_temporary_scope_as = spouse_councillor_check
	can_be_councillor_basics_trigger = yes
	#NOT = { # We allow spouses to both be regents and do their spouse job
	#	this = liege.diarch
	#}
	NOT = {
		$COUNCIL_OWNER$ ?= {
			has_character_flag = mourning_main_spouse_flag
		}
	}
	trigger_if = {
		limit = { is_ruler = yes }
		liege ?= $COUNCIL_OWNER$
		$COUNCIL_OWNER$ = { primary_spouse = scope:spouse_councillor_check }
	}
	trigger_else = {
		$COUNCIL_OWNER$ ?= { primary_spouse = scope:spouse_councillor_check }
	}
}

can_be_vizier_councillor_trigger = {
	can_be_councillor_basics_trigger = yes
	save_temporary_scope_as = confidant

	$COUNCIL_OWNER$ = {
		OR = {
			scope:confidant = diarch
			any_spouse = {
				scope:confidant = this
			}
		}
	}
}