################################################################################################################
# Copied from "Anti Tax" rebels but lets them have a leader and a few other things (and disabled from spawning).
################################################################################################################
slave_rebels = {
	
	color = { 40 140 210 }
	
	area = nation 					# Stays within the nation
	government = any
	defection = none					# Will defect to the "best" alternative.
	independence = none				# Does not strive for independence
	defect_delay = 120
	gfx_type = culture_province
	
	resilient = yes					# Disbands on retreat
	reinforcing = no				# Does not receive reinforcements
	general = no					# Does not use generals by default
	smart = yes						# Does not assault forts, tactically withdraw from battle, etc.
	unit_transfer = no				# Units do not remain after enforcing demands.
	will_relocate = yes				# Units will relocate if they have sieged all provinces nearby and has to move over sea.
	
	artillery = 0.0
	infantry = 0.9
	cavalry = 0.1
	morale = 0.85
	
	
	# 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 = 0
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.1
			units_in_province = 1
		}
		modifier = {
			factor = 0.001
			controlled_by = REB
		}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
	
 	# Province Scope
 	siege_won_trigger = {
 		NOT = { local_autonomy = 50 }
 	}
	siege_won_effect = {
		add_local_autonomy = 10	
	}
	
	# Country scope
	can_negotiate_trigger = {
		always = yes
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "slave_rebels_demand"
	
	# Country scope
	demands_enforced_effect = {
		hidden_effect = {
			add_country_modifier = {
				name = just_lost_to_rebels
				duration = 10
				hidden = yes
			}
		}
		every_owned_province = {
			limit = {
				has_rebel_faction = REB
				is_overseas = no
			}
			add_local_autonomy = 40
		}
		add_prestige = -60
	}
}
