| | |
| | | import QuestCommon
|
| | | import SkillShell
|
| | | import GameLogInfo
|
| | | import PlayerReincarnation
|
| | | import PlayerMissionCollect
|
| | | import PlayerFamily
|
| | | import ShareDefine
|
| | |
| | | import ChEquip
|
| | | import PlayerActivity
|
| | | import PlayerSuccess
|
| | | import EventReport
|
| | | #import PlayerCostVIP
|
| | | import GameFuncComm
|
| | | import IpyGameDataPY
|
| | | import PlayerPet
|
| | | import PlayerArrestTask
|
| | |
| | | import PlayerBossReborn
|
| | | import PlayerFairyCeremony
|
| | | import PlayerNewFairyCeremony
|
| | | import Operate_EquipStone
|
| | | import PlayerWeekParty
|
| | | import PlayerFairyDomain
|
| | | import PlayerActLogin
|
| | | import PlayerHorse
|
| | | import FBCommon
|
| | | import PyGameData
|
| | | import NPCCommon
|
| | |
|
| | | import math
|
| | | import time
|
| | |
| | | def DoType_Add_Player_Xp(curPlayer, curMission, curActionNode):
|
| | | #增加玩家相关值<Add_Player_XP value="玩家xp值"/>
|
| | |
|
| | | xpValue = curActionNode.GetAttribute("value")
|
| | | |
| | | if xpValue != "":
|
| | | #设置玩家xp值
|
| | | openLV, addXPValue, maxXPValue = ReadChConfig.GetEvalChConfig('PlayerXP')
|
| | | curXp = min(int(xpValue), maxXPValue)
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_RecordXPValue, curXp)
|
| | | curPlayer.SetXP(curXp)
|
| | | |
| | | #===========================================================================
|
| | | # xpValue = curActionNode.GetAttribute("value")
|
| | | # |
| | | # if xpValue != "":
|
| | | # #设置玩家xp值
|
| | | # openLV, addXPValue, maxXPValue = ReadChConfig.GetEvalChConfig('PlayerXP')
|
| | | # curXp = min(int(xpValue), maxXPValue)
|
| | | # curPlayer.SetDict(ChConfig.Def_PlayerKey_RecordXPValue, curXp)
|
| | | # curPlayer.SetXP(curXp)
|
| | | # |
| | | #===========================================================================
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | # @return 返回值, 是否判断成功
|
| | | # @remarks <QualityEquipCnt quality="装备品质" value="期望数量"/>
|
| | | def ConditionType_Qualityequipcnt(curPlayer, curMission, curConditionNode):
|
| | | conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
|
| | | quality = GameWorld.ToIntDef(curConditionNode.GetAttribute("quality"), 0)
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | curQualityEquipCnt = 0 #达到该品质的装备数量,品质高的兼容品质低的
|
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for equipIndex in range(0, equipPack.GetCount()):
|
| | | #备用装备栏不处理
|
| | | if equipIndex not in ShareDefine.RoleEquipType:
|
| | | continue
|
| | | curEquip = equipPack.GetAt(equipIndex)
|
| | | if curEquip.IsEmpty():
|
| | | continue
|
| | | if curEquip.GetItemQuality() < quality:
|
| | | continue
|
| | | curQualityEquipCnt += 1
|
| | | |
| | | return QuestRunnerValue.GetEval(conditionType, curQualityEquipCnt, conditionValue)
|
| | | return ChEquip.GetEquipOrangeCount(curPlayer)
|
| | |
|
| | | ##强化 X件装备强化到X级
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | maxPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV) # 历史最大过关数
|
| | | return QuestRunnerValue.GetEval(conditionType, maxPassLV, conditionValue)
|
| | |
|
| | | ##通关天星塔第X层
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curConditionNode 节点信息
|
| | | # @return 返回值, 是否判断成功
|
| | | # @remarks <Check_Skytower type="类型" value="值"/> |
| | | def ConditionType_Check_Skytower(curPlayer, curMission, curConditionNode):
|
| | | conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | maxPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor) # 历史最大过关数
|
| | | return QuestRunnerValue.GetEval(conditionType, maxPassLV, conditionValue)
|
| | |
|
| | | def ConditionType_Get_Player_Coin(curPlayer, curMission, curConditionNode):
|
| | |
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Drop_Item id="物品ID" count="物品数量" starLV="星级" bind="是否绑定" isAuctionItem="是否拍品"
|
| | | # suite="是否套装化" addAttrLV="追加等级",isLucky="是否有幸运"
|
| | | # suite="是否套装化" addAttrLV="追加等级",isLucky="是否有幸运" isFakeDrop="是否假掉落"
|
| | | # skillBoostEff="[技能效果增强索引, 值]", holeCount="孔数", isGreat="1", effIndex="1" , dropDist="掉落范围默认3"
|
| | | # aroundPlayer="1" baseAttrRate="可强化的装备基础属性随机加强比例默认10000" greatAttr="[卓越属性列表]" />
|
| | | def DoType_Drop_Item(curPlayer, curMission, curActionNode):
|
| | |
| | | if not curItem:
|
| | | GameWorld.Log('###创建地上物品异常,无此ID物品 = %s' % (curItemID))
|
| | | return
|
| | | |
| | | isFakeDrop = GameWorld.ToIntDef(curActionNode.GetAttribute("isFakeDrop"), 0)
|
| | | if isFakeDrop:#假掉落表现
|
| | | dropItemDataStr = ChItem.GetMapDropItemDataStr(curItem)
|
| | | #通知客户端
|
| | | NPCCommon.SendVirtualItemDrop(curPlayer, curItemID, 0, 0, dropItemDataStr)
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, [[curItemID, count, isAuctionItem]])
|
| | | curItem.Clear()
|
| | | return
|
| | | if curActionNode.GetAttribute("aroundPlayer") == "1" or not curNPC:
|
| | | posX, posY = curPlayer.GetPosX(), curPlayer.GetPosY()
|
| | | else:
|
| | |
| | | curPlayer.SetFreePoint(curPlayerFreePoint + value)
|
| | |
|
| | | DataRecordPack.DR_Freepoint(curPlayer, "Event", value, {"MissionID":curMission.GetMissionID()})
|
| | | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | #===============================================================================
|
| | | # PlayerJob_Warrior, # 剑士,
|
| | | # PlayerJob_Wizard, # 魔法师,
|
| | | # PlayerJob_Assassin, # 弓箭手,
|
| | | # PlayerJob_Chaplain, # 魔剑士,
|
| | | # PlayerJob_Knight, # 骑士
|
| | | # PlayerJob_ForceUser,# 魔导师
|
| | | # PlayerJob_BowMaster,# 圣射手
|
| | | #===============================================================================
|
| | | ##玩家转职业
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义 <Change_Job checkLV="150" changeJob="4">
|
| | | def DoType_Change_Job(curPlayer, curMission, curActionNode):
|
| | | playerID = curPlayer.GetID()
|
| | | |
| | | checkLV = GameWorld.ToIntDef(curActionNode.GetAttribute("checkLV"), 0)
|
| | | if not checkLV:
|
| | | GameWorld.Log("change job error! checkLV=%s" % checkLV, playerID)
|
| | | return
|
| | |
|
| | | curLV = curPlayer.GetLV()
|
| | | if curLV < checkLV:
|
| | | GameWorld.Log("change job error! checkLV=%s curlv=%s" % (checkLV, curLV), playerID)
|
| | | return
|
| | | |
| | | changeJob = GameWorld.ToIntDef(curActionNode.GetAttribute("changeJob"), 0)
|
| | | #验证职业
|
| | | if not changeJob:
|
| | | GameWorld.Log("change job error! changeJob=%s" % changeJob, playerID)
|
| | | return
|
| | | |
| | | #curJob = curPlayer.GetJob()
|
| | |
|
| | | #计算点数, 恢复等级差的点数
|
| | | #addPointDict = ReadChConfig.GetEvalChConfig('lvUp_Point')
|
| | | |
| | | #addPoint = (curLV - checkLV)*(addPointDict.get(changeJob) - addPointDict.get(curJob))
|
| | | |
| | | #设置玩家可加属性点
|
| | | #curPlayer.SetFreePoint(curPlayer.GetFreePoint() + addPoint)
|
| | | #DataRecordPack.DR_Freepoint(curPlayer, "ChangeJob", addPoint, {"job":changeJob})
|
| | | |
| | | #设置职业
|
| | | curPlayer.SetJob(changeJob)
|
| | | |
| | | playerControl = PlayerControl.PlayerControl(curPlayer)
|
| | | playerControl.RefreshAllState()
|
| | | |
| | | PlayerReincarnation.DoPlayerReincarnation(curPlayer)
|
| | | return True
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##删除物品
|
| | |
| | | PlayerFamily.AddFamilyActivity(curPlayer, ShareDefine.FamilyActive_Task, addCnt)
|
| | | else:
|
| | | GameWorld.Log(' 跑环完成触发活跃度异常 missionType=%s'%missionType, curPlayer.GetPlayerID())
|
| | | return
|
| | | EventShell.EventRespons_AroundMission(curPlayer, missionType)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | for lvInfo in runAroundReward.Rewards:
|
| | | if curRewardLV >= lvInfo[0] and curRewardLV <= lvInfo[1]:
|
| | | return runAroundReward.Rewards[lvInfo]
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ##转生后跑环奖励处理
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @return 返回值无意义
|
| | | # @remarks 转生后跑环奖励处理
|
| | | def __ReinAddRunAroundReward(curPlayer, curMission):
|
| | | runAroundReward = FindQuestFunc(curMission.GetMissionID()).RunAroundReward
|
| | |
|
| | | lvReward = GetRunAroundReward(curPlayer, runAroundReward, rewardLV=0, isMaxLV=True)
|
| | | if not lvReward:
|
| | | GameWorld.Log("转生跑环奖励错误 id = %d" % curMission.GetMissionID() , curPlayer.GetPlayerID())
|
| | | return
|
| | | |
| | | #金钱奖励最大等级
|
| | | if lvReward.Money != 0:
|
| | | curMission.SetProperty(Def_Run_Around_Reward_Money, lvReward.Money) |
| | | |
| | | #---------------------------------------------------------------------
|
| | | ##转生后每日任务新增奖励
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Reincarnation_Add_Reward />
|
| | | def DoType_Reincarnation_Add_Reward(curPlayer, curMission, curActionNode):
|
| | | #没转生不处理
|
| | | curReinLV = curPlayer.GetReincarnationLv()
|
| | | if curReinLV < 1:
|
| | | return
|
| | | |
| | | dayEventReward = FindQuestFunc(curMission.GetMissionID()).DayEventReward
|
| | | |
| | | if dayEventReward == None:
|
| | | GameWorld.Log("转生奖励错误 id = %d" % curMission.GetMissionID() , curPlayer.GetPlayerID())
|
| | | return
|
| | | |
| | | curRewardLV = dayEventReward.MaxLV
|
| | | familyLV = curPlayer.GetFamilyLV()
|
| | | |
| | | #当前等级任务奖励结构体
|
| | | curLVDayEventReward = dayEventReward.Rewards[curRewardLV]
|
| | | |
| | | #金钱奖励最大等级
|
| | | if curLVDayEventReward.Money != 0:
|
| | | curMission.SetProperty(Def_Day_Event_Reward_Money, curLVDayEventReward.Money) |
| | | |
| | | #家族活跃最大等级
|
| | | if curLVDayEventReward.PlayerFamilyActiveValue != 0:
|
| | | curMission.SetProperty(Def_Day_Event_Reward_Player_Family_ActiveValue, (curLVDayEventReward.PlayerFamilyActiveValue) * familyLV) |
| | | |
| | | #镖车压金最大等级
|
| | | if curLVDayEventReward.TruckMoney != 0:
|
| | | curMission.SetProperty(Def_Day_Event_Reward_Truck_Money, curLVDayEventReward.TruckMoney)
|
| | | |
| | | #转生后跑环奖励处理
|
| | | __ReinAddRunAroundReward(curPlayer, curMission)
|
| | |
|
| | | return
|
| | |
|
| | |
| | | randStarList = eval(ReadChConfig.GetChConfig('RunAround_Star'))
|
| | | aroundStar = GameWorld.GetResultByRandomList(randStarList, 1)
|
| | |
|
| | | #vipStar = PlayerCostVIP.GetRoundStar(curPlayer)
|
| | | vipStar = 0
|
| | | if vipStar > 0:
|
| | | aroundStar = vipStar
|
| | |
| | |
|
| | | return
|
| | |
|
| | |
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##执行玩家转生
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Player_Reincarnation /> |
| | | def DoType_Player_Reincarnation(curPlayer, curMission, curActionNode):
|
| | | PlayerReincarnation.DoPlayerReincarnation(curPlayer)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##判断玩家是否转生
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curConditionNode节点信息
|
| | | # @return 返回值, 是否通过检查
|
| | | # @remarks <Player_Is_Reincarnation result="期望的结果" /> |
| | | def ConditionType_Player_Is_Reincarnation(curPlayer, curMission, curConditionNode):
|
| | | #<Player_Is_Reincarnation result=""> 0:没转,1:有转
|
| | | result = GameWorld.ToIntDef(curConditionNode.GetAttribute("result"), 0)
|
| | | #转生等级
|
| | | curReinLV = curPlayer.GetReincarnationLv()
|
| | | if curReinLV > 0:
|
| | | return True == result
|
| | | else:
|
| | | return False == result
|
| | | |
| | | return
|
| | |
|
| | | ##判断玩家转生数
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curConditionNode节点信息
|
| | | # @return 返回值, 是否通过检查
|
| | | # @remarks <Player_Reincarnation result="期望的结果" /> |
| | | def ConditionType_Player_Reincarnation(curPlayer, curMission, curConditionNode):
|
| | | #<Player_Reincarnation result="1"> # 玩家是否1转
|
| | | result = GameWorld.ToIntDef(curConditionNode.GetAttribute("result"), 0)
|
| | | #转生等级
|
| | | curReinLV = curPlayer.GetReincarnationLv()
|
| | | return curReinLV == result
|
| | |
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##给予玩家技能
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | realmlv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return curPlayer.GetOfficialRank() >= realmlv
|
| | |
|
| | | ##灵根品级是否达到X级
|
| | | # @param None
|
| | | # @return None <Linggenqualitylv attrid="灵根ID" value="期望等级"/>
|
| | | def ConditionType_Linggenqualitylv(curPlayer, curMission, curActionNode):
|
| | | attrID = GameWorld.ToIntDef(curActionNode.GetAttribute("attrid"), 0)
|
| | | qualityLV = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | funcDict = {ShareDefine.Def_Effect_Metal:lambda curObj:PlayerControl.GetMetalQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Wood:lambda curObj:PlayerControl.GetWoodQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Water:lambda curObj:PlayerControl.GetWaterQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Fire:lambda curObj:PlayerControl.GetFireQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Earth:lambda curObj:PlayerControl.GetEarthQualityLV(curObj),
|
| | | }
|
| | | curQualityLV = 0
|
| | | if attrID in funcDict:
|
| | | curQualityLV = funcDict[attrID](curPlayer)
|
| | | return curQualityLV >= qualityLV
|
| | |
|
| | | ##X级通关X层娲皇遗迹
|
| | | # @param None
|
| | |
| | | totallv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return PlayerHorse.GetHorseSumLV(curPlayer) >= totallv
|
| | |
|
| | | ##某主技能对应专精技能达到激活X等级的数量是否达到
|
| | | # @param None
|
| | | # @return None <Elementskillcnt value="cnt" mainskill="[]" activelv="" elementtype="专精类型"/>
|
| | | def ConditionType_Elementskillcnt(curPlayer, curMission, curActionNode):
|
| | | cnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | mainskill = curActionNode.GetAttribute("mainskill")
|
| | | mainSkillIDList = eval(mainskill) if mainskill else []
|
| | | activeLV = GameWorld.ToIntDef(curActionNode.GetAttribute("activelv"), 1)
|
| | | elementType = GameWorld.ToIntDef(curActionNode.GetAttribute("elementtype"), 0)
|
| | | return SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType) >= cnt
|
| | |
|
| | | ##设置已选择的专精技能数量
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Elementskillcnt key="" mainskill="[]" activelv="" elementtype="专精类型"/>
|
| | | def DoType_Set_Elementskillcnt(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | mainskill = curActionNode.GetAttribute("mainskill")
|
| | | mainSkillIDList = eval(mainskill) if mainskill else []
|
| | | activeLV = GameWorld.ToIntDef(curActionNode.GetAttribute("activelv"), 1)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | elementType = GameWorld.ToIntDef(curActionNode.GetAttribute("elementtype"), 0)
|
| | | curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType))
|
| | | return
|
| | |
|
| | | ##设置符合条件的已穿基础装备数量
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Baseequipcnt key="" classlv="" color="" suite="[suiteID,..]"/>
|
| | | def DoType_Set_Baseequipcnt(curPlayer, curMission, curActionNode):
|
| | | classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classlv"), 0)
|
| | | color = GameWorld.ToIntDef(curActionNode.GetAttribute("color"), 0)
|
| | | suite = curActionNode.GetAttribute("suite")
|
| | | suiteIDList = eval(suite) if suite else []
|
| | |
|
| | | haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList)
|
| | | |
| | | key = curActionNode.GetAttribute("key")
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, haveCnt)
|
| | | return
|
| | | def __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList, needCnt=0):
|
| | | #classLV 为0代表任意阶
|
| | | haveCnt = 0
|
| | | equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
|
| | | classlVList = [classLV] if classLV else range(1, equipMaxClasslv+1)
|
| | | |
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for place in ChConfig.EquipPlace_Base:
|
| | | for classlv in classlVList:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, place)
|
| | | if not ipyData:
|
| | | continue
|
| | | gridIndex = ipyData.GetGridIndex()
|
| | | curEquip = equipPack.GetAt(gridIndex)
|
| | | if not ItemCommon.CheckItemCanUse(curEquip):
|
| | | continue
|
| | | if curEquip.GetItemColor() < color:
|
| | | continue
|
| | | if suiteIDList and curEquip.GetSuiteID() not in suiteIDList:
|
| | | continue
|
| | | haveCnt += 1
|
| | | if needCnt and haveCnt >= needCnt:
|
| | | break
|
| | | return haveCnt
|
| | | |
| | | ##判断符合条件的已穿基础装备数量
|
| | | # @param None
|
| | | # @return None <Baseequipcnt cnt="cnt" classlv="" color="" suite="[suiteID,..]"/>
|
| | | def ConditionType_Baseequipcnt(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("cnt"), 0)
|
| | | classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classlv"), 0)
|
| | | color = GameWorld.ToIntDef(curActionNode.GetAttribute("color"), 0)
|
| | | suite = curActionNode.GetAttribute("suite")
|
| | | suiteIDList = eval(suite) if suite else []
|
| | | haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList, totalcnt)
|
| | | return haveCnt >= totalcnt
|
| | |
|
| | | ##法宝激活个数
|
| | | # @param None
|
| | |
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return PlayerMagicWeapon.GetMWActiveCntTotal(curPlayer) >= totalcnt
|
| | |
|
| | | ##总强化进化等级
|
| | | # @param None
|
| | | # @return None <Totalplusevolvelv value="cnt"/>
|
| | | def ConditionType_Totalplusevolvelv(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return ChEquip.GetTotalPlusEvolveLV(curPlayer) >= totalcnt
|
| | | ##总强化等级
|
| | | # @param None
|
| | | # @return None <Totalpluslv value="cnt"/>
|
| | |
| | | # @return None <Equiptotalstar value="cnt"/>
|
| | | def ConditionType_Equiptotalstar(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return #ChEquip.GetTotalEquipStars(curPlayer) >= totalcnt
|
| | | return ChEquip.GetTotalEquipStars(curPlayer) >= totalcnt
|
| | |
|
| | | ##装备宝石总等级
|
| | | # @param None
|
| | | # @return None <Equiptotalstone value="cnt"/>
|
| | | def ConditionType_Equiptotalstone(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return Operate_EquipStone.GetTotalStoneLV(curPlayer) >= totalcnt
|
| | |
|
| | | ##技能总等级
|
| | | # @param None
|
| | | # @return None <Totalskilllv value="" funcType="" skilllv=""/>
|
| | | def ConditionType_Totalskilllv(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | funcType = GameWorld.ToIntDef(curActionNode.GetAttribute("funcType"), 0)
|
| | | skilllv = GameWorld.ToIntDef(curActionNode.GetAttribute("skilllv"), 0)
|
| | | return SkillShell.GetSkillCntByFunc(curPlayer, funcType, skilllv) >= totalcnt
|
| | |
|
| | | ##设置已达到X等级的技能数量
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Skillcnt key="" funcType="" skilllv=""/>
|
| | | def DoType_Set_Skillcnt(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | funcType = GameWorld.ToIntDef(curActionNode.GetAttribute("funcType"), 0)
|
| | | skilllv = GameWorld.ToIntDef(curActionNode.GetAttribute("skilllv"), 0)
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, SkillShell.GetSkillCntByFunc(curPlayer, funcType, skilllv))
|
| | | return
|
| | |
|
| | | ##激活法宝,确认与成就逻辑后使用
|
| | | # @param None
|
| | |
| | | def DoType_Active_Magicweapon(curPlayer, curMission, curActionNode):
|
| | | mwID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | PlayerMagicWeapon.DoActiveMW(curPlayer, mwID)
|
| | | PlayerMagicWeapon.NotifyMagicWeapon(curPlayer)
|
| | | |
| | | return
|
| | |
|
| | | ## 人物隐身 <Visible id="0隐身1现身"/>
|
| | |
| | | return
|
| | |
|
| | |
|
| | | def DoType_Setfairydomain(curPlayer, curMission, curActionNode):
|
| | | GameWorld.DebugLog("DoType_Setfairydomain", curPlayer.GetID())
|
| | | ## 任务开启缥缈仙域 (做标记可寻访) <Setfairydomain/>
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainState):
|
| | | #若已在寻访中则先结束寻访
|
| | | PlayerFairyDomain.EndFairyDomain(curPlayer)
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 2)
|
| | | PlayerFairyDomain.NotifyVisitFairyDomainInfo(curPlayer)
|
| | | return |