#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#
|
##@package
|
#
|
# @todo: Á½¸öÈËÖ®¼äÓÐÒ»ÌõÌØÐ§Á¬½Ó£¬ÅäºÏ9999ÓÃÓÚÅжϾàÀë
|
#
|
# @author: Alee
|
# @date 2019-5-6 ÏÂÎç04:30:33
|
# @version 1.0
|
#
|
# @note:
|
#
|
#---------------------------------------------------------------------
|
#µ¼Èë
|
import SkillCommon
|
import GameWorld
|
import ChConfig
|
import PlayerControl
|
|
def ProcessBuff(defender, curBuff, curEffect, processBuffTick, tick):
|
buffOwner = SkillCommon.GetBuffOwner(curBuff)
|
|
if not buffOwner:
|
curBuff.SetRemainTime(0)
|
return
|
|
if GameWorld.GetDistEx(defender.GetPosX(), defender.GetPosY(), buffOwner.GetPosX(), buffOwner.GetPosY()) > curEffect.GetEffectValue(0):
|
curBuff.SetRemainTime(0)
|
return
|
return
|
|
|
def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
|
attrType = curEffect.GetEffectValue(1)
|
value = curEffect.GetEffectValue(2) + curBuff.GetValue2()
|
calcDict[attrType] = calcDict.get(attrType, 0) - value
|
|
return
|
|
## ·µ»ØbuffÀàÐÍ£¬ÏßÐÔÓë·ñ
|
# @param
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def GetCalcType():
|
return ChConfig.TYPE_NoLinear
|
|
## Ìí¼ÓBUFFºóµÄÂß¼
|
# @param None
|
# @return None
|
def DoAddBuffOver(curObj, addBuff, curEffect, tick, buffOwner):
|
if not buffOwner:
|
return
|
if curEffect.GetEffectValue(1) != ChConfig.TYPE_Calc_AttrSpeed:
|
return
|
|
addBuff.SetValue2(PlayerControl.GetSubSpeedPer(buffOwner))
|
return
|
|