From ba67d86ccc7dde96a4fe2bb2ae3abfbd0aacc561 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 03 十一月 2025 12:00:10 +0800
Subject: [PATCH] 237 【福利内容】每日任务/每周任务/章节奖励-服务端(增加每日任务类型 6 ~ 10)

---
 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..44cf30a 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, connSkill, **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