1
2ADVANCED_FOCUS_EFFECTS
3'''     EffectsGroup
4            scope = Source
5            activation = And [
6                Planet
7                Focus type = "FOCUS_STEALTH"
8            ]
9            effects = SetStealth value = Value + 15
10
11        EffectsGroup
12            scope = And [
13                Planet
14                OwnedBy affiliation = EnemyOf empire = Source.Owner
15                WithinStarlaneJumps jumps = 4 condition = Source
16                Not Number low = 1 condition = And [
17                    Building name = "BLD_GENOME_BANK"
18                    OwnedBy empire = RootCandidate.Owner
19                ]
20            ]
21            activation = Focus type = "FOCUS_BIOTERROR"
22            priority = [[TARGET_POPULATION_AFTER_SCALING_PRIORITY]]
23            effects = SetTargetPopulation value = Value - 4
24
25        EffectsGroup
26            scope = And [
27                Fleet
28                OwnedBy empire = Source.Owner
29                ContainedBy And [
30                    System
31                    Contains And [
32                        Planet
33                        OwnedBy empire = Source.Owner
34                        Focus type = "FOCUS_STARGATE_SEND"
35                    ]
36                ]
37            ]
38            activation = And [
39                Planet
40                Focus type = "FOCUS_STARGATE_RECEIVE"
41            ]
42            stackinggroup = "STARGATE_STACK"
43            effects = [
44                GenerateSitrepMessage
45                    message = "EFFECT_STARGATE"
46                    label = "EFFECT_STARGATE_LABEL"
47                    icon = "icons/focus/stargate_receive.png"
48                    parameters = [
49                        tag = "fleet" data = Target.ID
50                        tag = "system" data = Source.SystemID
51                    ]
52                    empire = Source.Owner
53                MoveTo destination = And [
54                    Contains Source
55                    System
56                ]
57            ]
58
59        EffectsGroup
60            scope = Source
61            activation = And [
62                Planet
63                Focus type = "FOCUS_PLANET_DRIVE"
64                WithinStarlaneJumps jumps = 1 condition = And [
65                    System
66                    Contains And [
67                        Or [
68                            Building name = "BLD_PLANET_BEACON"
69                            And [
70                                Ship
71                                DesignHasPart low = 1 high = 999 name = "SP_PLANET_BEACON"
72                                Turn low = LocalCandidate.ArrivedOnTurn + 1
73                            ]
74                        ]
75                        OwnedBy empire = Source.Owner
76                    ]
77                    Not Contains Source
78                ]
79            ]
80            effects = [
81                MoveTo destination = And [
82                    System
83                    WithinStarlaneJumps jumps = 1 condition = Source
84                    Contains And [
85                        Or [
86                            Building name = "BLD_PLANET_BEACON"
87                            And [
88                                Ship
89                                DesignHasPart low = 1 high = 999 name = "SP_PLANET_BEACON"
90                                Turn low = LocalCandidate.ArrivedOnTurn + 1
91                            ]
92                        ]
93                        OwnedBy empire = Source.Owner
94                    ]
95                    Not Contains Source
96                ]
97                GenerateSitRepMessage
98                        message = "EFFECT_PLANET_DRIVE"
99                        label = "EFFECT_PLANET_DRIVE_LABEL"
100                        icon = "icons/building/planetary_stardrive.png"
101                        parameters = [
102                                tag = "planet" data = Source.ID
103                                tag = "system" data = Source.SystemID
104                        ]
105                        empire = Source.Owner
106                SetPopulation value = Value / 2
107            ]
108
109        EffectsGroup
110            scope = Source
111            activation = And [
112                Random probability = 0.5
113                Planet
114                Focus type = "FOCUS_PLANET_DRIVE"
115                WithinStarlaneJumps jumps = 1 condition = And [
116                    System
117                    Contains And [
118                        Or [
119                            Building name = "BLD_PLANET_BEACON"
120                            And [
121                                Ship
122                                DesignHasPart low = 1 high = 999 name = "SP_PLANET_BEACON"
123                                Turn low = LocalCandidate.ArrivedOnTurn + 1
124                            ]
125                        ]
126                        OwnedBy empire = Source.Owner
127                    ]
128                    Not Contains Source
129                ]
130                Not WithinDistance distance = 200 condition = Building name = "BLD_LIGHTHOUSE"
131            ]
132            effects = [
133                GenerateSitRepMessage
134                        message = "SITREP_PLANET_DRIVE_FAILURE"
135                        label = "SITREP_PLANET_DRIVE_FAILURE_LABEL"
136                    icon = "icons/sitrep/colony_destroyed.png"
137                        parameters = [
138                                tag = "planet" data = Source.ID
139                                tag = "system" data = Source.SystemID
140                        ]
141                        empire = Source.Owner
142                Destroy
143            ]
144
145        EffectsGroup
146            scope = And [
147                Fleet
148                Not Stationary
149                Not InSystem
150                Or [
151                    OwnedBy affiliation = EnemyOf empire = Source.Owner
152                    Unowned
153                ]
154                (Source.System.ID = LocalCandidate.NextSystemID)
155            ]
156            activation = And [
157                Planet
158                Focus type = "FOCUS_DISTORTION"
159            ]
160            stackinggroup = "DISTORTION_MOVEMENT_STACK"
161            effects = [
162                If condition = WithinDistance distance = 40 condition = Object id = RootCandidate.PreviousSystemID
163                    effects = [
164                        GenerateSitrepMessage
165                            message = "EFFECT_FLEET_MOVED_TO"
166                            label = "EFFECT_FLEET_MOVED_TO_LABEL"
167                            parameters = [
168                                tag = "fleet" data = Target.ID
169                                tag = "system" data = Target.PreviousSystemID
170                                tag = "rawtext" data = DirectDistanceBetween object = Target.ID object = Target.PreviousSystemID
171                                tag = "planet" data = Source.ID
172                            ]
173                            empire = Source.Owner
174                        MoveTo destination = Object id = Target.PreviousSystemID
175                    ]
176                    else = [
177                        GenerateSitrepMessage
178                            message = "EFFECT_FLEET_MOVED_TOWARDS"
179                            label = "EFFECT_FLEET_MOVED_TOWARDS_LABEL"
180                            parameters = [
181                                tag = "fleet" data = Target.ID
182                                tag = "system" data = Target.PreviousSystemID
183                                tag = "rawtext" data = DirectDistanceBetween object = Target.ID object = Target.PreviousSystemID
184                                tag = "planet" data = Source.ID
185                            ]
186                            empire = Source.Owner
187                        MoveTowards speed = 40 target = Object id = Target.PreviousSystemID
188                    ]
189                ]
190
191        EffectsGroup
192            scope = Source
193            activation = Focus type = "FOCUS_LOGISTICS"
194            accountinglabel = "SHP_INTSTEL_LOG"
195            effects = SetMaxSupply value = Value + 3
196'''
197