armor_HUN = {

	available_for = {
		HUN
	}

	role = armor

	upgrade_prio = {
		base = 200

		modifier = {
			factor = 2
			OR = {
				has_tech = basic_medium_tank
				has_tech = basic_medium_tank_chassis
			}
		}

		modifier = {
			factor = 20
			NOT = { ai_has_role_template = armor }
		}
	}

	medium_armor_HUN = {

		upgrade_prio = {
			base = 25000

			modifier = {
				factor = 0
				OR = {
					AND = {
						NOT = { has_tech = artillery2 }
						NOT = { has_tech = mechanised_infantry }
					}
					has_tech = mass_assault
				}
			}
		}

		division_names_group = HUN_ARM_01

		can_upgrade_in_field = {
			has_equipment = { light_tank_artillery_chassis > 500 }
		}

		target_template = {

			support = {
				engineer = 1
				medium_flame_tank = 1
				artillery = 1
				maintenance_company = 1
				logistics_company = 1
			}

			regiments = {
				infantry = 10
				light_sp_artillery_brigade = 5
				anti_tank_brigade = 1
			}
		}
	}
}

infantry_HUN = {

	available_for = {
		HUN
	}

	role = infantry

	upgrade_prio = {
		base = 500
	}

	infantry_early_HUN = {

		upgrade_prio = {
			base = 10000
		}

		division_names_group = HUN_INF_02

		target_template = {

			support = {
				recon = 1
				artillery = 1
				anti_air = 1
			}

			regiments = {
				infantry = 7
			}
		}
	}

	infantry_mid_HUN = {

		upgrade_prio = {
			base = 25000
		}

		division_names_group = HUN_INF_01

		can_upgrade_in_field = {
			has_equipment = { light_tank_artillery_chassis > 500 }
		}

		target_template = {

			support = {
				engineer = 1
				medium_flame_tank = 1
				artillery = 1
				maintenance_company = 1
				logistics_company = 1
			}

			regiments = {
				infantry = 10
				light_sp_artillery_brigade = 5
				anti_tank_brigade = 1
			}
		}
	}
}


mountaineers_HUN = {
	
	role = mountaineers

	available_for = {
		HUN
	}
	
	upgrade_prio = {
		factor = 25000

		modifier = {
			factor = 0
			NOT = {
				has_tech = tech_mountaineers
			}
		}
	}
	mountaineers_HUN = {
	
		upgrade_prio = {
			factor = 2
		}
	
		target_template = {
			support = {
				engineer = 1
				artillery = 1
				anti_tank = 1
				logistics_company = 1
				rangers_support = 1 
			}
			
			regiments = {
				mountaineers = 15
				light_sp_artillery_brigade = 3
			}
		}
		
	}
}

marines_HUN = {
	
	role = marines

	available_for = {
		HUN
	}
	
	upgrade_prio = {
		factor = 25000

		modifier = {
			factor = 0
			NOT = {
				has_tech = marines
			}
		}
	}
	marine_HUN = {
	
		upgrade_prio = {
			factor = 2

			modifier = {
				factor = 1
			}
		}
		target_template = {
			support = {
				pioneer_support = 1
				artillery = 1
				field_hospital = 1
				anti_air = 1
				anti_tank = 1
			}
			
			regiments = {
				marine = 9
				light_sp_artillery_brigade = 3
			}
		}

	}
}