| | |
| | | realmlv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return curPlayer.GetOfficialRank() >= realmlv
|
| | |
|
| | | ##境界修仙之路是否已领取
|
| | | # @param None
|
| | | # @return None <Realmxxzlaward taskid="修仙之路任务ID"/>
|
| | | def ConditionType_Realmxxzlaward(curPlayer, curMission, curActionNode):
|
| | | taskID = GameWorld.ToIntDef(curActionNode.GetAttribute("taskid"), 0)
|
| | | awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmXXZLAward)
|
| | | if awardState&pow(2, taskID):
|
| | | return True
|
| | | return False
|
| | |
|
| | | ##判断已加总灵根点数
|
| | | # @param None
|
| | | # @return None <Linggenaddtotal attrid="灵根ID或0代表全部灵根" value="期望点数"/>
|
| | | def ConditionType_Linggenaddtotal(curPlayer, curMission, curActionNode):
|
| | | attrID = GameWorld.ToIntDef(curActionNode.GetAttribute("attrid"), 0)
|
| | | value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return GetLinggenaddtotal(curPlayer, attrID) >= value
|
| | |
|
| | | ##设置已加总灵根数
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Linggenaddtotal key="" attrid="灵根ID或0代表全部灵根" id="可选指定任务ID"/>
|
| | | def DoType_Set_Linggenaddtotal(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | attrID = GameWorld.ToIntDef(curActionNode.GetAttribute("attrid"), 0)
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, GetLinggenaddtotal(curPlayer, attrID))
|
| | | return
|
| | |
|
| | | def GetLinggenaddtotal(curPlayer, attrID):
|
| | | # 获取已加总灵根点数
|
| | | funcDict = {ShareDefine.Def_Effect_Metal:lambda curObj:PlayerControl.GetMetal(curObj),
|
| | | ShareDefine.Def_Effect_Wood:lambda curObj:PlayerControl.GetWood(curObj),
|
| | | ShareDefine.Def_Effect_Water:lambda curObj:PlayerControl.GetWater(curObj),
|
| | | ShareDefine.Def_Effect_Fire:lambda curObj:PlayerControl.GetFire(curObj),
|
| | | ShareDefine.Def_Effect_Earth:lambda curObj:PlayerControl.GetEarth(curObj),
|
| | | }
|
| | | curTotalPoint = 0
|
| | | for k, func in funcDict.items():
|
| | | if not attrID or attrID == k:
|
| | | curTotalPoint += func(curPlayer)
|
| | | return curTotalPoint
|
| | |
|
| | | ##灵根品级是否达到X级
|
| | | # @param None
|
| | | # @return None <Linggenqualitylv attrid="灵根ID" value="期望等级"/>
|