# Icons set here are the ones show in the actual slot. The reason is so that we can support different icons for different sizes.

#############
#	COST	#
#############

@cost_6S = 30
@cost_6M = 60
@cost_6L = 120

#############
#	 FTL	#
#############

@ftl1 = 5
@ftl2 = 10
@ftl3 = 15
@ftl4 = 30

@power1 = -5
@power2 = -7.5
@power3 = -10
@power4 = -10

########################
# Enigmatic Fortress
########################

utility_component_template = {
	key = "ENIGMATIC_DECODER"
	size = aux
	icon = "GFX_ship_part_enigmatic_decoder"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 20
		}
	}

	prerequisites = { tech_enigmatic_decoder }
	component_set = "ENIGMATIC_DECODER"

	ship_modifier = {
		ship_tracking_add = 5
		ship_accuracy_add = 5
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = 2
			OR = {
				is_preferred_weapons = weapon_type_energy
				is_preferred_weapons = weapon_type_kinetic
			}
		}
	}
}

utility_component_template = {
	key = "ENIGMATIC_ENCODER"
	size = aux
	icon = "GFX_ship_part_enigmatic_encoder"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 20
		}
	}

	prerequisites = { tech_enigmatic_encoder }
	component_set = "ENIGMATIC_ENCODER"

	ship_modifier = {
		ship_disengage_opportunities_add = 1
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = 0 # Don't use this if you might use No Retreat.
			OR = {
				is_militarist = yes
				has_ethic = ethic_gestalt_consciousness
				has_civic = civic_fanatic_purifiers
			}
		}
	}
}

utility_component_template = {
	key = "ENIGMATIC_DISRUPTION_FIELD"
	size = medium
	icon = "GFX_ship_part_enigmatic_disruption_field"
	icon_frame = 1
	power = 0
	hidden = yes

	component_set = "ENIGMATIC_DISRUPTION_FIELD"

	hostile_aura = {
		name = "aura_shield_dampener"
		radius = 120
		apply_on = ships

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = hostile_inhibitor_aura
			priority = 1
		}

		modifier = {
			ship_shield_regen_add_perc = -0.10
			ship_fire_rate_mult = -0.20
		}
	}
}

########################
# Dimensional Horror
########################

### jump drive with no range
utility_component_template = {
	key = "RANGELESS_JUMP_DRIVE"
	size = small
	icon = "GFX_ship_part_empty_ftl_drive"
	icon_frame = 1
	power = 0
	should_ai_use = no
	jumpdrive = yes
	ship_modifier = {
		# should not be able to jump anywhere
		ship_ftl_jumpdrive_range_mult = -1
	}

	hidden = yes
}

#############################
# Toxic Entity Acidic Field
#############################
utility_component_template = {
	key = "GUARDIAN_DISINTEGRATOR_FIELD"
	size = medium
	icon = "GFX_disintegrator_field"
	icon_frame = 1
	power = 0

	hostile_aura = {
		name = "aura_guardian_hull_degenerator"
		system_wide = yes

		stack_info = {
			id = hostile_guardian_hull_degenerator_aura
			priority = 10
		}

		modifier = {
			ship_hull_regen_add_perc = -1.25
		}
	}
}

###################################
# Extradimensional Portal Hardening
###################################
utility_component_template = {
	key = "EXTRADIMENSIONAL_STABILIZING_AURA"
	size = medium
	icon = "GFX_ship_part_aura_shield_recharger"
	icon_frame = 1
	power = 0

	friendly_aura = {
		name = "aura_stabilizing_aura"
		system_wide = yes

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = friendly_shield_hardening
			priority = 20
		}

		modifier = {
			ship_shield_hardening_add = 0.50
		}
	}

	ship_modifier = {
		ship_cloaking_detection_add = 10
	}
}

###################################
# Contingency Core Cloaking Detectors
###################################
utility_component_template = {
	key = "AI_CORE_DETECTOR"
	size = medium
	icon = "GFX_bulwark_array"
	icon_frame = 1
	power = 0

	ship_modifier = {
		ship_cloaking_detection_add = 8
	}
}
