﻿MD4_excess_InfEqp = {
	
	enable = {
		has_equipment = { Inf_equipment > 20000 }
		#has_equipment = { H_Inf_equipment > 1600 }
		has_equipment = { command_control_equipment > 2000 }
		
	}
	abort = {
		has_equipment = { Inf_equipment < 15000 }
		#has_equipment = { H_Inf_equipment < 1200 }
		has_equipment = { command_control_equipment < 1500 }
		
	}
	
	ai_strategy = { 
		type = equipment_production_factor 
		id = infantry 
		value = -50
	}
	
}
MD4_shortage_InfEqp = {
	enable = {
		or = {
			has_equipment = { Inf_equipment < 1000 }
			has_equipment = { command_control_equipment < 500 }
		}
		#has_war = no

	}
	abort = {
		or = {
			has_equipment = { Inf_equipment > 1000 }
			has_equipment = { command_control_equipment > 500 }
		}
		#has_war = yes
		
	}
	
	ai_strategy = { 
		type = equipment_production_factor 
		id = infantry 
		value = 100
	}
	ai_strategy = {
		type = role_ratio
		id = L_Inf
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = infantry
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = garrison
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = mechanized
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = armor
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = marines
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = Air_assault
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = Air_Inf
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = Special_Forces
		value = -500
	}
	
	
	
}

MD4_excess_AT = {
	enable = {
		has_equipment = { L_AT_Equipment > 540 }
		has_equipment = { H_AT_Equipment > 600 }
		
	}
	abort = {
		has_equipment = { L_AT_Equipment < 405 }
		has_equipment = { H_AT_Equipment < 450 }
	}
	
	ai_strategy = { 
		type = equipment_production_factor 
		id = anti_tank 
		value = -50
	}
	
}
MD4_shortage_AT = {
	enable = {
		or = {
			has_equipment = { L_AT_Equipment < 500 }
			has_equipment = { H_AT_Equipment < 500 }
		}
		#has_war = no
	}
	abort = {
		or = {
			has_equipment = { L_AT_Equipment > 500 }
			has_equipment = { H_AT_Equipment > 500 }
		}
		#has_war = yes
	}
	
	ai_strategy = { 
		type = equipment_production_factor 
		id = anti_tank 
		value = 100
	}
	ai_strategy = {
		type = role_ratio
		id = L_Inf
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = infantry
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = garrison
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = mechanized
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = armor
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = marines
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = Air_assault
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = Air_Inf
		value = -500
	}
	ai_strategy = {
		type = role_ratio
		id = Special_Forces
		value = -500
	}
	
}

default_stockpile_management = {
	enable = {
		has_war = no
	}

	abort = {
		has_war = yes
	}

	ai_strategy = {
		type = equipment_stockpile_surplus_ratio
		value = 35 # double base stockpile #from 25 to 35
	}
}