From b100e60651bd69472519d964f2e225148cfe7774 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 20 一月 2026 18:27:05 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(命格青龙、白虎调整为光环技能;优化光环技能支持层级;增加出发方式60-冰冻目标时;优化触发方式受控时、敌方受控时触发时机,解决受控触发被动导致的技能标签嵌套顺序问题;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py |   45 ++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 38 insertions(+), 7 deletions(-)

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 69775c1..256b80d 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,19 @@
     dropAppointEquipDict = IpyGameDataPY.GetFuncEvalCfg("MainDropAppoint", 1, {})
     appointDropCntMax = max(dropAppointEquipDict) if dropAppointEquipDict else 0
     
+    lastSureOutNeed = ipyData.GetLastSureOutNeed() # 最后一档保底必出
+    lastColorCnt = IpyGameDataPY.GetFuncCfg("ItemRecordEquip", 1) # 有产出的最后几个品质需要记录
+    
     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)
+        lastColor = colorRateList[-1][1]
+        needRecordColorMin = lastColor - lastColorCnt + 1
+        GameWorld.DebugLog("lastColorEquipLucky=%s/%s,bossType=%s,lastColor=%s,colorRateList=%s,totalRate=%s" 
+                           % (lastColorEquipLucky, lastSureOutNeed, bossType, lastColor, colorRateList, totalRate), playerID)
         
         setAttrDict = None
         appointDropEquipCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AppointDropEquipCnt) + 1
@@ -278,7 +284,13 @@
                 setAttrDict[ShareDefine.Def_CItemKey_AppointID] = appointID
             GameWorld.DebugLog("定制掉落第%s次: equipID=%s,setAttrDict=%s" % (appointDropEquipCnt, randEquipID, setAttrDict))
         else:
-            itemColor = GameWorld.GetResultByRandomList(colorRateList)
+            if lastSureOutNeed and lastColorEquipLucky >= lastSureOutNeed:
+                itemColor = lastColor
+                GameWorld.DebugLog("保底必出最后一档品质: %s,lastColorEquipLucky=%s/%s" % (itemColor, lastColorEquipLucky, lastSureOutNeed))
+            else:
+                itemColor = GameWorld.GetResultByRandomList(colorRateList)
+            if itemColor == lastColor or not lastSureOutNeed:
+                lastColorEquipLucky = 0
             if not itemColor:
                 continue
             equipIDList = NPCCommon.__GetEquipIDList(0, color=itemColor, placeList=ChConfig.Def_MainEquipPlaces, findType="MainEquipDrop")
@@ -291,8 +303,11 @@
             continue
         curItem.SetIsBind(1) # 为1时代表是掉落
         #GameWorld.DebugLog("掉落装备: randEquipID=%s,%s" % (randEquipID, curItem.GetGUID()), playerID)
-        if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, packIndexList=[IPY_GameWorld.rptIdentify]):
+        isForceDR = curItem.GetItemColor() >= needRecordColorMin # 记录流向
+        if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, event=["MainDrop", isForceDR, {}], packIndexList=[IPY_GameWorld.rptIdentify]):
             continue
+        
+        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LastColorEquipLucky, lastColorEquipLucky)
         
         unXiantaoCntEquip -= dropOneNeed
         PlayerControl.SetUnXiantaoCntEquip(curPlayer, unXiantaoCntEquip)
@@ -318,7 +333,7 @@
     atkObj = None
     batFactionA = turnFight.getBatFaction(ChConfig.Def_FactionA)
     batLineup = batFactionA.getBatlineup(1)
-    for objID in batLineup.posObjIDDict.values():
+    for objID in batLineup.getBatHeroObjIDList():
         atkObj = batObjMgr.getBatObj(objID)
         if atkObj.IsAlive():
             break
@@ -334,7 +349,7 @@
     killObjList = []
     batFactionB = turnFight.getBatFaction(ChConfig.Def_FactionB)
     batLineup = batFactionB.getBatlineup(1)
-    for objID in batLineup.posObjIDDict.values():
+    for objID in batLineup.getBatHeroObjIDList():
         tagObj = batObjMgr.getBatObj(objID)
         if tagObj.IsAlive():
             killObjList.append(tagObj)
@@ -447,6 +462,21 @@
     if not moneyType or not moneyBase:
         return
     
+    # 砍树类主线装备独立流向规则:暂时只记录分解,按祝福树对应品质列表记录
+    treeLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV)
+    ipyData = IpyGameDataPY.GetIpyGameData("TreeLV", treeLV)
+    needRecordColorMin = 0
+    if ipyData:
+        lastColorCnt = IpyGameDataPY.GetFuncCfg("ItemRecordEquip", 1) # 有产出的最后几个品质需要记录
+        equipColorRateList = ipyData.GetEquipColorRateList()
+        lastColor = len(equipColorRateList)
+        for colorRate in equipColorRateList[::-1]:
+            if colorRate:
+                break
+            lastColor -= 1
+        needRecordColorMin = lastColor - lastColorCnt + 1
+        #GameWorld.DebugLogEx("treeLV=%s,rateLen=%s,lastColor=%s,needRecordColorMin=%s", treeLV, len(equipColorRateList), lastColor, needRecordColorMin, playerID)
+        
     decomposeMoney = moneyBase
     mjExPer, exRemain = PlayerLLMJ.GetAddDecomposePer(curPlayer)
     mjEx = int(decomposeMoney * mjExPer / 100.0)
@@ -478,7 +508,8 @@
         GameWorld.DebugLog("    itemIndex=%s,decomposeMoney=%s,mjEx=%s,exRemain=%s,总:%s" 
                            % (itemIndex, decomposeMoney, mjEx, exRemain, moneyTotal), playerID)
         
-        ItemCommon.DelItem(curPlayer, curEquip, curEquip.GetCount(), True, ChConfig.ItemDel_EquipDecompose)
+        isForceDR = curEquip.GetItemColor() >= needRecordColorMin # 记录分解流向
+        ItemCommon.DelItem(curPlayer, curEquip, curEquip.GetCount(), True, ChConfig.ItemDel_EquipDecompose, isForceDR=isForceDR)
         decomposeCnt += 1
         
     if not moneyTotal:

--
Gitblit v1.8.0