diff --git a/eos/effects/fighterabilityecm.py b/eos/effects/fighterabilityecm.py new file mode 100644 index 000000000..10be84766 --- /dev/null +++ b/eos/effects/fighterabilityecm.py @@ -0,0 +1,18 @@ +""" +Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the +effects, and thus this effect file contains some custom information useful only to fighters. +""" +from eos.types import State + +# User-friendly name for the ability +displayName = "ECM" + +prefix = "fighterAbilityECM" + +type = "projected", "active" +def handler(fit, module, context): + if "projected" not in context: return + # jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str)) + strModifier = 1 - module.getModifiedItemAttr("{}Srength{}".format(prefix, fit.scanType))/fit.scanStrength + + fit.ecmProjectedStr *= strModifier diff --git a/eos/effects/fighterabilityenergyneutralizer.py b/eos/effects/fighterabilityenergyneutralizer.py new file mode 100644 index 000000000..2601bc535 --- /dev/null +++ b/eos/effects/fighterabilityenergyneutralizer.py @@ -0,0 +1,19 @@ +""" +Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the +effects, and thus this effect file contains some custom information useful only to fighters. +""" +from eos.types import State + +# User-friendly name for the ability +displayName = "Energy Neutralizer" + +prefix = "fighterAbilityEnergyNeutralizer" + +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("{}Amount".format(prefix)) + time = container.getModifiedItemAttr("{}Duration".format(prefix)) + fit.addDrain(time, amount * multiplier, 0) \ No newline at end of file diff --git a/eos/effects/fighterabilitystasiswebifier.py b/eos/effects/fighterabilitystasiswebifier.py new file mode 100644 index 000000000..90da7a4eb --- /dev/null +++ b/eos/effects/fighterabilitystasiswebifier.py @@ -0,0 +1,17 @@ +""" +Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the +effects, and thus this effect file contains some custom information useful only to fighters. +""" +from eos.types import State + +# User-friendly name for the ability +displayName = "Stasis Webifier" + +prefix = "fighterAbilityStasisWebifier" + +type = "active", "projected" + +def handler(fit, src, context): + if "projected" not in context: return + multiplier = src.amountActive if hasattr(src, "amountActive") else 1 + fit.ship.boostItemAttr("maxVelocity", src.getModifiedItemAttr("{}SpeedPenalty") * multiplier) diff --git a/eos/effects/fighterabilitywarpdisruption.py b/eos/effects/fighterabilitywarpdisruption.py new file mode 100644 index 000000000..8e74b35d7 --- /dev/null +++ b/eos/effects/fighterabilitywarpdisruption.py @@ -0,0 +1,16 @@ +""" +Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the +effects, and thus this effect file contains some custom information useful only to fighters. +""" +from eos.types import State + +# User-friendly name for the ability +displayName = "Warp Disruption" + +prefix = "fighterAbilityWarpDisruption" + +type = "active", "projected" + +def handler(fit, src, context): + if "projected" not in context: return + fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("{}PointStrength".format(prefix))) \ No newline at end of file diff --git a/eve.db b/eve.db index 79e3162b2..2f59c24be 100644 Binary files a/eve.db and b/eve.db differ