﻿pool_court_chaplain = {
	valid_character = {
		# Capable adults
		is_capable_adult = yes
		is_imprisoned = no
		is_married = no
		is_betrothed = no

		# In minimum good standing with faith
		NOT = { has_trait = excommunicated }

		# Correct gender
		scope:base.faith = { has_allowed_gender_for_clergy = root }
		
		# No close family members for temporal religions unless they have relevant traits
		trigger_if = {
			limit = {
				scope:base.faith = {
					NOT = { has_doctrine_parameter = lay_clergy }
				}
			}
			OR = {
				NOT = { is_close_family_of = scope:base }
				has_trait = devoted
				has_trait = saint
			}
		}

		# No charioteers
		has_any_charioteer_trait = no 						
	}
	
	character_score = {
		base = 1
		
		modifier = {
			add = 250
			is_courtier_of = scope:base
		}
		modifier = {
			add = -10000
			NOT = { is_courtier_of = scope:base }
			is_ai = no
		}
		
		modifier = {
			add = 100
			has_same_culture_as = scope:base
		}
		modifier = {
			add = 15
			culture = { has_same_culture_heritage = scope:base.culture }
		}
		modifier = {
			add = 10
			culture = { has_same_culture_language = scope:base.culture }
		}
		modifier = {
			add = 5
			culture = { has_same_culture_ethos = scope:base.culture }
		}

		modifier = {
			factor = 1.5
			age > 40
		}
		modifier = {
			factor = 3
			scope:base.faith = { has_preferred_gender_for_clergy = root }
		}
	}
	
	config = {
		background = clergy
		age = { 25 55 }
	}
	
	selection_count = 25
	
	pool = faith
	gender = clergy
}


# Referenced in code for granting titles to clergy
pool_theocratic_succession = {
	valid_character = {
		is_capable_adult = yes
		scope:base.faith = { has_allowed_gender_for_clergy = root }
		is_imprisoned = no											 
		is_married = no
		is_betrothed = no
												 
		NOT = { has_trait = excommunicated }
	}
	
	character_score = {
		base = 1
		
		modifier = {
			add = 20000
			has_character_modifier = hof_support_modifier
		} 	 	
		
		modifier = {
			add = 1000
			is_courtier_of = scope:base
		}
		
		modifier = {
			add = 200
			is_ai = no
		}
		
		modifier = {
			add = 100
			has_same_culture_as = scope:base
		}
		modifier = {
			add = 15
			culture = { has_same_culture_heritage = scope:base.culture }
		}
		modifier = {
			add = 10
			culture = { has_same_culture_language = scope:base.culture }
		}
		modifier = {
			add = 5
			culture = { has_same_culture_ethos = scope:base.culture }
		}

		modifier = {
			factor = 1.5
			age > 40
		}
		modifier = {
			factor = 1.5
			age > 60
		}
		modifier = {
			factor = 3
			scope:base.faith = { has_preferred_gender_for_clergy = root }
		}
	}
	
	config = {
		background = clergy
		age = { 35 65 }
	}
	
	selection_count = 25
	
	pool = faith
	gender = clergy
}
