| | |
| | |
|
| | | import random
|
| | |
|
| | | Def_GodWeaponType_HP = 1 # 生命神兵类型
|
| | | Def_GodWeaponType_Atk = 2 # 攻击神兵类型
|
| | | Def_GodWeaponType_SuperHit = 3 # 暴击神兵类型
|
| | | Def_GodWeaponType_Def = 4 # 护盾神兵类型
|
| | |
|
| | | ## 神器功能登录处理
|
| | | # @param curPlayer 玩家
|
| | | # @return None
|
| | |
| | | def SetGodWeaponLV(curPlayer, weaponType, lv):
|
| | | ## 设置神兵等级,同步设置场景神兵等级
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GodWeaponLV % weaponType, lv)
|
| | | sceneEffectsDict = {1:[lambda curObj, value:curObj.SetExAttr15(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_1],
|
| | | 2:[lambda curObj, value:curObj.SetExAttr16(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_2],
|
| | | 3:[lambda curObj, value:curObj.SetExAttr17(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_3],
|
| | | 4:[lambda curObj, value:curObj.SetExAttr18(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_4],
|
| | | sceneEffectsDict = {Def_GodWeaponType_HP:[lambda curObj, value:curObj.SetExAttr15(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_1],
|
| | | Def_GodWeaponType_Atk:[lambda curObj, value:curObj.SetExAttr16(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_2],
|
| | | Def_GodWeaponType_SuperHit:[lambda curObj, value:curObj.SetExAttr17(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_3],
|
| | | Def_GodWeaponType_Def:[lambda curObj, value:curObj.SetExAttr18(value), ShareDefine.CDBPlayerRefresh_GodWeaponLV_4],
|
| | | }
|
| | | if weaponType in sceneEffectsDict:
|
| | | setFunc, notifyType = sceneEffectsDict[weaponType]
|
| | |
| | |
|
| | | #1.判断表中有没此类型,2.是否满级,3.判断是否有物品
|
| | | attrLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % weaponType)
|
| | | if not attrLV:
|
| | | if not attrLV and Def_GodWeaponType_SuperHit != weaponType:
|
| | | GameWorld.DebugLog("神兵未解锁,无法升级!weaponType=%s,attrLV=%s" % (weaponType, attrLV))
|
| | | return
|
| | |
|