@@ -17,11 +17,7 @@ type = "active", "gang"
|
||||
|
||||
|
||||
def handler(fit, module, context, **kwargs):
|
||||
print "In chargeBonusWarfareEffect, context: ", context
|
||||
|
||||
def runEffect(id, value):
|
||||
print "RUN EFFECT: ", fit,
|
||||
|
||||
if id == 10: # Shield Burst: Shield Harmonizing: Shield Resistance
|
||||
for damageType in ("Em", "Explosive", "Thermal", "Kinetic"):
|
||||
fit.ship.boostItemAttr("shield%sDamageResonance" % damageType, value)
|
||||
@@ -127,11 +123,9 @@ def handler(fit, module, context, **kwargs):
|
||||
if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)):
|
||||
value = module.getModifiedChargeAttr("warfareBuff{}Multiplier".format(x))
|
||||
id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x))
|
||||
print "Buff ID: ", id, " value: ", value
|
||||
|
||||
if id:
|
||||
if 'commandRun' not in context:
|
||||
print "Add buffID", id, " to ", fit
|
||||
fit.addCommandBonus(id, value, module, kwargs['effect'])
|
||||
elif kwargs['warfareBuffID'] is not None and kwargs['warfareBuffID'] == id:
|
||||
print "Running buffID ", kwargs['warfareBuffID'], " on ", fit
|
||||
runEffect(kwargs['warfareBuffID'], value)
|
||||
|
||||
@@ -13,43 +13,44 @@ def handler(fit, module, context, **kwargs):
|
||||
|
||||
if id == 40: # Avatar Effect Generator : Kinetic resistance bonus
|
||||
for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "hullKineticDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value, stackingPenalties=True)
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 41: # Erebus Effect Generator : Armor HP bonus
|
||||
if id == 49: # Avatar Effect Generator : EM resistance penalty
|
||||
for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "hullEmDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 42: # Erebus Effect Generator : Armor HP bonus
|
||||
fit.ship.boostItemAttr("armorHP", value, stackingPenalties=True)
|
||||
|
||||
if id == 42: # Leviathan Effect Generator : Shield HP bonus
|
||||
fit.ship.boostItemAttr("shieldCapacity", value, stackingPenalties=True)
|
||||
|
||||
if id == 43: # Erebus Effect Generator : Explosive resistance bonus
|
||||
for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "hullExplosiveDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value, stackingPenalties=True)
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 44: # Erebus Effect Generator : Thermal resistance penalty
|
||||
for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "hullThermalDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value, stackingPenalties=True)
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 45: # Ragnarok Effect Generator : Signature Radius bonus
|
||||
fit.ship.boostItemAttr("signatureRadius", value, stackingPenalties=True)
|
||||
|
||||
if id == 46: # Ragnarok Effect Generator : Thermal resistance bonus
|
||||
for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "hullThermalDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value, stackingPenalties=True)
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 47: # Ragnarok Effect Generator : Explosive resistance penaly
|
||||
for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "hullExplosiveDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value, stackingPenalties=True)
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 48: # Leviathan Effect Generator : Shield HP bonus
|
||||
fit.ship.boostItemAttr("shieldCapacity", value, stackingPenalties=True)
|
||||
|
||||
if id == 49: # Leviathan Effect Generator : EM resistance bonus
|
||||
for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "hullEmDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value, stackingPenalties=True)
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 50: # Leviathan Effect Generator : Kinetic resistance penalty
|
||||
for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "hullKineticDamageResonance"):
|
||||
fit.ship.boostItemAttr(attr, value, stackingPenalties=True)
|
||||
fit.ship.boostItemAttr(attr, value)
|
||||
|
||||
if id == 51: # Avatar Effect Generator : Velocity penalty
|
||||
fit.ship.boostItemAttr("maxVelocity", value, stackingPenalties=True)
|
||||
@@ -68,9 +69,9 @@ def handler(fit, module, context, **kwargs):
|
||||
stackingPenalties=True)
|
||||
|
||||
for x in xrange(1, 4):
|
||||
if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)):
|
||||
value = module.getModifiedChargeAttr("warfareBuff{}Multiplier".format(x))
|
||||
id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x))
|
||||
if module.getModifiedItemAttr("warfareBuff{}ID".format(x)):
|
||||
value = module.getModifiedItemAttr("warfareBuff{}Value".format(x))
|
||||
id = module.getModifiedItemAttr("warfareBuff{}ID".format(x))
|
||||
|
||||
if id:
|
||||
if 'commandRun' not in context:
|
||||
|
||||
@@ -451,8 +451,6 @@ class Fit(object):
|
||||
# oh fuck this is so janky
|
||||
# @todo should we pass in min/max to this function, or is abs okay?
|
||||
# (abs is old method, ccp now provides the aggregate function in their data)
|
||||
print "Add command bonus: ", warfareBuffID, " - value: ", value
|
||||
|
||||
if warfareBuffID not in self.commandBonuses or abs(self.commandBonuses[warfareBuffID][1]) < abs(value):
|
||||
self.commandBonuses[warfareBuffID] = (runTime, value, module, effect)
|
||||
|
||||
@@ -516,12 +514,10 @@ class Fit(object):
|
||||
eos.db.saveddata_session.delete(self)
|
||||
|
||||
if self.commandFits and not withBoosters:
|
||||
print "Calculatate command fits and apply to fit"
|
||||
for fit in self.commandFits:
|
||||
if self == fit:
|
||||
print "nope"
|
||||
continue
|
||||
print "calculating ", fit
|
||||
|
||||
fit.calculateModifiedAttributes(self, True)
|
||||
#
|
||||
# for thing in chain(fit.modules, fit.implants, fit.character.skills, (fit.ship,)):
|
||||
|
||||
@@ -658,7 +658,10 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut, l
|
||||
(effect.isType("active") and self.state >= State.ACTIVE)) \
|
||||
and ((projected and effect.isType("projected")) or not projected) \
|
||||
and ((gang and effect.isType("gang")) or not gang):
|
||||
effect.handler(fit, self, context)
|
||||
try:
|
||||
effect.handler(fit, self, context, effect=effect)
|
||||
except:
|
||||
effect.handler(fit, self, context)
|
||||
|
||||
@property
|
||||
def cycleTime(self):
|
||||
|
||||
Reference in New Issue
Block a user