diff --git a/eos/effects/chargebonuswarfarecharge.py b/eos/effects/chargebonuswarfarecharge.py index d0d79199e..b27739d07 100644 --- a/eos/effects/chargebonuswarfarecharge.py +++ b/eos/effects/chargebonuswarfarecharge.py @@ -1,7 +1,6 @@ type = "active" def handler(fit, module, context): - print "Applying charge bonus/info" for x in xrange(1, 4): value = module.getModifiedChargeAttr("warfareBuff{}Multiplier".format(x)) module.multiplyItemAttr("warfareBuff{}Value".format(x), value) \ No newline at end of file diff --git a/eos/effects/modulebonuswarfarelinkarmor.py b/eos/effects/modulebonuswarfarelinkarmor.py index 0b1b354cc..df6eb1fbe 100644 --- a/eos/effects/modulebonuswarfarelinkarmor.py +++ b/eos/effects/modulebonuswarfarelinkarmor.py @@ -10,8 +10,6 @@ which warfareBuffID to run (shouldn't need this right now, but better safe than type = "active", "gang" def handler(fit, module, context, **kwargs): - print "submitting command bonuses to registrar" - for x in xrange(1, 4): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) diff --git a/eos/effects/modulebonuswarfarelinkinfo.py b/eos/effects/modulebonuswarfarelinkinfo.py index e0f52df39..bf9790611 100644 --- a/eos/effects/modulebonuswarfarelinkinfo.py +++ b/eos/effects/modulebonuswarfarelinkinfo.py @@ -1,8 +1,6 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - print "submitting command bonuses to registrar" - for x in xrange(1, 4): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) diff --git a/eos/effects/modulebonuswarfarelinkshield.py b/eos/effects/modulebonuswarfarelinkshield.py index e0f52df39..bf9790611 100644 --- a/eos/effects/modulebonuswarfarelinkshield.py +++ b/eos/effects/modulebonuswarfarelinkshield.py @@ -1,8 +1,6 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - print "submitting command bonuses to registrar" - for x in xrange(1, 4): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) diff --git a/eos/effects/modulebonuswarfarelinkskirmish.py b/eos/effects/modulebonuswarfarelinkskirmish.py index e0f52df39..bf9790611 100644 --- a/eos/effects/modulebonuswarfarelinkskirmish.py +++ b/eos/effects/modulebonuswarfarelinkskirmish.py @@ -1,8 +1,6 @@ type = "active", "gang" def handler(fit, module, context, **kwargs): - print "submitting command bonuses to registrar" - for x in xrange(1, 4): if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) diff --git a/eos/effects/moduletitaneffectgenerator.py b/eos/effects/moduletitaneffectgenerator.py index e5c2b3d2e..5f392adc7 100644 --- a/eos/effects/moduletitaneffectgenerator.py +++ b/eos/effects/moduletitaneffectgenerator.py @@ -1,76 +1,13 @@ -# moduleTitanEffectGenerator -# -# Used by: -# Modules from group: Titan Phenomena Generator (4 of 4) - type = "active", "gang" def handler(fit, module, context, **kwargs): - def runEffect(id, value): - if id == 39: # Avatar Effect Generator : Capacitor Recharge bonus - fit.ship.boostItemAttr("rechargeRate", value, stackingPenalties=True) - - if id == 40: # Avatar Effect Generator : Kinetic resistance bonus - for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "hullKineticDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 41: # Avatar Effect Generator : EM resistance penalty - for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "hullEmDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 42: # Erebus Effect Generator : Armor HP bonus - fit.ship.boostItemAttr("armorHP", value, stackingPenalties=True) - - if id == 43: # Erebus Effect Generator : Explosive resistance bonus - for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "hullExplosiveDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 44: # Erebus Effect Generator : Thermal resistance penalty - for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "hullThermalDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 45: # Ragnarok Effect Generator : Signature Radius bonus - fit.ship.boostItemAttr("signatureRadius", value, stackingPenalties=True) - - if id == 46: # Ragnarok Effect Generator : Thermal resistance bonus - for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "hullThermalDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 47: # Ragnarok Effect Generator : Explosive resistance penaly - for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "hullExplosiveDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 48: # Leviathan Effect Generator : Shield HP bonus - fit.ship.boostItemAttr("shieldCapacity", value, stackingPenalties=True) - - if id == 49: # Leviathan Effect Generator : EM resistance bonus - for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "hullEmDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 50: # Leviathan Effect Generator : Kinetic resistance penalty - for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "hullKineticDamageResonance"): - fit.ship.boostItemAttr(attr, value) - - if id == 51: # Avatar Effect Generator : Velocity penalty - fit.ship.boostItemAttr("maxVelocity", value, stackingPenalties=True) - - if id == 52: # Erebus Effect Generator : Shield RR penalty - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "shieldBonus", value, stackingPenalties=True) - - if id == 53: # Leviathan Effect Generator : Armor RR penalty - fit.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 - groups = ("Energy Weapon", "Hybrid Weapon") - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, stackingPenalties=True) - for x in xrange(1, 4): - if module.getModifiedItemAttr("warfareBuff{}ID".format(x)): + if module.getModifiedChargeAttr("warfareBuff{}ID".format(x)): value = module.getModifiedItemAttr("warfareBuff{}Value".format(x)) - id = module.getModifiedItemAttr("warfareBuff{}ID".format(x)) + id = module.getModifiedChargeAttr("warfareBuff{}ID".format(x)) if id: - if 'commandRun' not in context: - fit.addCommandBonus(id, value, module, kwargs['effect']) - elif kwargs['warfareBuffID'] is not None and kwargs['warfareBuffID'] == id: - runEffect(kwargs['warfareBuffID'], value) + fit.addCommandBonus(id, value, module, kwargs['effect']) + + + diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 272d1207a..8de61ee40 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -573,6 +573,65 @@ class Fit(object): if warfareBuffID == 60: # Skirmish Burst: Evasive Maneuvers: Agility self.ship.boostItemAttr("agility", value, stackingPenalties=True) + # Titan effects + + if id == 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 id == 41: # Avatar Effect Generator : EM resistance penalty + for attr in ("armorEmDamageResonance", "shieldEmDamageResonance", "hullEmDamageResonance"): + self.ship.boostItemAttr(attr, value) + + if id == 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 id == 44: # Erebus Effect Generator : Thermal resistance penalty + for attr in ("armorThermalDamageResonance", "shieldThermalDamageResonance", "hullThermalDamageResonance"): + self.ship.boostItemAttr(attr, value) + + if id == 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 id == 47: # Ragnarok Effect Generator : Explosive resistance penaly + for attr in ("armorExplosiveDamageResonance", "shieldExplosiveDamageResonance", "hullExplosiveDamageResonance"): + self.ship.boostItemAttr(attr, value) + + if id == 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 id == 50: # Leviathan Effect Generator : Kinetic resistance penalty + for attr in ("armorKineticDamageResonance", "shieldKineticDamageResonance", "hullKineticDamageResonance"): + self.ship.boostItemAttr(attr, value) + + if id == 51: # Avatar Effect Generator : Velocity penalty + self.ship.boostItemAttr("maxVelocity", value, stackingPenalties=True) + + if id == 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 + 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 + groups = ("Energy Weapon", "Hybrid Weapon") + self.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, stackingPenalties=True) + # if effect.isType("offline") or (effect.isType("passive") and thing.state >= State.ONLINE) or \ # (effect.isType("active") and thing.state >= State.ACTIVE): # # Run effect, and get proper bonuses applied