From ffb198b68f7e75f4fb2046189f1e7b2992d2ebac Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 15 九月 2025 14:41:24 +0800 Subject: [PATCH] 129 【战斗】战斗系统-服务端(于禁技能,支持格挡印记;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 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 c670c0e..3231fc0 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py @@ -1065,7 +1065,7 @@ aSuperDamPer, dSuperDamPerDef = 0, 0 if not isDot: isSuperHit = CanSuperHit(atkObj, defObj) # 是否暴击 - isParry = (isTurnNormalSkill and CanParry(atkObj, defObj)) # 是否格挡,仅针对普攻 + isParry = (isTurnNormalSkill and CanParry(turnFight, atkObj, defObj, curSkill)) # 是否格挡,仅针对普攻 isStun = CanStun(turnFight, atkObj, defObj, curSkill) # 是否击晕 if isSuperHit: @@ -1169,10 +1169,19 @@ TurnBuff.DoAddBuffBySkillID(turnFight, defObj, stunSkillID, atkObj, curSkill, afterLogic=True) return True -def CanParry(atkObj, defObj): +def CanParry(turnFight, atkObj, defObj, curSkill): if defObj.IsInControlled(): #被控制无法格挡 return False + + # 格挡印记 + buffMgr = defObj.GetBuffManager() + parryYJBuff = buffMgr.FindBuffByState(ChConfig.BatObjState_ParryYJ) + if parryYJBuff and parryYJBuff.GetLayer(): + GameWorld.DebugLog("格挡印记格挡了: buffID=%s,buffLayer=%s" % (parryYJBuff.GetBuffID(), parryYJBuff.GetLayer())) + TurnBuff.DecBuffLayer(turnFight, defObj, parryYJBuff, 1, curSkill.GetSkillID()) + return True + aParryRateDef = atkObj.GetBatAttrValue(ChConfig.AttrID_ParryRateDef) dParryRate = defObj.GetBatAttrValue(ChConfig.AttrID_ParryRate) parryNum = defObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnParryNum) -- Gitblit v1.8.0