From c38249a63a1406262475f2af6cbb01139e891936 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 30 十月 2025 09:48:08 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(祝融技能;增加效果6005 6017 6018 7006 7007;优化技能CD、buff回合计算逻辑;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py |   43 ++++++++++++++++++++++++++++++++++---------
 1 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py
index 2cdd501..643422c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py
@@ -15,16 +15,41 @@
 #"""Version = 2025-09-16 14:30"""
 #-------------------------------------------------------------------------------
 
-def GetHappenValue(attacker, defender, curEffect, effSkill, **skillkwargs):
+import GameWorld
+
+def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, **skillkwargs):
     
-    checkInStateList = curEffect.GetEffectValue(2)
-    if checkInStateList:
-        if not defender.CheckInState(checkInStateList):
-            return 0
-        
+    attrID = curEffect.GetEffectID()
     attrValue = curEffect.GetEffectValue(0)
     calcType = curEffect.GetEffectValue(1)
-    if calcType == 2: # 减少,其他默认增加
-        attrValue = -attrValue
-        
+    # 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):
+                return
+            
+        onlyOwner = curEffect.GetEffectValue(3) # 是否仅对buff施法者有效,默认0-否,1-是
+        if onlyOwner:
+            if not effBuff:
+                return
+            if effBuff.GetOwnerID() != defender.GetID():
+                return
+            
+        if calcType == 2: # 减少,其他默认增加
+            attrValue = -attrValue
+            
     return attrValue

--
Gitblit v1.8.0