Skip to content

Commit c2cc4a9

Browse files
committed
Hardcode items which carry trig-related buffs
1 parent a0d606e commit c2cc4a9

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

db_update.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def processEveTypes():
142142
or row['typeName_en-us'] == 'Capsule'
143143
or row['groupID'] == 4033 # destructible effect beacons
144144
or row['typeID'] == 82941 # Metenox service
145+
or row['typeID'] in (87164, 87177) # Trig buff carriers
145146
or re.match(r'AIR .+Booster.*', row['typeName_en-us'])
146147
):
147148
row['published'] = True
@@ -702,6 +703,35 @@ def hardcodeSovUpgradeBuffs():
702703
_hardcodeEffects(typeID, effectMap, clearEffects=False)
703704
eos.db.gamedata_session.flush()
704705

706+
def hardcodeTrigSystemEffects():
707+
typeBuffMap = {
708+
# Final Liminality / Pochven
709+
87164: ('Final Liminality', {
710+
'warfareBuff1ID': 2534,
711+
'warfareBuff1Value': -50,
712+
'warfareBuff2ID': 2535,
713+
'warfareBuff2Value': -30,
714+
'warfareBuff3ID': 2538,
715+
'warfareBuff3Value': 30,
716+
'warfareBuff4ID': 2539,
717+
'warfareBuff4Value': 30}),
718+
# Minor Victory
719+
87177: ('Triglavian Minor Victory', {
720+
'warfareBuff1ID': 2534,
721+
'warfareBuff1Value': -50,
722+
'warfareBuff2ID': 2538,
723+
'warfareBuff2Value': 15,
724+
'warfareBuff3ID': 2539,
725+
'warfareBuff3Value': 15})}
726+
effectMap = {100002: 'pyfaCustomTrigSystemBuffEffect'}
727+
for typeID, (name, attrMap) in typeBuffMap.items():
728+
item = eos.db.gamedata_session.query(eos.gamedata.Item).filter(eos.gamedata.Item.ID == typeID).one()
729+
item.published = True
730+
item.name = name
731+
_hardcodeAttribs(typeID, attrMap)
732+
_hardcodeEffects(typeID, effectMap, clearEffects=True)
733+
eos.db.gamedata_session.flush()
734+
705735

706736
def hardcodeShapash():
707737
shapashTypeID = 1000000
@@ -848,6 +878,7 @@ def hardcodeCybele():
848878

849879
hardcodeSuppressionTackleRange()
850880
hardcodeSovUpgradeBuffs()
881+
hardcodeTrigSystemEffects()
851882

852883
eos.db.gamedata_session.commit()
853884
eos.db.gamedata_engine.execute('VACUUM')

eos/effects.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ def handler(fit, beacon, context, projectionRange, **kwargs):
7575
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')
7676

7777

78+
class Effect100002(BaseEffect):
79+
80+
runTime = 'early'
81+
type = ('projected', 'passive', 'gang')
82+
83+
@staticmethod
84+
def handler(fit, beacon, context, projectionRange, **kwargs):
85+
for i in range(1, 4):
86+
if id := beacon.getModifiedItemAttr(f'warfareBuff{i}ID'):
87+
value = beacon.getModifiedItemAttr(f'warfareBuff{i}Value')
88+
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')
89+
90+
7891
class Effect4(BaseEffect):
7992
"""
8093
shieldBoosting

0 commit comments

Comments
 (0)