@regen = 0.5

# ####################
# Critter Weapons - Swarm
# ####################

@critter_cost_value = 35
@missile_speed = 5

### Missiles

# Standard Scourge Missile
weapon_component_template = {
	key = "LARGE_SCOURGE_MISSILE_1"
	size = torpedo
	entity = "turret_missile_large_entity"

	icon = "GFX_ship_part_scourge_missile_1"
	icon_frame = 1
	type = missile

	potential = {
		ship_uses_mauler_components = no
	}

	prerequisites = { "tech_scourge_missile_1" }
	component_set = "SCOURGE_MISSILE_1"
	projectile_gfx = "scourge_missile"
	tags = {
		weapon_type_explosive
		weapon_swarm
		weapon_type_space_fauna
	}
	ai_tags = {
		weapon_role_artillery
	}
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = 65
		}
	}
}

### Projectiles

# Medium Projectile
weapon_component_template = {
	key = "MEDIUM_SCOURGE_PROJECTILE_WEAPON"
	hidden = yes

	size = medium
	entity = "medium_scourge_projectile_weapon_entity"
	type = instant
	icon = "GFX_ship_part_scourge_missile_1"
	icon_frame = 1
	projectile_gfx = "scourge_projectile_weapon"
	tags = {
		weapon_type_kinetic
		weapon_swarm
		weapon_type_space_fauna
	}
	ai_tags = {
		weapon_role_anti_shield
	}

	resources = {
		category = ship_components
		cost = {
			alloys = @critter_cost_value
		}
	}
}

# Small Projectile
weapon_component_template = {
	key = "SMALL_SCOURGE_PROJECTILE_WEAPON"
	hidden = yes

	size = small
	entity = "small_scourge_projectile_weapon_entity"
	type = instant
	icon = "GFX_ship_part_scourge_missile_1"
	icon_frame = 1
	projectile_gfx = "small_scourge_projectile_weapon"
	tags = {
		weapon_type_kinetic
		weapon_swarm
		weapon_type_space_fauna
	}
	ai_tags = {
		weapon_role_anti_shield
	}

	resources = {
		category = ship_components
		cost = {
			alloys = @critter_cost_value
		}
	}
}

### Strike Craft

# Standard Swarm Fighter
strike_craft_component_template = {
	key = "SWARM_STRIKE_CRAFT"
	size = LARGE
	entity = "swarm_01_fighter_entity"
	resources = {
		category = ship_components
		cost = {
			alloys = 100
		}
	}

	power = -80

	count = 10
	regeneration_per_day = @regen
	launch_time = 1.0

	damage = { min = 8 max = 12 }
	cooldown = 2
	range = 10
	engagement_range = 120
	accuracy = 1.0
	tracking = 0.8

	health = 40
	armor = 20
	shield = 0
	evasion = 0.80

	speed = 400
	rotation_speed = 0.5
	acceleration = 0.5

	shield_damage = 1.0
	shield_penetration = 1
	armor_penetration = 0.66

	ship_behavior = "bombers_behavior"

	weapon_type = instant # Not PD, unlike normal strike craft
	projectile_gfx = "small_space_amoeba_weapon"

	prerequisites = { "tech_swarm_strike_craft_1" }
	component_set = "SWARM_STRIKE_CRAFT_1"
	icon = "GFX_ship_part_swarm_strike_craft_1"
	icon_frame = 1
	tags = {
		weapon_type_strike_craft
		weapon_swarm
		weapon_type_space_fauna
	}
}
