From 3ed128401680ce3755dee186f48c7fb965f7aca8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 18 九月 2025 10:11:12 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(诸葛果技能;追击支持;优化连击追击;程序内置限制单武将单次行动中每个对象累计使用技能次数20次;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
index 59773b3..6203538 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
@@ -502,6 +502,12 @@
         self._hurtList = [] # 本次伤血列表,可能同一个对象有多个伤害,如弹射等 [HurtObj, ...]
         self._bySkill = None # 由哪个技能触发的
         self._afterLogicList = [] # 技能释放后需要处理逻辑 [[logicType, logicParams], ...]
+        
+        # 连击相关
+        self._comboState = 0 # 连击状态 0-未重置,1-初始化连击相关可连击,2-连击已中断
+        self._comboNum = 0 # 连击次数
+        self._missTagIDDict = {} # 单次连续连击中对方已闪避次数 {tagID:missNum, ...}
+        self._parryTagIDDict = {} # 单次连续连击中对方已格挡次数 {tagID:parryNum, ...}
         return
     
     def ResetUseRec(self):
@@ -580,6 +586,39 @@
         return hurtObj
     def GetHurtObjList(self): return self._hurtList
     
+    def __commboClear(self):
+        ## 连击相关清空
+        self._comboState = 0
+        self._comboNum = 0
+        self._missTagIDDict = {}
+        self._parryTagIDDict = {}
+        return
+    
+    def ComboCheckStart(self, force=False):
+        ## 检查并设置开始连击相关,一般是开始使用技能时调用
+        if not force:
+            if self._comboState == 1:
+                #GameWorld.DebugLog("连击进行中,不重置")
+                return
+        self.__commboClear()
+        self._comboState = 1 # 设置已初始化连击相关
+        #GameWorld.DebugLog("连击重置")
+        return
+    
+    def ComboEnable(self): return self._comboState == 1 ## 可否执行连击相关
+    
+    def ComboInterrupt(self):
+        ## 连击中断,概率不再触发连击时需要设置中断
+        self._comboState = 2
+        return
+    
+    def GetComboNum(self): return self._comboNum # 已连击次数
+    def SetComboNum(self, comboNum): self._comboNum = comboNum
+    def GetTagMissNum(self, tagID): return self._missTagIDDict.get(tagID, 0)
+    def SetTagMissNum(self, tagID, missNum): self._missTagIDDict[tagID] = missNum
+    def GetTagParryNum(self, tagID): return self._parryTagIDDict.get(tagID, 0)
+    def SetTagParryNum(self, tagID, parryNum): self._parryTagIDDict[tagID] = parryNum
+    
 class SkillManager():
     ## 战斗对象技能管理器
     

--
Gitblit v1.8.0