diff --git a/eos/effects/energyneutralizerfalloff.py b/eos/effects/energyneutralizerfalloff.py index 7c1244f74..37d829baa 100644 --- a/eos/effects/energyneutralizerfalloff.py +++ b/eos/effects/energyneutralizerfalloff.py @@ -13,6 +13,9 @@ def handler(fit, src, context, **kwargs): hasattr(src, "amountActive")): amount = src.getModifiedItemAttr("energyNeutralizerAmount") + if 'effect' in kwargs: + amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) + time = src.getModifiedItemAttr("duration") fit.addDrain(src, time, amount, 0) diff --git a/eos/effects/energynosferatufalloff.py b/eos/effects/energynosferatufalloff.py index 2e564df5c..841efb7cf 100644 --- a/eos/effects/energynosferatufalloff.py +++ b/eos/effects/energynosferatufalloff.py @@ -12,6 +12,9 @@ def handler(fit, src, context, **kwargs): amount = src.getModifiedItemAttr("powerTransferAmount") time = src.getModifiedItemAttr("duration") + if 'effect' in kwargs: + amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) + if "projected" in context: fit.addDrain(src, time, amount, 0) elif "module" in context: diff --git a/eos/effects/shipmoduleremotecapacitortransmitter.py b/eos/effects/shipmoduleremotecapacitortransmitter.py index 5dd535ed2..9ea44beb6 100644 --- a/eos/effects/shipmoduleremotecapacitortransmitter.py +++ b/eos/effects/shipmoduleremotecapacitortransmitter.py @@ -2,11 +2,16 @@ # # Used by: # Modules from group: Remote Capacitor Transmitter (41 of 41) +from eos.modifiedAttributeDict import ModifiedAttributeDict type = "projected", "active" -def handler(fit, src, context): +def handler(fit, src, context, **kwargs): if "projected" in context: amount = src.getModifiedItemAttr("powerTransferAmount") duration = src.getModifiedItemAttr("duration") + + if 'effect' in kwargs: + amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) + fit.addDrain(src, duration, -amount, 0) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index e5ab1970c..6397e4047 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -1193,8 +1193,7 @@ class Fit(object): if energyNeutralizerSignatureResolution: capNeed = capNeed * min(1, signatureRadius / energyNeutralizerSignatureResolution) - resistance = self.ship.getModifiedItemAttr("energyWarfareResistance") or 1 if capNeed > 0 else 1 - self.__extraDrains.append((cycleTime, capNeed * resistance, clipSize)) + self.__extraDrains.append((cycleTime, capNeed, clipSize)) def removeDrain(self, i): del self.__extraDrains[i]