Merge remote-tracking branch 'remotes/origin/master'
| | |
| | | RunQuestEvent(curPlayer, "on_buy_mission_sum", buyNum, Def_RunQuestType_RunAll)
|
| | | return
|
| | |
|
| | | ## 坐骑升阶
|
| | | # @param curPlayer 玩家实例
|
| | | # @param eventName
|
| | | # @return None
|
| | | def EventRespons_OnHorseUp(curPlayer, updClassLV, updStarLV):
|
| | | #星级*100+阶级
|
| | | RunQuestEvent(curPlayer, "on_horseup", updStarLV*100+updClassLV, Def_RunQuestType_Normal)
|
| | | return
|
| | |
|
| | | ## 穿装备触发判断所穿橙装数量
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | #法宝之魂激活
|
| | | RunQuestEvent(curPlayer, "mwsoulactive", soulid, Def_RunQuestType_RunAll)
|
| | | return
|
| | |
|
| | | def EventRespons_PassQueenRelecs(curPlayer, lineID):
|
| | | #S级通关X层娲皇遗迹
|
| | | RunQuestEvent(curPlayer, "passqueenrelecs", lineID, Def_RunQuestType_Normal)
|
| | | return
|
| | |
|
| | | def EventRespons_HorseUp(curPlayer, alllv):
|
| | | #坐骑升级
|
| | | RunQuestEvent(curPlayer, "horseup", alllv, Def_RunQuestType_Normal)
|
| | | return
|
| | |
|
| | | def EventRespons_SuitPlus(curPlayer, cnt):
|
| | | #2阶强化防具套装X件
|
| | | RunQuestEvent(curPlayer, "suitplus", cnt, Def_RunQuestType_Normal)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #================================================================================
|
| | |
| | | import PlayerSuccess
|
| | | import ItemControler
|
| | | import IpyGameDataPY
|
| | | import EventShell
|
| | |
|
| | |
|
| | | #//A3 17 套装合成#tagCMSuitCompose
|
| | |
| | | #先刷装备BUFF 再计算属性
|
| | | ChEquip.RefreshPlayerEquipAttribute(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | |
| | | __DoSuiteSuccess(curPlayer)
|
| | | return
|
| | |
|
| | | def CheckEquipSuitReduce(curPlayer, equipIndex):
|
| | |
| | | def __DoSuiteSuccess(curPlayer):
|
| | | PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_EquipSuit)
|
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | groupCnt = 0 #2阶强化防具套装件数
|
| | | for groupType, equipIndexList in equipSuitTypeDict.items():
|
| | | for i in equipIndexList:
|
| | | suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, i)
|
| | | for suiteType, lv in suiteInfo.items():
|
| | | if lv >= 2 and groupType == 1 and suiteType == 2:
|
| | | groupCnt +=1
|
| | | for j in xrange(1,lv+1):
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_EquipSuit, 1, [j, suiteType, int(groupType)])
|
| | | EventShell.EventRespons_SuitPlus(curPlayer, groupCnt)
|
| | | return |
| | |
| | | # @param curMission 任务实例
|
| | | # @param curConditionNode 节点信息
|
| | | # @return 返回值, 是否判断成功
|
| | | # @remarks <Have_Money value="期望值" check="查找对话中的货币" moneytype="货币类型 1元宝2礼券3银两" type="__Eval+替换的名字"/>
|
| | | # @remarks <Have_Money value="期望值" check="查找对话中的货币" moneytype="货币类型 1元宝2礼券3银两" type="__Eval+替换的名字" maxItem="需要物品数量" itemID="20410"/>
|
| | | def ConditionType_Have_Money(curPlayer, curMission, curConditionNode):
|
| | | #格式<have_money value="" type="" moneytype=""/>
|
| | | value = curConditionNode.GetAttribute("value")
|
| | |
| | | conditionValue = int(value)
|
| | | elif check != "":
|
| | | conditionValue = int(QuestRunnerValue.GetNPCTalkReplaceValue(curPlayer, curMission, check))
|
| | | |
| | | maxItemCnt = GameWorld.ToIntDef(curConditionNode.GetAttribute("maxItem"), 0)
|
| | | itemID = GameWorld.ToIntDef(curConditionNode.GetAttribute("itemID"), 0)
|
| | | if maxItemCnt and itemID: #未收集的道具个数乘以单价
|
| | | haveCnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemID)
|
| | | conditionValue = max(0, maxItemCnt-haveCnt)*value
|
| | | |
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | moneyType = int(curConditionNode.GetAttribute("moneytype"))
|
| | | goldValue = curPlayer.GetGold()
|
| | |
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Del_Money form_value="是否取对话的值" value="form_value为空取" moneytype="1元宝2礼券3银两" /> |
| | | # @remarks <Del_Money form_value="是否取对话的值" value="form_value为空取" moneytype="1元宝2礼券3银两" maxItem="需要物品数量" itemID="20410"/> |
| | | def DoType_Del_Money(curPlayer, curMission, curActionNode):
|
| | | #扣钱
|
| | | #格式<del_money form_value = ""value="" moneytype=""/>
|
| | |
| | | value = int(QuestRunnerValue.GetNPCTalkReplaceValue(curPlayer, curMission, form_value))
|
| | | else:
|
| | | value = int(curActionNode.GetAttribute("value"))
|
| | | |
| | | maxItemCnt = GameWorld.ToIntDef(curActionNode.GetAttribute("maxItem"), 0)
|
| | | itemID = GameWorld.ToIntDef(curActionNode.GetAttribute("itemID"), 0)
|
| | | if maxItemCnt and itemID: #未收集的道具个数乘以单价
|
| | | haveCnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemID)
|
| | | value = max(0, maxItemCnt-haveCnt)*value
|
| | |
|
| | | moneytype = int(curActionNode.GetAttribute("moneytype"))
|
| | |
|
| | |
| | | key = curActionNode.GetAttribute("key")
|
| | | curMission.SetProperty(key, PlayerMagicWeapon.GetMWActiveCntTotal(curPlayer))
|
| | | return
|
| | |
|
| | | ##设置坐骑总等级
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Horsetotallv key="" />
|
| | | def DoType_Set_Horsetotallv(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | curMission.SetProperty(key, PlayerHorse.GetHorseSumLV(curPlayer))
|
| | | return
|
| | | #---------------------------------------------------------------------
|
| | | ##DoType_调度器
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | soulID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return bool(PlayerMagicWeapon.GetIsActiveMWSoul(curPlayer, soulID))
|
| | |
|
| | | ##S级通关X层娲皇遗迹
|
| | | # @param None
|
| | | # @return None <Passqueenrelecs value="lineID"/>
|
| | | def ConditionType_Passqueenrelecs(curPlayer, curMission, curActionNode):
|
| | | lineID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | grade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [ChConfig.Def_FBMapID_QueenRelics])
|
| | | maxGrade = len(FBCommon.GetFBLineGrade(ChConfig.Def_FBMapID_QueenRelics, lineID))
|
| | | return grade >=maxGrade
|
| | |
|
| | | ##坐骑总等级
|
| | | # @param None
|
| | | # @return None <Horsetotallv value="lv"/>
|
| | | def ConditionType_Horsetotallv(curPlayer, curMission, curActionNode):
|
| | | totallv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return PlayerHorse.GetHorseSumLV(curPlayer) >= totallv
|
| | |
|
| | | ##2阶强化防具套装件数
|
| | | # @param None
|
| | | # @return None <Mwsoul value="id"/>
|
| | | def ConditionType_SuitPlus(curPlayer, curMission, curActionNode):
|
| | | needCnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | |
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | groupCnt = 0 #2阶强化防具套装件数
|
| | | for groupType, equipIndexList in equipSuitTypeDict.items():
|
| | | for i in equipIndexList:
|
| | | suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, i)
|
| | | for suiteType, lv in suiteInfo.items():
|
| | | if lv >= 2 and groupType == 1 and suiteType == 2:
|
| | | groupCnt +=1
|
| | | return groupCnt >= needCnt
|
| | |
|
| | |
|
| | | ##激活法宝,确认与成就逻辑后使用
|
| | | # @param None
|
| | | # @return None <Active_Magicweapon id="法宝ID"/>
|
| | |
| | | #成就
|
| | | if grade >= maxGrade:
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_QueenRelics, 1, [lineID+1])
|
| | | EventShell.EventRespons_PassQueenRelecs(curPlayer, lineID)
|
| | | #任务
|
| | | EventShell.EventRespons_FBEvent(curPlayer, "queenrelics_pass")
|
| | | FBCommon.NotifyFBOver(curPlayer, dataMapID, lineID, isPass, overDict)
|
| | |
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_HorseAllLV, 1, [horseID, updClassLV])
|
| | |
|
| | | EventShell.EventRespons_HorseLV(curPlayer, updClassLV)
|
| | | |
| | | EventShell.EventRespons_HorseUp(curPlayer)
|
| | |
|
| | | addLV = updClassLV - horseLV
|
| | | if addLV:
|
| | |
| | | #EventReport.WriteEvent_custom_mission_log(curPlayer, ChConfig.CME_Class_Horse, ChConfig.CME_Log_End, 1, cmeInfoEx=str(updateClassLV))
|
| | | sumLV = GetHorseSumLV(curPlayer)
|
| | | PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_Horse, sumLV)
|
| | |
|
| | | # 刷属性,更新排行榜
|
| | | RefreshHorseAttr(curPlayer)
|
| | | # 玩家马匹进阶
|