MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / handler

Method handler

eos/effects.py:24954–24969  ·  view source on GitHub ↗
(fit, src, context, projectionRange, **kwargs)

Source from the content-addressed store, hash-verified

24952
24953 @staticmethod
24954 def handler(fit, src, context, projectionRange, **kwargs):
24955 amount = 0
24956 if 'projected' not in context:
24957 return
24958 if not ((hasattr(src, 'state') and src.state >= FittingModuleState.ACTIVE) or hasattr(src, 'amountActive')):
24959 return
24960 amount = src.getModifiedItemAttr('energyNeutralizerAmount')
24961 amount *= calculateRangeFactor(
24962 srcOptimalRange=src.getModifiedItemAttr('maxRange'),
24963 srcFalloffRange=src.getModifiedItemAttr('falloffEffectiveness'),
24964 distance=projectionRange)
24965 if 'effect' in kwargs:
24966 from eos.modifiedAttributeDict import ModifiedAttributeDict
24967 amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
24968 time = src.getModifiedItemAttr('duration')
24969 fit.addDrain(src, time, amount, 0)
24970
24971
24972class Effect6222(BaseEffect):

Callers

nothing calls this directly

Calls 4

calculateRangeFactorFunction · 0.90
getResistanceMethod · 0.80
addDrainMethod · 0.80
getModifiedItemAttrMethod · 0.45

Tested by

no test coverage detected