MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / handler

Method handler

eos/effects.py:26836–26852  ·  view source on GitHub ↗
(fit, module, context, projectionRange, **kwargs)

Source from the content-addressed store, hash-verified

26834
26835 @staticmethod
26836 def handler(fit, module, context, projectionRange, **kwargs):
26837 if 'projected' not in context:
26838 return
26839 if fit.ship.getModifiedItemAttr('disallowOffensiveModifiers'):
26840 return
26841 rangeFactor = calculateRangeFactor(
26842 srcOptimalRange=module.getModifiedItemAttr('maxRange'),
26843 srcFalloffRange=module.getModifiedItemAttr('falloffEffectiveness'),
26844 distance=projectionRange)
26845 for srcAttr, tgtAttr in (
26846 ('trackingSpeedBonus', 'trackingSpeed'),
26847 ('maxRangeBonus', 'maxRange'),
26848 ('falloffBonus', 'falloff')
26849 ):
26850 fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Gunnery'),
26851 tgtAttr, module.getModifiedItemAttr(srcAttr) * rangeFactor,
26852 stackingPenalties=True, **kwargs)
26853
26854
26855class Effect6425(BaseEffect):

Callers

nothing calls this directly

Calls 4

calculateRangeFactorFunction · 0.90
filteredItemBoostMethod · 0.80
requiresSkillMethod · 0.80
getModifiedItemAttrMethod · 0.45

Tested by

no test coverage detected