/
FLD_NEBULA_2.focs.txt
70 lines (64 loc) · 2.41 KB
/
FLD_NEBULA_2.focs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FieldType
name = "FLD_NEBULA_2"
description = "FLD_NEBULA_2_DESC"
stealth = 0.01
effectsgroups = [
EffectsGroup // shrink slowly when in no-star system
scope = Source
activation = And [
Size low = 2 high = 120
Star type = NoStar
]
effects =
SetSize value = Value + RandomNumber(-0.5, 0.3)
EffectsGroup // shrink slowly when in no-star system
scope = Source
activation = And [
Size low = 120
Star type = NoStar
]
effects =
SetSize value = Value + RandomNumber(-0.5, 0)
EffectsGroup // spawn new star when small enough
scope = And [
System
Object id = Source.SystemID
]
activation = And [
Size high = 5
Star type = NoStar
]
effects = [
SetStarType type = OneOf(Blue, Blue, White, Yellow)
GenerateSitRepMessage
message = "EFFECT_NEBULA"
label = "EFFECT_NEBULA_LABEL"
icon = "icons/buttons/addstar.png"
parameters = [
tag = "system" data = Source.SystemID
]
affiliation = CanSee condition = Source
]
[[CREATE_PLANETS]]
EffectsGroup // make ships slower, reduce detection, increase stealth
scope = And [
Ship
WithinDistance distance = Source.Size * 0.9 condition = Source
]
stackinggroup = "NEBULA_SHIP_EFFECTS"
effects = [
SetSpeed value = max(5, Value - NamedRealLookup name = "FLD_NEBULA_SPEED_MALUS")
SetStealth value = Value + NamedRealLookup name = "FLD_NEBULA_STEALTH_BONUS"
SetDetection value = Value - NamedRealLookup name = "FLD_NEBULA_DETECTION_MALUS"
]
EffectsGroup // dissipate when small
scope = Source
activation = Size high = 5
effects = [
Destroy
CreateField type = "FLD_ACCRETION_DISC" size = 20
AddSpecial name = "ACCRETION_DISC_SPECIAL"
]
]
graphic = "fields/star_forming_nebula_2.png"
#include "fields.macros"