forked from freeorion/freeorion
/
INTERSPECIES_ACADEMY.focs.txt
102 lines (97 loc) · 3.55 KB
/
INTERSPECIES_ACADEMY.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
BuildingType
name = "BLD_INTERSPECIES_ACADEMY"
description = "BLD_INTERSPECIES_ACADEMY_DESC"
buildcost = 50
buildtime = 5
location = AND [
// Homeworld
Species
Not Contains Building name = "BLD_INTERSPECIES_ACADEMY"
OwnedBy empire = Source.Owner
Or [
Happiness low = 15
// The preferred focus happiness bonus helps only a bit
And [
Focus type = Source.PreferredFocus
Happiness low = 19
]
]
Not WithinStarlaneJumps jumps = 3 condition = And [
System
Contains And [
Building name = "BLD_INTERSPECIES_ACADEMY"
OwnedBy empire = Source.Owner
]
]
Number low = 0 high = 0 condition = And [
Building name = "BLD_INTERSPECIES_ACADEMY"
Species name = RootCandidate.Species
OwnedBy empire = RootCandidate.Owner
]
Number low = 0 high = 0 condition = Described description = "CONDITION_INTERSPECIES_ACADEMY_SPECIES_ALREADY_EXISTS" condition = And [
Planet
Enqueued type = Building name = "BLD_INTERSPECIES_ACADEMY"
Species name = RootCandidate.Species
OwnedBy empire = RootCandidate.Owner
Not Object id = RootCandidate.PlanetID
]
Number low = 0 high = 6 condition = And [
Building name = "BLD_INTERSPECIES_ACADEMY"
OwnedBy empire = Source.Owner
]
]
EnqueueLocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
effectsgroups = [
// Destroy superfluous academies
EffectsGroup
scope = NumberOf number = 1 condition = And [
Building name = "BLD_INTERSPECIES_ACADEMY"
OwnedBy empire = Source.Owner
Not Object id = Source.ID
Species name = Source.Planet.Species
]
activation = And [
Source
Random probability = 0.3
]
effects = [
GenerateSitRepMessage
message = "EFFECT_INTERSPECIES_ACADEMY_DESTROY"
label = "EFFECT_INTERSPECIES_ACADEMY_DESTROY_LABEL"
icon = "icons/building/blackhole.png"
parameters = [
tag = "planet" data = Target.PlanetID
]
empire = Source.Owner
Destroy
]
// Apply stockpile effects
EffectsGroup
scope = And [
Object id = Source.PlanetID
Planet
Focus type = "FOCUS_STOCKPILE"
OwnedBy empire = Source.Owner
Species
]
activation = Source
accountinglabel = "INTERSPECIES_ACADEMY_LABEL"
priority = [[LATE_PRIORITY]]
effects = SetStockpile value = Value + 10
EffectsGroup
scope = And [
Object id = Source.PlanetID
Planet
Focus type = "FOCUS_RESEARCH"
OwnedBy empire = Source.Owner
Species
]
activation = Source
accountinglabel = "INTERSPECIES_ACADEMY_LABEL"
priority = [[LATE_PRIORITY]]
effects = SetResearch value = Value + 5
]
icon = "icons/building/science-institute.png"
#include "/scripting/common/base_prod.macros"
#include "/scripting/common/enqueue.macros"
#include "/scripting/common/priorities.macros"