Debian Codegraph @

test-scripting/species/species_macros/focus.py

raw
1 try:
2 from focs._effects import Contains, HasSpecial, HasTag, Homeworld, IsBuilding, OwnerHasTech, Planet, Source
3 from focs._species import *
4 except ModuleNotFoundError:
5 pass
6
7 HAS_INDUSTRY_FOCUS = FocusType(
8 name="FOCUS_INDUSTRY", description="FOCUS_INDUSTRY_DESC", location=Planet(), graphic="icons/focus/industry.png"
9 )
10
11
12 HAS_RESEARCH_FOCUS = FocusType(
13 name="FOCUS_RESEARCH", description="FOCUS_RESEARCH_DESC", location=Planet(), graphic="icons/focus/research.png"
14 )
15
16 HAS_INFLUENCE_FOCUS = FocusType(
17 name="FOCUS_INFLUENCE", description="FOCUS_INFLUENCE_DESC", location=Planet(), graphic="icons/focus/influence.png"
18 )
19
20
21 HAS_GROWTH_FOCUS = FocusType(
22 name="FOCUS_GROWTH",
23 description="FOCUS_GROWTH_DESC",
24 location=(Homeworld(name=[Source.Species]) & ~HasTag(name="SELF_SUSTAINING"))
25 | HasSpecial(name="POSITRONIUM_SPECIAL")
26 | HasSpecial(name="SUPERCONDUCTOR_SPECIAL")
27 | HasSpecial(name="MONOPOLE_SPECIAL")
28 | HasSpecial(name="SPICE_SPECIAL")
29 | HasSpecial(name="FRUIT_SPECIAL")
30 | HasSpecial(name="PROBIOTIC_SPECIAL")
31 | HasSpecial(name="ELERIUM_SPECIAL")
32 | HasSpecial(name="CRYSTALS_SPECIAL")
33 | HasSpecial(name="MINERALS_SPECIAL"),
34 graphic="icons/focus/growth.png",
35 )
36
37 HAS_ADVANCED_FOCI = [
38 FocusType(
39 name="FOCUS_PROTECTION",
40 description="FOCUS_PROTECTION_DESC",
41 # location = OwnerHasTech name = "DEF_ROOT_DEFENSE"
42 location=Planet(), # empires have self-defense anyway, and this way some natives can now defend themselves better
43 graphic="icons/focus/protection.png",
44 ),
45 FocusType(
46 name="FOCUS_LOGISTICS",
47 description="FOCUS_LOGISTICS_DESC",
48 location=OwnerHasTech(name="SHP_INTSTEL_LOG"),
49 graphic="icons/focus/supply.png",
50 ),
51 FocusType(
52 name="FOCUS_STOCKPILE",
53 description="FOCUS_STOCKPILE_DESC",
54 location=OwnerHasTech(name="PRO_GENERIC_SUPPLIES"),
55 graphic="icons/focus/stockpile.png",
56 ),
57 FocusType(
58 name="FOCUS_STEALTH",
59 description="FOCUS_STEALTH_DESC",
60 location=Contains(IsBuilding(name=["BLD_PLANET_CLOAK"]))
61 | (Contains(IsBuilding(name=["BLD_TRANSFORMER"])) & OwnerHasTech(name="DEF_PLANET_CLOAK")),
62 graphic="icons/focus/stealth.png",
63 ),
64 FocusType(
65 name="FOCUS_BIOTERROR",
66 description="FOCUS_BIOTERROR_DESC",
67 location=Contains(IsBuilding(name=["BLD_BIOTERROR_PROJECTOR"]))
68 | (Contains(IsBuilding(name=["BLD_TRANSFORMER"])) & OwnerHasTech(name="GRO_BIOTERROR")),
69 graphic="icons/focus/bioterror.png",
70 ),
71 FocusType(
72 name="FOCUS_STARGATE_SEND",
73 description="FOCUS_STARGATE_SEND_DESC",
74 location=Contains(IsBuilding(name=["BLD_STARGATE"]))
75 | (Contains(IsBuilding(name=["BLD_TRANSFORMER"])) & OwnerHasTech(name="CON_STARGATE")),
76 graphic="icons/focus/stargate_send.png",
77 ),
78 FocusType(
79 name="FOCUS_STARGATE_RECEIVE",
80 description="FOCUS_STARGATE_RECEIVE_DESC",
81 location=Contains(IsBuilding(name=["BLD_STARGATE"]))
82 | (Contains(IsBuilding(name=["BLD_TRANSFORMER"])) & OwnerHasTech(name="CON_STARGATE")),
83 graphic="icons/focus/stargate_receive.png",
84 ),
85 FocusType(
86 name="FOCUS_PLANET_DRIVE",
87 description="FOCUS_PLANET_DRIVE_DESC",
88 location=Contains(IsBuilding(name=["BLD_PLANET_DRIVE"]))
89 | (Contains(IsBuilding(name=["BLD_TRANSFORMER"])) & OwnerHasTech(name="CON_PLANET_DRIVE")),
90 graphic="icons/building/planetary_stardrive.png",
91 ),
92 FocusType(
93 name="FOCUS_DISTORTION",
94 description="FOCUS_DISTORTION_DESC",
95 location=Contains(IsBuilding(name=["BLD_SPATIAL_DISTORT_GEN"]))
96 | (Contains(IsBuilding(name=["BLD_TRANSFORMER"])) & OwnerHasTech(name="LRN_SPATIAL_DISTORT_GEN")),
97 graphic="icons/focus/distortion.png",
98 ),
99 FocusType(
100 name="FOCUS_DOMINATION",
101 description="FOCUS_DOMINATION_DESC",
102 location=HasTag(name="TELEPATHIC") & OwnerHasTech(name="LRN_PSY_DOM"),
103 graphic="icons/focus/psi_domination.png",
104 ),
105 ]