| | |
| | | import EventReport
|
| | | import ChPlayer
|
| | | import FBHelpBattle
|
| | | import IpyGameDataPY
|
| | |
|
| | |
|
| | | #阶段时间
|
| | |
| | | def DoEnterFB(curPlayer, tick):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | GameWorld.DebugLog("DoEnterFB...", playerID)
|
| | | |
| | |
|
| | | gameFB = GameWorld.GetGameFB()
|
| | |
|
| | | if not FBCommon.GetHadDelTicket(curPlayer):
|
| | |
| | | fbLineTime = FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_QueenRelics, lineID)
|
| | | curPlayer.Sync_TimeTick(IPY_GameWorld.tttWaitStart, 0, fbLineTime[Def_PrepareTime] * 1000, True)
|
| | | EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_QueenRelics, lineID, ChConfig.CME_Log_Start)
|
| | | |
| | | helpIpyData = IpyGameDataPY.GetIpyGameData("FBHelpBattle", ChConfig.Def_FBMapID_QueenRelics, lineID)
|
| | | if helpIpyData:
|
| | | gameFB.SetGameFBDict(ChConfig.FBPD_HelpBattleFBBaseHurt, helpIpyData.GetRobotBaseHurt())
|
| | | gameFB.SetGameFBDict(ChConfig.FBPD_HelpBattleFBFightPower, helpIpyData.GetFightPowerMin())
|
| | | GameWorld.DebugLog(" 更新副本助战机器人基础伤害: lineID=%s,RobotBaseHurt=%s,fbFightPower=%s" |
| | | % (lineID, helpIpyData.GetRobotBaseHurt(), helpIpyData.GetFightPowerMin()))
|
| | | return
|
| | |
|
| | | ##副本总逻辑计时器
|
| | |
| | | FBCommon.NotifyFBHelp(curPlayer, lineID, fbHelpDict)
|
| | | return
|
| | |
|
| | | def DoFB_Npc_KillNPC(attacker, curNPC, tick):
|
| | | __FBNPCOnKilled(curNPC, tick)
|
| | | return
|
| | |
|
| | | ##玩家杀死NPC
|
| | | # @param curPlayer:玩家实例
|
| | | # @param curNPC:当前被杀死的NPC
|
| | |
| | | # @return 返回值无意义
|
| | | # @remarks 玩家主动离开副本.
|
| | | def DoFB_Player_KillNPC(curPlayer, curNPC, tick):
|
| | | __FBNPCOnKilled(curNPC, tick)
|
| | | return
|
| | |
|
| | | def __FBNPCOnKilled(curNPC, tick):
|
| | | curNPCID = curNPC.GetNPCID()
|
| | | gameFB = GameWorld.GetGameFB()
|
| | | killNPCCount = gameFB.GetGameFBDictByKey(FBKey_KillNPCCount % curNPCID) + 1
|
| | |
| | | EventShell.EventRespons_PassQueenRelecs(curPlayer, lineID, grade)
|
| | | #任务
|
| | | EventShell.EventRespons_FBEvent(curPlayer, "queenrelics_pass")
|
| | | FBCommon.NotifyFBOver(curPlayer, dataMapID, lineID, isPass, overDict)
|
| | |
|
| | | # 记录结算到的线路层,记录值+1
|
| | | updRewardLine = lineID + 1
|
| | |
| | | GameWorld.DebugLog("首次结算奖励,增加挑战次数!", playerID)
|
| | | needSyncFBData = True
|
| | | FBCommon.AddEnterFBCount(curPlayer, dataMapID)
|
| | | FBHelpBattle.DoSingleFBAddXianyuanCoin(curPlayer, mapID, lineID)
|
| | | addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, mapID, lineID)
|
| | | overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
|
| | | else:
|
| | | GameWorld.DebugLog("副本中过天,不增加挑战次数!", playerID)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_QueenRelicsEx, 1)
|
| | |
| | |
|
| | | if needSyncFBData:
|
| | | FBCommon.Sync_FBPlayerFBInfoData(curPlayer, dataMapID) # 同步信息
|
| | | |
| | | FBCommon.NotifyFBOver(curPlayer, dataMapID, lineID, isPass, overDict)
|
| | | return
|
| | |
|
| | | def __GivePlayerQueenRelicsReward(curPlayer, dataMapID, rewardLineID, curLineID, passGrade, maxGrade, rewardRateList):
|