# Icons set here are the ones show in the actual slot. The reason is so that we can support different icons for different sizes.

#Updated Range on these

# DEFAULT VALUES:
# is_missile = no
# is_beam = no
# is_point_defence = no

# ####################
# Mass Drivers
# ####################

# ## Mass Drivers

weapon_component_template = {
	type = instant

	key = "SMALL_MASS_DRIVER_5"
	size = small

	icon = "GFX_ship_part_mass_driver_5"
	icon_frame = 1

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	prerequisites = { "tech_mass_drivers_5" }
	component_set = "MASS_DRIVER_5"
	projectile_gfx = "gauss_cannon_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth gunship }
	upgrades_to = "AVW_SMALL_MASS_DRIVER_6"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			volatile_motes = @s_t5_rare
		}
		upkeep = {
			energy = @s_t5_upkeep_energy
			alloys = @s_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_MASS_DRIVER_5"
	size = medium

	icon = "GFX_ship_part_mass_driver_5"
	icon_frame = 1

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	prerequisites = { "tech_mass_drivers_5" }
	component_set = "MASS_DRIVER_5"
	projectile_gfx = "gauss_cannon_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield gunship}
	upgrades_to = "AVW_MEDIUM_MASS_DRIVER_6"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			volatile_motes = @m_t5_rare
		}
		upkeep = {
			energy = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_MASS_DRIVER_5"
	size = large

	icon = "GFX_ship_part_mass_driver_5"
	icon_frame = 1

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	min_range = 45.0

	prerequisites = { "tech_mass_drivers_5" }
	component_set = "MASS_DRIVER_5"
	projectile_gfx = "gauss_cannon_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "AVW_LARGE_MASS_DRIVER_6"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			volatile_motes = @l_t5_rare
		}
		upkeep = {
			energy = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "KINETIC_ARTILLERY_2"
	size = large

	icon = "GFX_ship_part_kinetic_artillery_2"
	icon_frame = 1

	min_range = 45.0

	prerequisites = { "tech_kinetic_artillery_2" }
	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}
	component_set = "KINETIC_ARTILLERY_2"
	projectile_gfx = "adv_kinetic_artillery"
	tags = { weapon_type_kinetic l_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	upgrades_to = "AVW_KINETIC_ARTILLERY_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t6_cost
			volatile_motes = @l_t6_rare
		}
		upkeep = {
			energy = @l_t6_upkeep_energy
			alloys = @l_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "SMALL_AUTOCANNON_3"
	size = small

	icon = "GFX_ship_part_autocannon_3"
	icon_frame = 1

	potential = {
		from = {
			country_uses_bio_ships = no
		}
		is_arkship_ship = no
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	prerequisites = { "tech_autocannons_3" }
	component_set = "AUTOCANNON_3"
	projectile_gfx = "stormfire_auto_cannons_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "AVW_SMALL_AUTOCANNON_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			volatile_motes = @s_t5_rare
		}
		upkeep = {
			energy = @s_t5_upkeep_energy
			alloys = @s_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_AUTOCANNON_3"
	size = medium

	icon = "GFX_ship_part_autocannon_3"
	icon_frame = 1

	potential = {
		from = {
			country_uses_bio_ships = no
		}
		is_arkship_ship = no
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	prerequisites = { "tech_autocannons_3" }
	component_set = "AUTOCANNON_3"
	projectile_gfx = "stormfire_auto_cannons_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "AVW_MEDIUM_AUTOCANNON_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			volatile_motes = @m_t5_rare
		}
		upkeep = {
			energy = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_AUTOCANNON_3"
	size = large

	icon = "GFX_ship_part_autocannon_3"
	icon_frame = 1

	potential = {
		from = {
			country_uses_bio_ships = no
		}
		is_arkship_ship = no
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	prerequisites = { "tech_autocannons_3" }
	component_set = "AUTOCANNON_3"
	projectile_gfx = "stormfire_auto_cannons_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "AVW_LARGE_AUTOCANNON_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			volatile_motes = @l_t5_rare
		}
		upkeep = {
			energy = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}
