######################################################################
# 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

######################################################################
# Revelationist rebels. Disgruntled fanatics.
######################################################################
revelationist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = revelationist
	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 = revelationist }
		}
		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 = revelationist
			owner = { religion = revelationist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = revelationist }
			any_neighbor_province = {
	 			religion = revelationist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = revelationist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = revelationist }
			}
			change_religion = revelationist
			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 = "revelationist_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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = revelationist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = revelationist }
			}
			change_religion = revelationist
			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
			}
			AND = {
				owned_by = URS
				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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = finnish_pagan_reformed }
			}
			change_religion = finnish_pagan_reformed
			force_converted = yes
		}
	}
}

######################################################################
# Celticist rebels. Disgruntled fanatics.
######################################################################
celticist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = celticist
	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 = celticist }
		}
		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 = celticist
			owner = { religion = celticist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = celticist }
			any_neighbor_province = {
	 			religion = celticist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = celticist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = celticist }
			}
			change_religion = celticist
			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 = "celticist_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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = celticist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = celticist }
			}
			change_religion = celticist
			force_converted = yes
		}
	}
}

######################################################################
# Occultist rebels. Disgruntled fanatics.
######################################################################
occultist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = occultist
	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 = occultist }
		}
		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 = occultist
			owner = { religion = occultist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = occultist }
			any_neighbor_province = {
	 			religion = occultist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = occultist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = occultist }
			}
			change_religion = occultist
			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 = "occultist_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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = occultist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = occultist }
			}
			change_religion = occultist
			force_converted = yes
		}
	}
}

######################################################################
# Thelemic rebels. Disgruntled fanatics.
######################################################################
thelemic_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = thelemic
	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 = thelemic }
		}
		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 = thelemic
			owner = { religion = thelemic }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = thelemic }
			any_neighbor_province = {
	 			religion = thelemic
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = thelemic
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = thelemic }
			}
			change_religion = thelemic
			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 = "thelemic_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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = thelemic
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = thelemic }
			}
			change_religion = thelemic
			force_converted = yes
		}
	}
}

######################################################################
# Rust Cultist rebels. Disgruntled fanatics.
######################################################################
rust_cultist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = rust_cultist
	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 = rust_cultist }
		}
		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 = rust_cultist
			owner = { religion = rust_cultist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = rust_cultist }
			any_neighbor_province = {
	 			religion = rust_cultist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = rust_cultist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = rust_cultist }
			}
			change_religion = rust_cultist
			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 = "rust_cultist_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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = rust_cultist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = rust_cultist }
			}
			change_religion = rust_cultist
			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
			}
			AND = {
				owned_by = URS
				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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			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
		}
	}
}

######################################################################
# Matrem rebels. Disgruntled fanatics.
######################################################################
matrem_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = matrem
	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 = matrem }
		}
		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 = matrem
			owner = { religion = matrem }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = matrem }
			any_neighbor_province = {
	 			religion = matrem
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = matrem
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = matrem }
			}
			change_religion = matrem
			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 = "matrem_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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = matrem
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pagan
				NOT = { religion = matrem }
			}
			change_religion = matrem
			force_converted = yes
		}
	}
}

######################################################################
# Rastafarian rebels. Disgruntled fanatics.
######################################################################
rastafarian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = rastafarian
	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 = rastafarian }
		}
		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 = rastafarian
			owner = { religion = rastafarian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = rastafarian }
			any_neighbor_province = {
	 			religion = rastafarian
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = rastafarian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = rastafarian }
			}
			change_religion = rastafarian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "rastafarian_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = rastafarian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = rastafarian }
			}
			change_religion = rastafarian
			force_converted = yes
		}
	}
}

######################################################################
# Voodoo rebels. Disgruntled fanatics.
######################################################################
voodoo_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = voodoo
	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 = voodoo }
		}
		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 = voodoo
			owner = { religion = voodoo }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = voodoo }
			any_neighbor_province = {
	 			religion = voodoo
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = voodoo
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = voodoo }
			}
			change_religion = voodoo
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "voodoo_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = voodoo
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = voodoo }
			}
			change_religion = voodoo
			force_converted = yes
		}
	}
}

######################################################################
# Santeria rebels. Disgruntled fanatics.
######################################################################
santeria_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = santeria
	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 = santeria }
		}
		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 = santeria
			owner = { religion = santeria }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = santeria }
			any_neighbor_province = {
	 			religion = santeria
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = santeria
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = santeria }
			}
			change_religion = santeria
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "santeria_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = santeria
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = santeria }
			}
			change_religion = santeria
			force_converted = yes
		}
	}
}

######################################################################
# Candomble rebels. Disgruntled fanatics.
######################################################################
candomble_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = candomble
	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 = candomble }
		}
		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 = candomble
			owner = { religion = candomble }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = candomble }
			any_neighbor_province = {
	 			religion = candomble
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = candomble
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = candomble }
			}
			change_religion = candomble
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "candomble_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = candomble
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = candomble }
			}
			change_religion = candomble
			force_converted = yes
		}
	}
}

######################################################################
# Espiritista rebels. Disgruntled fanatics.
######################################################################
espiritista_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = espiritista
	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 = espiritista }
		}
		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 = espiritista
			owner = { religion = espiritista }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = espiritista }
			any_neighbor_province = {
	 			religion = espiritista
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = espiritista
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = espiritista }
			}
			change_religion = espiritista
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "espiritista_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = espiritista
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = espiritista }
			}
			change_religion = espiritista
			force_converted = yes
		}
	}
}

######################################################################
# Zar rebels. Disgruntled fanatics.
######################################################################
zar_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = zar
	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 = zar }
		}
		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 = zar
			owner = { religion = zar }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = zar }
			any_neighbor_province = {
	 			religion = zar
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = zar
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = zar }
			}
			change_religion = zar
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "zar_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = zar
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = zar }
			}
			change_religion = zar
			force_converted = yes
		}
	}
}

######################################################################
# Mwari rebels. Disgruntled fanatics.
######################################################################
mwari_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = mwari
	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 = mwari }
		}
		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 = mwari
			owner = { religion = mwari }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = mwari }
			any_neighbor_province = {
	 			religion = mwari
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = mwari
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = mwari }
			}
			change_religion = mwari
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "mwari_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = mwari
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = mwari }
			}
			change_religion = mwari
			force_converted = yes
		}
	}
}

######################################################################
# Zanahary rebels. Disgruntled fanatics.
######################################################################
zanahary_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = zanahary
	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 = zanahary }
		}
		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 = zanahary
			owner = { religion = zanahary }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = zanahary }
			any_neighbor_province = {
	 			religion = zanahary
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = zanahary
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = zanahary }
			}
			change_religion = zanahary
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = afro_syncretic
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "zanahary_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		if = {
			limit = {
				NOT = { religion_group = afro_syncretic }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = zanahary
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = afro_syncretic
				NOT = { religion = zanahary }
			}
			change_religion = zanahary
			force_converted = yes
		}
	}
}

neognostic_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = neognostic
	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 = neognostic }
		}
		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 = neognostic
			owner = { religion = neognostic }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = neognostic }
			any_neighbor_province = {
	 			religion = neognostic
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = neognostic
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = neognostic }
			}
			change_religion = neognostic
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = neognostic
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = neognostic }
			}
			change_religion = neognostic
			force_converted = yes
		}
	}
}

neoroman_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = neoroman
	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 = neoroman }
		}
		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 = neoroman
			owner = { religion = neoroman }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = neoroman }
			any_neighbor_province = {
	 			religion = neoroman
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = neoroman
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = neoroman }
			}
			change_religion = neoroman
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = neoroman
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = neoroman }
			}
			change_religion = neoroman
			force_converted = yes
		}
	}
}

ursuline_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = ursuline
	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 = ursuline }
		}
		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 = ursuline
			owner = { religion = ursuline }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = ursuline }
			any_neighbor_province = {
	 			religion = ursuline
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = ursuline
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = ursuline }
			}
			change_religion = ursuline
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = ursuline
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = ursuline }
			}
			change_religion = ursuline
			force_converted = yes
		}
	}
}

confederated_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = confederated
	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 = confederated }
		}
		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 = confederated
			owner = { religion = confederated }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = confederated }
			any_neighbor_province = {
	 			religion = confederated
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = confederated
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = confederated }
			}
			change_religion = confederated
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = confederated
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = confederated }
			}
			change_religion = confederated
			force_converted = yes
		}
	}
}

angeline_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = angeline
	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 = angeline }
		}
		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 = angeline
			owner = { religion = angeline }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = angeline }
			any_neighbor_province = {
	 			religion = angeline
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = angeline
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = angeline }
			}
			change_religion = angeline
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = angeline
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = angeline }
			}
			change_religion = angeline
			force_converted = yes
		}
	}
}

antinomian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = antinomian
	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 = antinomian }
		}
		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 = antinomian
			owner = { religion = antinomian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = antinomian }
			any_neighbor_province = {
	 			religion = antinomian
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = antinomian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = antinomian }
			}
			change_religion = antinomian
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = antinomian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = antinomian }
			}
			change_religion = antinomian
			force_converted = yes
		}
	}
}

high_church_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = high_church
	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 = high_church }
		}
		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 = high_church
			owner = { religion = high_church }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = high_church }
			any_neighbor_province = {
	 			religion = high_church
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = high_church
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = high_church }
			}
			change_religion = high_church
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = high_church
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = high_church }
			}
			change_religion = high_church
			force_converted = yes
		}
	}
}

charismatic_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = charismatic
	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 = charismatic }
		}
		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 = charismatic
			owner = { religion = charismatic }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = charismatic }
			any_neighbor_province = {
	 			religion = charismatic
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = charismatic
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = charismatic }
			}
			change_religion = charismatic
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = charismatic
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = charismatic }
			}
			change_religion = charismatic
			force_converted = yes
		}
	}
}

anabaptist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = anabaptist
	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 = anabaptist }
		}
		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 = anabaptist
			owner = { religion = anabaptist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = anabaptist }
			any_neighbor_province = {
	 			religion = anabaptist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = anabaptist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = anabaptist }
			}
			change_religion = anabaptist
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = anabaptist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = anabaptist }
			}
			change_religion = anabaptist
			force_converted = yes
		}
	}
}

falling_star_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = falling_star
	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 = falling_star }
		}
		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 = falling_star
			owner = { religion = falling_star }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = falling_star }
			any_neighbor_province = {
	 			religion = falling_star
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = falling_star
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = falling_star }
			}
			change_religion = falling_star
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = falling_star
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = christian
				NOT = { religion = falling_star }
			}
			change_religion = falling_star
			force_converted = yes
		}
	}
}

brethren_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = brethren
	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 = brethren }
		}
		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 = brethren
			owner = { religion = brethren }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = brethren }
			any_neighbor_province = {
	 			religion = brethren
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = brethren
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = brethren }
			}
			change_religion = brethren
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = pirate
	}
	
	# 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 = pirate }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = brethren
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = pirate
				NOT = { religion = brethren }
			}
			change_religion = brethren
			force_converted = yes
		}
	}
}

cult_of_saints_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = cult_of_saints
	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 = cult_of_saints }
		}
		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 = cult_of_saints
			owner = { religion = cult_of_saints }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = cult_of_saints }
			any_neighbor_province = {
	 			religion = cult_of_saints
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = cult_of_saints
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = cult_of_saints }
			}
			change_religion = cult_of_saints
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = cult_of_saints
	}
	
	# 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 = cult_of_saints }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = cult_of_saints
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = cult_of_saints
				NOT = { religion = cult_of_saints }
			}
			change_religion = cult_of_saints
			force_converted = yes
		}
	}
}

bickertonite_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = bickertonite
	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 = bickertonite }
		}
		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 = bickertonite
			owner = { religion = bickertonite }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = bickertonite }
			any_neighbor_province = {
	 			religion = bickertonite
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = bickertonite
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = bickertonite }
			}
			change_religion = bickertonite
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = latter_day_saints
	}
	
	# 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 = latter_day_saints }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = bickertonite
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = latter_day_saints
				NOT = { religion = bickertonite }
			}
			change_religion = bickertonite
			force_converted = yes
		}
	}
}

godbeite_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = godbeite
	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 = godbeite }
		}
		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 = godbeite
			owner = { religion = godbeite }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = godbeite }
			any_neighbor_province = {
	 			religion = godbeite
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = godbeite
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = godbeite }
			}
			change_religion = godbeite
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = latter_day_saints
	}
	
	# 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 = latter_day_saints }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = godbeite
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = latter_day_saints
				NOT = { religion = godbeite }
			}
			change_religion = godbeite
			force_converted = yes
		}
	}
}

strangite_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = strangite
	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 = strangite }
		}
		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 = strangite
			owner = { religion = strangite }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = strangite }
			any_neighbor_province = {
	 			religion = strangite
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = strangite
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = strangite }
			}
			change_religion = strangite
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = latter_day_saints
	}
	
	# 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 = latter_day_saints }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = strangite
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = latter_day_saints
				NOT = { religion = strangite }
			}
			change_religion = strangite
			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
			}
			AND = {
				owned_by = URS
				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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			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
		}
	}
}

jeffersonian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = jeffersonian
	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 = jeffersonian }
		}
		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 = jeffersonian
			owner = { religion = jeffersonian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = jeffersonian }
			any_neighbor_province = {
	 			religion = jeffersonian
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = jeffersonian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = jeffersonian }
			}
			change_religion = jeffersonian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = jeffersonian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = jeffersonian }
			}
			change_religion = jeffersonian
			force_converted = yes
		}
	}
}

hamiltonian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = hamiltonian
	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 = hamiltonian }
		}
		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 = hamiltonian
			owner = { religion = hamiltonian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = hamiltonian }
			any_neighbor_province = {
	 			religion = hamiltonian
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = hamiltonian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = hamiltonian }
			}
			change_religion = hamiltonian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = hamiltonian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = hamiltonian }
			}
			change_religion = hamiltonian
			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
			}
			AND = {
				owned_by = URS
				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 = 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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = yazidi
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = zoroastrian_group
				NOT = { religion = yazidi }
			}
			change_religion = yazidi
			force_converted = yes
		}
	}
}

libertarian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = libertarian
	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 = libertarian }
		}
		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 = libertarian
			owner = { religion = libertarian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = libertarian }
			any_neighbor_province = {
	 			religion = libertarian
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = libertarian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = libertarian }
			}
			change_religion = libertarian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = libertarian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = libertarian }
			}
			change_religion = libertarian
			force_converted = yes
		}
	}
}

monetarist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = monetarist
	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 = monetarist }
		}
		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 = monetarist
			owner = { religion = monetarist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = monetarist }
			any_neighbor_province = {
	 			religion = monetarist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = monetarist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = monetarist }
			}
			change_religion = monetarist
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = monetarist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = monetarist }
			}
			change_religion = monetarist
			force_converted = yes
		}
	}
}

ahmadi_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = ahmadi
	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 = ahmadi }
		}
		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 = ahmadi
			owner = { religion = ahmadi }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = ahmadi }
			any_neighbor_province = {
	 			religion = ahmadi
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = ahmadi
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = ahmadi }
			}
			change_religion = ahmadi
			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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = ahmadi
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = muslim
				NOT = { religion = ahmadi }
			}
			change_religion = ahmadi
			force_converted = yes
		}
	}
}

atomicist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = atomicist
	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 = atomicist }
		}
		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 = atomicist
			owner = { religion = atomicist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = atomicist }
			any_neighbor_province = {
	 			religion = atomicist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = atomicist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = atomicist }
			}
			change_religion = atomicist
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = atomicist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = atomicist }
			}
			change_religion = atomicist
			force_converted = yes
		}
	}
}

americanist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = americanist
	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 = americanist }
		}
		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 = americanist
			owner = { religion = americanist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = americanist }
			any_neighbor_province = {
	 			religion = americanist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = americanist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = americanist }
			}
			change_religion = americanist
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = americanist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = americanist }
			}
			change_religion = americanist
			force_converted = yes
		}
	}
}

consumerist_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = consumerist
	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 = consumerist }
		}
		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 = consumerist
			owner = { religion = consumerist }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = consumerist }
			any_neighbor_province = {
	 			religion = consumerist
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = consumerist
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = consumerist }
			}
			change_religion = consumerist
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = consumerist
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = consumerist }
			}
			change_religion = consumerist
			force_converted = yes
		}
	}
}

cult_of_reason_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = cult_of_reason
	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 = cult_of_reason }
		}
		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 = cult_of_reason
			owner = { religion = cult_of_reason }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = cult_of_reason }
			any_neighbor_province = {
	 			religion = cult_of_reason
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = cult_of_reason
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = cult_of_reason }
			}
			change_religion = cult_of_reason
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = oldworld
	}
	
	# 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 = oldworld }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = cult_of_reason
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = oldworld
				NOT = { religion = cult_of_reason }
			}
			change_religion = cult_of_reason
			force_converted = yes
		}
	}
}

mormon_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = mormon
	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 = mormon }
		}
		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 = mormon
			owner = { religion = mormon }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = mormon }
			any_neighbor_province = {
	 			religion = mormon
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = mormon
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = mormon }
			}
			change_religion = mormon
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = latter_day_saints
	}
	
	# 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 = latter_day_saints }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = mormon
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = latter_day_saints
				NOT = { religion = mormon }
			}
			change_religion = mormon
			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
			}
			AND = {
				owned_by = URS
				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 = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = jain
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = dharmic
				NOT = { religion = jain }
			}
			change_religion = jain
			force_converted = yes
		}
	}
}

cetic_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = cetic
	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 = cetic }
		}
		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 = cetic
			owner = { religion = cetic }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = cetic }
			any_neighbor_province = {
	 			religion = cetic
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = cetic
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = cetic }
			}
			change_religion = cetic
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = eastern
	}
	
	# 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 = eastern }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = cetic
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = eastern
				NOT = { religion = cetic }
			}
			change_religion = cetic
			force_converted = yes
		}
	}
}

gaian_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = gaian
	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 = gaian }
		}
		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 = gaian
			owner = { religion = gaian }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = gaian }
			any_neighbor_province = {
	 			religion = gaian
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = gaian
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = gaian }
			}
			change_religion = gaian
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = eastern
	}
	
	# 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 = eastern }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = gaian
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = eastern
				NOT = { religion = gaian }
			}
			change_religion = gaian
			force_converted = yes
		}
	}
}

ghost_dance_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = ghost_dance
	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 = ghost_dance }
		}
		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 = ghost_dance
			owner = { religion = ghost_dance }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = ghost_dance }
			any_neighbor_province = {
	 			religion = ghost_dance
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = ghost_dance
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = ghost_dance }
			}
			change_religion = ghost_dance
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = american_native
	}
	
	# 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 = american_native }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = ghost_dance
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = american_native
				NOT = { religion = ghost_dance }
			}
			change_religion = ghost_dance
			force_converted = yes
		}
	}
}

raven_tales_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = raven_tales
	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 = raven_tales }
		}
		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 = raven_tales
			owner = { religion = raven_tales }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = raven_tales }
			any_neighbor_province = {
	 			religion = raven_tales
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = raven_tales
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = raven_tales }
			}
			change_religion = raven_tales
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = american_native
	}
	
	# 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 = american_native }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = raven_tales
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = american_native
				NOT = { religion = raven_tales }
			}
			change_religion = raven_tales
			force_converted = yes
		}
	}
}

sol_invicta_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = sol_invicta
	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 = sol_invicta }
		}
		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 = sol_invicta
			owner = { religion = sol_invicta }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = sol_invicta }
			any_neighbor_province = {
	 			religion = sol_invicta
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = sol_invicta
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = sol_invicta }
			}
			change_religion = sol_invicta
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = american_native
	}
	
	# 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 = american_native }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = sol_invicta
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = american_native
				NOT = { religion = sol_invicta }
			}
			change_religion = sol_invicta
			force_converted = yes
		}
	}
}

mictlantec_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = mictlantec
	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 = mictlantec }
		}
		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 = mictlantec
			owner = { religion = mictlantec }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = mictlantec }
			any_neighbor_province = {
	 			religion = mictlantec
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = mictlantec
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = mictlantec }
			}
			change_religion = mictlantec
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = mesoamerican
	}
	
	# 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 = mesoamerican }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = mictlantec
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = mesoamerican
				NOT = { religion = mictlantec }
			}
			change_religion = mictlantec
			force_converted = yes
		}
	}
}

uahomche_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = uahomche
	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 = uahomche }
		}
		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 = uahomche
			owner = { religion = uahomche }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = uahomche }
			any_neighbor_province = {
	 			religion = uahomche
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = uahomche
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = uahomche }
			}
			change_religion = uahomche
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = mesoamerican
	}
	
	# 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 = mesoamerican }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = uahomche
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = mesoamerican
				NOT = { religion = uahomche }
			}
			change_religion = uahomche
			force_converted = yes
		}
	}
}

neomayan_rebels = {

	area = nation 					# Sticks to provinces of their nation
	government = theocracy 			# Desires Theocracy
	religion = neomayan
	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 = neomayan }
		}
		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 = neomayan
			owner = { religion = neomayan }
		}
		modifier = {
			factor = 2.0
			NOT = { religion = neomayan }
			any_neighbor_province = {
	 			religion = neomayan
	 			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
			}
			AND = {
				owned_by = URS
				is_capital = yes
			}
		}
 	}
	siege_won_effect = {
		if = {
			limit = {
				religion = neomayan
			}
			add_province_modifier = {
				name = "religious_violence"
				duration = 730
			}
		}
		if = {
			limit = {
				NOT = { religion = neomayan }
			}
			change_religion = neomayan
			add_province_modifier = {
				name = "forced_conversion"
				duration = 730
			}
		}
	}
	
	# Country scope
	can_negotiate_trigger = {
		religion_group = mesoamerican
	}
	
	# 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 = mesoamerican }
			}
			add_prestige = -50
			every_owned_province = {
				limit = {
					has_rebel_faction = REB
				}
				add_local_autonomy = 20
			}
		}
		if = {
			limit = {
				OR = {
					tag = PAP
					tag = URS
				}
			}
			add_stability = -1
		}
		if = {
			limit = {
				religion = neomayan
			}
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 3650
			}
		}
		if = {
			limit = {
				religion_group = mesoamerican
				NOT = { religion = neomayan }
			}
			change_religion = neomayan
			force_converted = yes
		}
	}
}