diff --git a/eos/effects/chargebonuswarfarecharge.py b/eos/effects/chargebonuswarfarecharge.py index 005101d45..83865a009 100644 --- a/eos/effects/chargebonuswarfarecharge.py +++ b/eos/effects/chargebonuswarfarecharge.py @@ -15,11 +15,7 @@ which warfareBuffID to run (shouldn't need this right now, but better safe than 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) @@ -101,12 +97,10 @@ 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) diff --git a/eos/effects/moduletitaneffectgenerator.py b/eos/effects/moduletitaneffectgenerator.py index 2a5de4473..43f8c3fbe 100644 --- a/eos/effects/moduletitaneffectgenerator.py +++ b/eos/effects/moduletitaneffectgenerator.py @@ -11,43 +11,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) @@ -63,9 +64,9 @@ def handler(fit, module, context, **kwargs): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, 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: diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 1fe345be0..27cbece91 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -449,8 +449,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) @@ -514,12 +512,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,)): diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index 1a1c56de3..567be64d6 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -655,10 +655,14 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): effect.activeByDefault and \ (effect.isType("offline") or (effect.isType("passive") and self.state >= State.ONLINE) or + (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):