######################################################################
# Valid arguments:
#
# area = [nation/culture/nation_culture/nation_religion/religion/all]
# government = [monarchy/republic/theocracy/anti/any]
# defection = [culture/culture_group/religion/any/none]
# independence = [culture/culture_group/religion/colonial/any/none]
# gfx_type = [culture_province/culture_owner]
#
######################################################################

# All rebels in province scope

# For siege_won_trigger, siege_won_effect
# FROM = owner
# ROOT = province

# For Other
# FROM = owner
# ROOT = Homecountry

######################################################################
# Baltic Pagan Reformed rebels. Disgruntled fanatics.
######################################################################
baltic_pagan_reformed_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = baltic_pagan_reformed
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = baltic_pagan_reformed }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = baltic_pagan_reformed
			owner = { religion = baltic_pagan_reformed }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = baltic_pagan_reformed }
			any_neighbor_province = {
	 			religion = baltic_pagan_reformed
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = baltic_pagan_reformed
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = baltic_pagan_reformed }
			}
			change_religion = baltic_pagan_reformed
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = pagan
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "baltic_pagan_reformed_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = pagan }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = baltic_pagan_reformed }
			}
			change_religion = baltic_pagan_reformed
			force_converted = yes
		}
	}
}

######################################################################
# Finnish Pagan Reformed rebels. Disgruntled fanatics.
######################################################################
finnish_pagan_reformed_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = finnish_pagan_reformed
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = finnish_pagan_reformed }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = finnish_pagan_reformed
			owner = { religion = finnish_pagan_reformed }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = finnish_pagan_reformed }
			any_neighbor_province = {
	 			religion = finnish_pagan_reformed
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = finnish_pagan_reformed
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = finnish_pagan_reformed }
			}
			change_religion = finnish_pagan_reformed
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = pagan
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "finnish_pagan_reformed_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = pagan }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = animism
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = animism }
			}
			change_religion = animism
			force_converted = yes
		}
	}
}

######################################################################
# Slavic Pagan Reformed rebels. Disgruntled fanatics.
######################################################################
slavic_pagan_reformed_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = slavic_pagan_reformed
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = slavic_pagan_reformed }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = slavic_pagan_reformed
			owner = { religion = slavic_pagan_reformed }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = slavic_pagan_reformed }
			any_neighbor_province = {
	 			religion = slavic_pagan_reformed
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = slavic_pagan_reformed
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = slavic_pagan_reformed }
			}
			change_religion = slavic_pagan_reformed
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = pagan
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "slavic_pagan_reformed_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = pagan }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = slavic_pagan_reformed }
			}
			change_religion = slavic_pagan_reformed
			force_converted = yes
		}
	}
}

######################################################################
# Zunist Reformed rebels. Disgruntled fanatics.
######################################################################
zunist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = zun_pagan_reformed
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = zun_pagan_reformed }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = zun_pagan_reformed
			owner = { religion = zun_pagan_reformed }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = zun_pagan_reformed }
			any_neighbor_province = {
	 			religion = zun_pagan_reformed
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = zun_pagan_reformed
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = zun_pagan_reformed }
			}
			change_religion = zun_pagan_reformed
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = pagan
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "zunist_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = pagan }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = zun_pagan_reformed }
			}
			change_religion = zun_pagan_reformed
			force_converted = yes
		}
	}
}

######################################################################
# Hellenic Pagan Reformed rebels. Disgruntled fanatics.
######################################################################
hellenic_pagan_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = hellenic_pagan
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = hellenic_pagan }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = hellenic_pagan
			owner = { religion = hellenic_pagan }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = hellenic_pagan }
			any_neighbor_province = {
	 			religion = hellenic_pagan
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = hellenic_pagan
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = hellenic_pagan }
			}
			change_religion = hellenic_pagan
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = pagan
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "hellenic_pagan_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = pagan }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = hellenic_pagan
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = hellenic_pagan }
			}
			change_religion = hellenic_pagan
			force_converted = yes
		}
	}
}

cathar_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = cathar
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = cathar }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = cathar
			owner = { religion = cathar }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = cathar }
			any_neighbor_province = {
	 			religion = cathar
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = cathar
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = cathar }
			}
			change_religion = cathar
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = cathar
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = cathar }
			}
			change_religion = cathar
			force_converted = yes
		}
	}
}

fraticelli_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = fraticelli
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = fraticelli }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = fraticelli
			owner = { religion = fraticelli }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = fraticelli }
			any_neighbor_province = {
	 			religion = fraticelli
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = fraticelli
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = fraticelli }
			}
			change_religion = fraticelli
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = fraticelli
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = fraticelli }
			}
			change_religion = fraticelli
			force_converted = yes
		}
	}
}

waldensian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = waldensian
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = waldensian }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = waldensian
			owner = { religion = waldensian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = waldensian }
			any_neighbor_province = {
	 			religion = waldensian
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = waldensian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = waldensian }
			}
			change_religion = waldensian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = waldensian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = waldensian }
			}
			change_religion = waldensian
			force_converted = yes
		}
	}
}

lollard_religion_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = lollard
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = lollard }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = lollard
			owner = { religion = lollard }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = lollard }
			any_neighbor_province = {
	 			religion = lollard
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = lollard
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = lollard }
			}
			change_religion = lollard
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = lollard
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = lollard }
			}
			change_religion = lollard
			force_converted = yes
		}
	}
}

monophysite_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = monophysite
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = monophysite }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = monophysite
			owner = { religion = monophysite }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = monophysite }
			any_neighbor_province = {
	 			religion = monophysite
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = monophysite
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = monophysite }
			}
			change_religion = monophysite
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = monophysite
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = monophysite }
			}
			change_religion = monophysite
			force_converted = yes
		}
	}
}

bogomilist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = bogomilist
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = bogomilist }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = bogomilist
			owner = { religion = bogomilist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = bogomilist }
			any_neighbor_province = {
	 			religion = bogomilist
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = bogomilist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = bogomilist }
			}
			change_religion = bogomilist
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = bogomilist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = bogomilist }
			}
			change_religion = bogomilist
			force_converted = yes
		}
	}
}

monothelite_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = monothelite
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = monothelite }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = monothelite
			owner = { religion = monothelite }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = monothelite }
			any_neighbor_province = {
	 			religion = monothelite
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = monothelite
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = monothelite }
			}
			change_religion = monothelite
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = monothelite
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = monothelite }
			}
			change_religion = monothelite
			force_converted = yes
		}
	}
}

iconoclast_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = iconoclast
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = iconoclast }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = iconoclast
			owner = { religion = iconoclast }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = iconoclast }
			any_neighbor_province = {
	 			religion = iconoclast
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = iconoclast
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = iconoclast }
			}
			change_religion = iconoclast
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = iconoclast
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = iconoclast }
			}
			change_religion = iconoclast
			force_converted = yes
		}
	}
}

paulician_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = paulician
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = paulician }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = paulician
			owner = { religion = paulician }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = paulician }
			any_neighbor_province = {
	 			religion = paulician
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = paulician
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = paulician }
			}
			change_religion = paulician
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = paulician
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = paulician }
			}
			change_religion = paulician
			force_converted = yes
		}
	}
}

nestorian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = nestorian
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = nestorian }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = nestorian
			owner = { religion = nestorian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = nestorian }
			any_neighbor_province = {
	 			religion = nestorian
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = nestorian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = nestorian }
			}
			change_religion = nestorian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = nestorian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = nestorian }
			}
			change_religion = nestorian
			force_converted = yes
		}
	}
}

messalian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = messalian
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = messalian }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = messalian
			owner = { religion = messalian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = messalian }
			any_neighbor_province = {
	 			religion = messalian
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = messalian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = messalian }
			}
			change_religion = messalian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = christian
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = christian }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = messalian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = messalian }
			}
			change_religion = messalian
			force_converted = yes
		}
	}
}

zikri_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = zikri
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = zikri }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = zikri
			owner = { religion = zikri }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = zikri }
			any_neighbor_province = {
	 			religion = zikri
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = zikri
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = zikri }
			}
			change_religion = zikri
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = muslim
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = muslim }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = zikri
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = muslim
				NOT = { religion = zikri }
			}
			change_religion = zikri
			force_converted = yes
		}
	}
}

yazidi_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = yazidi
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = yazidi }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = yazidi
			owner = { religion = yazidi }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = yazidi }
			any_neighbor_province = {
	 			religion = yazidi
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = yazidi
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = yazidi }
			}
			change_religion = yazidi
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = muslim
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = muslim }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = yazidi
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = muslim
				NOT = { religion = yazidi }
			}
			change_religion = yazidi
			force_converted = yes
		}
	}
}

kharijite_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = kharijite
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = kharijite }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = kharijite
			owner = { religion = kharijite }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = kharijite }
			any_neighbor_province = {
	 			religion = kharijite
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = kharijite
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = kharijite }
			}
			change_religion = kharijite
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = muslim
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = muslim }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = kharijite
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = muslim
				NOT = { religion = kharijite }
			}
			change_religion = kharijite
			force_converted = yes
		}
	}
}

druze_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = druze
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = druze }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = druze
			owner = { religion = druze }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = druze }
			any_neighbor_province = {
	 			religion = druze
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = druze
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = druze }
			}
			change_religion = druze
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = muslim
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = muslim }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = druze
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = muslim
				NOT = { religion = druze }
			}
			change_religion = druze
			force_converted = yes
		}
	}
}

hurufi_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = hurufi
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = hurufi }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = hurufi
			owner = { religion = hurufi }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = hurufi }
			any_neighbor_province = {
	 			religion = hurufi
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = hurufi
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = hurufi }
			}
			change_religion = hurufi
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = muslim
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = muslim }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = hurufi
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = muslim
				NOT = { religion = hurufi }
			}
			change_religion = hurufi
			force_converted = yes
		}
	}
}

mazdaki_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = mazdaki
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = mazdaki }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = mazdaki
			owner = { religion = mazdaki }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = mazdaki }
			any_neighbor_province = {
	 			religion = mazdaki
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = mazdaki
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = mazdaki }
			}
			change_religion = mazdaki
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = zoroastrian_group
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = zoroastrian_group }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = mazdaki
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = zoroastrian_group
				NOT = { religion = mazdaki }
			}
			change_religion = mazdaki
			force_converted = yes
		}
	}
}

manichean_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = manichean
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = manichean }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = manichean
			owner = { religion = manichean }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = manichean }
			any_neighbor_province = {
	 			religion = manichean
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = manichean
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = manichean }
			}
			change_religion = manichean
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = zoroastrian_group
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = zoroastrian_group }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = manichean
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = zoroastrian_group
				NOT = { religion = manichean }
			}
			change_religion = manichean
			force_converted = yes
		}
	}
}

samaritan_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = samaritan_faith
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = samaritan_faith }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = samaritan_faith
			owner = { religion = samaritan_faith }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = samaritan_faith }
			any_neighbor_province = {
	 			religion = samaritan_faith
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = samaritan_faith
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = samaritan_faith }
			}
			change_religion = samaritan_faith
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = jewish_group
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = jewish_group }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = samaritan_faith
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = jewish_group
				NOT = { religion = samaritan_faith }
			}
			change_religion = samaritan_faith
			force_converted = yes
		}
	}
}

karaite_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = karaite_faith
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = karaite_faith }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = karaite_faith
			owner = { religion = karaite_faith }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = karaite_faith }
			any_neighbor_province = {
	 			religion = karaite_faith
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = karaite_faith
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = karaite_faith }
			}
			change_religion = karaite_faith
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = jewish_group
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = jewish_group }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = karaite_faith
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = jewish_group
				NOT = { religion = karaite_faith }
			}
			change_religion = karaite_faith
			force_converted = yes
		}
	}
}

jain_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = jain
	defection = religion			# Defects to countries of their religion
	defect_delay = 120				# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.0
	infantry = 0.7
	cavalry = 0.3
	
	morale = 1.1

	# Possible handle actions
	handle_action_negotiate = yes
	handle_action_stability = yes
	handle_action_build_core = yes
	handle_action_send_missionary = yes		
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			is_overseas = yes
		}
		modifier = {
			factor = 0.0
			owner = { religion = ROOT }
		}
		modifier = {
			factor = 0.0
			NOT = { religion = jain }
		}
		modifier = {
			factor = 0.001
			tolerance_to_this = 5
		}
		modifier = {
			factor = 0.5
			tolerance_to_this = 2
		}
		modifier = {
			factor = 5.0
			owner = { has_country_flag = religious_turmoil }
		}		
		modifier = {
			factor = 2000
			has_missionary = yes
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = 1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -1 }
		}
		modifier = {
			factor = 2
			NOT = { tolerance_to_this = -2 }
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 0.0
			religion = jain
			owner = { religion = jain }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = jain }
			any_neighbor_province = {
	 			religion = jain
	 			NOT = { has_province_modifier = "forced_conversion" }
	 		}
	 	}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		NOT = {
			AND = {
				owned_by = PAP
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = jain
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = jain }
			}
			change_religion = jain
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = dharmic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "generic_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = dharmic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				tag = PAP
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = jain
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = dharmic
				NOT = { religion = karaite_faith }
			}
			change_religion = jain
			force_converted = yes
		}
	}
}