﻿utc_title_changes_hands_on_title_gain_trigger = {
	NOT = { has_game_rule = utc_turned_off_usurpation_barriers }
	NOT = { has_game_rule = utc_0_years_usurpation_cooldown }
	exists = faith.religious_head_title
	scope:title = { 
		this = root.faith.religious_head_title
		recent_history = {
			type = created
			days = 1
		}
	}
	utc_faith_check_trigger = yes
}
utc_faith_check_trigger = {
	faith = { has_doctrine = doctrine_temporal_head }
	OR = {
		AND = {
			OR = {
				has_game_rule = utc_islam_usurpation_barriers
				has_game_rule = utc_islam_plus_unreformed_usurpation_barriers
				has_game_rule = utc_islam_plus_reformed_usurpation_barriers
			}
			has_religion = religion:islam_religion
			# If Shia, only rulers with sayyid trait should be allowed to see this decision
			OR = {
				AND = {
					faith = { has_doctrine = muhammad_succession_shia_doctrine }
					has_trait = sayyid
				}
				NOT = { faith = { has_doctrine = muhammad_succession_shia_doctrine } }
			}
		}
		AND = {
			OR = {
				has_game_rule = utc_islam_plus_unreformed_usurpation_barriers
				has_game_rule = utc_unreformed_usurpation_barriers
			}
			faith = { has_doctrine_parameter = unreformed }
		}
		AND = {
			OR = {
				has_game_rule = utc_islam_plus_reformed_usurpation_barriers
				has_game_rule = utc_reformed_usurpation_barriers
			}
			faith = { NOT = { has_doctrine_parameter = unreformed } }
		}
	}
}