| | |
| | | equipAttrDict[str(ShareDefine.Def_IudetItemLV)] = itemLV
|
| | |
|
| | | reRatio = 0 # 参考基准值所在比率 0~1
|
| | | lvMin, lvMax = colorIpyData.GetRangeLV() # 品质对应的等级范围
|
| | | lvMin, lvMax = colorIpyData.GetBaseAttrRangeLV() # 品质对应的等级范围
|
| | | if itemLV <= lvMin:
|
| | | reRatio = 0
|
| | | elif itemLV >= lvMax:
|
| | |
| | | equipAttrDict[str(ShareDefine.Def_IudetLegendAttrID)] = legendAttrIDList
|
| | | equipAttrDict[str(ShareDefine.Def_IudetLegendAttrValue)] = legendAttrValueList
|
| | | else:
|
| | | __RandCreateEquipLegendAttr(reRatio, colorIpyData, equipAttrDict)
|
| | | __RandCreateEquipLegendAttr(colorIpyData, colorPlaceIpyData, equipAttrDict)
|
| | |
|
| | | # 神仙极属性可在这里扩展...
|
| | |
|
| | |
| | | GameWorld.DebugLog(" baseAttrIDList=%s,baseAttrValueList=%s" % (baseAttrIDList, baseAttrValueList))
|
| | | return
|
| | |
|
| | | def __RandCreateEquipLegendAttr(reRatio, colorIpyData, setAttrDict):
|
| | | def __RandCreateEquipLegendAttr(colorIpyData, colorPlaceIpyData, setAttrDict):
|
| | | ## 随机装备传奇属性
|
| | | upDownRateList = colorIpyData.GetRangeRand()
|
| | | battleAttrCount = colorIpyData.GetBattleAttrCount() # 战斗属性条数
|
| | | battleDefAttrCount = colorIpyData.GetBattleDefAttrCount() #战斗抗性条数
|
| | | if not battleAttrCount and not battleDefAttrCount:
|
| | | return
|
| | |
|
| | | # 注: 闪避率-对应原闪避值;抗闪避-对应原命中值
|
| | | battleAttrDict = {ShareDefine.Def_Effect_FaintRate:colorIpyData.GetRangeFaintRate(),
|
| | | ShareDefine.Def_Effect_SuperHitRate:colorIpyData.GetRangeSuperHitRate(),
|
| | | ShareDefine.Def_Effect_ComboRate:colorIpyData.GetRangeComboRate(),
|
| | | ShareDefine.Def_Effect_Miss:colorIpyData.GetRangeMissRate(),
|
| | | ShareDefine.Def_Effect_AtkBackRate:colorIpyData.GetRangeAtkBackRate(),
|
| | | ShareDefine.Def_Effect_SuckHPPer:colorIpyData.GetRangeSuckHPPer(),
|
| | | battleAttrDict = {ShareDefine.Def_Effect_FaintRate:colorPlaceIpyData.GetRangeFaintRate(),
|
| | | ShareDefine.Def_Effect_SuperHitRate:colorPlaceIpyData.GetRangeSuperHitRate(),
|
| | | ShareDefine.Def_Effect_ComboRate:colorPlaceIpyData.GetRangeComboRate(),
|
| | | ShareDefine.Def_Effect_Miss:colorPlaceIpyData.GetRangeMissRate(),
|
| | | ShareDefine.Def_Effect_AtkBackRate:colorPlaceIpyData.GetRangeAtkBackRate(),
|
| | | ShareDefine.Def_Effect_SuckHPPer:colorPlaceIpyData.GetRangeSuckHPPer(),
|
| | | }
|
| | | battleDefAttrDict = {ShareDefine.Def_Effect_FaintDefRate:colorIpyData.GetRangeFaintDefRate(),
|
| | | ShareDefine.Def_Effect_SuperHitRateReduce:colorIpyData.GetRangeSuperHitRateReduce(),
|
| | | ShareDefine.Def_Effect_ComboDefRate:colorIpyData.GetRangeComboDefRate(),
|
| | | ShareDefine.Def_Effect_Hit:colorIpyData.GetRangeMissDefRate(),
|
| | | ShareDefine.Def_Effect_AtkBackDefRate:colorIpyData.GetRangeAtkBackDefRate(),
|
| | | ShareDefine.Def_Effect_SuckHPDefPer:colorIpyData.GetRangeSuckHPDefPer(),
|
| | | battleDefAttrDict = {ShareDefine.Def_Effect_FaintDefRate:colorPlaceIpyData.GetRangeFaintDefRate(),
|
| | | ShareDefine.Def_Effect_SuperHitRateReduce:colorPlaceIpyData.GetRangeSuperHitRateReduce(),
|
| | | ShareDefine.Def_Effect_ComboDefRate:colorPlaceIpyData.GetRangeComboDefRate(),
|
| | | ShareDefine.Def_Effect_Hit:colorPlaceIpyData.GetRangeMissDefRate(),
|
| | | ShareDefine.Def_Effect_AtkBackDefRate:colorPlaceIpyData.GetRangeAtkBackDefRate(),
|
| | | ShareDefine.Def_Effect_SuckHPDefPer:colorPlaceIpyData.GetRangeSuckHPDefPer(),
|
| | | }
|
| | |
|
| | | # 没有配置值的属性不产出,打乱顺序后直接取限制条数前x个即为随机的属性ID
|
| | |
| | | battleAttrIDList = battleAttrIDList[:battleAttrCount]
|
| | | batAttrIDList, batAttrValueList= [], []
|
| | | for attrID in battleAttrIDList:
|
| | | atkValue = __GetRandAttrValueByRatio(attrID, battleAttrDict[attrID], reRatio, upDownRateList)
|
| | | #atkValue = __GetRandAttrValueByRatio(attrID, battleAttrDict[attrID], reRatio, upDownRateList)
|
| | | valueMin, valueMax = battleAttrDict[attrID]
|
| | | atkValue = random.randint(valueMin, valueMax) # 改为纯随机
|
| | | if not atkValue:
|
| | | continue
|
| | | batAttrIDList.append(attrID)
|
| | |
| | | battleDefAttrIDList = battleDefAttrIDList[:battleDefAttrCount]
|
| | | batDefAttrIDList, batDefAttrValueList= [], []
|
| | | for attrID in battleDefAttrIDList:
|
| | | atkValue = __GetRandAttrValueByRatio(attrID, battleDefAttrDict[attrID], reRatio, upDownRateList)
|
| | | #atkValue = __GetRandAttrValueByRatio(attrID, battleDefAttrDict[attrID], reRatio, upDownRateList)
|
| | | valueMin, valueMax = battleDefAttrDict[attrID]
|
| | | atkValue = random.randint(valueMin, valueMax) # 改为纯随机
|
| | | if not atkValue:
|
| | | continue
|
| | | batDefAttrIDList.append(attrID)
|