############################################################################################################
#	Expert AI mod - naval designs
############################################################################################################

EAI_submarine_early = {
	category = naval
	roles = { naval_submarine }
	priority = {
		base = 0
	}
	EARLY_SUBMARINE_1 = { # to make task force reinforcement work
		role_icon_index = 6
		priority = {
			base = 0
		}

		target_variant = {
			type = ship_hull_submarine_1
			match_value = 1000
		}
	}
	GER_SS = {
		role_icon_index = 6
		priority = {
			base = 1
		}

		target_variant = {
			type = ship_hull_submarine_2
			match_value = 1000

			modules = {
				fixed_ship_torpedo_slot > empty
				fixed_ship_engine_slot > empty
				rear_1_custom_slot = empty
			}
		}
	}
}

EAI_submarine = {
	category = naval
	roles = { naval_submarine }
	priority = { # Priority of design among all roles (1-10)
		base = 0
		modifier = { add = 5000 check_variable = { EAI_FOCUS/NAVY/submarine = global.EAI_ON } }
		modifier = { add = 5000 check_variable = { EAI_FOCUS/NAVY/naval_doctrine = global.EAI_TI_DOCTRINE } }
	}
	
	##############################################################################
	### 	BASIC
	##############################################################################

	BASIC_SUBMARINE = {
		role_icon_index = 6
		priority = {
			base = 0
			modifier = { 
				add = 10000

				### Requirements
				has_tech = basic_ship_hull_submarine
			}
		}

		target_variant = {
			type = ship_hull_submarine_2
			match_value = 1

			modules = {
				
				# ENGINE
				fixed_ship_engine_slot = { module = sub_ship_engine_2 upgrade = current }

				# MAIN
				fixed_ship_torpedo_slot = { any_of = { ship_torpedo_sub } upgrade > current }

				# CUSTOM
				rear_1_custom_slot = { any_of = { ship_torpedo_sub } upgrade > current }
			}
		}
	}

	##############################################################################
	### 	CRUISER
	##############################################################################

	CRUISER_SUBMARINE = {
		role_icon_index = 6
		priority = {
			base = 0
			modifier = { 
				add = 20000

				### Requirements
				has_tech = basic_ship_hull_submarine
				has_tech = cruiser_submarines
			}
		}

		target_variant = {
			type = ship_hull_cruiser_submarine
			match_value = 1

			modules = {
				
				# ENGINE
				fixed_ship_engine_slot = { module = sub_ship_engine_2 upgrade = current }

				# MAIN
				fixed_ship_torpedo_slot = { any_of = { ship_torpedo_sub } upgrade > current }

				# CUSTOM
				front_1_custom_slot = { any_of = { ship_torpedo_sub } upgrade > current }
				mid_1_custom_slot = { module = empty }
				rear_1_custom_slot = { any_of = { ship_torpedo_sub } upgrade > current }
			}
		}
	}

	##############################################################################
	### 	IMPROVED
	##############################################################################

	IMPROVED_SUBMARINE = {
		role_icon_index = 6
		priority = {
			base = 0
			modifier = { 
				add = 30000

				### Requirements
				has_tech = improved_ship_hull_submarine
			}
		}

		target_variant = {
			type = ship_hull_submarine_3
			match_value = 1.1

			modules = {

				# ENGINE
				fixed_ship_engine_slot = { module = sub_ship_engine_3 upgrade = current }

				# MAIN
				fixed_ship_torpedo_slot = { any_of = { ship_torpedo_sub } upgrade > current }

				# CUSTOM
				front_1_custom_slot = { any_of = { ship_torpedo_sub } upgrade > current }
				mid_1_custom_slot = { any_of = { ship_sub_snorkel } upgrade > current }
				rear_1_custom_slot = { any_of = { ship_torpedo_sub } upgrade > current }
			}
		}
	}

	##############################################################################
	### 	ADVANCED
	##############################################################################

	ADVANCED_SUBMARINE = {
		role_icon_index = 6
		priority = {
			base = 0
			modifier = { 
				add = 40000

				### Requirements
				has_tech = advanced_ship_hull_submarine
			}
		}

		target_variant = {
			type = ship_hull_submarine_4
			match_value = 1.1

			modules = {

				# ENGINE
				fixed_ship_engine_slot = { module = sub_ship_engine_4 upgrade = current }

				# MAIN
				fixed_ship_torpedo_slot = { any_of = { ship_torpedo_sub } upgrade > current }

				# CUSTOM
				front_1_custom_slot = { any_of = { ship_torpedo_sub } upgrade > current }
				mid_1_custom_slot = { any_of = { ship_sub_snorkel } upgrade > current }
				rear_1_custom_slot = { any_of = { ship_torpedo_sub } upgrade > current }
			}
		}
	}
}