From 42e777349b6f1a57284419fec3e5eb7d62a6dc5c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期日, 04 一月 2026 17:19:36 +0800
Subject: [PATCH] 283 【配套功能】查看他人-服务端(武将物品增加Data记录;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5022.py |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5022.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5022.py
index db19eb2..c5a57de 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5022.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5022.py
@@ -23,12 +23,14 @@
     effEx2 = curEffect.GetEffectValue(1) # 支持多个属性
     calcRule = curEffect.GetEffectValue(2) # 附加计算规则,没配置默认增加固定值
     
+    effExAdd = [0, 0, 0] # 某种条件下再额外效果值组 [buff效果ID/属性ID, 值, 计算方式]
     calcLayer = 1 # 没配置的默认1层,相当于固定值
     if calcRule:
         ruleType = calcRule[0]
         # 100 - 按友方某个国家武将数  参数1:国家
         if ruleType == 100:
             country = calcRule[1] if len(calcRule) > 1 else 0
+            onlyAlive = calcRule[2] if len(calcRule) > 2 else 0
             batLineup = batObj.GetBatLineup()
             countryCnt = 0
             batObjMgr = BattleObj.GetBatObjMgr()
@@ -38,25 +40,32 @@
                     continue
                 if batObj.GetCountry() != country:
                     continue
-                #if batObj.IsAlive(): # 死亡也算
-                #    continue
+                if onlyAlive and not batObj.IsAlive():
+                    continue
                 countryCnt += 1
             calcLayer = countryCnt
-            GameWorld.DebugLogEx("按友方某个国家武将数计算额外buff属性: ruleType=%s,country=%s,countryCnt=%s", ruleType, country, countryCnt)
+            GameWorld.DebugLogEx("按友方某个国家武将数计算额外buff属性: ruleType=%s,country=%s,countryCnt=%s,onlyAlive=%s", ruleType, country, countryCnt, onlyAlive)
         # 101 - 仅对指定性别有效  参数1:性别
         elif ruleType == 101:
             onlySex = calcRule[1] if len(calcRule) > 1 else 0
             if tagObj.GetSex() != onlySex:
                 GameWorld.DebugLogEx("5022额外buff对该性别无效: ruleType=%s,onlySex=%s,tagSex=%s,tagID=%s", ruleType, onlySex, tagObj.GetSex(), tagObj.GetID())
                 return
-            
+        # 102 - 同国武将额外提升 参数1:额外提升值
+        elif ruleType == 102:
+            if batObj.GetCountry() == tagObj.GetCountry() and len(calcRule) == 4:
+                effExAdd = calcRule[1:]
+                GameWorld.DebugLogEx("同国武将再额外buff属性: ruleType=%s,country=%s,effExAdd=%s", ruleType, tagObj.GetCountry(), effExAdd)
+                
     if calcLayer <= 0:
         return
     
-    for effEX in [effEx1, effEx2]:
+    for effEX in [effEx1, effEx2, effExAdd]:
         if not isinstance(effEX, list) or len(effEX) != 3:
             continue
         attrID, attrValue, calcType = effEX
+        if not attrID or not attrValue:
+            continue
         if calcLayer > 1:
             attrValue = int(attrValue * calcLayer)
         GameWorld.DebugLogEx("额外buff效果ID/属性ID值: attrID=%s,attrValue=%s,calcType=%s", attrID, attrValue, calcType)

--
Gitblit v1.8.0