From 9bbff431b0f42a19ed6efe6b98164586b5984a20 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 20 一月 2026 15:55:00 +0800
Subject: [PATCH] 16 卡牌服务端(后台GM广播;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index dd620a5..427b682 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -585,6 +585,8 @@
                     ChConfig.AttrID_MaxHP:[gwIpyData.GetHPBase(), colorIpyData.GetHPPlus()],
                     ChConfig.AttrID_AtkSpeed:[gwIpyData.GetAtkSpeedBase(), colorIpyData.GetAtkSpeedPlus()],
                     }
+    batAttrBaseDict = gwIpyData.GetBatAttrBaseDict() # 其他战斗属性基础值字典,{属性ID:基础值, ...}
+    
     # 四维占比
     attrProportion = typeIpyData.GetBaseAttrProportion()
     
@@ -598,7 +600,7 @@
         itemLV = random.choice(randLVList)
     equipAttrDict[str(ShareDefine.Def_IudetItemLV)] = itemLV
     
-    GameWorld.DebugLog("生成命格卦玉: itemID=%s,itemLV=%s,itemColor=%s,itemType=%s" % (itemID, itemLV, itemColor, itemType), playerID)
+    GameWorld.DebugLog("生成命格卦玉: gwLV=%s,itemID=%s,itemLV=%s,itemColor=%s,itemType=%s" % (gwLV, itemID, itemLV, itemColor, itemType), playerID)
     legendAttrIDList = setAttrDict.get(str(ShareDefine.Def_IudetLegendAttrID))
     legendAttrValueList = setAttrDict.get(str(ShareDefine.Def_IudetLegendAttrValue))
     if legendAttrIDList != None and legendAttrValueList != None and len(legendAttrIDList) == len(legendAttrValueList):
@@ -607,8 +609,13 @@
     else:
         fixedAttrID = typeIpyData.GetFixedAttrID() # 固定属性
         attrIDLib = typeIpyData.GetAttrIDLib() # 随机属性库
-        libAttrCnt = colorIpyData.GetAttrLibCnt() # 随机属性个数
-        
+        libAttrCnt = 0 # 随机属性个数
+        libAttrCntNeedLVList = IpyGameDataPY.GetFuncEvalCfg("MinggeCfg", 1)
+        for needGWLV in libAttrCntNeedLVList:
+            if gwLV >= needGWLV:
+                libAttrCnt += 1
+            else:
+                break
         attrRangeDefault = colorIpyData.GetAttrRange()
         attrRangeDict = colorIpyData.GetAttrRangeDict()
         
@@ -630,12 +637,14 @@
                 
             # 其他战斗属性
             else:
+                baseValue = batAttrBaseDict.get(attrID, 0)
                 attrRange = attrRangeDict.get(attrID, attrRangeDefault)
                 if not attrRange or len(attrRange) != 2:
                     continue
                 attrMin, attrMax = attrRange
-                attrValue = random.randint(attrMin, attrMax)
-                GameWorld.DebugLog("        attrID=%s,attrValue=%s(%s~%s)" % (attrID, attrValue, attrMin, attrMax), playerID)
+                plusValue = random.randint(attrMin, attrMax)
+                attrValue = baseValue + plusValue
+                GameWorld.DebugLog("        attrID=%s,attrValue=%s,baseValue=%s,plusValue=%s,(%s~%s)" % (attrID, attrValue, baseValue, plusValue, attrMin, attrMax), playerID)
                 
             legendAttrIDList.append(attrID)
             legendAttrValueList.append(attrValue)

--
Gitblit v1.8.0