From 11567f95682fc68fae07fbea58fb29a4173e68b6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 19 十二月 2025 17:23:47 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(貂蝉、吕布部分潜能;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6029.py |   46 +++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5507.py |   58 +++++++++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py                      |    1 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                             |    1 
 4 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 9ad4893..13c53a4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4058,6 +4058,7 @@
 PassiveEff_AddCheckPer5505 = 6026 # 增减5505效果验证生命百分比(根据目标身上buff状态层数)
 PassiveEff_AddHurtAtkPerMax = 6027 # 增加技能最大攻击万分比限制
 PassiveEff_AddChangeLayers5008 = 6028 # 增减5008效果的转化层数
+PassiveEff_AddBatDamPerByLayer = 6029 # 提升技能战斗伤害(根据身上buff状态层数)
 
 # 被动效果ID有触发值时就返回的
 PassiveEffHappenValueList = [PassiveEff_ChangeHurtType, PassiveEff_ImmuneControlBuff, PassiveEff_MustSuperHit, PassiveEff_SkillInvalid, 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5507.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5507.py
new file mode 100644
index 0000000..955165f
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5507.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package Skill.PassiveTrigger.PassiveEff_5507
+#
+# @todo:触发释放技能(复活指定目标)
+# @author hxp
+# @date 2025-12-19
+# @version 1.0
+#
+# 详细描述: 触发释放技能(复活指定目标)
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2025-12-19 18:00"""
+#-------------------------------------------------------------------------------
+
+import TurnSkill
+import GameWorld
+
+def DoSkillEffectLogic(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs):
+    
+    passiveSkillID = curEffect.GetEffectValue(0) # 技能ID,为0时释放本技能
+    effHeroID = curEffect.GetEffectValue(1) # 指定目标武将ID
+    costHPPer = curEffect.GetEffectValue(2) # 可附加消耗自身血量百分比,配0不消耗,大于0血量不足时不释放
+    
+    if not effHeroID or not tagObj:
+        return
+    
+    if tagObj.IsAlive():
+        return
+    
+    tagHeroID = tagObj.GetHeroID()
+    if tagHeroID != effHeroID:
+        #GameWorld.DebugLogEx("5507非目标武将死亡不处理! tagHeroID=%s,effHeroID=%s", tagHeroID, effHeroID)
+        return
+    
+    if not passiveSkillID:
+        passiveSkillID = effSkill.GetSkillID()
+    if not passiveSkillID:
+        return
+    
+    tagID = tagObj.GetID()
+    if costHPPer:
+        curHP = batObj.GetHP()
+        maxHP = batObj.GetMaxHP()
+        costHP = maxHP * costHPPer / 100.0
+        if curHP < costHP:
+            GameWorld.DebugLogEx("5507自身血量不足,无法复活对方! curHP=%s/%s,costHPPer=%s,costHP=%s", curHP, maxHP, costHPPer, costHP)
+            return
+        GameWorld.DebugLogEx("5507扣血复活指定目标! curHP=%s/%s,costHPPer=%s,costHP=%s,tagHeroID=%s,tagID=%s", curHP, maxHP, costHPPer, costHP, tagHeroID, tagID)
+        batObj.SetHP(max(1, curHP - costHP), False) # 直接扣除
+    else:
+        GameWorld.DebugLogEx("5507直接复活指定目标! curHP=%s/%s,costHPPer=%s,costHP=%s,tagHeroID=%s,tagID=%s", curHP, maxHP, costHPPer, costHP, tagHeroID, tagID)
+        
+    effectID = curEffect.GetEffectID()
+    effSkillID = effSkill.GetSkillID()
+    return TurnSkill.OnUsePassiveSkill(turnFight, batObj, tagObj, passiveSkillID, connSkill, effSkillID, effectID, connBuff, **kwargs)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6029.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6029.py
new file mode 100644
index 0000000..842d3db
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6029.py
@@ -0,0 +1,46 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package Skill.PassiveTrigger.PassiveEff_6029
+#
+# @todo:提升技能战斗伤害(根据身上buff状态层数)
+# @author hxp
+# @date 2025-12-19
+# @version 1.0
+#
+# 详细描述: 提升技能战斗伤害(根据身上buff状态层数)
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2025-12-19 18:00"""
+#-------------------------------------------------------------------------------
+
+import TurnBuff
+import GameWorld
+
+def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs):
+    if "turnFight" not in skillkwargs:
+        return
+    turnFight = skillkwargs["turnFight"]
+    
+    buffState = curEffect.GetEffectValue(0) # buff状态
+    addPerList = curEffect.GetEffectValue(1) # [1层提升万分比, 2层, ...]
+    isDelBuff = curEffect.GetEffectValue(2) # 触发效果后是否扣除buff
+    if not addPerList:
+        return
+    
+    addPer = 0
+    layerTotal = 0
+    buffMgr = attacker.GetBuffManager()
+    for buff in buffMgr.FindBuffListByState(buffState):
+        layerTotal += max(1, buff.GetLayer())
+        if len(addPerList) >= layerTotal:
+            addPer = addPerList[layerTotal - 1]
+        else:
+            addPer = addPerList[-1]
+            
+        if isDelBuff:
+            TurnBuff.DoBuffDel(turnFight, attacker, buff, connSkill)
+            
+    GameWorld.DebugLogEx("6029战斗增伤: buffState=%s,layerTotal=%s,addPer=%s", buffState, layerTotal, addPer)
+    return addPer
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 552a4f0..6dcbf8b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
@@ -2000,6 +2000,7 @@
     aBatDamPer, dBatDamPerDef = 0, 0 # 战斗增减伤
     aBatDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.AttrID_BatDamPer, curSkill)
     aBatDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.PassiveEff_AddBatDamPerByTagLostHP, curSkill)
+    aBatDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.PassiveEff_AddBatDamPerByLayer, curSkill)
     
     # 物法增减伤
     if pmType == IPY_GameWorld.ghtMag: # 法伤

--
Gitblit v1.8.0