############################################################
###                 ESC Scripted Triggers                ###
############################################################

# returns true if ESC is active
is_extra_ship_components_activate = { always = yes }

# - detection of empire type
# - checks for whether advanced weapons are enabled
# - checks for culture worker types
# - checks for industrial galactic community resolutions
# - checks for technology access
# - checks for starbase module locational prerequisites
# - checks for shield types

############################################################
###               Playable Empire Detection              ###
############################################################

# returns yes if the empire is playable type
ESC_TRIGGER_is_playable_empire = {
    any_playable_country = {
        is_same_empire = PREV
    }
}

############################################################
###                 Empire Type Detection                ###
############################################################

# returns 'yes' if the country is a normal empire or a machine FE/AFE
ESC_TRIGGER_is_normal_empire_or_machine_fe = {
    OR = {
        is_fallen_empire = no
        is_fallen_empire_machine = yes
    }
}

# returns 'yes' if the country is a normal empire or a materialist FE/AFE
ESC_TRIGGER_is_normal_empire_or_materialist_fe = {
    OR = {
        is_fallen_empire = no
        is_fallen_empire_materialist = yes
    }
}

# returns 'yes' if the country is a normal empire or a spiritualist FE/AFE
ESC_TRIGGER_is_normal_empire_or_spiritualist_fe = {
    OR = {
        is_fallen_empire = no
        is_fallen_empire_spiritualist = yes
    }
}

# returns 'yes' if the country is a normal empire or a xenophile FE/AFE
ESC_TRIGGER_is_normal_empire_or_xenophile_fe = {
    OR = {
        is_fallen_empire = no
        is_fallen_empire_xenophile = yes
    }
}

############################################################
###                      Weapon Types                    ###
############################################################

# returns 'yes' if at least one weapon category requiring "New Age Warfare" tech is enabled
ESC_TRIGGER_advanced_weapons_enabled = {
    NAND = {
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_kinetic_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_energy_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_missile_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_pd_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_strikecrafts_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_creature_weapons_forbidden

        has_global_flag = ESC_GLOBAL_FLAG_biological_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_crystalline_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_gravitic_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_nanite_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_psionic_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_tesla_weapons_forbidden

        has_global_flag = ESC_GLOBAL_FLAG_plasma_missiles_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_big_autocannons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_chronospatial_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_crisis_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_enigmatic_weapons_forbidden
    }
    ESC_TRIGGER_advanced_heavy_weapons_enabled = yes
}

# returns 'yes' if at least one extra-large or titanic weapon is enabled
ESC_TRIGGER_advanced_heavy_weapons_enabled = {
    NAND = {
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_kinetic_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_energy_lances_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_adv_vanilla_arc_emitters_forbidden

        has_global_flag = ESC_GLOBAL_FLAG_biological_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_crystalline_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_gravitic_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_nanite_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_psionic_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_tesla_x_weapons_forbidden

        has_global_flag = ESC_GLOBAL_FLAG_wavemotiongun_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_xmissiles_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_xautocannons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_mhd_cannons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_arcenciel_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_crisis_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_enigmatic_x_weapons_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_tiyanki_tech_forbidden
        has_global_flag = ESC_GLOBAL_FLAG_voidspawn_tech_forbidden
    }
}

############################################################
###                 Culture Worker Types                 ###
############################################################

# culture workers
ESC_TRIGGER_country_uses_culture_workers = {
    is_megacorp = no
    is_spiritualist = no
    is_gestalt = no
    NOR = {
        has_valid_civic = civic_death_cult
		has_valid_civic = civic_death_cult_corporate
        has_valid_civic = civic_memorialist
    }
}

# priests
ESC_TRIGGER_country_uses_priests = {
    is_spiritualist = yes
    is_gestalt = no
    NOR = {
        has_valid_civic = civic_death_cult
		has_valid_civic = civic_death_cult_corporate
        has_valid_civic = civic_memorialist
    }
}

# managers
ESC_TRIGGER_country_uses_managers = {
    is_megacorp = yes
    is_spiritualist = no
    is_gestalt = no
    NOR = {
        has_valid_civic = civic_death_cult
		has_valid_civic = civic_death_cult_corporate
        has_valid_civic = civic_memorialist
    }
}

# death priests
ESC_TRIGGER_country_uses_death_priests = {
    OR = {
        has_valid_civic = civic_death_cult
		has_valid_civic = civic_death_cult_corporate
    }
}

# death chroniclers
ESC_TRIGGER_country_uses_memorialists = {
    is_gestalt = no
    has_valid_civic = civic_memorialist
}

# death chronicler drones
ESC_TRIGGER_country_uses_chronicle_drones = {
    is_gestalt = yes
    OR = {
		has_valid_civic = civic_hive_memorialist
		has_valid_civic = civic_machine_memorialist
    }
}

############################################################
###            Galactic community resolutions            ###
############################################################

# checks whether environmental_ordinance_waivers resolution was passed
ESC_TRIGGER_environment_ordinance_waivers = {
    OR = {
        is_active_resolution = "resolution_industry_environmental_ordinance_waivers"
        is_active_resolution = "resolution_industry_project_cornucopia"
    }
}

############################################################
###                Economic Plan Triggers                ###
############################################################

# checks whether an empire needs extra food production for ship components
ESC_TRIGGER_needs_food_for_ship_components = {
    OR = {
        has_technology = esc_tech_biological_weapons
        has_technology = esc_tech_amoeba_2
        has_technology = esc_tech_voidspawn_missile
        has_technology = esc_tech_swarm_missile
        has_technology = esc_tech_swarm_strike_craft_1
    }
}

# checks whether an empire needs extra dark matter production for ship components
ESC_TRIGGER_needs_dark_matter_for_ship_components = {
    OR = {
        has_technology = esc_tech_gravity_weapons
        has_technology = esc_tech_enigmatic_energy_harvesting
        has_technology = esc_tech_chrono_spatial_weapons
        has_technology = esc_tech_dark_matter_power_core_2
        has_technology = esc_tech_dark_matter_shields_2
    }
}

############################################################
###           Technology Potentials :: general           ###
############################################################

# checks whether Titanic / oversized X-slot weapons can be researched
ESC_TRIGGER_may_research_oversized_weapons = {
    OR = {
        host_has_dlc = "Apocalypse"
        host_has_dlc = "Federations"
        # has_nemesis = yes
    }
}

# checks whether an empire may research tesla weapons : requires machine or synthetically-ascended empire
ESC_TRIGGER_may_research_tesla_weapons = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_tesla_weapons
        # is machine, synthetic or cybernetic empire
        is_machine_empire = yes
        is_synthetic_empire = yes
        is_individual_machine = yes
        has_cybernetic_ascension = yes
        has_synthetic_ascension = yes
    }
}

# checks whether an empire may research crystalline weapons : requires knowledge of crystalline lifeforms
ESC_TRIGGER_may_research_crystalline_weapons = {
    OR = {
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_crystalline_weapons
        has_country_flag = crystals_encountered
		has_country_flag = lithoid_crystal_plant # was changed in 3.5 for some reason
		is_lithoid_empire = yes
    }
}

# checks whether an empire may research cybernetically-augmented amoeba : requires machine or cybernetic empire
ESC_TRIGGER_may_research_cybernetic_amoeba = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_cybernetic_amoeba
        # is machine, synthetic or cybernetic empire
        is_machine_empire = yes
        is_machine_empire = yes
        is_synthetic_empire = yes
        is_individual_machine = yes
        has_cybernetic_ascension = yes
        has_synthetic_ascension = yes
    }
}

# checks whether an empire may research biologically-augmented amoeba : requires biologically-ascended empire
ESC_TRIGGER_may_research_bioaugmented_amoeba = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_bioaugmented_amoeba
        # is biologically-ascended empire
        has_genetic_ascension = yes
    }
}

############################################################
###      Technology Potentials :: biological weapons     ###
############################################################

@MRE_bio_machine_mastery    = "xvcv_mdlc_ap_genetics_mastery"
@MRA_bio_robot_ap           = "xvcv_mdlc_ap_bio_robot"

# checks whether an empire may reverse-engineer biological weapons
ESC_TRIGGER_may_reverse_engineer_biological_weapons = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_reverse_engineer_biological_weapons
        # is at least somewhat-biological empire
        is_machine_empire = no
        has_valid_civic = civic_machine_assimilator
        has_valid_civic = civic_machine_servitor
		has_origin = origin_synthetic_fertility
        has_ascension_perk = @MRE_bio_machine_mastery
        has_ascension_perk = @MRA_bio_robot_ap
    }
}

# checks whether an empire may research advanced biological weapons : requires techs
ESC_TRIGGER_may_research_biological_weapons_basic = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_basic_biological_weapons
        # knows gene tailoring technology
        has_technology = tech_gene_tailoring
    }
}

# checks whether an empire may research advanced biological weapons : requires biologically-ascended empire
ESC_TRIGGER_may_research_biological_weapons_advanced = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_advanced_biological_weapons
        # is genetically-ascended empire or special machine empire
        has_ascension_perk = @MRE_bio_machine_mastery
        has_ascension_perk = @MRA_bio_robot_ap
        has_genetic_ascension = yes
    }
}

# checks whether an empire may research biological repeatables for damage
ESC_TRIGGER_may_research_bio_weapon_damage_repeatable = {
    OR = {
        check_variable = { which = ESC_COUNTRY_VARIABLE_bio_damage_repeatables value < 5 }
        AND = {
            ESC_TRIGGER_may_research_biological_weapons_advanced = yes
            OR = {
                NOT = { has_global_flag = @ACOT_active_flag }
                AND = {
                    has_global_flag = @ACOT_active_flag
                    check_variable = { which = ESC_COUNTRY_VARIABLE_bio_damage_repeatables value < 20 }
                }
            }
        }
    }
}

# checks whether an empire may research biological repeatables for damage
ESC_TRIGGER_may_research_bio_weapon_fire_rate_repeatable = {
    OR = {
        check_variable = { which = ESC_COUNTRY_VARIABLE_bio_fire_rate_repeatables value < 5 }
        AND = {
            ESC_TRIGGER_may_research_biological_weapons_advanced = yes
            OR = {
                NOT = { has_global_flag = @ACOT_active_flag }
                AND = {
                    has_global_flag = @ACOT_active_flag
                    check_variable = { which = ESC_COUNTRY_VARIABLE_bio_fire_rate_repeatables value < 20 }
                }
            }
        }
    }
}

############################################################
###       Technology Potentials :: psionic weapons       ###
############################################################

@FQ_Ompnipresence       = "ap_omnipresence"
@MRE_psi_machine_ap     = "xvcv_mdlc_ap_abyss"

# checks whether a machine empire can do special project to research psionics
ESC_TRIGGER_can_do_machine_psionics_special_project = {
    OR = {
        is_machine_empire = yes
        is_synthetic_empire = yes
        is_individual_machine = yes
    }
    # has any 'citizen' pop that are (latent) psionics
    any_owned_pop_group = {
        is_sapient = yes
        is_being_purged = no
        is_slave_or_better = yes
        species = {
            OR = {
                has_trait = trait_psionic
                has_trait = trait_latent_psionic
            }
        }
    }
}

# checks whether an empire may reverse-engineer psionic weapons
ESC_TRIGGER_may_reverse_engineer_psionic_weapons = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_reverse_engineer_psionic_weapons
        # is somewhat-organic empire
        AND = {
            is_machine_empire = no
            is_synthetic_empire = no
            is_individual_machine = no
        }
        # is machine empire that has 'citizen' biological pops or is modded to be able to access psionics
        has_valid_civic = civic_machine_assimilator
        has_valid_civic = civic_machine_servitor
        has_ascension_perk = @FQ_Ompnipresence
        has_ascension_perk = @MRE_psi_machine_ap
    }
}

# checks whether an empire may research basic psionic weapons : must know about psionics
ESC_TRIGGER_may_research_psionic_weapons_basic = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_basic_psionic_weapons
        # knows about psinoics
        has_technology = tech_psionic_theory
        is_hive_empire = yes # hive minds are canonically psionic
        has_country_flag = ESC_COUNTRY_FLAG_machine_psionics
        has_ascension_perk = @FQ_Ompnipresence
        has_ascension_perk = @MRE_psi_machine_ap
    }
}

# checks whether an empire may research advanced psionic weapons : must be psionically ascended
ESC_TRIGGER_may_research_psionic_weapons_advanced = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_advanced_psionic_weapons
        # is psionically-ascended empire
        has_psionic_ascension = yes
        # modded machine empires that can use psionics
        has_ascension_perk = @FQ_Ompnipresence
        has_ascension_perk = @MRE_psi_machine_ap
    }
}

# checks whether an empire may research psionic repeatables for damage
ESC_TRIGGER_may_research_psionic_weapon_damage_repeatable = {
    OR = {
        check_variable = { which = ESC_COUNTRY_VARIABLE_psionic_damage_repeatables value < 5 }
        AND = {
            ESC_TRIGGER_may_research_psionic_weapons_advanced = yes
            OR = {
                NOT = { has_global_flag = @ACOT_active_flag }
                AND = {
                    has_global_flag = @ACOT_active_flag
                    check_variable = { which = ESC_COUNTRY_VARIABLE_psionic_damage_repeatables value < 20 }
                }
            }
        }
    }
}

# checks whether an empire may research psionic repeatables for damage
ESC_TRIGGER_may_research_psionic_weapon_fire_rate_repeatable = {
    OR = {
        check_variable = { which = ESC_COUNTRY_VARIABLE_psionic_fire_rate_repeatables value < 5 }
        AND = {
            ESC_TRIGGER_may_research_psionic_weapons_advanced = yes
            OR = {
                NOT = { has_global_flag = @ACOT_active_flag }
                AND = {
                    has_global_flag = @ACOT_active_flag
                    check_variable = { which = ESC_COUNTRY_VARIABLE_psionic_fire_rate_repeatables value < 20 }
                }
            }
        }
    }
}

############################################################
###       Technology Potentials :: nanite weapons        ###
############################################################

# checks whether an empire may research advanced nanite weapons : must be machine or cybernetic
ESC_TRIGGER_may_research_nanite_weapons_advanced = {
    OR = {
        # country flag that allows research regardless of other conditions
        has_country_flag = ESC_COUNTRY_FLAG_mod_allow_advanced_nanite_weapons
        # is machine, synthetic or cybernetic empire
        is_machine_empire = yes
        is_synthetic_empire = yes
        is_individual_machine = yes
        has_synthetic_ascension = yes
        has_cybernetic_ascension = yes
    }
}

# checks whether an empire may research nanite repeatables for damage
ESC_TRIGGER_may_research_nanite_weapon_damage_repeatable = {
    OR = {
        check_variable = { which = ESC_COUNTRY_VARIABLE_nanite_damage_repeatables value < 5 }
        AND = {
            ESC_TRIGGER_may_research_nanite_weapons_advanced = yes
            OR = {
                NOT = { has_global_flag = @ACOT_active_flag }
                AND = {
                    has_global_flag = @ACOT_active_flag
                    check_variable = { which = ESC_COUNTRY_VARIABLE_nanite_damage_repeatables value < 20 }
                }
            }
        }
    }
}

# checks whether an empire may research nanite repeatables for damage
ESC_TRIGGER_may_research_nanite_weapon_fire_rate_repeatable = {
    OR = {
        check_variable = { which = ESC_COUNTRY_VARIABLE_nanite_fire_rate_repeatables value < 5 }
        AND = {
            ESC_TRIGGER_may_research_nanite_weapons_advanced = yes
            OR = {
                NOT = { has_global_flag = @ACOT_active_flag }
                AND = {
                    has_global_flag = @ACOT_active_flag
                    check_variable = { which = ESC_COUNTRY_VARIABLE_nanite_fire_rate_repeatables value < 20 }
                }
            }
        }
    }
}

############################################################
###             Starbase Modules Potentials              ###
############################################################

@GIGA_EHOF_Black_hole       = "pc_ehof_black_hole"
@GIGA_Penrose_Black_hole    = "pc_black_hole_giga"
@GIGA_Pouchkinn_Black_hole  = "pc_pouchkinn_black_hole"
@GIGA_Supermassive_BH       = "pc_core_black_hole"
@GIGA_Supermassive_Quasar   = "pc_core_quasar"
@RS_Collapsar               = "pc_collapsar"
@RS_Microquasar_orange      = "pc_microquasar_1"
@RS_Microquasar_blue        = "pc_microquasar_2"

# checks if any 'planet' in the system is a black hole
ESC_TRIGGER_system_has_dark_matter = {
    any_system_planet = {
        OR = {
            is_planet_class = pc_black_hole
            is_planet_class = @GIGA_EHOF_Black_hole
            is_planet_class = @GIGA_Penrose_Black_hole
            is_planet_class = @GIGA_Pouchkinn_Black_hole
            is_planet_class = @GIGA_Supermassive_BH
            is_planet_class = @GIGA_Supermassive_Quasar
            is_planet_class = @RS_Collapsar
            is_planet_class = @RS_Microquasar_orange
            is_planet_class = @RS_Microquasar_blue

            has_deposit = d_dark_matter_deposit_1
            has_deposit = d_dark_matter_deposit_2
            has_deposit = d_dark_matter_deposit_3
            has_deposit = d_dark_matter_deposit_10
        }
    }
}

# checks if any 'planet' in the system has zro deposit
ESC_TRIGGER_system_has_zro = {
    any_system_planet = {
        OR = {
            has_deposit = d_zro_deposit_1
            has_deposit = d_zro_deposit_2
            has_deposit = d_zro_deposit_3
            has_deposit = d_zro_deposit_4
            has_deposit = d_zro_deposit_5
        }
    }
}

# checks if any 'planet' in the system has nanites deposit
ESC_TRIGGER_system_has_nanites = {
    any_system_planet = {
        OR = {
            is_planet_class = pc_gray_goo
            has_deposit = d_nanites_deposit
        }
    }
}

############################################################
###                 Shield type checker                  ###
############################################################

# checks whether the shield is psionic
ESC_TRIGGER_is_non_psionic_shield = {
    OR = {
        # esc tier 6
		has_component = SMALL_ESC_SHIELDS_6
		has_component = MEDIUM_ESC_SHIELDS_6
		has_component = LARGE_ESC_SHIELDS_6
		has_component = SMALL_ESC_BIO_SHIELDS_6
		has_component = MEDIUM_ESC_BIO_SHIELDS_6
		has_component = LARGE_ESC_BIO_SHIELDS_6
		# esc tier 7
		has_component = SMALL_ESC_SHIELDS_7
		has_component = MEDIUM_ESC_SHIELDS_7
		has_component = LARGE_ESC_SHIELDS_7
		has_component = SMALL_ESC_BIO_SHIELDS_7
		has_component = MEDIUM_ESC_BIO_SHIELDS_7
		has_component = LARGE_ESC_BIO_SHIELDS_7
		# esc tier 8
		has_component = SMALL_ESC_SHIELDS_8
		has_component = MEDIUM_ESC_SHIELDS_8
		has_component = LARGE_ESC_SHIELDS_8
		has_component = SMALL_ESC_BIO_SHIELDS_8
		has_component = MEDIUM_ESC_BIO_SHIELDS_8
		has_component = LARGE_ESC_BIO_SHIELDS_8
		# esc dark matter tier 2
		has_component = SMALL_ESC_ENIGMATIC_SHIELD_2
		has_component = MEDIUM_ESC_ENIGMATIC_SHIELD_2
		has_component = LARGE_ESC_ENIGMATIC_SHIELD_2
		has_component = SMALL_ESC_BIO_ENIGMATIC_SHIELD_2
		has_component = MEDIUM_ESC_BIO_ENIGMATIC_SHIELD_2
		has_component = LARGE_ESC_BIO_ENIGMATIC_SHIELD_2
		# esc dark matter tier 3
		has_component = SMALL_ESC_ENIGMATIC_SHIELD_3
		has_component = MEDIUM_ESC_ENIGMATIC_SHIELD_3
		has_component = LARGE_ESC_ENIGMATIC_SHIELD_3
		has_component = SMALL_ESC_BIO_ENIGMATIC_SHIELD_3
		has_component = MEDIUM_ESC_BIO_ENIGMATIC_SHIELD_3
		has_component = LARGE_ESC_BIO_ENIGMATIC_SHIELD_3
		# esc cyclonic tier 1
		has_component = SMALL_ESC_CYCLONIC_SHIELDS_1
		has_component = MEDIUM_ESC_CYCLONIC_SHIELDS_1
		has_component = LARGE_ESC_CYCLONIC_SHIELDS_1
		has_component = SMALL_ESC_BIO_CYCLONIC_SHIELDS_1
		has_component = MEDIUM_ESC_BIO_CYCLONIC_SHIELDS_1
		has_component = LARGE_ESC_BIO_CYCLONIC_SHIELDS_1
		# esc cyclonic tier 2
		has_component = SMALL_ESC_CYCLONIC_SHIELDS_2
		has_component = MEDIUM_ESC_CYCLONIC_SHIELDS_2
		has_component = LARGE_ESC_CYCLONIC_SHIELDS_2
		has_component = SMALL_ESC_BIO_CYCLONIC_SHIELDS_2
		has_component = MEDIUM_ESC_BIO_CYCLONIC_SHIELDS_2
		has_component = LARGE_ESC_BIO_CYCLONIC_SHIELDS_2
		# esc cyclonic tier 3
		has_component = SMALL_ESC_CYCLONIC_SHIELDS_3
		has_component = MEDIUM_ESC_CYCLONIC_SHIELDS_3
		has_component = LARGE_ESC_CYCLONIC_SHIELDS_3
		has_component = SMALL_ESC_BIO_CYCLONIC_SHIELDS_3
		has_component = MEDIUM_ESC_BIO_CYCLONIC_SHIELDS_3
		has_component = LARGE_ESC_BIO_CYCLONIC_SHIELDS_3
		# esc shielding armor tier 1
		has_component = SMALL_ESC_SHIELD_ARMOR_1
		has_component = MEDIUM_ESC_SHIELD_ARMOR_1
		has_component = LARGE_ESC_SHIELD_ARMOR_1
		has_component = SMALL_ESC_BIO_SHIELD_ARMOR_1
		has_component = MEDIUM_ESC_BIO_SHIELD_ARMOR_1
		has_component = LARGE_ESC_BIO_SHIELD_ARMOR_1
		# esc shielding armor tier 2
		has_component = SMALL_ESC_SHIELD_ARMOR_2
		has_component = MEDIUM_ESC_SHIELD_ARMOR_2
		has_component = LARGE_ESC_SHIELD_ARMOR_2
		has_component = SMALL_ESC_BIO_SHIELD_ARMOR_2
		has_component = MEDIUM_ESC_BIO_SHIELD_ARMOR_2
		has_component = LARGE_ESC_BIO_SHIELD_ARMOR_2
		# esc shielding armor tier 3
		has_component = SMALL_ESC_SHIELD_ARMOR_3
		has_component = MEDIUM_ESC_SHIELD_ARMOR_3
		has_component = LARGE_ESC_SHIELD_ARMOR_3
		has_component = SMALL_ESC_BIO_SHIELD_ARMOR_3
		has_component = MEDIUM_ESC_BIO_SHIELD_ARMOR_3
		has_component = LARGE_ESC_BIO_SHIELD_ARMOR_3
		# esc archaeo armor tier 2
		has_component = SMALL_ESC_ARCHAEO_ARMOR_2
		has_component = MEDIUM_ESC_ARCHAEO_ARMOR_2
		has_component = LARGE_ESC_ARCHAEO_ARMOR_2
		has_component = SMALL_ESC_BIO_ARCHAEO_ARMOR_2
		has_component = MEDIUM_ESC_BIO_ARCHAEO_ARMOR_2
		has_component = LARGE_ESC_BIO_ARCHAEO_ARMOR_2
		# esc archaeo armor tier 3
		has_component = SMALL_ESC_ARCHAEO_ARMOR_3
		has_component = MEDIUM_ESC_ARCHAEO_ARMOR_3
		has_component = LARGE_ESC_ARCHAEO_ARMOR_3
		has_component = SMALL_ESC_BIO_ARCHAEO_ARMOR_3
		has_component = MEDIUM_ESC_BIO_ARCHAEO_ARMOR_3
		has_component = LARGE_ESC_BIO_ARCHAEO_ARMOR_3
		# esc archaeo shields tier 2
		has_component = SMALL_ESC_ARCHAEO_SHIELDS_2
		has_component = MEDIUM_ESC_ARCHAEO_SHIELDS_2
		has_component = LARGE_ESC_ARCHAEO_SHIELDS_2
		has_component = SMALL_ESC_BIO_ARCHAEO_SHIELDS_2
		has_component = MEDIUM_ESC_BIO_ARCHAEO_SHIELDS_2
		has_component = LARGE_ESC_BIO_ARCHAEO_SHIELDS_2
		# esc archaeo shields tier 3
		has_component = SMALL_ESC_ARCHAEO_SHIELDS_3
		has_component = MEDIUM_ESC_ARCHAEO_SHIELDS_3
		has_component = LARGE_ESC_ARCHAEO_SHIELDS_3
		has_component = SMALL_ESC_BIO_ARCHAEO_SHIELDS_3
		has_component = MEDIUM_ESC_BIO_ARCHAEO_SHIELDS_3
		has_component = LARGE_ESC_BIO_ARCHAEO_SHIELDS_3
    }
}

ESC_TRIGGER_has_non_psionic_shields_mutation = {
    OR = {
        # esc tier 6
		has_component = SMALL_ESC_SHIELDS_CREATURE_6
		has_component = MEDIUM_ESC_SHIELDS_CREATURE_6
		has_component = LARGE_ESC_SHIELDS_CREATURE_6
		has_component = XL_ESC_SHIELDS_CREATURE_6
		# esc tier 7
		has_component = SMALL_ESC_SHIELDS_CREATURE_7
		has_component = MEDIUM_ESC_SHIELDS_CREATURE_7
		has_component = LARGE_ESC_SHIELDS_CREATURE_7
		has_component = XL_ESC_SHIELDS_CREATURE_7
		# esc tier 8
		has_component = SMALL_ESC_SHIELDS_CREATURE_8
		has_component = MEDIUM_ESC_SHIELDS_CREATURE_8
		has_component = LARGE_ESC_SHIELDS_CREATURE_8
		has_component = XL_ESC_SHIELDS_CREATURE_8
		# esc dark matter tier 2
		has_component = SMALL_ESC_ENIGMATIC_SHIELD_CREATURE_2
		has_component = MEDIUM_ESC_ENIGMATIC_SHIELD_CREATURE_2
		has_component = LARGE_ESC_ENIGMATIC_SHIELD_CREATURE_2
		has_component = XL_ESC_ENIGMATIC_SHIELD_CREATURE_2
		# esc dark matter tier 3
		has_component = SMALL_ESC_ENIGMATIC_SHIELD_CREATURE_3
		has_component = MEDIUM_ESC_ENIGMATIC_SHIELD_CREATURE_3
		has_component = LARGE_ESC_ENIGMATIC_SHIELD_CREATURE_3
		has_component = XL_ESC_ENIGMATIC_SHIELD_CREATURE_3
		# esc cyclonic tier 1
		has_component = SMALL_ESC_CYCLONIC_SHIELDS_CREATURE_1
		has_component = MEDIUM_ESC_CYCLONIC_SHIELDS_CREATURE_1
		has_component = LARGE_ESC_CYCLONIC_SHIELDS_CREATURE_1
		has_component = XL_ESC_CYCLONIC_SHIELDS_CREATURE_1
		# esc cyclonic tier 2
		has_component = SMALL_ESC_CYCLONIC_SHIELDS_CREATURE_2
		has_component = MEDIUM_ESC_CYCLONIC_SHIELDS_CREATURE_2
		has_component = LARGE_ESC_CYCLONIC_SHIELDS_CREATURE_2
		has_component = XL_ESC_CYCLONIC_SHIELDS_CREATURE_2
		# esc cyclonic tier 3
		has_component = SMALL_ESC_CYCLONIC_SHIELDS_CREATURE_3
		has_component = MEDIUM_ESC_CYCLONIC_SHIELDS_CREATURE_3
		has_component = LARGE_ESC_CYCLONIC_SHIELDS_CREATURE_3
		has_component = XL_ESC_CYCLONIC_SHIELDS_CREATURE_3
        # esc shielding armor tier 1
		has_component = SMALL_ESC_SHIELD_ARMOR_CREATURE_1
		has_component = MEDIUM_ESC_SHIELD_ARMOR_CREATURE_1
		has_component = LARGE_ESC_SHIELD_ARMOR_CREATURE_1
		has_component = XL_ESC_SHIELD_ARMOR_CREATURE_1
        # esc shielding armor tier 2
		has_component = SMALL_ESC_SHIELD_ARMOR_CREATURE_2
		has_component = MEDIUM_ESC_SHIELD_ARMOR_CREATURE_2
		has_component = LARGE_ESC_SHIELD_ARMOR_CREATURE_2
		has_component = XL_ESC_SHIELD_ARMOR_CREATURE_2
        # esc shielding armor tier 3
		has_component = SMALL_ESC_SHIELD_ARMOR_CREATURE_3
		has_component = MEDIUM_ESC_SHIELD_ARMOR_CREATURE_3
		has_component = LARGE_ESC_SHIELD_ARMOR_CREATURE_3
		has_component = XL_ESC_SHIELD_ARMOR_CREATURE_3
		# esc archaeo armor tier 2
		has_component = SMALL_ESC_ARCHAEO_ARMOR_CREATURE_2
		has_component = MEDIUM_ESC_ARCHAEO_ARMOR_CREATURE_2
		has_component = LARGE_ESC_ARCHAEO_ARMOR_CREATURE_2
        has_component = XL_ESC_ARCHAEO_ARMOR_CREATURE_2
		# esc archaeo armor tier 3
		has_component = SMALL_ESC_ARCHAEO_ARMOR_CREATURE_3
		has_component = MEDIUM_ESC_ARCHAEO_ARMOR_CREATURE_3
		has_component = LARGE_ESC_ARCHAEO_ARMOR_CREATURE_3
        has_component = XL_ESC_ARCHAEO_ARMOR_CREATURE_3
		# esc archaeo shields tier 2
		has_component = SMALL_ESC_ARCHAEO_SHIELDS_CREATURE_2
		has_component = MEDIUM_ESC_ARCHAEO_SHIELDS_CREATURE_2
		has_component = LARGE_ESC_ARCHAEO_SHIELDS_CREATURE_2
        has_component = XL_ESC_ARCHAEO_SHIELDS_CREATURE_2
		# esc archaeo shields tier 3
		has_component = SMALL_ESC_ARCHAEO_SHIELDS_CREATURE_3
		has_component = MEDIUM_ESC_ARCHAEO_SHIELDS_CREATURE_3
		has_component = LARGE_ESC_ARCHAEO_SHIELDS_CREATURE_3
        has_component = XL_ESC_ARCHAEO_SHIELDS_CREATURE_3
    }
}
