(self, runTime="normal")
| 604 | self.__ecmProjectedList.append(strength) |
| 605 | |
| 606 | def __runCommandBoosts(self, runTime="normal"): |
| 607 | pyfalog.debug("Applying gang boosts for {0}", repr(self)) |
| 608 | for warfareBuffID in list(self.commandBonuses.keys()): |
| 609 | # Unpack all data required to run effect properly |
| 610 | effect_runTime, value, thing, effect = self.commandBonuses[warfareBuffID] |
| 611 | |
| 612 | if runTime != effect_runTime: |
| 613 | continue |
| 614 | |
| 615 | # This should always be a gang effect, otherwise it wouldn't be added to commandBonuses |
| 616 | if effect.isType("gang"): |
| 617 | self.register(thing) |
| 618 | |
| 619 | if warfareBuffID == 10: # Shield Burst: Shield Harmonizing: Shield Resistance |
| 620 | for damageType in ("Em", "Explosive", "Thermal", "Kinetic"): |
| 621 | self.ship.boostItemAttr("shield%sDamageResonance" % damageType, value, stackingPenalties=True) |
| 622 | |
| 623 | elif warfareBuffID == 11: # Shield Burst: Active Shielding: Repair Duration/Capacitor |
| 624 | self.modules.filteredItemBoost( |
| 625 | lambda mod: mod.item.requiresSkill("Shield Operation") or |
| 626 | mod.item.requiresSkill("Shield Emission Systems") or |
| 627 | mod.item.requiresSkill("Capital Shield Emission Systems"), |
| 628 | "capacitorNeed", value) |
| 629 | self.modules.filteredItemBoost( |
| 630 | lambda mod: mod.item.requiresSkill("Shield Operation") or |
| 631 | mod.item.requiresSkill("Shield Emission Systems") or |
| 632 | mod.item.requiresSkill("Capital Shield Emission Systems"), |
| 633 | "duration", value) |
| 634 | |
| 635 | elif warfareBuffID == 12: # Shield Burst: Shield Extension: Shield HP |
| 636 | self.ship.boostItemAttr("shieldCapacity", value) |
| 637 | |
| 638 | elif warfareBuffID == 13: # Armor Burst: Armor Energizing: Armor Resistance |
| 639 | for damageType in ("Em", "Thermal", "Explosive", "Kinetic"): |
| 640 | self.ship.boostItemAttr("armor%sDamageResonance" % damageType, value, stackingPenalties=True) |
| 641 | |
| 642 | elif warfareBuffID == 14: # Armor Burst: Rapid Repair: Repair Duration/Capacitor |
| 643 | self.modules.filteredItemBoost( |
| 644 | lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems") or |
| 645 | mod.item.requiresSkill("Repair Systems") or |
| 646 | mod.item.requiresSkill("Capital Remote Armor Repair Systems"), |
| 647 | "capacitorNeed", value) |
| 648 | self.modules.filteredItemBoost( |
| 649 | lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems") or |
| 650 | mod.item.requiresSkill("Repair Systems") or |
| 651 | mod.item.requiresSkill("Capital Remote Armor Repair Systems"), |
| 652 | "duration", value) |
| 653 | |
| 654 | elif warfareBuffID == 15: # Armor Burst: Armor Reinforcement: Armor HP |
| 655 | self.ship.boostItemAttr("armorHP", value) |
| 656 | |
| 657 | elif warfareBuffID == 16: # Information Burst: Sensor Optimization: Scan Resolution |
| 658 | self.ship.boostItemAttr("scanResolution", value, stackingPenalties=True) |
| 659 | |
| 660 | elif warfareBuffID == 17: # Information Burst: Electronic Superiority: EWAR Range and Strength |
| 661 | groups = ("ECM", "Sensor Dampener", "Weapon Disruptor", "Target Painter") |
| 662 | self.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, |
| 663 | stackingPenalties=True) |
no test coverage detected