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 = [
        [[SPECIES_LIKES_OR_DISLIKES_BUILDING_STABILITY_EFFECTS]]
    
        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/macros/enqueue.macros"
#include "/scripting/macros/base_prod.macros"
#include "/scripting/buildings/buildings.macros"
#include "/scripting/macros/priorities.macros"
