ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6011.py
@@ -15,21 +15,40 @@
#"""Version = 2025-09-24 19:00"""
#-------------------------------------------------------------------------------
import TurnBuff
import BattleObj
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-对方
    checkTag = curEffect.GetEffectValue(2) # buff检查自己还是对方: 0-自己,1-对方,2-主技能目标
    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()
    if checkTag == 2:
        objMgr = BattleObj.GetBatObjMgr()
        for tagID in attacker.GetMainTagIDList():
            buffObj = objMgr.getBatObj(tagID)
            if not buffObj:
                continue
            buffMgr = buffObj.GetBuffManager()
            for buffState in buffStateList:
                for buff in buffMgr.FindBuffListByState(buffState)[::-1]:
                    layerTotal += buff.GetLayer()
    else:
        buffMgr = attacker.GetBuffManager()
    for buffState in buffStateList:
        for buff in buffMgr.FindBuffListByState(buffState):
            layerTotal += buff.GetLayer()
        buffObj = defender if checkTag else attacker
        buffMgr = buffObj.GetBuffManager()
        for buffState in buffStateList:
            for buff in buffMgr.FindBuffListByState(buffState)[::-1]:
                layerTotal += buff.GetLayer()
                if isDelBuff:
                    TurnBuff.DoBuffDel(turnFight, buffObj, buff, connSkill)
    return layerTotal * layerPer