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

EAI_destroyer_early = {
	category = naval
	roles = { naval_screen }
	priority = {
		base = 0
	}

	EARLY_DESTROYER_1 = { # to make task force reinforcement work
		role_icon_index = 2
		priority = {
			base = 0
		}

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000
		}
	}
	ENG_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = ENG }

		target_variant = {
			type = ship_hull_light_2
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_2
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = ship_torpedo_1
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	FRA_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = FRA }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_3
				fixed_ship_torpedo_slot = ship_torpedo_2
				mid_1_custom_slot = ship_torpedo_1
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	USA_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = USA }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = ship_sonar_1
				fixed_ship_engine_slot = light_ship_engine_2
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = ship_torpedo_1
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	ITA_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = ITA }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_1
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_2
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = empty
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	JAP_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = JAP }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_2
				fixed_ship_anti_air_slot = empty
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_1
				fixed_ship_torpedo_slot = ship_torpedo_2
				mid_1_custom_slot = ship_torpedo_2
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	SOV_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = SOV }

		target_variant = {
			type = ship_hull_light_2
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_2
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = empty
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	CAN_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = CAN }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_2
				fixed_ship_anti_air_slot = empty
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_1
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = ship_torpedo_1
				rear_1_custom_slot = empty
			}
		}
	}
	AST_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = AST }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_1
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_1
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = empty
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	ROM_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = ROM }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_1
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_1
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = ship_mine_layer
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	GRE_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = GRE }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_1
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_1
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = empty
				rear_1_custom_slot = ship_mine_layer
			}
		}
	}
	MEX_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = MEX }

		target_variant = {
			type = ship_hull_light_1
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_1
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_1
				fixed_ship_torpedo_slot = empty
				mid_1_custom_slot = empty
				rear_1_custom_slot = empty
			}
		}
	}
	SWE_DD = {
		role_icon_index = 1
		priority = {
			base = 1
		}
		enable = { original_tag = SWE }

		target_variant = {
			type = ship_hull_light_2
			match_value = 1000

			modules = {
				fixed_ship_battery_slot = dp_light_battery_1
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_2
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = ship_mine_layer
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
}

###

EAI_destroyer_A = {
	category = naval
	roles = { naval_screen }
	priority = { # Priority of design among all roles (1-10)
		base = 0
		modifier = { add = 9000 check_variable = { EAI_FOCUS/NAVY/destroyer = global.EAI_A_DD_DESIGN } }
	}

	##############################################################################
	### 	BASIC DESTROYER
	##############################################################################

	BASIC_DESTROYER_A = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 10000

				### Requirements
				has_tech = basic_ship_hull_light
			}
		}

		target_variant = {	
			type = ship_hull_light_2
			match_value = 1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = { any_of = { ship_fire_control_system } upgrade > current }
				fixed_ship_radar_slot = { any_of = { ship_radar } upgrade > current }

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = { any_of = { ship_anti_air } upgrade > current }

				# MAIN
				fixed_ship_battery_slot = { any_of = { ship_light_battery } upgrade > current }
				fixed_ship_torpedo_slot = empty 

				# CUSTOM
				mid_1_custom_slot = { any_of = { ship_light_battery } upgrade > current }
				rear_1_custom_slot = { any_of = { ship_light_battery } upgrade > current }
			}
		}
	}

	##############################################################################
	### 	IMPROVED DESTROYER
	##############################################################################

	IMPROVED_DESTROYER_A = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 20000

				### Requirements
				has_tech = improved_ship_hull_light
			}
		}

		target_variant = {
			type = ship_hull_light_3
			match_value = 1.1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = { any_of = { ship_fire_control_system } upgrade > current }
				fixed_ship_radar_slot = { any_of = { ship_radar } upgrade > current }

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = { any_of = { ship_anti_air } upgrade > current }

				# MAIN
				fixed_ship_battery_slot = { any_of = { ship_light_battery } upgrade > current }
				fixed_ship_torpedo_slot = empty 

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

	##############################################################################
	### 	ADVANCED DESTROYER
	##############################################################################

	ADVANCED_DESTROYER_A = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 40000

				### Requirements
				has_tech = advanced_ship_hull_light
			}
		}

		target_variant = {
			type = ship_hull_light_4
			match_value = 1.1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = { any_of = { ship_fire_control_system } upgrade > current }
				fixed_ship_radar_slot = { any_of = { ship_radar } upgrade > current }

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = { any_of = { ship_anti_air } upgrade > current }

				# MAIN
				fixed_ship_battery_slot = { module = dp_light_battery_4 upgrade = current }
				fixed_ship_torpedo_slot = empty 

				# CUSTOM
				front_1_custom_slot = { module = dp_light_battery_4 upgrade = current }
				mid_1_custom_slot = { module = dp_light_battery_4 upgrade = current }
				mid_2_custom_slot = { module = dp_light_battery_4 upgrade = current }
				rear_1_custom_slot = { module = dp_light_battery_4 upgrade = current }
			}
		}
	}
}

EAI_destroyer_B = {
	category = naval
	roles = { naval_screen }
	priority = { # Priority of design among all roles (1-10)
		base = 0
		modifier = { add = 9000 check_variable = { EAI_FOCUS/NAVY/destroyer = global.EAI_B_DD_DESIGN } }
	}

	##############################################################################
	### 	BASIC DESTROYER
	##############################################################################

	BASIC_DESTROYER_B = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 10000

				### Requirements
				has_tech = basic_ship_hull_light
			}
		}

		target_variant = {	
			type = ship_hull_light_2
			match_value = 1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = { any_of = { ship_sonar } upgrade > current }
				fixed_ship_radar_slot = { any_of = { ship_radar } upgrade > current }

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = { any_of = { ship_anti_air } upgrade = current } 

				# MAIN
				fixed_ship_battery_slot = { any_of = { ship_light_battery } upgrade = current } 
				fixed_ship_torpedo_slot = { any_of = { ship_torpedo } upgrade = current } 

				# CUSTOM
				mid_1_custom_slot = { any_of = { ship_depth_charge } upgrade = current } 
				rear_1_custom_slot = empty
			}
		}
	}

	##############################################################################
	### 	IMPROVED DESTROYER
	##############################################################################

	IMPROVED_DESTROYER_B = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 20000

				### Requirements
				has_tech = improved_ship_hull_light
			}
		}

		target_variant = {
			type = ship_hull_light_3
			match_value = 1.1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = { any_of = { ship_sonar } upgrade > current }
				fixed_ship_radar_slot = { any_of = { ship_radar } upgrade > current }

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = { any_of = { ship_anti_air } upgrade = current } 

				# MAIN
				fixed_ship_battery_slot = { any_of = { ship_light_battery } upgrade = current } 
				fixed_ship_torpedo_slot = { any_of = { ship_torpedo } upgrade = current } 

				# CUSTOM
				front_1_custom_slot = { any_of = { ship_depth_charge } upgrade = current } 
				mid_1_custom_slot = empty
				rear_1_custom_slot = empty
			}
		}
	}

	##############################################################################
	### 	ADVANCED DESTROYER
	##############################################################################

	ADVANCED_DESTROYER_B = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 40000

				### Requirements
				has_tech = advanced_ship_hull_light
			}
		}

		target_variant = {
			type = ship_hull_light_4
			match_value = 1.1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = { any_of = { ship_sonar } upgrade > current }
				fixed_ship_radar_slot = { any_of = { ship_radar } upgrade > current }

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = { any_of = { ship_anti_air } upgrade = current } 

				# MAIN
				fixed_ship_battery_slot = { any_of = { ship_light_battery } upgrade = current } 
				fixed_ship_torpedo_slot = { any_of = { ship_torpedo } upgrade = current } 

				# CUSTOM
				front_1_custom_slot = { any_of = { ship_depth_charge } upgrade = current } 
				mid_1_custom_slot = empty
				mid_2_custom_slot = empty
				rear_1_custom_slot = empty
			}
		}
	}
}

EAI_destroyer_C = {
	category = naval
	roles = { naval_screen }
	priority = { # Priority of design among all roles (1-10)
		base = 0
		modifier = { add = 9000 check_variable = { EAI_FOCUS/NAVY/destroyer = global.EAI_C_DD_DESIGN } }
	}

	##############################################################################
	### 	BASIC DESTROYER
	##############################################################################

	BASIC_DESTROYER_C = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 20000

				### Requirements
				has_tech = basic_ship_hull_light
			}
		}

		target_variant = {	
			type = ship_hull_light_2
			match_value = 1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = empty
				fixed_ship_radar_slot = empty

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = empty

				# MAIN
				fixed_ship_battery_slot = { any_of = { ship_light_battery } upgrade > current }
				fixed_ship_torpedo_slot = empty 

				# CUSTOM
				mid_1_custom_slot = empty
				rear_1_custom_slot = empty
			}
		}
	}
}

EAI_filler_destroyer = {
	category = naval
	roles = { naval_screen }
	priority = { # Priority of design among all roles (1-10)
		base = 0
		modifier = { add = 9000 has_country_flag = EAI_more_screens_required_for_fleets }
	}

	##############################################################################
	### 	BASIC DESTROYER
	##############################################################################

	BASIC_DESTROYER_FILLER = {
		role_icon_index = 2
		priority = {
			base = 0
			modifier = { 
				add = 10000

				### Requirements
				has_tech = basic_ship_hull_light
			}
		}

		target_variant = {	
			type = ship_hull_light_2
			match_value = 1

			modules = {

				# ELECTRONICS
				fixed_ship_fire_control_system_slot = empty
				fixed_ship_radar_slot = empty

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

				# ANTI-AIR
				fixed_ship_anti_air_slot = empty

				# MAIN
				fixed_ship_battery_slot = { any_of = { ship_light_battery } upgrade > current }
				fixed_ship_torpedo_slot = empty 

				# CUSTOM
				mid_1_custom_slot = empty
				rear_1_custom_slot = empty
			}
		}
	}
}