########################################################
# CK2Plus MINOR TITLES
########################################################

title_ladys_champion = {
	message = yes
	realm_in_name = yes

	dignity = 0.2
	grant_limit = 1

	opinion_effect = 20
	monthly_salary = 0.1
	monthly_prestige = 0.125

	allowed_to_grant = {
		is_feudal = yes
		is_adult = yes
		is_female = yes

		# Already have a Champion title
		religion_openly_baltic_or_reformed_trigger = yes
		religion_openly_finnish_or_reformed_trigger = yes
		religion_openly_slavic_or_reformed_trigger = yes
		religion_openly_west_african_or_reformed_trigger = yes
		religion_openly_aztec_or_reformed_trigger = yes
	}

	allowed_to_hold = {
		is_female = no
		has_education_martial_trigger = yes
		is_adult = yes
		prisoner = no
		is_incapable = no
		health_traits < 1
		NOT = { has_character_flag = retired_champion }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}

		trigger_if = {
			limit = { FROM = { ai = no } }

			opinion = { who = FROM value >= 0 }
			reverse_opinion = { who = FROM value >= 0 }
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_lord = {
	message = no
	realm_in_name = yes
	show_as_title = yes

	dignity = 0.1
	grant_limit = 1000

	monthly_prestige = 0.05

	allowed_to_grant = {
		always = no
	}

	allowed_to_hold = {
		has_minor_title = title_lord

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
		always = no
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_pagan_wizard = {
	message = yes

	dignity = 0.01
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.01
	monthly_prestige = 0.05

	allowed_to_grant = {
		OR = {
			has_character_flag = seeks_pagan_knowledge
			trait = mystic
		}

		OR = {
			religion_group = christian
			religion_group = muslim
			religion_group = zoroastrian_group
		}

		any_courtier_or_vassal = {
			trait = mystic
			religion_group = pagan_group
			is_adult = yes
			is_female = no
			is_ruler = no
		}
	}

	allowed_to_hold = {
		trait = mystic
		religion_group = pagan_group
		is_adult = yes
		is_female = no
		is_ruler = no
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

### ZOROASTRIAN TITLES

title_dregvant = {
	is_unique = yes
	message = yes

	dignity = 0.01
	grant_limit = 1

	opinion_effect = -15
	monthly_prestige = -0.25

	allowed_to_grant = {
		higher_real_tier_than = DUKE
		religion_group = zoroastrian_group

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		OR = {
			trait = cruel
			is_kinslayer_trigger = yes
			trait = slothful
			trait = wroth
			trait = deceitful
		}

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_ashavan = {
	is_unique = yes
	message = yes

	dignity = 0.01
	grant_limit = 1

	opinion_effect = 10
	monthly_prestige = 0.1

	allowed_to_grant = {
		higher_real_tier_than = DUKE
		religion_group = zoroastrian_group

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		OR = {
			trait = kind
			trait = diligent
			trait = patient
			trait = honest
		}

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_sraoshavarez = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.01
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.02
	monthly_prestige = 0.05

	allowed_to_grant = {
		religion_group = zoroastrian_group
		higher_real_tier_than = DUKE

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		religion_group = zoroastrian_group
		is_adult = yes

		# TODO: Create scripted trigger with custom_tooltip (Is allowed to hold temples)
		OR = {
			is_female = no
			AND = {
				religion_allows_female_temple_holders = yes
				ROOT = { religion_allows_female_temple_holders = yes }
			}
		}

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_shapsheraz = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.01
	grant_limit = 1

	opinion_effect = 5
	monthly_salary = 0.02
	monthly_prestige = 0.05

	allowed_to_grant = {
		higher_real_tier_than = COUNT
		religion_group = zoroastrian_group

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		OR = {
			is_female = no

			AND = {
				is_feminist_trigger = yes
				ROOT = { is_feminist_trigger = yes }
			}

			OR = {
				has_law = true_cognatic_succession
				has_law = enatic_cognatic_succession
				has_law = enatic_succession
			}
		}

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

### CELTIC TITLES

title_uchelwr = {
	is_unique = yes
	message = yes

	dignity = 0.075
	grant_limit = 4

	opinion_effect = 5
	monthly_salary = 0.005
	monthly_prestige = 0.05

	allowed_to_grant = {
		religion_openly_celtic_or_reformed_trigger = yes

		OR = {
			culture = welsh
			culture = breton
			culture = cornish
		}

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		tooltip = { can_hold_title = job_marshal }
		hidden_trigger = { can_be_marshal_trigger = yes }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_laoch = {
	is_unique = yes
	message = yes

	dignity = 0.075
	grant_limit = 4

	opinion_effect = 5
	monthly_salary = 0.005
	monthly_prestige = 0.05

	allowed_to_grant = {
		religion_openly_celtic_or_reformed_trigger = yes

		OR = {
			is_feudal = yes
			is_tribal = yes
		}

		NOR = {
			culture = welsh
			culture = breton
			culture = cornish
		}
	}

	allowed_to_hold = {
		tooltip = { can_hold_title = job_marshal }
		hidden_trigger = { can_be_marshal_trigger = yes }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_royal_champion = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.2
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.1
	monthly_prestige = 0.125

	allowed_to_grant = {
		religion_openly_celtic_or_reformed_trigger = yes

		trigger_if = {
			limit = { independent = yes }
			higher_tier_than = COUNT
		}
		trigger_else = {
			higher_real_tier_than = DUKE
		}

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		religion_openly_celtic_or_reformed_trigger = yes
		is_adult = yes

		OR = {
			trait = head1
			trait = head2
			trait = head3
			trait = head4
			trait = head5
			trait = skilled_warrior
			trait = skilled_tactician
			trait = master_warrior
			trait = brilliant_strategist
		}

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_vates = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.1
	grant_limit = 2

	opinion_effect = 5
	monthly_salary = 0.05
	monthly_prestige = 0.05

	allowed_to_grant = {
		religion_openly_celtic_or_reformed_trigger = yes

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		religion_openly_celtic_or_reformed_trigger = yes
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_court_bard = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.15
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.075
	monthly_prestige = 0.1

	allowed_to_grant = {
		religion_openly_celtic_or_reformed_trigger = yes

		OR = {
			is_feudal = yes
			is_tribal = yes
		}

		any_courtier_or_vassal = {
			OR = {
				trait = poet
				trait = gregarious
			}

			is_adult = yes
			religion_openly_celtic_or_reformed_trigger = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes
		religion_openly_celtic_or_reformed_trigger = yes

		OR = {
			trait = poet
			trait = gregarious
		}

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

### HELLENIC TITLES

title_censor = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.20
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.010
	monthly_prestige = 0.125

	allowed_to_grant = {
		independent = yes
		religion = roman_pagan

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		tooltip = { can_hold_title = job_treasurer }
		hidden_trigger = { can_be_treasurer_trigger = yes }
		religion = roman_pagan

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_aedile = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.10
	grant_limit = 2

	opinion_effect = 10
	monthly_salary = 0.075
	monthly_prestige = 0.125

	allowed_to_grant = {
		independent = yes
		religion = roman_pagan

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		tooltip = { can_hold_title = job_treasurer }
		hidden_trigger = { can_be_treasurer_trigger = yes }
		religion = roman_pagan

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_magister_equitum = {
	is_unique = yes
	message = yes
	realm_in_name = yes

	dignity = 0.06
	grant_limit = 1

	opinion_effect = 5
	monthly_salary = 0.02
	monthly_prestige = 0.05

	allowed_to_grant = {
		OR = {
			has_landed_title = e_byzantium
			has_landed_title = e_roman_empire
		}

		OR = {
			is_feudal = yes
			is_tribal = yes
		}

		religion = roman_pagan
	}

	allowed_to_hold = {
		tooltip = { can_hold_title = job_marshal }
		hidden_trigger = { can_be_marshal_trigger = yes }
		has_education_martial_trigger = yes

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_vestalis = {
	message = yes

	dignity = 0.91
	grant_limit = 5

	opinion_effect = 5
	monthly_salary = 0.005
	monthly_prestige = 0.05
	monthly_piety = 0.100

	allowed_to_grant = {
		has_landed_title = d_roman_pagan
	}

	allowed_to_hold = {
		is_female = yes
		religion = roman_pagan

		OR = {
			has_minor_title = title_vestalis

			AND = {
				age >= 6
				age < 10
				is_incapable = no
				has_inheritance_blocker = no

				NOR = {
					trait = inbred
					trait = bastard
					trait = legit_bastard
					trait = child_of_consort
				}

				father_even_if_dead = { religion = roman_pagan }
				mother = { religion = roman_pagan }
			}
		}

		is_landed = no
		is_betrothed = no
		prisoner = no

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
		always = no
	}

	gain_effect = {
		remove_trait = hedonist
		add_trait = celibate
		add_trait = vestalis
		recalc_succession = yes
		set_character_flag = flag_vestalis
		change_variable = { which = global_num_vestales value = 1 }
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_vestalis_maxima = {
	is_unique = yes
	message = yes

	dignity = 0.92
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.010
	monthly_prestige = 0.25
	monthly_piety = 0.200

	allowed_to_grant = {
		has_landed_title = d_roman_pagan
	}

	allowed_to_hold = {
		OR = {
			has_minor_title = title_vestalis
			has_minor_title = title_vestalis_maxima
		}

		is_adult = yes
		is_female = yes
		is_landed = no
		religion = roman_pagan

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
		remove_title = title_vestalis
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_flamen_dialis = {
	message = yes

	dignity = 0.15
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.005
	monthly_prestige = 0.05
	monthly_piety = 0.005

	allowed_to_grant = {
		has_landed_title = d_roman_pagan
	}

	allowed_to_hold = {
		religion = roman_pagan
		is_adult = yes
		is_female = no

		OR = {
			any_spouse = { religion = roman_pagan }

			# We want to remove the title by event if his wife dies or converts
			has_minor_title = title_flamen_dialis
		}

		NOT = { has_minor_title = title_court_jester }
		NOT = { has_minor_title = title_censor }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
		remove_title = title_cupbearer
		remove_title = title_aedile
		remove_title = title_magister_equitum

		remove_title = title_flamen_martialis
		remove_title = title_flamen_quirinalis
		remove_character_modifier = modifier_flamen_martialis
		remove_character_modifier = modifier_flamen_quirinalis

		any_spouse = { give_minor_title = title_flaminica_dialis }

		add_character_modifier = {
			name = modifier_flamen_dialis
			duration = -1
			hidden = yes
		}
	}

	lose_effect = {
		remove_character_modifier = modifier_flamen_dialis

		any_spouse = {
			character_event = { id = ancrel.2110 } # Spouses must resign
		}
	}

	retire_effect = {
		remove_character_modifier = modifier_flamen_dialis

		any_spouse = {
			character_event = { id = ancrel.2110 } # Spouses must resign
		}
	}

	death_effect = {
		any_spouse = {
			character_event = { id = ancrel.2110 } # Spouses must resign
		}
	}
}

title_flaminica_dialis = {
	message = no

	dignity = 0.10
	grant_limit = 1

	monthly_salary = 0.000
	monthly_prestige = 0.025
	monthly_piety = 0.005

	allowed_to_grant = {
		always = no
	}

	allowed_to_hold = {
		spouse = { has_minor_title = title_flamen_dialis }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}


title_flamen_martialis = {
	message = yes

	dignity = 0.14
	grant_limit = 1

	opinion_effect = 5
	monthly_salary = 0.005
	monthly_prestige = 0.05
	monthly_piety = 0.005

	allowed_to_grant = {
		has_landed_title = d_roman_pagan
	}

	allowed_to_hold = {
		religion = roman_pagan
		is_adult = yes
		is_female = no

		OR = {
			any_spouse = { religion = roman_pagan }
			# We want to remove the title by event if his wife dies or converts
			has_minor_title = title_flamen_martialis
		}

		NOT = { has_minor_title = title_court_jester }
		NOT = { has_minor_title = title_censor }
		NOT = { has_minor_title = title_flamen_dialis }
		NOT = { has_minor_title = title_flamen_quirinalis }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
		remove_title = title_cupbearer
		remove_title = title_aedile
		remove_title = title_magister_equitum

		any_spouse = { give_minor_title = title_flaminica_martialis }

		add_character_modifier = {
			name = modifier_flamen_martialis
			duration = -1
			hidden = yes
		}
	}

	lose_effect = {
		remove_character_modifier = modifier_flamen_martialis

		any_spouse = {
			character_event = { id = ancrel.2111 } # Spouses must resign
		}
	}

	retire_effect = {
		remove_character_modifier = modifier_flamen_martialis

		any_spouse = {
			character_event = { id = ancrel.2111 } # Spouses must resign
		}
	}

	death_effect = {
		any_spouse = {
			character_event = { id = ancrel.2111 } # Spouses must resign
		}
	}
}

title_flaminica_martialis = {
	message = no

	dignity = 0.09
	grant_limit = 1

	monthly_salary = 0.000
	monthly_prestige = 0.025
	monthly_piety = 0.005

	allowed_to_grant = {
		always = no
	}

	allowed_to_hold = {
		any_spouse = { has_minor_title = title_flamen_martialis }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}


title_flamen_quirinalis = {
	message = yes

	dignity = 0.13
	grant_limit = 1

	opinion_effect = 5
	monthly_salary = 0.005
	monthly_prestige = 0.05
	monthly_piety = 0.005

	allowed_to_grant = {
		has_landed_title = d_roman_pagan
	}

	allowed_to_hold = {
		religion = roman_pagan
		is_adult = yes
		is_female = no

		OR = {
			is_theocracy = yes
			is_ruler = no
		}

		OR = {
			any_spouse = { religion = roman_pagan }
			# We want to remove the title by event if his wife dies or converts
			has_minor_title = title_flamen_quirinalis
		}

		NOT = { has_minor_title = title_court_jester }
		NOT = { has_minor_title = title_censor }
		NOT = { has_minor_title = title_flamen_dialis }
		NOT = { has_minor_title = title_flamen_martialis }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
		remove_title = title_cupbearer
		remove_title = title_aedile
		remove_title = title_magister_equitum

		any_spouse = { give_minor_title = title_flaminica_quirinalis }

		add_character_modifier = {
			name = modifier_flamen_quirinalis
			duration = -1
			hidden = yes
		}
	}

	lose_effect = {
		remove_character_modifier = modifier_flamen_quirinalis

		any_spouse = {
			character_event = { id = ancrel.2112 } # Spouses must resign
		}
	}

	retire_effect = {
		remove_character_modifier = modifier_flamen_quirinalis

		any_spouse = {
			character_event = { id = ancrel.2112 } # Spouses must resign
		}
	}

	death_effect = {
		any_spouse = {
			character_event = { id = ancrel.2112 } # Spouses must resign
		}
	}
}

title_flaminica_quirinalis = {
	message = no

	dignity = 0.08
	grant_limit = 1

	monthly_salary = 0.000
	monthly_prestige = 0.025
	monthly_piety = 0.005

	allowed_to_grant = {
		always = no
	}

	allowed_to_hold = {
		any_spouse = { has_minor_title = title_flamen_martialis }

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

# COURT EDUCATOR

title_court_educator = {
	message = yes
	realm_in_name = yes

    dignity = 5
	grant_limit = 1

	opinion_effect = 10
	monthly_prestige = 0.1
	monthly_salary = 0.02

	allowed_to_grant = {
		is_playable = yes
		NOT = { has_dlc = "Conclave"}
	}

	allowed_to_hold = {
		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		custom_tooltip = {
			text = court_educator_tooltip

			OR = {
				has_top_tier_education_trait_trigger = yes

				AND = {
					has_education_diplomacy_trigger = yes
					diplomacy >= 10
				}
				AND = {
					has_lifestyle_diplomacy_trigger = yes
					diplomacy >= 15
				}
				AND = {
					has_education_martial_trigger = yes
					martial >= 10
				}
				AND = {
					has_lifestyle_martial_trigger = yes
					martial >= 15
				}
				AND = {
					has_education_stewardship_trigger = yes
					stewardship >= 10
				}
				AND = {
					has_lifestyle_stewardship_trigger = yes
					stewardship >= 15
				}
				AND = {
					has_education_intrigue_trigger = yes
					intrigue >= 10
				}
				AND = {
					has_lifestyle_intrigue_trigger = yes
					intrigue >= 15
				}
				AND = {
					has_education_learning_trigger = yes
					learning >= 10
				}
				AND = {
					has_lifestyle_learning_trigger = yes
					learning >= 15
				}
			}
		}

		is_adult = yes
		prisoner = no
		is_inaccessible_trigger = no
		is_incapable = no
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

## Duplicate title for players without conclave (is_voter disables the title)
title_despot_nc = {
	counts_as_purple_born = yes
	is_unique = yes
	message = yes
	realm_in_name = yes
	show_as_title = yes

	dignity = 0.25
	grant_limit = 1

	opinion_effect = 15
	monthly_salary = 0.1
	monthly_prestige = 0.125

	allowed_to_grant = {
		OR = {
			has_landed_title = e_byzantium
			has_landed_title = e_roman_empire
		}

		NOT = { has_dlc = "Conclave" }
		is_feudal = yes

		OR = {
			religion_group = christian
			religion_group = jewish_group
			religion_openly_hellenic_or_reformed_trigger = yes
		}

		any_close_relative = {
			dynasty = PREV
			is_adult = yes
			is_incapable = no
			is_theocracy = no

			trigger_if = {
				limit = { is_female = yes }
				female_can_hold_minor_commander_title_trigger = yes
			}

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}

			NOR = {
				trait = monk
				trait = nun
				trait = eunuch
			}
		}
	}

	allowed_to_hold = {
		is_close_relative = FROM
		dynasty = FROM
		is_adult = yes
		is_incapable = no

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}

		trigger_if = {
			limit = { is_female = yes }
			female_can_hold_minor_commander_title_trigger = yes
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

## Duplicate title for players without conclave (is_voter disables the title)
title_chief_qadi_nc = {
	realm_in_name = yes
	is_unique = yes
	message = yes

	dignity = 0.15
	grant_limit = 1

	opinion_effect = 10
	monthly_salary = 0.05
	monthly_prestige = 0.15

	allowed_to_grant = {
		higher_real_tier_than = DUKE
		religion_group = muslim
		NOT = { has_dlc = "Conclave" }

		OR = {
			is_feudal = yes
			is_tribal = yes
		}
	}

	allowed_to_hold = {
		religion = FROM
		is_adult = yes
		has_education_learning_trigger = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_title_trigger = yes
			}
		}

		is_incapable = no

		custom_tooltip = {
			text = court_physician_tooltip_1

			trigger_if = {
				limit = { is_ruler = yes }

				primary_title = {
					temporary = no
				}
			}
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}