hxp
2026-01-16 750ff5ee6204bb088713b0ce10d53d05f22679e0
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6011.py
@@ -16,11 +16,12 @@
#-------------------------------------------------------------------------------
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
@@ -31,12 +32,23 @@
        turnFight = skillkwargs["turnFight"]
        
    layerTotal = 0
    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)
    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:
        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