#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
##@package Skill.GameSkills.SkillModule_48  
 | 
#  
 | 
# @todo:¿Û³ýÄ¿±êÑýÆø  
 | 
# @author hxp  
 | 
# @date 2024-03-26  
 | 
# @version 1.0  
 | 
#  
 | 
# ÏêϸÃèÊö: ¿Û³ýÑýÆø Ð§¹û1£º AÖµ-¿Û³ý°Ù·Ö±È£¬BÖµ-¿Û³ý¹Ì¶¨Öµ  
 | 
#  
 | 
#-------------------------------------------------------------------------------  
 | 
#"""Version = 2024-03-26 19:00"""  
 | 
#-------------------------------------------------------------------------------  
 | 
  
 | 
import GameObj  
 | 
import GameWorld  
 | 
  
 | 
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):  
 | 
    if not defender:  
 | 
        return  
 | 
    skillEffect = curSkill.GetEffect(0)  
 | 
    delPer = skillEffect.GetEffectValue(0)  
 | 
    delValue = skillEffect.GetEffectValue(1)  
 | 
    maxXP = GameObj.GetMaxXP(defender)  
 | 
    curXP = GameObj.GetXP(defender)  
 | 
    updXP = max(curXP - int(maxXP * delPer / 10000.0) - delValue, 0)  
 | 
    GameObj.SetXP(defender, updXP)  
 | 
    GameWorld.DebugLog("        ¿Û³ýÑýÆø: curXP=%s,delPer=%s,delValue=%s,updXP=%s,atkID=%s,curID=%s" % (curXP, delPer, delValue, updXP, attacker.GetID(), defender.GetID()))  
 | 
    return True # ²»Í¨ÖªÊ¹Óóɹ¦  
 | 
    #return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)  
 | 
  
 |