9480 【BT6】【后端】炼体系统(属性条目增加炼体属性百分比;优化炼体属性百分比计算方式)
| | |
| | | Def_Effect_WingTrainAttrPer = 157 # 翅膀培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeaponTrainAttrPer = 158 # 灭世培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeapon2TrainAttrPer = 159 # 弑神培养属性加成(攻防血)
|
| | | Def_Effect_LianTiAttrPer = 160 # 炼体属性百分比(攻防血)
|
| | |
|
| | | #增加%d物理伤害值,其中a值为伤害值
|
| | | Def_Effect_AddAtk = 1005
|
| | |
| | | Def_BuffValue_Count = 3 # buff记录的value个数
|
| | |
|
| | | #游戏对象属性--------------------------------------------
|
| | | Def_Calc_AllAttrType_MAX = 159
|
| | | Def_Calc_AllAttrType_MAX = 160
|
| | | #基本属性BUFF计算,顺序与 ObjProperty_AttrByIndex 对应,同时也为buff效果ID同步通知策划
|
| | | TYPE_Calc_AttrList = (
|
| | | TYPE_Calc_Metal, # 金 1
|
| | |
| | | TYPE_Calc_WingTrainAttrPer, # 翅膀培养属性加成(攻防血)
|
| | | TYPE_Calc_PeerlessWeaponTrainAttrPer, # 灭世培养属性加成(攻防血)
|
| | | TYPE_Calc_PeerlessWeapon2TrainAttrPer, # 弑神培养属性加成(攻防血)
|
| | | TYPE_Calc_LianTiAttrPer, # 坐骑培养属性加成(攻防血) 159
|
| | | ) = range(1, Def_Calc_AllAttrType_MAX)
|
| | |
|
| | | ## 支持大数值属性,超过20E
|
| | |
| | | Def_PlayerKey_WingTrainAttrPer = "WingTrainAttrPer" # 翅膀培养属性加成
|
| | | Def_PlayerKey_PeerlessWeaponTrainAttrPer = "PeerlessWeaponTrainAttrPer" # 灭世培养属性加成
|
| | | Def_PlayerKey_PeerlessWeapon2TrainAttrPer = "PeerlessWeapon2TrainAttrPer" # 弑神培养属性加成
|
| | | Def_PlayerKey_LianTiAttrPer = "LianTiAttrPer" # 炼体属性属性加成
|
| | | Def_PlayerKey_StoneBasePer = "StoneBasePer" # 宝石基础属性百分比
|
| | | Def_PlayerKey_RealmBasePer = "RealmBasePer" # 境界基础属性百分比
|
| | | Def_PlayerKey_WingHPPer = "WingHPPer" # 翅膀生命百分比
|
| | |
| | | ShareDefine.Def_Effect_WingTrainAttrPer:[[TYPE_Calc_WingTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PeerlessWeaponTrainAttrPer:[[TYPE_Calc_PeerlessWeaponTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PeerlessWeapon2TrainAttrPer:[[TYPE_Calc_PeerlessWeapon2TrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_LianTiAttrPer:[[TYPE_Calc_LianTiAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_WingHPPer:[[TYPE_Calc_WingHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_SuiteBasePer:[[TYPE_Calc_SuiteBasePer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PlusBaseAtkPer:[[TYPE_Calc_PlusBaseAtkPer], False, TYPE_NoLinear],
|
| | |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_PeerlessWeapon2TrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax,
|
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_LianTiAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_WingHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_SuiteBasePer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax,
|
| | | TYPE_Calc_AttrMaxHP],
|
| | |
| | | ChConfig.TYPE_Calc_WingTrainAttrPer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_WingTarin],
|
| | | ChConfig.TYPE_Calc_PeerlessWeaponTrainAttrPer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_PeerlessWeaponTrain],
|
| | | ChConfig.TYPE_Calc_PeerlessWeapon2TrainAttrPer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_PeerlessWeapon2Train],
|
| | | ChConfig.TYPE_Calc_LianTiAttrPer:funcAttrInfoList[ChConfig.Def_CalcAttrFunc_LianTi],
|
| | | }
|
| | | # 3.2 统计各功能之间非线性属性交叉影响累加
|
| | | funcCrossAttrPerInfoDict = {} # 百分比交叉影响所提升的属性值 {功能属性编号:{提升的属性类型:数值, ...}, ...}
|
| | |
| | | def GetPeerlessWeapon2TrainAttrPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PeerlessWeapon2TrainAttrPer)
|
| | | def SetPeerlessWeapon2TrainAttrPer(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_PeerlessWeapon2TrainAttrPer, value)
|
| | |
|
| | | # 炼体属性属性加成
|
| | | def GetLianTiAttrPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_LianTiAttrPer)
|
| | | def SetLianTiAttrPer(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_LianTiAttrPer, value)
|
| | |
|
| | | # 宝石基础属性百分比
|
| | | def GetStoneBasePer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_StoneBasePer)
|
| | | def SetStoneBasePer(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_StoneBasePer, value)
|
| | |
| | | return
|
| | |
|
| | | allAttrList = [{} for _ in range(4)]
|
| | | plusAttrRateDict = {}
|
| | | lianTiAttrDict = {}
|
| | |
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in xrange(ipyDataMgr.GetLianTiCount()):
|
| | |
| | | for i, attrID in enumerate(fixedAttrTypeList):
|
| | | attrValue = fixedAttrValueList[i] if len(fixedAttrValueList) > i else 0
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | lianTiAttrDict[attrID] = lianTiAttrDict.get(attrID, 0) + attrValue
|
| | | #GameWorld.DebugLog(" %s, attrID=%s,attrValue=%s,%s" % (i, attrID, attrValue, lianTiAttrDict))
|
| | | #GameWorld.DebugLog(" %s, attrID=%s,attrValue=%s,%s" % (i, attrID, attrValue, allAttrList))
|
| | |
|
| | | # 培养丹增加属性
|
| | | upItemPerCount = lvupIpyData.GetEatPerCount()
|
| | |
| | | attrValue = upItemAttrValueList[i] if len(upItemAttrValueList) > i else 0
|
| | | attrValue *= attrMultiple
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | lianTiAttrDict[attrID] = lianTiAttrDict.get(attrID, 0) + attrValue
|
| | | #GameWorld.DebugLog(" %s, attrID=%s,attrValue=%s,%s" % (i, attrID, attrValue, lianTiAttrDict))
|
| | | #GameWorld.DebugLog(" %s, attrID=%s,attrValue=%s,%s" % (i, attrID, attrValue, allAttrList))
|
| | |
|
| | | # 增强属性万分率累加
|
| | | plusAttrTypeList = lvupIpyData.GetPlusAttrType()
|
| | | plusAttrRateList = lvupIpyData.GetPlusAttrRate()
|
| | | for i, attrID in enumerate(plusAttrTypeList):
|
| | | plusRate = plusAttrRateList[i] if len(plusAttrRateList) > i else 0
|
| | | plusAttrRateDict[attrID] = plusAttrRateDict.get(attrID, 0) + plusRate
|
| | | attrValue = plusAttrRateList[i] if len(plusAttrRateList) > i else 0
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | |
|
| | | #GameWorld.DebugLog(" lianTiAttrDict=%s" % lianTiAttrDict)
|
| | | #GameWorld.DebugLog(" plusAttrRateDict=%s" % plusAttrRateDict)
|
| | | |
| | | # 固定属性增强值计算
|
| | | for attrID, plusRate in plusAttrRateDict.items():
|
| | | if attrID not in lianTiAttrDict:
|
| | | continue
|
| | | attrValue = lianTiAttrDict[attrID]
|
| | | plusValue = int(attrValue * plusRate / 10000.0)
|
| | | PlayerControl.CalcAttrDict_Type(attrID, plusValue, allAttrList)
|
| | | #GameWorld.DebugLog(" plus: attrID=%s,attrValue=%s,plusRate=%s,plusValue=%s" % (attrID, attrValue, plusRate, plusValue))
|
| | | |
| | | #GameWorld.DebugLog(" allAttrList=%s" % allAttrList)
|
| | | # 保存计算值
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_LianTi, allAttrList)
|
| | |
| | | Def_Effect_WingTrainAttrPer = 157 # 翅膀培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeaponTrainAttrPer = 158 # 灭世培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeapon2TrainAttrPer = 159 # 弑神培养属性加成(攻防血)
|
| | | Def_Effect_LianTiAttrPer = 160 # 炼体属性百分比(攻防血)
|
| | |
|
| | | #增加%d物理伤害值,其中a值为伤害值
|
| | | Def_Effect_AddAtk = 1005
|
| | |
| | | [lambda curObj:PlayerControl.GetWingTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetWingTrainAttrPer(curObj, value), 0, 0, 0], # 翅膀培养属性加成
|
| | | [lambda curObj:PlayerControl.GetPeerlessWeaponTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPeerlessWeaponTrainAttrPer(curObj, value), 0, 0, 0], # 灭世培养属性加成
|
| | | [lambda curObj:PlayerControl.GetPeerlessWeapon2TrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPeerlessWeapon2TrainAttrPer(curObj, value), 0, 0, 0], # 弑神培养属性加成
|
| | | [lambda curObj:PlayerControl.GetLianTiAttrPer(curObj), lambda curObj, value:PlayerControl.SetLianTiAttrPer(curObj, value), 0, 0, 0], # 炼体属性属性加成
|
| | | ]
|
| | |
|
| | | ## 通过索引获得属性值
|