#######################################################################################
###		Infantry technologies
#######################################################################################

@PR_infantry_weapons = 1100
@PR_infantry_at = 1000
@PR_paratroopers = 1500 #to unlokc paratroopers doctrines to buff special forces
@PR_marines = 500
@PR_mountaineers = 500
@PR_special_forces = 200
@PR_night_vision = 750
@PR_support_weapons = 1100
@PR_trucks = 900
@PR_motorized_infantry = 900
@PR_armored_car = 700
@PR_mechanised_infantry = 1000
@PR_amtrac = 900

EAI_PR_STRATEGIES_infantry_technologies = {

	EAI_PR_STRATEGIES_infantry_weapons = yes
	EAI_PR_STRATEGIES_infantry_at = yes
	EAI_PR_STRATEGIES_paratroopers = yes
	EAI_PR_STRATEGIES_marines = yes
	EAI_PR_STRATEGIES_mountaineers = yes
	EAI_PR_STRATEGIES_special_forces = yes
	EAI_PR_STRATEGIES_night_vision = yes
	EAI_PR_STRATEGIES_support_weapons = yes
	EAI_PR_STRATEGIES_trucks = yes
	EAI_PR_STRATEGIES_motorized_infantry = yes
	EAI_PR_STRATEGIES_armored_car = yes
	EAI_PR_STRATEGIES_mechanised_infantry = yes
	EAI_PR_STRATEGIES_amtrac = yes
}

###

EAI_PR_STRATEGIES_infantry_weapons = {

	if = { 
		limit = { 
			always = yes
		}

		set_temp_variable = { prio_cat = @PR_infantry_weapons }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### infantry_weapons

		if = { limit = { set_temp_variable = { _prio_tech = token:infantry_weapons } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}

			set_temp_variable = { _year = 1936 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### infantry_weapons1

		if = { limit = { set_temp_variable = { _prio_tech = token:infantry_weapons1 } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}

			set_temp_variable = { _year = 1936 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### infantry_weapons2

		if = { limit = { set_temp_variable = { _prio_tech = token:infantry_weapons2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1937.12.1

			set_temp_variable = { _year = 1938 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### improved_infantry_weapons

		if = { limit = { set_temp_variable = { _prio_tech = token:improved_infantry_weapons } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.12.1

			set_temp_variable = { _year = 1939 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### improved_infantry_weapons_2

		if = { limit = { set_temp_variable = { _prio_tech = token:improved_infantry_weapons_2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.12.1

			set_temp_variable = { _year = 1940 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### advanced_infantry_weapons

		if = { limit = { set_temp_variable = { _prio_tech = token:advanced_infantry_weapons } set_temp_variable = { _prio_val = prio_cat }

			date > 1941.12.1

			set_temp_variable = { _year = 1942 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### advanced_infantry_weapons2

		if = { limit = { set_temp_variable = { _prio_tech = token:advanced_infantry_weapons2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1943.12.1

			set_temp_variable = { _year = 1944 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_infantry_at = {

	if = { 
		limit = { 
			always = no
		}

		set_temp_variable = { prio_cat = @PR_infantry_at }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### infantry_at

		if = { limit = { set_temp_variable = { _prio_tech = token:infantry_at } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### infantry_at2

		if = { limit = { set_temp_variable = { _prio_tech = token:infantry_at2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1943.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_paratroopers = {

	if = { 
		limit = { 
			OR = {
				has_tech = mountaineers_keystone_1
				has_tech = mountaineers_keystone_2
				has_tech = marines_expeditionary_support
				has_tech = marines_commandoes_mechanised
			}
		}

		set_temp_variable = { prio_cat = @PR_paratroopers }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### paratroopers

		if = { limit = { set_temp_variable = { _prio_tech = token:paratroopers } set_temp_variable = { _prio_val = prio_cat }

			date > 1937.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		# ### paratroopers2

		# if = { limit = { set_temp_variable = { _prio_tech = token:paratroopers2 } set_temp_variable = { _prio_val = prio_cat }

		# 	date > 1939.1.1
				
		# } EAI_PR_add_to_priority_research_queue = yes }

		# ### paratroopers3

		# if = { limit = { set_temp_variable = { _prio_tech = token:paratroopers3 } set_temp_variable = { _prio_val = prio_cat }

		# 	date > 1943.1.1
				
		# } EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_marines = {

	if = { 
		limit = { 
			is_major = yes
			check_variable = { EAI_FOCUS/LAND/spec_ops = global.EAI_MAR_SPEC_OPS }
		}

		set_temp_variable = { prio_cat = @PR_marines }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### marines

		if = { limit = { set_temp_variable = { _prio_tech = token:marines } set_temp_variable = { _prio_val = prio_cat }

			multiply_temp_variable = { _prio_val = 2 }
			date > 1937.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### marines2

		if = { limit = { set_temp_variable = { _prio_tech = token:marines2 } set_temp_variable = { _prio_val = prio_cat }

			if = { limit = { has_country_flag = EAI_TEMPLATE_marine_template_upgrade } multiply_temp_variable = { _prio_val = 1.7 } }
			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### marines3

		if = { limit = { set_temp_variable = { _prio_tech = token:marines3 } set_temp_variable = { _prio_val = prio_cat }

			if = { limit = { has_country_flag = EAI_TEMPLATE_marine_template_upgrade } multiply_temp_variable = { _prio_val = 1.7 } }
			date > 1943.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_mountaineers = {

	if = { 
		limit = { 
			is_major = yes
			check_variable = { EAI_FOCUS/LAND/spec_ops = global.EAI_MNT_SPEC_OPS }
		}

		set_temp_variable = { prio_cat = @PR_mountaineers }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_mountaineers

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_mountaineers } set_temp_variable = { _prio_val = prio_cat }

			multiply_temp_variable = { _prio_val = 2 }
			date > 1937.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_mountaineers2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_mountaineers2 } set_temp_variable = { _prio_val = prio_cat }

			if = { limit = { has_country_flag = EAI_TEMPLATE_mountaineer_template_upgrade } multiply_temp_variable = { _prio_val = 1.7 } }
			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_mountaineers3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_mountaineers3 } set_temp_variable = { _prio_val = prio_cat }

			if = { limit = { has_country_flag = EAI_TEMPLATE_mountaineer_template_upgrade } multiply_temp_variable = { _prio_val = 1.7 } }
			date > 1943.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_special_forces = {

	if = { 
		limit = { 
			always = no
		}

		set_temp_variable = { prio_cat = @PR_special_forces }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_special_forces

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_special_forces } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### advanced_special_forces

		if = { limit = { set_temp_variable = { _prio_tech = token:advanced_special_forces } set_temp_variable = { _prio_val = prio_cat }

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### improved_special_forces

		if = { limit = { set_temp_variable = { _prio_tech = token:improved_special_forces } set_temp_variable = { _prio_val = prio_cat }

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### extreme_environment_training

		if = { limit = { set_temp_variable = { _prio_tech = token:extreme_environment_training } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### survival_training

		if = { limit = { set_temp_variable = { _prio_tech = token:survival_training } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### elite_forces

		if = { limit = { set_temp_variable = { _prio_tech = token:elite_forces } set_temp_variable = { _prio_val = prio_cat }

			date > 1944.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_night_vision = {

	if = { 
		limit = { 
			always = no
		}

		set_temp_variable = { prio_cat = @PR_night_vision }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### night_vision

		if = { limit = { set_temp_variable = { _prio_tech = token:night_vision } set_temp_variable = { _prio_val = prio_cat }

			date > 1943.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### night_vision2

		if = { limit = { set_temp_variable = { _prio_tech = token:night_vision2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1946.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_support_weapons = {

	if = { 
		limit = { 
			always = yes
		}

		set_temp_variable = { prio_cat = @PR_support_weapons }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### support_weapons

		if = { limit = { set_temp_variable = { _prio_tech = token:support_weapons } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1937.12.1
				has_war = yes
			}

			set_temp_variable = { _year = 1936 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### support_weapons2

		if = { limit = { set_temp_variable = { _prio_tech = token:support_weapons2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1937.12.1

			set_temp_variable = { _year = 1938 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### support_weapons3

		if = { limit = { set_temp_variable = { _prio_tech = token:support_weapons3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.12.1

			set_temp_variable = { _year = 1940 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### support_weapons4

		if = { limit = { set_temp_variable = { _prio_tech = token:support_weapons4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1941.12.1
			
			set_temp_variable = { _year = 1942 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_trucks = {

	if = { 
		limit = { 
			always = yes
		}

		set_temp_variable = { prio_cat = @PR_trucks }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_trucks

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_trucks } set_temp_variable = { _prio_val = prio_cat }

			date > 1937.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_motorized_infantry = {

	if = { 
		limit = { 
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_motorized_infantry }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### motorised_infantry

		if = { limit = { set_temp_variable = { _prio_tech = token:motorised_infantry } set_temp_variable = { _prio_val = prio_cat }

			date > 1937.1.1
			OR = {
				EAI_MARM_tech_focus = yes
				EAI_LARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### motorized_rocket_unit

		if = { limit = { set_temp_variable = { _prio_tech = token:motorized_rocket_unit } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
			EAI_motart_tech_focus = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### mechanised_infantry (for hardness bonus)

		if = { limit = { set_temp_variable = { _prio_tech = token:mechanised_infantry } set_temp_variable = { _prio_val = prio_cat }

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_armored_car = {

	if = { 
		limit = { 
			EAI_armored_car_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_armored_car }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### armored_car1

		if = { limit = { set_temp_variable = { _prio_tech = token:armored_car1 } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### armored_car2

		if = { limit = { set_temp_variable = { _prio_tech = token:armored_car2 } set_temp_variable = { _prio_val = prio_cat }

			always = no
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### armored_car3

		if = { limit = { set_temp_variable = { _prio_tech = token:armored_car3 } set_temp_variable = { _prio_val = prio_cat }

			always = no
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_mechanised_infantry = {

	if = { 
		limit = { 
			EAI_mech_tech_focus = yes
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_mechanised_infantry }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### mechanised_infantry

		if = { limit = { set_temp_variable = { _prio_tech = token:mechanised_infantry } set_temp_variable = { _prio_val = prio_cat }

			date > 1940.1.1

			set_temp_variable = { _year = 1940 }
			EAI_PR_year_FACTOR = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		#Don't research mechanised_infantry2 and mechanised_infantry3 in priority : mech 1 is more cost efficient, and AI spends too much XP upgrading them

		### mechanised_infantry2

		# if = { limit = { set_temp_variable = { _prio_tech = token:mechanised_infantry2 } set_temp_variable = { _prio_val = prio_cat }

		# 	date > 1942.1.1

		# 	set_temp_variable = { _year = 1942 }
		# 	EAI_PR_year_FACTOR = yes
				
		# } EAI_PR_add_to_priority_research_queue = yes }

		# ### mechanised_infantry3

		# if = { limit = { set_temp_variable = { _prio_tech = token:mechanised_infantry3 } set_temp_variable = { _prio_val = prio_cat }

		# 	date > 1944.1.1

		# 	set_temp_variable = { _year = 1944 }
		# 	EAI_PR_year_FACTOR = yes
				
		# } EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_amtrac = {

	if = { 
		limit = { 
			EAI_amphibious_division_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_amtrac }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_trucks

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_trucks } set_temp_variable = { _prio_val = prio_cat }

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### motorised_infantry

		if = { limit = { set_temp_variable = { _prio_tech = token:motorised_infantry } set_temp_variable = { _prio_val = prio_cat }

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### mechanised_infantry

		if = { limit = { set_temp_variable = { _prio_tech = token:mechanised_infantry } set_temp_variable = { _prio_val = prio_cat }

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### amphibious_mechanized_infantry

		if = { limit = { set_temp_variable = { _prio_tech = token:amphibious_mechanized_infantry } set_temp_variable = { _prio_val = prio_cat }

			date > 1941.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### amphibious_mechanized_infantry_2

		if = { limit = { set_temp_variable = { _prio_tech = token:amphibious_mechanized_infantry_2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1943.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}