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
#!/usr/bin/python
# -*- coding: GBK -*-
#
# @todo: Ã¿ËðʧXXѪÁ¿Ôö¼Ó¹¥»÷XX£¬×î¸ß¹¥»÷¼Ó³ÉXX
#
# @author: Alee
# @date 2018-1-20 ÏÂÎç06:02:37
# @version 1.0
#
# @note: 
#
#---------------------------------------------------------------------
#µ¼Èë
import ChConfig
import BuffSkill
import IPY_GameWorld
import PlayerControl
import ShareDefine
import SkillCommon
import GameObj
import GameWorld
#---------------------------------------------------------------------
 
## buffÏßÐÔÔö¼ÓÊôÐÔ
#  @param defender Buff³ÐÊÜÕß
#  @param curEffect ¼¼ÄÜЧ¹û
#  @param calcDict ¼¼ÄÜЧ¹ûÀÛ¼Ó×ܱí
#  @return None
def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
    #ʵʱËã
    # ËðʧѪÁ¿/Ëðʧ»ùÊý
    value = (GameObj.GetMaxHP(defender) - GameObj.GetHP(defender))*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(defender)/curEffect.GetEffectValue(0)
    
    value = min(value, curEffect.GetEffectValue(2)/curEffect.GetEffectValue(1) - 1)
    
    effectValue = curEffect.GetEffectValue(1)*(value + 1)
        
    calcDict[ChConfig.TYPE_Calc_AttrATKMin] = calcDict.get(ChConfig.TYPE_Calc_AttrATKMin, 0) + effectValue
    calcDict[ChConfig.TYPE_Calc_AttrATKMax] = calcDict.get(ChConfig.TYPE_Calc_AttrATKMax, 0) + effectValue
        
    return 
 
 
## ·µ»ØbuffÀàÐÍ£¬ÏßÐÔÓë·ñ
#  @param 
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
def GetCalcType():
    return ChConfig.TYPE_NoLinear