From d254a370d14e560470889eb69537bd21532bc254 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 02 三月 2026 18:58:56 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(郭嘉所有技能;增加触发类型62、63、64、65;增加效果6038;增加技能类型16-减益光环,对自己无效,原类型10为增益光环对自己有效;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py | 62 +++++++++++++++++-------------
1 files changed, 35 insertions(+), 27 deletions(-)
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 46afd48..8276896 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnBuff.py
@@ -104,7 +104,7 @@
#光环技能,默认施法者身上也必须有,时长与施法者身上的同步
haloSrcBuff = None # 光源buff
- if skillType == ChConfig.Def_SkillType_Halo and ownerID != curID:
+ if skillType in ChConfig.Def_HaloSkill_List and ownerID != curID:
haloSrcBuff = buffOwner.GetBuffManager().FindBuffBySkillID(skillID, ownerID)
if not haloSrcBuff:
GameWorld.ErrLog("添加光环技能时找不到光源! skillID=%s,ownerID=%s" % (skillID, ownerID))
@@ -244,7 +244,7 @@
if curBuffState:
buffMgr.AddBuffState(curBuffState, buffID)
- if skillType == ChConfig.Def_SkillType_Halo:
+ if skillType in ChConfig.Def_HaloSkill_List:
__addHaloBuffEffObjID(curID, buff, skillID, ownerID, haloSrcBuff)
if afterLogic and buffSkill:
@@ -313,6 +313,7 @@
RefreshBuffAttr(batObj)
if refreshType in [1, 2] and skillData.GetCurBuffState() == ChConfig.BatObjState_Frozen:
+ batObj.SetBeFrozenCnt(batObj.GetBeFrozenCnt() + 1) # 后面加的通用逻辑,原司马懿的暂不动代码
__smyRecordEnemyFrozen(turnFight, batObj, curBuff)
return
@@ -377,7 +378,7 @@
curBuff.SetRemainTime(remainTime)
SyncBuffRefresh(turnFight, batObj, curBuff)
- if skillType == ChConfig.Def_SkillType_Halo and ownerID == buffObjID:
+ if skillType in ChConfig.Def_HaloSkill_List and ownerID == buffObjID:
haloObjIDList = curBuff.GetHaloObjIDList()
GameWorld.DebugLogEx("光环buff回合变更同步其他有效目标该光环: skillID=%s,ownerID=%s,haloObjIDList=%s", skillID, ownerID, haloObjIDList)
batObjMgr = BattleObj.GetBatObjMgr()
@@ -480,7 +481,7 @@
if isRefreshAttr and not noRefreshAttr:
RefreshBuffAttr(batObj)
- if skillType == ChConfig.Def_SkillType_Halo and ownerID == buffObjID:
+ if skillType in ChConfig.Def_HaloSkill_List and ownerID == buffObjID:
haloObjIDList = curBuff.GetHaloObjIDList()
GameWorld.DebugLogEx("光环buff删除同步删除其他有效目标该光环: skillID=%s,ownerID=%s,haloObjIDList=%s", skillID, ownerID, haloObjIDList)
batObjMgr = BattleObj.GetBatObjMgr()
@@ -550,30 +551,32 @@
if isRefreshAttr:
RefreshBuffAttr(batObj)
-
- # 重新添加本阵营有效光环
+
+ # 重新添加有效光环
batObjMgr = BattleObj.GetBatObjMgr()
- batLineup = batObj.GetTFBatLineup()
- for tagObjID in batLineup.getAllPosObjIDList():
- tagObj = batObjMgr.getBatObj(tagObjID)
- if not tagObj.IsAlive():
- continue
- tagBuffMgr = tagObj.GetBuffManager()
- for index in range(tagBuffMgr.GetBuffCount()):
- buff = tagBuffMgr.GetBuffByIndex(index)
- haloObjIDList = buff.GetHaloObjIDList()
- if not haloObjIDList or objID not in haloObjIDList:
+ for faction, num in turnFight.actionSortList:
+ batFaction = turnFight.getBatFaction(faction)
+ batLineup = batFaction.getBatlineup(num)
+ for tagObjID in batLineup.getAllPosObjIDList():
+ tagObj = batObjMgr.getBatObj(tagObjID)
+ if not tagObj.IsAlive():
continue
- if buff.GetOwnerID() != tagObjID:
- # 非光源
- continue
- haloSkillID = buff.GetSkillID()
- GameWorld.DebugLogEx("复活后重新添加本阵营光环: objID=%s,ownerID=%s,haloSkillID=%s", objID, tagObjID, haloSkillID)
- haloSkill = tagObj.GetSkillManager().FindSkillByID(haloSkillID)
- if not haloSkill:
- DoAddBuffBySkillID(turnFight, batObj, haloSkillID, buffOwner=tagObj)
- continue
- OnAddBuff(turnFight, batObj, haloSkill, buffOwner=tagObj)
+ tagBuffMgr = tagObj.GetBuffManager()
+ for index in range(tagBuffMgr.GetBuffCount()):
+ buff = tagBuffMgr.GetBuffByIndex(index)
+ haloObjIDList = buff.GetHaloObjIDList()
+ if not haloObjIDList or objID not in haloObjIDList:
+ continue
+ if buff.GetOwnerID() != tagObjID:
+ # 非光源
+ continue
+ haloSkillID = buff.GetSkillID()
+ GameWorld.DebugLogEx("复活后重新添加光环: objID=%s,ownerID=%s,haloSkillID=%s", objID, tagObjID, haloSkillID)
+ haloSkill = tagObj.GetSkillManager().FindSkillByID(haloSkillID)
+ if not haloSkill:
+ DoAddBuffBySkillID(turnFight, batObj, haloSkillID, buffOwner=tagObj)
+ continue
+ OnAddBuff(turnFight, batObj, haloSkill, buffOwner=tagObj)
# 光源重新添加有效光环,根据光源是否还有效规则优化,待处理
return
@@ -632,7 +635,12 @@
buff = buffMgr.GetBuffByIndex(index)
layer = max(1, buff.GetLayer())
skillData = buff.GetSkillData()
-
+ skillType = skillData.GetSkillType()
+ if skillType == ChConfig.Def_SkillType_HaloDep:
+ if buff.GetOwnerID() == objID:
+ #GameWorld.DebugLogEx(" 减益光环对自己无效! buffSkillID=%s", skillData.GetSkillID(), objID)
+ continue
+
effExDict = buff.GetEffectExDict()
for effCalcInfo, effValueEx in effExDict.items():
effID, calcType = effCalcInfo
--
Gitblit v1.8.0