hxp
2019-12-10 bd6221811f055ff6fb6c3a58b308d48fbca2465a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/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