############################################################
##           ESC : Gravitic Weapons : Space Fauna         ##
############################################################

# - Gravitational Anomaly Projector		S/M/L/X
# - Microsingularity Cannon				S/M/L/X
# - Spatial Distortion Warhead			S/M/L/X
# - Microsingularity Warhead			S/M/L/X
# - Singulatiry Bombers					S/M/L/X

############################################################
##             Gravitational Anomaly Projector            ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_GRAVITY_CANNON_CREATURE_1
	size = small
	icon = GFX_esc_bio_gravitic_cannon_1
	icon_frame = 1
	type = instant

	damage = { min = 34 max = 66 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_gravity_cannon_1" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_1
	projectile_gfx = "esc_gravity_cannon_small"
	upgrades_to = SMALL_ESC_GRAVITY_CANNON_CREATURE_2
	tags = { weapon_type_energy s_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield gunship brawler }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_GRAVITY_CANNON_CREATURE_1
	size = medium
	icon = GFX_esc_bio_gravitic_cannon_1
	icon_frame = 1
	type = instant

	damage = { min = 68 max = 138 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.25

	prerequisites = { "esc_tech_gravity_cannon_1" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_1
	projectile_gfx = "esc_gravity_cannon_medium"
	upgrades_to = MEDIUM_ESC_GRAVITY_CANNON_CREATURE_2
	tags = { weapon_type_energy m_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield gunship brawler }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_GRAVITY_CANNON_CREATURE_1
	size = large
	icon = GFX_esc_bio_gravitic_cannon_1
	icon_frame = 1
	type = instant

	damage = { min = 182 max = 358 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_gravity_cannon_1" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_1
	projectile_gfx = "esc_gravity_cannon_large"
	upgrades_to = LARGE_ESC_GRAVITY_CANNON_CREATURE_2
	tags = { weapon_type_energy l_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield artillery }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# extra-large
weapon_component_template = {
	key = XL_ESC_GRAVITY_CANNON_CREATURE_1
	size = extra_large
	icon = GFX_esc_bio_gravitic_cannon_1
	icon_frame = 1
	type = instant

	damage = { min = 364 max = 716 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_4
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = xl
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_gravity_cannon_1" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_1
	projectile_gfx = "esc_gravity_cannon_large"
	upgrades_to = XL_ESC_GRAVITY_CANNON_CREATURE_2
	tags = { weapon_type_energy x_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield artillery }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

############################################################
##                Microsingularity Cannon                 ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_GRAVITY_CANNON_CREATURE_2
	size = small
	icon = GFX_esc_bio_gravitic_cannon_2
	icon_frame = 1
	type = instant

	damage = { min = 48 max = 88 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_gravity_cannon_2" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_2
	projectile_gfx = "esc_gravity_cannon_small"
	tags = { weapon_type_energy s_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield gunship brawler }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_GRAVITY_CANNON_CREATURE_2
	size = medium
	icon = GFX_esc_bio_gravitic_cannon_2
	icon_frame = 1
	type = instant

	damage = { min = 106 max = 242 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.25

	prerequisites = { "esc_tech_gravity_cannon_2" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_2
	projectile_gfx = "esc_gravity_cannon_medium"
	tags = { weapon_type_energy m_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield gunship brawler }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_GRAVITY_CANNON_CREATURE_2
	size = large
	icon = GFX_esc_bio_gravitic_cannon_2
	icon_frame = 1
	type = instant

	damage = { min = 256 max = 488 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_gravity_cannon_2" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_2
	projectile_gfx = "esc_gravity_cannon_large"
	tags = { weapon_type_energy l_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield artillery }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# extra-large
weapon_component_template = {
	key = XL_ESC_GRAVITY_CANNON_CREATURE_2
	size = extra_large
	icon = GFX_esc_bio_gravitic_cannon_2
	icon_frame = 1
	type = instant

	damage = { min = 512 max = 976 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_4
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = xl
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_gravity_cannon_2" }
	component_set = ESC_GRAVITY_CANNON_CREATURE_2
	projectile_gfx = "esc_gravity_cannon_large"
	tags = { weapon_type_energy x_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield artillery }

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

############################################################
##               Spatial Distortion Warhead               ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_GRAVITY_TORPS_CREATURE_1
	size = small
	icon = GFX_esc_bio_gravitic_torpedo_1
	icon_frame = 1
	type = missile

	damage = { min = 30 max = 45 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 15
	missile_armor = 10
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_1" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_1
	projectile_gfx = "esc_gravitic_torpedoes"
	upgrades_to = SMALL_ESC_GRAVITY_TORPS_CREATURE_2
	tags = { weapon_type_explosive weapon_type_energy s_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_GRAVITY_TORPS_CREATURE_1
	size = medium
	icon = GFX_esc_bio_gravitic_torpedo_1
	icon_frame = 1
	type = missile

	damage = { min = 60 max = 85 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 15
	missile_armor = 10
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_1" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_1
	projectile_gfx = "esc_gravitic_torpedoes"
	upgrades_to = MEDIUM_ESC_GRAVITY_TORPS_CREATURE_2
	tags = { weapon_type_explosive weapon_type_energy m_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_GRAVITY_TORPS_CREATURE_1
	size = large
	icon = GFX_esc_bio_gravitic_torpedo_1
	icon_frame = 1
	type = missile

	damage = { min = 115 max = 155 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 15
	missile_armor = 10
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_1" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_1
	projectile_gfx = "esc_gravitic_torpedoes"
	upgrades_to = LARGE_ESC_GRAVITY_TORPS_CREATURE_2
	tags = { weapon_type_explosive weapon_type_energy l_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# extra-large
weapon_component_template = {
	key = XL_ESC_GRAVITY_TORPS_CREATURE_1
	size = extra_large
	icon = GFX_esc_bio_gravitic_torpedo_1
	icon_frame = 1
	type = missile

	damage = { min = 325 max = 315 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_3
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 15
	missile_armor = 10
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = xl
		TIER = 6
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_1" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_1
	projectile_gfx = "esc_gravitic_torpedoes"
	upgrades_to = XL_ESC_GRAVITY_TORPS_CREATURE_2
	tags = { weapon_type_explosive weapon_type_energy x_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

############################################################
##                Microsingularity  Warhead               ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_GRAVITY_TORPS_CREATURE_2
	size = small
	icon = GFX_esc_bio_gravitic_torpedo_2
	icon_frame = 1
	type = missile

	damage = { min = 40 max = 60 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 18
	missile_armor = 12
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_2" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_2
	projectile_gfx = "esc_gravitic_torpedoes"
	tags = { weapon_type_explosive weapon_type_energy s_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_GRAVITY_TORPS_CREATURE_2
	size = medium
	icon = GFX_esc_bio_gravitic_torpedo_2
	icon_frame = 1
	type = missile

	damage = { min = 75 max = 115 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 18
	missile_armor = 12
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_2" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_2
	projectile_gfx = "esc_gravitic_torpedoes"
	tags = { weapon_type_explosive weapon_type_energy m_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_GRAVITY_TORPS_CREATURE_2
	size = large
	icon = GFX_esc_bio_gravitic_torpedo_2
	icon_frame = 1
	type = missile

	damage = { min = 150 max = 215 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 18
	missile_armor = 12
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_2" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_2
	projectile_gfx = "esc_gravitic_torpedoes"
	tags = { weapon_type_explosive weapon_type_energy l_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# extra-large
weapon_component_template = {
	key = XL_ESC_GRAVITY_TORPS_CREATURE_2
	size = extra_large
	icon = GFX_esc_bio_gravitic_torpedo_2
	icon_frame = 1
	type = missile

	damage = { min = 300 max = 435 }
	size_damage_factor = 0.2
	windup = { min = 5 max = 10 }
	total_fire_time = 100
	range = @ESC_WEAPON_RANGE_S_3
	accuracy = 1.0
	missile_speed = @ESC_MISSILE_SPEED_2
	missile_evasion = 0.1
	missile_health = 18
	missile_armor = 12
	missile_shield = 0
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = xl
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_gravitic_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_gravity_torpedo_2" }
	component_set = ESC_GRAVITY_TORPS_CREATURE_2
	projectile_gfx = "esc_gravitic_torpedoes"
	tags = { weapon_type_explosive weapon_type_energy x_slot weapon_type_space_fauna }
	ai_tags = { weapon_role_anti_shield weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

	inline_script = {
		script = weapon_effects/esc_evasion_debuff
		EFFECT_LEVEL = 1
	}

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

############################################################
##                   Singularity Bombers                  ##
############################################################

# small
strike_craft_component_template = {
	key = SMALL_ESC_GRAVITY_BOMBERS_CREATURE
	size = small
	entity = "space_amoeba_small_entity"
	icon = GFX_esc_bio_gravitic_strikecraft
	icon_frame = 1

	weapon_type = point_defence
	projectile_gfx = "esc_gravity_cannon_tiny"

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	count = 2 # @ESC_STRIKECRAFT_count_small
	regeneration_per_day = @ESC_STRIKECRAFT_regen
	launch_time = @ESC_STRIKECRAFT_launch_time

	damage = { min = 20 max = 30 }
	cooldown = 2.0
	range = @ESC_STRIKECRAFT_attack_range_bomber
	engagement_range = @ESC_STRIKECRAFT_engagement_range
	accuracy = @ESC_STRIKECRAFT_accuracy
	tracking = @ESC_STRIKECRAFT_tracking_bomber

	health = 30
	armor = 10
	shield = 50

	speed = @ESC_STRIKECRAFT_speed_5
	rotation_speed = @ESC_STRIKECRAFT_rot_speed_bomber
	acceleration = @ESC_STRIKECRAFT_acceleration_bomber
	evasion = @ESC_STRIKECRAFT_evasion

	hull_damage = @ESC_WEAPON_gravitic_bombers_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_bombers_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_bombers_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_bombers_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_bombers_shield_damage

	ship_behavior = "bombers_behavior"
	component_set = ESC_GRAVITY_BOMBERS_CREATURE
	prerequisites = { "esc_tech_gravity_bombers" }
	tags = { weapon_type_strike_craft carrier s_slot weapon_type_space_fauna }
	ai_tags = { carrier weapon_role_anti_hull }

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# medium
strike_craft_component_template = {
	key = MEDIUM_ESC_GRAVITY_BOMBERS_CREATURE
	size = medium
	entity = "space_amoeba_small_entity"
	icon = GFX_esc_bio_gravitic_strikecraft
	icon_frame = 1

	weapon_type = point_defence
	projectile_gfx = "esc_gravity_cannon_tiny"

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	count = 4 # @ESC_STRIKECRAFT_count_medium
	regeneration_per_day = @ESC_STRIKECRAFT_regen
	launch_time = @ESC_STRIKECRAFT_launch_time

	damage = { min = 20 max = 30 }
	cooldown = 2.0
	range = @ESC_STRIKECRAFT_attack_range_bomber
	engagement_range = @ESC_STRIKECRAFT_engagement_range
	accuracy = @ESC_STRIKECRAFT_accuracy
	tracking = @ESC_STRIKECRAFT_tracking_bomber

	health = 30
	armor = 10
	shield = 50

	speed = @ESC_STRIKECRAFT_speed_5
	rotation_speed = @ESC_STRIKECRAFT_rot_speed_bomber
	acceleration = @ESC_STRIKECRAFT_acceleration_bomber
	evasion = @ESC_STRIKECRAFT_evasion

	hull_damage = @ESC_WEAPON_gravitic_bombers_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_bombers_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_bombers_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_bombers_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_bombers_shield_damage

	ship_behavior = "bombers_behavior"
	component_set = ESC_GRAVITY_BOMBERS_CREATURE
	prerequisites = { "esc_tech_gravity_bombers" }
	tags = { weapon_type_strike_craft carrier m_slot weapon_type_space_fauna }
	ai_tags = { carrier weapon_role_anti_hull }

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# large
strike_craft_component_template = {
	key = LARGE_ESC_GRAVITY_BOMBERS_CREATURE
	size = large
	entity = "space_amoeba_small_entity"
	icon = GFX_esc_bio_gravitic_strikecraft
	icon_frame = 1

	weapon_type = point_defence
	projectile_gfx = "esc_gravity_cannon_tiny"

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	count = @ESC_STRIKECRAFT_count_large
	regeneration_per_day = @ESC_STRIKECRAFT_regen
	launch_time = @ESC_STRIKECRAFT_launch_time

	damage = { min = 20 max = 30 }
	cooldown = 2.0
	range = @ESC_STRIKECRAFT_attack_range_bomber
	engagement_range = @ESC_STRIKECRAFT_engagement_range
	accuracy = @ESC_STRIKECRAFT_accuracy
	tracking = @ESC_STRIKECRAFT_tracking_bomber

	health = 30
	armor = 10
	shield = 50

	speed = @ESC_STRIKECRAFT_speed_5
	rotation_speed = @ESC_STRIKECRAFT_rot_speed_bomber
	acceleration = @ESC_STRIKECRAFT_acceleration_bomber
	evasion = @ESC_STRIKECRAFT_evasion

	hull_damage = @ESC_WEAPON_gravitic_bombers_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_bombers_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_bombers_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_bombers_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_bombers_shield_damage

	ship_behavior = "bombers_behavior"
	component_set = ESC_GRAVITY_BOMBERS_CREATURE
	prerequisites = { "esc_tech_gravity_bombers" }
	tags = { weapon_type_strike_craft carrier l_slot weapon_type_space_fauna }
	ai_tags = { carrier weapon_role_anti_hull }

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# extra-large
strike_craft_component_template = {
	key = XL_ESC_GRAVITY_BOMBERS_CREATURE
	size = extra_large
	entity = "space_amoeba_small_entity"
	icon = GFX_esc_bio_gravitic_strikecraft
	icon_frame = 1

	weapon_type = point_defence
	projectile_gfx = "esc_gravity_cannon_tiny"

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = xl
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	count = 16 # @ESC_STRIKECRAFT_count_xl
	regeneration_per_day = @ESC_STRIKECRAFT_regen
	launch_time = @ESC_STRIKECRAFT_launch_time

	damage = { min = 20 max = 30 }
	cooldown = 2.0
	range = @ESC_STRIKECRAFT_attack_range_bomber
	engagement_range = @ESC_STRIKECRAFT_engagement_range
	accuracy = @ESC_STRIKECRAFT_accuracy
	tracking = @ESC_STRIKECRAFT_tracking_bomber

	health = 30
	armor = 10
	shield = 50

	speed = @ESC_STRIKECRAFT_speed_5
	rotation_speed = @ESC_STRIKECRAFT_rot_speed_bomber
	acceleration = @ESC_STRIKECRAFT_acceleration_bomber
	evasion = @ESC_STRIKECRAFT_evasion

	hull_damage = @ESC_WEAPON_gravitic_bombers_hull_damage
	armor_penetration = @ESC_WEAPON_gravitic_bombers_armor_penetration
	armor_damage = @ESC_WEAPON_gravitic_bombers_armor_damage
	shield_penetration = @ESC_WEAPON_gravitic_bombers_shield_penetration
	shield_damage = @ESC_WEAPON_gravitic_bombers_shield_damage

	ship_behavior = "bombers_behavior"
	component_set = ESC_GRAVITY_BOMBERS_CREATURE
	prerequisites = { "esc_tech_gravity_bombers" }
	tags = { weapon_type_strike_craft carrier x_slot weapon_type_space_fauna }
	ai_tags = { carrier weapon_role_anti_hull }

	# only regular empires and materialist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_materialist_fe = yes
	}

	ai_weight = {
		weight = 1
		### AI shouldn't use this component if it can't afford at least some upgrades right away
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}
