From c35e176a3b05f745600c6e60f168313d2b9e7b30 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 17 九月 2025 12:00:19 +0800 Subject: [PATCH] 129 【战斗】战斗系统-服务端(司马懿技能;增加按层级结算持续buff效果5003;增加非按攻击力计算伤害支持;技能伤害增加可限制最大攻击力百分比上限配置;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py index 18ffeee..082ab50 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py @@ -265,7 +265,7 @@ @param turnNum: 第x回合 ''' self.timeline = timeline - GameWorld.DebugLog("时间节点更新: %s" % self.timeline) + GameWorld.DebugLog("[时间节点更新]: %s" % self.timeline) if isEmpty: # 空位置的节点可直接跳过 return timeline @@ -728,11 +728,9 @@ batObjMgr = BattleObj.GetBatObjMgr() initXP = IpyGameDataPY.GetFuncCfg("AngerXP", 1) - atkBackSkillIDList = IpyGameDataPY.GetFuncEvalCfg("ParryCfg", 2) for posNumKey, heroInfo in heroDict.items(): posNum = int(posNumKey) - atkBackSkillID = 0 # 反击技能ID fightPower = 0 skillIDList = [] # 战斗对象可能改变属性或技能,重新创建,防止误修改来源值 attrDict = {} @@ -744,6 +742,7 @@ lv = heroInfo.get("LV", 1) heroIpyData = IpyGameDataPY.GetIpyGameData("Hero", heroID) if heroID else None if heroIpyData: + specialty = heroIpyData.GetSpecialty() atkDistType = heroIpyData.GetAtkDistType() objName = heroIpyData.GetName() country = heroIpyData.GetCountry() @@ -759,6 +758,7 @@ if not npcDataEx: continue if not heroIpyData: + specialty = npcDataEx.GetSpecialty() atkDistType = npcDataEx.GetAtkDistType() objName = npcDataEx.GetNPCName() country = npcDataEx.GetCountry() @@ -779,16 +779,11 @@ batObj.SetFightPower(fightPower) batObj.SetLV(lv) batObj.SetAtkDistType(atkDistType) + batObj.SetSpecialty(specialty) batObj.SetCountry(country) batObj.SetSex(sex) batObj.SetHero(heroID, skinID) - if atkDistType == ChConfig.AtkDistType_Short: - atkBackSkillID = atkBackSkillIDList[0] if len(atkBackSkillIDList) > 0 else 0 - elif atkDistType == ChConfig.AtkDistType_Long: - atkBackSkillID = atkBackSkillIDList[1] if len(atkBackSkillIDList) > 1 else 0 - if atkBackSkillID: - skillIDList.append(atkBackSkillID) skillManager = batObj.GetSkillManager() skillManager.SkillReset() for skillID in skillIDList: @@ -818,6 +813,8 @@ GameWorld.DebugLog(" 已被击杀不处理! %s" % (objName)) continue GameWorld.DebugLog(" 重置武将: %s, HP:%s/%s, XP:%s" % (objName, batObj.GetHP(), batObj.GetMaxHP(), batObj.GetXP())) + + batObj.TurnReset() # 清除buff buffMgr = batObj.GetBuffManager() @@ -1170,7 +1167,7 @@ turnFight.syncState(FightState_Fighting) for faction, num in turnFight.actionSortList: - GameWorld.DebugLog("回合开始逻辑: turnNum=%s,faction=%s, num=%s" % (turnNum, faction, num)) + GameWorld.DebugLog("大回合开始逻辑: turnNum=%s,faction=%s, num=%s" % (turnNum, faction, num)) batFaction = turnFight.getBatFaction(faction) batLineup = batFaction.getBatlineup(num) batLineup.actionNum = 1 @@ -1261,7 +1258,7 @@ # 回合开始 for faction, num in turnFight.actionSortList: - GameWorld.DebugLog("回合开始逻辑: turnNum=%s,faction=%s, num=%s" % (turnNum, faction, num)) + GameWorld.DebugLog("大回合开始逻辑: turnNum=%s,faction=%s, num=%s" % (turnNum, faction, num)) batFaction = turnFight.getBatFaction(faction) batLineup = batFaction.getBatlineup(num) batLineup.actionNum = 1 @@ -1468,6 +1465,7 @@ if batObj.GetHP() <= 0: return + GameWorld.DebugLog("---[武将回合开始时] : curID=%s,curHP=%s/%s" % (batObj.GetID(), batObj.GetHP(), batObj.GetMaxHP())) TurnPassive.OnTriggerPassiveEffect(turnFight, batObj, ChConfig.TriggerWay_HeroTurnStart) return -- Gitblit v1.8.0