| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package Skill.GameSkills.SkillModule_33  | 
| #  | 
| # @todo: ´ò³ö×îºóÒ»»÷É˺¦µÄX%¸½¼ÓYÖµ  | 
| # @author hxp  | 
| # @date 2015-4-24  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ´ò³ö×îºóÒ»»÷É˺¦µÄX%¸½¼ÓYÖµ  | 
| #  | 
| #---------------------------------------------------------------------  | 
| """Version = 2015-4-27 17:00"""  | 
|   | 
| #µ¼Èë  | 
|   | 
| import ChConfig  | 
| #import GameWorld  | 
| import BaseAttack  | 
|   | 
| ##Á´Ê½¹¥»÷  | 
| # @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):  | 
|     lastHurtValue = attacker.GetDictByKey(ChConfig.Def_PlayerKey_LastHurtValue) # ×îºóÒ»»÷É˺¦Öµ  | 
|     #¼¼ÄÜÔöǿֵ  | 
|     skillPer = curSkill.GetEffect(0).GetEffectValue(0)  | 
|     #¼¼Äܸ½¼ÓÖµ  | 
|     addValue = curSkill.GetEffect(0).GetEffectValue(1)  | 
|       | 
|     lostHP = int((lastHurtValue * skillPer / float(ChConfig.Def_MaxRateValue)) + addValue)  | 
|       | 
|     if defender and tagRoundPosX == -1 and tagRoundPosY == -1:  | 
|         #ÆðµãÊǹ¥»÷·½£¬»¹ÊÇÊܺ¦·½£¬»¹ÊÇµãµØ  | 
|         tagRoundPosX = defender.GetPosX()  | 
|         tagRoundPosY = defender.GetPosY()  | 
|       | 
|     #GameWorld.DebugLog("SkillModule_33 (x=%s,y=%s)lastHurtValue=%s,per=%s,addValue=%s,lostHP=%s"   | 
|     #                   % (tagRoundPosX, tagRoundPosY, lastHurtValue, skillPer, addValue, lostHP))  | 
|       | 
|     #µ÷Óù¥»÷Êý×é  | 
|     return BaseAttack.AreaSkillAttackLostHP(attacker, defender, tagRoundPosX, tagRoundPosY, curSkill, lostHP, tick)  | 
|       |