Finish off user-selectable booster side effects - effects are applied correctly now and each has their own display name. Implements #642

This commit is contained in:
blitzmann
2017-06-05 00:16:32 -04:00
parent c2cb5d763f
commit 47fcbefe8b
13 changed files with 81 additions and 35 deletions

View File

@@ -3,8 +3,12 @@
# Used by:
# Implants from group: Booster (12 of 48)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Armor Capacity"
# Attribute that this effect targets
attr = "boosterArmorHPPenalty"
def handler(fit, booster, context):
fit.ship.boostItemAttr("armorHP", booster.getModifiedItemAttr("boosterArmorHPPenalty"))
fit.ship.boostItemAttr("armorHP", booster.getModifiedItemAttr(attr))

View File

@@ -5,9 +5,13 @@
# Implants named like: Mindflood Booster (3 of 4)
# Implants named like: Sooth Sayer Booster (3 of 4)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Armor Repair Amount"
# Attribute that this effect targets
attr = "boosterArmorRepairAmountPenalty"
def handler(fit, booster, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Armor Repair Unit",
"armorDamageAmount", booster.getModifiedItemAttr("boosterArmorRepairAmountPenalty"))
"armorDamageAmount", booster.getModifiedItemAttr(attr))

View File

@@ -4,8 +4,12 @@
# Implants named like: Blue Pill Booster (3 of 5)
# Implants named like: Exile Booster (3 of 4)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Cap Capacity"
# Attribute that this effect targets
attr = "boosterCapacitorCapacityPenalty"
def handler(fit, booster, context):
fit.ship.boostItemAttr("capacitorCapacity", booster.getModifiedItemAttr("boosterCapacitorCapacityPenalty"))
fit.ship.boostItemAttr("capacitorCapacity", booster.getModifiedItemAttr(attr))

View File

@@ -3,8 +3,12 @@
# Used by:
# Implants from group: Booster (12 of 48)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Velocity"
# Attribute that this effect targets
attr = "boosterMaxVelocityPenalty"
def handler(fit, booster, context):
fit.ship.boostItemAttr("maxVelocity", booster.getModifiedItemAttr("boosterMaxVelocityPenalty"))
fit.ship.boostItemAttr("maxVelocity", booster.getModifiedItemAttr(attr))

View File

@@ -4,9 +4,13 @@
# Implants named like: Exile Booster (3 of 4)
# Implants named like: Mindflood Booster (3 of 4)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Missile Explosion Radius"
# Attribute that this effect targets
attr = "boosterMissileAOECloudPenalty"
def handler(fit, booster, context):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"aoeCloudSize", booster.getModifiedItemAttr("boosterMissileAOECloudPenalty"))
"aoeCloudSize", booster.getModifiedItemAttr(attr))

View File

@@ -3,9 +3,13 @@
# Used by:
# Implants named like: Blue Pill Booster (3 of 5)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Missile Explosion Velocity"
# Attribute that this effect targets
attr = "boosterAOEVelocityPenalty"
def handler(fit, booster, context):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"aoeVelocity", booster.getModifiedItemAttr("boosterAOEVelocityPenalty"))
"aoeVelocity", booster.getModifiedItemAttr(attr))

View File

@@ -4,9 +4,13 @@
# Implants named like: Crash Booster (3 of 4)
# Implants named like: X Instinct Booster (3 of 4)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Missile Velocity"
# Attribute that this effect targets
attr = "boosterMissileVelocityPenalty"
def handler(fit, booster, context):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"maxVelocity", "boosterMissileVelocityPenalty")
"maxVelocity", attr)

View File

@@ -3,8 +3,12 @@
# Used by:
# Implants from group: Booster (12 of 48)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Shield Capacity"
# Attribute that this effect targets
attr = "boosterShieldCapacityPenalty"
def handler(fit, booster, context):
fit.ship.boostItemAttr("shieldCapacity", booster.getModifiedItemAttr("boosterShieldCapacityPenalty"))
fit.ship.boostItemAttr("shieldCapacity", booster.getModifiedItemAttr(attr))

View File

@@ -4,9 +4,13 @@
# Implants named like: Drop Booster (3 of 4)
# Implants named like: X Instinct Booster (3 of 4)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Turret Falloff"
# Attribute that this effect targets
attr = "boosterTurretFalloffPenalty"
def handler(fit, booster, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
"falloff", booster.getModifiedItemAttr("boosterTurretFalloffPenalty"))
"falloff", booster.getModifiedItemAttr(attr))

View File

@@ -5,9 +5,13 @@
# Implants named like: Mindflood Booster (3 of 4)
# Implants named like: Sooth Sayer Booster (3 of 4)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Turret Optimal Range"
# Attribute that this effect targets
attr = "boosterTurretOptimalRange"
def handler(fit, booster, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
"maxRange", booster.getModifiedItemAttr("boosterTurretOptimalRange"))
"maxRange", booster.getModifiedItemAttr(attr))

View File

@@ -4,9 +4,13 @@
# Implants named like: Exile Booster (3 of 4)
# Implants named like: Frentix Booster (3 of 4)
type = "boosterSideEffect"
activeByDefault = False
# User-friendly name for the side effect
displayName = "Turret Tracking"
# Attribute that this effect targets
attr = "boosterTurretTrackingPenalty"
def handler(fit, booster, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
"trackingSpeed", booster.getModifiedItemAttr("boosterTurretTrackingPenalty"))
"trackingSpeed", booster.getModifiedItemAttr(attr))