########################################################
# 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
#	retire_effect		Fires when a title is lost due to the character stepping down
#	death_effect		Fires when a title is lost due to the character dying
#	message				Should fire a message to the its owner when set
#	The other fields are all character modifiers

#	ai_will_do is supported

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

	religion = catholic

	grant_limit = 9
	dignity = 0.9

	opinion_effect = 20
	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}

	allow = {
		religion = catholic
		is_theocracy = yes
		has_global_flag = great_schism_happened

		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 = {
		set_character_flag = is_cardinal
	}

	lose_effect = {
		clr_character_flag = is_cardinal
	}

	retire_effect = {
	}

	death_effect = {
	}
}

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

	religion = fraticelli

	grant_limit = 9
	dignity = 0.9

	opinion_effect = 20
	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}

	allow = {
		religion = fraticelli
		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 = {
		set_character_flag = is_cardinal
	}

	lose_effect = {
		clr_character_flag = is_cardinal
	}

	retire_effect = {
	}

	death_effect = {
	}
}
