From e6da57ab5717d4cfe3efacf75e71873c2bf0f9f2 Mon Sep 17 00:00:00 2001 From: Ryan Holmes Date: Tue, 27 Nov 2018 21:40:22 -0500 Subject: [PATCH] Fix standup nuets not respecting energy warfare resists (#1808) --- eos/effects/structureenergyneutralizerfalloff.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/eos/effects/structureenergyneutralizerfalloff.py b/eos/effects/structureenergyneutralizerfalloff.py index 78ca57a33..c9cdd769e 100644 --- a/eos/effects/structureenergyneutralizerfalloff.py +++ b/eos/effects/structureenergyneutralizerfalloff.py @@ -3,14 +3,20 @@ # Used by: # Structure Modules from group: Structure Energy Neutralizer (5 of 5) from eos.saveddata.module import State +from eos.modifiedAttributeDict import ModifiedAttributeDict type = "active", "projected" -def handler(fit, container, context): +def handler(fit, src, context, **kwargs): amount = 0 if "projected" in context: - if (hasattr(container, "state") and container.state >= State.ACTIVE) or hasattr(container, "amountActive"): - amount = container.getModifiedItemAttr("energyNeutralizerAmount") - time = container.getModifiedItemAttr("duration") - fit.addDrain(container, time, amount, 0) + if (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) \ No newline at end of file