############################################################
##                 ESC : Psionic Weapons                  ##
############################################################

# - Psionic Energy Projector			S/M/L
# - Psionic Beam Cannon					S/M/L
# - Shroud Strike						S/M/L
# - Shroud Wrath						S/M/L
# - Psi-blast Torpedo					G
# - Improved Psi-blast Torpedo			G
# - Psionic Lance						X
# - Shroud Piercer						X
# - Void Ray							Titanic
# - Psionic Interceptors				H
# - Psionic Blast (Shroud Avatar)		M
# - Psionic Catastrophe					Titanic
# - Focused Psionic Dusruptors			S/M
# - Shroud-Empowered Disruptors			S/M
# - Focused Psionic Lightning			L
# - Shroud Lightning					L

############################################################
##                Psionic Energy Projector                ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PSIONIC_CANNON_1
	size = small
	icon = GFX_esc_psionic_cannon_1
	icon_frame = 1
	type = instant

	damage = { min = 25 max = 70 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.85
	power = -20

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

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_cannon_1" }
	component_set = ESC_PSIONIC_CANNON_1
	projectile_gfx = "esc_psionic_cannon_small"
	upgrades_to = SMALL_ESC_PSIONIC_CANNON_2
	tags = { weapon_type_energy weapon_type_psionic s_slot }
	ai_tags = { weapon_role_anti_armor brawler gunship }

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

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PSIONIC_CANNON_1
	size = medium
	icon = GFX_esc_psionic_cannon_1
	icon_frame = 1
	type = instant

	damage = { min = 60 max = 130 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85
	power = -34

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

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_cannon_1" }
	component_set = ESC_PSIONIC_CANNON_1
	projectile_gfx = "esc_psionic_cannon_medium"
	upgrades_to = MEDIUM_ESC_PSIONIC_CANNON_2
	tags = { weapon_type_energy weapon_type_psionic m_slot }
	ai_tags = { weapon_role_anti_armor brawler gunship }

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

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_PSIONIC_CANNON_1
	size = large
	icon = GFX_esc_psionic_cannon_1
	icon_frame = 1
	type = instant

	damage = { min = 160 max = 330 }
	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
	power = -64

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

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.1

	prerequisites = { "esc_tech_psionic_cannon_1" }
	component_set = ESC_PSIONIC_CANNON_1
	projectile_gfx = "esc_psionic_cannon_large"
	upgrades_to = LARGE_ESC_PSIONIC_CANNON_2
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_armor artillery }

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

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##                   Psionic Beam Cannon                  ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PSIONIC_CANNON_2
	size = small
	icon = GFX_esc_psionic_cannon_2
	icon_frame = 1
	type = instant

	damage = { min = 35 max = 90 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.85
	power = -20

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_cannon_2" }
	component_set = ESC_PSIONIC_CANNON_2
	projectile_gfx = "esc_psionic_cannon_small"
	tags = { weapon_type_energy weapon_type_psionic s_slot }
	ai_tags = { weapon_role_anti_armor brawler gunship }

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

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PSIONIC_CANNON_2
	size = medium
	icon = GFX_esc_psionic_cannon_2
	icon_frame = 1
	type = instant

	damage = { min = 95 max = 220 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85
	power = -34

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_cannon_2" }
	component_set = ESC_PSIONIC_CANNON_2
	projectile_gfx = "esc_psionic_cannon_medium"
	tags = { weapon_type_energy weapon_type_psionic m_slot }
	ai_tags = { weapon_role_anti_armor brawler gunship }

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

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_PSIONIC_CANNON_2
	size = large
	icon = GFX_esc_psionic_cannon_2
	icon_frame = 1
	type = instant

	damage = { min = 230 max = 450 }
	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
	power = -64

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.1

	prerequisites = { "esc_tech_psionic_cannon_2" }
	component_set = ESC_PSIONIC_CANNON_2
	projectile_gfx = "esc_psionic_cannon_large"
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_armor artillery }

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

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##                      Shroud Strike                     ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PSIONIC_STRIKE_1
	size = small
	icon = GFX_esc_psionic_strike_1
	icon_frame = 1
	type = instant

	damage = { min = 15 max = 35 }
	windup = { min = 3 max = 12 }
	total_fire_time = 20
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.85
	power = -20

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

	hull_damage = @ESC_WEAPON_psionic_strike_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_strike_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strike_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_strike_1" }
	component_set = ESC_PSIONIC_STRIKE_1
	projectile_gfx = "esc_psionic_strike_small"
	upgrades_to = SMALL_ESC_PSIONIC_STRIKE_2
	tags = { weapon_type_energy weapon_type_psionic s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth gunship }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PSIONIC_STRIKE_1
	size = medium
	icon = GFX_esc_psionic_strike_1
	icon_frame = 1
	type = instant

	damage = { min = 30 max = 65 }
	windup = { min = 4 max = 15 }
	total_fire_time = 22
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85
	power = -34

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

	hull_damage = @ESC_WEAPON_psionic_strike_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_strike_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strike_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_strike_1" }
	component_set = ESC_PSIONIC_STRIKE_1
	projectile_gfx = "esc_psionic_strike_medium"
	upgrades_to = MEDIUM_ESC_PSIONIC_STRIKE_2
	tags = { weapon_type_energy weapon_type_psionic m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth gunship }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_PSIONIC_STRIKE_1
	size = large
	icon = GFX_esc_psionic_strike_1
	icon_frame = 1
	type = instant

	damage = { min = 80 max = 140 }
	windup = { min = 5 max = 17 }
	total_fire_time = 25
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_3
	accuracy = 0.85
	power = -64

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

	hull_damage = @ESC_WEAPON_psionic_strike_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_strike_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strike_shield_damage
	tracking = 0.1

	prerequisites = { "esc_tech_psionic_strike_1" }
	component_set = ESC_PSIONIC_STRIKE_1
	projectile_gfx = "esc_psionic_strike_large"
	upgrades_to = LARGE_ESC_PSIONIC_STRIKE_2
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_hull artillery artillery_stealth }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##                      Shroud Wrath                      ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PSIONIC_STRIKE_2
	size = small
	icon = GFX_esc_psionic_strike_2
	icon_frame = 1
	type = instant

	damage = { min = 20 max = 50 }
	windup = { min = 3 max = 12 }
	total_fire_time = 20
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.85
	power = -24

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_strike_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_strike_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strike_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_strike_2" }
	component_set = ESC_PSIONIC_STRIKE_2
	projectile_gfx = "esc_psionic_strike_small"
	tags = { weapon_type_energy weapon_type_psionic s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth gunship }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PSIONIC_STRIKE_2
	size = medium
	icon = GFX_esc_psionic_strike_2
	icon_frame = 1
	type = instant

	damage = { min = 45 max = 90 }
	windup = { min = 4 max = 15 }
	total_fire_time = 22
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85
	power = -46

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_strike_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_strike_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strike_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_strike_2" }
	component_set = ESC_PSIONIC_STRIKE_2
	projectile_gfx = "esc_psionic_strike_medium"
	tags = { weapon_type_energy weapon_type_psionic m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth gunship }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_PSIONIC_STRIKE_2
	size = large
	icon = GFX_esc_psionic_strike_2
	icon_frame = 1
	type = instant

	damage = { min = 100 max = 200 }
	windup = { min = 5 max = 17 }
	total_fire_time = 25
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_3
	accuracy = 0.85
	power = -90

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_strike_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_strike_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strike_shield_damage
	tracking = 0.1

	prerequisites = { "esc_tech_psionic_strike_2" }
	component_set = ESC_PSIONIC_STRIKE_2
	projectile_gfx = "esc_psionic_strike_large"
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_hull artillery artillery_stealth }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##                   Psi-blast Torpedo                    ##
############################################################

weapon_component_template = {
	key = ESC_PSIONIC_TORPEDO_1
	size = torpedo
	icon = GFX_esc_psionic_torpedo_1
	icon_frame = 1
	type = missile

	damage = { min = 50 max = 100 }
	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_3
	missile_evasion = 0.1
	missile_health = 30
	missile_armor = 0
	missile_shield = 25
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0
	power = -70

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

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_torpedo_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_torpedo_1" }
	component_set = ESC_PSIONIC_TORPEDO_1
	projectile_gfx = "esc_psionic_torpedo"
	upgrades_to = ESC_PSIONIC_TORPEDO_2
	tags = { weapon_type_energy weapon_type_psionic g_slot }
	ai_tags = { weapon_role_anti_armor energy_torpedoes energy_torpedoes_stealth artillery artillery_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

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

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PSIONIC_TORPEDO_1
	size = torpedo
	icon = GFX_esc_bio_psionic_torpedo_1
	icon_frame = 1
	type = missile

	damage = { min = 50 max = 100 }
	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_3
	missile_evasion = 0.1
	missile_health = 30
	missile_armor = 0
	missile_shield = 25
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0
	power = -70

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

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_torpedo_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_torpedo_1" }
	component_set = ESC_BIO_PSIONIC_TORPEDO_1
	projectile_gfx = "esc_psionic_torpedo"
	upgrades_to = ESC_BIO_PSIONIC_TORPEDO_2
	tags = { weapon_type_energy weapon_type_psionic g_slot }
	ai_tags = { weapon_role_anti_armor energy_torpedoes energy_torpedoes_stealth artillery artillery_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

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

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships_conditional
		EXTRA_CONDITION = "ship_uses_mauler_components"
		EXTRA_CONDITION_VALUE = no
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##               Improved Psi-blast Torpedo               ##
############################################################

weapon_component_template = {
	key = ESC_PSIONIC_TORPEDO_2
	size = torpedo
	icon = GFX_esc_psionic_torpedo_2
	icon_frame = 1
	type = missile

	damage = { min = 65 max = 125 }
	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_3
	missile_evasion = 0.1
	missile_health = 30
	missile_armor = 0
	missile_shield = 25
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0
	power = -80

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_torpedo_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_torpedo_2" }
	component_set = ESC_PSIONIC_TORPEDO_2
	projectile_gfx = "esc_psionic_torpedo"
	tags = { weapon_type_energy weapon_type_psionic g_slot }
	ai_tags = { weapon_role_anti_armor energy_torpedoes energy_torpedoes_stealth artillery artillery_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

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

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PSIONIC_TORPEDO_2
	size = torpedo
	icon = GFX_esc_bio_psionic_torpedo_2
	icon_frame = 1
	type = missile

	damage = { min = 65 max = 125 }
	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_3
	missile_evasion = 0.1
	missile_health = 30
	missile_armor = 0
	missile_shield = 25
	missile_retarget_range = @ESC_WEAPON_RANGE_G_2
	firing_arc = 25.0
	power = -80

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_torpedo_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_torpedo_2" }
	component_set = ESC_BIO_PSIONIC_TORPEDO_2
	projectile_gfx = "esc_psionic_torpedo"
	tags = { weapon_type_energy weapon_type_psionic g_slot }
	ai_tags = { weapon_role_anti_armor energy_torpedoes energy_torpedoes_stealth artillery artillery_stealth }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_missiles_special

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

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships_conditional
		EXTRA_CONDITION = "ship_uses_mauler_components"
		EXTRA_CONDITION_VALUE = no
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##                     Psionic Lance                      ##
############################################################

weapon_component_template = {
	key = ESC_PSIONIC_LANCE_1
	size = extra_large
	icon = GFX_esc_psionic_lance_1
	icon_frame = 1
	type = instant

	damage = { min = 1000 max = 2500 }
	windup = { min = 12 max = 47 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_3
	accuracy = 0.85
	power = -275

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

	hull_damage = @ESC_WEAPON_psionic_lance_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_psionic_lance_1" }
	component_set = ESC_PSIONIC_LANCE_1
	projectile_gfx = "esc_psionic_lance"
	upgrades_to = ESC_PSIONIC_LANCE_2
	tags = { weapon_type_energy weapon_type_psionic x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_fe = yes
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 2
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	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_zro }
		}
	}
}

############################################################
##                    Shroud Piercer                      ##
############################################################

weapon_component_template = {
	key = ESC_PSIONIC_LANCE_2
	size = extra_large
	icon = GFX_esc_psionic_lance_2
	icon_frame = 1
	type = instant

	damage = { min = 1200 max = 2800 }
	windup = { min = 12 max = 47 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_3
	accuracy = 0.85
	power = -325

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = xl
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_lance_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_psionic_lance_2" }
	component_set = ESC_PSIONIC_LANCE_2
	projectile_gfx = "esc_psionic_lance"
	upgrades_to = ESC_PSIONIC_LANCE_JUGGERNAUT
	tags = { weapon_type_energy weapon_type_psionic x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_fe = yes
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 2
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	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_zro }
		}
	}
}

############################################################
##                        Void Ray                        ##
############################################################

# titan
weapon_component_template = {
	key = ESC_PSIONIC_LANCE_TITANIC
	size = titanic
	icon = GFX_esc_psionic_lance_3
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 5000
		MAX_DAMAGE = 9000
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_t
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 30 max = 100 }
	total_fire_time = 170
	range = @ESC_WEAPON_RANGE_T_3
	accuracy = 0.85
	power = -500

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = t
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_lance_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_psionic_lance_titanic" }
	component_set = ESC_PSIONIC_LANCE_TITANIC
	projectile_gfx = "esc_psionic_lance"
	tags = { weapon_type_energy weapon_type_psionic t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_fe = yes
	}

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard
		ARKSHIP_WEAPON = no
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 2
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	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_zro }
		}
	}
}

# juggernaut
weapon_component_template = {
	key = ESC_PSIONIC_LANCE_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_psionic_lance_3
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 5000
		MAX_DAMAGE = 9000
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_t
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 30 max = 100 }
	total_fire_time = 170
	range = @ESC_WEAPON_RANGE_J_3
	accuracy = 0.85
	power = -500

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = t
		TIER = 7
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_lance_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_psionic_lance_titanic" }
	component_set = ESC_PSIONIC_LANCE_JUGGERNAUT
	projectile_gfx = "esc_psionic_lance"
	tags = { weapon_type_energy weapon_type_psionic x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	potential = {
		ESC_ship_uses_juggernaut_components = yes
	}

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_fe = yes
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 2
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	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_zro }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_PSIONIC_LANCE_ARKSHIP
	size = titanic
	icon = GFX_esc_psionic_lance_3
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 7000
		MAX_DAMAGE = 15000
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_t
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 30 max = 100 }
	total_fire_time = 170
	range = @ESC_WEAPON_RANGE_ARKSHIP_4
	accuracy = 0.85
	power = 0

	resources = {
		category = ship_components
		upkeep = {
			alloys = @titanic_t7_upkeep_alloys
			energy = @titanic_t7_upkeep_energy
		}
	}

	hull_damage = @ESC_WEAPON_psionic_lance_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_psionic_lance_titanic" }
	component_set = ESC_PSIONIC_LANCE_ARKSHIP
	projectile_gfx = "esc_psionic_lance"
	tags = { weapon_type_energy weapon_type_psionic t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = weapon_effects/esc_accuracy_debuff
		EFFECT_LEVEL = 2
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_fe = yes
	}

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard
		ARKSHIP_WEAPON = yes
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 2
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 1
	}
}

############################################################
##                  Psionic Interceptors                  ##
############################################################

strike_craft_component_template = {
	key = ESC_PSIONIC_INTERCEPTORS
	size = LARGE
	entity = "fighter_entity"
	icon = GFX_esc_psionic_strikecraft
	icon_frame = 1

	weapon_type = point_defence
	projectile_gfx = "esc_psionic_cannon_tiny"
	power = -70

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

	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_fighter
	engagement_range = @ESC_STRIKECRAFT_engagement_range
	accuracy = @ESC_STRIKECRAFT_accuracy
	tracking = @ESC_STRIKECRAFT_tracking_fighter

	health = 30
	armor = 10
	shield = 50

	speed = @ESC_STRIKECRAFT_speed_5
	rotation_speed = @ESC_STRIKECRAFT_rot_speed_fighter
	acceleration = @ESC_STRIKECRAFT_acceleration_fighter
	evasion = @ESC_STRIKECRAFT_evasion

	hull_damage = @ESC_WEAPON_psionic_strikecraft_hull_damage
	armor_damage = @ESC_WEAPON_psionic_strikecraft_armor_damage
	armor_penetration = @ESC_WEAPON_psionic_strikecraft_armor_penetration
	shield_penetration = @ESC_WEAPON_psionic_strikecraft_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strikecraft_shield_damage

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	ship_behavior = "fighters_behavior"
	component_set = ESC_PSIONIC_INTERCEPTORS
	prerequisites = { "esc_tech_psionic_interceptors" }
	tags = { weapon_type_strike_craft }
	ai_tags = { weapon_role_point_defense carrier }
	point_defence_targets = { "strike_craft" }

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

strike_craft_component_template = {
	key = ESC_BIO_PSIONIC_INTERCEPTORS
	size = LARGE
	entity = "space_amoeba_small_entity"
	icon = GFX_esc_bio_psionic_strikecraft
	icon_frame = 1

	weapon_type = point_defence
	projectile_gfx = "esc_psionic_cannon_tiny"
	power = -70

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

	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_fighter
	engagement_range = @ESC_STRIKECRAFT_engagement_range
	accuracy = @ESC_STRIKECRAFT_accuracy
	tracking = @ESC_STRIKECRAFT_tracking_fighter

	health = 30
	armor = 10
	shield = 50

	speed = @ESC_STRIKECRAFT_speed_5
	rotation_speed = @ESC_STRIKECRAFT_rot_speed_fighter
	acceleration = @ESC_STRIKECRAFT_acceleration_fighter
	evasion = @ESC_STRIKECRAFT_evasion

	hull_damage = @ESC_WEAPON_psionic_strikecraft_hull_damage
	armor_damage = @ESC_WEAPON_psionic_strikecraft_armor_damage
	armor_penetration = @ESC_WEAPON_psionic_strikecraft_armor_penetration
	shield_penetration = @ESC_WEAPON_psionic_strikecraft_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_strikecraft_shield_damage

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = yes
	}

	ship_behavior = "fighters_behavior"
	component_set = ESC_BIO_PSIONIC_INTERCEPTORS
	prerequisites = { "esc_tech_psionic_interceptors" }
	tags = { weapon_type_strike_craft }
	ai_tags = { weapon_role_point_defense carrier }
	point_defence_targets = { "strike_craft" }

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##            Psionic Blast (Shroud Avatar)               ##
############################################################

weapon_component_template = {
	key = ESC_PSIONIC_BLAST_AVATAR
	size = medium
	entity = "large_space_cloud_weapon_entity"
	icon = GFX_esc_shroud_avatar_cannon
	icon_frame = 1
	type = instant

	damage = { min = 400 max = 800 }
	windup = { min = 2 max = 25 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_M_5
	accuracy = 0.9
	power = 0

	resources = {
		category = ship_components
		cost = { energy = 10 }
	}

	hull_damage = @ESC_WEAPON_psionic_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_shield_damage
	tracking = 1.0

	component_set = ESC_PSIONIC_BLAST_AVATAR
	projectile_gfx = "esc_psionic_cannon_medium"
	tags = { weapon_type_energy weapon_type_psionic }
	ai_tags = { weapon_role_anti_armor }
	hidden = yes

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

############################################################
##                   Psionic Catastrophe                  ##
############################################################

# titan
weapon_component_template = {
	key = ESC_PSIONIC_SHOCKWAVE
	size = titanic
	icon = GFX_esc_psionic_catastrophe
	icon_frame = 1
	type = instant

	inline_script = { # shockwave damage with applied effect
		script = weapon_effects/esc_inlines_shockwave_damage_with_effect
		MIN_DAMAGE = 1000
		MAX_DAMAGE = 1250
		ATTACK_RANGE = @ESC_WEAPON_RANGE_M_2
		MODIFIER_TYPE = esc_psionic_weapons_accuracy_debuff_2
		MODIFIER_DURATION = 10
		EFFECT_TOOLTIP = esc_psionic_shockwave_tooltip
	}

	windup = { min = 10.0 max = 20.0 }
	total_fire_time = 60
	accuracy = 1.0
	power = -500

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = t
		TIER = 8
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_arc_emitter_hull_damage
	armor_penetration = @ESC_WEAPON_arc_emitter_armor_penetration
	armor_damage = @ESC_WEAPON_arc_emitter_armor_damage
	shield_penetration = @ESC_WEAPON_arc_emitter_shield_penetration
	shield_damage = @ESC_WEAPON_arc_emitter_shield_damage
	tracking = 1

	prerequisites = { "esc_tech_shockwave_psionic" }
	component_set = ESC_PSIONIC_SHOCKWAVE
	projectile_gfx = "esc_psionic_shockwave"
	tags = { weapon_type_energy weapon_type_psionic t_slot }
	ai_tags = { weapon_role_anti_hull weapon_role_anti_armor brawler }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_omnidirectional

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard
		ARKSHIP_WEAPON = no
	}

	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_zro }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_PSIONIC_SHOCKWAVE_ARKSHIP
	size = titanic
	icon = GFX_esc_psionic_catastrophe
	icon_frame = 1
	type = instant

	inline_script = { # shockwave damage with applied effect
		script = weapon_effects/esc_inlines_shockwave_damage_with_effect
		MIN_DAMAGE = 1000
		MAX_DAMAGE = 3500
		ATTACK_RANGE = @ESC_WEAPON_RANGE_ARKSHIP_1
		MODIFIER_TYPE = esc_psionic_weapons_accuracy_debuff_2
		MODIFIER_DURATION = 10
		EFFECT_TOOLTIP = esc_psionic_shockwave_tooltip
	}

	windup = { min = 10.0 max = 20.0 }
	total_fire_time = 60
	accuracy = 1.0
	power = 0

	resources = {
		category = ship_components
		upkeep = {
			alloys = @titanic_t7_upkeep_alloys
			energy = @titanic_t7_upkeep_energy
		}
	}

	hull_damage = @ESC_WEAPON_arc_emitter_hull_damage
	armor_penetration = @ESC_WEAPON_arc_emitter_armor_penetration
	armor_damage = @ESC_WEAPON_arc_emitter_armor_damage
	shield_penetration = @ESC_WEAPON_arc_emitter_shield_penetration
	shield_damage = @ESC_WEAPON_arc_emitter_shield_damage
	tracking = 1

	prerequisites = { "esc_tech_shockwave_psionic" }
	component_set = ESC_PSIONIC_SHOCKWAVE_ARKSHIP
	projectile_gfx = "esc_psionic_shockwave"
	tags = { weapon_type_energy weapon_type_psionic t_slot }
	ai_tags = { weapon_role_anti_hull weapon_role_anti_armor brawler }
	military_power_multiplier = @ESC_MILITARY_POWER_MULT_omnidirectional

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard
		ARKSHIP_WEAPON = yes
	}

	ai_weight = {
		weight = 1
	}
}

############################################################
##               Focused Psionic Disruptors               ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PSIONIC_DISRUPTORS_2
	size = small
	icon = GFX_esc_psionic_disruptors_2
	icon_frame = 1
	type = instant

	damage = { min = 5 max = 30 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 1
	power = -28

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_disruptor_2" }
	component_set = ESC_PSIONIC_DISRUPTORS_2
	projectile_gfx = "psionic_disruptor_small"
	tags = { weapon_type_energy weapon_type_psionic s_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }
	upgrades_to = SMALL_ESC_PSIONIC_DISRUPTORS_3

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_PSIONIC_DISRUPTORS_2
	size = small
	icon = GFX_esc_bio_psionic_disruptors_2
	icon_frame = 1
	type = instant

	damage = { min = 5 max = 30 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 1
	power = -28

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_disruptor_2" }
	component_set = ESC_BIO_PSIONIC_DISRUPTORS_2
	projectile_gfx = "psionic_disruptor_small"
	tags = { weapon_type_energy weapon_type_psionic s_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }
	upgrades_to = SMALL_ESC_BIO_PSIONIC_DISRUPTORS_3

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PSIONIC_DISRUPTORS_2
	size = medium
	icon = GFX_esc_psionic_disruptors_2
	icon_frame = 1
	type = instant

	damage = { min = 8 max = 85 }
	windup = { min = 4 max = 16 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 1
	power = -56

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_disruptor_2" }
	component_set = ESC_PSIONIC_DISRUPTORS_2
	projectile_gfx = "psionic_disruptor_medium"
	tags = { weapon_type_energy weapon_type_psionic s_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }
	upgrades_to = MEDIUM_ESC_PSIONIC_DISRUPTORS_3

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_PSIONIC_DISRUPTORS_2
	size = medium
	icon = GFX_esc_bio_psionic_disruptors_2
	icon_frame = 1
	type = instant

	damage = { min = 8 max = 85 }
	windup = { min = 4 max = 16 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 1
	power = -56

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_disruptor_2" }
	component_set = ESC_BIO_PSIONIC_DISRUPTORS_2
	projectile_gfx = "psionic_disruptor_medium"
	tags = { weapon_type_energy weapon_type_psionic m_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }
	upgrades_to = MEDIUM_ESC_BIO_PSIONIC_DISRUPTORS_3

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##              Shroud-Empowered Disruptors               ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PSIONIC_DISRUPTORS_3
	size = small
	icon = GFX_esc_psionic_disruptors_3
	icon_frame = 1
	type = instant

	damage = { min = 5 max = 43 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 1
	power = -32

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_disruptor_3" }
	component_set = ESC_PSIONIC_DISRUPTORS_3
	projectile_gfx = "psionic_disruptor_small"
	tags = { weapon_type_energy weapon_type_psionic s_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_PSIONIC_DISRUPTORS_3
	size = small
	icon = GFX_esc_bio_psionic_disruptors_3
	icon_frame = 1
	type = instant

	damage = { min = 5 max = 43 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 1
	power = -32

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_psionic_disruptor_3" }
	component_set = ESC_BIO_PSIONIC_DISRUPTORS_3
	projectile_gfx = "psionic_disruptor_small"
	tags = { weapon_type_energy weapon_type_psionic s_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PSIONIC_DISRUPTORS_3
	size = medium
	icon = GFX_esc_psionic_disruptors_3
	icon_frame = 1
	type = instant

	damage = { min = 10 max = 115 }
	windup = { min = 4 max = 16 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 1
	power = -64

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_disruptor_3" }
	component_set = ESC_PSIONIC_DISRUPTORS_3
	projectile_gfx = "psionic_disruptor_medium"
	tags = { weapon_type_energy weapon_type_psionic s_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_PSIONIC_DISRUPTORS_3
	size = medium
	icon = GFX_esc_bio_psionic_disruptors_3
	icon_frame = 1
	type = instant

	damage = { min = 10 max = 115 }
	windup = { min = 4 max = 16 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 1
	power = -56

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

	hull_damage = @ESC_WEAPON_psionic_disruptors_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_disruptors_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_disruptors_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_disruptors_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_disruptors_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_psionic_disruptor_3" }
	component_set = ESC_BIO_PSIONIC_DISRUPTORS_3
	projectile_gfx = "psionic_disruptor_medium"
	tags = { weapon_type_energy weapon_type_psionic m_slot debuffer_role }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth debuffer_role debuffer_role_stealth }

	target_type = target_enemies
	target_focus = spread
	injected_modifier = {
		modifier = {
			modifier = psionic_disruptor_anti_fire_rate
			days = 10
		}
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = anti_fire_rate
			priority = 1
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##               Focused Psionic Lightning                ##
############################################################

weapon_component_template = {
	key = ESC_PSIONIC_LIGHTNING_2
	size = large
	icon = GFX_esc_psionic_lightning_2
	icon_frame = 1
	type = instant

	damage = { min = 10 max = 175 }
	windup = { min = 9 max = 34 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_L_1
	accuracy = 1
	power = -85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 5
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_lightning_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_lightning_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_lightning_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_lightning_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_lightning_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_psionic_lightning_2" }
	component_set = ESC_PSIONIC_LIGHTNING_2
	projectile_gfx = "psionic_arc_emitter"
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_hull }
	upgrades_to = ESC_PSIONIC_LIGHTNING_3

	target_type = target_enemies
	target_focus = spread
	on_hit = {
		hidden_effect = {
			if = {
				limit = {
					exists = this
					is_civilian = no
					NOT = { is_ship_class = shipclass_starbase }
				}
				random = {
					chance = value:ship_terrify_chance
					set_terrified_by = root.from
					set_ship_flag = is_terrified
					ship_event = {
						id = shroud.5
						days = value:ship_terrify_duration
					}
				}
			}
		}
		custom_tooltip = "ship_terrify_tt"
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PSIONIC_LIGHTNING_2
	size = large
	icon = GFX_esc_bio_psionic_lightning_2
	icon_frame = 1
	type = instant

	damage = { min = 10 max = 175 }
	windup = { min = 9 max = 34 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_L_1
	accuracy = 1
	power = -85

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = l
		TIER = 5
		STRATEGIC_RESOURCE_TYPE = sr_zro
	}

	hull_damage = @ESC_WEAPON_psionic_lightning_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_lightning_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_lightning_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_lightning_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_lightning_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_psionic_lightning_2" }
	component_set = ESC_BIO_PSIONIC_LIGHTNING_2
	projectile_gfx = "psionic_arc_emitter"
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_hull }
	upgrades_to = ESC_BIO_PSIONIC_LIGHTNING_3

	target_type = target_enemies
	target_focus = spread
	on_hit = {
		hidden_effect = {
			if = {
				limit = {
					exists = this
					is_civilian = no
					NOT = { is_ship_class = shipclass_starbase }
				}
				random = {
					chance = value:ship_terrify_chance
					set_terrified_by = root.from
					set_ship_flag = is_terrified
					ship_event = {
						id = shroud.5
						days = value:ship_terrify_duration
					}
				}
			}
		}
		custom_tooltip = "ship_terrify_tt"
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

############################################################
##                    Shroud Lightning                    ##
############################################################

weapon_component_template = {
	key = ESC_PSIONIC_LIGHTNING_3
	size = large
	icon = GFX_esc_psionic_lightning_3
	icon_frame = 1
	type = instant

	damage = { min = 20 max = 200 }
	windup = { min = 9 max = 34 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_L_1
	accuracy = 1
	power = -100

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

	hull_damage = @ESC_WEAPON_psionic_lightning_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_lightning_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_lightning_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_lightning_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_lightning_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_psionic_lightning_3" }
	component_set = ESC_PSIONIC_LIGHTNING_3
	projectile_gfx = "psionic_arc_emitter"
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_hull }

	target_type = target_enemies
	target_focus = spread
	on_hit = {
		hidden_effect = {
			if = {
				limit = {
					exists = this
					is_civilian = no
					NOT = { is_ship_class = shipclass_starbase }
				}
				random = {
					chance = value:ship_terrify_chance
					set_terrified_by = root.from
					set_ship_flag = is_terrified
					ship_event = {
						id = shroud.5
						days = value:ship_terrify_duration
					}
				}
			}
		}
		custom_tooltip = "ship_terrify_tt"
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = no
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PSIONIC_LIGHTNING_3
	size = large
	icon = GFX_esc_bio_psionic_lightning_3
	icon_frame = 1
	type = instant

	damage = { min = 20 max = 200 }
	windup = { min = 9 max = 34 }
	total_fire_time = 24
	range = @ESC_WEAPON_RANGE_L_1
	accuracy = 1
	power = -100

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

	hull_damage = @ESC_WEAPON_psionic_lightning_hull_damage
	armor_penetration = @ESC_WEAPON_psionic_lightning_armor_penetration
	armor_damage = @ESC_WEAPON_psionic_lightning_armor_damage
	shield_penetration = @ESC_WEAPON_psionic_lightning_shield_penetration
	shield_damage = @ESC_WEAPON_psionic_lightning_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_psionic_lightning_3" }
	component_set = ESC_BIO_PSIONIC_LIGHTNING_3
	projectile_gfx = "psionic_arc_emitter"
	tags = { weapon_type_energy weapon_type_psionic l_slot }
	ai_tags = { weapon_role_anti_hull }

	target_type = target_enemies
	target_focus = spread
	on_hit = {
		hidden_effect = {
			if = {
				limit = {
					exists = this
					is_civilian = no
					NOT = { is_ship_class = shipclass_starbase }
				}
				random = {
					chance = value:ship_terrify_chance
					set_terrified_by = root.from
					set_ship_flag = is_terrified
					ship_event = {
						id = shroud.5
						days = value:ship_terrify_duration
					}
				}
			}
		}
		custom_tooltip = "ship_terrify_tt"
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = yes
	}

	# only regular empires and spiritualist FE may use this component
	valid_for_country = {
		ESC_TRIGGER_is_normal_empire_or_spiritualist_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_zro }
		}
	}
}
