| | |
| | | import BaseAttack
|
| | | import FBCommon
|
| | | import AICommon
|
| | | import GameMap
|
| | |
|
| | | import random
|
| | |
|
| | |
| | | #GameWorld.DebugLog("没有攻击目标,跟随玩家!objID=%s" % curNPC.GetID())
|
| | | dist = GameWorld.GetDist(fbPlayer.GetPosX(), fbPlayer.GetPosY(), curNPC.GetPosX(), curNPC.GetPosY())
|
| | | if dist > 12:
|
| | | posX, posY = npcControl.GetMoveNearPos(fbPlayer.GetPosX(), fbPlayer.GetPosY(), 3)
|
| | | curNPC.ResetPos(posX, posY)
|
| | | resultPos = GameMap.GetEmptyPlaceInArea(fbPlayer.GetPosX(), fbPlayer.GetPosY(), 3)
|
| | | curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
|
| | | elif dist > 5:
|
| | | npcControl.MoveToObj_Detel(fbPlayer, 5)
|
| | | return
|
| | |
| | | return
|
| | | tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
|
| | | GameWorld.DebugLog(" 与目标距离: %s" % tagDist)
|
| | | if tagDist > 12:
|
| | | posX, posY = npcControl.GetMoveNearPos(curTag.GetPosX(), curTag.GetPosY(), 3)
|
| | | curNPC.ResetPos(posX, posY)
|
| | | if tagDist > 20:
|
| | | resultPos = GameMap.GetEmptyPlaceInArea(curTag.GetPosX(), curTag.GetPosY(), 3)
|
| | | curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
|
| | | tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
|
| | |
|
| | | #---优先释放技能---
|