regula_faith_swap = {
	global_var:magister_character = {
		if = {
			limit = {
				is_independent_ruler = no
			}
			every_held_title = {
				limit = { 
					tier = tier_county 
					faith.religion = religion:regula_religion
				}
				set_county_faith = global_var:magister_character.faith
			}
			every_liege_or_above = { # Yes, this will double-dip.
				if = {
					limit = {
						faith.religion = religion:regula_religion
					}
					set_character_faith = global_var:magister_character.faith
				}
				every_vassal_or_below = {
					every_courtier_or_guest = {
						limit = {
							faith.religion = religion:regula_religion
						}
						set_character_faith = global_var:magister_character.faith
					}
					if = {
						limit = {
							faith.religion = religion:regula_religion
						}
						set_character_faith = global_var:magister_character.faith
					}
					every_held_title = {
						limit = { 
							tier = tier_county 
							faith.religion = religion:regula_religion
						}
						set_county_faith = global_var:magister_character.faith
					}
				}
				every_courtier_or_guest = {
					limit = {
						faith.religion = religion:regula_religion
					}
					set_character_faith = global_var:magister_character.faith
				}
				if = {
					limit = {
						faith.religion = religion:regula_religion
					}
					set_character_faith = global_var:magister_character.faith
				}
				every_held_title = {
					limit = { 
						tier = tier_county 
						faith.religion = religion:regula_religion
					}
					set_county_faith = global_var:magister_character.faith
				}
			}
		}
		else = {
			every_held_title = {
				limit = { 
					tier = tier_county 
					faith.religion = religion:regula_religion
				}
				set_county_faith = global_var:magister_character.faith
			}
			every_vassal_or_below = {
				if = {
					limit = {
						faith.religion = religion:regula_religion
					}
					set_character_faith = global_var:magister_character.faith
				}
				every_courtier_or_guest = {
					limit = {
						faith.religion = religion:regula_religion
					}
					set_character_faith = global_var:magister_character.faith
				}
				every_held_title = {
					limit = { 
						tier = tier_county 
						faith.religion = religion:regula_religion
					}
					set_county_faith = global_var:magister_character.faith
				}
			}
			every_courtier_or_guest = {
				limit = {
					faith.religion = religion:regula_religion
				}
				set_character_faith = global_var:magister_character.faith
			}
		}
	}
}

regula_holy_site_deactivation = {
	deactivate_holy_site = reg_jerusalem
	deactivate_holy_site = reg_brescia
	deactivate_holy_site = reg_alexandria
	deactivate_holy_site = reg_carthage
	deactivate_holy_site = reg_lesbos
	deactivate_holy_site = reg_rome
	deactivate_holy_site = reg_toulouse
	deactivate_holy_site = reg_krakow
	deactivate_holy_site = reg_gotland
	deactivate_holy_site = reg_zeeland
	deactivate_holy_site = reg_baghdad
	deactivate_holy_site = reg_veria
	deactivate_holy_site = reg_tyre
	deactivate_holy_site = reg_yazd
	deactivate_holy_site = reg_lahur
	deactivate_holy_site = reg_djenne
	deactivate_holy_site = reg_wenyon
	deactivate_holy_site = reg_daura
	deactivate_holy_site = reg_jara
	deactivate_holy_site = reg_oyo

}