hxp
2022-02-21 0c27822ef5e6c67782ed143a4ff03ecfbdfda1fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/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