| | |
| | |
|
| | | # 仙玉寻宝
|
| | | else:
|
| | | costGoldList = IpyGameDataPY.GetFuncEvalCfg(TreasureSet1, 2) # 消耗仙玉列表
|
| | | costGoldList = IpyGameDataPY.GetFuncEvalCfg(TreasureSet1, 2) # 消耗货币列表
|
| | | costGoldType = IpyGameDataPY.GetFuncCfg(TreasureSet2, 4) # 消耗货币类型
|
| | | costGold = costGoldList[treasureIndex]
|
| | | if not costGold:
|
| | | GameWorld.ErrLog("该寻宝类型索引不支持消耗仙玉寻宝!treasureType=%s,treasureIndex=%s" % (treasureType, treasureIndex), playerID)
|
| | | return
|
| | |
|
| | | if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGold):
|
| | | if not PlayerControl.HaveMoney(curPlayer, costGoldType, costGold):
|
| | | return
|
| | |
|
| | | ipyData = IpyGameDataPY.InterpolationSearch("TreasureHouse", "MinLV", playerLV, {"TreasureType":treasureType})
|
| | |
| | | gridNumRateList = beSureCountDict[updTreasureCount]
|
| | | gridNum = GameWorld.GetResultByRandomList(gridNumRateList)
|
| | | GameWorld.DebugLog("到达次数必出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, gridNumRateList, gridNum), playerID)
|
| | | elif updTreasureCount % ensureCount == 0:
|
| | | elif updTreasureCount % ensureCount == 0 and ensureRateList:
|
| | | gridNumRateList = ensureRateList
|
| | | gridNum = GameWorld.GetResultByRandomList(gridNumRateList)
|
| | | GameWorld.DebugLog("满次数保底出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, gridNumRateList, gridNum), playerID)
|
| | |
| | |
|
| | | # 3. 次数保底
|
| | | ensureGridNumList = []
|
| | | if updTreasureCount / ensureCount > curTreasureCount / ensureCount:
|
| | | if updTreasureCount / ensureCount > curTreasureCount / ensureCount and ensureRateList:
|
| | | for gridInfo in ensureRateList:
|
| | | ensureGridNumList.append(gridInfo[1])
|
| | | gridNum = GameWorld.GetResultByRandomList(ensureRateList)
|
| | |
| | | PlayerControl.PayMoney(curPlayer, moneyType, lackCountCostMoney, ChConfig.Def_Cost_Treasure, infoDict, lackCount)
|
| | | else:
|
| | | infoDict = {"TreasureType":treasureType, "TreasureIndex":treasureIndex}
|
| | | PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGold, ChConfig.Def_Cost_Treasure, infoDict)
|
| | | GameWorld.DebugLog("扣除仙玉,costGold=%s" % costGold, playerID)
|
| | | PlayerControl.PayMoney(curPlayer, costGoldType, costGold, ChConfig.Def_Cost_Treasure, infoDict)
|
| | | GameWorld.DebugLog("扣除货币,costGoldType=%s,costGold=%s" % (costGoldType, costGold), playerID)
|
| | |
|
| | | # 加数据
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType, isFreeType), updTreasureCount)
|