Files
pyfa/eos/effects/energyneutralizerfalloff.py
DarkPhoenix a8b1f38e84 Update database and implement ship effects, also make pyfa to show final damage value for disintegrators after ramp-up time is complete
(if you don't want me to commit here just write phoenix@mail.ru, i have no way to communicate with you otherwise)
2018-04-24 19:13:30 +03:00

22 lines
701 B
Python

# energyNeutralizerFalloff
#
# Used by:
# Modules from group: Energy Neutralizer (54 of 54)
from eos.saveddata.module import State
from eos.modifiedAttributeDict import ModifiedAttributeDict
type = "active", "projected"
def handler(fit, src, context, **kwargs):
if "projected" in context and ((hasattr(src, "state") and src.state >= State.ACTIVE) or
hasattr(src, "amountActive")):
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
if 'effect' in kwargs:
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
time = src.getModifiedItemAttr("duration")
fit.addDrain(src, time, amount, 0)