From 1d236490e8865fcb7af9eade85b4516e1904b414 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 06 一月 2026 20:16:35 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(增加属性ID 77贯穿、78抗贯穿、79招架、80抗招架属性支持;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py   |   10 +++++++++-
 PySysDB/PySysDBPY.h                                                                    |    4 ++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py |   26 ++++++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py        |   11 +++++++++--
 4 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 7288ff0..dcb842c 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -333,6 +333,10 @@
 	float		QunFinalDamPerDefRatio;
 	float		PVPDamPerRatio;
 	float		PVPDamPerDefRatio;
+	float		GuanchuanRatio;
+	float		GuanchuanDefRatio;
+	float		ZhaojiaRatio;
+	float		ZhaojiaDefRatio;
 };
 
 //主线章节表
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 0e906ee..d6437de 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -178,7 +178,11 @@
 AttrID_ReviveXPPer,                         # 复活怒气加成 74
 AttrID_DOTBurnPer,                          # 灼烧增伤 75
 AttrID_DOTBurnPerDef,                       # 灼烧减伤 76
-) = range(1, 1 + 76)
+AttrID_Guanchuan,                           # 贯穿 77
+AttrID_GuanchuanDef,                        # 抗贯穿 78
+AttrID_Zhaojia,                             # 招架 79
+AttrID_ZhaojiaDef,                          # 抗招架 80
+) = range(1, 1 + 80)
 
 # 需要计算的武将战斗属性ID列表
 CalcBattleAttrIDList = [AttrID_Atk, AttrID_Def, AttrID_MaxHP, AttrID_StunRate, AttrID_StunRateDef, 
@@ -194,6 +198,7 @@
                         AttrID_BatDamPer, AttrID_BatDamPerDef, AttrID_PursueDamPer, AttrID_PursueDamPerDef,
                         AttrID_ComboDamPer, AttrID_ComboDamPerDef, AttrID_XPRecoverPer, AttrID_PVPDamPer, AttrID_PVPDamPerDef,
                         AttrID_ReviveHPPer, AttrID_ReviveXPPer, AttrID_DOTBurnPer, AttrID_DOTBurnPerDef,
+                        AttrID_Guanchuan, AttrID_GuanchuanDef, AttrID_Zhaojia, AttrID_ZhaojiaDef,
                         ]
 
 # 基础三维属性ID列表
@@ -934,7 +939,9 @@
 HurtAtkType_HarmSelf,          # 自残 12
 HurtAtkType_CaorenProtect,     # 本次伤害有受曹仁防护标记 13
 HurtAtkType_IgnoreShield,      # 无视承伤盾 14
-) = range(15)
+HurtAtkType_Guanchuan,         # 贯穿 15
+HurtAtkType_Zhaojia,           # 招架 16
+) = range(17)
 
 #伤害类型
 (
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 7ebe0c5..ad79630 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -323,6 +323,10 @@
                         ("float", "QunFinalDamPerDefRatio", 0),
                         ("float", "PVPDamPerRatio", 0),
                         ("float", "PVPDamPerDefRatio", 0),
+                        ("float", "GuanchuanRatio", 0),
+                        ("float", "GuanchuanDefRatio", 0),
+                        ("float", "ZhaojiaRatio", 0),
+                        ("float", "ZhaojiaDefRatio", 0),
                         ),
 
                 "MainChapter":(
@@ -2652,7 +2656,11 @@
     def GetQunFinalDamPerRatio(self): return self.attrTuple[40] # float
     def GetQunFinalDamPerDefRatio(self): return self.attrTuple[41] # float
     def GetPVPDamPerRatio(self): return self.attrTuple[42] # float
-    def GetPVPDamPerDefRatio(self): return self.attrTuple[43] # float
+    def GetPVPDamPerDefRatio(self): return self.attrTuple[43] # float
+    def GetGuanchuanRatio(self): return self.attrTuple[44] # float
+    def GetGuanchuanDefRatio(self): return self.attrTuple[45] # float
+    def GetZhaojiaRatio(self): return self.attrTuple[46] # float
+    def GetZhaojiaDefRatio(self): return self.attrTuple[47] # float
 
 # 主线章节表
 class IPY_MainChapter():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
index 4276c3f..5fe4ae7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
@@ -2154,6 +2154,32 @@
     aFinalDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.PassiveEff_AddFinalDamPer, curSkill)
     aFinalDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.AttrID_FinalDamPer, curSkill)
     
+    #招架  - 无视攻击方最终增伤百分比
+    dZhaojia = defObj.GetBatAttrValue(ChConfig.AttrID_Zhaojia)
+    aZhaojiaDef = atkObj.GetBatAttrValue(ChConfig.AttrID_ZhaojiaDef)
+    if dZhaojia > aZhaojiaDef:
+        perMoreValue, perReduce = IpyGameDataPY.GetFuncEvalCfg("ZhaojiaCfg", 1) # 每高与对方抗贯穿x值无视y%最终减伤
+        reducePer = (dZhaojia - aZhaojiaDef) / float(perMoreValue) * perReduce
+        reduceMin, reduceMax = IpyGameDataPY.GetFuncEvalCfg("ZhaojiaCfg", 2) # 最小无视百分比|最大无视百分比
+        if reducePer >= reduceMin and GameWorld.CanHappen(IpyGameDataPY.GetFuncCfg("ZhaojiaCfg", 3)):
+            reducePer = min(reducePer, reduceMax)
+            hurtTypes |= pow(2, ChConfig.HurtAtkType_Zhaojia)
+            aFinalDamPer = int(aFinalDamPer * (100 - reducePer) / 100.0) # 按百分比减少
+            GameWorld.DebugLogEx("dZhaojia=%s,aZhaojiaDef=%s,reducePer=%s,aFinalDamPer=%s", dZhaojia, aZhaojiaDef, reducePer, aFinalDamPer)
+            
+    #贯穿  - 无视防守方最终减伤百分比
+    aGuanchuan = atkObj.GetBatAttrValue(ChConfig.AttrID_Guanchuan)
+    dGuanchuanDef = defObj.GetBatAttrValue(ChConfig.AttrID_GuanchuanDef)
+    if aGuanchuan > dGuanchuanDef:
+        perMoreValue, perReduce = IpyGameDataPY.GetFuncEvalCfg("GuanchuanCfg", 1) # 每高与对方抗贯穿x值无视y%最终减伤
+        reducePer = (aGuanchuan - dGuanchuanDef) / float(perMoreValue) * perReduce
+        reduceMin, reduceMax = IpyGameDataPY.GetFuncEvalCfg("GuanchuanCfg", 2) # 最小无视百分比|最大无视百分比
+        if reducePer >= reduceMin and GameWorld.CanHappen(IpyGameDataPY.GetFuncCfg("GuanchuanCfg", 3)):
+            reducePer = min(reducePer, reduceMax)
+            hurtTypes |= pow(2, ChConfig.HurtAtkType_Guanchuan)
+            dFinalDamPerDef = int(dFinalDamPerDef * (100 - reducePer) / 100.0) # 按百分比减少
+            GameWorld.DebugLogEx("aGuanchuan=%s,dGuanchuanDef=%s,reducePer=%s,dFinalDamPerDef=%s", aGuanchuan, dGuanchuanDef, reducePer, dFinalDamPerDef)   
+            
     aNormalSkillPer, dNormalSkillPerDef = 0, 0
     if isTurnNormalSkill:
         aNormalSkillPer = atkObj.GetBatAttrValue(ChConfig.AttrID_NormalSkillPer) # 普技增伤

--
Gitblit v1.8.0