﻿##############################################
#
# RELIGION TEST
#
##############################################
	

##############################################
#
# CHRISTIANITY FIXES 
#
##############################################
ce_christianity_fixes_setup_effect = {	

	############################################################
	#
	# RELIGION DOCTRINE/TENET CHANGES
	#
	############################################################		
	
	every_living_character = { 
		limit = { 
			OR = {
				is_clergy = yes
                learning >= 20
            }
			OR = {
				has_faith = faith:catholic 
				has_faith = faith:bosnian_church
				has_faith = faith:insular_celtic
				has_faith = faith:mozarabic_church
			}
			NOT = { 
				knows_language = language_latin 
			}
		} 
		learn_language = language_latin 
	}

	faith:catholic = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:orthodox = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:coptic = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:armenian_apostolic = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
		if = {
			limit = { has_doctrine = tenet_aniconism }
			remove_doctrine = tenet_aniconism
			add_doctrine = tenet_monasticism
		}
	}

	faith:conversos = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:conversos = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:waldensian = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:lollard = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:cathar = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:iconoclast = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:bogomilist = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:paulician = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:nestorian = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:insular_celtic = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:bosnian_church = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:mozarabic_church = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}

	faith:adoptionist = {
		if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece
			add_doctrine = doctrine_consanguinity_restricted
		}
	}
}