| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| # @todo: Âú×ãѪÁ¿µÍÓÚXX£¬µ¥´Î»ØÉúÃü°Ù·Ö±ÈѪ, ÓÃÓÚ´¥·¢¼¼ÄÜ  | 
| #  | 
| # @author: Alee  | 
| # @date 2018-1-31 ÏÂÎç03:17:30  | 
| # @version 1.0  | 
| #  | 
| # @note:   | 
| #  | 
| #---------------------------------------------------------------------  | 
| #------------------------------------------------------------------------------  | 
| #µ¼Èë  | 
| import ChConfig  | 
| import SkillCommon  | 
| import BaseAttack  | 
| import GameObj  | 
| import GameWorld  | 
| #---------------------------------------------------------------------  | 
| #È«¾Ö±äÁ¿  | 
| #---------------------------------------------------------------------  | 
|   | 
| #---------------------------------------------------------------------  | 
| ##˲¼ä»ØÑª  | 
| # @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):  | 
|     layer = max(attacker.GetDictByKey("pointlayer"), 1) # ÌØÊâ²ã¼¶Ó°ÏìÖÎÁÆÐ§¹û  | 
|     attacker.SetDict("pointlayer", 0)  | 
|     cureSetEff = curSkill.GetEffect(0) # »Ö¸´¹æÔòÉ趨Ч¹û  | 
|     maxHP = GameObj.GetMaxHP(attacker)  | 
|     if GameObj.GetHP(attacker)*ChConfig.Def_MaxRateValue/maxHP >= cureSetEff.GetEffectValue(1):  | 
|         return  | 
|       | 
|     #¹«Ê½¼ÆËãÖÎÁÆÖµ   | 
|     cureHP = int((maxHP * float(cureSetEff.GetEffectValue(0))/ChConfig.Def_MaxRateValue))  | 
|     SkillCommon.SkillAddHP(attacker, curSkill.GetSkillTypeID(), cureHP*layer, True)  | 
|     #´¦Àí¼¼ÄÜ´¥·¢ºÍ¹¥»÷³É¹¦Âß¼  | 
|     return True  | 
|   |