﻿common_character_validity_trigger = {
	NOR = { #No prince-bishop can ever join
		trigger_if = {
			limit = { exists = cp:councillor_court_chaplain }
			this = cp:councillor_court_chaplain
		}
	}
	OR = {
		$FACTION_TARGET$ = liege
		any_character_active_contract = {
			task_contract_target = $FACTION_TARGET$
		}
	}
	highest_held_title_tier >= tier_barony

	#Not blocked through events
	custom_description = {
		text = character_blocked_from_joining
		NOT = {
			has_character_flag = joining_faction_block
		}
	}
	
	NOT = { has_relation_blood_brother = $FACTION_TARGET$ }
}

common_can_character_join_trigger = {
	common_character_validity_trigger = {
		FACTION_TARGET = $FACTION_TARGET$
	}
	is_adult = yes
	NOT = { has_truce = $FACTION_TARGET$ }
	$FACTION_TARGET$ = {
		NOT = { has_strong_hook = root }
		NOT = { is_allied_to = root }
	}

	OR = {
		is_ai = no
		NOR = {
			has_relation_lover = $FACTION_TARGET$ 
			has_relation_friend = $FACTION_TARGET$ 
		}
	}

	$FACTION_TARGET$.highest_held_title_tier >= tier_county

	custom_description = {
		text = character_has_faction_disabling_modifier
		character_has_faction_disabling_modifier_trigger = yes
	}
}
