﻿is_non_spouse_councillor_trigger = {
	is_available_healthy_adult = yes
	has_royal_court = no
	NOT = { has_trait = slave }
	NOT = {
		is_spouse_of = scope:ruler
	}
}

court_event_ongoing_trigger = {
	OR = {
		has_local_player_open_court_event = yes
 		has_local_player_unopened_court_event = yes
	}
}

is_available_non_adventurer_inspired_person_trigger = {
	exists = inspiration
	is_in_the_same_court_as_or_guest = scope:ruler
	is_available_healthy_adult = yes
	NOT = { has_trait = slave }
}

is_available_schemer = {
	save_temporary_scope_as = schemer_check
	OR = {
		has_owned_scheme = yes
		scope:ruler = {
			any_targeting_scheme = {
				is_hostile = yes
				any_scheme_agent_character = {
					this = scope:schemer_check
				}
			}
		}
	}
	is_available_healthy_adult = yes
	NOT = { has_trait = slave }
	has_royal_court = no
}

is_available_non_primary_consort = {
	is_available = yes
	NOT = {this = primary_spouse }
}

is_available_non_child_family = {
	is_available = yes
	is_healthy = yes
	child_not_infant_trigger = yes
	is_close_or_extended_family_of = scope:ruler
	has_royal_court = no
}

is_incorrect_type_for_throne_trigger = {
	trigger_if = {
		limit = {
			exists = $CHARACTER$.capital_county	
		}
		$CHARACTER$.capital_county.culture = { 
			OR = {
				has_graphical_mena_culture_group_trigger = yes
				has_graphical_india_culture_group_trigger = yes
			}
		}
	}
	OR = {
		has_trait = dwarf
		has_trait = giant
		is_adult = no
	}
}

is_spouse_incorrect_type_for_throne_trigger = {
	trigger_if = {
		limit = {
			exists = $CHARACTER$.capital_county	
		}
		$CHARACTER$.capital_county.culture = { 
			OR = {
				has_graphical_mena_culture_group_trigger = yes
				has_graphical_india_culture_group_trigger = yes
			}
		}
	}
	exists = $CHARACTER$.primary_spouse
	$CHARACTER$.primary_spouse = {
		OR = {
			has_trait = dwarf
			has_trait = giant
			is_adult = no
		}
	}
}

has_court_event_flag = {
	has_character_flag = in_court_event
}
