﻿can_leave_court_trigger = {
	OR = {
		NOT = {
			exists = court_owner
		}
		AND = {
			exists = court_owner
			NOR = {
				any_close_family_member = {
					this = court_owner
				}
				any_consort = {
					this = court_owner
				}
			}
			#Can't be a scheme agent
			court_owner = {
				NOT = {
					any_scheme = {
						scheme_is_character_agent = scope:actor
					}
				}
			}
		}
	}
}

can_visit_court_owner_trigger = {
	NOR = {
		has_relation_grudge = OWNER
		has_relation_rival = OWNER
		has_relation_nemesis = OWNER
	}
}

basic_is_available = {
	is_alive = yes
	is_imprisoned = no
	is_incapable = no
	has_contagious_deadly_disease_trigger = no

	custom_description = {
		text = ALREADY_IN_ACTIVITY
		NOR = {
			exists = involved_activity
			has_variable = homage_liege_scope
			has_character_flag = meditation_character_flag
			has_character_flag = petition_liege_character_flag
			has_character_flag = holding_court_character_flag
			is_being_visited_on_tour_strict = yes
		}
	}
	custom_description = {
		text = ALREADY_PLANNING_ACTIVITY
		NOT = { has_character_flag = planning_an_activity }
	}
	# Variable set within the adventure inspiration events
	NOT = { has_variable = gone_adventuring }
}