########################################################
# RELIGIOUS TITLES
# Titles given out by the religious head
########################################################
#	religion: Religion that owns this title.
#	can_elect_head: If holders of this title can elect a new head.
#	grant_limit: Max number of holders.
#	realm_in_name: Append the name of the country after the title (Queen [of Sweden])
#	allow: conditions for the character to hold the title
#	gain_effect: fires when the title is granted
#	lose_effect: fires when a title is lost if dismissal_trigger evaluates to false
#	message: should fire a message to the its owner when set
#	The other fields are all character modifiers.

title_druid_circle_member = {
	can_elect_head = yes
	message = yes
	realm_in_name = no
	show_as_title = yes

	religion = celtic_pagan_reformed
	
	grant_limit = 9
	dignity = 0.9

	opinion_effect = 20
	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}
	
	allow = {
		religion = celtic_pagan_reformed
		has_global_flag = acr_pagan_papal
		celtic_pagan_reformed = {
			persistent_event_target:religion_title = {
				has_title_flag = acr_uses_college_of_cardinals
				NOT = { has_title_flag = acr_uses_autocephaly }
			}
		}
		trigger_if = {
			limit = { has_global_flag = acr_holy_order_cardinals }
			OR = {
				is_theocracy = yes
				holy_order = yes
			}
		}
		trigger_else = {
			is_theocracy = yes
		}
		trait = druid
		rightful_religious_head_scope = {
			controls_religion = yes # Not in a realm with an anti-pope
			is_within_diplo_range = ROOT
		}
	}

	revoke_trigger = {
		always = no
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_dryad_circle_member = {
	can_elect_head = yes
	message = yes
	realm_in_name = no
	show_as_title = yes

	religion = britannic_pagan

	grant_limit = 9
	dignity = 0.9

	opinion_effect = 20
	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}
	
	allow = {
		religion = britannic_pagan
		has_global_flag = acr_pagan_papal
		britannic_pagan = {
			persistent_event_target:religion_title = {
				has_title_flag = acr_uses_college_of_cardinals
				NOT = { has_title_flag = acr_uses_autocephaly }
			}
		}
		is_celtic_clergy_trigger = yes
		rightful_religious_head_scope = {
			controls_religion = yes # Not in a realm with an anti-pope
			is_within_diplo_range = ROOT
		}
		trigger_if = {
			limit = { has_global_flag = acr_holy_order_cardinals }
			OR = {
				is_theocracy = yes
				holy_order = yes
			}
		}
		trigger_else = {
			is_theocracy = yes
		}
	}

	revoke_trigger = {
		always = no
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_collegium_member = {
	can_elect_head = yes
	message = yes
	realm_in_name = no
	show_as_title = yes

	religion = hellenic_pagan_reformed

	grant_limit = 9
	dignity = 0.9

	opinion_effect = 20
	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}
	
	allow = {
		religion = hellenic_pagan_reformed
		has_global_flag = acr_pagan_papal
		hellenic_pagan_reformed = {
			persistent_event_target:religion_title = {
				has_title_flag = acr_uses_college_of_cardinals
				NOT = { has_title_flag = acr_uses_autocephaly }
			}
		}
		trigger_if = {
			limit = { has_global_flag = acr_holy_order_cardinals }
			OR = {
				is_theocracy = yes
				holy_order = yes
			}
		}
		trigger_else = {
			is_theocracy = yes
		}
		rightful_religious_head_scope = {
			controls_religion = yes # Not in a realm with an anti-pope
			is_within_diplo_range = ROOT
		}
	}

	revoke_trigger = {
		always = no
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_xroj_council_member = {
	can_elect_head = yes
	message = yes
	realm_in_name = no
	show_as_title = yes

	religion = egyptian_pagan_reformed
	
	grant_limit = 9
	dignity = 0.9

	opinion_effect = 20
	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}
	
	allow = {
		religion = egyptian_pagan_reformed
		has_global_flag = acr_pagan_papal
		egyptian_pagan_reformed = {
			persistent_event_target:religion_title = {
				has_title_flag = acr_uses_college_of_cardinals
				NOT = { has_title_flag = acr_uses_autocephaly }
			}
		}
		trigger_if = {
			limit = { has_global_flag = acr_holy_order_cardinals }
			OR = {
				is_theocracy = yes
				holy_order = yes
			}
		}
		trigger_else = {
			is_theocracy = yes
		}
		rightful_religious_head_scope = {
			controls_religion = yes # Not in a realm with an anti-pope
			is_within_diplo_range = ROOT
		}
	}

	revoke_trigger = {
		always = no
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}