Add custom wubble effect
This commit is contained in:
10
db_update.py
10
db_update.py
@@ -37,6 +37,8 @@ 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."""
|
||||
@@ -255,6 +257,13 @@ 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):
|
||||
@@ -268,6 +277,7 @@ 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
|
||||
|
||||
|
||||
@@ -37512,3 +37512,17 @@ class Effect8157(BaseEffect):
|
||||
fit.ship.boostItemAttr(
|
||||
'shield{0}DamageResonance'.format(damageType), ship.getModifiedItemAttr('eliteBonusBlackOps2'),
|
||||
skill='Black Ops', **kwargs)
|
||||
|
||||
|
||||
class Effect1000000(BaseEffect):
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user