コード例 #1
0
 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()) ]
コード例 #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)
コード例 #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)
コード例 #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)
コード例 #5
0
 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)
コード例 #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)
コード例 #7
0
 def __formatTotalDamage(self, etype, value):
     if BitmaskHelper.hasAnyBitSet(self.__contentMask, etype):
         return _summaryDamageFormatter(value)
     else:
         return None
コード例 #8
0
 def getLoogedEfficiency(self, types):
     return [
         d for d in reversed(self.__efficiencyLog)
         if BitmaskHelper.hasAnyBitSet(types, d.getType())
     ]
コード例 #9
0
 def isHighExplosive(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_HIGH_EXPLOSIVE)
コード例 #10
0
 def isCritical(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_CRITICAL)
コード例 #11
0
 def isBlocked(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_BLOCKED)
コード例 #12
0
 def isAttackerAlly(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_ALLAY)
コード例 #13
0
 def isBattleConsumables(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags,
                                       HIT_FLAGS.IS_BATTLE_CONSUMABLES)
コード例 #14
0
 def isAttackerAlly(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_ALLAY)
コード例 #15
0
 def isBattleConsumables(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_BATTLE_CONSUMABLES)
コード例 #16
0
 def isHighExplosive(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_HIGH_EXPLOSIVE)
コード例 #17
0
 def isCritical(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_CRITICAL)
コード例 #18
0
 def isBlocked(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_BLOCKED)
コード例 #19
0
 def __formatTotalDamage(self, etype, value):
     if BitmaskHelper.hasAnyBitSet(self.__contentMask, etype):
         return _summaryDamageFormatter(value)
     else:
         return None
コード例 #20
0
 def isNonPlayerAttackReason(self):
     return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_NON_PLAYER_ATTACK_REASON)