Files
pyfa/eos/effects/fighterabilityecm.py
blitzman 7fbd89392a Revert "Remove effect files that are not used by any item"
This reverts commit b29fa2467a.

(cherry picked from commit 4a95156)
2016-12-14 12:14:39 -08:00

22 lines
682 B
Python

# Not used by any item
"""
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
effects, and thus this effect file contains some custom information useful only to fighters.
"""
# User-friendly name for the ability
displayName = "ECM"
prefix = "fighterAbilityECM"
type = "projected", "active"
def handler(fit, module, context):
if "projected" not in context:
return
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
strModifier = 1 - module.getModifiedItemAttr("{}Strength{}".format(prefix, fit.scanType)) / fit.scanStrength
fit.ecmProjectedStr *= strModifier