#######################################
#
# Schism Events
#
# Event ID ID LoR.200 - LoR.399 reserved
#
#######################################

namespace = LoR

### The Pentarchy

# Patriarchate of Antioch
character_event = {
	id = LoR.200
	desc = EVTDESCLoR.200
	picture = GFX_evt_bishop_byzantine
	border = GFX_event_normal_frame_religion

	only_independent = yes
	religion_group = christian
	has_dlc = "Legacy of Rome"

	trigger = {
		b_antioch = {
			has_holder = yes

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

		is_heretic = no
		NOT = { has_global_flag = schism_mended }

		primary_title = {
			NOT = { has_title_flag = pat_antioch }
		}
	}

	mean_time_to_happen = {
		days = 7
	}

	immediate = {
		primary_title = {
			set_title_flag = pat_antioch
		}
	}

	option = {
		name = EVTOPTALoR.200

		piety = 100
	}
}

# Patriarchate of Jerusalem
character_event = {
	id = LoR.201
	desc = EVTDESCLoR.201
	picture = GFX_evt_bishop_byzantine

	only_independent = yes
	religion_group = christian
	has_dlc = "Legacy of Rome"

	trigger = {
		b_jerusalem = {
			has_holder = yes

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

		is_heretic = no
		NOT = { has_global_flag = schism_mended }

		primary_title = {
			NOT = { has_title_flag = pat_jerusalem }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		primary_title = {
			set_title_flag = pat_jerusalem
		}
	}

	option = {
		name = EVTOPTALoR.200

		piety = 100
	}
}

# Patriarchate of Alexandria
character_event = {
	id = LoR.202
	desc = EVTDESCLoR.202
	picture = GFX_evt_bishop_byzantine

	only_independent = yes
	religion_group = christian
	has_dlc = "Legacy of Rome"

	trigger = {
		b_alexandria = {
			has_holder = yes

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

		is_heretic = no
		NOT = { has_global_flag = schism_mended }

		primary_title = {
			NOT = { has_title_flag = pat_alexandria }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		primary_title = {
			set_title_flag = pat_alexandria
		}
	}

	option = {
		name = EVTOPTALoR.200

		piety = 100
	}
}

# Patriarchate of Rome
character_event = {
	id = LoR.203
	desc = EVTDESCLoR.203
	picture = GFX_evt_bishop_byzantine

	only_independent = yes
	religion_group = christian
	has_dlc = "Legacy of Rome"

	trigger = {
		b_roma = {
			has_holder = yes

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

		is_heretic = no
		NOT = { has_global_flag = schism_mended }

		primary_title = {
			NOT = { has_title_flag = pat_rome }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		primary_title = {
			set_title_flag = pat_rome
		}
	}

	option = {
		name = EVTOPTALoR.200

		piety = 100
	}
}

### The Great Schism Mended

# Replaced by Plus events

# The Schism Mended
# narrative_event = {
# 	id = LoR.210
# 	title = EVTNAMELoR.210
# 	desc = EVTDESCLoR.210
# 	picture = GFX_evt_icon
#
# 	is_triggered_only = yes # mend_great_schism, realm_decisions.txt
#
# 	option = {
# 		name = EVTOPTALoR.200
#
# 		# Heresies of Catholicism follow suit
# 		set_parent_religion = {
# 			religion = catholic
# 			parent = religion_scope
# 		}
#
# 		set_global_flag = schism_mended
# 		give_nickname = nick_the_saint
#
# 		hidden_effect = {
# 			any_playable_ruler = {
# 				limit = {
# 					religion = catholic
# 					controls_religion = no
# 				}
#
# 				narrative_event = { id = LoR.211 }
# 			}
# 		}
# 	}
# }
#
# # Convert or Not?
# narrative_event = {
# 	id = LoR.211
# 	title = EVTNAMELoR.210
# 	desc = EVTDESCLoR.210
# 	picture = GFX_evt_icon
#
# 	is_triggered_only = yes
#
# 	option = { # Yes
# 		name = EVTOPTALoR.211
#
# 		ai_chance = { factor = 75 }
#
# 		# Workaround for automatic usurption of theocratic characters
# 		FROM = {
# 			religion_scope = {
# 				save_event_target_as = target_religion
# 			}
# 		}
#
# 		convert_religion_failsafe_effect = yes
#
# 		any_courtier = {
# 			limit = {
# 				religion = catholic
# 				vassal_of = ROOT
# 			}
#
# 			# Workaround for automatic usurption of theocratic characters
# 			FROM = {
# 				religion_scope = {
# 					save_event_target_as = target_religion
# 				}
# 			}
#
# 			convert_religion_failsafe_effect = yes
# 		}
#
# 		capital_scope = {
# 			show_scope_change = no
#
# 			religion = FROM
# 		}
# 	}
#
# 	option = { # No
# 		name = EVTOPTBLoR.211
#
# 		ai_chance = { factor = 25 }
# 	}
# }