@attack_range = 2 #10
@engagement_range = 20 #100
@launch_time = 3.5 #2
@rotationspeed = 0.12
@accelerationspeed = 0.2
@count = 8
@regen = 0.5

# ####################
# Critter Weapons - Space Amoeba
# ####################

@critter_cost_value = 35


### Standard Amoeba Weapon

weapon_component_template = {
	key = "LARGE_SPACE_AMOEBA_WEAPON"

	size = large
	type = instant
	icon = "GFX_ship_part_space_whale_weapon_1"
	icon_frame = 1
	projectile_gfx = "space_amoeba_weapon"
	tags = { weapon_type_energy weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_armor }
	component_set = "SPACE_AMOEBA_WEAPON"
	potential = {
		OR = {
			is_ship_size = reanimated_space_amoeba_mother
			is_ship_size = reanimated_space_amoeba
			is_ship_size = reanimated_space_amoeba_centenarian
			is_ship_size = space_amoeba_mother
			is_ship_size = space_amoeba
			is_ship_size = space_amoeba_centenarian
		}
	}
	resources = {
		category = ship_components
		cost = {
			trigger = { is_design_space_fauna = no }
			alloys = @critter_cost_value
		}
		cost = {
			trigger = { is_design_space_fauna = yes }
			food = 304
			mult = @fauna_cost_scaling
		}
		upkeep = {
			trigger = { is_design_space_fauna = yes }
			energy = 0.48
			food = 0.46
		}
	}
}

weapon_component_template = {
	key = "SMALL_SPACE_AMOEBA_WEAPON"

	size = small
	type = instant
	icon = "GFX_ship_part_space_whale_weapon_1"
	icon_frame = 1
	projectile_gfx = "small_space_amoeba_weapon"
	tags = { weapon_type_energy weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_armor weapon_type_space_fauna }
	component_set = "SPACE_AMOEBA_WEAPON"
	potential = {
		OR = {
			is_ship_size = reanimated_space_amoeba_mother
			is_ship_size = reanimated_space_amoeba
			is_ship_size = reanimated_space_amoeba_centenarian
			is_ship_size = space_amoeba_mother
			is_ship_size = space_amoeba
			is_ship_size = space_amoeba_centenarian
		}
	}
	resources = {
		category = ship_components
		cost = {
			trigger = { is_design_space_fauna = no }
			alloys = @critter_cost_value
		}
		cost = {
			trigger = { is_design_space_fauna = yes }
			food = 76
			mult = @fauna_cost_scaling
		}
		upkeep = {
			trigger = { is_design_space_fauna = yes }
			energy = 0.12
			food = 0.11
		}
	}
}

### Strike Craft

strike_craft_component_template = {
	key = "AMOEBA_STRIKE_CRAFT"

	size = LARGE
	entity = "space_amoeba_small_entity"
	power = -30
	resources = {
		category = ship_components
		cost = {
			trigger = { is_design_space_fauna = no }
			alloys = 60
		}
		cost = {
			trigger = { is_design_space_fauna = yes }
			food = 352
			mult = @fauna_cost_scaling
		}
		upkeep = {
			trigger = { is_design_space_fauna = yes }
			energy = 0.55
			food = 0.53
		}
	}

	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time

	damage = { min = 20 max = 30 }
	cooldown = 5
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 0.70
	tracking = 0.50

	health = 20
	armor = 0
	shield = 0
	evasion = 0.50

	speed = 500
	rotation_speed = @rotationspeed
	acceleration = @accelerationspeed

	shield_damage = 1.0
	shield_penetration = 1
	armor_damage = 1.5

	ship_behavior = "bombers_behavior"

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

	component_set = "AMOEBA_STRIKE_CRAFT_1"
	prerequisites = { "tech_amoeba_strike_craft_1" }

	icon = "GFX_ship_part_amoeba_strike_craft_1"
	icon_frame = 1
	tags = { weapon_type_strike_craft weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield }
}

strike_craft_component_template = {
	key = "AMOEBA_STRIKE_CRAFT_BIO"

	size = LARGE
	entity = "space_amoeba_small_entity"
	power = 0
	resources = {
		category = ship_components
		cost = {
			trigger = { is_design_space_fauna = no }
			alloys = 60
		}
		cost = {
			trigger = { is_design_space_fauna = yes }
			food = 352
			mult = @fauna_cost_scaling
		}
		upkeep = {
			trigger = { is_design_space_fauna = yes }
			energy = 0.55
			food = 0.53
		}
	}

	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time

	damage = { min = 20 max = 30 }
	cooldown = 5
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 0.70
	tracking = 0.50

	health = 20
	armor = 0
	shield = 0
	evasion = 0.50

	speed = 500
	rotation_speed = @rotationspeed
	acceleration = @accelerationspeed

	shield_damage = 1.0
	shield_penetration = 1
	armor_damage = 1.5

	ship_behavior = "bombers_behavior"

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

	component_set = "AMOEBA_STRIKE_CRAFT_1_BIO"

	icon = "GFX_ship_part_amoeba_strike_craft_1"
	icon_frame = 1
	tags = { weapon_type_strike_craft weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield }
}
