Debian Codegraph @

default/scripting/techs/ship_parts/damage_control/SHP_BASIC_DAM_CONT.focs.py

raw
1 from focs._effects import (
2 EffectsGroup,
3 InSystem,
4 LocalCandidate,
5 OwnedBy,
6 SetStructure,
7 Ship,
8 Source,
9 Structure,
10 Turn,
11 Value,
12 )
13 from focs._tech import *
14 from macros.base_prod import TECH_COST_MULTIPLIER
15 from macros.misc import SHIP_STRUCTURE_FACTOR
16
17 Tech(
18 name="SHP_BASIC_DAM_CONT",
19 description="SHP_BASIC_DAM_CONT_DESC",
20 short_description="STRUCTURE_SHORT_DESC",
21 category="SHIP_PARTS_CATEGORY",
22 researchcost=80 * TECH_COST_MULTIPLIER,
23 researchturns=4,
24 tags=["PEDIA_DAMAGE_CONTROL_PART_TECHS"],
25 prerequisites=["SHP_MIL_ROBO_CONT"],
26 unlock=Item(type=UnlockPolicy, name="PLC_ENGINEERING"),
27 effectsgroups=[
28 EffectsGroup(
29 scope=Ship
30 & OwnedBy(empire=Source.Owner)
31 & (~InSystem() | InSystem() & Turn(low=LocalCandidate.System.LastTurnBattleHere + 1))
32 & Structure(high=LocalCandidate.MaxStructure - 0.001),
33 effects=SetStructure(value=Value + SHIP_STRUCTURE_FACTOR),
34 )
35 ],
36 )