# 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

#NOTE that values from weapon_components.csv will override values from this file

# ####################
# Laser
# ####################

### Red Lasers

weapon_component_template = {
	key = "SMALL_GAMMA_LASER"
	size = small
	type = instant
	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}
	icon = "GFX_ship_part_laser_5"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

	prerequisites = { "tech_lasers_5" }
	component_set = "GAMMA_LASER"
	projectile_gfx = "gamma_laser_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "AVW_SMALL_LASER_6"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			rare_crystals = @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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_GAMMA_LASER"
	size = medium
	type = instant
	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}
	icon = "GFX_ship_part_laser_5"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

	prerequisites = { "tech_lasers_5" }
	component_set = "GAMMA_LASER"
	projectile_gfx = "gamma_laser_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "AVW_MEDIUM_LASER_6"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			rare_crystals = @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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "LARGE_GAMMA_LASER"
	size = large
	type = instant
	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}
	icon = "GFX_ship_part_laser_5"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

	prerequisites = { "tech_lasers_5" }
	component_set = "GAMMA_LASER"
	projectile_gfx = "gamma_laser_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "AVW_LARGE_LASER_6"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			rare_crystals = @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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "SMALL_PLASMA_3"
	size = small
	type = instant

	icon = "GFX_ship_part_plasma_3"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

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

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	prerequisites = { "tech_plasma_3" }
	component_set = "PLASMA_3"
	projectile_gfx = "plasma_cannon_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "AVW_SMALL_PLASMA_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			exotic_gases = @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 = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_PLASMA_3"
	size = medium
	type = instant

	icon = "GFX_ship_part_plasma_3"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

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

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	prerequisites = { "tech_plasma_3" }
	component_set = "PLASMA_3"
	projectile_gfx = "plasma_cannon_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "AVW_MEDIUM_PLASMA_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			exotic_gases = @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 = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = "LARGE_PLASMA_3"
	size = large
	type = instant

	icon = "GFX_ship_part_plasma_3"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

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

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	min_range = 45.0

	prerequisites = { "tech_plasma_3" }
	component_set = "PLASMA_3"
	projectile_gfx = "plasma_cannon_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "AVW_LARGE_PLASMA_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			exotic_gases = @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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}
