#######################################################################################
###		Armor technologies
#######################################################################################

@PR_light_tank = 850
@PR_medium_tank = 850
@PR_heavy_tank = 850
@PR_light_tank_recon = 900
@PR_light_flamethrower_support = 900
@PR_medium_flamethrower_support = 900
@PR_tank_armor = 800
@PR_tank_engine = 800
@PR_amphibious = 900

EAI_PR_STRATEGIES_armor_technologies = {

	EAI_PR_STRATEGIES_light_tank = yes
	EAI_PR_STRATEGIES_medium_tank = yes
	EAI_PR_STRATEGIES_heavy_tank = yes
	EAI_PR_STRATEGIES_tank_armor = yes
	EAI_PR_STRATEGIES_tank_engine = yes
	EAI_PR_STRATEGIES_amphibious = yes
	EAI_PR_STRATEGIES_light_tank_recon = yes
	EAI_PR_STRATEGIES_light_flamethrower_support = yes
	EAI_PR_STRATEGIES_medium_flamethrower_support = yes
}

###

EAI_PR_STRATEGIES_light_tank = {

	if = { 
		limit = { 
			EAI_LARM_tech_focus = yes
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_light_tank }

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

			if = { limit = { NOT = { EAI_STRATEGY_CHL_mass_infantry_prioritize_tanks = yes } }
			
				multiply_temp_variable = { prio_cat = 0 }
			}

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

		### gwtank_chassis

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

			date > 1936.6.1
			EAI_LARM_tech_focus = yes

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

		### basic_light_tank_chassis

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

			date > 1936.6.1
			EAI_LARM_tech_focus = yes

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

		### improved_light_tank_chassis

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

			date > 1936.6.1
			EAI_LARM_tech_focus = yes

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

		### advanced_light_tank_chassis

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

			date > 1941.1.1
			EAI_LARM_tech_focus = yes

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

EAI_PR_STRATEGIES_medium_tank = {

	if = { 
		limit = { 
			EAI_MARM_tech_focus = yes
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_medium_tank }

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

			if = { limit = { NOT = { EAI_STRATEGY_CHL_mass_infantry_prioritize_tanks = yes } }
			
				multiply_temp_variable = { prio_cat = 0 }
			}

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

		### gwtank_chassis

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

			date > 1936.6.1

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

		### basic_medium_tank_chassis

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

			date > 1938.1.1

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

		### improved_medium_tank_chassis

		if = { limit = { set_temp_variable = { _prio_tech = token:improved_medium_tank_chassis } 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 }

		### advanced_medium_tank_chassis

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

			date > 1943.1.1

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

		### main_battle_tank_chassis

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

			always = no ### Disabled

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

EAI_PR_STRATEGIES_heavy_tank = {

	if = { 
		limit = { 
			EAI_HARM_tech_focus = yes
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_heavy_tank }

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

			if = { limit = { NOT = { EAI_STRATEGY_CHL_mass_infantry_prioritize_tanks = yes } }
			
				multiply_temp_variable = { prio_cat = 0 }
			}

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

		### gwtank_chassis

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

			date > 1936.6.1

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

		### basic_heavy_tank_chassis

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

			date > 1936.6.1

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

		### improved_heavy_tank_chassis

		if = { limit = { set_temp_variable = { _prio_tech = token:improved_heavy_tank_chassis } 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 }

		### advanced_heavy_tank_chassis

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

			date > 1943.1.1

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

		### main_battle_tank_chassis

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

			EAI_MODARM_tech_focus = yes

			date > 1945.1.1

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

EAI_PR_STRATEGIES_light_tank_recon = {

	if = { 
		limit = { 
			EAI_light_armor_tank_recon_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_light_tank_recon }

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

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

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

		### gwtank_chassis

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

			date > 1937.6.1
			EAI_light_armor_tank_recon_tech_focus = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### basic_light_tank_chassis

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

			date > 1938.6.1
			EAI_light_armor_tank_recon_tech_focus = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_light_flamethrower_support = {

	if = { 
		limit = { 
			EAI_light_flamethrower_support_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_light_flamethrower_support }

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

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

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

		### gwtank_chassis

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

			date > 1937.6.1
			EAI_light_armor_tank_recon_tech_focus = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### basic_light_tank_chassis

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

			date > 1938.6.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

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

			OR = {
				date > 1938.1.1
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers

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

			OR = {
				date > 1938.1.1
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers2

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

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech sp_armored_advanced_flamethrower_tech

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

		date > 1941.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_medium_flamethrower_support = {

	if = { 
		limit = { 
			EAI_medium_flamethrower_support_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_medium_flamethrower_support }

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

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

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

		### gwtank_chassis

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

			date > 1937.6.1
			EAI_light_armor_tank_recon_tech_focus = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### basic_light_tank_chassis

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

			date > 1938.6.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

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

			OR = {
				date > 1938.1.1
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers

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

			OR = {
				date > 1938.1.1
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers2

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

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech sp_armored_advanced_flamethrower_tech

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

			date > 1941.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_tank_armor = {

	if = { 
		limit = { 
			EAI_armor_2_MODULE_FOCUS = yes
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_tank_armor }

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

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

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

		### armor_tech_1

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

			date > 1937.6.1
			if = {
				limit = {
					OR = {
						has_tech = improved_light_tank_chassis
						has_tech = basic_medium_tank_chassis
						has_tech = basic_heavy_tank_chassis
					}
				}
			
				multiply_temp_variable = { _prio_val = 1.2 }
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### armor_tech_2

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

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### armor_tech_3

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

			date > 1941.1.1
			EAI_armor_4_MODULE_FOCUS = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### armor_tech_4

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

			date > 1944.1.1
			EAI_armor_4_MODULE_FOCUS = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_tank_engine = {

	if = { 
		limit = { 
			EAI_engine_2_MODULE_FOCUS = yes
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_tank_engine }

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

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

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

		### engine_tech_1

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

			date > 1937.6.1
			if = {
				limit = {
					OR = {
						has_tech = improved_light_tank_chassis
						has_tech = basic_medium_tank_chassis
						has_tech = basic_heavy_tank_chassis
					}
				}
			
				multiply_temp_variable = { _prio_val = 1.2 }
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### engine_tech_2

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

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### engine_tech_3

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

			date > 1941.1.1
			EAI_engine_4_MODULE_FOCUS = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### engine_tech_4

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

			date > 1944.1.1
			EAI_engine_4_MODULE_FOCUS = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_amphibious = {

	if = { 
		limit = { 
			EAI_amphibious_division_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_amphibious }

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

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

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

		### gwtank_chassis

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

			date > 1937.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### basic_light_tank_chassis

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

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### improved_light_tank_chassis

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

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### amphibious_tank_chassis

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

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### amphibious_drive

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

			date > 1940.6.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}