PEP8 formatting! \o/
This commit is contained in:
@@ -10,5 +10,6 @@ gangBoost = "armorHP"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr("armorHP", module.getModifiedItemAttr("armorHpBonus2"))
|
||||
|
||||
@@ -8,7 +8,8 @@ type = "active", "gang"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
for scanType in ("Magnetometric", "Radar", "Ladar", "Gravimetric"):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Electronic Warfare"),
|
||||
"scan%sStrengthBonus" % scanType,
|
||||
|
||||
@@ -8,7 +8,8 @@ type = "active", "gang"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Sensor Linking"),
|
||||
"maxTargetRangeBonus", module.getModifiedItemAttr("commandBonusRSD"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Sensor Linking"),
|
||||
|
||||
@@ -8,7 +8,8 @@ type = "active", "gang"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
for bonus in (
|
||||
"missileVelocityBonus",
|
||||
"explosionDelayBonus",
|
||||
|
||||
@@ -8,7 +8,8 @@ type = "active", "gang"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Target Painting"),
|
||||
"signatureRadiusBonus", module.getModifiedItemAttr("commandBonusTP"),
|
||||
stackingPenalties=True)
|
||||
|
||||
@@ -6,7 +6,7 @@ type = "active", "projected"
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "projected" in context and (
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
multiplier = src.amountActive if hasattr(src, "amountActive") else 1
|
||||
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = src.getModifiedItemAttr("duration")
|
||||
|
||||
@@ -9,7 +9,7 @@ type = "active", "projected"
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "projected" in context and (
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = src.getModifiedItemAttr("duration")
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ type = "active", "projected"
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "projected" in context and (
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = src.getModifiedItemAttr("duration")
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ type = "active", "projected"
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "projected" in context and (
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
|
||||
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = src.getModifiedItemAttr("energyNeutralizerDuration")
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ type = "projected", "active"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "projected" not in context: return
|
||||
if "projected" not in context:
|
||||
return
|
||||
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
|
||||
strModifier = 1 - module.getModifiedItemAttr("{}Strength{}".format(prefix, fit.scanType)) / fit.scanStrength
|
||||
|
||||
|
||||
@@ -13,5 +13,6 @@ type = "active", "projected"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "projected" not in context: return
|
||||
if "projected" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr("maxVelocity", src.getModifiedItemAttr("{}SpeedPenalty".format(prefix)))
|
||||
|
||||
@@ -6,12 +6,11 @@ effects, and thus this effect file contains some custom information useful only
|
||||
|
||||
# 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
|
||||
if "projected" not in context:
|
||||
return
|
||||
fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("{}PointStrength".format(prefix)))
|
||||
|
||||
@@ -9,6 +9,6 @@ def handler(fit, module, context):
|
||||
# Note: we increase maxGroupActive by two.
|
||||
# If we only increased it by one, we'd get the number to stay equal
|
||||
# As Comman Processors use one themselves too
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Gang Coordinator" and \
|
||||
"maxGroupActive" in mod.itemModifiedAttributes,
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Gang Coordinator" and
|
||||
"maxGroupActive" in mod.itemModifiedAttributes,
|
||||
"maxGroupActive", 1)
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "speedFactor"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
|
||||
"speedFactor", module.getModifiedItemAttr("commandBonus"),
|
||||
stackingPenalties=True)
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "armorResistance"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
for damageType in ("Em", "Thermal", "Explosive", "Kinetic"):
|
||||
fit.ship.boostItemAttr("armor%sDamageResonance" % damageType,
|
||||
module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "armorRepairCapacitorNeed"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Remote Armor Repair Systems"),
|
||||
"capacitorNeed", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "armorRepairDuration"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Remote Armor Repair Systems"),
|
||||
"duration", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -7,6 +7,7 @@ gangBoost = "signatureRadius"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("commandBonus"),
|
||||
stackingPenalties=True)
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "miningCapacitorNeed"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Mining Laser", "Strip Miner", "Frequency Mining Laser",
|
||||
"Ice Harvester", "Gas Cloud Harvester")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "miningDuration"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Mining Laser", "Strip Miner", "Frequency Mining Laser",
|
||||
"Ice Harvester", "Gas Cloud Harvester")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "electronicMaxRange"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Target Painter", "Weapon Disruptor", "Sensor Dampener", "ECM", "Burst Jammer")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
"maxRange", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "miningMaxRange"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gas Cloud Harvesting") or mod.item.requiresSkill(
|
||||
"Ice Harvesting") or mod.item.requiresSkill("Mining"),
|
||||
"maxRange", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "interdictionMaxRange"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Stasis Web", "Warp Scrambler")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
"maxRange", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -8,7 +8,8 @@ gangBonus = "commandBonus"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr("maxTargetRange", module.getModifiedItemAttr("commandBonus"),
|
||||
stackingPenalties=True)
|
||||
for scanType in ("Gravimetric", "Radar", "Ladar", "Magnetometric"):
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "shieldRepairCapacitorNeed"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Shield Operation") or mod.item.requiresSkill("Shield Emission Systems"),
|
||||
"capacitorNeed", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "shieldRepairDuration"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Shield Operation") or mod.item.requiresSkill("Shield Emission Systems"),
|
||||
"duration", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "shieldResistance"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
for damageType in ("Em", "Explosive", "Thermal", "Kinetic"):
|
||||
fit.ship.boostItemAttr("shield%sDamageResonance" % damageType,
|
||||
module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "armorRepairCapacitorNeed"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Remote Armor Repair Systems"),
|
||||
"capacitorNeed", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "armorResistance"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
for damageType in ("Em", "Thermal", "Explosive", "Kinetic"):
|
||||
fit.ship.boostItemAttr("armor%sDamageResonance" % damageType,
|
||||
module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "armorRepairDuration"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Remote Armor Repair Systems"),
|
||||
"duration", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "electronicMaxRange"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Target Painter", "Weapon Disruptor", "Sensor Dampener", "ECM", "Burst Jammer")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
"maxRange", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -10,7 +10,8 @@ gangBonus = "commandBonus"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr("maxTargetRange", module.getModifiedItemAttr("commandBonus"),
|
||||
stackingPenalties=True)
|
||||
for scanType in ("Gravimetric", "Radar", "Ladar", "Magnetometric"):
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "miningCapacitorNeed"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Mining Laser", "Strip Miner", "Frequency Mining Laser",
|
||||
"Ice Harvester", "Gas Cloud Harvester")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "miningDuration"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Mining Laser", "Strip Miner", "Frequency Mining Laser",
|
||||
"Ice Harvester", "Gas Cloud Harvester")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
|
||||
@@ -7,7 +7,8 @@ gangBoost = "miningMaxRange"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gas Cloud Harvesting") or mod.item.requiresSkill(
|
||||
"Ice Harvesting") or mod.item.requiresSkill("Mining"),
|
||||
"maxRange", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "shieldRepairDuration"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Shield Operation") or mod.item.requiresSkill("Shield Emission Systems"),
|
||||
"duration", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "shieldRepairCapacitorNeed"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(
|
||||
lambda mod: mod.item.requiresSkill("Shield Operation") or mod.item.requiresSkill("Shield Emission Systems"),
|
||||
"capacitorNeed", module.getModifiedItemAttr("commandBonus"))
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "shieldResistance"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
for damageType in ("Em", "Explosive", "Thermal", "Kinetic"):
|
||||
fit.ship.boostItemAttr("shield%sDamageResonance" % damageType,
|
||||
module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -9,6 +9,7 @@ gangBoost = "signatureRadius"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("commandBonus"),
|
||||
stackingPenalties=True)
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "interdictionMaxRange"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
groups = ("Stasis Web", "Warp Scrambler")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
"maxRange", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -9,7 +9,8 @@ gangBoost = "speedFactor"
|
||||
# runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
|
||||
"speedFactor", module.getModifiedItemAttr("commandBonus"),
|
||||
stackingPenalties=True)
|
||||
|
||||
@@ -10,6 +10,7 @@ runTime = "late"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr(gangBoost,
|
||||
src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)
|
||||
|
||||
@@ -10,6 +10,7 @@ runTime = "late"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr(gangBoost,
|
||||
src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)
|
||||
|
||||
@@ -10,6 +10,7 @@ runTime = "late"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr(gangBoost,
|
||||
src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)
|
||||
|
||||
@@ -10,6 +10,7 @@ runTime = "late"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "gang" not in context: return
|
||||
if "gang" not in context:
|
||||
return
|
||||
fit.ship.boostItemAttr(gangBoost,
|
||||
src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)
|
||||
|
||||
Reference in New Issue
Block a user