country_decisions = {

	# Catholic ones, that affects reform desire.
	institute_the_societas_jesu = {
		potential = {
			OR = {
				tag = POR
				tag = SPA
			}
			religion = catholic
			NOT = { has_country_modifier = the_societas_jesu }
			NOT = { has_country_modifier = jesuits_expelled }
		}
		allow = {
			adm_tech = 15
		}
		effect = {	
			add_country_modifier = {
				name = "the_societas_jesu"
				duration = -1
			}
			add_reform_desire = -0.02
		}
		ai_will_do = {
			factor = 1
		}	
	}
	
	de_heretico_comburendo_act = {
		potential = {
			NOT = { has_country_modifier = de_heretico_comburendo }
			religion = catholic
			reform_desire = 0.10
		}
		allow = {
			adm_tech = 6
		}
		effect = {	
			add_country_modifier = {
				name = "de_heretico_comburendo"
				duration = -1
			}
			add_reform_desire = 0.001
		}
		ai_will_do = {
			factor = 1
		}
	}

	# Commons for all christians.
	advancement_of_true_religion_act = {
		potential = {
			NOT = { has_country_modifier = the_advancement_of_true_religion_act }
			religion_group = christian
		}
		allow = {
			advisor = theologian
		}
		effect = {	
			add_country_modifier = {
				name = "the_advancement_of_true_religion_act"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	blasphemy_act = {
		potential = {
			NOT = { has_country_modifier = the_blasphemy_act }
			religion_group = christian
			is_year = 1570
		}
		allow = {
			adm = 3
		}
		effect = {	
			add_country_modifier = {
				name = "the_blasphemy_act"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}

	declaration_of_indulgence = {
		potential = {
			NOT = { has_country_modifier = the_declaration_of_indulgence }
			NOT = { has_country_modifier = the_test_act }
			religion_group = christian
		}
		allow = {
			adm_tech = 15
		}
		effect = {	
			add_country_modifier = {
				name = "the_declaration_of_indulgence"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				NOT = { stability = 2 }
				factor = 0
			}
			modifier = { 
				NOT = { any_owned_province = { has_owner_religion = no religion_group = christian } }
				factor = 0
			}
		}
	}

	act_of_uniformity = {
		potential = {
			NOT = { has_country_modifier = the_act_of_uniformity }
			religion_group = christian
		}
		allow = {
			adm_tech = 8
		}
		effect = {	
			add_country_modifier = {
				name = "the_act_of_uniformity"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
#	suffragan_bishop_act = {
#		potential = {
#			NOT = { has_country_modifier = the_suffragan_bishop_act }
#			religion_group = christian
#		}
#		allow = {
#			adm_tech = 8
#		}
#		effect = {	
#			add_country_modifier = {
#				name = "the_suffragan_bishop_act"
#				duration = -1
#			}
#		}
#		ai_will_do = {
#			factor = 0
#		}
#	}
	
#	church_tax = {
#		potential = {
#			NOT = { has_country_modifier = church_taxes }
#			religion_group = christian
#			NOT = { tag = PAP }
#			NOT = { government = republic }
#		}
#		allow = {
#			# Raises the king to be the legal authority in all religious matters
#			OR = {
#				NOT = { religion = catholic }
#				has_country_modifier = the_statue_in_restraint_of_appeals
#			}
#			advisor = theologian
#		}
#		effect = {	
#			add_country_modifier = {
#				name = "church_taxes"
#				duration = -1
#			}
#		}
#		ai_will_do = {
#			factor = 0
#			modifier = { 
#				NOT = { revolt_percentage = 0 }
#				factor = 0 
#			}
#		}
#	}
	
	sunday_school = {
		potential = {
			NOT = { has_country_modifier = sunday_schools }
			religion_group = christian
			adm_tech = 17
		}
		allow = {
			adm = 2
			stability = 2
		}
		effect = {	
			add_country_modifier = {
				name = "sunday_schools"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}

	# Protestant & Reformed
	conventicle_act = {
		potential = {
			NOT = { has_country_modifier = the_conventicle_act }
			religion_group = christian
			OR = {
				is_religion_enabled = hussite
				is_religion_enabled = protestant
				is_religion_enabled = reformed
			}
		}
		allow = {
			adm_tech = 15
		}
		effect = {	
			add_country_modifier = {
				name = "the_conventicle_act"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}

#	superintendents = {
#		potential = {
#			NOT = { has_country_modifier = superintendent_office }
#			OR = {
#				religion = protestant
#				religion = reformed
#			}
#		}
#		allow = {
#			advisor = theologian
#		}
#		effect = {	
#			add_country_modifier = {
#				name = "superintendent_office"
#				duration = -1
#			}
#		}
#		ai_will_do = {
#			factor = 1
#			modifier = { 
#				NOT = { stability = 2 }
#				factor = 0
#			}
#		}
#	}
	
	test_act = {
		potential = {
			NOT = { has_country_modifier = the_declaration_of_indulgence }
			NOT = { has_country_modifier = the_test_act }
			OR = {
				religion = hussite
				religion = protestant
				religion = reformed
			}
		}
		allow = {
			adm_tech = 15
		}
		effect = {	
			add_country_modifier = {
				name = "the_test_act"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	dissolution_of_the_monasteries = {
		potential = {
			NOT = { has_country_modifier = the_dissolution_of_the_monasteries }
			OR = {
				religion = protestant
				religion = reformed
				AND = {
					religion = catholic
					has_country_modifier = the_statue_in_restraint_of_appeals
				}
			}
		}
		allow = {
			# Raises the king to be the legal authority in all religious matters
			adm = 4
		}
		effect = {	
			add_country_modifier = {
				name = "the_dissolution_of_the_monasteries"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				NOT = { stability = 0 }
				factor = 0
			}
		}
	}
	
	popery_act = {
		potential = {
			NOT = { has_country_modifier = the_popery_act }
			OR = {
				religion = hussite
				religion = protestant
				religion = reformed
			}
			adm_tech = 11
		}
		allow = {
			mil = 3
			#NOT = { has_opinion = { who = PAP value = 0 } }
		}
		effect = {	
			add_country_modifier = {
				name = "the_popery_act"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	# Muslim modifiers
	sheikh_ul_islam = {
		potential = {
			NOT = { has_ruler_modifier = the_sheikh_ul_islam }
			religion_group = muslim
		}
		allow = {
			adm = 3
			has_regency = no
		}
		effect = {	
			add_ruler_modifier = {
				name = "the_sheikh_ul_islam"
				duration = -1
			}
			add_piety = 0.10
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				NOT = { piety = -0.1 }
				factor = 0
			}			
		}
	}
	
	the_khalifah = {
		potential = {
			NOT = { has_ruler_modifier = khalifah }
			religion = sunni
		}
		allow = {
			mil = 3
			has_regency = no
		}
		effect = {	
			add_ruler_modifier = {
				name = "khalifah"
				duration = -1
			}
			add_piety = 0.10
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				NOT = { piety = -0.1 }
				factor = 0
			}
		}
	}
	
	denouncement_of_sect_practices = {
		potential = {
			NOT = { has_ruler_modifier = sect_practices }
			religion_group = muslim
		}
		allow = {
			dip = 3
			has_regency = no
		}
		effect = {	
			add_ruler_modifier = {
				name = "sect_practices"
				duration = -1
			}
			add_piety = 0.10
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				NOT = { piety = -0.1 }
				factor = 0
			}			
		}
	}
	
	islamic_centre_of_scholarly = {
		potential = {
			NOT = { has_ruler_modifier = islamic_scholarly_centre }
			religion_group = muslim
			adm_tech = 8
		}
		allow = {
			dip = 5
			has_regency = no
		}
		effect = {	
			add_ruler_modifier = {
				name = "islamic_scholarly_centre"
				duration = -1
			}
			add_piety = 0.25
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				NOT = { piety = -0.1 }
				factor = 0
			}			
		}
	}
	
	jizya_tax = {
		potential = {
			NOT = { has_ruler_modifier = per_capita_tax }
			religion_group = muslim
			any_owned_province = {
				has_owner_religion = no
			}
			NOT = { has_dlc = "The Cossacks" }
		}
		allow = {
			adm = 3
			has_regency = no
		}
		effect = {	
			add_ruler_modifier = {
				name = "per_capita_tax"
				duration = -1
			}
			add_piety = -0.15
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = { piety = 0.01 }
				factor = 0
			}
		}
	}
	
	monastic_education = {
		potential = {
			NOT = { has_country_modifier = monastic_education_system }
			OR = {
				religion = buddhism #Theravada
				religion = vajrayana
				religion = mahayana
			}
		}
		allow = {
			adm = 3
		}
		effect = {	
			add_country_modifier = {
				name = "monastic_education_system"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = { treasury = 100 }
				factor = 0
			}
		}
	}
	
	regulate_the_monastaries = {
		potential = {
			NOT = { has_country_modifier = regulated_monasteries }
			adm_tech = 15
			religion = vajrayana
		}
		allow = {
			adm = 3
		}
		effect = {	
			add_country_modifier = {
				name = "regulated_monasteries"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	adopt_vajrayana = {
		potential = {
			religion_group = pagan
			any_owned_province = {
				religion = vajrayana
			}
			is_subject = no
		}
		allow = {
			stability = 1
			is_at_war = no
			OR = {
				NOT = { has_secondary_religion = yes }
				secondary_religion = vajrayana
			}
		}
		effect = {
			change_religion = vajrayana
			add_stability = -4
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { is_year = 1550 }
				NOT = { dominant_religion = vajrayana }
			}
			modifier = {
				factor = 0
				has_dlc = "The Cossacks"
				religion = tengri_pagan_reformed
			}
		}
	}
	
	invite_lama = {
		potential = {
			has_dlc = "Common Sense"
			NOT = { has_country_modifier = vajrayana_lama }
			NOT = { has_ruler_flag = invited_lama }
			religion = vajrayana
		}
		allow = {
			stability = 1
			prestige = 25
			is_at_war = no
		}
		effect = {
			hidden_effect = {
				set_ruler_flag = invited_lama
			}
			add_prestige = -25
			country_event = { id = buddhism_events.34 days = 60 }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { prestige = 30 }
			}
		}
	}
	
	anti_christian_edict = {
		potential = {
			NOT = { has_country_modifier = the_anti_christian_edict }
			religion_group = eastern
			OR = {
				any_neighbor_country = { religion_group = christian }
				738 = { owner = { religion_group = christian } }
				666 = { owner = { religion_group = christian } }
				668 = { owner = { religion_group = christian } }
			}
		}
		allow = {
			is_defender_of_faith = no
			OR = {
				any_neighbor_country = {
					religion_group = christian
					NOT = { has_opinion = { who = ROOT value = 0 } }
				}
				666 = {
					owner = {
						religion_group = christian
						NOT = { has_opinion = { who = ROOT value = 0 } }
					}
				}
				668 = {
					owner = {
						religion_group = christian
						NOT = { has_opinion = { who = ROOT value = 0 } }
					}
				}
				738 = {
					owner = {
						religion_group = christian
						NOT = { has_opinion = { who = ROOT value = 0 } }
					}
				}
			}

		}
		effect = {	
			add_country_modifier = {
				name = "the_anti_christian_edict"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = { stability = 2 }
				factor = 0
			}
			modifier = { 
				num_of_missionaries = 4
				factor = 0
			}
			modifier = { 
				NOT = { any_owned_province = { has_owner_religion = no } }
				factor = 0
			}
		}
	}
	
	ibadat_khana = {
		potential = {
			NOT = { has_country_modifier = house_of_worship }
			religion_group = muslim
		}
		allow = {
			full_idea_group = innovativeness_ideas
		}
		effect = {
			add_country_modifier = {
				name = "house_of_worship"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	din_i_illahi = {
		potential = {
			NOT = { has_country_modifier = divine_faith }
			OR = {
				AND = {
					tag = MUG
					religion_group = muslim
					any_owned_province = { religion = hinduism }
				}
				AND = {
					religion = hinduism
					any_owned_province = { religion_group = muslim }			
				}
			}
		}
		allow = {
			is_defender_of_faith = no
			ADM = 3
		}
		effect = {	
			add_country_modifier = {
				name = "divine_faith"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = { num_of_missionaries = 2 }
				factor = 0
			}
		}
	}
	
	anti_muslim_edict = {
		potential = {
			NOT = { has_country_modifier = muslim_resistance }
			religion = hinduism
			NOT = { any_owned_province = { religion = sunni } }
			any_neighbor_country = {
				religion_group = muslim
			}			
		}
		allow = {
			stability = 2
		}
		effect = {	
			add_country_modifier = {
				name = "muslim_resistance"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				num_of_missionaries = 2
				factor = 0
			}
		}
	}
	
	acceptance_of_religious_sects = {
		potential = {
			NOT = { has_country_modifier = religious_sect_tolerance }
			religion = hinduism
		}
		allow = {
			is_defender_of_faith = no
			is_at_war = no
			stability = 1
		}
		effect = {	
			add_country_modifier = {
				name = "religious_sect_tolerance"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				NOT = { any_owned_province = { has_owner_religion = no } }
				factor = 0
			}
		}
	}
	
	haridasa_movement = {
		potential = {
			NOT = { has_country_modifier = the_haridasa_movement }	
			NOT = { has_country_modifier = the_advaita_movement }
			religion = hinduism
		}
		allow = {
			stability = 1
			dip = 3
			NOT = { has_country_modifier = the_advaita_movement }
		}
		effect = {	
			add_country_modifier = {
				name = "the_haridasa_movement"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = { treasury = 100 }
				factor = 0
			}
			modifier = { 
				NOT = { any_owned_province = { has_owner_religion = no } }
				factor = 0
			}
		}
	}
	
	advaita_movement = {
		potential = {
			NOT = { has_country_modifier = the_advaita_movement }
			NOT = { has_country_modifier = the_haridasa_movement }
			religion = hinduism
		}
		allow = {
			stability = 1
			adm = 3
			NOT = { has_country_modifier = the_haridasa_movement }
		}
		effect = {	
			add_country_modifier = {
				name = "the_advaita_movement"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = { 
				num_of_missionaries = 2
				factor = 0
			}
			modifier = { 
				NOT = { any_owned_province = { has_owner_religion = no } }
				factor = 0
			}
			modifier = { 
				revolt_percentage = 5
				factor = 0
			}
			modifier = { 
				war_exhaustion = 10
				factor = 0
			}
		}
	}
	
	divination = {
		potential = {
			NOT = { has_country_modifier = godly_inspiration }
			religion_group = pagan
		}
		allow = {
			is_at_war = no
			stability = 1
		}
		effect = {	
			add_country_modifier = {
				name = "godly_inspiration"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = { stability = 2 }
				factor = 0
			}
			modifier = {
				OR = {
					revolt_percentage = 5
					war_exhaustion = 10
				}
				factor = 0
			}
		}
	}
	
	religious_sacrifice = {
		potential = {
			NOT = { has_country_modifier = religious_sacrifices }
			religion_group = pagan
			NOT = { religion = nahuatl }
			NOT = { religion = inti }
			NOT = { religion = mesoamerican_religion }
		}
		allow = {
			adm = 3
			stability = 1
		}
		effect = {	
			add_country_modifier = {
				name = "religious_sacrifices"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				war_exhaustion = 10
				factor = 0
			}
			modifier = {
				revolt_percentage = 5
				factor = 0
			}
		}
	}
	
	vision_quest = {
		potential = {
			NOT = { has_country_modifier = rite_of_passage }
			religion_group = pagan
		}
		allow = {
			ADM = 3
		}
		effect = {	
			add_country_modifier = {
				name = "rite_of_passage"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = { stability = 1 }
				factor = 0
			}
		}
	}
	
	save_the_burning_world = {
		potential = {
			NOT = { has_country_modifier = saving_the_burning_world }
			religion = sikhism
		}
		allow = {
			ADM = 3
		}
		effect = {	
			add_country_modifier = {
				name = "saving_the_burning_world"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	enforce_heritage = {
		potential = {
			NOT = { has_country_modifier = enforcing_heritage }
			religion_group = eastern
		}
		allow = {
			any_neighbor_country = {
				NOT = { religion_group = eastern }
			}
			stability = 1
		}
		effect = {	
			add_country_modifier = {
				name = "enforcing_heritage"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	restrict_government_offices = {
		potential = {
			NOT = { has_country_modifier = restricted_offices }
			religion = jewish
		}
		allow = {
			ADM = 3
		}
		effect = {
			add_country_modifier = {
				name = "restricted_offices"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	spreading_of_norse_rituals = {
		potential = {
			NOT = { has_country_modifier = spreading_norse_rituals }
			religion = norse_pagan_reformed
		}
		allow = {
			ADM = 3
		}
		effect = {	
			add_country_modifier = {
				name = "spreading_norse_rituals"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	tengri_yellow_shamanism = {
		potential = {
			NOT = { has_country_modifier = yellow_shamanism_modifier }
			NOT = { has_country_modifier = black_shamanism_modifier }
			religion = tengri_pagan_reformed
		}
		allow = {
			ADM = 3
		}
		effect = {	
			add_country_modifier = {
				name = "yellow_shamanism_modifier"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	tengri_black_shamanism = {
		potential = {
			NOT = { has_country_modifier = yellow_shamanism_modifier }
			NOT = { has_country_modifier = black_shamanism_modifier }
			religion = tengri_pagan_reformed
			NOT = { has_secondary_religion = yes }
		}
		allow = {
			ADM = 3
		}
		effect = {	
			add_country_modifier = {
				name = "black_shamanism_modifier"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	tengri_expel_the_khojas = {
		potential = {
			religion = tengri_pagan_reformed
			has_country_flag = khojas_established
			NOT = { has_country_flag = end_of_khojas }
			num_of_cities = 2
		}
		allow = {
			legitimacy_or_horde_unity = 75
			NOT = { has_ruler_modifier = support_of_the_khojas }
		}
		effect = {
			hidden_effect = {
				set_country_flag = end_of_khojas
			}
			custom_tooltip = tengri_events.16.b.tt
			random_owned_province = {
				limit = {
					is_capital = no
				}
				if = {
					limit = {
						owner = {
							NOT = { check_variable = { which = khojas_retained value = 5 } }
						}
					}
					spawn_rebels = {
						type = sunni_rebels
						size = 1
						win = yes
					}
				}
				if = {
					limit = {
						owner = {
							check_variable = { which = khojas_retained value = 5 }
							NOT = { check_variable = { which = khojas_retained value = 7 } }
						}
					}
					spawn_rebels = {
						type = sunni_rebels
						size = 2
						win = yes
					}
				}
				if = {
					limit = {
						owner = {
							check_variable = { which = khojas_retained value = 7 }
						}
					}
					spawn_rebels = {
						type = sunni_rebels
						size = 3
						win = yes
					}
				}
			}
		}
	}
	
	zoroastrian_rites_of_admission = {
		potential = {
			NOT = { has_country_modifier = rites_of_admission_modifier }
			religion = zoroastrian
		}
		allow = {
			stability = 2
			ADM = 3
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = "rites_of_admission_modifier"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	zoroastrian_royal_fires = {
		potential = {
			NOT = { has_country_modifier = royal_fires_modifier }
			religion = zoroastrian
		}
		allow = {
			government_rank = 3
			owns_core_province = 2221 #Various locations suggested to have been the site of these fires.
			owns_core_province = 2207 #Various locations suggested to have been the site of these fires.
			owns_core_province = 2235 #Various locations suggested to have been the site of these fires.
			owns_core_province = 2236 #Various locations suggested to have been the site of these fires.
			owns_core_province = 2218 #Various locations suggested to have been the site of these fires.
			owns_core_province = 441 #Various locations suggested to have been the site of these fires.
			owns_core_province = 2223 #Various locations suggested to have been the site of these fires.
		}
		effect = {	
			add_country_modifier = {
				name = "royal_fires_modifier"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = {
					owns_core_province = 2221 #Various locations suggested to have been the site of these fires.
					owns_core_province = 2207 #Various locations suggested to have been the site of these fires.
					owns_core_province = 2235 #Various locations suggested to have been the site of these fires.
					owns_core_province = 2236 #Various locations suggested to have been the site of these fires.
					owns_core_province = 2218 #Various locations suggested to have been the site of these fires.
					owns_core_province = 441 #Various locations suggested to have been the site of these fires.
					owns_core_province = 2223 #Various locations suggested to have been the site of these fires.
				}
				factor = 0
			}
		}
	}

	zoroastrian_diaspora = {
		potential = {
			NOT = { has_country_modifier = reunification_with_parsees }
			religion = zoroastrian
		}
		allow = {
			owns_core_province = 428 #Teheran
			owns_core_province = 429 #Isfahan
			owns_core_province = 431 #Mogostan
			owns_core_province = 432 #Kerman
			owns_core_province = 433 #Yazd
			owns_core_province = 450 #Balkh
			owns_core_province = 504 #Thatta
			owns_core_province = 517 #Sanjan
			owns_core_province = 529 #Mumbai
			owns_core_province = 2210 #Kermanshah
			all_owned_province = {
				religion = zoroastrian
			}
		}
		effect = {
			add_country_modifier = {
				name = "reunification_with_parsees"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				NOT = {
					owns_core_province = 428 #Teheran
					owns_core_province = 429 #Isfahan
					owns_core_province = 432 #Kerman
					owns_core_province = 433 #Yazd
					owns_core_province = 450 #Balkh
					owns_core_province = 504 #Thatta
					owns_core_province = 517 #Sanjan
					owns_core_province = 529 #Mumbai
					owns_core_province = 2210 #Kermanshah
				}
				factor = 0
			}
		}
	}
	
	animism_ritual_education = {
		potential = {
			NOT = { has_country_modifier = ritual_education_modifier }
			religion = animism
			any_owned_province = {
				NOT = { religion = owner }
			}
		}
		allow = {
			adm_tech = 8
			stability = 2
			ADM = 3
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = "ritual_education_modifier"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	shamanism_wondering_shamans = {
		potential = {
			NOT = { has_country_modifier = wandering_shamans_modifier }
			religion = shamanism
			any_owned_province = {
				NOT = { religion = owner }
			}
		}
		allow = {
			adm_tech = 8
			stability = 2
			ADM = 3
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = "wandering_shamans_modifier"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	totemism_purification_movement = {
		potential = {
			NOT = { has_country_modifier = purification_movement_modifier }
			religion = totemism
			any_owned_province = {
				NOT = { religion = owner }
			}
		}
		allow = {
			stability = 2
			ADM = 3
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = "purification_movement_modifier"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	mesoamerican_codification_of_the_faith = {
		potential = {
			NOT = { has_country_modifier = codification_of_mayan_faith }
			religion = mesoamerican_religion
			any_owned_province = {
				NOT = { religion = owner }
			}
		}
		allow = {
			OR = {
				AND = {	
					has_dlc = "El Dorado"
					is_religion_reformed = yes
				}
				AND = {
					NOT = {
						has_dlc = "El Dorado"
					}
					has_institution = renaissance
				}
			}
			stability = 2
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = "codification_of_mayan_faith"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	nahuatl_conversion_ceremonies = {
		potential = {
			NOT = { has_country_modifier = nahuatl_sacrificial_stones }
			religion = nahuatl
			any_owned_province = {
				NOT = { religion = owner }
			}
		}
		allow = {
			OR = {
				AND = {	
					has_dlc = "El Dorado"
					is_religion_reformed = yes
				}
				AND = {
					NOT = {
						has_dlc = "El Dorado"
					}
					has_institution = renaissance
				}
			}
			stability = 2
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = "nahuatl_sacrificial_stones"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	inti_obligatory_religious_festivals = {
		potential = {
			NOT = { has_country_modifier = great_inti_festivals }
			religion = inti
			any_owned_province = {
				NOT = { religion = owner }
			}
		}
		allow = {
			OR = {
				AND = {	
					has_dlc = "El Dorado"
					is_religion_reformed = yes
				}
				AND = {
					NOT = {
						has_dlc = "El Dorado"
					}
					has_institution = renaissance
				}
			}
			stability = 2
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = "great_inti_festivals"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				has_idea_group = humanist_ideas
				factor = 0
			}
		}
	}
	
	pagan_conversion_to_christianity = {
		potential = {
			religion_group = pagan
			NOT = { religion = tengri_pagan_reformed }
			any_owned_province = {
				religion_group = christian
			}
		}
		allow = {
			NOT = { government = tribal }
			stability = 1
		}
		effect = {
			custom_tooltip = pagan_conversion_to_christianity_tooltip
			hidden_effect = {
				country_event = { id = religious_events.18 }
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { religion = animism }
			}
		}
	}
	pagan_conversion_to_islam = {
		potential = {
			religion_group = pagan
			NOT = { religion = tengri_pagan_reformed }
			any_owned_province = {
				religion_group = muslim
			}
		}
		allow = {
			NOT = { government = tribal }
			stability = 1
		}
		effect = {
			custom_tooltip = pagan_conversion_to_islam_tooltip
			hidden_effect = {
				country_event = { id = religious_events.19 }
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { religion = animism }
			}
		}
	}
	pagan_conversion_to_buddhism = {
		potential = {
			religion_group = pagan
			NOT = { religion = tengri_pagan_reformed }
			any_owned_province = {
				religion_group = eastern
			}
		}
		allow = {
			NOT = { government = tribal }
			stability = 1
		}
		effect = {
			custom_tooltip = pagan_conversion_to_buddhism_tooltip
			hidden_effect = {
				country_event = { id = religious_events.20 }
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { religion = animism }
			}
		}
	}
	pagan_conversion_to_dharmic = {
		potential = {
			religion_group = pagan
			NOT = { religion = tengri_pagan_reformed }
			any_owned_province = {
				religion_group = dharmic
			}
		}
		allow = {
			NOT = { government = tribal }
			stability = 1
		}
		effect = {
			custom_tooltip = pagan_conversion_to_dharmic_tooltip
			hidden_effect = {
				country_event = { id = religious_events.21 }
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { religion = animism }
			}
		}
	}
	pagan_conversion_to_zoroastrian = {
		potential = {
			religion_group = pagan
			NOT = { religion = tengri_pagan_reformed }
			any_owned_province = {
				religion_group = zoroastrian_group
			}
		}
		allow = {
			NOT = { government = tribal }
			stability = 1
		}
		effect = {
			custom_tooltip = pagan_conversion_to_zoroastrian_tooltip
			hidden_effect = {
				country_event = { id = religious_events.22 }
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { religion = animism }
			}
		}
	}
	pagan_conversion_to_judaism = {
		potential = {
			religion_group = pagan
			NOT = { religion = tengri_pagan_reformed }
			any_owned_province = {
				religion_group = zoroastrian_group
			}
		}
		allow = {
			NOT = { government = tribal }
			stability = 1
		}
		effect = {
			custom_tooltip = pagan_conversion_to_judaism_tooltip
			hidden_effect = {
				country_event = { id = religious_events.23 }
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { religion = animism }
			}
		}
	}
}
