Applied size reduction effect to neut/nos

This commit is contained in:
Ebag333
2016-07-17 00:01:41 -07:00
parent 23a6849fe3
commit 2a2842100a
5 changed files with 104 additions and 18 deletions

View File

@@ -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)