Files
pyfa/eos/effects/structuremoduleeffectecm.py
2016-09-28 00:20:30 -04:00

9 lines
362 B
Python

# Not used by any item
type = "projected", "active"
def handler(fit, module, context):
if "projected" in context:
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
strModifier = 1 - module.getModifiedItemAttr("scan{0}StrengthBonus".format(fit.scanType))/fit.scanStrength
fit.ecmProjectedStr *= strModifier