From d4767f3364c5726073c072098864884f97cededc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 09 一月 2026 16:00:11 +0800
Subject: [PATCH] 412 【挑战】定军阁-服务端(修复定军阁最后一个待选处理后不会重置待选区bug;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_5507.py | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
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
index 85a4eff..1099427 100644
--- 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
@@ -22,24 +22,25 @@
def DoSkillEffectLogic(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs):
passiveSkillID = curEffect.GetEffectValue(0) # 技能ID,为0时释放本技能
- effHeroID = curEffect.GetEffectValue(1) # 指定目标武将ID
+ effHeroID = curEffect.GetEffectValue(1) # 指定目标武将ID,0时为来源友军目标
costHPPer = curEffect.GetEffectValue(2) # 可附加消耗自身血量百分比,配0不消耗,大于0血量不足时不释放
searchFrom = curEffect.GetEffectValue(3) # 目标武将ID是否从阵容中搜索
tagHero = tagObj
- if searchFrom:
- batLineup = batObj.GetBatLineup()
- tagHero = batLineup.getHeroObj(effHeroID)
+ if effHeroID:
+ if searchFrom:
+ batLineup = batObj.GetBatLineup()
+ tagHero = batLineup.getHeroObj(effHeroID)
+
+ if not tagHero:
+ return
- if not effHeroID or not tagHero:
- return
-
+ tagHeroID = tagHero.GetHeroID()
+ if tagHeroID != effHeroID:
+ GameWorld.DebugLogEx("5507非目标武将死亡不处理! tagHeroID=%s,effHeroID=%s", tagHeroID, effHeroID)
+ return
+
if tagHero.IsAlive():
- return
-
- tagHeroID = tagHero.GetHeroID()
- if tagHeroID != effHeroID:
- #GameWorld.DebugLogEx("5507非目标武将死亡不处理! tagHeroID=%s,effHeroID=%s", tagHeroID, effHeroID)
return
if not passiveSkillID:
@@ -51,6 +52,7 @@
GameWorld.DebugLogEx("5507目标被禁止复活不处理! tagHeroID=%s", tagHeroID)
return
+ tagHeroID = tagHero.GetHeroID()
tagID = tagHero.GetID()
if costHPPer:
curHP = batObj.GetHP()
@@ -59,8 +61,9 @@
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), True) # 直接扣除
+ updHP = curHP - costHP
+ GameWorld.DebugLogEx("5507扣血复活指定目标! curHP=%s/%s,costHPPer=%s,costHP=%s,updHP=%s,tagHeroID=%s,tagID=%s", curHP, maxHP, costHPPer, costHP, updHP, tagHeroID, tagID)
+ batObj.SetHP(updHP, True) # 直接扣除
else:
GameWorld.DebugLogEx("5507直接复活指定目标! tagHeroID=%s,tagID=%s,searchFrom=%s", tagHeroID, tagID, searchFrom)
--
Gitblit v1.8.0