From ead595e66606658bd83c458899b33b00066806c8 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sun, 13 Aug 2017 21:19:55 -0400 Subject: [PATCH] Allow burst projector to be projected --- eos/effects/doomsdayaoeecm.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 eos/effects/doomsdayaoeecm.py diff --git a/eos/effects/doomsdayaoeecm.py b/eos/effects/doomsdayaoeecm.py new file mode 100644 index 000000000..0c6fd47ff --- /dev/null +++ b/eos/effects/doomsdayaoeecm.py @@ -0,0 +1,18 @@ +# ECMBurstJammer +# +# Used by: +# Modules from group: Burst Jammer (11 of 11) +from eos.modifiedAttributeDict import ModifiedAttributeDict + +type = "projected", "active" + + +def handler(fit, module, context, **kwargs): + 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 + + if 'effect' in kwargs: + strModifier *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) + + fit.ecmProjectedStr *= strModifier \ No newline at end of file