﻿restore_roman_patriarchate_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}

	desc = restore_roman_patriarchate_decision_desc
	selection_tooltip = restore_roman_patriarchate_decision_tooltip
	decision_group_type = major

	ai_check_interval = 120

	is_shown = {
		is_ruler = yes
		is_landed = yes
		root.faith = {
			OR = {
				has_doctrine = orthodox_autocephaly_pentarch
				has_doctrine = orthodox_autocephaly_autocephalous
				has_doctrine = orthodox_autocephaly_autonomous
			}
		}
		highest_held_title_tier > 3 #Kings & Emperors
		NOT = {
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_roman_patriarchate
			}
		}
	}

	is_valid = {
		piety_level >= high_piety_level
		completely_controls = title:d_latium
		highest_held_title_tier > 3
	}

	is_valid_showing_failures_only = {
		is_capable_adult = yes
		is_imprisoned = no
		is_independent_ruler = yes
		is_at_war = no
	}

	effect = {
		custom_tooltip = restore_roman_patriarchate_decision_effect_tooltip
		trigger_event = {
			id = autocephaly_decision.0020
		}
		hidden_effect = {
			add_to_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_roman_patriarchate
			}
		}
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}


restore_school_of_edessa_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}

	desc = restore_school_of_edessa_decision_desc
	selection_tooltip = restore_school_of_edessa_decision_tooltip
	decision_group_type = major

	ai_check_interval = 120

	is_shown = {
		is_ruler = yes
		is_landed = yes
		root.faith = { has_doctrine = doctrine_christology_nestorian }
		highest_held_title_tier > 3 #Kings & Emperors
		NOT = {
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_school_edessa
			}
		}
	}

	is_valid = {
		piety_level >= high_piety_level
		completely_controls = title:d_edessa
		highest_held_title_tier > 3
	}

	is_valid_showing_failures_only = {
		is_capable_adult = yes
		is_imprisoned = no
		is_independent_ruler = yes
		is_at_war = no
	}

	effect = {
		custom_tooltip = restore_school_of_edessa_decision_effect_tooltip
		trigger_event = {
			id = autocephaly_decision.0040
		}
		hidden_effect = {
			add_to_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_school_edessa
			}
		}
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}


submit_to_pentarch_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}

	desc = submit_to_pentarch_decision_desc
	selection_tooltip = submit_to_pentarch_decision_tooltip
	decision_group_type = major

	ai_check_interval = 120

	is_shown = {
		is_ruler = yes
		is_landed = yes
		root.faith = { has_doctrine = orthodox_autocephaly_pentarch }
		highest_held_title_tier > 1
		AND = {
			root.capital_county.faith = { has_doctrine = orthodox_autocephaly_pentarch }
			NOT = { root.faith = root.capital_county.faith }
		}
	}

	is_valid = {
		highest_held_title_tier > 1
	}

	is_valid_showing_failures_only = {
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}

	effect = {
		custom_tooltip = submit_to_pentarch_decision_effect_tooltip
		root = { set_character_faith = root.capital_county.faith }
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}

abandon_monothelite_maronite_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}

	desc = abandon_monothelite_maronite_decision_desc
	selection_tooltip = abandon_monothelite_maronite_decision_tooltip
	decision_group_type = major

	ai_check_interval = 120

	is_shown = {
		is_ruler = yes
		is_landed = yes
		root.faith = faith:maronite
		highest_held_title_tier > 2 #Dukes and above
		root.faith = { has_doctrine = doctrine_christology_monothelite }
	}

	is_valid = {
		liege.faith = { has_doctrine = catholic_autocephaly_autocephalous }
	}

	is_valid_showing_failures_only = {
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}

	effect = {
		custom_tooltip = abandon_monothelite_maronite_decision_effect_tooltip
		faith:maronite = {
			remove_doctrine = doctrine_christology_monothelite
			add_doctrine = doctrine_christology_diophysite
			add_doctrine = catholic_autocephaly_autocephalous
		}
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 10
	}
}