hxp
2018-11-25 277715f147476b807ce46a3e839aa41b08ef2fc4
4762 【后端】助战机器人AI及伤血;
1个文件已修改
11 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py
@@ -25,6 +25,7 @@
import BaseAttack
import FBCommon
import AICommon
import GameMap
import random
@@ -76,8 +77,8 @@
        #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
@@ -92,9 +93,9 @@
        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())
        
    #---优先释放技能---