From 9d97b27c3a2c6a5c588a557b2a96b7bf956a6e5c Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 15 Jun 2021 18:25:25 +0300 Subject: [PATCH] Implement wubble application via interdiction module --- db_update.py | 10 ---------- eos/effects.py | 25 ++++--------------------- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/db_update.py b/db_update.py index 7e08b7a6b..b302d6651 100644 --- a/db_update.py +++ b/db_update.py @@ -37,8 +37,6 @@ if ROOT_DIR not in sys.path: sys.path.insert(0, ROOT_DIR) GAMEDATA_SCHEMA_VERSION = 4 -WUBBLE_EFFECT_ID = 1000000 - def db_needs_update(): """True if needs, false if it does not, none if we cannot check it.""" @@ -257,13 +255,6 @@ def update_db(): def processDogmaEffects(): print('processing dogmaeffects') data = _readData('fsd_binary', 'dogmaeffects', keyIdName='effectID') - # Custom effect for wubble - data.append({ - 'effectID': WUBBLE_EFFECT_ID, - 'effectName': 'pyfaCustomEffectWubble', - 'published': False, - 'isAssistance': False, - 'isOffensive': False}) _addRows(data, eos.gamedata.Effect, fieldMap={'resistanceAttributeID': 'resistanceID'}) def processDogmaTypeEffects(eveTypesData): @@ -277,7 +268,6 @@ def update_db(): for row in typeData.get('dogmaEffects', ()): row['typeID'] = typeData['typeID'] newData.append(row) - newData.append({'typeID': 56748, 'effectID': WUBBLE_EFFECT_ID}) _addRows(newData, eos.gamedata.ItemEffect) return newData diff --git a/eos/effects.py b/eos/effects.py index a115a2578..17c7c4b4f 100644 --- a/eos/effects.py +++ b/eos/effects.py @@ -616,7 +616,10 @@ class Effect101(BaseEffect): if ecmStrengthBonus: strModifier = 1 - min(1, ecmStrengthBonus / fit.scanStrength) fit.ecmProjectedStr *= strModifier - + elif src.item.group.name == 'Interdiction Sphere Launcher': + speedFactor = src.getModifiedChargeAttr('speedFactor') + if speedFactor: + fit.ship.boostItemAttr('maxVelocity', speedFactor, **kwargs) class Effect118(BaseEffect): """ @@ -37511,23 +37514,3 @@ class Effect8157(BaseEffect): fit.ship.boostItemAttr( 'shield{0}DamageResonance'.format(damageType), ship.getModifiedItemAttr('eliteBonusBlackOps2'), skill='Black Ops', **kwargs) - - -class Effect1000000(BaseEffect): - """ - pyfaCustomEffectWubble - - Used by: - Charge: Stasis Webification Probe - """ - - type = 'passive', 'projected' - - @staticmethod - def handler(fit, charge, context, projectionRange, **kwargs): - if 'projected' not in context: - return - if fit.ship.getModifiedItemAttr('disallowOffensiveModifiers'): - return - fit.ship.boostItemAttr('maxVelocity', charge.getModifiedItemAttr('speedFactor'), - stackingPenalties=True, **kwargs)