Files
pyfa/eos/effects/energynosferatufalloff.py
burnsypet 3072dbb3ff Remove energy warfare resistance on capNeed calc
When calculating the capactitor need of an energy nosferatu the
amount was being modified incorrectly by the energy warfare
resistance of the ship. Change to only apply energy warfare
resitance modifier if this is a projected effect.
2018-01-26 14:48:35 +00:00

22 lines
650 B
Python

# energyNosferatuFalloff
#
# Used by:
# Modules from group: Energy Nosferatu (51 of 51)
from eos.modifiedAttributeDict import ModifiedAttributeDict
type = "active", "projected"
runTime = "late"
def handler(fit, src, context, **kwargs):
amount = src.getModifiedItemAttr("powerTransferAmount")
time = src.getModifiedItemAttr("duration")
if 'effect' in kwargs and "projected" in context:
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
if "projected" in context:
fit.addDrain(src, time, amount, 0)
elif "module" in context:
src.itemModifiedAttributes.force("capacitorNeed", -amount)