| | |
| | | maxLuck = max(luckyValueList) if luckyValueList else 0 # 满幸运值
|
| | | updLuck = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureLuck % (treasureType)) # 当前幸运值
|
| | | GameWorld.DebugLog("updLuck=%s,maxLuck=%s,setLuckyGridNum=%s,luckyItemRateDict=%s" % (updLuck, maxLuck, setLuckyGridNum, luckyItemRateDict), playerID)
|
| | | |
| | | if treasureType in TreasureType_HeroCallList and not PlayerGoldInvest.GetInvestState(curPlayer, ChConfig.InvestType_Life):
|
| | | addLuck = 0
|
| | | GameWorld.DebugLog("终身卡未开通,武将招募不增加幸运", playerID)
|
| | | |
| | | curTreasureCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCount % (treasureType)) # 当前已寻宝次数
|
| | | updTreasureCount = curTreasureCount
|
| | |
|
| | |
| | |
|
| | | # 单抽产出优先级: 幸运物品 > 必出 > 保底 > 普通
|
| | | # 连抽没有优先级限制,只要满足条件即可产出
|
| | | luckyOut = False # 幸运物品理论产出状态,不一定是真实产出,可能受终身卡限制
|
| | | getGridResult = []
|
| | | for tIndex in range(treasureCount):
|
| | | updLuck = min(updLuck + addLuck, maxLuck)
|
| | |
| | |
|
| | | # 满幸运必出
|
| | | if not curRateList and stageLuck and updLuck >= stageLuck and luckItemRateList:
|
| | | luckyOut = True
|
| | | if treasureType in TreasureType_HeroCallList and not PlayerGoldInvest.GetInvestState(curPlayer, ChConfig.InvestType_Life):
|
| | | GameWorld.DebugLog(" 【满幸运必出饼图】: 终身卡未开通,武将招募幸运不产出", playerID)
|
| | | else:
|
| | | curRateList = GetRemoveLimitGridRateList(luckItemRateList, gridNumCountInfo, gridNumMaxLimitInfo)
|
| | | GameWorld.DebugLog(" 【满幸运必出饼图】: %s" % curRateList, playerID)
|
| | | |
| | | curRateList = GetRemoveLimitGridRateList(luckItemRateList, gridNumCountInfo, gridNumMaxLimitInfo)
|
| | | GameWorld.DebugLog(" 【满幸运必出饼图】: %s" % curRateList, playerID)
|
| | | |
| | | # 次数必出
|
| | | if not curRateList and updTreasureCount in beSureCountDict:
|
| | | besureGridRateList = beSureCountDict[updTreasureCount]
|
| | |
| | |
|
| | | getGridResult.append(gridNum)
|
| | | GameWorld.DebugLog(" 本次产出: gridNum=%s, %s, doCount=%s" % (gridNum, getGridResult, doCount), playerID)
|
| | | if gridNum in luckyGridNumList or luckyOut:
|
| | | luckyOut = False
|
| | | if gridNum in luckyGridNumList and addLuck:
|
| | | if gridNum == setLuckyGridNum or updLuck >= maxLuck:
|
| | | updLuck = 0
|
| | | else:
|
| | | updLuck = stageLuck # 直接切换到下一阶段幸运
|
| | | if gridNum in luckyGridNumList:
|
| | | GameWorld.DebugLog(" 【产出幸运格子】: gridNum=%s,updLuck=%s" % (gridNum, updLuck), playerID)
|
| | | else:
|
| | | GameWorld.DebugLog(" 【理论产出幸运格子,实际没有产出】: gridNum=%s,updLuck=%s,luckyGridNumList=%s" % (gridNum, updLuck, luckyGridNumList), playerID)
|
| | | GameWorld.DebugLog(" 【产出幸运格子】: gridNum=%s,updLuck=%s" % (gridNum, updLuck), playerID)
|
| | | if wishLibID:
|
| | | GameWorld.DebugLog(" 【产出的是心愿库物品】: gridNum=%s,wishLibID=%s" % (gridNum, wishLibID), playerID)
|
| | |
|