| | |
| | | totallv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return PlayerHorse.GetHorseSumLV(curPlayer) >= totallv
|
| | |
|
| | | ##已选择的专精技能数量是否达到
|
| | | ##某主技能对应专精技能达到激活X等级的数量是否达到
|
| | | # @param None
|
| | | # @return None <Elementskillcnt value="cnt"/>
|
| | | # @return None <Elementskillcnt value="cnt" mainskill="[]" activelv=""/>
|
| | | def ConditionType_Elementskillcnt(curPlayer, curMission, curActionNode):
|
| | | cnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return SkillShell.GetElementSkillCnt(curPlayer) >= cnt
|
| | | mainskill = curActionNode.GetAttribute("mainskill")
|
| | | mainSkillIDList = eval(mainskill) if mainskill else []
|
| | | activeLV = GameWorld.ToIntDef(curActionNode.GetAttribute("activelv"), 1)
|
| | | return SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV) >= cnt
|
| | |
|
| | | ##设置已选择的专精技能数量
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Elementskillcnt key="" />
|
| | | # @remarks <Set_Elementskillcnt key="" mainskill="[]" activelv=""/>
|
| | | 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)
|
| | | curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer))
|
| | | curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV))
|
| | | return
|
| | |
|
| | | ##设置符合条件的已穿基础装备数量
|
| | |
| | | curMission.SetProperty(key, haveCnt)
|
| | | return
|
| | | def __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList):
|
| | | #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:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, place)
|
| | | if not ipyData:
|
| | | break
|
| | | 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
|
| | | 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
|
| | | return haveCnt
|
| | |
|
| | | ##判断符合条件的已穿基础装备数量
|
| | |
| | |
|
| | | ##技能总等级
|
| | | # @param None
|
| | | # @return None <Totalskilllv value="" funcType=""/>
|
| | | # @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)
|
| | | return SkillShell.GetAllSkillLV(curPlayer, funcType) >= totalcnt
|
| | | 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
|