From 49cfc84f644219fefb382215e1765a8fd81fde48 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 25 九月 2025 09:49:52 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(甘宁技能;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
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 5492ff9..12a06ea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
@@ -976,7 +976,8 @@
# return
enhanceSkillID = curEffect.GetEffectValue(0)
checkInStateList = curEffect.GetEffectValue(1)
- GameWorld.DebugLog("额外触发的技能: enhanceSkillID=%s,checkInStateList=%s" % (enhanceSkillID, checkInStateList))
+ checkHeroJob = curEffect.GetEffectValue(2)
+ GameWorld.DebugLog("额外触发的技能: enhanceSkillID=%s,checkInStateList=%s,checkHeroJob=%s" % (enhanceSkillID, checkInStateList, checkHeroJob))
tagObjList = useSkill.GetTagObjList()
enhanceSkillData = IpyGameDataPY.GetIpyGameData("Skill", enhanceSkillID)
@@ -1001,6 +1002,9 @@
if not tagObj.CheckInState(checkInStateList):
GameWorld.DebugLog(" 不在状态下不触发: tagID=%s not in state:%s" % (tagID, checkInStateList))
continue
+ if checkHeroJob and checkHeroJob != tagObj.GetJob():
+ GameWorld.DebugLog(" 非目标职业不触发: tagID=%s,job=%s != %s" % (tagID, tagObj.GetJob(), checkHeroJob))
+ continue
if enhanceRate and enhanceRate != ChConfig.Def_MaxRateValue and not GameWorld.CanHappen(enhanceRate, ChConfig.Def_MaxRateValue):
GameWorld.DebugLog(" 概率不触发: tagID=%s,enhanceRate=%s" % (tagID, enhanceRate))
continue
@@ -1014,14 +1018,21 @@
# 只执行一次,防止群攻时额外触发多次
GameWorld.DebugLog("重新锁定目标! enhanceSkillID=%s" % enhanceSkillID)
- if checkInStateList:
- inState = False
+ if checkInStateList or checkHeroJob:
+ inState, haveJob = False, False
for tagObj in tagObjList:
- if tagObj.CheckInState(checkInStateList):
+ tagID = tagObj.GetID()
+ if tagID in effIgnoreObjIDList:
+ continue
+ if not inState and tagObj.CheckInState(checkInStateList):
inState = True
- break
- if not inState:
- GameWorld.DebugLog(" 没有目标在状态下不触发: tagObj not in state:%s" % str(checkInStateList))
+ if not haveJob and checkHeroJob and checkHeroJob == tagObj.GetJob():
+ haveJob = True
+ if checkInStateList and not inState:
+ GameWorld.DebugLog(" 没有命中目标在状态下不触发: tagObj not in state:%s" % str(checkInStateList))
+ return
+ if checkHeroJob and not haveJob:
+ GameWorld.DebugLog(" 没有命中目标为目标职业不触发: checkHeroJob=%s" % checkHeroJob)
return
OnUseSkill(turnFight, curBatObj, enhanceSkillData, batType=ChConfig.TurnBattleType_Enhance, bySkill=useSkill)
return
--
Gitblit v1.8.0