#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#  
 | 
##@package  
 | 
#  
 | 
# @todo: ¸ù¾Ý×ÜѪÁ¿»ñÈ¡µÄѪÁ¿»¤¶Ü, ¿É¸½¼Ó±¬Õ¨  
 | 
#  
 | 
# @author: Alee  
 | 
# @date 2018-4-23 ÏÂÎç02:04:06  
 | 
# @version 1.0  
 | 
#  
 | 
# @note:    
 | 
#  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
import GameWorld  
 | 
import ChConfig  
 | 
import GameObj  
 | 
import SkillShell  
 | 
  
 | 
  
 | 
  
 | 
def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict):  
 | 
    curEffect = curSkill.GetEffect(0)  
 | 
    return [int(float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue*GameObj.GetMaxHP(attacker))]  
 | 
  
 | 
def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):  
 | 
    if curEffect.GetEffectValue(1) == 0:  
 | 
        return  
 | 
    boomValue = curBuff.GetValue()  
 | 
    # Ê£Ó໤¶ÜÖµÓÃÓÚ±¬Õ¨  
 | 
    if boomValue == 0:  
 | 
        return  
 | 
      
 | 
    boomValue = int(boomValue*float(curEffect.GetEffectValue(1))/ChConfig.Def_MaxRateValue)  
 | 
    #Ч¹ûÖµ µÚÈý¸öֵΪ¼¼ÄÜID  
 | 
    boomID = curEffect.GetEffectValue(2)  
 | 
    skillData = GameWorld.GetGameData().GetSkillBySkillID(boomID)  
 | 
    if not skillData:  
 | 
        return  
 | 
      
 | 
    # ´æ´¢ÆðÀ´ÓÃÓÚÉ˺¦  
 | 
    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, boomValue)  
 | 
      
 | 
    SkillShell.Trigger_UseSkill(curObj, None, skillData, tick, curObj.GetPosX(), curObj.GetPosY())  
 | 
    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 0)  
 | 
  
 | 
    return 
 |