Debian Codegraph @

test-scripting/species/species_macros/industry.py

raw
1 from macros.base_prod import INDUSTRY_PER_POP
2 from macros.priorities import (
3 TARGET_AFTER_SCALING_PRIORITY,
4 TARGET_EARLY_BEFORE_SCALING_PRIORITY,
5 )
6
7 # NO_INDUSTRY
8 # '''[[DESCRIPTION_EFFECTSGROUP_MACRO(NO_INDUSTRY_DESC)]]'''
9 try:
10 from focs._effects import (
11 EffectsGroup,
12 Focus,
13 GalaxyMaxAIAggression,
14 Happiness,
15 IsHuman,
16 IsSource,
17 NamedReal,
18 Planet,
19 SetTargetIndustry,
20 Target,
21 TargetIndustry,
22 Value,
23 )
24 except ModuleNotFoundError:
25 pass
26
27
28 BASIC_INDUSTRY = [
29 EffectsGroup(
30 scope=IsSource,
31 activation=Planet() & TargetIndustry(low=0) & Happiness(low=0) & Focus(type=["FOCUS_INDUSTRY"]),
32 accountinglabel="FOCUS_INDUSTRY_LABEL",
33 priority=TARGET_EARLY_BEFORE_SCALING_PRIORITY,
34 effects=SetTargetIndustry(
35 value=Value
36 + Target.Population * NamedReal(name="INDUSTRY_FOCUS_TARGET_INDUSTRY_PERPOP", value=1.0 * INDUSTRY_PER_POP)
37 ),
38 ),
39 EffectsGroup( # gives human bonuses when AI Aggression set to Beginner
40 scope=IsSource,
41 activation=Planet() & IsHuman & (GalaxyMaxAIAggression == 0), # human player, not human species
42 accountinglabel="DIFFICULTY",
43 priority=TARGET_AFTER_SCALING_PRIORITY,
44 effects=SetTargetIndustry(value=Value * 2),
45 ),
46 ]
47
48 # VERY_BAD_INDUSTRY
49 # '''[[BASIC_INDUSTRY]]
50
51 # EffectsGroup
52 # description = "VERY_BAD_INDUSTRY_DESC"
53 # scope = Source
54 # activation = And [
55 # Planet
56 # TargetIndustry low = 0
57 # Happiness low = 0
58 # Focus type = "FOCUS_INDUSTRY"
59 # ]
60 # accountinglabel = "VERY_BAD_INDUSTRY_LABEL"
61 # priority = [[TARGET_SCALING_PRIORITY]]
62 # effects = SetTargetIndustry value = Value
63 # * (NamedReal name = "VERY_BAD_INDUSTRY_TARGET_INDUSTRY_SCALING"
64 # value = [[VERY_BAD_MULTIPLIER]])
65 # '''
66
67 # BAD_INDUSTRY
68 # '''[[BASIC_INDUSTRY]]
69
70 # EffectsGroup
71 # description = "BAD_INDUSTRY_DESC"
72 # scope = Source
73 # activation = And [
74 # Planet
75 # TargetIndustry low = 0
76 # Happiness low = 0
77 # Focus type = "FOCUS_INDUSTRY"
78 # ]
79 # accountinglabel = "BAD_INDUSTRY_LABEL"
80 # priority = [[TARGET_SCALING_PRIORITY]]
81 # effects = SetTargetIndustry value = Value
82 # * (NamedReal name = "BAD_INDUSTRY_TARGET_INDUSTRY_SCALING"
83 # value = [[BAD_MULTIPLIER]])
84 # '''
85
86 AVERAGE_INDUSTRY = BASIC_INDUSTRY
87
88 # GOOD_INDUSTRY
89 # '''[[BASIC_INDUSTRY]]
90
91 # EffectsGroup
92 # description = "GOOD_INDUSTRY_DESC"
93 # scope = Source
94 # activation = And [
95 # Planet
96 # TargetIndustry low = 0
97 # Happiness low = 0
98 # Focus type = "FOCUS_INDUSTRY"
99 # ]
100 # accountinglabel = "GOOD_INDUSTRY_LABEL"
101 # priority = [[TARGET_SCALING_PRIORITY]]
102 # effects = SetTargetIndustry value = Value
103 # * (NamedReal name = "GOOD_INDUSTRY_TARGET_INDUSTRY_SCALING"
104 # value = [[GOOD_MULTIPLIER]])
105 # '''
106
107 # GREAT_INDUSTRY
108 # '''[[BASIC_INDUSTRY]]
109
110 # EffectsGroup
111 # description = "GREAT_INDUSTRY_DESC"
112 # scope = Source
113 # activation = And [
114 # Planet
115 # TargetIndustry low = 0
116 # Happiness low = 0
117 # Focus type = "FOCUS_INDUSTRY"
118 # ]
119 # accountinglabel = "GREAT_INDUSTRY_LABEL"
120 # priority = [[TARGET_SCALING_PRIORITY]]
121 # effects = SetTargetIndustry value = Value
122 # * (NamedReal name = "GREAT_INDUSTRY_TARGET_INDUSTRY_SCALING"
123 # value = [[GREAT_MULTIPLIER]])
124 # '''
125
126 # ULTIMATE_INDUSTRY
127 # '''[[BASIC_INDUSTRY]]
128
129 # EffectsGroup
130 # description = "ULTIMATE_INDUSTRY_DESC"
131 # scope = Source
132 # activation = And [
133 # Planet
134 # TargetIndustry low = 0
135 # Happiness low = 0
136 # Focus type = "FOCUS_INDUSTRY"
137 # ]
138 # accountinglabel = "ULTIMATE_INDUSTRY_LABEL"
139 # priority = [[TARGET_SCALING_PRIORITY]]
140 # effects = SetTargetIndustry value = Value
141 # * (NamedReal name = "ULTIMATE_INDUSTRY_TARGET_INDUSTRY_SCALING"
142 # value = [[ULTIMATE_MULTIPLIER]])
143 # '''