| | |
| | | #"""Version = 2025-09-24 19:00"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import TurnBuff
|
| | |
|
| | | def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs):
|
| | | layerPer = curEffect.GetEffectValue(0) # 每层增加的万分比
|
| | | buffStateList = curEffect.GetEffectValue(1) # buff״̬ [״̬1, ״̬2, ...]
|
| | | checkTag = curEffect.GetEffectValue(2) # buff检查自己还是对方: 0-自己,1-对方
|
| | | isDelBuff = curEffect.GetEffectValue(3) # 触发效果后是否扣除buff
|
| | | if not buffStateList:
|
| | | return
|
| | |
|
| | | if isDelBuff:
|
| | | if "turnFight" not in skillkwargs:
|
| | | return
|
| | | turnFight = skillkwargs["turnFight"]
|
| | | |
| | | layerTotal = 0
|
| | | if checkTag:
|
| | | buffMgr = defender.GetBuffManager()
|
| | | else:
|
| | | buffMgr = attacker.GetBuffManager()
|
| | | buffObj = defender if checkTag else attacker
|
| | | buffMgr = buffObj.GetBuffManager()
|
| | | for buffState in buffStateList:
|
| | | for buff in buffMgr.FindBuffListByState(buffState):
|
| | | for buff in buffMgr.FindBuffListByState(buffState)[::-1]:
|
| | | layerTotal += buff.GetLayer()
|
| | | |
| | | if isDelBuff:
|
| | | TurnBuff.DoBuffDel(turnFight, buffObj, buff, connSkill)
|
| | | |
| | | return layerTotal * layerPer
|