MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / __runCommandBoosts

Method __runCommandBoosts

eos/saveddata/fit.py:606–972  ·  view source on GitHub ↗
(self, runTime="normal")

Source from the content-addressed store, hash-verified

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)

Callers 1

Calls 10

registerMethod · 0.95
boostItemAttrMethod · 0.80
filteredItemBoostMethod · 0.80
requiresSkillMethod · 0.80
filteredChargeBoostMethod · 0.80
increaseItemAttrMethod · 0.80
filteredItemIncreaseMethod · 0.80
forceItemAttrMethod · 0.80
keysMethod · 0.45
isTypeMethod · 0.45

Tested by

no test coverage detected