######################################################################
# Revolutionary rebels. Civil War factions.
######################################################################
communist_rebels = {

	area = nation 					# Stays within the nation
	government = any			
	defection = none				# Does not defect
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province	
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.2
	infantry = 0.6
	cavalry = 0.2
	
	morale = 1.1
	
	# Possible handle actions
	handle_action_negotiate = no
	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
			owner = {
				OR = {
					government = communist_dictatorship
					government = socialist_republic
				}
			}
		}		
		modifier = {
			factor = 0
			NOT = { adm_tech = 82 }
		}
		modifier = {
			factor = 4
			adm_tech = 83
		}
		modifier = {
			factor = 0.5
			adm_tech = 90
		}
		modifier = {
			factor = 0.05
			is_overseas = yes
		}
		modifier = {
			factor = 5.0
			owner = { has_disaster = communist_revolution }
		}
	}
 
 	# 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 = 10
			is_capital = yes
		}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
 	}
	siege_won_effect = {
	}
	
	# Country scope
	can_negotiate_trigger = {
		always = no
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "communist_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		add_prestige = -50
		change_government = communist_dictatorship
		define_ruler = {
			rebel = yes
		}
		if = {
			limit = { has_disaster = communist_revolution }
			end_disaster = communist_revolution
		}
	}
}

fascist_rebels = {

	area = nation 					# Stays within the nation
	government = any			
	defection = none				# Does not defect
	independence = none				# Does not strive for independence
	unit_transfer = yes
	gfx_type = culture_province	
	
	resilient = no
	reinforcing = yes
	general = yes
	smart = yes
	
	artillery = 0.2
	infantry = 0.6
	cavalry = 0.2
	
	morale = 1.1
	
	# Possible handle actions
	handle_action_negotiate = no
	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
			owner = {
				government = fascist_dictatorship
			}
		}		
		modifier = {
			factor = 0
			NOT = { adm_tech = 83 }
		}
		modifier = {
			factor = 4
			adm_tech = 84
		}
		modifier = {
			factor = 0.5
			adm_tech = 90
		}
		modifier = {
			factor = 0.05
			is_overseas = yes
		}
		modifier = {
			factor = 5.0
			owner = { has_disaster = fascist_revolution }
		}
	}
 
 	# 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 = 10
			is_capital = yes
		}
		modifier = {
			factor = 1.5
			unrest = 2
		}
		modifier = {
			factor = 1.5
			unrest = 4
		}
		modifier = {
			factor = 1.5
			unrest = 6
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
 	}
	siege_won_effect = {
	}
	
	# Country scope
	can_negotiate_trigger = {
		always = no
	}
	
	# Country scope
	can_enforce_trigger = {
		always = yes
	}
	
	# Localisation for their demands
	demands_description = "fascist_rebels_demand"
	
	# Country Scope	
	demands_enforced_effect = {
		add_prestige = -50
		change_government = fascist_dictatorship
		define_ruler = {
			rebel = yes
		}
		if = {
			limit = { has_disaster = fascist_revolution }
			end_disaster = fascist_revolution
		}
	}
}