union_of_churches = {
	potential = {
		#always = no #Not done yet
		is_free_or_tributary_trigger = yes
		NOT = { has_country_flag = had_byz_church_crisis }
		tag = BYZ
		normal_or_historical_nations = yes
		uses_doom = no #Why is this trigger here? Oh well
        num_of_cities = 25
		#Require 1 province in 4 different areas for the purposes of rebel spawning.
		thrace_area = { owned_by = ROOT } #Orthodox
		morea_area = { owned_by = ROOT } #Orthodox
		macedonia_area = { owned_by = ROOT } #Catholic
		eastern_macedonia_area = { owned_by = ROOT } #Catholic
		is_lesser_in_union = no
		government = monarchy #Apparently Republic Byzantium is a thing...
		has_country_modifier = byz_bad_religion #Needs to have the Council of Florence modifier.
		current_age = age_of_discovery
	}
	
	can_start = {
		has_any_disaster = no
		religion = orthodox
        is_at_war = no
	}
	
	can_stop = {
		OR = {
			has_any_disaster = yes
			NOT = { religion = orthodox }
		}
	}
	
	progress = {
		modifier = {
			factor = 1
			religion = orthodox
		}
		modifier = {
			factor = 1
			ruler_religion = catholic
		}
		modifier = {
			factor = 1
			heir_religion = catholic     
		}	
		modifier = {
			factor = 1
			NOT = {
				estate_loyalty = {
					estate = estate_church
					loyalty = 30
				}
			}
		}
	}
	
	can_end = {
		stability = 1
		NOT = { num_of_rebel_armies = 1	}
		NOT = { num_of_rebel_controlled_provinces = 1 }
		OR = {
			AND = {
				religion = orthodox
				NOT = {
					any_owned_province = {
						religion = catholic
					}
				}
			}
			AND = {
				religion = catholic
				NOT = {
					any_owned_province = {
						religion = orthodox
					}
				}
			}
		}
	}
	
	modifier = {
		can_not_build_missionaries = yes
		stability_cost_modifier = 0.5
		tolerance_own = -3
	}

	on_start = union_of_churches.1
	on_end = union_of_churches.100
	
	on_monthly = {
		events = {
		}
		random_events = { 
			1000 = 0
			100 = union_of_churches.2
			100 = union_of_churches.3
			100 = union_of_churches.4
			100 = union_of_churches.5
			100 = union_of_churches.6
		}
	}
}