From 612f3073bac5ae286ddf5e5b9c76502bd54b0e57 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 08 一月 2026 20:55:13 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(主线装备掉落增加当前树等级最后一档品质必掉保底支持;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MainLevel.py | 8 +++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py | 17 ++++++++++++++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 4 +++-
PySysDB/PySysDBPY.h | 1 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 3 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 1 +
6 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 9e2be1a..0780048 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -2832,6 +2832,7 @@
list EquipColorRateList; //小怪产出装备品质概率列表,[0品质万分率, 1品质万分率, ...]
list EquipColorRateList1; //精英产出装备品质概率列表,[0品质万分率, 1品质万分率, ...]
list EquipColorRateList2; //boss产出装备品质概率列表,[0品质万分率, 1品质万分率, ...]
+ DWORD LastSureOutNeed; //最后一档保底必出
};
//历练秘笈
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 9fb48d0..0f729e4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3825,6 +3825,7 @@
#主线
Def_PDict_UnXiantaoCntExp = "UnXiantaoCntExp" # 累计未结算经验的战锤数
Def_PDict_UnXiantaoCntEquip = "UnXiantaoCntEquip" # 累计未结算装备掉落的战锤数
+Def_PDict_LastColorEquipLucky = "LastColorEquipLucky" # 最后一档品质必出幸运值
Def_PDict_UnXiantaoCntBooty = "UnXiantaoCntBooty_%s" # 累计未结算战利品掉落的战锤数,参数(itemID)
Def_PDict_BootyDropToday = "BootyDropToday_%s" # 今日已累计掉落战利品数量,参数(itemID)
Def_PDict_AppointDropEquipCnt = "AppointDropEquipCnt" # 定制掉落装备掉落第x次,只记录到配置的最高次数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MainLevel.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MainLevel.py
index 5b9be05..5ed9944 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MainLevel.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MainLevel.py
@@ -30,6 +30,7 @@
GameWorld.DebugAnswer(curPlayer, "设置主线: MainLevel 章节 关卡 波 [是否同波]")
GameWorld.DebugAnswer(curPlayer, "测试击杀: MainLevel k 消耗战锤数")
GameWorld.DebugAnswer(curPlayer, "重置掉落: MainLevel d 0 [是否清掉落背包]")
+ GameWorld.DebugAnswer(curPlayer, "设置保底: MainLevel d 当前保底幸运值")
GameWorld.DebugAnswer(curPlayer, "重置战利: MainLevel b 0")
GameWorld.DebugAnswer(curPlayer, "设置战利: MainLevel b 战利品ID 已掉落个数")
return
@@ -43,16 +44,21 @@
if value == "d":
unXiantao = gmList[1] if len(gmList) > 1 else 1
- if unXiantao == 0:
+ if unXiantao <= 0:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntExp, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntEquip, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AppointDropEquipCnt, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LastColorEquipLucky, 0)
GameLogic_MainLevel.ResetBootyDropToday(curPlayer)
clearDropPack = gmList[2] if len(gmList) > 2 else 0
if clearDropPack:
ClearPack.__DoLogic_Clear_Pack(curPlayer, IPY_GameWorld.rptIdentify)
GameWorld.DebugAnswer(curPlayer, "重置未结算战锤掉落OK!")
return
+
+ luckyValue = unXiantao
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LastColorEquipLucky, luckyValue)
+ GameWorld.DebugAnswer(curPlayer, "掉落保底幸运值: %s" % luckyValue)
return
if value == "b":
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
index 5cf0dc3..7f7dead 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
@@ -27,7 +27,6 @@
import ItemControler
import IPY_GameWorld
import NetPackCommon
-import PlayerBeauty
import PlayerArena
import PlayerLLMJ
import ItemCommon
@@ -257,12 +256,15 @@
dropAppointEquipDict = IpyGameDataPY.GetFuncEvalCfg("MainDropAppoint", 1, {})
appointDropCntMax = max(dropAppointEquipDict) if dropAppointEquipDict else 0
+ lastSureOutNeed = ipyData.GetLastSureOutNeed() # 最后一档保底必出
+
for index in range(dropEquipCnt):
bossType = bossTypeList[index % len(bossTypeList)]
if bossType not in bossTypeDropRateDict:
continue
colorRateList = bossTypeDropRateDict.get(bossType, [])
- GameWorld.DebugLog("bossType=%s,colorRateList=%s,totalRate=%s" % (bossType, colorRateList, totalRate), playerID)
+ lastColorEquipLucky = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LastColorEquipLucky)
+ GameWorld.DebugLog("lastColorEquipLucky=%s/%s,bossType=%s,colorRateList=%s,totalRate=%s" % (lastColorEquipLucky, lastSureOutNeed, bossType, colorRateList, totalRate), playerID)
setAttrDict = None
appointDropEquipCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AppointDropEquipCnt) + 1
@@ -278,7 +280,14 @@
setAttrDict[ShareDefine.Def_CItemKey_AppointID] = appointID
GameWorld.DebugLog("定制掉落第%s次: equipID=%s,setAttrDict=%s" % (appointDropEquipCnt, randEquipID, setAttrDict))
else:
- itemColor = GameWorld.GetResultByRandomList(colorRateList)
+ lastColor = colorRateList[-1][1]
+ if lastSureOutNeed and lastColorEquipLucky >= lastSureOutNeed:
+ itemColor = lastColor
+ GameWorld.DebugLog("保底必出最后一档品质: %s,lastColorEquipLucky=%s/%s" % (itemColor, lastColorEquipLucky, lastSureOutNeed))
+ else:
+ itemColor = GameWorld.GetResultByRandomList(colorRateList)
+ if itemColor == lastColor:
+ lastColorEquipLucky = 0
if not itemColor:
continue
equipIDList = NPCCommon.__GetEquipIDList(0, color=itemColor, placeList=ChConfig.Def_MainEquipPlaces, findType="MainEquipDrop")
@@ -294,6 +303,8 @@
if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, packIndexList=[IPY_GameWorld.rptIdentify]):
continue
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LastColorEquipLucky, lastColorEquipLucky)
+
unXiantaoCntEquip -= dropOneNeed
PlayerControl.SetUnXiantaoCntEquip(curPlayer, unXiantaoCntEquip)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntEquip, unXiantaoCntEquip)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index bb942f6..fda62e0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -2221,6 +2221,7 @@
("list", "EquipColorRateList", 0),
("list", "EquipColorRateList1", 0),
("list", "EquipColorRateList2", 0),
+ ("DWORD", "LastSureOutNeed", 0),
),
"LLMJ":(
@@ -5563,7 +5564,8 @@
def GetLVUPNeedTime(self): return self.attrTuple[2] # 升级下一级所需所需秒 DWORD
def GetEquipColorRateList(self): return self.attrTuple[3] # 小怪产出装备品质概率列表,[0品质万分率, 1品质万分率, ...] list
def GetEquipColorRateList1(self): return self.attrTuple[4] # 精英产出装备品质概率列表,[0品质万分率, 1品质万分率, ...] list
- def GetEquipColorRateList2(self): return self.attrTuple[5] # boss产出装备品质概率列表,[0品质万分率, 1品质万分率, ...] list
+ def GetEquipColorRateList2(self): return self.attrTuple[5] # boss产出装备品质概率列表,[0品质万分率, 1品质万分率, ...] list
+ def GetLastSureOutNeed(self): return self.attrTuple[6] # 最后一档保底必出 DWORD
# 历练秘笈
class IPY_LLMJ():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 44d4907..7e95c2f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -2803,6 +2803,9 @@
# 累加未结算战锤 - 经验
unXiantaoCntExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntExp)
NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntExp, unXiantaoCntExp + price)
+ # 累加最后一档品质装备保底
+ lastColorEquipLucky = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LastColorEquipLucky)
+ NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LastColorEquipLucky, lastColorEquipLucky + price)
# 累加未结算战锤 - 装备
AddUnXiantaoCntEquip(curPlayer, price)
# 累加未结算战锤 - 战利品
--
Gitblit v1.8.0