Special
    name = "HIGH_TECH_NATIVES_SPECIAL"
    description = "HIGH_TECH_NATIVES_SPECIAL_DESC"
    stealth = 0
    spawnrate = 25
    spawnlimit = 9999
    location = And [
        Planet
        Unowned
        Species
        /// @content_tag{PRIMITIVE} Prevents this special at a location with tag
        Not HasTag name = "PRIMITIVE"
        Not HasTag name = "NO_RESEARCH"
        Not HasTag name = "VERY_BAD_RESEARCH"
        Not HasTag name = "BAD_RESEARCH"
        Not HasSpecial name = "MODERATE_TECH_NATIVES_SPECIAL"
    ]
    effectsgroups = [
        EffectsGroup
            scope = Source
            activation = Unowned
            effects = [
                SetMaxDefense value = Value + ( 30 * [[PLANET_DEFENSE_FACTOR]] )
                SetMaxShield value = Value + ( 30 * [[PLANET_SHIELD_FACTOR]] )
                SetMaxTroops value = Value + 30
                SetDetection value = Value + 60
            ]

        EffectsGroup
            scope = Source
            activation = Turn low = 1 high = 1
            effects = CreateBuilding type = "BLD_CULTURE_LIBRARY"

        EffectsGroup
            scope = Source
            activation = And [
                Random probability = 0.2
                Turn low = 1 high = 1
            ]
            effects = CreateBuilding type = "BLD_SCANNING_FACILITY"

        EffectsGroup
            scope = Source
            activation = Or [
                OwnedBy affiliation = AnyEmpire
                Not Species
            ]
            effects = RemoveSpecial name = "HIGH_TECH_NATIVES_SPECIAL"
    ]
    graphic = "icons/tech/categories/learning.png"

#include "/scripting/common/misc.macros"
