1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  | #!/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  
 |    
 |    
 |  
  |