#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # #------------------------------------------------------------------------------- # ##@package SkillModule_10 # # @todo: Ë²ÒÆ # @author Alee # @date 2010-12-16 20:50 # @version 1.2 # # @change: "2013-04-17 20:35" Alee ÏÈÊͷż¼ÄܺóÔÙÉÁ˸£¬Ö§³Ö¿Í»§¶Ë¶¯×÷ # @change: "2013-11-05 21:00" Alee ·­¹öÕϰ­µãÏÞÖÆ #------------------------------------------------------------------------------ """Version = 2013-11-05 21:00""" #------------------------------------------------------------------------------ #µ¼Èë import GameWorld import BaseAttack import IPY_GameWorld import GameMap #--------------------------------------------------------------------- #È«¾Ö±äÁ¿ #--------------------------------------------------------------------- #--------------------------------------------------------------------- ##Ë²ÒÆ # @param attacker ¹¥»÷ÕßʵÀý # @param attacker ¹¥»÷ÕßʵÀý # @param defender ·ÀÊØÕßʵÀý # @param curSkill ¼¼ÄÜʵÀý # @param tagRoundPosX ÇøÓò×ø±êX # @param tagRoundPosY ÇøÓò×ø±êY # @param isEnhanceSkill ÊÇ·ñΪ¸½¼Ó¼¼ÄÜ # @param tick ʱ¼ä´Á # @return ·µ»ØÖµÎªÕæ, Êͷųɹ¦ # @remarks Ë²ÒÆ def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick): startPosX, startPosY = attacker.GetPosX(), attacker.GetPosY() #=========================================================================== # #¹­ÊÖ·­¹öÌØÊâ´¦Àí²»ÄÜÔ½¹ýÕϰ­Ìø # if curSkill.GetSkillTypeID() == 7460: # #¹­ÊÖ·­¹öÓÃË²ÒÆÄ£°å£¬ÌøÅü¶¯×÷ # if not (GameWorld.GetMap().CanLineTo(tagRoundPosX, tagRoundPosY, startPosX, startPosY) \ # and GameWorld.GetMap().CanLineTo(startPosX, startPosY, tagRoundPosX, tagRoundPosY)): # return False #=========================================================================== #´¦Àí¼¼ÄÜ´¥·¢ºÍ¹¥»÷³É¹¦Âß¼­ reslut = BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill) #NPC if attacker.GetGameObjType() == IPY_GameWorld.gotNPC: posX, posY = GameMap.GetNearbyPosByDis(defender.GetPosX(), defender.GetPosY(), 1) if posX == 0 and posY == 0: return attacker.ResetPos(defender.GetPosX(), defender.GetPosY(), curSkill.GetSkillID()) #Íæ¼Ò elif attacker.GetGameObjType() == IPY_GameWorld.gotPlayer: GameWorld.ResetPlayerPos(attacker, tagRoundPosX, tagRoundPosY, curSkill.GetSkillID()) else: return return reslut