﻿pool_city_succession = {
	valid_character = {
		is_capable_adult_ai = yes
		OR = {
			has_same_culture_as = scope:base
			AND = {
				exists = scope:base.primary_title.title_province.culture
				culture = scope:base.primary_title.title_province.culture
			}
		}
		trigger_if = {
			limit = {
				scope:base = { has_realm_law = female_only_law }
			}
			is_female = yes
		}
		trigger_if = {
			limit = {
				scope:base = { has_realm_law = male_only_law }
			}
			is_male = yes
		}
		OR = {
			is_lowborn = yes
			AND = {
				exists = dynasty
				exists = scope:base.dynasty
				dynasty = scope:base.dynasty
				is_courtier_of = scope:base
			}
			AND = {
				exists = dynasty
				dynasty = {
					any_dynasty_member = {
						count <= 2
					}
				}
			}
		}
		is_claimant = no
		is_imprisoned = no
		is_betrothed = no
	}
	
	character_score = {
		base = 1
		
		modifier = {
			add = 3000
			is_courtier_of = scope:base
		}
		modifier = {
			add = { value = age max = 50 }
		}
		modifier = {
			add = 20
			has_education_stewardship_trigger = yes
		}
		modifier = {
			factor = 5
			is_female = yes
			scope:base.faith = {
				has_doctrine = doctrine_gender_female_dominated
			}
		}
		modifier = {
			factor = 5
			is_male = yes
			scope:base.faith = {
				has_doctrine = doctrine_gender_male_dominated
			}
		}
	}
	
	
	config = {
		age = { 20 80 }
	}
	
	selection_count = 25
	
	pool = faith
	court = yes
	gender = gender_law
}
