def getLoogedEfficiency(self, types):
     """
     Returns logged efficiency by the given type mask.
     :param types: damage types represented by bit mask (see PERSONAL_EFFICIENCY_TYPE)
     :return: list of _DamageInfo objects
     """
     return [ d for d in reversed(self.__efficiencyLog) if BitmaskHelper.hasAnyBitSet(types, d.getType()) ]
Exemplo n.º 2
0
 def _onEfficiencyReceived(self, events):
     if self.__logViewMode == _DETAILS_LOG_VIEW_MODE.HIDE:
         return
     for e in events:
         if BitmaskHelper.hasAnyBitSet(self.__contentMask, e.getType()):
             vo = self._buildLogMessageVO(e)
             self.as_addDetailMessageS(**vo)
Exemplo n.º 3
0
 def _onEfficiencyReceived(self, events):
     if self.__logViewMode == _DETAILS_LOG_VIEW_MODE.HIDE:
         return
     for e in events:
         if BitmaskHelper.hasAnyBitSet(self.__contentMask, e.getType()):
             vo = self._buildLogMessageVO(e)
             self.as_addDetailMessageS(**vo)
Exemplo n.º 4
0
 def addToLog(self, events):
     if self.__logViewMode == _VIEW_MODE.HIDE:
         return
     for e in events:
         if BitmaskHelper.hasAnyBitSet(self.__contentMask, e.getType()):
             vo = self._buildLogMessageVO(e)
             self.__addToListProxy(**vo)
 def _setTotalValue(self, etype, value):
     if BitmaskHelper.hasAnyBitSet(self.__totalDamageContentMask, etype):
         value = _formatTotalValue(value)
     else:
         value = None
     if value != self.__totalValues[etype]:
         self.__totalValues[etype] = value
         return (True, value)
     else:
         return (False, value)
Exemplo n.º 6
0
 def _setTotalValue(self, etype, value):
     """
     Sets total value with the given efficiency type, taking into account user's preferences.
     
     :param etype: Efficiency type, see PERSONAL_EFFICIENCY_TYPE
     :param value: New value
     :return: tuple(bool, value), where bool - whether value is changed, v
             value - formatted value
     """
     if BitmaskHelper.hasAnyBitSet(self.__totalDamageContentMask, etype):
         value = _formatTotalValue(value)
     else:
         value = None
     if value != self.__totalValues[etype]:
         self.__totalValues[etype] = value
         return (True, value)
     else:
         return (False, value)
Exemplo n.º 7
0
 def __formatTotalDamage(self, etype, value):
     if BitmaskHelper.hasAnyBitSet(self.__contentMask, etype):
         return _summaryDamageFormatter(value)
     else:
         return None
Exemplo n.º 8
0
 def getLoogedEfficiency(self, types):
     return [
         d for d in reversed(self.__efficiencyLog)
         if BitmaskHelper.hasAnyBitSet(types, d.getType())
     ]
Exemplo n.º 9
0
 def isHighExplosive(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_HIGH_EXPLOSIVE)
Exemplo n.º 10
0
 def isCritical(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_CRITICAL)
Exemplo n.º 11
0
 def isBlocked(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_BLOCKED)
Exemplo n.º 12
0
 def isAttackerAlly(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_ALLAY)
Exemplo n.º 13
0
 def isBattleConsumables(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_BATTLE_CONSUMABLES)
Exemplo n.º 14
0
 def isAttackerAlly(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_ALLAY)
Exemplo n.º 15
0
 def isBattleConsumables(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_BATTLE_CONSUMABLES)
Exemplo n.º 16
0
 def isHighExplosive(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_HIGH_EXPLOSIVE)
Exemplo n.º 17
0
 def isCritical(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_CRITICAL)
Exemplo n.º 18
0
 def isBlocked(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_BLOCKED)
Exemplo n.º 19
0
 def __formatTotalDamage(self, etype, value):
     if BitmaskHelper.hasAnyBitSet(self.__contentMask, etype):
         return _summaryDamageFormatter(value)
     else:
         return None
 def isNonPlayerAttackReason(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_NON_PLAYER_ATTACK_REASON)