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