From ee0c852ddba1e4bef271e0e9485cec582b2a561a Mon Sep 17 00:00:00 2001 From: blitzman Date: Fri, 16 Dec 2016 20:17:20 -0500 Subject: [PATCH] Fix titan effects and issue in which all warefarebuffs may not get run (range too short). This should also shore up (#897) --- eos/effects/modulebonuswarfarelinkarmor.py | 2 +- eos/effects/modulebonuswarfarelinkinfo.py | 2 +- eos/effects/modulebonuswarfarelinkmining.py | 2 +- eos/effects/modulebonuswarfarelinkshield.py | 2 +- eos/effects/modulebonuswarfarelinkskirmish.py | 2 +- eos/effects/moduletitaneffectgenerator.py | 6 +- eos/saveddata/fit.py | 64 +++++++++---------- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eos/effects/modulebonuswarfarelinkarmor.py b/eos/effects/modulebonuswarfarelinkarmor.py index df6eb1fbe..34724783d 100644 --- a/eos/effects/modulebonuswarfarelinkarmor.py +++ b/eos/effects/modulebonuswarfarelinkarmor.py @@ -10,7 +10,7 @@ which warfareBuffID to run (shouldn't need this right now, but better safe than type = "active", "gang" def handler(fit, module, context, **kwargs): - for x in xrange(1, 4): + for x in xrange(1, 5): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x)) diff --git a/eos/effects/modulebonuswarfarelinkinfo.py b/eos/effects/modulebonuswarfarelinkinfo.py index bf9790611..782f8d60a 100644 --- a/eos/effects/modulebonuswarfarelinkinfo.py +++ b/eos/effects/modulebonuswarfarelinkinfo.py @@ -1,7 +1,7 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - for x in xrange(1, 4): + for x in xrange(1, 5): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x)) diff --git a/eos/effects/modulebonuswarfarelinkmining.py b/eos/effects/modulebonuswarfarelinkmining.py index bf9790611..782f8d60a 100644 --- a/eos/effects/modulebonuswarfarelinkmining.py +++ b/eos/effects/modulebonuswarfarelinkmining.py @@ -1,7 +1,7 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - for x in xrange(1, 4): + for x in xrange(1, 5): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x)) diff --git a/eos/effects/modulebonuswarfarelinkshield.py b/eos/effects/modulebonuswarfarelinkshield.py index bf9790611..782f8d60a 100644 --- a/eos/effects/modulebonuswarfarelinkshield.py +++ b/eos/effects/modulebonuswarfarelinkshield.py @@ -1,7 +1,7 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - for x in xrange(1, 4): + for x in xrange(1, 5): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x)) diff --git a/eos/effects/modulebonuswarfarelinkskirmish.py b/eos/effects/modulebonuswarfarelinkskirmish.py index bf9790611..782f8d60a 100644 --- a/eos/effects/modulebonuswarfarelinkskirmish.py +++ b/eos/effects/modulebonuswarfarelinkskirmish.py @@ -1,7 +1,7 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - for x in xrange(1, 4): + for x in xrange(1, 5): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x)) diff --git a/eos/effects/moduletitaneffectgenerator.py b/eos/effects/moduletitaneffectgenerator.py index 5f392adc7..12d75f0da 100644 --- a/eos/effects/moduletitaneffectgenerator.py +++ b/eos/effects/moduletitaneffectgenerator.py @@ -1,9 +1,9 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - for x in xrange(1, 4): - if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): + for x in xrange(1, 5): + if module.getModifiedItemAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) - id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x)) + id = module.getModifiedItemAttr("warfareBuff{}ID".format(x)) if id: fit.addCommandBonus(id, value, module, kwargs['effect']) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 8de61ee40..552881b0b 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -575,60 +575,60 @@ class Fit(object): # Titan effects - if id == 39: # Avatar Effect Generator : Capacitor Recharge bonus + if warfareBuffID == 39: # Avatar Effect Generator : Capacitor Recharge bonus self.ship.boostItemAttr("rechargeRate", value, stackingPenalties=True) - if id == 40: # Avatar Effect Generator : Kinetic resistance bonus - for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "hullKineticDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 40: # Avatar Effect Generator : Kinetic resistance bonus + for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "kineticDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 41: # Avatar Effect Generator : EM resistance penalty - for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "hullEmDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 41: # Avatar Effect Generator : EM resistance penalty + for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "emDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 42: # Erebus Effect Generator : Armor HP bonus + if warfareBuffID == 42: # Erebus Effect Generator : Armor HP bonus self.ship.boostItemAttr("armorHP", value, stackingPenalties=True) - if id == 43: # Erebus Effect Generator : Explosive resistance bonus - for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "hullExplosiveDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 43: # Erebus Effect Generator : Explosive resistance bonus + for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "explosiveDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 44: # Erebus Effect Generator : Thermal resistance penalty - for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "hullThermalDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 44: # Erebus Effect Generator : Thermal resistance penalty + for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "thermalDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 45: # Ragnarok Effect Generator : Signature Radius bonus + if warfareBuffID == 45: # Ragnarok Effect Generator : Signature Radius bonus self.ship.boostItemAttr("signatureRadius", value, stackingPenalties=True) - if id == 46: # Ragnarok Effect Generator : Thermal resistance bonus - for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "hullThermalDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 46: # Ragnarok Effect Generator : Thermal resistance bonus + for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "thermalDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 47: # Ragnarok Effect Generator : Explosive resistance penaly - for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "hullExplosiveDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 47: # Ragnarok Effect Generator : Explosive resistance penaly + for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "explosiveDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 48: # Leviathan Effect Generator : Shield HP bonus + if warfareBuffID == 48: # Leviathan Effect Generator : Shield HP bonus self.ship.boostItemAttr("shieldCapacity", value, stackingPenalties=True) - if id == 49: # Leviathan Effect Generator : EM resistance bonus - for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "hullEmDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 49: # Leviathan Effect Generator : EM resistance bonus + for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "emDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 50: # Leviathan Effect Generator : Kinetic resistance penalty - for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "hullKineticDamageResonance"): - self.ship.boostItemAttr(attr, value) + if warfareBuffID == 50: # Leviathan Effect Generator : Kinetic resistance penalty + for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "kineticDamageResonance"): + self.ship.boostItemAttr(attr, value, stackingPenalties=True) - if id == 51: # Avatar Effect Generator : Velocity penalty + if warfareBuffID == 51: # Avatar Effect Generator : Velocity penalty self.ship.boostItemAttr("maxVelocity", value, stackingPenalties=True) - if id == 52: # Erebus Effect Generator : Shield RR penalty + if warfareBuffID == 52: # Erebus Effect Generator : Shield RR penalty self.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "shieldBonus", value, stackingPenalties=True) - if id == 53: # Leviathan Effect Generator : Armor RR penalty + if warfareBuffID == 53: # Leviathan Effect Generator : Armor RR penalty self.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", value, stackingPenalties=True) - if id == 54: # Ragnarok Effect Generator : Laser and Hybrid Optimal penalty + if warfareBuffID == 54: # Ragnarok Effect Generator : Laser and Hybrid Optimal penalty groups = ("Energy Weapon", "Hybrid Weapon") self.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, stackingPenalties=True)