weapon_component_template = {
	key = "PERDITION_BEAM_FLAGSHIP"
	size = titanic
	type = instant
	prio_projectile = yes
	
	icon = "GFX_ship_part_perdition_beam"
	icon_frame = 1
	
	firing_arc = 10.0
	use_ship_main_target = no
	
	power = -500
	damage = { min = 10000 max = 16000 }
	hull_damage = 1.25
	shield_damage = 0.75
	shield_penetration = 0.0
	armor_damage = 1.50
	armor_penetration = 0.0
	windup = { min = 80 max = 120 }
	total_fire_time = 120
	min_range = 30.0
	range = 200
	accuracy = 0.85
	tracking = 0.0
	
	prerequisites = { "tech_Flagship_1" }
	component_set = "PERDITION_BEAM_FLAGSHIP"
	projectile_gfx = "perdition_beam"
	tags = { weapon_type_energy weapon_role_artillery t_slot }
	ai_tags = { weapon_role_artillery }
	potential = {
		ship_uses_flagship_components = yes
	}
	inline_script = "targeting/capital_ships"

	resources = {
		category = ship_components
		cost = { alloys = @xl_t7_cost }		
		upkeep = {
			energy = @xl_t7_upkeep_energy
			alloys = @xl_t7_upkeep_alloys
		}
	}
	
	ai_weight = { weight = 1 }
}

weapon_component_template = {
	key = "PERDITION_BEAM_STARBASE"
	size = titanic
	entity = "large_laser_gun_entity"
	type = instant
	prio_projectile = yes
	damage = { min = 10000 max = 15000 }
	windup = { min = 30 max = 45 }
	total_fire_time = 300
	firing_arc = 360.0
	min_range = 50
	range = 200
	accuracy = 0.95
	type = instant
	power = -1000
	hull_damage = 1.25
	armor_damage = 1.50
	shield_damage = 0.75	
	icon = "GFX_ship_part_perdition_beam"
	icon_frame = 1	
	firing_arc = 360.0
	use_ship_main_target = no
	tags = { weapon_type_energy weapon_role_artillery t_slot }
	component_set = "PERDITION_BEAM_STARBASE"
	projectile_gfx = "perdition_beam"
	potential = {
		ship_uses_special_starbase_components = yes
	}
	inline_script = "targeting/capital_ships"
}

# weapon_component_template = {
	# key = "POINT_DEFENCE_STARBASE"
	# size = point_defence
	# icon = "GFX_ship_part_point_defense_3"
	# icon_frame = 1
	# entity = "turret_point_defence_entity"
	# type = point_defence
	# damage = { min = 2 max = 6 }
	# windup = { min = 0 max = 0 }
	# total_fire_time = 60
	# range = 35
	# accuracy = 0.75
	# power = -20
	# hull_damage = 1.0
	# armor_penetration = 0.0
	# armor_damage = 1.0
	# shield_penetration = 0.0
	# shield_damage = 1.0
	# tracking = 0.4
	# component_set = "POINT_DEFENCE_STARBASE"
	# projectile_gfx = "white_laser_pd"
	# tags = { weapon_type_point_defense weapon_type_energy }
	# ai_tags = { weapon_role_point_defense screen }
	# potential = {
		# is_ship_class = shipclass_starbase
	# }
	# point_defence_targets = { "missile" "strike_craft" }
# }

weapon_component_template = {
	key = "XL_BEAM_STARBASE"
	size = extra_large
	type = instant
	
	icon = "GFX_ship_part_energy_lance_2"
	icon_frame = 1
	
	firing_arc = 360.0
	min_range = 50
	
	power = -350
	damage = { min = 3000 max = 6000 }
	hull_damage = 1.50
	shield_damage = 0.50
	shield_penetration = 0.0
	armor_damage = 2.00
	armor_penetration = 0.0
	windup = { min = 10 max = 20 }
	total_fire_time = 500
	range = 200
	accuracy = 0.85
	tracking = 0.0

	component_set = "XL_BEAM_STARBASE"
	projectile_gfx = "tachyon_lance"
	tags = { weapon_type_energy weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery }
	potential = {
		ship_uses_special_starbase_components = yes
	}
	inline_script = "targeting/capital_ships"
	
	resources = {
		category = ship_components
		cost = { alloys = @xl_t6_cost }		
		upkeep = {
			energy = @xl_t6_upkeep_energy
			alloys = @xl_t6_upkeep_alloys
		}
	}

	ai_weight = { weight = 1 }
}


weapon_component_template = {
	key = "BATTLESHIP_SNIPER_GUN_1"
	size = small
	type = instant
	
	icon = "GFX_ship_part_nsc_bb_sniper_1"
	icon_frame = 1	
	power = -35
	damage = { min = 15 max = 55 }
	hull_damage = 1.25
	shield_damage = 1.5
	shield_penetration = 0.0
	armor_damage = 0.5
	armor_penetration = 0.0
	windup = { min = 1.0 max = 15.0 }
	total_fire_time = 20
	range = 40
	accuracy = 0.90
	tracking = 0.80
	
	prerequisites = { "tech_spitfire_1" }
	component_set = "NSC_BB_SNIPER"
	projectile_gfx = "gauss_cannon_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield }
	potential = {
		OR = {
			is_ship_class = shipclass_military_station
			is_ship_size = battleship
		}
	}
	inline_script = "targeting/support_ships"
	
	resources = {
		category = ship_components
		cost = { alloys = @s_t7_cost }		
		upkeep = {
			energy = @s_t7_upkeep_energy
			alloys = @s_t7_upkeep_alloys
		}
	}

	ai_weight = { weight = 1 }
}


weapon_component_template = {
	key = "BATTLESHIP_SNIPER_GUN_2"
	size = small
	type = instant
	
	icon = "GFX_ship_part_nsc_bb_sniper_2"
	icon_frame = 1	
	
	power = -35
	damage = { min = 15 max = 55 }
	hull_damage = 1.0
	shield_damage = 0.5
	shield_penetration = 0.0
	armor_damage = 1.5
	armor_penetration = 0.25
	windup = { min = 1.0 max = 15.0 }
	total_fire_time = 20
	range = 40

	accuracy = 0.90
	tracking = 0.80
	
	prerequisites = { "tech_spitfire_1" }
	component_set = "NSC_BB_SNIPER_2"
	projectile_gfx = "infrared_laser_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor }
	potential = {
		OR = {
			is_ship_class = shipclass_military_station
			is_ship_size = battleship
		}
	}
	inline_script = "targeting/support_ships"
	
	resources = {
		category = ship_components
		cost = { alloys = @s_t7_cost }		
		upkeep = {
			energy = @s_t7_upkeep_energy
			alloys = @s_t7_upkeep_alloys
		}
	}

	ai_weight = { weight = 1 }
}

weapon_component_template = {
	key = NSC_HYPER_DISRUPTOR
	size = small
	icon = "GFX_ship_part_nsc_emp" #icon = "GFX_ship_part_nsc_warp_disruptor"
	icon_frame = 1
	type = instant
	windup = { min = 1.0 max = 15.0 }
	total_fire_time = 20
	range = 50
	accuracy = 1
	tracking = 1

	hide_damage_values_from_tooltip = yes
	prerequisites = { "tech_StrikeCruiser_1" }
	component_set = "NSC_FTL_SCAMBLER"
	projectile_gfx = "infrared_laser_s"
	tags = { interdictor weapon_type_energy s_slot }

	potential = {
		ship_uses_strikecruiser_components = yes
		from = {
			country_uses_bio_ships = no
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}
	target_type = target_enemies
	target_focus = focused
	injected_modifier = {
		modifier = nsc_ftl_disrupted
		days = 15
	}

	target_weights = {
		Flagship = 10
		titan = 9
		Dreadnought = 8
		nanite_interdictor = 7
		Carrier = 6
		battleship = 5
		Battlecruiser = 4
		cruiser = 3
		destroyer = 2
		frigate = 1
		corvette = 1
	}

	ship_limit = 2

	blocked_by = {
		NSC_STRIKE_CRUISER_AURA
		NSC_STRIKE_CRUISER_AURA_2
	}

	resources = {
	category = ship_components
		cost = {
			energy = 0.3
			alloys = 0.3
		}
		upkeep = {
			energy = 0.3
			alloys = 0.3
		}
	}
}