#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#  
 | 
#  
 | 
##@package AIType_65.py  
 | 
#  
 | 
# @todo:SBÐÍNPCËÀÍö´¥·¢¼¼ÄÜ  
 | 
#  
 | 
# @author jiang  
 | 
# @date 2014-09-02 12:00  
 | 
# @version 1.0  
 | 
# @note:  
 | 
#  
 | 
#------------------------------------------------------------------------------   
 | 
"""Version = 2014-09-02 12:00"""  
 | 
#------------------------------------------------------------------------------   
 | 
# µ¼Èë  
 | 
import GameWorld  
 | 
import IPY_GameWorld  
 | 
import ChConfig  
 | 
import NPCCommon  
 | 
import SkillShell  
 | 
import GameObj  
 | 
#------------------------------------------------------------------------------  
 | 
  
 | 
#------------------------------------------------------------------------------   
 | 
## ³õʼ»¯  
 | 
#  @param curNPC µ±Ç°npc  
 | 
#  @return None  
 | 
#  @remarks   
 | 
def DoInit(curNPC):  
 | 
    curNPC.GetNPCAngry().Init(ChConfig.Def_SummonNPC_Angry_Count)  
 | 
    return  
 | 
  
 | 
  
 | 
## Ö´ÐÐAI  
 | 
#  @param curNPC µ±Ç°npc  
 | 
#  @param tick µ±Ç°Ê±¼ä  
 | 
#  @return None  
 | 
#  @remarks   
 | 
def ProcessAI(curNPC, tick):  
 | 
      
 | 
    #NPCÒÑËÀÍö£¬Ìø³ö  
 | 
    if curNPC.IsAlive() != True:  
 | 
        return  
 | 
      
 | 
    #»ñµÃNPC¹ÜÀíÆ÷  
 | 
    npcControl = NPCCommon.NPCControl(curNPC)  
 | 
    if curNPC.GetLastTime() != 0 and tick - curNPC.GetBornTime() >= curNPC.GetLastTime():  
 | 
        npcControl.SetKilled()  
 | 
        return  
 | 
      
 | 
    return  
 | 
  
 | 
  
 | 
## NPCËÀÍö  
 | 
#  @param curNPC µ±Ç°npc  
 | 
#  @param hurtType É˺¦ÕßµÄobjÀàÐÍ  
 | 
#  @param hurtID É˺¦ÕßµÄobjID  
 | 
#  @return None  
 | 
def OnDie(curNPC, hurtType, hurtID):  
 | 
      
 | 
    #ËÀÍöNPC²»Äܹ¥»÷, ÕâÀïÉèÖÃNPCѪÁ¿Îª1  
 | 
    GameObj.SetHP(curNPC, 1)  
 | 
      
 | 
    #»ñµÃ¼¼ÄܹÜÀíÆ÷  
 | 
    skillManager = curNPC.GetSkillManager()  
 | 
    curSkill = skillManager.GetSkillByIndex(0)  
 | 
    if not curSkill:  
 | 
        return  
 | 
      
 | 
    tick = GameWorld.GetGameWorld().GetTick()  
 | 
    SkillShell.NPCUseSkill(curNPC, curSkill, tick)  
 | 
      
 | 
    GameObj.SetHP(curNPC, 0)  
 | 
    return  
 | 
  
 |