diff --git a/eos/effects/energyneutralizerentity.py b/eos/effects/energyneutralizerentity.py index 993df4a39..d1fba92c7 100644 --- a/eos/effects/energyneutralizerentity.py +++ b/eos/effects/energyneutralizerentity.py @@ -4,9 +4,26 @@ # Drones from group: Energy Neutralizer Drone (3 of 3) from eos.types import State type = "active", "projected" -def handler(fit, container, context): - if "projected" in context and ((hasattr(container, "state") \ - and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): - amount = container.getModifiedItemAttr("energyNeutralizerAmount") - time = container.getModifiedItemAttr("duration") +def handler(fit, module, context): + if "projected" in context and ((hasattr(module, "state") \ + and module.state >= State.ACTIVE) or hasattr(container, "amountActive")): + amount = module.getModifiedItemAttr("energyNeutralizerAmount") + time = module.getModifiedItemAttr("duration") + rigSize = fit.ship.getModifiedItemAttr("rigSize") + modifierLarge = module.getModifiedItemAttr("entityCapacitorLevelModifierLarge") + modifierMedium = module.getModifiedItemAttr("entityCapacitorLevelModifierMedium") + modifierSmall = module.getModifiedItemAttr("entityCapacitorLevelModifierSmall") + + #Small rigged ships + if (rigSize == 1) and modifierSmall: + amount = amount*modifierSmall + + #Medium rigged ships + if (rigSize == 2) and modifierMedium: + amount = amount*modifierMedium + + #Large rigged ships + if (rigSize == 3) and modifierLarge: + amount = amount*modifierLarge + fit.addDrain(time, amount, 0) diff --git a/eos/effects/energyneutralizerfalloff.py b/eos/effects/energyneutralizerfalloff.py index b0702ad29..d2f148e2f 100644 --- a/eos/effects/energyneutralizerfalloff.py +++ b/eos/effects/energyneutralizerfalloff.py @@ -4,9 +4,27 @@ # Modules from group: Energy Neutralizer (51 of 51) from eos.types import State type = "active", "projected" -def handler(fit, container, context): - if "projected" in context and ((hasattr(container, "state") \ - and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): - amount = container.getModifiedItemAttr("energyNeutralizerAmount") - time = container.getModifiedItemAttr("duration") +def handler(fit, module, context): + if "projected" in context and ((hasattr(module, "state") \ + and module.state >= State.ACTIVE) or hasattr(container, "amountActive")): + amount = module.getModifiedItemAttr("energyNeutralizerAmount") + time = module.getModifiedItemAttr("duration") + rigSize = fit.ship.getModifiedItemAttr("rigSize") + modifierLarge = module.getModifiedItemAttr("entityCapacitorLevelModifierLarge") + modifierMedium = module.getModifiedItemAttr("entityCapacitorLevelModifierMedium") + modifierSmall = module.getModifiedItemAttr("entityCapacitorLevelModifierSmall") + + #Small rigged ships + if (rigSize == 1) and modifierSmall: + amount = amount*modifierSmall + + #Medium rigged ships + if (rigSize == 2) and modifierMedium: + amount = amount*modifierMedium + + #Large rigged ships + if (rigSize == 3) and modifierLarge: + amount = amount*modifierLarge + fit.addDrain(time, amount, 0) + diff --git a/eos/effects/energynosferatufalloff.py b/eos/effects/energynosferatufalloff.py index c2c3cecb7..6febb39be 100644 --- a/eos/effects/energynosferatufalloff.py +++ b/eos/effects/energynosferatufalloff.py @@ -7,7 +7,24 @@ runTime = "late" def handler(fit, module, context): amount = module.getModifiedItemAttr("powerTransferAmount") time = module.getModifiedItemAttr("duration") + rigSize = fit.ship.getModifiedItemAttr("rigSize") + modifierLarge = module.getModifiedItemAttr("entityCapacitorLevelModifierLarge") + modifierMedium = module.getModifiedItemAttr("entityCapacitorLevelModifierMedium") + modifierSmall = module.getModifiedItemAttr("entityCapacitorLevelModifierSmall") + if "projected" in context: + #Small rigged ships + if (rigSize == 1) and modifierSmall: + amount = amount*modifierSmall + + #Medium rigged ships + if (rigSize == 2) and modifierMedium: + amount = amount*modifierMedium + + #Large rigged ships + if (rigSize == 3) and modifierLarge: + amount = amount*modifierLarge + fit.addDrain(time, amount, 0) elif "module" in context: module.itemModifiedAttributes.force("capacitorNeed", -amount) \ No newline at end of file diff --git a/eos/effects/entityenergyneutralizerfalloff.py b/eos/effects/entityenergyneutralizerfalloff.py index 138f2e667..4303cdcab 100644 --- a/eos/effects/entityenergyneutralizerfalloff.py +++ b/eos/effects/entityenergyneutralizerfalloff.py @@ -4,9 +4,26 @@ # Drones from group: Energy Neutralizer Drone (3 of 3) from eos.types import State type = "active", "projected" -def handler(fit, container, context): - if "projected" in context and ((hasattr(container, "state") \ - and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): - amount = container.getModifiedItemAttr("energyNeutralizerAmount") - time = container.getModifiedItemAttr("energyNeutralizerDuration") +def handler(fit, module, context): + if "projected" in context and ((hasattr(module, "state") \ + and module.state >= State.ACTIVE) or hasattr(module, "amountActive")): + amount = module.getModifiedItemAttr("energyNeutralizerAmount") + time = module.getModifiedItemAttr("energyNeutralizerDuration") + rigSize = fit.ship.getModifiedItemAttr("rigSize") + modifierLarge = module.getModifiedItemAttr("entityCapacitorLevelModifierLarge") + modifierMedium = module.getModifiedItemAttr("entityCapacitorLevelModifierMedium") + modifierSmall = module.getModifiedItemAttr("entityCapacitorLevelModifierSmall") + + #Small rigged ships + if (rigSize == 1) and modifierSmall: + amount = amount*modifierSmall + + #Medium rigged ships + if (rigSize == 2) and modifierMedium: + amount = amount*modifierMedium + + #Large rigged ships + if (rigSize == 3) and modifierLarge: + amount = amount*modifierLarge + fit.addDrain(time, amount, 0) diff --git a/eos/effects/fighterabilityenergyneutralizer.py b/eos/effects/fighterabilityenergyneutralizer.py index 0315e4301..5f8c9e72d 100644 --- a/eos/effects/fighterabilityenergyneutralizer.py +++ b/eos/effects/fighterabilityenergyneutralizer.py @@ -12,8 +12,25 @@ prefix = "fighterAbilityEnergyNeutralizer" type = "active", "projected" -def handler(fit, container, context): +def handler(fit, module, context): if "projected" in context: - amount = container.getModifiedItemAttr("{}Amount".format(prefix)) - time = container.getModifiedItemAttr("{}Duration".format(prefix)) + amount = module.getModifiedItemAttr("{}Amount".format(prefix)) + time = module.getModifiedItemAttr("{}Duration".format(prefix)) + rigSize = fit.ship.getModifiedItemAttr("rigSize") + modifierLarge = module.getModifiedItemAttr("entityCapacitorLevelModifierLarge") + modifierMedium = module.getModifiedItemAttr("entityCapacitorLevelModifierMedium") + modifierSmall = module.getModifiedItemAttr("entityCapacitorLevelModifierSmall") + + # Small rigged ships + if (rigSize == 1) and modifierSmall: + amount = amount * modifierSmall + + # Medium rigged ships + if (rigSize == 2) and modifierMedium: + amount = amount * modifierMedium + + # Large rigged ships + if (rigSize == 3) and modifierLarge: + amount = amount * modifierLarge + fit.addDrain(time, amount, 0) \ No newline at end of file