| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #---------------------------------------------------------------------  | 
| #  | 
| #---------------------------------------------------------------------  | 
| ##@package AIType_50  | 
| # @todo: Å®Éñ¸±±¾ Å®ÉñAI  | 
| #  | 
| # @author adaws  | 
| # @date 2010-11-17 19:10  | 
| # @version 1.4  | 
| #  | 
| # @note:   | 
| # @change: "2010-11-18 11:00" adaws ¼ÓNPC¼¤»î  | 
| # @change: "2010-11-18 18:00" adaws NPCË¢BUFF ÇåBUFFÖ®ÀàµÄ Éè³ÉÄܲ»Äܹ¥»÷  | 
| # @change: "2010-11-19 12:00" adaws Å®ÉñѪÁ¿²»¹»µÄʱºò¼ÓÎÞµÐ״̬  | 
| # @change: "2014-10-16 20:00" hxp »¹ÔAI  | 
| #---------------------------------------------------------------------  | 
| """Version = 2014-10-16 20:00"""  | 
| #---------------------------------------------------------------------  | 
| import IPY_GameWorld  | 
| import ChConfig  | 
| import FBDefenseCommon  | 
| import NPCCommon  | 
| import GameObj  | 
| #---------------------------------------------------------------------  | 
|   | 
| Def_UseSkillLivePercent = 3000  | 
| #---------------------------------------------------------------------  | 
| ## ³õʼ»¯  | 
| #  @param curNPC µ±Ç°npc  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoInit(curNPC):  | 
|     curNPC.GetNPCAngry().Init(ChConfig.Def_NormalNPCAngryCount)  | 
|     curNPC.SetDict(FBDefenseCommon.NPCKey_UseSkillHpPercent, Def_UseSkillLivePercent)  | 
|     return  | 
|   | 
|   | 
| ## Ö´ÐÐAI  | 
| #  @param curNPC µ±Ç°npc  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def ProcessAI(curNPC, tick):  | 
|     if curNPC.GetCurAction() == IPY_GameWorld.laNPCDie or not curNPC.IsAlive():  | 
|         return  | 
|   | 
|     npcControl = NPCCommon.NPCControl(curNPC)  | 
|     #Ë¢ÐÂ×Ô¼ºµÄbuff  | 
|     npcControl.RefreshBuffState(tick)  | 
|     if GameObj.GetHP(curNPC) == 0 :  | 
|         # BUFFË¢ÐÂÖпÉÄܻᵼÖÂNPCËÀÍö  | 
|         return  | 
|     if FBDefenseCommon.SkillCheckCallback(curNPC, curNPC, 0, tick, FBDefenseCommon.CallbackCheckHpPercent):  | 
|         return  | 
|       | 
|      |