| | |
| | | [lambda curObj:PlayerControl.GetSkillReducePer5(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer5(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer5, 1, 0], # 受到技能伤害减少5
|
| | | [lambda curObj:PlayerControl.GetSkillReducePer6(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer6(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer6, 1, 0], # 受到技能伤害减少6
|
| | | [lambda curObj:PlayerControl.GetSkillReducePer7(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer7(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer7, 1, 0], # 受到技能伤害减少7
|
| | | [lambda curObj:PlayerControl.GetZhuXianRate(curObj), lambda curObj, value:PlayerControl.SetZhuXianRate(curObj, value), 0, 0, 0], # 诛仙一击: 概率直接减少BOSS当前10%血量
|
| | | [lambda curObj:PlayerControl.GetZhuXianReducePer(curObj), lambda curObj, value:PlayerControl.SetZhuXianReducePer(curObj, value), 0, 0, 0], # 诛仙护体: 受到BOSS伤害减免 万分率
|
| | | [lambda curObj:PlayerControl.GetHorseMaxHPPer(curObj), lambda curObj, value:PlayerControl.SetHorseMaxHPPer(curObj, value), 0, 0, 0], # 坐骑生命加成
|
| | | [lambda curObj:PlayerControl.GetPetAtkPer(curObj), lambda curObj, value:PlayerControl.SetPetAtkPer(curObj, value), 0, 0, 0], # 灵宠攻击加成
|
| | | [lambda curObj:PlayerControl.GetHorseTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetHorseTrainAttrPer(curObj, value), 0, 0, 0], # 坐骑培养属性加成
|
| | | [lambda curObj:PlayerControl.GetPetTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPetTrainAttrPer(curObj, value), 0, 0, 0], # 灵宠培养属性加成
|
| | | [lambda curObj:PlayerControl.GetGuardTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetGuardTrainAttrPer(curObj, value), 0, 0, 0], # 守护培养属性加成
|
| | | [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], # 弑神培养属性加成
|
| | | ]
|
| | |
|
| | | ## 通过索引获得属性值
|
| | |
| | | GameWorld.ErrLog("设置对象属性失败, Index = %s" % (effIndex))
|
| | | return
|
| | |
|
| | | effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord)
|
| | | if effIndex not in ChConfig.TYPE_BIGVALUE_ATTR:
|
| | | effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord)
|
| | | return ObjProperty_AttrByIndex[effIndex - 1][1](curObj, effectValue)
|
| | |
|
| | |
|
| | |
| | | def CopyPlayerFuncAttr(curPlayer):
|
| | | for i in xrange(len(ObjProperty_AttrByIndex)):
|
| | | # Get
|
| | | if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
|
| | | effIndex = i + 1
|
| | | if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
|
| | | continue
|
| | | value = ObjProperty_AttrByIndex[i][0](curPlayer)
|
| | | if value == 0 and curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i) == 0:
|
| | | if value == 0 and GetCopyFuncAttrValue(curPlayer, effIndex) == 0:
|
| | | continue
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr%i, ObjProperty_AttrByIndex[i][0](curPlayer))
|
| | | SetCopyFuncAttrValue(curPlayer, effIndex, value)
|
| | | return
|
| | |
|
| | | # 恢复缓存功能属性的刷新结果,用于BUFF属性单独刷新
|
| | | def RestorePlayerFuncAttr(curPlayer):
|
| | | for i in xrange(len(ObjProperty_AttrByIndex)):
|
| | | if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
|
| | | effIndex = i + 1
|
| | | if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
|
| | | continue
|
| | | ObjProperty_AttrByIndex[i][1](curPlayer, |
| | | curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i))
|
| | | ObjProperty_AttrByIndex[i][1](curPlayer, GetCopyFuncAttrValue(curPlayer, effIndex))
|
| | | return
|
| | | |
| | | |
| | |
|
| | | def GetCopyFuncAttrValue(curPlayer, effIndex):
|
| | | value = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex)
|
| | | valueEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex)
|
| | | return valueEx * ShareDefine.Def_PerPointValue + value
|
| | |
|
| | | def SetCopyFuncAttrValue(curPlayer, effIndex, value):
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex, value % ShareDefine.Def_PerPointValue)
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex, value / ShareDefine.Def_PerPointValue)
|
| | | return
|
| | |
|
| | | |