129 【战斗】战斗系统-服务端(主线装备掉落增加当前树等级最后一档品质必掉保底支持;)
| | |
| | | list EquipColorRateList; //小怪产出装备品质概率列表,[0品质万分率, 1品质万分率, ...]
|
| | | list EquipColorRateList1; //精英产出装备品质概率列表,[0品质万分率, 1品质万分率, ...]
|
| | | list EquipColorRateList2; //boss产出装备品质概率列表,[0品质万分率, 1品质万分率, ...]
|
| | | DWORD LastSureOutNeed; //最后一档保底必出
|
| | | };
|
| | |
|
| | | //历练秘笈
|
| | |
| | | #主线
|
| | | 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次,只记录到配置的最高次数
|
| | |
| | | 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
|
| | |
| | |
|
| | | 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":
|
| | |
| | | import ItemControler
|
| | | import IPY_GameWorld
|
| | | import NetPackCommon
|
| | | import PlayerBeauty
|
| | | import PlayerArena
|
| | | import PlayerLLMJ
|
| | | import ItemCommon
|
| | |
| | | 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
|
| | |
| | | setAttrDict[ShareDefine.Def_CItemKey_AppointID] = appointID
|
| | | GameWorld.DebugLog("定制掉落第%s次: equipID=%s,setAttrDict=%s" % (appointDropEquipCnt, randEquipID, setAttrDict))
|
| | | else:
|
| | | 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")
|
| | |
| | | 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)
|
| | |
| | | ("list", "EquipColorRateList", 0),
|
| | | ("list", "EquipColorRateList1", 0),
|
| | | ("list", "EquipColorRateList2", 0),
|
| | | ("DWORD", "LastSureOutNeed", 0),
|
| | | ),
|
| | |
|
| | | "LLMJ":(
|
| | |
| | | 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 GetLastSureOutNeed(self): return self.attrTuple[6] # 最后一档保底必出 DWORD |
| | | |
| | | # 历练秘笈 |
| | | class IPY_LLMJ(): |
| | |
| | | # 累加未结算战锤 - 经验
|
| | | 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)
|
| | | # 累加未结算战锤 - 战利品
|