FieldType
    name = "FLD_ION_STORM"
    description = "FLD_ION_STORM_DESC"
    stealth = 0.01
    tags = [ "EXOTIC" ]
    effectsgroups = [
        EffectsGroup    // move around, grow when near stars, shrink a bit each turn
            scope = Source
            effects = [
                SetStarlaneSpeed value = 15
                
                MoveTowards speed = Source.StarlaneSpeed/1.4 x = UniverseCentreX y = UniverseCentreY
                MoveInOrbit speed = Source.StarlaneSpeed/1.4 x = UniverseCentreX y = UniverseCentreY

                SetSize Value - 0.3*(Count condition = And [
                    System
                    WithinDistance distance = 80 condition = Source
                ])
            ]
            
        EffectsGroup    // affect stealth / detection of objects in storm
            scope = WithinDistance distance = Source.Size condition = Source
            effects = [
                SetStealth Value - Target.DistanceToSource
                SetDetection Value - Target.DistanceToSource
            ]
            
        EffectsGroup    // dissipate when small
            scope = Source
            activation = Size high = 10
            effects = Destroy
    ]
    graphic = "fields/rainbow_storm.png"


