Fix energy warfare

This commit is contained in:
blitzmann
2016-06-19 23:04:52 -04:00
parent 7a5e4291a5
commit ed3b2eb1bf
15 changed files with 27 additions and 15 deletions

View File

@@ -6,4 +6,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships")
"energyNeutralizerAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships")

View File

@@ -5,6 +5,6 @@ def handler(fit, container, context):
if "projected" in context and ((hasattr(container, "state") \
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
multiplier = container.amountActive if hasattr(container, "amountActive") else 1
amount = container.getModifiedItemAttr("energyDestabilizationAmount")
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(time, amount * multiplier, 0)

View File

@@ -7,6 +7,6 @@ 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("energyDestabilizationAmount")
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(time, amount, 0)

View File

@@ -7,6 +7,6 @@ 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("energyDestabilizationAmount")
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(time, amount, 0)

View File

@@ -0,0 +1,12 @@
# energyNeutralizerFalloff
#
# Used by:
# 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("energyNeutralizerDuration")
fit.addDrain(time, amount, 0)

View File

@@ -5,4 +5,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship")

View File

@@ -6,4 +6,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser")

View File

@@ -6,4 +6,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate")

View File

@@ -5,4 +5,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate")

View File

@@ -5,4 +5,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("rookieNeutDrain"))
"energyNeutralizerAmount", ship.getModifiedItemAttr("rookieNeutDrain"))

View File

@@ -5,4 +5,4 @@
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", module.getModifiedItemAttr("subsystemBonusAmarrElectronic"), skill="Amarr Electronic Systems")
"energyNeutralizerAmount", module.getModifiedItemAttr("subsystemBonusAmarrElectronic"), skill="Amarr Electronic Systems")

View File

@@ -6,5 +6,5 @@ runTime = "early"
type = ("projected", "passive")
def handler(fit, beacon, context):
fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", beacon.getModifiedItemAttr("energyWarfareStrengthMultiplier"),
"energyNeutralizerAmount", beacon.getModifiedItemAttr("energyWarfareStrengthMultiplier"),
stackingPenalties=True, penaltyGroup="postMul")

View File

@@ -6,5 +6,5 @@ runTime = "early"
type = ("projected", "passive")
def handler(fit, beacon, context):
fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Bomb Deployment"),
"energyDestabilizationAmount", beacon.getModifiedItemAttr("smartbombDamageMultiplier"),
"energyNeutralizerAmount", beacon.getModifiedItemAttr("smartbombDamageMultiplier"),
stackingPenalties=True, penaltyGroup="postMul")

View File

@@ -86,7 +86,7 @@ class Miscellanea(ViewColumn):
info.append("{0}{1}".format(n, slot[0].upper()))
return "+ "+", ".join(info), "Slot Modifiers"
elif itemGroup == "Energy Neutralizer":
neutAmount = stuff.getModifiedItemAttr("energyDestabilizationAmount")
neutAmount = stuff.getModifiedItemAttr("energyNeutralizerAmount")
cycleTime = stuff.cycleTime
if not neutAmount or not cycleTime:
return "", None
@@ -429,8 +429,8 @@ class Miscellanea(ViewColumn):
tooltip = "{0} repaired per second".format(formatList(ttEntries)).capitalize()
return text, tooltip
elif itemGroup == "Energy Neutralizer Drone":
neutAmount = stuff.getModifiedItemAttr("energyDestabilizationAmount")
cycleTime = stuff.getModifiedItemAttr("duration")
neutAmount = stuff.getModifiedItemAttr("energyNeutralizerAmount")
cycleTime = stuff.getModifiedItemAttr("energyNeutralizerDuration")
if not neutAmount or not cycleTime:
return "", None
capPerSec = float(-neutAmount) * 1000 / cycleTime

0
service/crudeTests.py Normal file
View File