[Statedef -3]
;[State AI];胜利嘲讽（不建议使用，若觉得鞭尸不好看，可选择开启，去掉全部的;符号即可）
;type = ChangeState
;value = 199
;triggerall = var(59) =2
;triggerall = alive
;triggerall = enemy,alive=0
;triggerall = winko
;triggerall = stateno != 199
;triggerall = Prevstateno != 199 
;trigger1 = ctrl
;random=[0,500]

;防御
[State ];僈乕僪
Type=ChangeState
Value=120
triggerall=Var(59)>=1
triggerall=roundstate=2
TriggerAll=StateNo!=[120,155]
TriggerAll=Ctrl || (stateno = 100)
TriggerAll=inguarddist
Trigger1=1

;防御中反击
[State AI]
type = SelfState
value = 2900
triggerall = Var(59) >= 1
triggerall = alive
triggerall = roundstate = 2
triggerall = stateno = [150,160]
trigger1 = power >= 1000

[State -3,Dusk Helper投]
type = ChangeState
value = 1150
triggerall = !ishelper;这不是helper
triggerall = var(59) = 1;在ai启动中
triggerall = statetype != A;自己不在空中
;triggerall = enemynear(var(50)),statetype != A;对方不在空中
;triggerall = enemynear(var(50)),statetype != L;对方不在倒地状态
;triggerall = enemynear(var(50)),movetype != H;对方不在受击状态
triggerall = roundstate = 2;在对局中
triggerall = alive != 0;自己活着
triggerall = P2Dist X = [0,80];攻击距离计算
triggerall = enemynear,stateno = 15000;允许的状态
triggerall = enemynear(var(50)),time = [0,1];允许的状态
trigger1 = ctrl || stateno = 18 || stateno = 19 || stateno = 52 || stateno = 53 || stateno = 108 || stateno = 101;允许的状态
trigger2 = stateno = 120 || stateno = 130 || stateno = 131 || stateno = 140;允许的状态
trigger3 = stateno = 700 || stateno = 701;允许的状态

;防御中闪避
;[State AI]
;type = SelfState
;value = 700
;triggerall = Var(59) >= 1
;triggerall = alive
;triggerall = roundstate = 2
;triggerall = life <= 800
;triggerall = stateno = [120,160]
;trigger1 = ctrl


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
;AI等级1的情况下

[State ,僔僃儖儈乕僋儔僢僠]
type=ChangeState
value=1200
triggerall=var(59)=1
triggerall=palno=[10,12]
triggerall=alive
triggerall=Random=[0,199]
trigger1=stateno=150
trigger2=stateno=151


[State ,慜曽夞旔]
type=NULL;ChangeState ;2017 11 23
value=700
triggerall=var(59)=1
triggerall=palno!=[1,3]
triggerall=!var(58)
triggerall=p2movetype=A
triggerall=ctrl
Trigger1=Random=[0,199]


[State ,屻曽夞旔]
type=NULL;ChangeState ;2017 11 23
value=701
triggerall=var(59)=1
triggerall=palno!=[1,3]
triggerall=!var(58)
triggerall=p2movetype=A
triggerall=ctrl
Trigger1=Random=[200,499]


[State 偳偙偒傖傫夞旔]
type=NULL;ChangeState ;2017 11 23
value=700
triggerall=var(59)=1
triggerall=palno!=[1,5]
triggerall=!var(58)
triggerall=stateno=[0,1399]
triggerall=p2movetype=A
triggerall=movetype=A
trigger1=P2BodyDist X>5
trigger1=EnemyNear,Time=[0,300]
[State ]
type=ChangeState
value=1250
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=!(enemynear,hitdefattr=SCA,AP)
triggerall=P2BodyDist X>=10
triggerall=enemynear,movetype=A
Trigger1=Random=[0,99]
trigger1=ctrl


[State ];僈乕僪
Type=ChangeState
Value=120
triggerall=var(59)=1
triggerall=roundstate=2
TriggerAll=StateNo!=[120,155]
TriggerAll=Ctrl || (stateno = 100)
TriggerAll=inguarddist
Trigger1=1


[State ,僔僃儖儈乕僗僷僀儔儖]
type=ChangeState
value=1150
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X<=50
triggerall=P2BodyDist X>=-5
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl


[State ,僀僫僘儅儗僢僌儔儕傾乕僩]
type=ChangeState
value=2500
triggerall=var(59)=1
triggerall=power>=1000
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-90
triggerall=enemynear,stateno!=[5120,5150]
triggerall=statetype!=A
Trigger1=Random=[0,99]
trigger1=ctrl


[State -1,1]
type=ChangeState
value=2150
triggerall=var(59)=1
triggerall=power>=3000
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
Trigger1=Random=[0,399]
trigger1=ctrl


[State ,塣柦偺栴]
type=ChangeState
value=2600
triggerall=var(59)=1
triggerall=power>=1000 || ((life<=lifemax*.3) && (palno!=1))
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=75
triggerall=ctrl
trigger1=palno=[1,6]
Trigger1=Random=[0,199]
trigger2=palno=[7,12]
Trigger2=Random=[0,299]


[State ,曄恎]
type=ChangeState
value=2900
triggerall=var(59)=1
triggerall=power>=3000
triggerall=enemynear,stateno!=[5120,5150]
triggerall=statetype!=A
triggerall=P2BodyDist X>0
Trigger1=Random=[0,99]
trigger1=ctrl


[State ,偍偭傁偄搳偘]
type=ChangeState
value=260
triggerall=var(59)=1
triggerall=power>=1000
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
trigger1=P2BodyDist X<=100
Trigger1=Random=[0,199]
trigger1=ctrl


[State ]
type=ChangeState
value=1050
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5100,5150]
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl


[State ]
type=ChangeState
value=1100
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=80
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl


[State ,柍寧偺棆塤]
type=ChangeState
value=1650
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=((enemynear,vel x <=2.0)&&P2BodyDist X>=115) || (P2BodyDist X<=220 && P2BodyDist X>=150)
Trigger1=Random=[0,199]
trigger1=ctrl


[State ,堫嵢儗僢僌儔儕傾乕僩]
type=ChangeState
value=2200
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5100,5150]
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-90
triggerall=!inguarddist
Trigger1=Random=[0,99]
trigger1=ctrl


[State ,敧棆恄]
type=ChangeState
value=1800
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl


[State ,敧欯撱偺曏]
type=ChangeState
value=1600
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=((enemynear,vel x <=2.0)&&P2BodyDist X>=120) || (P2BodyDist X>=90 && P2BodyDist X<=120 && enemynear,movetype=A)
Trigger1=Random=[0,199]
trigger1=ctrl


[State ]
type=ChangeState
value=1300
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=140
Trigger1=Random=[0,199]
trigger1=ctrl


[State ,埫崟棆岝対]
type=ChangeState
value=2300
triggerall=var(59)=1
triggerall=power>=1000
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-120
trigger1=P2BodyDist X<=90
Trigger1=Random=[0,99]
trigger1=ctrl


[State ,僔僃儖儈乕僼儔僢僔儏]
type=ChangeState
value=800
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,299]
trigger1=ctrl


[State ,搳偘偭傁側偟]
type=ChangeState
value=850
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,299]
trigger1=ctrl


[State ,戝崻搳偘]
type=ChangeState
value=2800
triggerall=var(59)=1
triggerall=statetype!=A
triggerall=enemynear,vel x <=0
triggerall=frontedgebodydist>=100
triggerall=P2BodyDist X>=120
Trigger1=Random=[0,99]
trigger1=ctrl
[State ]
type=ChangeState
triggerall=var(59)=1
trigger1=stateno=40
trigger2=stateno=20 
value=0



;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
;AI等级2的情况下


[State AI]
type = ChangeState
value =20000
triggerall = var(59) = 2
triggerall = palno = 12
triggerall = power>=3000
triggerall = alive
triggerall = roundstate = 2
triggerall = random <= 100
triggerall = statetype != A
trigger1 = ctrl

[State AI]
type = ChangeState
value =20000
triggerall = var(59) = 2
triggerall = life <= lifemax*0.4
triggerall = power>=3000
triggerall = alive
triggerall = roundstate = 2
triggerall = enemy(0),hitdefattr = SCA,AA,AT,AP
triggerall = statetype != A
trigger1 = ctrl


[State AI]
type = ChangeState
value = 20000
triggerall = var(59) =2
triggerall = life <= lifemax*0.4
triggerall = power>=5000
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl


[State AI]
type = ChangeState
value = 1250
TriggerAll = var(59)=2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemy(0),hitdefattr = SCA,AA,AT,AP
triggerall = P2bodydist X <= 50
trigger1 = ctrl
trigger2 = stateno = 700 && Time = 10

[State AI]
type = NULL;ChangeState ;2017 11 23
value = 700
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2bodydist X > 50
trigger1 = ctrl
trigger2 = stateno = 850 && Time = 60

[State AI]
type = NULL;ChangeState ;2017 11 23
value = 700
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2bodydist X > 50
triggerall = life <= 100
trigger1 = ctrl

[State AI]
type = ChangeState
value = 1150
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2bodydist X <= 50
triggerall = life <= 500
trigger1 = ctrl
trigger2 = stateno = 700 && Time = 10

[State AI]
type = ChangeState
value = 1150
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2bodydist X <= 50
triggerall = life <= 500
trigger1 = ctrl

[State ,僔僃儖儈乕僋儔僢僠]
type=ChangeState
value=1200
triggerall=var(59)=2
triggerall = alive
triggerall=palno=[10,12]
triggerall=alive
triggerall=Random=[0,199]
trigger1=stateno=150
trigger2=stateno=151

[State ,慜曽夞旔]
type=NULL;ChangeState ;2017 11 23
value=700
triggerall=var(59)=2
triggerall = alive
triggerall=palno!=[1,3]
triggerall=!var(58)
triggerall=p2movetype=A
triggerall=ctrl
Trigger1=Random=[0,199]



[State ,屻曽夞旔]
type=NULL;ChangeState ;2017 11 23
value=701
triggerall=var(59)=2
triggerall = alive
triggerall=palno!=[1,3]
triggerall=!var(58)
triggerall=p2movetype=A
triggerall=ctrl
Trigger1=Random=[200,499]



[State 偳偙偒傖傫夞旔]
type=NULL;ChangeState ;2017 11 23
value=700
triggerall=var(59)=2
triggerall = alive
triggerall=palno!=[1,5]
triggerall=!var(58)
triggerall=stateno=[0,1399]
triggerall=p2movetype=A
triggerall=movetype=A
trigger1=P2BodyDist X>5
trigger1=EnemyNear,Time=[0,300]



[State ,柍寧偺棆塤]
type=ChangeState
value=1755
triggerall=var(59)=2
triggerall=statetype!=A
triggerall=((enemynear,vel x <=2.0)&&P2BodyDist X>=100) || (P2BodyDist X<=150 && P2BodyDist X>=150)
Trigger1=Random=[0,199]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108


[State ,柍寧偺棆塤]
type=ChangeState
value=1650
triggerall=var(59)=2
triggerall=statetype!=A
triggerall=((enemynear,vel x <=2.0)&&P2BodyDist X>=75) || (P2BodyDist X<=220 && P2BodyDist X>=150)
triggerall=numproj < 3
Trigger1=Random=[0,299]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108


[State ,敧欯撱偺曏]
type=ChangeState
value=1600
triggerall=var(59)=2
triggerall=statetype!=A
triggerall=((enemynear,vel x <=2.0)&&P2BodyDist X>=120) || (P2BodyDist X>=90 && P2BodyDist X<=120 && enemynear,movetype=A)
Trigger1=Random=[0,299]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108


[State ]
type=ChangeState
value=1250
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=!(enemynear,hitdefattr=SCA,AP)
triggerall=P2BodyDist X>=10
triggerall=enemynear,movetype=A
Trigger1=Random=[0,99]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ];僈乕僪
Type=ChangeState
Value=120
triggerall=var(59)=2
triggerall = alive
triggerall=roundstate=2
TriggerAll=StateNo!=[120,155]
TriggerAll=Ctrl || (stateno = 100)
TriggerAll=inguarddist
Trigger1=1



[State ,僔僃儖儈乕僗僷僀儔儖]
type=ChangeState
value=1150
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X<=50
triggerall=P2BodyDist X>=-5
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,僀僫僘儅儗僢僌儔儕傾乕僩]
type=ChangeState
value=2500
triggerall=var(59)=2
triggerall = alive
triggerall=power>=1000
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-90
triggerall=enemynear,stateno!=[5120,5150]
triggerall=statetype!=A
Trigger1=Random=[0,99]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State -1,1]
type=ChangeState
value=2150
triggerall=var(59)=2
triggerall = alive
triggerall=power>=3000
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
Trigger1=Random=[0,399]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,塣柦偺栴]
type=ChangeState
value=2600
triggerall=var(59)=2
triggerall = alive
triggerall=power>=1000 || ((life<=lifemax*.3) && (palno!=1))
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=75
triggerall=ctrl || stateno = 18 || stateno = 19 || stateno = 108
trigger1=palno=[1,6]
Trigger1=Random=[0,199]
trigger2=palno=[7,12]
Trigger2=Random=[0,299]



[State ,曄恎]
type=ChangeState
value=2900
triggerall=var(59)=2
triggerall=alive
triggerall=power>=1000
;triggerall=enemynear,stateno!=[5120,5150]
triggerall=statetype!=A
triggerall=P2BodyDist X>0
Trigger1=Random=[0,99]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,偍偭傁偄搳偘]
type=ChangeState
value=260
triggerall=var(59)=2
triggerall = alive
triggerall=power>=1000
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
trigger1=P2BodyDist X<=100
Trigger1=Random=[0,199]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ]
type=ChangeState
value=1050
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5100,5150]
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ]
type=ChangeState
value=1100
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=80
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,堫嵢儗僢僌儔儕傾乕僩]
type=ChangeState
value=2200
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5100,5150]
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-90
triggerall=!inguarddist
Trigger1=Random=[0,99]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,敧棆恄]
type=ChangeState
value=1800
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,199]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ]
type=ChangeState
value=1300
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=140
Trigger1=Random=[0,299]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,埫崟棆岝対]
type=ChangeState
value=2300
triggerall=var(59)=2
triggerall = alive
triggerall=power>=1000
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=p2bodydist y>=-120
trigger1=P2BodyDist X<=90
Trigger1=Random=[0,99]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,僔僃儖儈乕僼儔僢僔儏]
type=ChangeState
value=800
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,299]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,搳偘偭傁側偟]
type=ChangeState
value=850
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,stateno!=[5120,5150]
triggerall=P2BodyDist X>0
triggerall=P2BodyDist X<=60
triggerall=p2bodydist y>=-90
Trigger1=Random=[0,299]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State ,戝崻搳偘]
type=ChangeState
value=2800
triggerall=var(59)=2
triggerall = alive
triggerall=statetype!=A
triggerall=enemynear,vel x <=0
triggerall=frontedgebodydist>=100
triggerall=P2BodyDist X>=120
Trigger1=Random=[0,99]
trigger1=ctrl || stateno = 18 || stateno = 19 || stateno = 108



[State AI]
type = Turn
triggerall = var(59) = 2
trigger1 = ctrl
trigger2 = stateno = 1260 && Time = 52

[State AI]
type = ChangeState
value = 1150
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1260 && Time = 53


[State AI]
type = ChangeState
value = 235
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = P2BodyDist Y>=-30
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1310 && Time = 75


[State AI]
type = ChangeState
value = 1150
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1310 && Time = 120


[State AI]
type = ChangeState
value = 1300
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1405 && Time = 25


[State AI]
type = ChangeState
value = 251
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 235 && Time = 15


[State AI]
type = ChangeState
value = 1600
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 251 && Time = 13


[State AI]
type = Turn
triggerall = var(59) =2
trigger1 = ctrl
trigger2 = stateno = 1000 && Time = 1
[State AI]
type = ChangeState
value = 1000
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = P2BodyDist X <=50
trigger1 = ctrl
trigger2 = stateno = 1600 && Time = 45


[State AI]
type = ChangeState
value = 1050
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = power<1000
trigger1 = ctrl
trigger2 = stateno = 1005 && Time = 17


[State AI]
type = ChangeState
value = 2400
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = P2BodyDist X<=80
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 1005 && Time = 5


[State AI]
type = Turn
triggerall = var(59) =2
trigger1 = ctrl
trigger2 = stateno = 2450 && Time = 1
[State AI]
type = ChangeState
value = 2450
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = P2BodyDist X<-180
triggerall = power>=3000
trigger1 = ctrl
trigger2 = stateno = 2400


[State AI]
type = ChangeState
value = 1300
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 2455 && Time = 10


[State AI]
type = ChangeState
value = 1700
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = P2BodyDist Y<-30
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1310 && Time = 75


[State AI]
type = ChangeState
value = 1100
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = BackEdgeBodyDist < 25
triggerall = P2BodyDist Y<-30
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1700 && Time = 25


[State AI]
type = ChangeState
value = 1500
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = BackEdgeBodyDist >= 25
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1700 && Time = 15


[State AI]
type = ChangeState
value = 1600
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = frontedgebodydist >= 35
trigger1 = ctrl
trigger2 = stateno = 1505 && Time = 1


[State AI]
type = ChangeState
value = 1100
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = frontedgebodydist < 35
trigger1 = ctrl
trigger2 = stateno = 1505 && Time = 1


[State AI]                                                 
type = ChangeState                                         
value = 1050
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1600 && Time = 60


[State AI]
type = ChangeState
value = 1100
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1060 && Time = 60


[State AI]
type = ChangeState
value = 260
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 1110 && Time = 30


[State AI]
type = ChangeState
value = 1350
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = power<1000
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 2001 && Time = 150


[State AI]
type =ChangeState
value = 1300
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = power<1000
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno =1365 && Time = 35


[State AI]
type = ChangeState
value = 2400
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = power>=1000
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno =1365 && Time = 35


[State AI]
type = ChangeState
value =20000
triggerall = var(59) = 2
triggerall = life <= 300
triggerall = power>=3000
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 261 && Time = 80


[State AI]
type = ChangeState
value = 2050
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = life <= 500
triggerall = power>=3000
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 261 && Time = 80


[State AI]
type = ChangeState
value = 22000
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = power>=3000
triggerall = Random>700
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 261 && Time = 80

[State AI]
type = ChangeState
value =2900
triggerall = var(59) = 2
triggerall = random <= 500
triggerall = power>=1000
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 261 && Time = 80

[State AI]
type = ChangeState
value = 1800
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
trigger1 = ctrl
trigger2 = stateno = 261 && Time = 80


[State AI]
type = ChangeState
value = 2200
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 1801 && Time = 60


[State AI]
type = NULL;ChangeState ;2017 11 23
value = 700
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
trigger1 = ctrl
trigger2 = stateno = 2205 && Time = 20


[State AI]
type = ChangeState
value = 2000
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 2200 && Time = 30


[State AI]
type = ChangeState
value = 2150
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power>=3000
trigger1 = ctrl
trigger2 = stateno = 2001 && Time = 160


[State AI]
type = ChangeState
value = 2100
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 2001 && Time = 160


[State AI]
type = ChangeState
value = 2300
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 2101 && Time = 120


[State AI]
type = ChangeState
value = 1800
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power<1000
trigger1 = ctrl
trigger2 = stateno = 2300 && Time = 80


[State AI]
type = ChangeState
value = 2400
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 2300 && Time = 100


[State AI]
type = ChangeState
value = 22000
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = Random<300
triggerall = power>=3000
trigger1 = ctrl
trigger2 = stateno = 2154 && Time = 40

[State AI]
type = ChangeState
value = 2350
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = Random<300
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 2300 && Time = 80

[State AI]
type = ChangeState
value = 2300
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = Random<300
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 2154 && Time = 40

[State AI]
type = ChangeState
value = 2500
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype = H
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno = 2154 && Time = 40


[State AI]
type = ChangeState
value = 2050
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power>=3000
trigger1 = ctrl
trigger2 = stateno =2525 && Time = 25


[State AI]
type = ChangeState
value = 2000
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power>=1000
trigger1 = ctrl
trigger2 = stateno =2525 && Time = 25


[State AI]
type =NULL;ChangeState ;2017 11 23
value = 700
triggerall = var(59) =2
triggerall = alive
triggerall = roundstate = 2
triggerall = enemynear,movetype = H
triggerall = power<1000
trigger1 = ctrl
trigger2 = stateno =2525 && Time = 25
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
;AI等级3的情况下


;---------------------------------------------------------------------------
;AI等级4的情况下

[State AI]
type = ChangeState
value =2607
triggerall = var(59) =4
triggerall = alive
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
;trigger2 = stateno = 0 && Time = 0

;zouwei
[State -1]
type = changestate
value = ifelse(Random <= 500,700,701)
triggerall=Var(59)>=1
triggerall = roundstate = 2 && statetype !=A
trigger1 = P2dist X = [-70,70]
trigger1 = facing !=enemy,facing
trigger1 = enemynear,numproj >=1 || (enemynear,numhelper >=1 && p2movetype = A)
triggerall  = stateno = 108
[State -3]
type = ChangeState
value = 108
triggerall=Var(59)>=1 && roundstate  = 2
triggerall = Statetype != A
triggerall = p2statetype != A
Trigger1 = stateno != 108
trigger1 = prevstateno != 108
trigger1 = p2movetype != H
trigger1 = ctrl
trigger1 = P2dist X != [-50,50]
[State -3]
type = ChangeState
value = 108
triggerall=Var(59)>=1 && roundstate  = 2
triggerall = Statetype != A
triggerall = p2statetype != A
Trigger1 = stateno != 108
trigger1 = prevstateno != 108
trigger1 = p2movetype = H
trigger1 = ctrl|| stateno = 0 || stateno = 18|| stateno = 19 || stateno = 10
trigger1 = P2dist X != [-40,40]
[State -3]
type = ChangeState
value = 105
triggerall=Var(59)>=1
trigger1 = Frontedgebodydist <= 10
trigger1 = stateno = 108
[State -3]
type = ChangeState
value = 19
triggerall=Var(59)>=1
triggerall = roundstate = 2
Trigger1 = P2BodyDist X =[-10,10]
trigger1 = stateno = 108
[State -3,]
type = ChangeState
value = 19
triggerall=Var(59)>=1 && roundstate  = 2
Trigger1 = stateno = 18 && time= 8
[State -3]
type = ChangeState
value = 18
triggerall=Var(59)>=1 && roundstate  = 2
Trigger1 = stateno = 19 && time= 8
[state -1]
type = ChangeState
value = ifelse(Random <= 500,18,19)
triggerall = roundstate = 2 && Var(59)>=1 && statetype !=A
triggerall= stateno = 108
triggerall = p2statetype != A && p2statetype != L
triggerall = p2movetype != H
trigger1 = P2dist X = [100,150]
[State -3,]
type = ChangeState
value = ifelse(Random <= 500,700,710)
triggerall =  life<= 150
triggerall=Var(59)>=1 && statetype !=A
triggerall = p2statetype != C
triggerall = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 101  || stateno = 18|| stateno = 19 || stateno = 10
trigger1 = inguarddist&& p2movetype !=H
trigger2 = p2bodydist x < 0 && p2movetype = A
[State -3,]
type = ChangeState
value = ifelse(Random <= 500,700,701)
triggerall =  life<= 150
triggerall=Var(59)>=1 && statetype !=A
triggerall = p2statetype = C
triggerall = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 101  || stateno = 18|| stateno = 19 || stateno = 10 && p2statetype !=A
trigger1 = inguarddist && p2movetype !=H
trigger2 = p2bodydist x < 0 && p2movetype = A


;------------------------------------------------------------------------------

;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------

[state ]
type = varset
trigger1 = !ishelper
var(56)=gametime*255
ignorehitpause=1

;---------------------------------------------------------------------------
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 106
value = 41, 0

[State -3, 2];僕儍儞僾壒
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) <= 0
value = 40, 0
channel = 3

[State -3, 2];僕儍儞僾壒
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) > 1
value = 40, 1
channel = 3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 僴僀僕儍儞僾張棟
[State -3, 5];僴僀僕儍儞僾敾掕
type = varset
trigger1 = stateno = 10
trigger1 = time = 0
trigger2 = stateno = 100
v = 15
value = 20

[State -3, 5];僴僀僕儍儞僾徚嫀
type = varset
trigger1 = stateno = 52
trigger1 = time = 0
v = 15
value = 0

; 彫僕儍儞僾張棟
[State -3, 5];彫僕儍儞僾敾掕
type = varset
trigger1 = stateno = 40
trigger1 = command != "holdup"
v = 16
value = 1

[State -3, 5];彫僕儍儞僾徚嫀
type = varset
trigger1 = stateno = 40
trigger1 = command = "holdup"
v = 16
value = 0

[State -3, 5]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 42
trigger1 = time = 1
trigger1 = var(15) >= 1
x = 5
;y = -9


[State -3, 5]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 43
trigger1 = time = 1
trigger1 = var(15) >= 1
x = -5
;y = -9

[State -3, 5];彫僕儍儞僾
type = veladd
trigger1 = stateno = 50
trigger1 = time = 1
trigger1 = var(16) = 1
y = 3

[State -3, 5]
type = AfterImage
trigger1 = stateno = 50
trigger1 = time = 1
trigger1 = var(15) >= 1
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
;type = VarRandom
;triggerall = var(59) =2
;trigger1 = Time = 0
;trigger1 = movecontact
;v = 35
;range = 0,9

;-----------------------------------------------------------------------------
[Statedef 18]
type    = S
physics = N
sprpriority = 2
Anim = 21
velset = 0,0
[State 0, PosSet]
type = PosSet
trigger1 =time =0
y = 0
[State 20, 1]
type = VelSet
trigger1 = time = 0
x = -5
[State -3, 400+400]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2Statetype != A
triggerall = p2movetype!=A
triggerall =p2life>0
trigger1 = P2dist X <= 60
value = ifelse(random>=500,400,200)
[State -3, 700+710]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2movetype=A
triggerall =p2life>0
trigger1 = P2dist X <= 60
value = ifelse(random>=500,700,701)
[State -3, 1000]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall =p2life>0
trigger1 = p2stateno =18
trigger2 = p2stateno =19
trigger2 = p2stateno =900
value = 1050
[State -3, 700+710]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2movetype=A
triggerall =p2life>0
trigger1 = P2dist X > 60
value = 105
[State 0,]
type = ChangeState
trigger1 = var(59)=1
trigger1 = p2life <=0
value = 0
ctrl = 1
;----------------------------------------------------------------------------
[Statedef 19]
type    = S
physics = N
sprpriority = 2
Anim = 20
velset = 0,0
[State 0, PosSet]
type = PosSet
trigger1 =time =0
y = 0
[State 20, 1]
type = VelSet
trigger1 = time = 0
x =5
[State -3, 400+400]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2Statetype != A
triggerall = p2movetype!=A
triggerall =p2life>0
trigger1 = P2dist X <= 60
value = ifelse(random>=500,400,200)
[State -3, 700+710]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2movetype=A
triggerall =p2life>0
trigger1 = P2dist X <= 60
value = ifelse(random>=500,700,701)
[State -3, 700+710]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2movetype=A
triggerall =p2life>0
trigger1 = P2dist X > 60
value = 105
[State -3, 1000]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall =p2life>0
trigger1 = p2stateno =18
trigger2 = p2stateno =19
trigger2 = p2stateno =900
value = 1050
[State 0,]
type = ChangeState
trigger1 = var(59)=1
trigger1 = p2life <=0
value = 0
ctrl = 1
;----------------------------------------------------------------------------
[Statedef 108]
type    = S
physics = S
sprpriority = 1
[State 0, PosSet]
type = PosSet
trigger1 =time =0
y = 0
[State 0]
type=changeanim
trigger1=anim!=100&&!time
value=100
[State 100]
type = PlaySnd
trigger1 = (Time % 27) = 0
value = 6, 3
channel = 2
[State 0]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
[State 0]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)
[State 0]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
[State 0]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
[State 0]
type = Ctrlset
trigger1 = var(59)
value = 0
[state ]
type       = turn
triggerall = !IsHelper&&var(59)=1
triggerall = numenemy
trigger1   = enemynear(numenemy > 1 && !enemynear,alive),facing = -facing
trigger1   = frontedgedist < enemynear(numenemy > 1 && !enemynear,alive), backedgedist
trigger2   = enemynear(numenemy > 1 && !enemynear,alive),facing = facing
trigger2   = frontedgedist < enemynear(numenemy > 1 && !enemynear,alive), frontedgedist
ignorehitpause = 1
[State -3, 400+400]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2Statetype != A
triggerall = p2movetype!=A
triggerall =p2life>0
trigger1 = P2dist X <= 60
value = ifelse(random>=500,400,200)
[State -3, 700+710]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2movetype=A
triggerall =p2life>0
trigger1 = P2dist X <= 60
value = ifelse(random>=500,700,701)
[State -3, 1000]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall =p2life>0
trigger1 = p2stateno =18
trigger2 = p2stateno =19
trigger2 = p2stateno =900
value = 1050
[State -3, 700+710]
type = ChangeState
triggerall = var(59)>=1
triggerall = Statetype != A
triggerall = p2movetype=A
triggerall =p2life>0
trigger1 = P2dist X > 60
value = 105
[State 0,]
type = ChangeState
trigger1=p2life<=0
value = 0
ctrl = 1
