| | |
| | | posPoint = GameMap.GetEmptyPlaceInArea(randPosX, randPosY, radius)
|
| | | return posPoint.GetPosX(), posPoint.GetPosY()
|
| | |
|
| | | def GetFBRobotRandomMovePos(curNPC):
|
| | | ## 获取副本中机器人随机移动坐标点
|
| | | |
| | | randPosList = []
|
| | | |
| | | crystalNPCIDPosDict = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldCrystal", 1, {})
|
| | | for posX, posY in crystalNPCIDPosDict.values():
|
| | | randPosList.append([posX, posY])
|
| | | |
| | | factionBuffPosList = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldFactionBuff", 2)
|
| | | for posList in factionBuffPosList:
|
| | | for posX, posY in posList:
|
| | | randPosList.append([posX, posY])
|
| | | |
| | | return random.choice(randPosList)
|
| | | #def GetFBRobotRandomMovePos(curNPC):
|
| | | # ## 获取副本中机器人随机移动坐标点
|
| | | # |
| | | # randPosList = []
|
| | | # |
| | | # crystalNPCIDPosDict = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldCrystal", 1, {})
|
| | | # for posX, posY in crystalNPCIDPosDict.values():
|
| | | # randPosList.append([posX, posY])
|
| | | # |
| | | # factionBuffPosList = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldFactionBuff", 2)
|
| | | # for posList in factionBuffPosList:
|
| | | # for posX, posY in posList:
|
| | | # randPosList.append([posX, posY])
|
| | | # |
| | | # return random.choice(randPosList)
|
| | |
|
| | | def __DoLogic_FB_Fighting(tick):
|
| | |
|
| | |
| | | killScoreKingNotifyList = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldScoreKing", 4)
|
| | | if index < len(killScoreKingNotifyList):
|
| | | msgMark = killScoreKingNotifyList[index]
|
| | | lineID = GameWorld.GetGameWorld().GetLineID()
|
| | | defMapID = GameWorld.GetMap().GetMapID()
|
| | | defPosX = defObj.GetPosX()
|
| | | defPosY = defObj.GetPosY()
|
| | | PlayerControl.FBNotify(msgMark, [atkFaction, atkName, defFaction, defObj.GetPlayerName(), kingScore, defMapID, defPosX, defPosY])
|
| | | PlayerControl.FBNotify(msgMark, [atkFaction, atkName, defFaction, defObj.GetPlayerName(), kingScore, defMapID, defPosX, defPosY, lineID])
|
| | |
|
| | | # 玩家击败积分王
|
| | | if atkObjType == IPY_GameWorld.gotPlayer and index == 0:
|
| | |
| | |
|
| | | return True
|
| | |
|
| | | def GetFBRobotCanAtkObjTypeIDList(curNPC):
|
| | | ## 获取副本中机器人可能可攻击的实例类型ID列表
|
| | | ## @return: [[objType, objID], ...]
|
| | | faction = NPCCommon.GetFaction(curNPC)
|
| | | if not faction:
|
| | | return []
|
| | | |
| | | defFaction = ShareDefine.CampType_Justice if faction == ShareDefine.CampType_Evil else ShareDefine.CampType_Evil
|
| | | objTypeIDList = []
|
| | | defFactionObj = GetBattleFactionObj(defFaction)
|
| | | for playerID in defFactionObj.onlinePlayerIDList:
|
| | | objTypeIDList.append([IPY_GameWorld.gotPlayer, playerID])
|
| | | |
| | | for robotID in defFactionObj.robotObjIDList:
|
| | | objTypeIDList.append([IPY_GameWorld.gotNPC, robotID])
|
| | | |
| | | random.shuffle(objTypeIDList) # 打乱顺序
|
| | | return objTypeIDList
|
| | | #def GetFBRobotCanAtkObjTypeIDList(curNPC):
|
| | | # ## 获取副本中机器人可能可攻击的实例类型ID列表
|
| | | # ## @return: [[objType, objID], ...]
|
| | | # faction = NPCCommon.GetFaction(curNPC)
|
| | | # if not faction:
|
| | | # return []
|
| | | # |
| | | # defFaction = ShareDefine.CampType_Justice if faction == ShareDefine.CampType_Evil else ShareDefine.CampType_Evil
|
| | | # objTypeIDList = []
|
| | | # defFactionObj = GetBattleFactionObj(defFaction)
|
| | | # for playerID in defFactionObj.onlinePlayerIDList:
|
| | | # objTypeIDList.append([IPY_GameWorld.gotPlayer, playerID])
|
| | | # |
| | | # for robotID in defFactionObj.robotObjIDList:
|
| | | # objTypeIDList.append([IPY_GameWorld.gotNPC, robotID])
|
| | | # |
| | | # random.shuffle(objTypeIDList) # 打乱顺序
|
| | | # return objTypeIDList
|
| | |
|
| | |
|
| | | ## 玩家攻击玩家是否有惩罚
|