From 649b36b642546062ab5102b6225b9f78ea72309d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 04 十一月 2025 18:11:02 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(优化完整战报仅包含战斗相关封包,结算奖励相关如物品,经验,货币,挑战次数等统一放在战报数据B430后同步)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5004.py |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5004.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5004.py
index 8da8fe6..94ffffa 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5004.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5004.py
@@ -4,12 +4,12 @@
 #
 ##@package Skill.PassiveTrigger.PassiveEff_5004
 #
-# @todo:概率随机移除随机目标身上某种buff
+# @todo:概率移除随机目标身上某种类型buff
 # @author hxp
 # @date 2025-09-23
 # @version 1.0
 #
-# 详细描述: 概率随机移除随机目标身上某种buff
+# 详细描述: 概率移除随机目标身上某种类型buff
 #
 #-------------------------------------------------------------------------------
 #"""Version = 2025-09-23 18:30"""
@@ -23,7 +23,7 @@
 
 def DoSkillEffectLogic(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs):
     # buff技能类型    移除个数,0为全部    敌友,1-敌方;2-友方    随机目标个数    概率
-    skillType = curEffect.GetEffectValue(0) # buff技能类型
+    skillTypeList = curEffect.GetEffectValue(0) # buff技能类型
     delBuffCnt = curEffect.GetEffectValue(1) # 移除个数,0为全部
     isFriend = curEffect.GetEffectValue(2) # 敌友,0-敌方;1-友方
     delObjCnt = curEffect.GetEffectValue(3) # 随机目标个数
@@ -53,14 +53,16 @@
         for index in range(buffMgr.GetBuffCount()):
             buff = buffMgr.GetBuffByIndex(index)
             skillData = buff.GetSkillData()
-            if skillData.GetSkillType() != skillType:
+            if skillData.GetSkillType() not in skillTypeList:
+                continue
+            if skillData.GetDispersedLimit():
                 continue
             buffList.append(buff)
             
         if buffList:
             objBuffList.append([tagObj, buffList])
             
-    GameWorld.DebugLog("概率随机移除随机目标身上某种buff: skillType=%s,objLen=%s" % (skillType, len(objBuffList)))
+    GameWorld.DebugLog("概率随机移除随机目标身上某种buff: skillTypeList=%s,objLen=%s" % (skillTypeList, len(objBuffList)))
     if not objBuffList:
         return
     
@@ -73,12 +75,12 @@
         if not buffList:
             continue
         
-        if delBuffCnt > len(buffList):
+        if delBuffCnt and delBuffCnt < len(buffList):
             random.shuffle(buffList) # 随机buff
             buffList = buffList[:delBuffCnt]
             
         for buff in buffList:
             GameWorld.DebugLog("    随机移除buff: tagID=%s,buffID=%s" % (tagObj.GetID(), buff.GetBuffID()))
-            TurnBuff.DoBuffDel(turnFight, tagObj, buff)
+            TurnBuff.DoBuffDel(turnFight, tagObj, buff, connSkill)
             
     return True

--
Gitblit v1.8.0