当前位置: 首页>>代码示例>>Python>>正文


Python WeaponGlobals.isBreakAttackComboSkill方法代码示例

本文整理汇总了Python中pirates.battle.WeaponGlobals.isBreakAttackComboSkill方法的典型用法代码示例。如果您正苦于以下问题:Python WeaponGlobals.isBreakAttackComboSkill方法的具体用法?Python WeaponGlobals.isBreakAttackComboSkill怎么用?Python WeaponGlobals.isBreakAttackComboSkill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pirates.battle.WeaponGlobals的用法示例。


在下文中一共展示了WeaponGlobals.isBreakAttackComboSkill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: useTargetedSkill

# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import isBreakAttackComboSkill [as 别名]
 def useTargetedSkill(self, skillId, ammoSkillId, skillResult, targetId, areaIdList, attackerEffects, targetEffects, areaIdEffects, itemEffects, timestamp, pos, charge = 0, localSignal = 0):
     if WeaponGlobals.isSelfUseSkill(skillId) and not localSignal:
         selfUse = True
     else:
         selfUse = False
     if localSignal:
         target = self.cr.doId2do.get(targetId)
         if target and target != self and WeaponGlobals.isBreakAttackComboSkill(skillId) and skillResult == WeaponGlobals.RESULT_HIT:
             levelGrade = self.cr.battleMgr.getModifiedExperienceGrade(self, target)
             self.guiMgr.combatTray.updateSkillCharges(levelGrade)
         
     
     if not self.isLocal() and localSignal and WeaponGlobals.getSkillTrack(skillId) == WeaponGlobals.DEFENSE_SKILL_INDEX or selfUse:
         multiHits = []
         numHits = WeaponGlobals.getNumHits(skillId)
         hitTiming = WeaponGlobals.getMultiHitAttacks(skillId)
         if hitTiming:
             multiHits += hitTiming
         
         if ammoSkillId:
             numHits += WeaponGlobals.getNumHits(ammoSkillId) - 1
             hitTiming = WeaponGlobals.getMultiHitAttacks(ammoSkillId)
             if hitTiming:
                 multiHits += hitTiming
             
         
         if not selfUse or self.isNpc:
             if not targetId and areaIdList:
                 self.playSkillMovie(skillId, ammoSkillId, skillResult, charge, areaIdList[0], areaIdList)
             else:
                 self.playSkillMovie(skillId, ammoSkillId, skillResult, charge, targetId, areaIdList)
         
         if skillResult == WeaponGlobals.RESULT_REFLECTED or selfUse:
             target = self
             targetId = self.getDoId()
         elif skillResult == WeaponGlobals.RESULT_BLOCKED:
             target = None
         else:
             target = self.currentTarget
         if target and targetId:
             if multiHits and numHits:
                 multiHitEffects = self.packMultiHitEffects(targetEffects, numHits)
                 for i in range(numHits):
                     target.targetedWeaponHit(skillId, ammoSkillId, skillResult, multiHitEffects[i], self, pos, charge, multiHits[i], i, itemEffects = itemEffects)
                 
             else:
                 target.targetedWeaponHit(skillId, ammoSkillId, skillResult, targetEffects, self, pos, charge, itemEffects = itemEffects)
         
         for (targetId, areaEffects) in zip(areaIdList, areaIdEffects):
             target = self.cr.doId2do.get(targetId)
             if target:
                 if multiHits and numHits:
                     multiHitEffects = self.packMultiHitEffects(areaEffects, numHits)
                     for i in range(numHits):
                         target.targetedWeaponHit(skillId, ammoSkillId, skillResult, multiHitEffects[i], self, pos, charge, multiHits[i], i, itemEffects = itemEffects)
                     
                 else:
                     target.targetedWeaponHit(skillId, ammoSkillId, skillResult, areaEffects, self, pos, charge, itemEffects = itemEffects)
         
         if not (self.currentTarget) and not areaIdList:
             self.playHitSound(skillId, ammoSkillId, WeaponGlobals.RESULT_MISS)
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:63,代码来源:DistributedTargetableObject.py


注:本文中的pirates.battle.WeaponGlobals.isBreakAttackComboSkill方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。