#!/usr/bin/python # -*- coding: GBK -*- # # @todo: Ëæ»ú´«ËÍÊõ # # @author: Alee # @date 2018-2-1 ÏÂÎç02:51:53 # @version 1.0 # # @note: # #------------------------------------------------------------------------------ import ChConfig import GameObj import IPY_GameWorld import GameWorld import GameMap #------------------------------------------------------------------------------ def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick): attackDis = curSkill.GetAtkRadius() posX, posY = GameMap.GetNearbyPosByDis(attacker.GetPosX(), attacker.GetPosY(), attackDis) if posX == 0: return #NPC if defender.GetGameObjType() == IPY_GameWorld.gotNPC: defender.ResetPos(posX, posY, curSkill.GetSkillID()) #Íæ¼Ò elif attacker.GetGameObjType() == IPY_GameWorld.gotPlayer: GameWorld.ResetPlayerPos(defender, posX, posY, curSkill.GetSkillID()) return True