Fix energy warfare
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
12
eos/effects/entityenergyneutralizerfalloff.py
Normal file
12
eos/effects/entityenergyneutralizerfalloff.py
Normal 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)
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
0
service/crudeTests.py
Normal file
Reference in New Issue
Block a user