| | |
| | |
|
| | | def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, **skillkwargs):
|
| | | layerPer = curEffect.GetEffectValue(0) # 每层增加的万分比
|
| | | buffState = curEffect.GetEffectValue(1) # buff״̬
|
| | | if not buffState:
|
| | | buffStateList = curEffect.GetEffectValue(1) # buff״̬ [״̬1, ״̬2, ...]
|
| | | if not buffStateList:
|
| | | return
|
| | |
|
| | | layerTotal = 0
|
| | | buffMgr = attacker.GetBuffManager()
|
| | | for buff in buffMgr.FindBuffListByState(buffState):
|
| | | layerTotal += buff.GetLayer()
|
| | | |
| | | for buffState in buffStateList:
|
| | | for buff in buffMgr.FindBuffListByState(buffState):
|
| | | layerTotal += buff.GetLayer()
|
| | | |
| | | return layerTotal * layerPer
|