From e326cb341ae3562edd549b13bd654102cad29aba Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 31 十二月 2025 16:05:49 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(等级参考值支持多个模版,原等级表参考值去除改为配置在等级参考值表;阵容表增加对应的等级参考值模版ID字段;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 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 7b0a141..5dda203 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -786,19 +786,20 @@
npcLV = npcData.GetLV()
star, breakLV, awakeLV = 0, 0, 0
- lvIpyData = None
+ reModelID = lineupIpyData.GetReModelID()
+ lvReIpyData = None
heroIpyData = IpyGameDataPY.GetIpyGameData("Hero", heroID) if heroID else None
npcStronger = IpyGameDataPY.GetIpyGameDataNotLog("NPCStronger", npcID)
if npcStronger and strongerLV:
- lvIpyData = IpyGameDataPY.GetIpyGameData("PlayerLV", strongerLV)
- if lvIpyData:
+ lvReIpyData = IpyGameDataPY.GetIpyGameData("LVReValue", reModelID, strongerLV)
+ if lvReIpyData:
npcLV = strongerLV
- if not lvIpyData:
- lvIpyData = IpyGameDataPY.GetIpyGameData("PlayerLV", npcLV)
- if lvIpyData:
- star = lvIpyData.GetReHeroStar()
- breakLV = lvIpyData.GetReHeroBreakLV()
- awakeLV = lvIpyData.GetReHeroAwakeLV()
+ if not lvReIpyData:
+ lvReIpyData = IpyGameDataPY.GetIpyGameData("LVReValue", reModelID, npcLV)
+ if lvReIpyData:
+ star = lvReIpyData.GetReHeroStar()
+ breakLV = lvReIpyData.GetReHeroBreakLV()
+ awakeLV = lvReIpyData.GetReHeroAwakeLV()
if heroIpyData:
skinIDList = heroIpyData.GetSkinIDList()
skinID = skinIDList[0] if skinIDList else 0
@@ -822,7 +823,7 @@
GameWorld.DebugLogEx("阵容boss技能: %s, 随机附加技能: %s", skillIDList, randSkillIDExList)
# 成长怪属性
- batAttrDict = GetNPCStrongerAttrDict(npcID, lvIpyData, npcStronger, difficulty)
+ batAttrDict = GetNPCStrongerAttrDict(npcID, lvReIpyData, npcStronger, difficulty)
if not batAttrDict:
batAttrDict = {ChConfig.AttrID_Atk:npcData.GetAtk(), ChConfig.AttrID_Def:npcData.GetDef(), ChConfig.AttrID_MaxHP:npcData.GetMaxHP(),
ChConfig.AttrID_FinalDamPer:npcData.GetFinalDamPer(), ChConfig.AttrID_FinalDamPerDef:npcData.GetFinalDamPerDef(),
@@ -849,7 +850,7 @@
"SkillIDList":skillIDList,
}
- GameWorld.DebugLogEx("GetNPCBattleDict npcID=%s,strongerLV=%s,difficulty=%s,%s", npcID, strongerLV, difficulty, battleDict)
+ GameWorld.DebugLogEx("GetNPCBattleDict npcID=%s,strongerLV=%s,difficulty=%s,reModelID=%s,%s", npcID, strongerLV, difficulty, reModelID, battleDict)
return battleDict
def GetNPCHeroSkillIDList(heroID, heroIpyData, breakLV, awakeLV):
@@ -878,23 +879,23 @@
return skillIDList
-def GetNPCStrongerAttrDict(npcID, lvIpyData, npcStronger, difficulty):
+def GetNPCStrongerAttrDict(npcID, lvReIpyData, npcStronger, difficulty):
## 获取NPC成长属性
# @param strongerLV: 成长等级
# @param difficulty: 难度系数
batAttrDict = {}
- if not lvIpyData or not npcStronger or not difficulty:
+ if not lvReIpyData or not npcStronger or not difficulty:
return batAttrDict
- lv = lvIpyData.GetLV()
+ lv = lvReIpyData.GetLV()
for attrID in ChConfig.CalcBattleAttrIDList:
attrIpyData = IpyGameDataPY.GetIpyGameData("PlayerAttr", attrID)
if not attrIpyData:
continue
attrName = attrIpyData.GetParameter()
- if not hasattr(lvIpyData, "GetRe%s" % attrName):
+ if not hasattr(lvReIpyData, "GetRe%s" % attrName):
continue
- reValue = getattr(lvIpyData, "GetRe%s" % attrName)() # 基础参考值
+ reValue = getattr(lvReIpyData, "GetRe%s" % attrName)() # 基础参考值
ratio = getattr(npcStronger, "Get%sRatio" % attrName)() if hasattr(npcStronger, "Get%sRatio" % attrName) else 1 # 属性系数
attrValue = int(reValue * ratio * difficulty)
batAttrDict[attrID] = attrValue
--
Gitblit v1.8.0