129 【战斗】战斗系统-服务端(步练师技能;临时增加属性增加计算方式10-根据对方buff层级增加;)
2个文件已修改
24 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
        
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
@@ -1254,6 +1254,8 @@
    if isSuperHit:
        hurtTypes |= pow(2, ChConfig.HurtType_SuperHit)
        aSuperDamPer = atkObj.GetBatAttrValue(ChConfig.AttrID_SuperDamPer)
        aSuperDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.AttrID_SuperDamPer, curSkill)
        dSuperDamPerDef = atkObj.GetBatAttrValue(ChConfig.AttrID_SuperDamPerDef)
        
    if isParry: