Beispiel #1
0
 def getProjDroneData(self, src):
     try:
         projectedData = self._data[src.item.ID]['drones']
     except KeyError:
         # Format of items for both: (boost strength, optimal, falloff, stacking group, resistance attr ID, drone speed, drone radius)
         webDrones = []
         tpDrones = []
         projectedData = self._data.setdefault(src.item.ID,
                                               {})['drones'] = (webDrones,
                                                                tpDrones)
         for drone in src.item.drones:
             if drone.amountActive <= 0:
                 continue
             if 'remoteWebifierEntity' in drone.item.effects:
                 webDrones.extend(drone.amountActive * (MobileProjData(
                     drone.getModifiedItemAttr('speedFactor'),
                     drone.maxRange or 0, drone.falloff or 0, 'default',
                     getResistanceAttrID(
                         modifyingItem=drone,
                         effect=drone.item.effects['remoteWebifierEntity']),
                     drone.getModifiedItemAttr('maxVelocity'),
                     drone.getModifiedItemAttr('radius')), ))
             if 'remoteTargetPaintEntity' in drone.item.effects:
                 tpDrones.extend(drone.amountActive * (MobileProjData(
                     drone.getModifiedItemAttr('signatureRadiusBonus'),
                     drone.maxRange or 0, drone.falloff or 0, 'default',
                     getResistanceAttrID(
                         modifyingItem=drone,
                         effect=drone.item.
                         effects['remoteTargetPaintEntity']),
                     drone.getModifiedItemAttr('maxVelocity'),
                     drone.getModifiedItemAttr('radius')), ))
     return projectedData
Beispiel #2
0
 def getProjModData(self, src):
     try:
         projectedData = self._data[src.item.ID]['modules']
     except KeyError:
         # Format of items for both: (boost strength, optimal, falloff, stacking group, resistance attr ID)
         webMods = []
         tpMods = []
         projectedData = self._data.setdefault(src.item.ID,
                                               {})['modules'] = (webMods,
                                                                 tpMods)
         for mod in src.item.modules:
             if mod.state <= FittingModuleState.ONLINE:
                 continue
             for webEffectName in ('remoteWebifierFalloff',
                                   'structureModuleEffectStasisWebifier'):
                 if webEffectName in mod.item.effects:
                     webMods.append(
                         ModProjData(
                             mod.getModifiedItemAttr('speedFactor'),
                             mod.maxRange or 0, mod.falloff or 0, 'default',
                             getResistanceAttrID(
                                 modifyingItem=mod,
                                 effect=mod.item.effects[webEffectName])))
             if 'doomsdayAOEWeb' in mod.item.effects:
                 webMods.append(
                     ModProjData(
                         mod.getModifiedItemAttr('speedFactor'),
                         max(0, (mod.maxRange or 0) +
                             mod.getModifiedItemAttr('doomsdayAOERange') -
                             src.getRadius()), mod.falloff or 0, 'default',
                         getResistanceAttrID(
                             modifyingItem=mod,
                             effect=mod.item.effects['doomsdayAOEWeb'])))
             for tpEffectName in ('remoteTargetPaintFalloff',
                                  'structureModuleEffectTargetPainter'):
                 if tpEffectName in mod.item.effects:
                     tpMods.append(
                         ModProjData(
                             mod.getModifiedItemAttr(
                                 'signatureRadiusBonus'), mod.maxRange or 0,
                             mod.falloff or 0, 'default',
                             getResistanceAttrID(
                                 modifyingItem=mod,
                                 effect=mod.item.effects[tpEffectName])))
             if 'doomsdayAOEPaint' in mod.item.effects:
                 tpMods.append(
                     ModProjData(
                         mod.getModifiedItemAttr('signatureRadiusBonus'),
                         max(0, (mod.maxRange or 0) +
                             mod.getModifiedItemAttr('doomsdayAOERange') -
                             src.getRadius()), mod.falloff or 0, 'default',
                         getResistanceAttrID(
                             modifyingItem=mod,
                             effect=mod.item.effects['doomsdayAOEPaint'])))
     return projectedData
Beispiel #3
0
 def getProjFighterData(self, src):
     try:
         projectedData = self._data[src.item.ID]['fighters']
     except KeyError:
         # Format of items for both: (boost strength, optimal, falloff, stacking group, resistance attr ID, fighter speed, fighter radius)
         webFighters = []
         tpFighters = []
         projectedData = self._data.setdefault(
             src.item.ID, {})['fighters'] = (webFighters, tpFighters)
         for fighter in src.item.fighters:
             if not fighter.active:
                 continue
             for ability in fighter.abilities:
                 if not ability.active:
                     continue
                 if ability.effect.name == 'fighterAbilityStasisWebifier':
                     webFighters.append(
                         MobileProjData(
                             fighter.getModifiedItemAttr(
                                 'fighterAbilityStasisWebifierSpeedPenalty')
                             * fighter.amountActive,
                             fighter.getModifiedItemAttr(
                                 'fighterAbilityStasisWebifierOptimalRange'
                             ),
                             fighter.getModifiedItemAttr(
                                 'fighterAbilityStasisWebifierFalloffRange'
                             ), 'default',
                             getResistanceAttrID(
                                 modifyingItem=fighter,
                                 effect=fighter.item.
                                 effects['fighterAbilityStasisWebifier']),
                             fighter.getModifiedItemAttr('maxVelocity'),
                             fighter.getModifiedItemAttr('radius')))
     return projectedData