diff --git a/eos/effects/missileaoecloudsizebonusonline.py b/eos/effects/missileaoecloudsizebonusonline.py index 843fc0c47..11ebe04f2 100644 --- a/eos/effects/missileaoecloudsizebonusonline.py +++ b/eos/effects/missileaoecloudsizebonusonline.py @@ -3,7 +3,7 @@ # Used by: # Modules from group: Missile Guidance Enhancer (3 of 3) type = "passive" -def handler(fit, container, context): +def handler(fit, module, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "aoeCloudSize", container.getModifiedItemAttr("aoeCloudSizeBonus"), + "aoeCloudSize", module.getModifiedItemAttr("aoeCloudSizeBonus"), stackingPenalties=True) diff --git a/eos/effects/missileaoevelocitybonusonline.py b/eos/effects/missileaoevelocitybonusonline.py index 66eb5321b..acfa8c8ec 100644 --- a/eos/effects/missileaoevelocitybonusonline.py +++ b/eos/effects/missileaoevelocitybonusonline.py @@ -3,7 +3,7 @@ # Used by: # Modules from group: Missile Guidance Enhancer (3 of 3) type = "passive" -def handler(fit, container, context): +def handler(fit, module, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "aoeVelocity", container.getModifiedItemAttr("aoeVelocityBonus"), + "aoeVelocity", module.getModifiedItemAttr("aoeVelocityBonus"), stackingPenalties=True) diff --git a/eos/effects/missileexplosiondelaybonusonline.py b/eos/effects/missileexplosiondelaybonusonline.py index 5d2c770d9..3f6949217 100644 --- a/eos/effects/missileexplosiondelaybonusonline.py +++ b/eos/effects/missileexplosiondelaybonusonline.py @@ -3,7 +3,7 @@ # Used by: # Modules from group: Missile Guidance Enhancer (3 of 3) type = "passive" -def handler(fit, container, context): +def handler(fit, module, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "explosionDelay", container.getModifiedItemAttr("explosionDelayBonus"), + "explosionDelay", module.getModifiedItemAttr("explosionDelayBonus"), stackingPenalties=True) diff --git a/eos/effects/missilevelocitybonusonline.py b/eos/effects/missilevelocitybonusonline.py index 95280821a..947a2dfac 100644 --- a/eos/effects/missilevelocitybonusonline.py +++ b/eos/effects/missilevelocitybonusonline.py @@ -3,7 +3,7 @@ # Used by: # Modules from group: Missile Guidance Enhancer (3 of 3) type = "passive" -def handler(fit, container, context): +def handler(fit, module, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "maxVelocity", container.getModifiedItemAttr("missileVelocityBonus"), + "maxVelocity", module.getModifiedItemAttr("missileVelocityBonus"), stackingPenalties=True) diff --git a/eos/effects/pointdefense.py b/eos/effects/pointdefense.py new file mode 100644 index 000000000..fba6177ae --- /dev/null +++ b/eos/effects/pointdefense.py @@ -0,0 +1,13 @@ +# targetAttack +# +# Used by: +# Citadel Point Defense +type = 'active' +def handler(fit, module, context): + # Set reload time to 1 second + module.reloadTime = 1000 + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure. +# also doesn't have reload so... \ No newline at end of file diff --git a/eos/effects/remoteguidancedisruptfalloff.py b/eos/effects/remoteguidancedisruptfalloff.py index 48fadecaa..ede3f06f5 100644 --- a/eos/effects/remoteguidancedisruptfalloff.py +++ b/eos/effects/remoteguidancedisruptfalloff.py @@ -4,7 +4,7 @@ # Variations of module: Guidance Disruptor I (6 of 6) type = "active", "projected" -def handler(fit, src, context): +def handler(fit, module, context): if "projected" in context: for srcAttr, tgtAttr in ( ("aoeCloudSizeBonus", "aoeCloudSize"), @@ -13,5 +13,5 @@ def handler(fit, src, context): ("explosionDelayBonus", "explosionDelay"), ): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - tgtAttr, src.getModifiedItemAttr(srcAttr), + tgtAttr, module.getModifiedItemAttr(srcAttr), stackingPenalties=True, remoteResists=True) diff --git a/eos/effects/structureMissileGuidanceEnhancer.py b/eos/effects/structureMissileGuidanceEnhancer.py new file mode 100644 index 000000000..0ce10caac --- /dev/null +++ b/eos/effects/structureMissileGuidanceEnhancer.py @@ -0,0 +1,18 @@ +# missileAOECloudSizeBonusOnline +# +# Used by: +# Modules from group: Missile Guidance Enhancer (3 of 3) +type = "passive" +def handler(fit, module, context): + fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + "aoeCloudSize", module.getModifiedItemAttr("aoeCloudSizeBonus"), + stackingPenalties=True) + fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + "aoeVelocity", module.getModifiedItemAttr("aoeVelocityBonus"), + stackingPenalties=True) + fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + "explosionDelay", module.getModifiedItemAttr("explosionDelayBonus"), + stackingPenalties=True) + fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + "maxVelocity", module.getModifiedItemAttr("missileVelocityBonus"), + stackingPenalties=True) diff --git a/eos/effects/structureballisticcontrolsystem.py b/eos/effects/structureballisticcontrolsystem.py new file mode 100644 index 000000000..146dcd166 --- /dev/null +++ b/eos/effects/structureballisticcontrolsystem.py @@ -0,0 +1,14 @@ +# missileDMGBonus +# +# Used by: +# Modules from group: Ballistic Control system (17 of 17) +# Modules named like: QA Multiship Module Players (4 of 4) +type = "passive" +def handler(fit, module, context): + for dmgType in ("em", "kinetic", "explosive", "thermal"): + fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + "%sDamage" % dmgType, module.getModifiedItemAttr("missileDamageMultiplierBonus"), + stackingPenalties = True) + fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Missile Launcher Operation"), + "speed", module.getModifiedItemAttr("speedMultiplier"), + stackingPenalties=True) diff --git a/eos/effects/structureenergyneutralizerfalloff.py b/eos/effects/structureenergyneutralizerfalloff.py new file mode 100644 index 000000000..448574da3 --- /dev/null +++ b/eos/effects/structureenergyneutralizerfalloff.py @@ -0,0 +1,17 @@ +# 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("duration") + fit.addDrain(time, amount, 0) + + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure.` \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectecm.py b/eos/effects/structuremoduleeffectecm.py new file mode 100644 index 000000000..3666b00ab --- /dev/null +++ b/eos/effects/structuremoduleeffectecm.py @@ -0,0 +1,15 @@ +# remoteECMFalloff +# +# Used by: +# Modules from group: ECM (39 of 39) +type = "projected", "active" +def handler(fit, module, context): + if "projected" in context: + # jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str)) + strModifier = 1 - module.getModifiedItemAttr("scan{0}StrengthBonus".format(fit.scanType))/fit.scanStrength + + fit.ecmProjectedStr *= strModifier + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectremotesensordampener.py b/eos/effects/structuremoduleeffectremotesensordampener.py new file mode 100644 index 000000000..eb02524de --- /dev/null +++ b/eos/effects/structuremoduleeffectremotesensordampener.py @@ -0,0 +1,18 @@ +# remoteSensorDampFalloff +# +# Used by: +# Modules from group: Sensor Dampener (6 of 6) +type= "projected", "active" +def handler(fit, module, context): + if "projected" not in context: + return + + fit.ship.boostItemAttr("maxTargetRange", module.getModifiedItemAttr("maxTargetRangeBonus"), + stackingPenalties = True, remoteResists=True) + + fit.ship.boostItemAttr("scanResolution", module.getModifiedItemAttr("scanResolutionBonus"), + stackingPenalties = True, remoteResists=True) + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectstasiswebifier.py b/eos/effects/structuremoduleeffectstasiswebifier.py new file mode 100644 index 000000000..7e28f4fe7 --- /dev/null +++ b/eos/effects/structuremoduleeffectstasiswebifier.py @@ -0,0 +1,15 @@ +# remoteWebifierFalloff +# +# Used by: +# Modules from group: Stasis Grappler (7 of 7) +# Modules from group: Stasis Web (18 of 18) +type = "active", "projected" +def handler(fit, module, context): + if "projected" not in context: return + fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("speedFactor"), + stackingPenalties = True, remoteResists=True) + + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffecttargetpainter.py b/eos/effects/structuremoduleeffecttargetpainter.py new file mode 100644 index 000000000..50b526878 --- /dev/null +++ b/eos/effects/structuremoduleeffecttargetpainter.py @@ -0,0 +1,13 @@ +# remoteTargetPaintFalloff +# +# Used by: +# Modules from group: Target Painter (8 of 8) +type = "projected", "active" +def handler(fit, container, context): + if "projected" in context: + fit.ship.boostItemAttr("signatureRadius", container.getModifiedItemAttr("signatureRadiusBonus"), + stackingPenalties = True, remoteResists=True) + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectweapondisruption.py b/eos/effects/structuremoduleeffectweapondisruption.py new file mode 100644 index 000000000..91b009c2a --- /dev/null +++ b/eos/effects/structuremoduleeffectweapondisruption.py @@ -0,0 +1,31 @@ +# remoteGuidanceDisruptFalloff +# +# Used by: +# Variations of module: Standup Weapon Disruptor +type = "active", "projected" + +def handler(fit, module, context): + if "projected" in context: + for srcAttr, tgtAttr in ( + ("aoeCloudSizeBonus", "aoeCloudSize"), + ("aoeVelocityBonus", "aoeVelocity"), + ("missileVelocityBonus", "maxVelocity"), + ("explosionDelayBonus", "explosionDelay"), + ): + fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + tgtAttr, src.getModifiedItemAttr(srcAttr), + stackingPenalties=True, remoteResists=True) + + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), + "trackingSpeed", module.getModifiedItemAttr("trackingSpeedBonus"), + stackingPenalties = True, remoteResists=True) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), + "maxRange", module.getModifiedItemAttr("maxRangeBonus"), + stackingPenalties = True, remoteResists=True) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), + "falloff", module.getModifiedItemAttr("falloffBonus"), + stackingPenalties = True, remoteResists=True) + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py new file mode 100644 index 000000000..b287d368f --- /dev/null +++ b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py @@ -0,0 +1,21 @@ +# structureWarpScrambleBlockMWDWithNPCEffect +# +# Used by: +# Modules named like: Standup Warp Scrambler +runTime = "early" +type = "projected", "active" + +from eos.types import State + +def handler(fit, module, context): + if "projected" not in context: + return + # this is such a dirty hack + for mod in fit.modules: + if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE: + mod.state = State.ONLINE + + +# TODO +# believe this doesn't actual require skills to use. +# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file