#######################################################################################
###		Artillery technologies
#######################################################################################

@PR_artillery = 900
@PR_antiair = 600
@PR_antitank = 600
@PR_rocket_artillery = 600

EAI_PR_STRATEGIES_artillery_technologies = {

	EAI_PR_STRATEGIES_artillery = yes
	EAI_PR_STRATEGIES_antiair = yes
	EAI_PR_STRATEGIES_antitank = yes
	EAI_PR_STRATEGIES_rocket_artillery = yes
}

###

EAI_PR_STRATEGIES_artillery = {

	if = { 
		limit = { 
			always = yes
		}

		set_temp_variable = { prio_cat = @PR_artillery }

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

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

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

		set_temp_variable = { _eq_1 = num_target_equipment_in_armies_k@artillery_equipment }
		set_temp_variable = { _eq_2 = num_target_equipment_in_armies_k@infantry_equipment }
		set_temp_variable = { _ratio = 0.05 }

		### gw_artillery

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

			OR = {
				date > 1936.1.1
				has_war = yes
			}
			
			set_temp_variable = { _year = 1936 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
			EAI_PR_equipment_usage_FACTOR = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### interwar_artillery

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

			OR = {
				date > 1939.1.1
				has_war = yes
			}
			
			set_temp_variable = { _year = 1936 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
			EAI_PR_equipment_usage_FACTOR = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### artillery1

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

			date > 1939.1.1
			
			set_temp_variable = { _year = 1939 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
			EAI_PR_equipment_usage_FACTOR = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### artillery2

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

			date > 1940.1.1
			
			set_temp_variable = { _year = 1940 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
			EAI_PR_equipment_usage_FACTOR = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### artillery3

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

			date > 1941.1.1
			
			set_temp_variable = { _year = 1941 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
			EAI_PR_equipment_usage_FACTOR = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### artillery4

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

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

		### artillery5

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

			date > 1943.1.1
			
			set_temp_variable = { _year = 1943 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
			EAI_PR_equipment_usage_FACTOR = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_antiair = {

	if = { 
		limit = { 
			OR = {
				EAI_aa_tech_focus = yes

				EAI_naval_aa_MODULE_FOCUS = yes
			}
		}

		set_temp_variable = { prio_cat = @PR_antiair }

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

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

			if = { limit = { EAI_naval_aa_MODULE_FOCUS = yes }
			
				set_temp_variable = { prio_factor = EAI_RESEARCH_naval_research_factor }
				add_to_temp_variable = { prio_factor = 0.5 }
				multiply_temp_variable = { prio_cat = prio_factor }
			}
			else = {

				set_temp_variable = { prio_cat = @PR_antiair }
			}

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

		### gw_artillery

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

			date > 1936.6.1
			multiply_temp_variable = { _prio_val = 1.3 }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### interwar_antiair

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

			date > 1936.6.1
			multiply_temp_variable = { _prio_val = 1.3 }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antiair1

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

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antiair2

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

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antiair3

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

			date > 1941.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antiair4

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

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antiair5

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

			date > 1943.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_antitank = {

	if = { 
		limit = { 
			OR = {
				EAI_anti_tank_tech_focus = yes
				EAI_CAS_tech_focus = yes
				EAI_TAC_tech_focus = yes
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
		}

		set_temp_variable = { prio_cat = @PR_antitank }

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

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

			if = {
				limit = {
					is_major = yes

					OR = {
						EAI_MARM_equipment_production = yes
						EAI_HARM_equipment_production = yes
					}
				}
			
				add_to_temp_variable = { prio_cat = 400 }
			}

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

		### interwar_antitank

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

			date > 1939.1.1
			OR = {
				EAI_anti_tank_tech_focus = yes
				EAI_CAS_tech_focus = yes
				EAI_TAC_tech_focus = yes
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antitank1

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

			date > 1939.1.1
			OR = {
				EAI_anti_tank_tech_focus = yes
				EAI_CAS_tech_focus = yes
				EAI_TAC_tech_focus = yes
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antitank2

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

			date > 1940.1.1
			OR = {
				EAI_anti_tank_tech_focus = yes
				EAI_CAS_tech_focus = yes
				EAI_TAC_tech_focus = yes
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antitank3

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

			date > 1941.1.1
			OR = {
				EAI_anti_tank_tech_focus = yes
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antitank4

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

			date > 1942.1.1
			OR = {
				EAI_anti_tank_tech_focus = yes
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### antitank5

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

			date > 1943.1.1
			OR = {
				EAI_anti_tank_tech_focus = yes
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_rocket_artillery = {

	if = { 
		limit = { 
			EAI_rart_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_rocket_artillery }

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

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

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

		### rocket_artillery

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

			date > 1940.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### rocket_artillery2

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

			date > 1941.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### rocket_artillery3

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

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### rocket_artillery4

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

			date > 1943.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}