From 30dd8ff93a00ada8262a35da0ede9c2088a7fd37 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 23 九月 2025 16:52:52 +0800 Subject: [PATCH] 129 【战斗】战斗系统-服务端(诸葛亮技能; 目标细分增加攻击力最高5; buff状态增加军令19;增加效果6006增加本次技能万分比验证职业;增加效果5015集火攻击军令目标;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 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 2c03cc5..06c2a8d 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py @@ -652,7 +652,10 @@ ChConfig.AttrID_ParryRate:npcData.GetParryRate(), ChConfig.AttrID_ParryRateDef:npcData.GetParryRateDef(), ChConfig.AttrID_SuckHPPer:npcData.GetSuckHPPer(), ChConfig.AttrID_SuckHPPerDef:npcData.GetSuckHPPerDef(), } - batAttrDict.update(npcData.GetSpecAttrInfo()) + exAttrDict = npcData.GetSpecAttrInfo() + for attrIDStr, attrValue in exAttrDict.items(): + attrID = int(attrIDStr) + batAttrDict[attrID] = batAttrDict.get(attrID, 0) + attrValue battleDict = {"NPCID":npcID, "HeroID":heroID, @@ -747,7 +750,7 @@ heroID = heroInfo.get("HeroID", 0) skinID = heroInfo.get("SkinID", 0) lv = heroInfo.get("LV", 1) - specialty, atkDistType, country, sex = 0, 1, 0, 1 + specialty, atkDistType, country, sex, job = 0, 1, 0, 1, 0 heroIpyData = IpyGameDataPY.GetIpyGameData("Hero", heroID) if heroID else None if heroIpyData: objName = heroIpyData.GetName() @@ -755,6 +758,7 @@ atkDistType = heroIpyData.GetAtkDistType() country = heroIpyData.GetCountry() sex = heroIpyData.GetSex() + job = heroIpyData.GetJob() if lineupPlayerID: fightPower = heroInfo.get("FightPower", 0) @@ -786,6 +790,7 @@ batObj.SetSpecialty(specialty) batObj.SetCountry(country) batObj.SetSex(sex) + batObj.SetJob(job) batObj.SetHero(heroID, skinID) skillManager = batObj.GetSkillManager() @@ -1402,7 +1407,7 @@ #GameWorld.DebugLog(" 永久buff不处理! curID=%s,index=%s,skillID=%s" % (curID, index, skillID)) continue calcTimeline = buff.GetCalcTime() - passTurn = __calcPassturn(calcTimeline, nowTimeline, False) + passTurn = __calcPassturn(calcTimeline, nowTimeline, True) if passTurn <= 0: #GameWorld.DebugLog(" passTurn <= 0 passTurn=%s,calcTimeline=%s,nowTimeline=%s,skillID=%s" % (passTurn, calcTimeline, nowTimeline, skillID)) continue @@ -1421,7 +1426,7 @@ def __calcPassturn(calcTimeline, nowTimeline, equalOK): ## 计算已经过了的回合数 - # @param equalOK: 时间节点相同时是否算1回合,一般技能可以算,buff不算 + # @param equalOK: 时间节点相同时是否算1回合,一般技能可以算,buff可算可不算,具体看需求调整 calcTurnNum = calcTimeline / TimelineSet calcTimeNode = calcTimeline % TimelineSet nowTurnNum = nowTimeline / TimelineSet @@ -1511,7 +1516,7 @@ % (curID, tagID, skillID, hurtValue, lostHP, curBatObj.GetHP())) return -def OnObjAction(turnFight, curBatObj): +def OnObjAction(turnFight, curBatObj, isExtra=False): ## 战斗单位行动 if not curBatObj: return @@ -1527,12 +1532,12 @@ # 是否可行动状态判断 canAction = curBatObj.CanAction() if not canAction: - GameWorld.DebugLog("★回合%s %s 当前状态不可行动!" % (turnNum, objName)) + GameWorld.DebugLog("★回合%s %s 当前状态不可行动! isExtra=%s" % (turnNum, objName, isExtra)) return atk = curBatObj.GetAtk() curXP = curBatObj.GetXP() - GameWorld.DebugLog("★回合%s %s 行动 : atk=%s,curHP=%s/%s,curXP=%s" % (turnNum, objName, atk, curHP, curBatObj.GetMaxHP(), curXP)) + GameWorld.DebugLog("★回合%s %s %s行动 : atk=%s,curHP=%s/%s,curXP=%s" % (turnNum, objName, "额外" if isExtra else "", atk, curHP, curBatObj.GetMaxHP(), curXP)) turnFight.syncObjAction(turnNum, objID) TurnPassive.OnTriggerPassiveEffect(turnFight, curBatObj, ChConfig.TriggerWay_HeroActionStart) @@ -1559,7 +1564,7 @@ if SkillCommon.isAngerSkill(useSkill): if curXP < xpMax: continue - if curBatObj.IsInState(ChConfig.BatObjState_Sneer): + if curBatObj.CheckInState(ChConfig.BatObjState_Sneer): GameWorld.DebugLog("嘲讽状态下,无法主动释放怒技!") # 可被动释放怒技,如怒技追击 continue useCnt = -1 # xp技能优先释放 -- Gitblit v1.8.0