| | |
| | | if passTime < alchemyIpyData.GetNeedTime():
|
| | | GameWorld.DebugLog('开炉丹药,时间未到 passTime=%s' % passTime)
|
| | | return
|
| | | alchemyCommonCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyCommonCnt)
|
| | | alchemyQuality = alchemyIpyData.GetAlchemyQuality()
|
| | | appointInfo = [] #定制配置 [数量,成功率]
|
| | | alchemyCustomizedDict = IpyGameDataPY.GetFuncEvalCfg('alchemyCustomized', 1, {})
|
| | | if alchemyID in alchemyCustomizedDict:
|
| | | alchemyCnt = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_AlchemyCnt, alchemyID, False)
|
| | | alchemyCntDict = alchemyCustomizedDict[alchemyID]
|
| | | if alchemyCnt + 1 in alchemyCntDict:
|
| | | appointInfo = alchemyCntDict[alchemyCnt + 1]
|
| | |
|
| | | |
| | | #成功率
|
| | | if alchemType == DefStoveType2:
|
| | | if appointInfo:
|
| | | successRate = appointInfo[1]
|
| | | elif alchemType == DefStoveType2:
|
| | | successRate = ShareDefine.Def_MaxRateValue #仙丹必定成功
|
| | | elif alchemType == DefStoveType1:
|
| | | #灵丹成功率公式 参数 curLuckValue:慧根 alchemyLV:炼丹等级 alchemyQuality:丹药等级 qualityNeedLuck:要求慧根
|
| | | alchemyCustomizedDict = IpyGameDataPY.GetFuncEvalCfg('alchemyCustomized', 1, {})
|
| | | if alchemyCommonCnt + 1 in alchemyCustomizedDict:
|
| | | successRate = alchemyCustomizedDict[alchemyCommonCnt + 1][1]
|
| | | else:
|
| | | qualityNeedLuck = IpyGameDataPY.GetFuncEvalCfg('alchemySuccess', 2, {}).get(str(alchemyQuality), 0)
|
| | | successRate = eval(IpyGameDataPY.GetFuncCompileCfg('alchemySuccess'))
|
| | | else:
|
| | |
| | | if alchemType == DefStoveType2:
|
| | | resultCnt = 1 #仙丹必定为1
|
| | | elif alchemType == DefStoveType1:
|
| | | if alchemyCommonCnt + 1 in alchemyCustomizedDict:
|
| | | resultCnt = alchemyCustomizedDict[alchemyCommonCnt + 1][0]
|
| | | if appointInfo:
|
| | | resultCnt = appointInfo[0]
|
| | | else:
|
| | | ipyData = IpyGameDataPY.InterpolationSearch('AlchemyResult', 'LuckValue', curLuckValue, {'AlchemyQuality':alchemyIpyData.GetAlchemyQuality()})
|
| | | if not ipyData:
|
| | |
| | | addExp = alchemyIpyData.GetAlchemyExp()
|
| | | AddRefineExp(curPlayer, addExp, alchemyLV)
|
| | | #加次数
|
| | | if alchemType == DefStoveType1:
|
| | | maxCnt = max(alchemyCustomizedDict)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyCommonCnt, min(alchemyCommonCnt + 1, maxCnt))
|
| | | if alchemyID in alchemyCustomizedDict:
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_AlchemyCnt, alchemyID, min(alchemyCnt + 1, 9), False)
|
| | |
|
| | | GameWorld.DebugLog('炼丹结果 alchemyItemID=%s,successRate=%s,isSuccess=%s,resultCnt=%s' % (alchemyItemID, successRate, isSuccess, resultCnt), playerID)
|
| | | GameWorld.DebugLog('炼丹结果 alchemyItemID=%s,successRate=%s,isSuccess=%s,resultCnt=%s,appointInfo=%s' % (alchemyItemID, successRate, isSuccess, resultCnt, appointInfo), playerID)
|
| | |
|
| | | Sycn_AlchemyMsg(curPlayer, alchemyID, False, alchemyItemID, resultCnt)
|
| | |
|