decisions = {

	# New Schism Decisions

	enforce_ephesus = {
		is_high_prio = yes
		ai_check_interval = 12

		only_playable = yes

		potential = {
			OR = {
				controls_religion = yes

				AND = {
					real_tier = EMPEROR
					religion_head = { always = yes }
				}
			}

			trigger_if = {
				limit = {
					OR = {
						is_miaphysite_branch = yes
						is_apostolic_branch = yes
					}
				}
				has_global_flag = chalcedon_repudiated
			}
			trigger_else = {
				OR = {
					is_catholic_branch = yes
					is_orthodox_branch = yes
				}

				trigger_if = {
					limit = { has_global_flag = great_schism_happened }
					has_global_flag = great_schism_mended
				}
			}

			has_dlc = "Legacy of Rome"
			is_nomadic = no
			is_tribal = no
			is_heretic = no

			# There must be a non-heretic religion head with whom to negotiate
			OR = {
				d_nestorian = { holder_scope = { is_heretic = no } }
				d_messalian = { holder_scope = { is_heretic = no } }
			}

			NOR = {
				has_global_flag = ephesus_enforced
				has_global_flag = enforcing_ephesus
				has_global_flag = ephesus_repudiated
				has_character_flag = great_schism_mender
			}
		}

		allow = {
			piety >= 1000
			religion_authority = 0.9

			OR = {
				controls_religion = yes
				religion_head = { is_vassal_or_below_of = ROOT }
				completely_controls = c_constantinopolis
				completely_controls = c_jerusalem
				completely_controls = c_roma
			}

			b_hagiasophia = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_antioch = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_alexandria = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_bagdad = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_roudehen = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			war = no
			is_not_in_regency_trigger = yes
			is_inaccessible_trigger = no
		}

		effect = {
			set_global_flag = enforcing_ephesus

			long_character_event = {
				id = PlusGreatSchism.061
				tooltip = NESTORIAN_SCHISM_ENDED
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				NOR = {
					trait = cynical
					trait = bad_priest_christian
				}
			}
		}
	}

	enforce_chalcedon = {
		is_high_prio = yes
		ai_check_interval = 12

		only_playable = yes

		potential = {
			OR = {
				controls_religion = yes

				AND = {
					real_tier = EMPEROR
					religion_head = { always = yes }
				}
			}

			trigger_if = {
				limit = { is_nestorian_branch = yes }
				has_global_flag = ephesus_repudiated
			}
			trigger_else = {
				OR = {
					is_catholic_branch = yes
					is_orthodox_branch = yes
				}

				trigger_if = {
					limit = { has_global_flag = great_schism_happened }
					has_global_flag = great_schism_mended
				}
			}

			has_dlc = "Legacy of Rome"
			is_nomadic = no
			is_tribal = no
			is_heretic = no

			# There must be a non-heretic religion head with whom to negotiate
			OR = {
				d_miaphysite = { holder_scope = { is_heretic = no } }
				d_monophysite = { holder_scope = { is_heretic = no } }
			}
			OR = {
				d_apostolic = { holder_scope = { is_heretic = no } }
				d_paulician = { holder_scope = { is_heretic = no } }
			}

			NOR = {
				has_global_flag = chalcedon_enforced
				has_global_flag = enforcing_chalcedon
				has_global_flag = chalcedon_repudiated
				has_character_flag = great_schism_mender
			}
		}

		allow = {
			piety >= 1000
			religion_authority = 0.9

			OR = {
				controls_religion = yes
				religion_head = { is_vassal_or_below_of = ROOT }
				completely_controls = c_constantinopolis
				completely_controls = c_jerusalem
				completely_controls = c_roma
			}

			b_hagiasophia = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_antioch = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_alexandria = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_etchmiadzin = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_aksum = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					has_holder = yes

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			war = no
			is_not_in_regency_trigger = yes
			is_inaccessible_trigger = no
		}

		effect = {
			set_global_flag = enforcing_chalcedon

			long_character_event = {
				id = PlusGreatSchism.061
				tooltip = MIAPHYSITE_SCHISM_ENDED
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				NOR = {
					trait = cynical
					trait = bad_priest_christian
				}
			}
		}
	}

	nestorian_repudiate_ephesus = {
		is_high_prio = yes
		ai_check_interval = 12

		only_playable = yes

		potential = {
			OR = {
				controls_religion = yes

				AND = {
					real_tier = EMPEROR
					religion_head = { always = yes }
				}
			}

			is_nestorian_branch = yes
			has_global_flag = great_schism_happened
			is_heretic = no
			has_dlc = "Legacy of Rome"
			is_nomadic = no
			is_tribal = no

			# There must be a non-heretic religion head with whom to negotiate
			OR = {
				k_orthodox = { holder_scope = { is_heretic = no } }
				d_monothelite = { holder_scope = { is_heretic = no } }
				d_iconoclast = { holder_scope = { is_heretic = no } }
				d_bogomilist = { holder_scope = { is_heretic = no } }
			}

			NOR = {
				has_global_flag = ephesus_repudiated
				has_global_flag = repudiating_ephesus
				has_global_flag = chalcedon_repudiated
				has_global_flag = ephesus_enforced
				has_global_flag = great_schism_mended
				has_character_flag = great_schism_mender
			}
		}
		allow = {
			piety >= 2000
			religion_authority = 0.8

			OR = {
				controls_religion = yes
				religion_head = { is_vassal_or_below_of = ROOT }
				completely_controls = c_constantinopolis
				completely_controls = c_jerusalem
			}

			b_hagiasophia = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_antioch = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_jerusalem = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_alexandria = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			war = no
			is_not_in_regency_trigger = yes
			is_inaccessible_trigger = no
		}

		effect = {
			set_global_flag = repudiating_ephesus

			long_character_event = {
				id = PlusGreatSchism.061
				tooltip = ORTHODOX_SCHISM_ENDED
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				NOR = {
					trait = cynical
					trait = bad_priest_christian
				}
			}
		}
	}

	miaphysite_repudiate_chalcedon = {
		is_high_prio = yes
		ai_check_interval = 12

		only_playable = yes

		potential = {
			OR = {
				controls_religion = yes

				AND = {
					real_tier = EMPEROR
					religion_head = { always = yes }
				}
			}

			OR = {
				is_miaphysite_branch = yes
				is_apostolic_branch = yes
			}

			has_global_flag = great_schism_happened
			is_heretic = no
			has_dlc = "Legacy of Rome"
			is_nomadic = no
			is_tribal = no

			# There must be a non-heretic religion head with whom to negotiate
			OR = {
				k_orthodox = { holder_scope = { is_heretic = no } }
				d_monothelite = { holder_scope = { is_heretic = no } }
				d_iconoclast = { holder_scope = { is_heretic = no } }
				d_bogomilist = { holder_scope = { is_heretic = no } }
			}

			NOR = {
				has_global_flag = chalcedon_repudiated
				has_global_flag = repudiating_chalcedon
				has_global_flag = ephesus_repudiated
				has_global_flag = chalcedon_enforced
				has_global_flag = great_schism_mended
				has_character_flag = great_schism_mender
			}
		}

		allow = {
			piety >= 2000
			religion_authority = 0.8

			OR = {
				controls_religion = yes
				religion_head = { is_vassal_or_below_of = ROOT }
				completely_controls = c_constantinopolis
				completely_controls = c_jerusalem
			}

			b_hagiasophia = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_antioch = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_jerusalem = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_alexandria = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			war = no
			is_not_in_regency_trigger = yes
			is_inaccessible_trigger = no
		}

		effect = {
			set_global_flag = repudiating_chalcedon

			long_character_event = {
				id = PlusGreatSchism.061
				tooltip = ORTHODOX_SCHISM_ENDED
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				NOR = {
					trait = cynical
					trait = bad_priest_christian
				}
			}
		}
	}

	unite_christianity = {
		is_high_prio = yes
		ai_check_interval = 12

		only_playable = yes

		potential = {
			OR = {
				controls_religion = yes

				AND = {
					real_tier = EMPEROR
					religion_head = { always = yes }
				}
			}

			trigger_if = {
				limit = {
					OR = {
						is_miaphysite_branch = yes
						is_apostolic_branch = yes
					}
				}

				has_global_flag = chalcedon_repudiated
				has_global_flag = ephesus_enforced
			}
			trigger_else = {
				is_nestorian_branch = yes
				has_global_flag = ephesus_repudiated
				has_global_flag = chalcedon_enforced
			}

			has_dlc = "Legacy of Rome"
			is_nomadic = no
			is_tribal = no
			is_heretic = no

			# There must be a non-heretic religion head with whom to negotiate
			OR = {
				k_papacy = { holder_scope = { is_heretic = no } }
				d_fraticelli = { holder_scope = { is_heretic = no } }
				d_cathar = { holder_scope = { is_heretic = no } }
			}

			NOR = {
				has_global_flag = christianity_united
				has_global_flag = uniting_christianity
				has_character_flag = great_schism_mender
			}
		}

		allow = {
			piety >= 2000
			religion_authority = 0.9

			OR = {
				controls_religion = yes
				religion_head = { is_vassal_or_below_of = ROOT }
				completely_controls = c_constantinopolis
				completely_controls = c_jerusalem
				completely_controls = c_roma
			}

			b_hagiasophia = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_antioch = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_jerusalem = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_alexandria = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			b_roma = {
				show_scope_change = no

				custom_tooltip = {
					text = CONTROL_RELIGION_NO_WAR

					holder_scope = {
						religion = ROOT
						war = no
					}
				}
			}

			war = no
			is_not_in_regency_trigger = yes
			is_inaccessible_trigger = no
		}

		effect = {
			set_global_flag = uniting_christianity

			long_character_event = {
				id = PlusGreatSchism.061
				tooltip = CATHOLIC_SCHISM_ENDED
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				NOR = {
					trait = cynical
					trait = bad_priest_christian
				}
			}
		}
	}

	# Chalcedonian Decisions

	chalcedonian_patriarch_rome = {
		is_high_prio = yes
		ai_check_interval = 3
		icon_religion = catholic

		only_playable = yes

		potential = {
			religion = chalcedonian
			trait = latin_rites

			OR = {
				higher_real_tier_than = DUKE
				has_landed_title = k_papacy
			}

			k_papacy = {
				holder_scope = {
					religion = ROOT
					trait = latin_rites
				}
			}

			NOR = {
				culture = greek
				has_landed_title = e_byzantium
				has_global_flag = great_schism_happened
				has_global_flag = patriarch_supreme_created
			}
		}

		allow = {
			independent = yes
			piety >= 2500

			trigger_if = {
				limit = { NOT = { has_landed_title = k_papacy } }

				real_tier = EMPEROR
				prestige >= 2500
			}

			NOR = {
				trait = bad_priest_christian
				trait = excommunicated
			}

			OR = {
				custom_tooltip = {
					text = ROME_IS_YOUR_VASSAL

					k_papacy = {
						holder_scope = {
							vassal_of = ROOT
						}
					}
				}

				custom_tooltip = {
					text = RELIGION_HEAD_IS_LATIN
					rightful_religious_head_scope = { trait = latin_rites }
				}
			}

			OR = {
				custom_tooltip = {
					text = CONSTANTINOPLE_DOES_NOT_EXIST

					b_hagiasophia = {
						holder_scope = {
							trigger_if = {
								limit = { religion_group = christian }
								is_theocracy = no
							}
						}
					}
				}

				custom_tooltip = {
					text = ECUMENICAL_PATRIARCH_IS_LATIN

					b_hagiasophia = {
						holder_scope = { trait = latin_rites }
					}
				}

				custom_tooltip = {
					text = TWO_OTHER_LATIN_PATRIARCHS

					calc_true_if = {
						amount >= 2

						b_jerusalem = { holder_scope = { trait = latin_rites } }
						b_antioch = { holder_scope = { trait = latin_rites } }
						b_alexandria = { holder_scope = { trait = latin_rites } }
					}
				}
			}

			war = no
			is_not_in_regency_trigger = yes
			is_inaccessible_trigger = no
		}

		effect = {
			set_global_flag = patriarch_supreme_is_latin
			add_trait = paragon
			prestige = 1000

			custom_tooltip = {
				text = ROME_BECOMES_PATRIARCH_SUPREME

				k_papacy = {
					holder_scope = {
						if = {
							limit = { NOT = { character = ROOT } }

							add_friend = ROOT
							piety = 250
							prestige = 250
						}

						character_event = { id = PlusGreatSchism.002 }
					}
				}
			}
		}

		ai_will_do = { factor = 1 }
	}

	chalcedonian_patriarch_constantinople = {
		is_high_prio = yes
		ai_check_interval = 3
		icon_religion = orthodox

		only_playable = yes

		potential = {
			religion = chalcedonian
			trait = greek_rites

			OR = {
				higher_tier_than = DUKE
				AND = {
					has_landed_title = b_hagiasophia
					is_theocracy = yes
				}
			}

			b_hagiasophia = {
				holder_scope = {
					religion = ROOT
					trait = greek_rites
				}
			}

			NOR = {
				culture_group = italian_group
				culture = longobard
				trait = crowned_by_pope
				has_global_flag = great_schism_happened
				has_global_flag = great_schism_prevented
			}
		}

		allow = {
			independent = yes
			piety >= 2500

			trigger_if = {
				limit = { is_theocracy = yes }

				has_landed_title = b_hagiasophia
				NOT = { trait = bad_priest_christian }
			}
			trigger_else = {
				real_tier = EMPEROR
				prestige >= 2500
				NOT = { trait = excommunicated }
			}

			OR = {
				custom_tooltip = {
					text = CONSTANTINOPLE_IS_YOUR_VASSAL

					b_hagiasophia = {
						holder_scope = {
							vassal_of = ROOT
							is_theocracy = yes
						}
					}
				}

				custom_tooltip = {
					text = RELIGION_HEAD_IS_GREEK
					rightful_religious_head_scope = { trait = greek_rites }
				}
			}

			OR = {
				custom_tooltip = {
					text = ROME_DOES_NOT_EXIST

					b_roma = {
						holder_scope = {
							NOT = { has_landed_title = k_papacy }

							trigger_if = {
								limit = { religion_group = christian }
								is_theocracy = no
							}
						}
					}
				}

				custom_tooltip = {
					text = PAPACY_IS_GREEK

					k_papacy = {
						holder_scope = { trait = greek_rites }
					}
				}

				custom_tooltip = {
					text = TWO_OTHER_GREEK_PATRIARCHS

					calc_true_if = {
						amount >= 2

						b_jerusalem = { holder_scope = { trait = greek_rites } }
						b_antioch = { holder_scope = { trait = greek_rites } }
						b_alexandria = { holder_scope = { trait = greek_rites } }
					}
				}
			}

			war = no
			is_not_in_regency_trigger = yes
			is_inaccessible_trigger = no
		}

		effect = {
			set_global_flag = patriarch_supreme_is_greek
			add_trait = paragon
			prestige = 1000

			custom_tooltip = {
				text = CONSTANTINOPLE_BECOMES_PATRIARCH_SUPREME

				b_hagiasophia = {
					holder_scope = {
						if = {
							limit = { NOT = { character = ROOT } }

							add_friend = ROOT
							piety = 250
							prestige = 250
						}

						character_event = { id = PlusGreatSchism.002 }
					}
				}
			}
		}

		ai_will_do = { factor = 1 }
	}
}