ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py
@@ -15,8 +15,28 @@
#"""Version = 2025-09-16 14:30"""
#-------------------------------------------------------------------------------
import GameWorld
def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, **skillkwargs):
    
    attrID = curEffect.GetEffectID()
    attrValue = curEffect.GetEffectValue(0)
    calcType = curEffect.GetEffectValue(1)
    # 10-根据对方buff层级增加
    if calcType == 10:
        buffStateList = curEffect.GetEffectValue(2)
        maxValue = curEffect.GetEffectValue(3) # 累计最高增加值
        layerTotal = 0
        buffMgr = defender.GetBuffManager()
        for buffState in buffStateList:
            for buff in buffMgr.FindBuffListByState(buffState):
                layerTotal += max(1, buff.GetLayer())
        attrValue *= layerTotal
        if maxValue and attrValue > maxValue:
            attrValue = maxValue
        GameWorld.DebugLog("按对方buff层级增加属性: attrID=%s,attrValue=%s,buffStateList=%s,layerTotal=%s,maxValue=%s"
                           % (attrID, attrValue, buffStateList, layerTotal, maxValue))
    else:
    checkInStateList = curEffect.GetEffectValue(2)
    if checkInStateList:
        if not defender.CheckInState(checkInStateList):
@@ -29,8 +49,6 @@
        if effBuff.GetOwnerID() != defender.GetID():
            return
        
    attrValue = curEffect.GetEffectValue(0)
    calcType = curEffect.GetEffectValue(1)
    if calcType == 2: # 减少,其他默认增加
        attrValue = -attrValue