#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#  
 | 
##@package  
 | 
#  
 | 
# @todo: ÈºÌå¹¥»÷°Ù·Ö±ÈµôѪ£¬±»¹¥»÷Õ߸÷×Ô¼ÆËã°Ù·Ö±È  
 | 
#  
 | 
# @author: Alee  
 | 
# @date 2018-4-24 ÏÂÎç11:06:25  
 | 
# @version 1.0  
 | 
#  
 | 
# @note:   
 | 
#  
 | 
#---------------------------------------------------------------------  
 | 
import ChConfig  
 | 
import BaseAttack  
 | 
import GameObj  
 | 
#------------------------------------------------------------------------------   
 | 
  
 | 
  
 | 
#------------------------------------------------------------------------------   
 | 
  
 | 
## ÈºÌå¹¥»÷°Ù·Ö±ÈµôѪ£¬±»¹¥»÷Õ߸÷×Ô¼ÆËã°Ù·Ö±È  
 | 
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):  
 | 
    skillEffect = curSkill.GetEffect(0)  
 | 
    skillPer = skillEffect.GetEffectValue(0) / float(ChConfig.Def_MaxRateValue)  
 | 
    skillEnhance = skillEffect.GetEffectValue(1)  
 | 
      
 | 
    #---¹¥»÷±éÀúÆðµãÓÅÏȼ¶ 1.ÕÒÖ¸¶¨µã 2.·ÀÊØÕߣ¨°üÀ¨×Ô¼º£©---  
 | 
    if tagRoundPosX == -1 or tagRoundPosY == -1:  
 | 
        #ÆðµãÊǹ¥»÷·½£¬»¹ÊÇÊܺ¦·½£¬»¹ÊÇµãµØ  
 | 
        tagRoundPosX = defender.GetPosX()  
 | 
        tagRoundPosY = defender.GetPosY()  
 | 
          
 | 
    return BaseAttack.AttackAreaByHPPer(attacker, defender, tagRoundPosX, tagRoundPosY,   
 | 
                                              curSkill, skillPer, skillEnhance, tick,  
 | 
                                              isExSkill = isEnhanceSkill)  
 |