diff --git a/eos/effects/energyneutralizerfalloff.py b/eos/effects/energyneutralizerfalloff.py new file mode 100644 index 000000000..9346d4d85 --- /dev/null +++ b/eos/effects/energyneutralizerfalloff.py @@ -0,0 +1,9 @@ +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")): + multiplier = container.amountActive if hasattr(container, "amountActive") else 1 + amount = container.getModifiedItemAttr("energyDestabilizationAmount") + time = container.getModifiedItemAttr("duration") + fit.addDrain(time, amount * multiplier, 0) diff --git a/eos/effects/energynosferatufalloff.py b/eos/effects/energynosferatufalloff.py new file mode 100644 index 000000000..0ce27efa5 --- /dev/null +++ b/eos/effects/energynosferatufalloff.py @@ -0,0 +1,9 @@ +type = "active", "projected" +runTime = "late" +def handler(fit, module, context): + amount = module.getModifiedItemAttr("powerTransferAmount") + time = module.getModifiedItemAttr("duration") + if "projected" in context: + fit.addDrain(time, amount, 0) + elif "module" in context: + module.itemModifiedAttributes.force("capacitorNeed", -amount) diff --git a/eos/effects/shipbonusenergyneutfalloffab2.py b/eos/effects/shipbonusenergyneutfalloffab2.py new file mode 100644 index 000000000..8af831214 --- /dev/null +++ b/eos/effects/shipbonusenergyneutfalloffab2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonusAB2"), skill="Amarr Battleship") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutfalloffac3.py b/eos/effects/shipbonusenergyneutfalloffac3.py new file mode 100644 index 000000000..3335ea14a --- /dev/null +++ b/eos/effects/shipbonusenergyneutfalloffac3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonus3AC"), skill="Amarr Cruiser") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutfalloffad1.py b/eos/effects/shipbonusenergyneutfalloffad1.py new file mode 100644 index 000000000..a2d60a88b --- /dev/null +++ b/eos/effects/shipbonusenergyneutfalloffad1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonusAD1"), skill="Amarr Destroyer") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutfalloffaf3.py b/eos/effects/shipbonusenergyneutfalloffaf3.py new file mode 100644 index 000000000..2f2b8ec4e --- /dev/null +++ b/eos/effects/shipbonusenergyneutfalloffaf3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonus3AF"), skill="Amarr Frigate") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutfalloffeaf3.py b/eos/effects/shipbonusenergyneutfalloffeaf3.py new file mode 100644 index 000000000..7996fd211 --- /dev/null +++ b/eos/effects/shipbonusenergyneutfalloffeaf3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "falloffEffectiveness", ship.getModifiedItemAttr("eliteBonusElectronicAttackShip3"), skill="Electronic Attack Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutfalloffrs2.py b/eos/effects/shipbonusenergyneutfalloffrs2.py new file mode 100644 index 000000000..01b630b9b --- /dev/null +++ b/eos/effects/shipbonusenergyneutfalloffrs2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "falloffEffectiveness", ship.getModifiedItemAttr("eliteBonusReconShip3"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutfalloffrs3.py b/eos/effects/shipbonusenergyneutfalloffrs3.py new file mode 100644 index 000000000..9d920a5ae --- /dev/null +++ b/eos/effects/shipbonusenergyneutfalloffrs3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "falloffEffectiveness", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutoptimalab.py b/eos/effects/shipbonusenergyneutoptimalab.py new file mode 100644 index 000000000..c800ef497 --- /dev/null +++ b/eos/effects/shipbonusenergyneutoptimalab.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "maxRange", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutoptimalac1.py b/eos/effects/shipbonusenergyneutoptimalac1.py new file mode 100644 index 000000000..e9583c938 --- /dev/null +++ b/eos/effects/shipbonusenergyneutoptimalac1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "maxRange", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutoptimalad2.py b/eos/effects/shipbonusenergyneutoptimalad2.py new file mode 100644 index 000000000..ded8c9a6c --- /dev/null +++ b/eos/effects/shipbonusenergyneutoptimalad2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "maxRange", ship.getModifiedItemAttr("shipBonusAD2"), skill="Amarr Destroyer") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutoptimalaf2.py b/eos/effects/shipbonusenergyneutoptimalaf2.py new file mode 100644 index 000000000..b16600c1b --- /dev/null +++ b/eos/effects/shipbonusenergyneutoptimalaf2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "maxRange", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutoptimaleaf1.py b/eos/effects/shipbonusenergyneutoptimaleaf1.py new file mode 100644 index 000000000..c22f74981 --- /dev/null +++ b/eos/effects/shipbonusenergyneutoptimaleaf1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "maxRange", ship.getModifiedItemAttr("eliteBonusElectronicAttackShip1"), skill="Electronic Attack Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutoptimalrs1.py b/eos/effects/shipbonusenergyneutoptimalrs1.py new file mode 100644 index 000000000..ffbe0cc8d --- /dev/null +++ b/eos/effects/shipbonusenergyneutoptimalrs1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "maxRange", ship.getModifiedItemAttr("eliteBonusReconShip3"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergyneutoptimalrs3.py b/eos/effects/shipbonusenergyneutoptimalrs3.py new file mode 100644 index 000000000..ef1bb4a6c --- /dev/null +++ b/eos/effects/shipbonusenergyneutoptimalrs3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", + "maxRange", ship.getModifiedItemAttr("eliteBonusReconShip1"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffab.py b/eos/effects/shipbonusenergynosfalloffab.py new file mode 100644 index 000000000..0f0c50c07 --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffab.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffab2.py b/eos/effects/shipbonusenergynosfalloffab2.py new file mode 100644 index 000000000..a0c0f25fa --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffab2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonusAB2"), skill="Amarr Battleship") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffac3.py b/eos/effects/shipbonusenergynosfalloffac3.py new file mode 100644 index 000000000..e9170ee2b --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffac3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonus3AC"), skill="Amarr Cruiser") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffad1.py b/eos/effects/shipbonusenergynosfalloffad1.py new file mode 100644 index 000000000..ed49e4788 --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffad1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonusAD1"), skill="Amarr Destroyer") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffaf3.py b/eos/effects/shipbonusenergynosfalloffaf3.py new file mode 100644 index 000000000..788d0498d --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffaf3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("shipBonus3AF"), skill="Amarr Frigate") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffeaf3.py b/eos/effects/shipbonusenergynosfalloffeaf3.py new file mode 100644 index 000000000..c5e6e9b15 --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffeaf3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("eliteBonusElectronicAttackShip3"), skill="Electronic Attack Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffrs2.py b/eos/effects/shipbonusenergynosfalloffrs2.py new file mode 100644 index 000000000..80884d071 --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffrs2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("eliteBonusReconShip3"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosfalloffrs3.py b/eos/effects/shipbonusenergynosfalloffrs3.py new file mode 100644 index 000000000..56ffdfdfb --- /dev/null +++ b/eos/effects/shipbonusenergynosfalloffrs3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "falloffEffectiveness", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosoptimalac1.py b/eos/effects/shipbonusenergynosoptimalac1.py new file mode 100644 index 000000000..e78f33419 --- /dev/null +++ b/eos/effects/shipbonusenergynosoptimalac1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "maxRange", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosoptimalad2.py b/eos/effects/shipbonusenergynosoptimalad2.py new file mode 100644 index 000000000..3ab31c3d3 --- /dev/null +++ b/eos/effects/shipbonusenergynosoptimalad2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "maxRange", ship.getModifiedItemAttr("shipBonusAD2"), skill="Amarr Destroyer") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosoptimalaf2.py b/eos/effects/shipbonusenergynosoptimalaf2.py new file mode 100644 index 000000000..8d677e66c --- /dev/null +++ b/eos/effects/shipbonusenergynosoptimalaf2.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "maxRange", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosoptimaleaf1.py b/eos/effects/shipbonusenergynosoptimaleaf1.py new file mode 100644 index 000000000..a75336a5d --- /dev/null +++ b/eos/effects/shipbonusenergynosoptimaleaf1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "maxRange", ship.getModifiedItemAttr("eliteBonusElectronicAttackShip1"), skill="Electronic Attack Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosoptimalrs1.py b/eos/effects/shipbonusenergynosoptimalrs1.py new file mode 100644 index 000000000..28cdebad5 --- /dev/null +++ b/eos/effects/shipbonusenergynosoptimalrs1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "maxRange", ship.getModifiedItemAttr("eliteBonusReconShip3"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/effects/shipbonusenergynosoptimalrs3.py b/eos/effects/shipbonusenergynosoptimalrs3.py new file mode 100644 index 000000000..7a439c508 --- /dev/null +++ b/eos/effects/shipbonusenergynosoptimalrs3.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", + "maxRange", ship.getModifiedItemAttr("eliteBonusReconShip1"), skill="Recon Ships") \ No newline at end of file diff --git a/eos/saveddata/drone.py b/eos/saveddata/drone.py index 2fcb6a908..507c55681 100644 --- a/eos/saveddata/drone.py +++ b/eos/saveddata/drone.py @@ -172,7 +172,7 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): # Put them in the attrs tuple. @property def falloff(self): - attrs = ("falloff",) + attrs = ("falloff", "falloffEffectiveness") for attr in attrs: falloff = self.getModifiedItemAttr(attr) if falloff is not None: return falloff @@ -201,7 +201,7 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): # Do not allow to apply offensive modules on ship with offensive module immunite, with few exceptions # (all effects which apply instant modification are exception, generally speaking) if item.offensive and projectedOnto.ship.getModifiedItemAttr("disallowOffensiveModifiers") == 1: - offensiveNonModifiers = set(("energyDestabilizationNew", "leech")) + offensiveNonModifiers = set(("energyDestabilizationNew", "leech", "energyNosferatuFalloff", "energyNeutralizerFalloff")) if not offensiveNonModifiers.intersection(set(item.effects)): return False # If assistive modules are not allowed, do not let to apply these altogether diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index 5fbb75e1c..6c3b4273a 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -254,7 +254,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): @property def falloff(self): - attrs = ("falloff", "shipScanFalloff") + attrs = ("falloff", "shipScanFalloff", "falloffEffectiveness") for attr in attrs: falloff = self.getModifiedItemAttr(attr) if falloff is not None: return falloff @@ -469,7 +469,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): # Do not allow to apply offensive modules on ship with offensive module immunite, with few exceptions # (all effects which apply instant modification are exception, generally speaking) if item.offensive and projectedOnto.ship.getModifiedItemAttr("disallowOffensiveModifiers") == 1: - offensiveNonModifiers = set(("energyDestabilizationNew", "leech")) + offensiveNonModifiers = set(("energyDestabilizationNew", "leech", "energyNosferatuFalloff", "energyNeutralizerFalloff")) if not offensiveNonModifiers.intersection(set(item.effects)): return False # If assistive modules are not allowed, do not let to apply these altogether