############################################################
##                   ESC : Energy Weapons                 ##
############################################################

# - Advanced Combat Laser				S/M/L
# - Aurora Laser						S/M/L
# - Advanced Plasma Cannon				S/M/L
# - Dragonbreath Cannon					S/M/L
# - Tachyon Disruptor					S/M
# - Disruptor Lance						S/M
# - Muon Launcher						G
# - Antimatter Launcher					G
# - Chrono-Vortex Cannon				S/M/L
# - Amplified Cloud Lightning			L
# - Thunderstorm Generator				L
# - Plasma Cutter						S/M
# - Advanced Plasma Cutter				S/M
# - Juggernaut Beam Cannon				M (Juggernaut only)
# - Improved Juggernaut Beam Cannon		M (Juggernaut only)

# - Improved Tachyon Lance				X
# - Hypercharged Tachyon Lance			X
# - Light of Destruction				Titanic + Juggernaut
# - Lightning Cannon					X
# - Arc Cannon							X
# - Divine Thunder						Titanic + Juggernaut
# - Wave-Motion Gun						X
# - Dimensional Wave Cannon				X
# - Titanic Dimensional Wave Cannon		Titanic + Juggernaut
# - Arc-en-Ciel Cannon					X, Titanic + Juggernaut

# - Blinding Lens Flare Gun				X
# - Starfire Flare Emitter				X
# - Nova Flare Paralyzer				X
# - Supernova Flare Cannon				X

# - Arc Energy Shockwave				Titanic
# - Dark Matter Halo Blast				Titanic

############################################################
##                  Advanced Combat Laser                 ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_LASER_6
	size = small
	icon = GFX_esc_laser_6
	icon_frame = 1
	type = instant

	damage = { min = 21 max = 58 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.9
	power = -20

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_laser_6" }
	component_set = ESC_LASER_6
	projectile_gfx = "esc_laser_6_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = SMALL_ESC_LASER_7

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_LASER_6
	size = small
	icon = GFX_esc_bio_laser_6
	icon_frame = 1
	type = instant

	damage = { min = 21 max = 58 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.9
	power = -20

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_laser_6" }
	component_set = ESC_BIO_LASER_6
	projectile_gfx = "esc_laser_6_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = SMALL_ESC_BIO_LASER_7

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_LASER_6
	size = medium
	icon = GFX_esc_laser_6
	icon_frame = 1
	type = instant

	damage = { min = 53 max = 134 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.9
	power = -34

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_laser_6" }
	component_set = ESC_LASER_6
	projectile_gfx = "esc_laser_6_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = MEDIUM_ESC_LASER_7

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_LASER_6
	size = medium
	icon = GFX_esc_bio_laser_6
	icon_frame = 1
	type = instant

	damage = { min = 53 max = 134 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.9
	power = -34

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_laser_6" }
	component_set = ESC_BIO_LASER_6
	projectile_gfx = "esc_laser_6_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = MEDIUM_ESC_BIO_LASER_7

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_LASER_6
	size = large
	icon = GFX_esc_laser_6
	icon_frame = 1
	type = instant

	damage = { min = 132 max = 310 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_2
	accuracy = 0.9
	power = -64

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_laser_6" }
	component_set = ESC_LASER_6
	projectile_gfx = "esc_laser_6_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = LARGE_ESC_LASER_7

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = LARGE_ESC_BIO_LASER_6
	size = large
	icon = GFX_esc_bio_laser_6
	icon_frame = 1
	type = instant

	damage = { min = 132 max = 310 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_2
	accuracy = 0.9
	power = -64

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_laser_6" }
	component_set = ESC_BIO_LASER_6
	projectile_gfx = "esc_laser_6_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = LARGE_ESC_BIO_LASER_7

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

############################################################
##                       Aurora Laser                     ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_LASER_7
	size = small
	icon = GFX_esc_laser_7
	icon_frame = 1
	type = instant

	damage = { min = 25 max = 72 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.9
	power = -24

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_laser_7" }
	component_set = ESC_LASER_7
	projectile_gfx = "esc_laser_7_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_LASER_7
	size = small
	icon = GFX_esc_bio_laser_7
	icon_frame = 1
	type = instant

	damage = { min = 25 max = 72 }
	windup = { min = 5 max = 20 }
	total_fire_time = 30
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.9
	power = -24

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_laser_7" }
	component_set = ESC_BIO_LASER_7
	projectile_gfx = "esc_laser_7_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_LASER_7
	size = medium
	icon = GFX_esc_laser_7
	icon_frame = 1
	type = instant

	damage = { min = 65 max = 206 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.9
	power = -46

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_laser_7" }
	component_set = ESC_LASER_7
	projectile_gfx = "esc_laser_7_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_LASER_7
	size = medium
	icon = GFX_esc_bio_laser_7
	icon_frame = 1
	type = instant

	damage = { min = 65 max = 206 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.9
	power = -46

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_laser_7" }
	component_set = ESC_BIO_LASER_7
	projectile_gfx = "esc_laser_7_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_LASER_7
	size = large
	icon = GFX_esc_laser_7
	icon_frame = 1
	type = instant

	damage = { min = 184 max = 412 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_2
	accuracy = 0.9
	power = -90

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_laser_7" }
	component_set = ESC_LASER_7
	projectile_gfx = "esc_laser_7_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = LARGE_ESC_BIO_LASER_7
	size = large
	icon = GFX_esc_bio_laser_7
	icon_frame = 1
	type = instant

	damage = { min = 184 max = 412 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_L_2
	accuracy = 0.9
	power = -90

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

	hull_damage = @ESC_WEAPON_laser_hull_damage
	armor_penetration = @ESC_WEAPON_laser_armor_penetration
	armor_damage = @ESC_WEAPON_laser_armor_damage
	shield_penetration = @ESC_WEAPON_laser_shield_penetration
	shield_damage = @ESC_WEAPON_laser_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_laser_7" }
	component_set = ESC_BIO_LASER_7
	projectile_gfx = "esc_laser_7_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

############################################################
##                 Advanced Plasma Cannon                 ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PLASMA_4
	size = small
	icon = GFX_esc_plasma_cannon_4
	icon_frame = 1
	type = instant

	damage = { min = 27 max = 62 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.8
	power = -20

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.4

	prerequisites = { "esc_tech_plasma_4" }
	component_set = ESC_PLASMA_4
	projectile_gfx = "esc_plasma_4_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = SMALL_ESC_PLASMA_5

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_PLASMA_4
	size = small
	icon = GFX_esc_bio_plasma_cannon_4
	icon_frame = 1
	type = instant

	damage = { min = 27 max = 62 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.8
	power = -20

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.4

	prerequisites = { "esc_tech_plasma_4" }
	component_set = ESC_BIO_PLASMA_4
	projectile_gfx = "esc_plasma_4_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = SMALL_ESC_BIO_PLASMA_5

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PLASMA_4
	size = medium
	icon = GFX_esc_plasma_cannon_4
	icon_frame = 1
	type = instant

	damage = { min = 71 max = 160 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.8
	power = -34

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_plasma_4" }
	component_set = ESC_PLASMA_4
	projectile_gfx = "esc_plasma_4_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = MEDIUM_ESC_PLASMA_5

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_PLASMA_4
	size = medium
	icon = GFX_esc_bio_plasma_cannon_4
	icon_frame = 1
	type = instant

	damage = { min = 71 max = 160 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.8
	power = -34

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_plasma_4" }
	component_set = ESC_BIO_PLASMA_4
	projectile_gfx = "esc_plasma_4_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = MEDIUM_ESC_BIO_PLASMA_5

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_PLASMA_4
	size = large
	icon = GFX_esc_plasma_cannon_4
	icon_frame = 1
	type = instant

	damage = { min = 170 max = 356 }
	windup = { min = 8 max = 30 }
	total_fire_time = 45
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.8
	power = -64

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_plasma_4" }
	component_set = ESC_PLASMA_4
	projectile_gfx = "esc_plasma_4_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = LARGE_ESC_PLASMA_5

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

weapon_component_template = {
	key = LARGE_ESC_BIO_PLASMA_4
	size = large
	icon = GFX_esc_bio_plasma_cannon_4
	icon_frame = 1
	type = instant

	damage = { min = 170 max = 356 }
	windup = { min = 8 max = 30 }
	total_fire_time = 45
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.8
	power = -64

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_plasma_4" }
	component_set = ESC_BIO_PLASMA_4
	projectile_gfx = "esc_plasma_4_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = LARGE_ESC_BIO_PLASMA_5

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

############################################################
##                   Dragonbreath Cannon                  ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_PLASMA_5
	size = small
	icon = GFX_esc_plasma_cannon_5
	icon_frame = 1
	type = instant

	damage = { min = 31 max = 72 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.8
	power = -24

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.4

	prerequisites = { "esc_tech_plasma_5" }
	component_set = ESC_PLASMA_5
	projectile_gfx = "esc_plasma_5_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_PLASMA_5
	size = small
	icon = GFX_esc_bio_plasma_cannon_5
	icon_frame = 1
	type = instant

	damage = { min = 31 max = 72 }
	windup = { min = 6 max = 24 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.8
	power = -24

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.4

	prerequisites = { "esc_tech_plasma_5" }
	component_set = ESC_BIO_PLASMA_5
	projectile_gfx = "esc_plasma_5_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_PLASMA_5
	size = medium
	icon = GFX_esc_plasma_cannon_5
	icon_frame = 1
	type = instant

	damage = { min = 79 max = 195 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.8
	power = -46

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_plasma_5" }
	component_set = ESC_PLASMA_5
	projectile_gfx = "esc_plasma_5_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_PLASMA_5
	size = medium
	icon = GFX_esc_bio_plasma_cannon_5
	icon_frame = 1
	type = instant

	damage = { min = 79 max = 195 }
	windup = { min = 7 max = 27 }
	total_fire_time = 40
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.8
	power = -46

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.2

	prerequisites = { "esc_tech_plasma_5" }
	component_set = ESC_BIO_PLASMA_5
	projectile_gfx = "esc_plasma_5_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
	}
}

#large
weapon_component_template = {
	key = LARGE_ESC_PLASMA_5
	size = large
	icon = GFX_esc_plasma_cannon_5
	icon_frame = 1
	type = instant

	damage = { min = 192 max = 400 }
	windup = { min = 8 max = 30 }
	total_fire_time = 45
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.8
	power = -90

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_plasma_5" }
	component_set = ESC_PLASMA_5
	projectile_gfx = "esc_plasma_5_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

weapon_component_template = {
	key = LARGE_ESC_BIO_PLASMA_5
	size = large
	icon = GFX_esc_bio_plasma_cannon_5
	icon_frame = 1
	type = instant

	damage = { min = 192 max = 400 }
	windup = { min = 8 max = 30 }
	total_fire_time = 45
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.8
	power = -90

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

	hull_damage = @ESC_WEAPON_plasma_hull_damage
	armor_penetration = @ESC_WEAPON_plasma_armor_penetration
	armor_damage = @ESC_WEAPON_plasma_armor_damage
	shield_penetration = @ESC_WEAPON_plasma_shield_penetration
	shield_damage = @ESC_WEAPON_plasma_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_plasma_5" }
	component_set = ESC_BIO_PLASMA_5
	projectile_gfx = "esc_plasma_5_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

############################################################
##                    Tachyon Disruptor                   ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_DISRUPTOR_4
	size = small
	icon = GFX_esc_disruptor_4
	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.0
	power = -20

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_disruptors_4" }
	component_set = ESC_DISRUPTOR_4
	projectile_gfx = "esc_disruptor_4_small"
	upgrades_to = SMALL_ESC_DISRUPTOR_5
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_DISRUPTOR_4
	size = small
	icon = GFX_esc_bio_disruptor_4
	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.0
	power = -20

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_disruptors_4" }
	component_set = ESC_BIO_DISRUPTOR_4
	projectile_gfx = "esc_disruptor_4_small"
	upgrades_to = SMALL_ESC_BIO_DISRUPTOR_5
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_DISRUPTOR_4
	size = medium
	icon = GFX_esc_disruptor_4
	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.0
	power = -37

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_disruptors_4" }
	component_set = ESC_DISRUPTOR_4
	projectile_gfx = "esc_disruptor_4_medium"
	upgrades_to = MEDIUM_ESC_DISRUPTOR_5
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_DISRUPTOR_4
	size = medium
	icon = GFX_esc_bio_disruptor_4
	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.0
	power = -37

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_disruptors_4" }
	component_set = ESC_BIO_DISRUPTOR_4
	projectile_gfx = "esc_disruptor_4_medium"
	upgrades_to = MEDIUM_ESC_BIO_DISRUPTOR_5
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

############################################################
##                     Disruptor Lance                    ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_DISRUPTOR_5
	size = small
	icon = GFX_esc_disruptor_5
	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.0
	power = -24

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_disruptors_5" }
	component_set = ESC_DISRUPTOR_5
	projectile_gfx = "esc_disruptor_5_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_DISRUPTOR_5
	size = small
	icon = GFX_esc_bio_disruptor_5
	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.0
	power = -24

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.6

	prerequisites = { "esc_tech_disruptors_5" }
	component_set = ESC_BIO_DISRUPTOR_5
	projectile_gfx = "esc_disruptor_5_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_DISRUPTOR_5
	size = medium
	icon = GFX_esc_disruptor_5
	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.0
	power = -46

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_disruptors_5" }
	component_set = ESC_DISRUPTOR_5
	projectile_gfx = "esc_disruptor_5_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_DISRUPTOR_5
	size = medium
	icon = GFX_esc_bio_disruptor_5
	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.0
	power = -46

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

	hull_damage = @ESC_WEAPON_disruptor_hull_damage
	armor_penetration = @ESC_WEAPON_disruptor_armor_penetration
	armor_damage = @ESC_WEAPON_disruptor_armor_damage
	shield_penetration = @ESC_WEAPON_disruptor_shield_penetration
	shield_damage = @ESC_WEAPON_disruptor_shield_damage
	tracking = 0.35

	prerequisites = { "esc_tech_disruptors_5" }
	component_set = ESC_BIO_DISRUPTOR_5
	projectile_gfx = "esc_disruptor_5_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5

	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

############################################################
##                      Muon Launcher                     ##
############################################################

weapon_component_template = {
	key = ESC_ENERGY_TORPEDO_3
	size = torpedo
	icon = GFX_esc_energy_launcher_3
	icon_frame = 1
	type = instant

	damage = { min = 76 max = 162 }
	size_damage_factor = 0.2
	windup = { min = 25 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_L_6
	min_range = @ESC_WEAPON_MIN_RANGE_5
	firing_arc = 25.0
	accuracy = 0.9
	power = -105

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_energy_torpedo_3" }
	component_set = ESC_ENERGY_TORPEDO_3
	projectile_gfx = "esc_energy_torpedoes_3"
	upgrades_to = ESC_ENERGY_TORPEDO_4
	tags = { weapon_type_energy g_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_ENERGY_TORPEDO_3
	size = torpedo
	icon = GFX_esc_bio_energy_launcher_3
	icon_frame = 1
	type = instant

	damage = { min = 76 max = 162 }
	size_damage_factor = 0.2
	windup = { min = 25 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_L_6
	min_range = @ESC_WEAPON_MIN_RANGE_5
	firing_arc = 25.0
	accuracy = 0.9
	power = -105

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_energy_torpedo_3" }
	component_set = ESC_BIO_ENERGY_TORPEDO_3
	projectile_gfx = "esc_energy_torpedoes_3"
	upgrades_to = ESC_BIO_ENERGY_TORPEDO_4
	tags = { weapon_type_energy g_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }

	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
	}

	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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

############################################################
##                   Antimatter Launcher                  ##
############################################################

weapon_component_template = {
	key = ESC_ENERGY_TORPEDO_4
	size = torpedo
	icon = GFX_esc_energy_launcher_4
	icon_frame = 1
	type = instant

	damage = { min = 92 max = 195 }
	size_damage_factor = 0.2
	windup = { min = 25 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_L_6
	min_range = @ESC_WEAPON_MIN_RANGE_5
	firing_arc = 25.0
	accuracy = 0.9
	power = -120

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_energy_torpedo_4" }
	component_set = ESC_ENERGY_TORPEDO_4
	projectile_gfx = "esc_energy_torpedoes_4"
	tags = { weapon_type_energy g_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships
		EVAL_TARGET = 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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_ENERGY_TORPEDO_4
	size = torpedo
	icon = GFX_esc_bio_energy_launcher_4
	icon_frame = 1
	type = instant

	damage = { min = 92 max = 195 }
	size_damage_factor = 0.2
	windup = { min = 25 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_L_6
	min_range = @ESC_WEAPON_MIN_RANGE_5
	firing_arc = 25.0
	accuracy = 0.9
	power = -120

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_energy_torpedo_4" }
	component_set = ESC_BIO_ENERGY_TORPEDO_4
	projectile_gfx = "esc_energy_torpedoes_4"
	tags = { weapon_type_energy g_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }

	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
	}

	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 = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

############################################################
##                  Chrono-Vortex Cannon                  ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_CHRONO_CANNON
	size = small
	icon = GFX_esc_chrono_cannon
	icon_frame = 1
	type = instant

	damage = { min = 60 max = 110 }
	windup = { min = 2.0 max = 25.0 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.8
	power = -40

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

	hull_damage = @ESC_WEAPON_chrono_hull_damage
	armor_penetration = @ESC_WEAPON_chrono_armor_penetration
	armor_damage = @ESC_WEAPON_chrono_armor_damage
	shield_penetration = @ESC_WEAPON_chrono_shield_penetration
	shield_damage = @ESC_WEAPON_chrono_shield_damage
	tracking = 0.3

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

	prerequisites = { "esc_tech_chrono_cannon" }
	component_set = ESC_CHRONO_CANNON
	projectile_gfx = "esc_chronocannon_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_shield gunship brawler }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

weapon_component_template = {
	key = SMALL_ESC_BIO_CHRONO_CANNON
	size = small
	icon = GFX_esc_bio_chrono_cannon
	icon_frame = 1
	type = instant

	damage = { min = 60 max = 110 }
	windup = { min = 2.0 max = 25.0 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_S_2
	accuracy = 0.8
	power = -40

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

	hull_damage = @ESC_WEAPON_chrono_hull_damage
	armor_penetration = @ESC_WEAPON_chrono_armor_penetration
	armor_damage = @ESC_WEAPON_chrono_armor_damage
	shield_penetration = @ESC_WEAPON_chrono_shield_penetration
	shield_damage = @ESC_WEAPON_chrono_shield_damage
	tracking = 0.3

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

	prerequisites = { "esc_tech_chrono_cannon" }
	component_set = ESC_BIO_CHRONO_CANNON
	projectile_gfx = "esc_chronocannon_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_shield gunship brawler }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_CHRONO_CANNON
	size = medium
	icon = GFX_esc_chrono_cannon
	icon_frame = 1
	type = instant

	damage = { min = 114 max = 278 }
	windup = { min = 2.0 max = 25.0 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85
	power = -70

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

	hull_damage = @ESC_WEAPON_chrono_hull_damage
	armor_penetration = @ESC_WEAPON_chrono_armor_penetration
	armor_damage = @ESC_WEAPON_chrono_armor_damage
	shield_penetration = @ESC_WEAPON_chrono_shield_penetration
	shield_damage = @ESC_WEAPON_chrono_shield_damage
	tracking = 0.15

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

	prerequisites = { "esc_tech_chrono_cannon" }
	component_set = ESC_CHRONO_CANNON
	projectile_gfx = "esc_chronocannon_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_shield gunship brawler }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_CHRONO_CANNON
	size = medium
	icon = GFX_esc_bio_chrono_cannon
	icon_frame = 1
	type = instant

	damage = { min = 114 max = 278 }
	windup = { min = 2.0 max = 25.0 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_M_2
	accuracy = 0.85
	power = -70

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

	hull_damage = @ESC_WEAPON_chrono_hull_damage
	armor_penetration = @ESC_WEAPON_chrono_armor_penetration
	armor_damage = @ESC_WEAPON_chrono_armor_damage
	shield_penetration = @ESC_WEAPON_chrono_shield_penetration
	shield_damage = @ESC_WEAPON_chrono_shield_damage
	tracking = 0.15

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

	prerequisites = { "esc_tech_chrono_cannon" }
	component_set = ESC_BIO_CHRONO_CANNON
	projectile_gfx = "esc_chronocannon_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_shield gunship brawler }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

# large
weapon_component_template = {
	key = LARGE_ESC_CHRONO_CANNON
	size = large
	icon = GFX_esc_chrono_cannon
	icon_frame = 1
	type = instant

	damage = { min = 294 max = 546 }
	windup = { min = 2.0 max = 25.0 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85
	power = -120

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

	hull_damage = @ESC_WEAPON_chrono_hull_damage
	armor_penetration = @ESC_WEAPON_chrono_armor_penetration
	armor_damage = @ESC_WEAPON_chrono_armor_damage
	shield_penetration = @ESC_WEAPON_chrono_shield_penetration
	shield_damage = @ESC_WEAPON_chrono_shield_damage
	tracking = 0.05

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

	prerequisites = { "esc_tech_chrono_cannon" }
	component_set = ESC_CHRONO_CANNON
	projectile_gfx = "esc_chronocannon_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_shield artillery }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

weapon_component_template = {
	key = LARGE_ESC_BIO_CHRONO_CANNON
	size = large
	icon = GFX_esc_bio_chrono_cannon
	icon_frame = 1
	type = instant

	damage = { min = 294 max = 546 }
	windup = { min = 2.0 max = 25.0 }
	total_fire_time = 35
	range = @ESC_WEAPON_RANGE_L_2
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85
	power = -120

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

	hull_damage = @ESC_WEAPON_chrono_hull_damage
	armor_penetration = @ESC_WEAPON_chrono_armor_penetration
	armor_damage = @ESC_WEAPON_chrono_armor_damage
	shield_penetration = @ESC_WEAPON_chrono_shield_penetration
	shield_damage = @ESC_WEAPON_chrono_shield_damage
	tracking = 0.05

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

	prerequisites = { "esc_tech_chrono_cannon" }
	component_set = ESC_BIO_CHRONO_CANNON
	projectile_gfx = "esc_chronocannon_large"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_shield artillery }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

############################################################
##               Amplified Cloud Lightning                ##
############################################################

weapon_component_template = {
	key = ESC_CLOUD_LIGHTNING_2
	size = large
	icon = GFX_esc_cloud_lightning_2
	icon_frame = 1
	type = instant

	damage = { min = 10 max = 176 }
	windup = { min = 9 max = 34 }
	total_fire_time = 50
	range = @ESC_WEAPON_RANGE_L_4
	accuracy = 1
	power = -55

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

	hull_damage = @ESC_WEAPON_lightning_hull_damage_2
	armor_penetration = @ESC_WEAPON_lightning_armor_penetration
	armor_damage = @ESC_WEAPON_lightning_armor_damage
	shield_penetration = @ESC_WEAPON_lightning_shield_penetration
	shield_damage = @ESC_WEAPON_lightning_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_cloud_lightning_2" }
	component_set = ESC_CLOUD_LIGHTNING_2
	projectile_gfx = "arc_emitter"
	tags = { weapon_type_energy weapon_type_space_fauna l_slot }
	ai_tags = { weapon_role_anti_hull }
	ai_tag_weight = 5
	upgrades_to = ESC_CLOUD_LIGHTNING_3

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

############################################################
##                 Thunderstorm Generator                 ##
############################################################

weapon_component_template = {
	key = ESC_CLOUD_LIGHTNING_3
	size = large
	icon = GFX_esc_cloud_lightning_3
	icon_frame = 1
	type = instant

	damage = { min = 20 max = 256 }
	windup = { min = 9 max = 34 }
	total_fire_time = 50
	range = @ESC_WEAPON_RANGE_L_4
	accuracy = 1
	power = -70

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

	hull_damage = @ESC_WEAPON_lightning_hull_damage_3
	armor_penetration = @ESC_WEAPON_lightning_armor_penetration
	armor_damage = @ESC_WEAPON_lightning_armor_damage
	shield_penetration = @ESC_WEAPON_lightning_shield_penetration
	shield_damage = @ESC_WEAPON_lightning_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_cloud_lightning_3" }
	component_set = ESC_CLOUD_LIGHTNING_3
	projectile_gfx = "arc_emitter"
	tags = { weapon_type_energy weapon_type_space_fauna l_slot }
	ai_tags = { weapon_role_anti_hull }
	ai_tag_weight = 5

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

############################################################
##                     Plasma Cutter                      ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_MINING_LASER_2
	size = small
	icon = GFX_esc_mining_laser_2
	icon_frame = 1
	type = instant

	damage = { min = 14 max = 36 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 0.8
	power = -9

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 6
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_2
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.45

	prerequisites = { "esc_tech_mining_laser_2" }
	component_set = ESC_MINING_LASER_2
	projectile_gfx = "esc_mining_laser_2_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }
	upgrades_to = SMALL_ESC_MINING_LASER_3

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

weapon_component_template = {
	key = SMALL_ESC_BIO_MINING_LASER_2
	size = small
	icon = GFX_esc_bio_mining_laser_2
	icon_frame = 1
	type = instant

	damage = { min = 14 max = 36 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 0.8
	power = -9

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 6
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_2
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.45

	prerequisites = { "esc_tech_mining_laser_2" }
	component_set = ESC_BIO_MINING_LASER_2
	projectile_gfx = "esc_mining_laser_2_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }
	upgrades_to = SMALL_ESC_BIO_MINING_LASER_3

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_MINING_LASER_2
	size = medium
	icon = GFX_esc_mining_laser_2
	icon_frame = 1
	type = instant

	damage = { min = 32 max = 88 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 0.8
	power = -17

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 6
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_2
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.25

	prerequisites = { "esc_tech_mining_laser_2" }
	component_set = ESC_MINING_LASER_2
	projectile_gfx = "esc_mining_laser_2_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }
	upgrades_to = MEDIUM_ESC_MINING_LASER_3

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_MINING_LASER_2
	size = medium
	icon = GFX_esc_bio_mining_laser_2
	icon_frame = 1
	type = instant

	damage = { min = 32 max = 88 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 0.8
	power = -17

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 6
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_2
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.25

	prerequisites = { "esc_tech_mining_laser_2" }
	component_set = ESC_BIO_MINING_LASER_2
	projectile_gfx = "esc_mining_laser_2_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }
	upgrades_to = MEDIUM_ESC_BIO_MINING_LASER_3

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

############################################################
##                 Advanced Plasma Cutter                 ##
############################################################

# small
weapon_component_template = {
	key = SMALL_ESC_MINING_LASER_3
	size = small
	icon = GFX_esc_mining_laser_3
	icon_frame = 1
	type = instant

	damage = { min = 20 max = 51 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 0.85
	power = -12

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 7
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_3
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_mining_laser_3" }
	component_set = ESC_MINING_LASER_3
	projectile_gfx = "esc_mining_laser_3_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

weapon_component_template = {
	key = SMALL_ESC_BIO_MINING_LASER_3
	size = small
	icon = GFX_esc_bio_mining_laser_3
	icon_frame = 1
	type = instant

	damage = { min = 20 max = 51 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_S_1
	accuracy = 0.85
	power = -12

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = s
		TIER = 7
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_3
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.5

	prerequisites = { "esc_tech_mining_laser_3" }
	component_set = ESC_BIO_MINING_LASER_3
	projectile_gfx = "esc_mining_laser_3_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

# medium
weapon_component_template = {
	key = MEDIUM_ESC_MINING_LASER_3
	size = medium
	icon = GFX_esc_mining_laser_3
	icon_frame = 1
	type = instant

	damage = { min = 44 max = 118 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 0.85
	power = -20

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 7
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_3
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_mining_laser_3" }
	component_set = ESC_MINING_LASER_3
	projectile_gfx = "esc_mining_laser_3_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

weapon_component_template = {
	key = MEDIUM_ESC_BIO_MINING_LASER_3
	size = medium
	icon = GFX_esc_bio_mining_laser_3
	icon_frame = 1
	type = instant

	damage = { min = 44 max = 118 }
	windup = { min = 3 max = 11 }
	total_fire_time = 16
	range = @ESC_WEAPON_RANGE_M_1
	accuracy = 0.85
	power = -20

	inline_script = {
		script = component_costs/shorthands/esc_inlines_no_sr_cost
		COMPONENT_TYPE = WEAPON
		SIZE = m
		TIER = 7
	}

	hull_damage = @ESC_WEAPON_drone_laser_hull_damage
	armor_penetration = @ESC_WEAPON_drone_laser_armor_penetration
	armor_damage = @ESC_WEAPON_drone_laser_armor_damage_3
	shield_penetration = @ESC_WEAPON_drone_laser_shield_penetration
	shield_damage = @ESC_WEAPON_drone_laser_shield_damage
	tracking = 0.3

	prerequisites = { "esc_tech_mining_laser_3" }
	component_set = ESC_BIO_MINING_LASER_3
	projectile_gfx = "esc_mining_laser_3_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }

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

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

	ai_weight = { weight = 1 }
}

############################################################
##                 Juggernaut Beam Cannon                 ##
############################################################

weapon_component_template = {
	key = ESC_JUGGERNAUT_BEAM_CANNON_1
	size = medium
	icon = GFX_esc_juggernaut_laser_1
	icon_frame = 1
	type = instant

	damage = { min = 410 max = 635 }
	windup = { min = 1 max = 19 }
	total_fire_time = 75
	range = @ESC_WEAPON_RANGE_L_5
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85
	power = -105

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_juggernaut_beam_1" }
	component_set = ESC_JUGGERNAUT_BEAM_CANNON_1
	projectile_gfx = "esc_juggernaut_beam_cannon_1"
	upgrades_to = ESC_JUGGERNAUT_BEAM_CANNON_2
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_artillery artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships_conditional
		EXTRA_CONDITION = "ESC_ship_uses_juggernaut_components"
		EXTRA_CONDITION_VALUE = yes
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_JUGGERNAUT_BEAM_CANNON_1
	size = medium
	icon = GFX_esc_bio_juggernaut_laser_1
	icon_frame = 1
	type = instant

	damage = { min = 410 max = 635 }
	windup = { min = 1 max = 19 }
	total_fire_time = 75
	range = @ESC_WEAPON_RANGE_L_5
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85
	power = -105

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_juggernaut_beam_1" }
	component_set = ESC_BIO_JUGGERNAUT_BEAM_CANNON_1
	projectile_gfx = "esc_juggernaut_beam_cannon_1"
	upgrades_to = ESC_BIO_JUGGERNAUT_BEAM_CANNON_2
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_artillery artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships_conditional
		EXTRA_CONDITION = "ESC_ship_uses_juggernaut_components"
		EXTRA_CONDITION_VALUE = yes
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

############################################################
##            Improved Juggernaut Beam Cannon             ##
############################################################

weapon_component_template = {
	key = ESC_JUGGERNAUT_BEAM_CANNON_2
	size = medium
	icon = GFX_esc_juggernaut_laser_2
	icon_frame = 1
	type = instant

	damage = { min = 460 max = 785 }
	windup = { min = 1 max = 19 }
	total_fire_time = 75
	range = @ESC_WEAPON_RANGE_L_5
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85
	power = -120

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_juggernaut_beam_2" }
	component_set = ESC_JUGGERNAUT_BEAM_CANNON_2
	projectile_gfx = "esc_juggernaut_beam_cannon_2"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_artillery artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships_conditional
		EXTRA_CONDITION = "ESC_ship_uses_juggernaut_components"
		EXTRA_CONDITION_VALUE = yes
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_JUGGERNAUT_BEAM_CANNON_2
	size = medium
	icon = GFX_esc_bio_juggernaut_laser_2
	icon_frame = 1
	type = instant

	damage = { min = 460 max = 785 }
	windup = { min = 1 max = 19 }
	total_fire_time = 75
	range = @ESC_WEAPON_RANGE_L_5
	min_range = @ESC_WEAPON_MIN_RANGE_4
	accuracy = 0.85
	power = -120

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

	hull_damage = @ESC_WEAPON_energy_launcher_hull_damage
	armor_penetration = @ESC_WEAPON_energy_launcher_armor_penetration
	armor_damage = @ESC_WEAPON_energy_launcher_armor_damage
	shield_penetration = @ESC_WEAPON_energy_launcher_shield_penetration
	shield_damage = @ESC_WEAPON_energy_launcher_shield_damage
	tracking = 0.05

	prerequisites = { "esc_tech_juggernaut_beam_2" }
	component_set = ESC_BIO_JUGGERNAUT_BEAM_CANNON_2
	projectile_gfx = "esc_juggernaut_beam_cannon_2"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor weapon_role_artillery artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_uses_bio_ships_conditional
		EXTRA_CONDITION = "ESC_ship_uses_juggernaut_components"
		EXTRA_CONDITION_VALUE = yes
		EVAL_TARGET = 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 = rare_crystals }
		}
	}
}

############################################################
##                 Improved Tachyon Lance                 ##
############################################################

weapon_component_template = {
	key = ESC_PARTICLE_LANCE_3
	size = extra_large
	icon = GFX_esc_particle_lance_3
	icon_frame = 1
	type = instant

	damage = { min = 1000 max = 2300 }
	windup = { min = 12 max = 47 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 0.85
	power = -280

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

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.0

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_3" }
	component_set = ESC_PARTICLE_LANCE_3
	projectile_gfx = "esc_particle_lance_3"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }
	upgrades_to = ESC_PARTICLE_LANCE_4

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PARTICLE_LANCE_3
	size = extra_large
	icon = GFX_esc_bio_particle_lance_3
	icon_frame = 1
	type = instant

	damage = { min = 1000 max = 2300 }
	windup = { min = 12 max = 47 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 0.85
	power = -280

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

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.0

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_3" }
	component_set = ESC_BIO_PARTICLE_LANCE_3
	projectile_gfx = "esc_particle_lance_3"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }
	upgrades_to = ESC_BIO_PARTICLE_LANCE_4

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

############################################################
##                 Hyperdimensional Lance                 ##
############################################################

weapon_component_template = {
	key = ESC_PARTICLE_LANCE_4
	size = extra_large
	icon = GFX_esc_particle_lance_4
	icon_frame = 1
	type = instant

	damage = { min = 1250 max = 2600 }
	windup = { min = 12 max = 47 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 0.85
	power = -310

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

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.05

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_4" }
	component_set =ESC_PARTICLE_LANCE_4
	projectile_gfx = "esc_particle_lance_4"
	upgrades_to = ESC_PARTICLE_LANCE_JUGGERNAUT
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PARTICLE_LANCE_4
	size = extra_large
	icon = GFX_esc_bio_particle_lance_4
	icon_frame = 1
	type = instant

	damage = { min = 1250 max = 2600 }
	windup = { min = 12 max = 47 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 0.85
	power = -310

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

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.05

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_4" }
	component_set =ESC_BIO_PARTICLE_LANCE_4
	projectile_gfx = "esc_particle_lance_4"
	upgrades_to = ESC_BIO_PARTICLE_LANCE_JUGGERNAUT
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

############################################################
##                  Light of Destruction                  ##
############################################################

# titan
weapon_component_template = {
	key = ESC_PARTICLE_LANCE_TITANIC
	size = titanic
	icon = GFX_esc_particle_lance_titanic
	icon_frame = 1
	type = instant

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

	windup = { min = 30 max = 100 }
	total_fire_time = 175
	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 = rare_crystals
	}

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.05

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_titanic" }
	component_set = ESC_PARTICLE_LANCE_TITANIC
	projectile_gfx = "esc_particle_lance_titanic_big"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard_bio
		BIOSHIP_WEAPON = no
		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
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PARTICLE_LANCE_TITANIC
	size = titanic
	icon = GFX_esc_bio_particle_lance_titanic
	icon_frame = 1
	type = instant

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

	windup = { min = 30 max = 100 }
	total_fire_time = 175
	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 = rare_crystals
	}

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.05

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_titanic" }
	component_set = ESC_BIO_PARTICLE_LANCE_TITANIC
	projectile_gfx = "esc_particle_lance_titanic_big"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard_bio
		BIOSHIP_WEAPON = yes
		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
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# juggernaut
weapon_component_template = {
	key = ESC_PARTICLE_LANCE_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_particle_lance_titanic
	icon_frame = 1
	type = instant

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

	windup = { min = 30 max = 100 }
	total_fire_time = 175
	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 = rare_crystals
	}

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.05

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_titanic" }
	component_set = ESC_PARTICLE_LANCE_JUGGERNAUT
	projectile_gfx = "esc_particle_lance_titanic"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_PARTICLE_LANCE_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_bio_particle_lance_titanic
	icon_frame = 1
	type = instant

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

	windup = { min = 30 max = 100 }
	total_fire_time = 175
	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 = rare_crystals
	}

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.05

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_titanic" }
	component_set = ESC_BIO_PARTICLE_LANCE_JUGGERNAUT
	projectile_gfx = "esc_particle_lance_titanic"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_PARTICLE_LANCE_ARKSHIP
	size = titanic
	icon = GFX_esc_particle_lance_titanic
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 7500
		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.75
	power = 0

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

	hull_damage = @ESC_WEAPON_particle_lance_hull_damage
	armor_penetration = @ESC_WEAPON_particle_lance_armor_penetration
	armor_damage = @ESC_WEAPON_particle_lance_armor_damage
	shield_penetration = @ESC_WEAPON_particle_lance_shield_penetration
	shield_damage = @ESC_WEAPON_particle_lance_shield_damage
	tracking = 0.05

	firing_arc = 25.0
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_particle_lance_titanic" }
	component_set = ESC_PARTICLE_LANCE_ARKSHIP
	projectile_gfx = "esc_particle_lance_titanic_big"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

############################################################
##                    Lightning Cannon                    ##
############################################################

weapon_component_template = {
	key = ESC_ARC_EMITTER_3
	size = extra_large
	icon = GFX_esc_arc_cannon_3
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 50
		MAX_DAMAGE = 2000
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 12 max = 48 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 1.0
	power = -280

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

	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 = 0.0

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_3" }
	component_set = ESC_ARC_EMITTER_3
	projectile_gfx = "esc_arc_emitter_3"
	upgrades_to = ESC_ARC_EMITTER_4
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_ARC_EMITTER_3
	size = extra_large
	icon = GFX_esc_bio_arc_cannon_3
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 50
		MAX_DAMAGE = 2000
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 12 max = 48 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 1.0
	power = -280

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

	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 = 0.0

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_3" }
	component_set = ESC_BIO_ARC_EMITTER_3
	projectile_gfx = "esc_arc_emitter_3"
	upgrades_to = ESC_BIO_ARC_EMITTER_4
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

############################################################
##                       Arc Cannon                       ##
############################################################

weapon_component_template = {
	key = ESC_ARC_EMITTER_4
	size = extra_large
	icon = GFX_esc_arc_cannon_4
	icon_frame = 1
	type = instant

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

	windup = { min = 12 max = 48 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 1.0
	power = -310

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

	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 = 0.05

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_4" }
	component_set = ESC_ARC_EMITTER_4
	projectile_gfx = "esc_arc_emitter_4"
	upgrades_to = ESC_ARC_EMITTER_JUGGERNAUT
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

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

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_ARC_EMITTER_4
	size = extra_large
	icon = GFX_esc_bio_arc_cannon_4
	icon_frame = 1
	type = instant

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

	windup = { min = 12 max = 48 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 1.0
	power = -310

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

	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 = 0.05

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_4" }
	component_set = ESC_BIO_ARC_EMITTER_4
	projectile_gfx = "esc_arc_emitter_4"
	upgrades_to = ESC_ARC_BIO_EMITTER_JUGGERNAUT
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

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

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

############################################################
##                     Divine Thunder                     ##
############################################################

# titan
weapon_component_template = {
	key = ESC_ARC_EMITTER_TITANIC
	size = titanic
	icon = GFX_esc_arc_cannon_titanic
	icon_frame = 1
	type = instant

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

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

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

	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 = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_titanic" }
	component_set = ESC_ARC_EMITTER_TITANIC
	projectile_gfx = "esc_arc_emitter_4_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard_bio
		BIOSHIP_WEAPON = no
		ARKSHIP_WEAPON = no
	}

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_ARC_BIO_EMITTER_TITANIC
	size = titanic
	icon = GFX_esc_bio_arc_cannon_titanic
	icon_frame = 1
	type = instant

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

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

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

	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 = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_titanic" }
	component_set = ESC_ARC_BIO_EMITTER_TITANIC
	projectile_gfx = "esc_arc_emitter_4_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard_bio
		BIOSHIP_WEAPON = yes
		ARKSHIP_WEAPON = no
	}

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# juggernaut
weapon_component_template = {
	key = ESC_ARC_EMITTER_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_arc_cannon_titanic
	icon_frame = 1
	type = instant

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

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

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

	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 = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_titanic" }
	component_set = ESC_ARC_EMITTER_JUGGERNAUT
	projectile_gfx = "esc_arc_emitter_4"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

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

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = ESC_ARC_BIO_EMITTER_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_bio_arc_cannon_titanic
	icon_frame = 1
	type = instant

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

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

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

	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 = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_titanic" }
	component_set = ESC_ARC_BIO_EMITTER_JUGGERNAUT
	projectile_gfx = "esc_arc_emitter_4"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

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

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_ARC_EMITTER_ARKSHIP
	size = titanic
	icon = GFX_esc_arc_cannon_titanic
	icon_frame = 1
	type = instant

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

	windup = { min = 20 max = 60 }
	total_fire_time = 170
	range = @ESC_WEAPON_RANGE_ARKSHIP_4
	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 = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arc_emitter_titanic" }
	component_set = ESC_ARC_EMITTER_ARKSHIP
	projectile_gfx = "esc_arc_emitter_4_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

	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
	}

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

	ai_weight = {
		weight = 1
	}
}

############################################################
##                     Wave-Motion Gun                    ##
############################################################

weapon_component_template = {
	key = ESC_WAVEMOTIONGUN_1
	size = extra_large
	icon = GFX_esc_wave_motion_gun_1
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 1250
		MAX_DAMAGE = 2500
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 9 max = 28 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_1
	accuracy = 0.85
	power = -250

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

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_1" }
	component_set = ESC_WAVEMOTIONGUN_1
	projectile_gfx = "esc_wavemotiongun_1"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }
	upgrades_to = ESC_WAVEMOTIONGUN_2

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_WAVEMOTIONGUN_1
	size = extra_large
	icon = GFX_esc_wave_motion_gun_1
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 1250
		MAX_DAMAGE = 2500
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 9 max = 28 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_1
	accuracy = 0.85
	power = -250

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

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_1" }
	component_set = ESC_BIO_WAVEMOTIONGUN_1
	projectile_gfx = "esc_wavemotiongun_1"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }
	upgrades_to = ESC_BIO_WAVEMOTIONGUN_2

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

############################################################
##                 Dimensional Wave Cannon                ##
############################################################

weapon_component_template = {
	key = ESC_WAVEMOTIONGUN_2
	size = extra_large
	icon = GFX_esc_wave_motion_gun_2
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 1500
		MAX_DAMAGE = 2750
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 9 max = 28 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_1
	accuracy = 0.85
	power = -280

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

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_2" }
	component_set = ESC_WAVEMOTIONGUN_2
	projectile_gfx = "esc_wavemotiongun_2"
	upgrades_to = ESC_WAVEMOTIONGUN_JUGGERNAUT
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_WAVEMOTIONGUN_2
	size = extra_large
	icon = GFX_esc_wave_motion_gun_2
	icon_frame = 1
	type = instant

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 1500
		MAX_DAMAGE = 2750
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 9 max = 28 }
	total_fire_time = 70
	range = @ESC_WEAPON_RANGE_X_1
	accuracy = 0.85
	power = -280

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

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_2" }
	component_set = ESC_BIO_WAVEMOTIONGUN_2
	projectile_gfx = "esc_wavemotiongun_2"
	upgrades_to = ESC_BIO_WAVEMOTIONGUN_JUGGERNAUT
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

############################################################
##            Titanic Dimensional Wave Cannon             ##
############################################################

# titan
weapon_component_template = {
	key = ESC_WAVEMOTIONGUN_3
	size = titanic
	icon = GFX_esc_wave_motion_gun_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 = 20 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_T_2
	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 = exotic_gases
	}

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_titanic" }
	component_set = ESC_WAVEMOTIONGUN_3
	projectile_gfx = "esc_wavemotiongun_3_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard_bio
		BIOSHIP_WEAPON = no
		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
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_WAVEMOTIONGUN_3
	size = titanic
	icon = GFX_esc_wave_motion_gun_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 = 20 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_T_2
	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 = exotic_gases
	}

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_titanic" }
	component_set = ESC_BIO_WAVEMOTIONGUN_3
	projectile_gfx = "esc_wavemotiongun_3_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	inline_script = {
		script = ship_components_general/esc_inlines_titanic_standard_bio
		BIOSHIP_WEAPON = yes
		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
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

# juggernaut
weapon_component_template = {
	key = ESC_WAVEMOTIONGUN_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_wave_motion_gun_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 = 20 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_J_2
	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 = exotic_gases
	}

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_titanic" }
	component_set = ESC_WAVEMOTIONGUN_JUGGERNAUT
	projectile_gfx = "esc_wavemotiongun_3"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = ESC_BIO_WAVEMOTIONGUN_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_wave_motion_gun_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 = 20 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_J_2
	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 = exotic_gases
	}

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_titanic" }
	component_set = ESC_BIO_WAVEMOTIONGUN_JUGGERNAUT
	projectile_gfx = "esc_wavemotiongun_3"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

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

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_WAVEMOTIONGUN_3_ARKSHIP
	size = titanic
	icon = GFX_esc_wave_motion_gun_3
	icon_frame = 1
	type = instant

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

	windup = { min = 20 max = 100 }
	total_fire_time = 150
	range = @ESC_WEAPON_RANGE_ARKSHIP_3
	accuracy = 0.75
	power = 0

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

	hull_damage = @ESC_WEAPON_wmg_hull_damage
	armor_penetration = @ESC_WEAPON_wmg_armor_penetration
	armor_damage = @ESC_WEAPON_wmg_armor_damage
	shield_penetration = @ESC_WEAPON_wmg_shield_penetration
	shield_damage = @ESC_WEAPON_wmg_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_wave_motion_gun_titanic" }
	component_set = ESC_WAVEMOTIONGUN_3_ARKSHIP
	projectile_gfx = "esc_wavemotiongun_3_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

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

############################################################
##                   Arc-en-Ciel Cannon                   ##
############################################################

# no Apocalypse/Federations DLC
weapon_component_template = {
	key = ESC_ARC_EN_CIEL
	size = extra_large
	icon = GFX_esc_arc_en_ciel
	icon_frame = 1
	type = instant

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

	windup = { min = 20.0 max = 50.0 }
	total_fire_time = 75
	range = @ESC_WEAPON_RANGE_X_4
	accuracy = 1.0
	power = -375

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

	hull_damage = @ESC_WEAPON_arc_en_ciel_hull_damage
	armor_penetration = @ESC_WEAPON_arc_en_ciel_armor_penetration
	armor_damage = @ESC_WEAPON_arc_en_ciel_armor_damage
	shield_penetration = @ESC_WEAPON_arc_en_ciel_shield_penetration
	shield_damage = @ESC_WEAPON_arc_en_ciel_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_2
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arcenciel" }
	component_set = ESC_ARC_EN_CIEL
	projectile_gfx = "esc_arc_en_ciel"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_hull artillery }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

############################################################
##               Arc-en-Ciel Cannon (Titanic)             ##
############################################################

# titan
weapon_component_template = {
	key = ESC_ARC_EN_CIEL_TITANIC
	size = titanic
	icon = GFX_esc_arc_en_ciel
	icon_frame = 1
	type = instant

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

	windup = { min = 20.0 max = 60.0 }
	total_fire_time = 170
	range = @ESC_WEAPON_RANGE_T_4
	accuracy = 1.0
	power = -600

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = t
		TIER = 9
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_arc_en_ciel_hull_damage
	armor_penetration = @ESC_WEAPON_arc_en_ciel_armor_penetration
	armor_damage = @ESC_WEAPON_arc_en_ciel_armor_damage
	shield_penetration = @ESC_WEAPON_arc_en_ciel_shield_penetration
	shield_damage = @ESC_WEAPON_arc_en_ciel_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arcenciel_titanic" }
	component_set = ESC_ARC_EN_CIEL_TITANIC
	projectile_gfx = "esc_arc_en_ciel_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

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

# juggernaut
weapon_component_template = {
	key = ESC_ARC_EN_CIEL_JUGGERNAUT
	size = extra_large
	icon = GFX_esc_arc_en_ciel
	icon_frame = 1
	type = instant

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

	windup = { min = 20.0 max = 60.0 }
	total_fire_time = 170
	range = @ESC_WEAPON_RANGE_J_4
	accuracy = 1.0
	power = -600

	inline_script = {
		script = component_costs/shorthands/esc_inlines_standard_cost
		COMPONENT_TYPE = WEAPON
		SIZE = t
		TIER = 9
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	hull_damage = @ESC_WEAPON_arc_en_ciel_hull_damage
	armor_penetration = @ESC_WEAPON_arc_en_ciel_armor_penetration
	armor_damage = @ESC_WEAPON_arc_en_ciel_armor_damage
	shield_penetration = @ESC_WEAPON_arc_en_ciel_shield_penetration
	shield_damage = @ESC_WEAPON_arc_en_ciel_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arcenciel_titanic" }
	component_set = ESC_ARC_EN_CIEL_JUGGERNAUT
	projectile_gfx = "esc_arc_en_ciel"
	tags = { weapon_type_energy x_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	potential = {
		ESC_ship_uses_juggernaut_components = yes
	}

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = 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_dark_matter }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_ARC_EN_CIEL_ARKSHIP
	size = titanic
	icon = GFX_esc_arc_en_ciel
	icon_frame = 1
	type = instant

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

	windup = { min = 20.0 max = 60.0 }
	total_fire_time = 170
	range = @ESC_WEAPON_RANGE_ARKSHIP_4
	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_en_ciel_hull_damage
	armor_penetration = @ESC_WEAPON_arc_en_ciel_armor_penetration
	armor_damage = @ESC_WEAPON_arc_en_ciel_armor_damage
	shield_penetration = @ESC_WEAPON_arc_en_ciel_shield_penetration
	shield_damage = @ESC_WEAPON_arc_en_ciel_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	min_range = @ESC_WEAPON_MIN_RANGE_3
	#use_ship_kill_target = no

	prerequisites = { "esc_tech_arcenciel_titanic" }
	component_set = ESC_ARC_EN_CIEL_ARKSHIP
	projectile_gfx = "esc_arc_en_ciel_titanic"
	tags = { weapon_type_energy t_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery weapon_role_anti_armor artillery }

	# only regular empires may use this component
	valid_for_country = {
		is_fallen_empire = no
	}

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

############################################################
##                     Infernal Weapons                   ##
############################################################

# Blinding Lens Flare Gun
weapon_component_template = {
	key = "ESC_LENS_FLARE_GUN_2"
	size = extra_large
	type = instant
	icon = "GFX_esc_lens_flare_gun_2"
	icon_frame = 1

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 1000
		MAX_DAMAGE = 2200
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 0 max = 12 }
	total_fire_time = 120
	range = @ESC_WEAPON_RANGE_X_2
	accuracy = 0.9
	power = 0

	# doesn't cost anything
	resources = {
		category = ship_components
	}

	hull_damage = @ESC_WEAPON_infernal_beam_hull_damage
	armor_penetration = @ESC_WEAPON_infernal_beam_armor_penetration
	armor_damage = @ESC_WEAPON_infernal_beam_armor_damage
	shield_penetration = @ESC_WEAPON_infernal_beam_shield_penetration
	shield_damage = @ESC_WEAPON_infernal_beam_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	use_ship_main_target = no
	potential = {
		OR = {
			is_ship_size = ember_battleship
			is_ship_size = entropy_conduit
			is_ship_size = conduit_station
		}
	}

	component_set = "ESC_LENS_FLARE_GUN_2"
	projectile_gfx = "lens_flare_beam"
	prerequisites = { "esc_tech_energy_lens_beam_2" }
	tags = { weapon_type_energy weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0
	upgrades_to = ESC_LENS_FLARE_GUN_3

	on_hit = {
		custom_tooltip = "lfb_on_hit_stun_tt"
		hidden_effect = {
			if = {
				limit = {
					exists = this
					NOT = { has_ship_flag = conduit_paralyzed }
				}
				set_timed_ship_flag = { flag = conduit_paralyzed days = 35 }
				add_modifier = {
					modifier = lf_weapon_stun_effect
					days = 7 # If this changes, adjust the tt
				}
			}
			from.owner = { complete_crisis_objective = crisobj_lens_beam_impact }
		}
	}

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

	ai_weight = {
		weight = 1.25
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = entropy_crystals }
		}
	}
}

# Starfire Flare Emitter
weapon_component_template = {
	key = "ESC_LENS_FLARE_GUN_3"
	size = extra_large
	type = instant
	icon = "GFX_esc_lens_flare_gun_3"
	icon_frame = 1

	inline_script = { # damage and collateral damage
		script = weapon_effects/esc_inlines_collateral_damage
		MIN_DAMAGE = 1400
		MAX_DAMAGE = 2800
		COLLATERAL_RANGE = @ESC_COLLATERAL_RANGE_ENERGY_xl
		COLLATERAL_SCALE_MULTIPLIER = @ESC_COLLATERAL_MULTIPLIER
	}

	windup = { min = 0 max = 12 }
	total_fire_time = 120
	range = @ESC_WEAPON_RANGE_X_3
	accuracy = 0.9
	power = 0

	# doesn't cost anything
	resources = {
		category = ship_components
	}

	hull_damage = @ESC_WEAPON_infernal_beam_hull_damage
	armor_penetration = @ESC_WEAPON_infernal_beam_armor_penetration
	armor_damage = @ESC_WEAPON_infernal_beam_armor_damage
	shield_penetration = @ESC_WEAPON_infernal_beam_shield_penetration
	shield_damage = @ESC_WEAPON_infernal_beam_shield_damage
	tracking = 0.1

	firing_arc = 25.0
	use_ship_main_target = no
	potential = {
		OR = {
			is_ship_size = ember_battleship
			is_ship_size = entropy_conduit
			is_ship_size = conduit_station
		}
	}

	component_set = "ESC_LENS_FLARE_GUN_3"
	projectile_gfx = "lens_flare_beam"
	prerequisites = { "esc_tech_energy_lens_beam_3" }
	tags = { weapon_type_energy weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0

	on_hit = {
		custom_tooltip = "lfb_on_hit_stun_tt"
		hidden_effect = {
			if = {
				limit = {
					exists = this
					NOT = { has_ship_flag = conduit_paralyzed }
				}
				set_timed_ship_flag = { flag = conduit_paralyzed days = 35 }
				add_modifier = {
					modifier = lf_weapon_stun_effect
					days = 7 # If this changes, adjust the tt
				}
			}
			from.owner = { complete_crisis_objective = crisobj_lens_beam_impact }
		}
	}

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

	ai_weight = {
		weight = 1.25
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = entropy_crystals }
		}
	}
}

# Nova Flare Cannon
weapon_component_template = {
	key = "ESC_NOVA_FLARE_GUN"
	size = extra_large
	type = instant
	prio_projectile = yes
	icon = "GFX_ship_part_energy_lens_beam"
	icon_frame = 1

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

	windup = { min = 30.0 max = 120.0 }
	total_fire_time = 180
	range = @ESC_WEAPON_RANGE_T_3
	accuracy = 0.9

	# doesn't cost anything
	resources = {
		category = ship_components
	}

	hull_damage = @ESC_WEAPON_infernal_beam_cannon_hull_damage
	armor_penetration = @ESC_WEAPON_infernal_beam_cannon_armor_penetration
	armor_damage = @ESC_WEAPON_infernal_beam_cannon_armor_damage
	shield_penetration = @ESC_WEAPON_infernal_beam_cannon_shield_penetration
	shield_damage = @ESC_WEAPON_infernal_beam_cannon_shield_damage
	tracking = 0.1

	firing_arc = 10.0
	use_ship_main_target = no

	tags = { weapon_type_energy weapon_role_artillery x_slot }

	potential = { is_ship_size = starfire_cannon }
	component_set = "ESC_NOVA_FLARE_GUN"
	projectile_gfx = "starfire_cannon"
	upgrades_to = ESC_SUPERNOVA_FLARE_GUN

	target_type = target_enemies
	target_focus = spread
	on_hit = {
		custom_tooltip = "sfe_on_hit_stun_tt"
		hidden_effect = {
			if = {
				limit = {
					exists = this
					NOT = { has_ship_flag = starfire_emp }
				}
				set_timed_ship_flag = { flag = starfire_emp days = 15 }
				add_modifier = {
					modifier = sfe_weapon_stun_effect
					days = 5 # If this changes, adjust the tt
				}
			}
		}
	}

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

# Supernova Flare Cannon
weapon_component_template = {
	key = "ESC_SUPERNOVA_FLARE_GUN"
	size = extra_large
	type = instant
	prio_projectile = yes
	icon = "GFX_ship_part_energy_lens_beam"
	icon_frame = 1

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

	windup = { min = 30.0 max = 120.0 }
	total_fire_time = 180
	range = @ESC_WEAPON_RANGE_T_3
	accuracy = 0.9

	# doesn't cost anything
	resources = {
		category = ship_components
	}

	hull_damage = @ESC_WEAPON_infernal_beam_cannon_hull_damage
	armor_penetration = @ESC_WEAPON_infernal_beam_cannon_armor_penetration
	armor_damage = @ESC_WEAPON_infernal_beam_cannon_armor_damage
	shield_penetration = @ESC_WEAPON_infernal_beam_cannon_shield_penetration
	shield_damage = @ESC_WEAPON_infernal_beam_cannon_shield_damage
	tracking = 0.1

	firing_arc = 10.0
	use_ship_main_target = no

	tags = { weapon_type_energy weapon_role_artillery x_slot }

	potential = { is_ship_size = starfire_cannon }
	component_set = "ESC_SUPERNOVA_FLARE_GUN"
	projectile_gfx = "starfire_cannon"

	target_type = target_enemies
	target_focus = spread
	on_hit = {
		custom_tooltip = "sfe_on_hit_stun_tt"
		hidden_effect = {
			if = {
				limit = {
					exists = this
					NOT = { has_ship_flag = starfire_emp }
				}
				set_timed_ship_flag = { flag = starfire_emp days = 15 }
				add_modifier = {
					modifier = sfe_weapon_stun_effect
					days = 5 # If this changes, adjust the tt
				}
			}
		}
	}

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

############################################################
##                   Arc Energy Shockwave                 ##
############################################################

# titan
weapon_component_template = {
	key = ESC_ARC_SHOCKWAVE
	size = titanic
	icon = GFX_esc_arc_shockwave
	icon_frame = 1
	type = instant

	inline_script = { # shockwave damage
		script = weapon_effects/esc_inlines_shockwave_damage
		MIN_DAMAGE = 250
		MAX_DAMAGE = 2000
		ATTACK_RANGE = @ESC_WEAPON_RANGE_M_2
	}

	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 = rare_crystals
	}

	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" }
	component_set = ESC_ARC_SHOCKWAVE
	projectile_gfx = "esc_arc_shockwave"
	tags = { weapon_type_energy 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 = rare_crystals }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_ARC_SHOCKWAVE_ARKSHIP
	size = titanic
	icon = GFX_esc_arc_shockwave
	icon_frame = 1
	type = instant

	inline_script = { # shockwave damage
		script = weapon_effects/esc_inlines_shockwave_damage
		MIN_DAMAGE = 1000
		MAX_DAMAGE = 3000
		ATTACK_RANGE = @ESC_WEAPON_RANGE_ARKSHIP_1
	}

	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" }
	component_set = ESC_ARC_SHOCKWAVE_ARKSHIP
	projectile_gfx = "esc_arc_shockwave"
	tags = { weapon_type_energy 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
	}
}

############################################################
##                  Dark Matter Halo Blast                ##
############################################################

# titan
weapon_component_template = {
	key = ESC_DARK_MATTER_SHOCKWAVE
	size = titanic
	icon = GFX_esc_dark_matter_shockwave
	icon_frame = 1
	type = instant

	inline_script = { # shockwave damage with applied effect
		script = weapon_effects/esc_inlines_shockwave_damage_with_effect
		MIN_DAMAGE = 500
		MAX_DAMAGE = 2500
		ATTACK_RANGE = @ESC_WEAPON_RANGE_M_3
		MODIFIER_TYPE = esc_gravitic_weapon_movement_speed_debuff_2
		MODIFIER_DURATION = 10
		EFFECT_TOOLTIP = esc_dark_matter_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 = 9
		STRATEGIC_RESOURCE_TYPE = sr_dark_matter
	}

	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_dark_matter" }
	component_set = ESC_DARK_MATTER_SHOCKWAVE
	projectile_gfx = "esc_dark_matter_shockwave"
	tags = { weapon_type_energy 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_dark_matter }
		}
	}
}

# arkship
weapon_component_template = {
	key = ESC_DARK_MATTER_SHOCKWAVE_ARKSHIP
	size = titanic
	icon = GFX_esc_dark_matter_shockwave
	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 = 3750
		ATTACK_RANGE = @ESC_WEAPON_RANGE_ARKSHIP_2
		MODIFIER_TYPE = esc_gravitic_weapon_movement_speed_debuff_2
		MODIFIER_DURATION = 10
		EFFECT_TOOLTIP = esc_dark_matter_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_dark_matter" }
	component_set = ESC_DARK_MATTER_SHOCKWAVE_ARKSHIP
	projectile_gfx = "esc_dark_matter_shockwave"
	tags = { weapon_type_energy 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
	}
}
