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


Python WeaponGlobals.getIsShipSkill方法代码示例

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


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

示例1: continuePowerRechargeEffect

# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getIsShipSkill [as 别名]
 def continuePowerRechargeEffect(self):
     for button in self.tray:
         if isinstance(self.tray[button], SkillButton) and not self.tray[button].isEmpty():
             if (WeaponGlobals.getIsShipSkill(self.tray[button].skillId) or WeaponGlobals.getIsCannonSkill(self.tray[button].skillId)) and self.tray[button].skillId != InventoryType.SailPowerRecharge:
                 self.tray[button].startPowerImpulse()
             
         self.tray[button].skillId != InventoryType.SailPowerRecharge
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:9,代码来源:RadialMenu.py

示例2: updateCharmSkills

# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getIsShipSkill [as 别名]
 def updateCharmSkills(self):
     self.rebuildSkillTray()
     for button in self.tray:
         if isinstance(self.tray[button], SkillButton) and not self.tray[button].isEmpty():
             if (WeaponGlobals.getIsShipSkill(self.tray[button].skillId) or WeaponGlobals.getIsCannonSkill(self.tray[button].skillId)) and self.tray[button].skillId != InventoryType.SailPowerRecharge:
                 self.tray[button].updateSkillRingIval()
             
         self.tray[button].skillId != InventoryType.SailPowerRecharge
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:10,代码来源:RadialMenu.py

示例3: removePowerRechargeEffect

# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getIsShipSkill [as 别名]
 def removePowerRechargeEffect(self):
     self.isPowerRecharged = False
     for button in self.tray:
         if isinstance(self.tray[button], SkillButton) and not self.tray[button].isEmpty():
             if (WeaponGlobals.getIsShipSkill(self.tray[button].skillId) or WeaponGlobals.getIsCannonSkill(self.tray[button].skillId)) and self.tray[button].skillId != InventoryType.SailPowerRecharge:
                 self.tray[button].stopPowerImpulse()
                 self.tray[button].updateSkillRingIval()
             
         self.tray[button].skillId != InventoryType.SailPowerRecharge
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:11,代码来源:RadialMenu.py

示例4: doAttack

# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getIsShipSkill [as 别名]
 def doAttack(self, attacker, skillId, ammoSkillId, targetId, areaIdList, pos, combo = 0, charge = 0):
     attacker.battleRandom.advanceAttackSeed()
     if targetId:
         if WeaponGlobals.getIsShipSkill(skillId):
             target = base.cr.doId2do.get(targetId)
         elif WeaponGlobals.getIsDollAttackSkill(skillId):
             target = base.cr.doId2do.get(targetId)
         else:
             target = base.cr.doId2do.get(targetId)
             if hasattr(target, 'getSkillEffects'):
                 if WeaponGlobals.C_SPAWN in set(target.getSkillEffects()):
                     return WeaponGlobals.RESULT_MISS
                 
             
             if target and not TeamUtils.damageAllowed(localAvatar, target) and not WeaponGlobals.isFriendlyFire(skillId, ammoSkillId):
                 return WeaponGlobals.RESULT_NOT_AVAILABLE
             
     else:
         target = None
     weaponHit = self.willWeaponHit(attacker, target, skillId, ammoSkillId, charge)
     if combo == -1:
         if localAvatar.wantComboTiming:
             return WeaponGlobals.RESULT_MISS
         
     
     if not WeaponGlobals.getNeedTarget(skillId, ammoSkillId):
         return WeaponGlobals.RESULT_HIT
     
     if not target and not areaIdList:
         messenger.send('tooFar')
         return WeaponGlobals.RESULT_MISS
     
     if target and not self.obeysPirateCode(attacker, target):
         if ItemGlobals.getSubtype(localAvatar.currentWeaponId) == ItemGlobals.BAYONET:
             pass
         if not (WeaponGlobals.getAttackClass(skillId) == WeaponGlobals.AC_COMBAT):
             return WeaponGlobals.RESULT_AGAINST_PIRATE_CODE
         
     if target and not self.targetInRange(attacker, target, skillId, ammoSkillId, pos):
         return WeaponGlobals.RESULT_OUT_OF_RANGE
     
     if target and isinstance(target, DistributedBattleNPC.DistributedBattleNPC):
         if target.getGameState()[0] == 'BreakCombat':
             return WeaponGlobals.RESULT_MISS
         
     
     if target:
         skillEffects = target.getSkillEffects()
         if WeaponGlobals.C_SPAWN in skillEffects:
             return WeaponGlobals.RESULT_MISS
         
     
     messenger.send('properHit')
     return weaponHit
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:56,代码来源:BattleManager.py


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