############################################################
###          Technologies : auxiliary components         ###
############################################################

# ── Advanced Fire Control Systems				: advanced version of vanilla auxiliary fire control
# ── Pulsed Plasma Afterburners					: tier 3 afterburners
# ── Auxiliary Zero Point Reactor				: tier 4 auxiliary reactor
#     └─ Auxiliary Singularity Reactor			: tier 5 auxiliary reactor
# ── Improved Shield Capacitors					: stronger version of shield capacitors
# ── Crystal-Infused Shield Capacitors			: shield capacitors that also improve hull strength
# ── Crystal-Forged Shield Capacitors			: shield capacitors that also improve hull strength
# ── Auxiliary Maneuver Thrusters				: advanced evasion component
# ── Stellarite Power Core						: improves kinetic and energy weapons; requires killed Stellarite Devourer / Leviathans DLC
# ── Warhead Standardization					: improves missile weapons
# ── Psionic Reinforcement						: imrpves hull strength at the cost of lowered shields
# ── Structural Reinforcement					: auxiliary component that increases hull strength
# ── Reapir Drones								: auxiliary component for automatic ship repair
# ── Temporal Displacer							: adds a bit of evasion and large emergency ftl boost
# ── Nanite Reactive Armor						: auxiliary component for armor hardening
# ── Living Absorption Plating					: auxiliary component for armor hardening
# ── Citadel Shield Hardener					: auxiliary component for shield hardening
# ── Shroud-Enhanced Shield Hardener			: auxiliary component for shield hardening
# ── Dead Hand Switch: Kill Command				: tier 1 damaging self-destruct
#     └─ Dead Hand Switch: Annihilate Command	: tier 2 damaging self-destruct
# ── Dead Hand Switch: Repair Command			: tier 1 repairing self-destruct
#     └─ Dead Hand Switch: Support Command		: tier 2 repairing self-destruct

############################################################
##            Advanced Fire Control Systems               ##
############################################################

esc_tech_auxiliary_fire_control_2 = {
	area = physics
	tier = 3
	cost = @tier3cost2
	weight = @tier3weight2
	category = { computing }
	ai_update_type = military
	prerequisites = { "tech_auxiliary_fire_control" "esc_tech_grand_research_initiative" }

	technology_swap = {
		name = esc_tech_auxiliary_fire_control_2_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##              Pulsed Plasma Afterburners                ##
############################################################

esc_tech_afterburners_3 = {
	area = engineering
	category = { propulsion }
	tier = 4
	cost = @tier4cost3
	weight = @tier4weight3
	ai_update_type = all
	prerequisites = { "tech_afterburners_2" "esc_tech_grand_research_initiative" }

	technology_swap = {
		name = esc_tech_afterburners_3_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		factor = 1.25
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##             Auxiliary Zero Point Reactor               ##
############################################################

esc_tech_reactor_booster_4 = {
	area = physics
	category = { particles }
	tier = 4
	cost = @tier4cost2
	weight = @tier4weight2
	ai_update_type = all
	prerequisites = { "tech_zero_point_power" "tech_reactor_boosters_3" "esc_tech_grand_research_initiative" }

	technology_swap = {
		name = esc_tech_reactor_booster_4_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOR = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
			has_global_flag = ESC_GLOBAL_FLAG_reactors_forbidden
			AND = {
				has_global_flag = @NSC_active_flag
				country_uses_bio_ships = no
			}
			has_global_flag = @ACOT_active_flag
		}
	}

	weight_modifier = {
		factor = 1.5
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##             Auxiliary Singularity Reactor              ##
############################################################

esc_tech_reactor_booster_5 = {
	area = physics
	category = { particles }
	tier = 5
	cost = @tier5cost2
	weight = @tier5weight2
	ai_update_type = all
	prerequisites = { "esc_tech_reactor_7" "esc_tech_reactor_booster_4" }
	is_rare = yes

	technology_swap = {
		name = esc_tech_reactor_booster_5_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOR = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
			has_global_flag = ESC_GLOBAL_FLAG_reactors_forbidden
			AND = {
				has_global_flag = @NSC_active_flag
				country_uses_bio_ships = no
			}
			has_global_flag = @ACOT_active_flag
		}
	}

	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_reactor_booster_5 }
			}
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_reactor_booster_5 }
			}
		}
	}
}

############################################################
##              Improved Shield Capacitors                ##
############################################################

esc_tech_advanced_shield_capacitors = {
	area = physics
	category = { field_manipulation }
	tier = 4
	cost = @tier4cost2
	weight = @tier4weight2
	ai_update_type = all
	prerequisites = { "esc_tech_grand_research_initiative" "tech_shield_rechargers_1" }
	is_rare = yes

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_advanced_shield_capacitors }
			}
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_advanced_shield_capacitors }
			}
		}
	}
}

############################################################
##          Crystal-Infused Shield Capacitors             ##
############################################################

esc_tech_crystal_infused_capacitor = {
	area = physics
	category = { field_manipulation }
	tier = 3
	cost = @tier3cost3
	weight = @tier3weight3
	ai_update_type = all
	prerequisites = { "tech_shield_rechargers_1" "tech_crystal_armor_1" }
	is_rare = yes

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_crystal_infused_capacitor }
			}
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_crystal_infused_capacitor }
			}
		}
	}
}

############################################################
##          Crystal-Forged Shield Capacitors              ##
############################################################

esc_tech_crystal_forged_capacitor = {
	area = physics
	category = { field_manipulation }
	tier = 4
	cost = @tier4cost3
	weight = @tier4weight3
	ai_update_type = all
	prerequisites = { "tech_shield_rechargers_1" "tech_crystal_armor_2" }
	is_rare = yes

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_crystal_forged_capacitor }
			}
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_crystal_forged_capacitor }
			}
		}
	}
}

############################################################
##             Auxiliary Maneuver Thrusters               ##
############################################################

esc_tech_aux_maneuver_thrusters = {
	area = engineering
	category = { propulsion }
	tier = 4
	cost = @tier4cost3
	weight = @tier4weight3
	ai_update_type = all
	prerequisites = { "tech_afterburners_2" "esc_tech_grand_research_initiative" }

	potential = {
		country_uses_bio_ships = no
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		factor = 1.25
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##                Stellarite Power Core                   ##
############################################################

esc_tech_stellarite_powercore = {
	area = physics
	category = { field_manipulation }
	tier = 5
	cost = @tier5cost1
	weight = @tier5weight1
	ai_update_type = all
	prerequisites = { }
	is_rare = yes

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_stellarite_tech_forbidden }
	}

	weight_modifier = {
		modifier = {
			factor = 0
			NOT = { has_country_flag = ESC_COUNTRY_FLAG_killed_stellarite_devourer }
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = 0
			NOT = { has_country_flag = ESC_COUNTRY_FLAG_killed_stellarite_devourer }
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}
}

############################################################
##               Warhead Standardization                  ##
############################################################

esc_tech_standardized_warheads = {
	area = engineering
	category = { voidcraft }
	tier = 4
	cost = @tier4cost3
	weight = @tier4weight3
	ai_update_type = all
	prerequisites = { "esc_tech_grand_research_initiative" }

	technology_swap = {
		name = esc_tech_standardized_warheads_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		modifier = {
			factor = 0
			NOR = {
				has_technology = "tech_missiles_5"
				has_technology = "tech_swarmer_missiles_2"
			}
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = 0
			NOR = {
				has_technology = "tech_missiles_5"
				has_technology = "tech_swarmer_missiles_2"
			}
		}
	}
}

############################################################
##              Structural Reinforcement                  ##
############################################################

esc_tech_structural_reinforcement = {
	area = engineering
	category = { materials }
	tier = 3
	cost = @tier3cost3
	weight = @tier3weight3
	prerequisites = { "esc_tech_grand_research_initiative" "tech_cruisers" }

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		factor = 1.25
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##                     Repair Drones                      ##
############################################################

esc_tech_repair_drones = {
	area = engineering
	category = { materials }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	prerequisites = { "esc_tech_grand_research_initiative" }

	technology_swap = {
		name = esc_tech_repair_drones_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
	}

	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 0
			country_uses_bio_ships = no
			NOT = { has_technology = "tech_cruisers" }
		}
		modifier = {
			factor = 0
			country_uses_bio_ships = yes
			NOT = { has_technology = tech_weavers }
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = 0
			country_uses_bio_ships = no
			NOT = { has_technology = "tech_cruisers" }
		}
		modifier = {
			factor = 0
			country_uses_bio_ships = yes
			NOT = { has_technology = tech_weavers }
		}
	}
}

############################################################
##                 Psionic Reinforcement                  ##
############################################################

esc_tech_psionic_reinforcement = {
	area = society
	category = { psionics }
	tier = 5
	cost = @tier5cost3
	weight = @tier5weight3
	ai_update_type = military
	prerequisites = { "tech_psionic_shield" "esc_tech_psionic_weapons" }
	is_rare = yes
	is_reverse_engineerable = no

	potential = {
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden }
		NOT = { has_global_flag = ESC_GLOBAL_FLAG_psionic_weapons_forbidden }
	}

	weight_modifier = {
		modifier = {
			factor = 0
			ESC_TRIGGER_may_research_psionic_weapons_advanced = no
		}
		modifier = {
			factor = 0.75
			NOR = {
				has_trait_in_council = { TRAIT = leader_trait_curator }
				has_trait_in_council = { TRAIT = leader_trait_inquisitive }
				has_trait_in_council = { TRAIT = leader_trait_inquisitive_2 }
				has_trait_in_council = { TRAIT = leader_trait_inquisitive_3 }
				has_trait_in_council = { TRAIT = leader_trait_maniacal }
				has_trait_in_council = { TRAIT = leader_trait_maniacal_2 }
				has_trait_in_council = { TRAIT = leader_trait_maniacal_3 }
			}
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = 0
			ESC_TRIGGER_may_research_psionic_weapons_advanced = no
		}
		modifier = {
			factor = 1.25
			OR = {
				has_trait_in_council = { TRAIT = leader_trait_curator }
				has_trait_in_council = { TRAIT = leader_trait_inquisitive }
				has_trait_in_council = { TRAIT = leader_trait_inquisitive_2 }
				has_trait_in_council = { TRAIT = leader_trait_inquisitive_3 }
				has_trait_in_council = { TRAIT = leader_trait_maniacal }
				has_trait_in_council = { TRAIT = leader_trait_maniacal_2 }
				has_trait_in_council = { TRAIT = leader_trait_maniacal_3 }
			}
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}
}

############################################################
##                   Temporal Displacer                   ##
############################################################

esc_tech_temporal_displacer = {
	area = physics
	category = { field_manipulation }
	tier = 6
	cost = @ESC_TECH_tier6_cost3
	weight = @ESC_TECH_tier6_weight3
	ai_update_type = all
	prerequisites = { "esc_tech_chrono_spatial_weapons" }
	is_rare = yes
	is_dangerous = yes

	technology_swap = {
		name = esc_tech_temporal_displacer_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOR = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
			has_global_flag = ESC_GLOBAL_FLAG_reactors_forbidden
		}
	}

	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_temporal_displacer }
			}
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = esc_tech_temporal_displacer }
			}
		}
	}
}

############################################################
##                  Nanite Reactive Armor                 ##
############################################################

esc_tech_armor_hardening_3 = {
	area = society
	category = { materials }
	tier = 5
	cost = @tier5cost3
	weight = @tier5weight3
	ai_update_type = all
	prerequisites = { "tech_armor_hardeners_1" "esc_tech_synthetic_lifeform_studies" }
	is_rare = yes

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.15
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = 1.15
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}
}

############################################################
##                Living Absorption Plating               ##
############################################################

esc_tech_armor_hardening_lm_2 = {
	area = engineering
	category = { materials }
	tier = 6
	cost = @ESC_TECH_tier6_cost2
	weight = @ESC_TECH_tier6_weight2
	ai_update_type = all
	prerequisites = { "tech_armor_hardeners_2" }
	is_rare = yes

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.15
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = 1.15
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
		}
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}
}

############################################################
##                Citadel Shield Hardener                 ##
############################################################

esc_tech_shield_hardening_3 = {
	area = physics
	category = { field_manipulation }
	tier = 5
	cost = @tier5cost3
	weight = @tier5weight3
	ai_update_type = all
	prerequisites = { "tech_shield_hardeners_1" "esc_tech_advanced_shield_capacitors" }
	is_rare = yes

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	weight_modifier = {
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}
}

############################################################
##            Shroud-Enhanced Shield Hardener             ##
############################################################

esc_tech_shield_hardening_psi_2 = {
	area = society
	category = { psionics }
	tier = 6
	cost = @ESC_TECH_tier6_cost2
	weight = @ESC_TECH_tier6_weight2
	ai_update_type = all
	prerequisites = { "tech_shield_hardeners_2" "esc_tech_psionic_weapons" }
	is_rare = yes

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	weight_modifier = {
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
		modifier = {
			factor = @ESC_TECH_Technology_Ascendancy_weight_modifier
			has_ascension_perk = ap_technological_ascendancy
		}
	}
}

############################################################
##            Dead Hand Switch: Kill Command              ##
############################################################

esc_tech_dead_hand_switch_kill_1 = {
	area = society
	category = { military_theory }
	tier = 2
	cost = @tier2cost2
	weight = @tier2cost2
	ai_update_type = all
	prerequisites = { "tech_interstellar_fleet_traditions" }

	technology_swap = {
		name = esc_tech_dead_hand_switch_kill_1_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##         Dead Hand Switch: Annihilate Command           ##
############################################################

esc_tech_dead_hand_switch_kill_2 = {
	area = society
	category = { military_theory }
	tier = 5
	cost = @tier5cost1
	weight = @tier5weight1
	ai_update_type = all
	prerequisites = { "esc_tech_dead_hand_switch_kill_1" "esc_tech_new_age_warfare" }

	technology_swap = {
		name = esc_tech_dead_hand_switch_kill_2_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##        Dead Hand Switch: Repair Allies Command         ##
############################################################

esc_tech_dead_hand_switch_heal_1 = {
	area = society
	category = { military_theory }
	tier = 2
	cost = @tier2cost2
	weight = @tier2cost2
	ai_update_type = all
	prerequisites = { "tech_interstellar_fleet_traditions" }

	technology_swap = {
		name = esc_tech_dead_hand_switch_heal_1_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}

############################################################
##       Dead Hand Switch: Support Allies Command         ##
############################################################

esc_tech_dead_hand_switch_heal_2 = {
	area = society
	category = { military_theory }
	tier = 5
	cost = @tier5cost1
	weight = @tier5weight1
	ai_update_type = all
	prerequisites = { "esc_tech_dead_hand_switch_heal_1" "esc_tech_new_age_warfare" }

	technology_swap = {
		name = esc_tech_dead_hand_switch_heal_2_bio
		inherit_icon = no
		inherit_effects = yes
		trigger = { country_uses_bio_ships = yes }
		weight = { factor = 1 }
	}

	potential = {
		NOT = {
			has_global_flag = ESC_GLOBAL_FLAG_auxiliary_forbidden
		}
	}

	ai_weight = {
		factor = @ESC_AI_tech_weight_multiplier
	}
}
