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

Method handler

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

Source from the content-addressed store, hash-verified

30413
30414 @staticmethod
30415 def handler(fit, module, context, projectionRange, **kwargs):
30416 if 'projected' not in context:
30417 return
30418 if fit.ship.getModifiedItemAttr('disallowOffensiveModifiers'):
30419 return
30420 rangeFactor = calculateRangeFactor(
30421 srcOptimalRange=module.getModifiedItemAttr('maxRange'),
30422 srcFalloffRange=module.getModifiedItemAttr('falloffEffectiveness'),
30423 distance=projectionRange)
30424 for srcAttr, tgtAttr in (
30425 ('aoeCloudSizeBonus', 'aoeCloudSize'),
30426 ('aoeVelocityBonus', 'aoeVelocity'),
30427 ('missileVelocityBonus', 'maxVelocity'),
30428 ('explosionDelayBonus', 'explosionDelay')
30429 ):
30430 fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill('Missile Launcher Operation'),
30431 tgtAttr, module.getModifiedItemAttr(srcAttr) * rangeFactor,
30432 stackingPenalties=True, **kwargs)
30433 for srcAttr, tgtAttr in (
30434 ('trackingSpeedBonus', 'trackingSpeed'),
30435 ('maxRangeBonus', 'maxRange'),
30436 ('falloffBonus', 'falloff')
30437 ):
30438 fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Gunnery'),
30439 tgtAttr, module.getModifiedItemAttr(srcAttr) * rangeFactor,
30440 stackingPenalties=True, **kwargs)
30441
30442
30443class Effect6687(BaseEffect):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected