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

Method handler

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

Source from the content-addressed store, hash-verified

24801
24802 @staticmethod
24803 def handler(fit, src, context, projectionRange, **kwargs):
24804 if 'projected' not in context:
24805 return
24806 if not ((hasattr(src, 'state') and src.state >= FittingModuleState.ACTIVE) or hasattr(src, 'amountActive')):
24807 return
24808 amount = src.getModifiedItemAttr('energyNeutralizerAmount')
24809 amount *= calculateRangeFactor(
24810 srcOptimalRange=src.getModifiedItemAttr('maxRange'),
24811 srcFalloffRange=src.getModifiedItemAttr('falloffEffectiveness'),
24812 distance=projectionRange)
24813 if 'effect' in kwargs:
24814 from eos.modifiedAttributeDict import ModifiedAttributeDict
24815 amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
24816 time = src.getModifiedItemAttr('duration')
24817 fit.addDrain(src, time, amount, 0)
24818
24819
24820class Effect6188(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