| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| #  | 
| ##@package SkillModule_14.py  | 
| #  | 
| # @todo:·¨Á¦È¼ÉÕ(ȼÉÕÄ¿±ê·¨Á¦°Ù·Ö±È)  | 
| #  | 
| # @author jiang  | 
| # @date 2012-07-13  | 
| # @version 1.0  | 
| # @note:  | 
| #  | 
| #------------------------------------------------------------------------------   | 
| """Version = 2012-07-13 15:30"""  | 
| #------------------------------------------------------------------------------   | 
| # µ¼Èë  | 
| import ChConfig  | 
| import SkillCommon  | 
| import BaseAttack  | 
| import IPY_GameWorld  | 
| import GameWorld  | 
| #------------------------------------------------------------------------------   | 
|   | 
| ## ·¨Á¦È¼ÉÕ(ȼÉÕÄ¿±ê·¨Á¦°Ù·Ö±È)  | 
| #  @param attacker ¹¥»÷ÕßʵÀý  | 
| #  @param defender ·ÀÊØÕßʵÀý  | 
| #  @param curSkill ¼¼ÄÜʵÀý  | 
| #  @param tagRoundPosX ÇøÓò×ø±êX  | 
| #  @param tagRoundPosY ÇøÓò×ø±êY  | 
| #  @param isEnhanceSkill ÊÇ·ñΪ¸½¼Ó¼¼ÄÜ  | 
| #  @param tick Ê±¼ä´Á  | 
| #  @return ·µ»ØÖµÎªÕæ, Êͷųɹ¦  | 
| 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)  | 
|     skillTypeID = curSkill.GetSkillTypeID()  | 
|       | 
|     if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:  | 
|         GameWorld.ErrLog("·¨Á¦È¼ÉÕ skillId = %s Ä¿±ê²»ÊÇÍæ¼Ò"%(skillTypeID))  | 
|         return  | 
|       | 
|     lostMPValue = max(defender.GetMP(), int(defender.GetMP() * skillPer + skillEnhance))  | 
|       | 
|     SkillCommon.SkillLostMP(defender, skillTypeID, attacker, lostMPValue, tick)  | 
|       | 
|     #´¦Àí¼¼ÄÜ´¥·¢ºÍ¹¥»÷³É¹¦Âß¼  | 
|     return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)  | 
|   |