weapon_component_template = {
	key = "BLUE_CRYSTAL_MISSILE"

	size = torpedo
	type = missile
  
	icon = "GFX_ship_part_ew_blue_crystal_missile"
	icon_frame = 1
	projectile_gfx = "blue_ew_crystal_ship_missile"
	component_set = "BLUE_CRYSTAL_MISSILE"
  
	tags = { weapon_type_explosive }
	ai_tags = { weapon_role_artillery artillery energy_torpedoes }
	ai_tag_weight = 0
	
	damage = { min = 32 max = 64 }
	windup = { min = 5 max = 15 }
	total_fire_time = 30
	range = 100.0
	accuracy = 1.0
	tracking = 0.5
	power = -40

	missile_speed = 64
	missile_evasion = 0.5
	missile_shield = 5
	missile_armor = 10
	missile_health = 10
	missile_retarget_range = 160
	
	shield_penetration = 1.1
	armor_damage = 1.5
	size_damage_factor = 0.1

	prerequisites = { "EW_tech_artificial_growth" }
	upgrades_to = "GREEN_CRYSTAL_MISSILE"

	resources = {
		category = ship_components
		cost = {
			alloys = @m_t6_cost
			volatile_motes = @m_t6_rare
		}		
		upkeep = {
			energy = @m_t6_upkeep_energy
			alloys = @m_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	key = "GREEN_CRYSTAL_MISSILE"

	size = torpedo
	type = missile
  
	icon = "GFX_ship_part_ew_green_crystal_missile"
	icon_frame = 1
	projectile_gfx = "green_ew_crystal_ship_missile"
	component_set = "GREEN_CRYSTAL_MISSILE"
  
	tags = { weapon_type_explosive }
	ai_tags = { weapon_role_artillery artillery energy_torpedoes }
	ai_tag_weight = 0
	
	damage = { min = 43 max = 85 }
	windup = { min = 5 max = 15 }
	total_fire_time = 30
	range = 120.0
	accuracy = 1.0
	tracking = 0.6
	power = -50

	missile_speed = 72
	missile_evasion = 0.6
	missile_shield = 8
	missile_armor = 15
	missile_health = 15
	missile_retarget_range = 160
	
	shield_penetration = 1.25
	armor_damage = 1.5
	size_damage_factor = 0.1

	prerequisites = { "EW_tech_crystal_enhancement" }
	upgrades_to = "YELLOW_CRYSTAL_MISSILE"

	resources = {
		category = ship_components
		cost = {
			alloys = @m_t6_cost
			volatile_motes = @m_t6_rare
		}		
		upkeep = {
			energy = @m_t6_upkeep_energy
			alloys = @m_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	key = "YELLOW_CRYSTAL_MISSILE"

	size = torpedo
	type = missile
  
	icon = "GFX_ship_part_ew_yellow_crystal_missile"
	icon_frame = 1
	projectile_gfx = "yellow_ew_crystal_ship_missile"
	component_set = "YELLOW_CRYSTAL_MISSILE"
  
	tags = { weapon_type_explosive }
	ai_tags = { weapon_role_artillery artillery energy_torpedoes }
	ai_tag_weight = 0
	
	damage = { min = 53 max = 107 }
	windup = { min = 5 max = 15 }
	total_fire_time = 30
	range = 140.0
	accuracy = 1.0
	tracking = 0.7
	power = -60

	missile_speed = 80
	missile_evasion = 0.7
	missile_shield = 10
	missile_armor = 20
	missile_health = 20
	missile_retarget_range = 160
	
	shield_penetration = 1.33
	armor_damage = 1.5
	size_damage_factor = 0.1


	prerequisites = { "EW_tech_accelerated_hardening" }
	upgrades_to = "RED_CRYSTAL_MISSILE"

	resources = {
		category = ship_components
		cost = {
			alloys = @m_t6_cost
			volatile_motes = @m_t6_rare
		}		
		upkeep = {
			energy = @m_t6_upkeep_energy
			alloys = @m_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	key = "RED_CRYSTAL_MISSILE"

	size = torpedo
	type = missile
  
	icon = "GFX_ship_part_ew_red_crystal_missile"
	icon_frame = 1
	projectile_gfx = "red_ew_crystal_ship_missile"
  component_set = "RED_CRYSTAL_MISSILE"
  
	tags = { weapon_type_explosive }
	ai_tags = { weapon_role_artillery artillery energy_torpedoes }
	ai_tag_weight = 0
	
	damage = { min = 64 max = 128 }
	windup = { min = 5 max = 15 }
	total_fire_time = 30
	range = 160.0
	accuracy = 1.0
	tracking = 0.8
	power = -70

	missile_speed = 88
	missile_evasion = 0.8
	missile_shield = 12
	missile_armor = 25
	missile_health = 25
	missile_retarget_range = 160
	
	shield_penetration = 1.5
	armor_damage = 1.5
	size_damage_factor = 0.1

	prerequisites = { "EW_tech_core_purification" }

	resources = {
		category = ship_components
		cost = {
			alloys = @m_t6_cost
			volatile_motes = @m_t6_rare
		}		
		upkeep = {
			energy = @m_t6_upkeep_energy
			alloys = @m_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}