namespace = religion

character_event = {
	id = religion.1
	hide_window = yes
	is_triggered_only = yes
	trigger = {
		is_alive = yes
		any_character = {
			has_landed_title = e_holy_see
		}
		NOT = {
			religion = catholic
		}
	}
	immediate = {
		any_character = {
			if = {
				limit = {
					NOT = {
						religion = catholic
					}
				}
				religion = catholic
				any_province = {
					religion = catholic
				}
				any_demesne_province = {
					religion = catholic
				}
				any_realm_character = {
					religion = catholic
				}
				any_realm_province = {
					religion = catholic
				}
			}
		}
		k_egypt = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = k_egypt
		k_orthodox = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = k_orthodox
		d_monothelite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_monothelite
		d_monophysite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_monophysite
		d_miaphysite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_miaphysite
		d_paulician = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_paulician
		d_manichean = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_manichean
		d_nestorian = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_nestorian
		d_shiite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite
		d_sunni = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni
		d_scholae_palatinae = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_scholae_palatinae
		d_iconoclast = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_iconoclast
		d_fraticelli = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_fraticelli
		d_jewish = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_jewish
		d_zoroastrian = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_zoroastrian
		########################################################
		d_outlaws_of_the_marsh = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_outlaws_of_the_marsh
		d_sunni_turkic_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_turkic_company
		d_sunni_cuman_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_cuman_company
		d_sunni_berber_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_berber_company
		d_sunni_bedouin_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_bedouin_company
		d_shiite_cuman_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_cuman_company
		d_shiite_berber_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_berber_company
		d_shiite_bedouin_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_bedouin_company
		d_maghreb_corsairs = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_maghreb_corsairs
		d_cuman_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_cuman_company
		d_rus_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rus_company
		d_finnish_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_finnish_band
		d_marathi_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_marathi_band
		d_mamluks = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_mamluks
		d_african_mid_low_2 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mid_low_2
		d_pecheneg_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_pecheneg_company
		d_bulgarian_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bulgarian_company
		d_treasure_fleet = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_treasure_fleet
		d_rus_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rus_band
		d_bengal_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bengal_company
		d_rajput_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rajput_band
		d_african_mid = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mid
		d_african_large = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_large
		d_shiite_turkic_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_turkic_company
		d_persian_caravan_guards = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_persian_caravan_guards
		d_ghilman = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_ghilman
		d_silk_road_sentinels = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_silk_road_sentinels
		d_tangut_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_tangut_low
		d_bodpa_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bodpa_low
		d_turkic_guard = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_turkic_guard
		d_nubian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_nubian_band
		d_abyssinian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_abyssinian_band
		d_lithuanian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_lithuanian_band
		d_lappish_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_lappish_band
		d_african_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_low
		d_african_massive = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_massive
		d_ghanan_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_ghanan_band
		d_african_tiny = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_tiny
		d_african_mod_low_1 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mod_low_1
		d_alan_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_alan_band
		d_pecheneg_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_pecheneg_band
		b_cuman_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = b_cuman_band
		d_bulgarian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bulgarian_band
		d_turkic_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_turkic_company
		d_turkic_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_turkic_band
		d_african_mid_low_1 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mid_low_1
		d_bektashi = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bektashi
		d_cuman_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_cuman_band
		d_varangian_guard = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_varangian_guard
		d_rajput_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rajput_company
		d_tamil_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_tamil_band
		d_bengal_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bengal_band
		d_marathi_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_marathi_company
		d_jurchen_corsairs = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_jurchen_corsairs
		d_han_massive = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_massive
		d_han_mid = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_mid
		d_han_tiny_1 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_tiny_1
		d_han_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_low
		d_han_large = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_large
		d_han_junks = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_junks
		d_han_tiny_2 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_tiny_2
		d_jurchen_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_jurchen_band
		d_han_mid_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_mid_low
	}
}

character_event = {
	id = religion.2
	hide_window = yes
	only_rulers = yes
	mean_time_to_happen = { 
		days = 1
	}
	trigger = {
		is_alive = yes
		any_character = {
			has_landed_title = e_holy_see
		}
		NOT = {
			religion = catholic
		}
	}
	immediate = {
		any_character = {
			if = {
				limit = {
					NOT = {
						religion = catholic
					}
				}
				religion = catholic
				any_province = {
					religion = catholic
				}
				any_demesne_province = {
					religion = catholic
				}
				any_realm_character = {
					religion = catholic
				}
				any_realm_province = {
					religion = catholic
				}
			}
		}
		k_egypt = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = k_egypt
		k_orthodox = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = k_orthodox
		d_monothelite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_monothelite
		d_monophysite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_monophysite
		d_miaphysite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_miaphysite
		d_paulician = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_paulician
		d_manichean = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_manichean
		d_nestorian = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_nestorian
		d_shiite = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite
		d_sunni = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni
		d_scholae_palatinae = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_scholae_palatinae
		d_iconoclast = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_iconoclast
		d_fraticelli = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_fraticelli
		d_jewish = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_jewish
		d_zoroastrian = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_zoroastrian
		########################################################
		d_outlaws_of_the_marsh = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_outlaws_of_the_marsh
		d_sunni_turkic_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_turkic_company
		d_sunni_cuman_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_cuman_company
		d_sunni_berber_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_berber_company
		d_sunni_bedouin_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_sunni_bedouin_company
		d_shiite_cuman_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_cuman_company
		d_shiite_berber_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_berber_company
		d_shiite_bedouin_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_bedouin_company
		d_maghreb_corsairs = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_maghreb_corsairs
		d_cuman_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_cuman_company
		d_rus_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rus_company
		d_finnish_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_finnish_band
		d_marathi_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_marathi_band
		d_mamluks = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_mamluks
		d_african_mid_low_2 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mid_low_2
		d_pecheneg_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_pecheneg_company
		d_bulgarian_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bulgarian_company
		d_treasure_fleet = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_treasure_fleet
		d_rus_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rus_band
		d_bengal_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bengal_company
		d_rajput_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rajput_band
		d_african_mid = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mid
		d_african_large = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_large
		d_shiite_turkic_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_shiite_turkic_company
		d_persian_caravan_guards = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_persian_caravan_guards
		d_ghilman = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_ghilman
		d_silk_road_sentinels = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_silk_road_sentinels
		d_tangut_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_tangut_low
		d_bodpa_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bodpa_low
		d_turkic_guard = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_turkic_guard
		d_nubian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_nubian_band
		d_abyssinian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_abyssinian_band
		d_lithuanian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_lithuanian_band
		d_lappish_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_lappish_band
		d_african_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_low
		d_african_massive = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_massive
		d_ghanan_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_ghanan_band
		d_african_tiny = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_tiny
		d_african_mod_low_1 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mod_low_1
		d_alan_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_alan_band
		d_pecheneg_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_pecheneg_band
		b_cuman_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = b_cuman_band
		d_bulgarian_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bulgarian_band
		d_turkic_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_turkic_company
		d_turkic_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_turkic_band
		d_african_mid_low_1 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_african_mid_low_1
		d_bektashi = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bektashi
		d_cuman_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_cuman_band
		d_varangian_guard = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_varangian_guard
		d_rajput_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_rajput_company
		d_tamil_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_tamil_band
		d_bengal_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_bengal_band
		d_marathi_company = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_marathi_company
		d_jurchen_corsairs = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_jurchen_corsairs
		d_han_massive = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_massive
		d_han_mid = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_mid
		d_han_tiny_1 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_tiny_1
		d_han_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_low
		d_han_large = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_large
		d_han_junks = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_junks
		d_han_tiny_2 = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_tiny_2
		d_jurchen_band = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_jurchen_band
		d_han_mid_low = {
			destroy_landed_title = THIS
		}
		unsafe_destroy_landed_title = d_han_mid_low
	}
}