FieldType
    name = "FLD_VOID_RIFT"
    description = "FLD_VOID_RIFT_DESC"
    stealth = 0.01
    tags = [ "EXOTIC" ]
    effectsgroups = [

        EffectsGroup    // move around
            scope = Source
            effects = [
                SetSpeed value = 5
                MoveTowards speed = Source.Speed/2.8 x = UniverseCentreX y = UniverseCentreY
                MoveInOrbit speed = Source.Speed/1.4 x = UniverseCentreX y = UniverseCentreY
            ]

        EffectsGroup    // grow size when young
            scope = Source
            activation = And [
                (Source.Age <= max((UniverseWidth ^ 1.1) / 50, 20))
                Size high = 100
            ]
            effects = SetSize value = Value + min(max(Value * RandomNumber(0.05, 0.1), 1.0), 5.0)

        EffectsGroup    // shrink size when old
            scope = Source
            activation = (Source.Age >= max((UniverseWidth ^ 1.1) / 50, 20))
            effects = SetSize value = Value - min(max(Value * RandomNumber(0.05, 0.1), 1.0), 5.0)

        EffectsGroup    // slow ships down
            scope = And [
                Ship
                WithinDistance distance = Source.Size * 0.9 condition = Source
            ]
            stackinggroup = "VOID_RIFT_SHIP_EFFECTS"
            effects = [
                SetSpeed value = Value * 0.5
            ]

        EffectsGroup    // after reaching a certain age, dissipate when small
            scope = Source
            activation = And [
                (Source.Age >= 10)
                Size high = 10
            ]
            effects = Destroy

    ]
    graphic = "fields/void_rift.png"