10033 【后端】仙树升级系统及砍树产出规则(修改战斗属性、战斗抗性产出规则,改为由品质部位决定范围,纯随机;)
| | |
| | | struct tagEquipColor
|
| | | {
|
| | | BYTE _EquipColor; // 装备颜色
|
| | | list RangeLV; // 等级范围
|
| | | list RangeRand; // 随机上下限范围
|
| | | list BaseAttrRangeLV; // 基础属性等级范围
|
| | | BYTE BattleAttrCount; // 战斗属性条数
|
| | | BYTE BattleDefAttrCount; // 战斗抗性条数
|
| | | list RangeFaintRate; // 击晕范围
|
| | | list RangeFaintDefRate; // 抗击晕范围
|
| | | list RangeSuperHitRate; // 暴击范围
|
| | | list RangeSuperHitRateReduce; // 抗暴击范围
|
| | | list RangeComboRate; // 连击范围
|
| | | list RangeComboDefRate; // 抗连击范围
|
| | | list RangeMissRate; // 闪避范围
|
| | | list RangeMissDefRate; // 抗闪避范围
|
| | | list RangeAtkBackRate; // 反击范围
|
| | | list RangeAtkBackDefRate; // 抗反击范围
|
| | | list RangeSuckHPPer; // 吸血范围
|
| | | list RangeSuckHPDefPer; // 抗吸血范围
|
| | | DWORD MoneyBase; // 分解基础货币值
|
| | | };
|
| | |
|
| | |
| | | list RangeHP; // 生命范围
|
| | | list RangeDef; // 防御范围
|
| | | list RangeAtkSpeed; // 攻速范围
|
| | | list RangeFaintRate; // 击晕范围
|
| | | list RangeFaintDefRate; // 抗击晕范围
|
| | | list RangeSuperHitRate; // 暴击范围
|
| | | list RangeSuperHitRateReduce; // 抗暴击范围
|
| | | list RangeComboRate; // 连击范围
|
| | | list RangeComboDefRate; // 抗连击范围
|
| | | list RangeMissRate; // 闪避范围
|
| | | list RangeMissDefRate; // 抗闪避范围
|
| | | list RangeAtkBackRate; // 反击范围
|
| | | list RangeAtkBackDefRate; // 抗反击范围
|
| | | list RangeSuckHPPer; // 吸血范围
|
| | | list RangeSuckHPDefPer; // 抗吸血范围
|
| | | };
|
| | |
|
| | | //装备评分属性系数表
|
| | |
| | |
|
| | | "EquipColor":(
|
| | | ("BYTE", "EquipColor", 1),
|
| | | ("list", "RangeLV", 0),
|
| | | ("list", "RangeRand", 0),
|
| | | ("list", "BaseAttrRangeLV", 0),
|
| | | ("BYTE", "BattleAttrCount", 0),
|
| | | ("BYTE", "BattleDefAttrCount", 0),
|
| | | ("DWORD", "MoneyBase", 0),
|
| | | ),
|
| | |
|
| | | "EquipColorPlace":(
|
| | | ("BYTE", "EquipColor", 1),
|
| | | ("BYTE", "EquipPlace", 1),
|
| | | ("list", "RangeAtk", 0),
|
| | | ("list", "RangeHP", 0),
|
| | | ("list", "RangeDef", 0),
|
| | | ("list", "RangeAtkSpeed", 0),
|
| | | ("list", "RangeFaintRate", 0),
|
| | | ("list", "RangeFaintDefRate", 0),
|
| | | ("list", "RangeSuperHitRate", 0),
|
| | |
| | | ("list", "RangeAtkBackDefRate", 0),
|
| | | ("list", "RangeSuckHPPer", 0),
|
| | | ("list", "RangeSuckHPDefPer", 0),
|
| | | ("DWORD", "MoneyBase", 0),
|
| | | ),
|
| | |
|
| | | "EquipColorPlace":(
|
| | | ("BYTE", "EquipColor", 1),
|
| | | ("BYTE", "EquipPlace", 1),
|
| | | ("list", "RangeAtk", 0),
|
| | | ("list", "RangeHP", 0),
|
| | | ("list", "RangeDef", 0),
|
| | | ("list", "RangeAtkSpeed", 0),
|
| | | ),
|
| | |
|
| | | "EquipGSParam":(
|
| | |
| | | return |
| | | |
| | | def GetEquipColor(self): return self.attrTuple[0] # 装备颜色 BYTE
|
| | | def GetRangeLV(self): return self.attrTuple[1] # 等级范围 list
|
| | | def GetRangeRand(self): return self.attrTuple[2] # 随机上下限范围 list
|
| | | def GetBattleAttrCount(self): return self.attrTuple[3] # 战斗属性条数 BYTE
|
| | | def GetBattleDefAttrCount(self): return self.attrTuple[4] # 战斗抗性条数 BYTE
|
| | | def GetRangeFaintRate(self): return self.attrTuple[5] # 击晕范围 list
|
| | | def GetRangeFaintDefRate(self): return self.attrTuple[6] # 抗击晕范围 list
|
| | | def GetRangeSuperHitRate(self): return self.attrTuple[7] # 暴击范围 list
|
| | | def GetRangeSuperHitRateReduce(self): return self.attrTuple[8] # 抗暴击范围 list
|
| | | def GetRangeComboRate(self): return self.attrTuple[9] # 连击范围 list
|
| | | def GetRangeComboDefRate(self): return self.attrTuple[10] # 抗连击范围 list
|
| | | def GetRangeMissRate(self): return self.attrTuple[11] # 闪避范围 list
|
| | | def GetRangeMissDefRate(self): return self.attrTuple[12] # 抗闪避范围 list
|
| | | def GetRangeAtkBackRate(self): return self.attrTuple[13] # 反击范围 list
|
| | | def GetRangeAtkBackDefRate(self): return self.attrTuple[14] # 抗反击范围 list
|
| | | def GetRangeSuckHPPer(self): return self.attrTuple[15] # 吸血范围 list
|
| | | def GetRangeSuckHPDefPer(self): return self.attrTuple[16] # 抗吸血范围 list
|
| | | def GetMoneyBase(self): return self.attrTuple[17] # 分解基础货币值 DWORD |
| | | def GetBaseAttrRangeLV(self): return self.attrTuple[1] # 基础属性等级范围 list
|
| | | def GetBattleAttrCount(self): return self.attrTuple[2] # 战斗属性条数 BYTE
|
| | | def GetBattleDefAttrCount(self): return self.attrTuple[3] # 战斗抗性条数 BYTE
|
| | | def GetMoneyBase(self): return self.attrTuple[4] # 分解基础货币值 DWORD |
| | | |
| | | # 装备品质部位表 |
| | | class IPY_EquipColorPlace(): |
| | |
| | | def GetRangeAtk(self): return self.attrTuple[2] # 攻击范围 list
|
| | | def GetRangeHP(self): return self.attrTuple[3] # 生命范围 list
|
| | | def GetRangeDef(self): return self.attrTuple[4] # 防御范围 list
|
| | | def GetRangeAtkSpeed(self): return self.attrTuple[5] # 攻速范围 list |
| | | def GetRangeAtkSpeed(self): return self.attrTuple[5] # 攻速范围 list
|
| | | def GetRangeFaintRate(self): return self.attrTuple[6] # 击晕范围 list
|
| | | def GetRangeFaintDefRate(self): return self.attrTuple[7] # 抗击晕范围 list
|
| | | def GetRangeSuperHitRate(self): return self.attrTuple[8] # 暴击范围 list
|
| | | def GetRangeSuperHitRateReduce(self): return self.attrTuple[9] # 抗暴击范围 list
|
| | | def GetRangeComboRate(self): return self.attrTuple[10] # 连击范围 list
|
| | | def GetRangeComboDefRate(self): return self.attrTuple[11] # 抗连击范围 list
|
| | | def GetRangeMissRate(self): return self.attrTuple[12] # 闪避范围 list
|
| | | def GetRangeMissDefRate(self): return self.attrTuple[13] # 抗闪避范围 list
|
| | | def GetRangeAtkBackRate(self): return self.attrTuple[14] # 反击范围 list
|
| | | def GetRangeAtkBackDefRate(self): return self.attrTuple[15] # 抗反击范围 list
|
| | | def GetRangeSuckHPPer(self): return self.attrTuple[16] # 吸血范围 list
|
| | | def GetRangeSuckHPDefPer(self): return self.attrTuple[17] # 抗吸血范围 list |
| | | |
| | | # 装备评分属性系数表 |
| | | class IPY_EquipGSParam(): |
| | |
| | | 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)
|