BuildingType
    name = "BLD_XENORESURRECTION_LAB"
    description = "BLD_XENORESURRECTION_LAB_DESC"
    buildcost = 100 * [[BUILDING_COST_MULTIPLIER]]
    buildtime = 4
    location = And [
        Planet
        Not Contains Building name = "BLD_XENORESURRECTION_LAB"
        Or [
            HasSpecial name = "EXTINCT_BANFORO_SPECIAL"
            HasSpecial name = "EXTINCT_KILANDOW_SPECIAL"
            HasSpecial name = "EXTINCT_MISIORLA_SPECIAL"
            HasSpecial name = "KRAKEN_IN_THE_ICE_SPECIAL"
        ]
    ]
    EnqueueLocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
    effectsgroups = [
        EffectsGroup
            scope = Source
            activation = ContainedBy And [
                Object id = Source.PlanetID
                HasSpecial name = "EXTINCT_BANFORO_SPECIAL"
            ]
            effects = GiveEmpireTech name = "TECH_COL_BANFORO"
        EffectsGroup
            scope = Source
            activation = ContainedBy And [
                Object id = Source.PlanetID
                HasSpecial name = "EXTINCT_KILANDOW_SPECIAL"
            ]
            effects = GiveEmpireTech name = "TECH_COL_KILANDOW"
        EffectsGroup
            scope = Source
            activation = ContainedBy And [
                Object id = Source.PlanetID
                HasSpecial name = "EXTINCT_MISIORLA_SPECIAL"
            ]
            effects = GiveEmpireTech name = "TECH_COL_MISIORLA"
        EffectsGroup
            scope = And [
                Object id = Source.PlanetID
                Planet
                HasSpecial name = "KRAKEN_IN_THE_ICE_SPECIAL"
            ]
            activation = OwnerHasTech name = "SHP_DOMESTIC_MONSTER"
            effects = [
                CreateShip designname = "SM_WHITE_KRAKEN" empire = Source.Owner
                RemoveSpecial name = "KRAKEN_IN_THE_ICE_SPECIAL"
                GenerateSitRepMessage
                    message = "EFFECT_WHITE_KRAKEN_RESURRECTED"
                    label = "EFFECT_WHITE_KRAKEN_RESURRECTED_LABEL"
                    icon = "icons/monsters/kraken-5.png"
                    parameters = [
                        tag = "planet" data = Source.PlanetID
                    ]
                    empire = Source.Owner
            ]
    ]
    icon = "icons/building/the_caducean_institute.png"

#include "/scripting/common/enqueue.macros"
#include "/scripting/common/base_prod.macros"