From 0524b901f5871a7e0008fba6f3e7cf44d1fada8f Mon Sep 17 00:00:00 2001 From: blitzmann Date: Wed, 27 Aug 2014 23:12:30 -0400 Subject: [PATCH] Fixes for stacking penalties for various wormhole effects --- eos/effects/systemagility.py | 2 +- eos/effects/systemarmorremoterepairamount.py | 3 ++- eos/effects/systemdamagedrones.py | 3 ++- eos/effects/systemdamageemmissiles.py | 3 +-- eos/effects/systemdamageexplosivemissiles.py | 3 +-- eos/effects/systemdamagefighters.py | 3 ++- eos/effects/systemdamagekineticmissiles.py | 3 +-- eos/effects/systemdamagemultipliergunnery.py | 2 +- eos/effects/systemdamagethermalmissiles.py | 3 +-- eos/effects/systemdronetracking.py | 3 ++- eos/effects/systemmaxvelocity.py | 2 +- eos/effects/systemmissilevelocity.py | 3 ++- eos/effects/systemshieldremoterepairamount.py | 3 ++- eos/effects/systemsignatureradius.py | 3 ++- eos/effects/systemsmallenergydamage.py | 2 +- eos/effects/systemsmallhybriddamage.py | 2 +- eos/effects/systemsmallprojectiledamage.py | 2 +- eos/effects/systemstandardmissileemdamage.py | 3 +-- eos/effects/systemstandardmissileexplosivedamage.py | 3 +-- eos/effects/systemstandardmissilekineticdamage.py | 3 +-- eos/effects/systemstandardmissilethermaldamage.py | 3 +-- eos/effects/systemtargetingrange.py | 3 ++- eos/effects/systemtracking.py | 3 ++- 23 files changed, 32 insertions(+), 31 deletions(-) diff --git a/eos/effects/systemagility.py b/eos/effects/systemagility.py index a1a1c4baa..3b32536e2 100644 --- a/eos/effects/systemagility.py +++ b/eos/effects/systemagility.py @@ -3,4 +3,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): - fit.ship.multiplyItemAttr("agility", beacon.getModifiedItemAttr("agilityMultiplier")) + fit.ship.multiplyItemAttr("agility", beacon.getModifiedItemAttr("agilityMultiplier"), stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemarmorremoterepairamount.py b/eos/effects/systemarmorremoterepairamount.py index 8946bc20f..3b39b6773 100644 --- a/eos/effects/systemarmorremoterepairamount.py +++ b/eos/effects/systemarmorremoterepairamount.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, module, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "armorDamageAmount", module.getModifiedItemAttr("armorDamageAmountMultiplierRemote")) + "armorDamageAmount", module.getModifiedItemAttr("armorDamageAmountMultiplierRemote"), + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemdamagedrones.py b/eos/effects/systemdamagedrones.py index e466beeea..6d8f5dd5a 100644 --- a/eos/effects/systemdamagedrones.py +++ b/eos/effects/systemdamagedrones.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.drones.filteredItemMultiply(lambda drone: drone.item.requiresSkill("Drones"), - "damageMultiplier", beacon.getModifiedItemAttr("damageMultiplierMultiplier")) + "damageMultiplier", beacon.getModifiedItemAttr("damageMultiplierMultiplier"), + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemdamageemmissiles.py b/eos/effects/systemdamageemmissiles.py index 913dc9cf5..628f4791f 100644 --- a/eos/effects/systemdamageemmissiles.py +++ b/eos/effects/systemdamageemmissiles.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "emDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier"), - stackingPenalties = True) + "emDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier")) diff --git a/eos/effects/systemdamageexplosivemissiles.py b/eos/effects/systemdamageexplosivemissiles.py index 6a58f3b98..efa454fac 100644 --- a/eos/effects/systemdamageexplosivemissiles.py +++ b/eos/effects/systemdamageexplosivemissiles.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "explosiveDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier"), - stackingPenalties = True) + "explosiveDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier")) diff --git a/eos/effects/systemdamagefighters.py b/eos/effects/systemdamagefighters.py index 07ef55f1d..6e429a306 100644 --- a/eos/effects/systemdamagefighters.py +++ b/eos/effects/systemdamagefighters.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.drones.filteredItemMultiply(lambda drone: drone.item.requiresSkill("Fighters"), - "damageMultiplier", beacon.getModifiedItemAttr("damageMultiplierMultiplier")) + "damageMultiplier", beacon.getModifiedItemAttr("damageMultiplierMultiplier") + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemdamagekineticmissiles.py b/eos/effects/systemdamagekineticmissiles.py index d72737643..e52f20005 100644 --- a/eos/effects/systemdamagekineticmissiles.py +++ b/eos/effects/systemdamagekineticmissiles.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "kineticDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier"), - stackingPenalties = True) + "kineticDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier")) diff --git a/eos/effects/systemdamagemultipliergunnery.py b/eos/effects/systemdamagemultipliergunnery.py index 606412de1..b53b8a12e 100644 --- a/eos/effects/systemdamagemultipliergunnery.py +++ b/eos/effects/systemdamagemultipliergunnery.py @@ -5,4 +5,4 @@ type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Gunnery"), "damageMultiplier", beacon.getModifiedItemAttr("damageMultiplierMultiplier"), - stackingPenalties = True) + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemdamagethermalmissiles.py b/eos/effects/systemdamagethermalmissiles.py index 84ede14dc..a1a9814bf 100644 --- a/eos/effects/systemdamagethermalmissiles.py +++ b/eos/effects/systemdamagethermalmissiles.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "thermalDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier"), - stackingPenalties = True) + "thermalDamage", beacon.getModifiedItemAttr("damageMultiplierMultiplier")) diff --git a/eos/effects/systemdronetracking.py b/eos/effects/systemdronetracking.py index bf9075928..2e865054a 100644 --- a/eos/effects/systemdronetracking.py +++ b/eos/effects/systemdronetracking.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.drones.filteredItemMultiply(lambda drone: True, - "trackingSpeed", beacon.getModifiedItemAttr("trackingSpeedMultiplier")) + "trackingSpeed", beacon.getModifiedItemAttr("trackingSpeedMultiplier"), + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemmaxvelocity.py b/eos/effects/systemmaxvelocity.py index e8c0dda29..7987cb69f 100644 --- a/eos/effects/systemmaxvelocity.py +++ b/eos/effects/systemmaxvelocity.py @@ -3,4 +3,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): - fit.ship.multiplyItemAttr("maxVelocity", beacon.getModifiedItemAttr("maxVelocityMultiplier")) + fit.ship.multiplyItemAttr("maxVelocity", beacon.getModifiedItemAttr("maxVelocityMultiplier"), stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemmissilevelocity.py b/eos/effects/systemmissilevelocity.py index 858bc26cd..281aaa49c 100644 --- a/eos/effects/systemmissilevelocity.py +++ b/eos/effects/systemmissilevelocity.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), - "maxVelocity", beacon.getModifiedItemAttr("missileVelocityMultiplier")) + "maxVelocity", beacon.getModifiedItemAttr("missileVelocityMultiplier"), + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemshieldremoterepairamount.py b/eos/effects/systemshieldremoterepairamount.py index 118ce90d4..9345fb831 100644 --- a/eos/effects/systemshieldremoterepairamount.py +++ b/eos/effects/systemshieldremoterepairamount.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, module, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Remote Shield Booster", - "shieldBonus", module.getModifiedItemAttr("shieldBonusMultiplierRemote")) + "shieldBonus", module.getModifiedItemAttr("shieldBonusMultiplierRemote"), + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemsignatureradius.py b/eos/effects/systemsignatureradius.py index 14f8e4ae5..c49825833 100644 --- a/eos/effects/systemsignatureradius.py +++ b/eos/effects/systemsignatureradius.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): - fit.ship.multiplyItemAttr("signatureRadius", beacon.getModifiedItemAttr("signatureRadiusMultiplier")) + fit.ship.multiplyItemAttr("signatureRadius", beacon.getModifiedItemAttr("signatureRadiusMultiplier"), + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemsmallenergydamage.py b/eos/effects/systemsmallenergydamage.py index 203e77640..88c2f3f08 100644 --- a/eos/effects/systemsmallenergydamage.py +++ b/eos/effects/systemsmallenergydamage.py @@ -5,4 +5,4 @@ type = ("projected", "offline") def handler(fit, module, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Small Energy Turret"), "damageMultiplier", module.getModifiedItemAttr("smallWeaponDamageMultiplier"), - stackingPenalties = True) + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemsmallhybriddamage.py b/eos/effects/systemsmallhybriddamage.py index 21ce24ec9..b41ee1226 100644 --- a/eos/effects/systemsmallhybriddamage.py +++ b/eos/effects/systemsmallhybriddamage.py @@ -5,4 +5,4 @@ type = ("projected", "offline") def handler(fit, module, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Small Hybrid Turret"), "damageMultiplier", module.getModifiedItemAttr("smallWeaponDamageMultiplier"), - stackingPenalties = True) + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemsmallprojectiledamage.py b/eos/effects/systemsmallprojectiledamage.py index 11632a7c0..f10e6b3ef 100644 --- a/eos/effects/systemsmallprojectiledamage.py +++ b/eos/effects/systemsmallprojectiledamage.py @@ -5,4 +5,4 @@ type = ("projected", "offline") def handler(fit, module, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Small Projectile Turret"), "damageMultiplier", module.getModifiedItemAttr("smallWeaponDamageMultiplier"), - stackingPenalties = True) + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemstandardmissileemdamage.py b/eos/effects/systemstandardmissileemdamage.py index 8466e9ff6..c670aa84a 100644 --- a/eos/effects/systemstandardmissileemdamage.py +++ b/eos/effects/systemstandardmissileemdamage.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Light Missiles"), - "emDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier"), - stackingPenalties = True) + "emDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier")) diff --git a/eos/effects/systemstandardmissileexplosivedamage.py b/eos/effects/systemstandardmissileexplosivedamage.py index f5aaa26bd..ea4099dca 100644 --- a/eos/effects/systemstandardmissileexplosivedamage.py +++ b/eos/effects/systemstandardmissileexplosivedamage.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Light Missiles"), - "explosiveDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier"), - stackingPenalties = True) + "explosiveDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier")) diff --git a/eos/effects/systemstandardmissilekineticdamage.py b/eos/effects/systemstandardmissilekineticdamage.py index 708895b0f..5656bddb7 100644 --- a/eos/effects/systemstandardmissilekineticdamage.py +++ b/eos/effects/systemstandardmissilekineticdamage.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Light Missiles"), - "kineticDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier"), - stackingPenalties = True) + "kineticDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier")) diff --git a/eos/effects/systemstandardmissilethermaldamage.py b/eos/effects/systemstandardmissilethermaldamage.py index e1ce06e11..719742660 100644 --- a/eos/effects/systemstandardmissilethermaldamage.py +++ b/eos/effects/systemstandardmissilethermaldamage.py @@ -4,5 +4,4 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Light Missiles"), - "thermalDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier"), - stackingPenalties = True) + "thermalDamage", beacon.getModifiedItemAttr("smallWeaponDamageMultiplier")) diff --git a/eos/effects/systemtargetingrange.py b/eos/effects/systemtargetingrange.py index 859c65a80..59f28fe7e 100644 --- a/eos/effects/systemtargetingrange.py +++ b/eos/effects/systemtargetingrange.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, beacon, context): - fit.ship.multiplyItemAttr("maxTargetRange", beacon.getModifiedItemAttr("maxTargetRangeMultiplier")) + fit.ship.multiplyItemAttr("maxTargetRange", beacon.getModifiedItemAttr("maxTargetRangeMultiplier"), + stackingPenalties = True, penaltyGroup="postMul") diff --git a/eos/effects/systemtracking.py b/eos/effects/systemtracking.py index 7e4422747..cb93d8787 100644 --- a/eos/effects/systemtracking.py +++ b/eos/effects/systemtracking.py @@ -4,4 +4,5 @@ runTime = "early" type = ("projected", "offline") def handler(fit, module, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Gunnery"), - "trackingSpeed", module.getModifiedItemAttr("trackingSpeedMultiplier")) + "trackingSpeed", module.getModifiedItemAttr("trackingSpeedMultiplier"), + stackingPenalties = True, penaltyGroup="postMul")