From b2d9d7914012c8932c823e19489c9c238ecc032a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 26 十二月 2025 18:33:25 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(张星彩所有技能;增加效果6033;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py | 2 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6033.py | 34 ++++++++++++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6011.py | 19 +++++++++++++------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 3 ++-
4 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 6af3bd9..95a71ac 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4087,10 +4087,11 @@
PassiveEff_LostHPProtect = 6030 # 掉血上限保护
PassiveEff_ImmuneControlDepBuff = 6031 # 某种buff状态层达到x时免疫减益控制效果
PassiveEff_AddCureMultiBySkillType = 6032 # 提升治疗技能最终治疗效果(根据目标buff类型层数)
+PassiveEff_ImmuneBadBuff = 6033 # 概率免疫buff类型(免疫添加,针对减益、控制、dot类)
# 被动效果ID有触发值时就返回的
PassiveEffHappenValueList = [PassiveEff_ChangeHurtType, PassiveEff_ImmuneControlBuff, PassiveEff_MustSuperHit, PassiveEff_SkillInvalid,
- PassiveEff_IgnoreShield]
+ PassiveEff_IgnoreShield, PassiveEff_ImmuneBadBuff]
# 被动效果ID触发值取最大值的
PassiveEffValueMaxList = [PassiveEff_ChangeHurtMulti]
# 被动效果ID触发值取最小值的
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6011.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6011.py
index 97b22e7..be6b8d7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6011.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6011.py
@@ -15,21 +15,28 @@
#"""Version = 2025-09-24 19:00"""
#-------------------------------------------------------------------------------
+import TurnBuff
def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs):
layerPer = curEffect.GetEffectValue(0) # 每层增加的万分比
buffStateList = curEffect.GetEffectValue(1) # buff状态 [状态1, 状态2, ...]
checkTag = curEffect.GetEffectValue(2) # buff检查自己还是对方: 0-自己,1-对方
+ isDelBuff = curEffect.GetEffectValue(3) # 触发效果后是否扣除buff
if not buffStateList:
return
+ if isDelBuff:
+ if "turnFight" not in skillkwargs:
+ return
+ turnFight = skillkwargs["turnFight"]
+
layerTotal = 0
- if checkTag:
- buffMgr = defender.GetBuffManager()
- else:
- buffMgr = attacker.GetBuffManager()
+ buffObj = defender if checkTag else attacker
+ buffMgr = buffObj.GetBuffManager()
for buffState in buffStateList:
- for buff in buffMgr.FindBuffListByState(buffState):
+ for buff in buffMgr.FindBuffListByState(buffState)[::-1]:
layerTotal += buff.GetLayer()
-
+ if isDelBuff:
+ TurnBuff.DoBuffDel(turnFight, buffObj, buff, connSkill)
+
return layerTotal * layerPer
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6033.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6033.py
new file mode 100644
index 0000000..c0d8bf4
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6033.py
@@ -0,0 +1,34 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package Skill.PassiveTrigger.PassiveEff_6033
+#
+# @todo:概率免疫buff类型(免疫添加,针对减益、控制、dot类)
+# @author hxp
+# @date 2025-12-26
+# @version 1.0
+#
+# 详细描述: 概率免疫buff类型(免疫添加,针对减益、控制、dot类)
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2025-12-26 19:00"""
+#-------------------------------------------------------------------------------
+
+import GameWorld
+
+def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs):
+ rate = curEffect.GetEffectValue(0) # 概率万分率
+ skillTypeList = curEffect.GetEffectValue(1) # 目标buff类型[类型1, 2, ...]
+
+ if skillTypeList:
+ if not connSkill:
+ return
+ if connSkill.GetSkillType() not in skillTypeList:
+ return
+
+ if not GameWorld.CanHappen(rate):
+ #GameWorld.DebugLogEx("概率不触发免疫该buff! skillID=%s,rate=%s", effSkill.GetSkillID(), rate)
+ return
+ GameWorld.DebugLogEx("概率触发免疫该buff! skillID=%s", effSkill.GetSkillID(), rate)
+ return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py
index bb79c0f..ff1fc7e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py
@@ -92,6 +92,8 @@
return
if TurnPassive.GetTriggerEffectValue(turnFight, batObj, buffOwner, ChConfig.PassiveEff_ImmuneControlDepBuff, buffSkill):
return
+ if TurnPassive.GetTriggerEffectValue(turnFight, batObj, buffOwner, ChConfig.PassiveEff_ImmuneBadBuff, buffSkill):
+ return
#被动触发免疫控制buff
if skillType == ChConfig.Def_SkillType_Action:
--
Gitblit v1.8.0