;|Akuma by Phantom.of.the.Server & Beterhans|
;==============================================================================================
;=======================================<COMMAND FILE>========================================
;==============================================================================================

;===================<BUTTON REMAPPING>===================
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s


;===================<DEFAULT VALUES>===================
[Defaults]
command.time=15
command.buffer.time=3


;===================<SINGLE BUTTON>===================
[Command]
name="a"
command=a
time=1
[Command]
name="b"
command=b
time=1
[Command]
name="c"
command=c
time=1
[Command]
name="x"
command=x
time=1
[Command]
name="y"
command=y
time=1
[Command]
name="z"
command=z
time=1
[Command]
name="start"
command=s
time=1


;===================<HOLD DIR>===================
[Command]
name="holdfwd"
command=/$F
time=1
[Command]
name="holdback"
command=/$B
time=1
[Command]
name="holdup"
command=/$U
time=1
[Command]
name="holddown"
command=/$D
time=1


;===================<HOLD BUTTON>===================
[Command]
name="holda"
command=/a
time=1
[Command]
name="holdb"
command=/b
time=1
[Command]
name="holdc"
command=/c
time=1
[Command]
name="holdx"
command=/x
time=1
[Command]
name="holdy"
command=/y
time=1
[Command]
name="holdz"
command=/z
time=1
[Command]
name="holdstart"
command=/s
time=1


;===================<RELEASE BUTTON>===================
[Command]
name="rlsa"
command=~a
time=1
[Command]
name="rlsb"
command=~b
time=1
[Command]
name="rlsc"
command=~c
time=1
[Command]
name="rlsx"
command=~x
time=1
[Command]
name="rlsy"
command=~y
time=1
[Command]
name="rlsz"
command=~z
time=1
name="rlss"
command=~s
time=1


;===================<DIR>===================
[Command]
name="fwd"
command=F
time=1
[Command]
name="back"
command=B
time=1
[Command]
name="up"
command=U
time=1
[Command]
name="down"
command=D
time=1


;===================<SUPER MOTIONS>===================

[Command]
name="super_fake"
command=~F,B,DB,D,DF,F,x
time=30

[Command]
name="super_fake"
command=~F,B,DB,D,DF,F,y
time=30

[Command]
name="super_fake"
command=~F,B,DB,D,DF,F,z
time=30

[Command]
name="sgs"
command=~x,x,F,a,z
time=45

[Command]
name="hcf2p"
command=~B,DB,D,DF,F,x+y
time=30
[Command]
name="hcf2p"
command=~B,DB,D,DF,F,x+z
time=30
[Command]
name="hcf2p"
command=~B,DB,D,DF,F,y+z
time=30

[Command]
name="hcb2k"
command=~F,DF,D,DB,B,a+b
time=30
[Command]
name="hcb2k"
command=~F,DF,D,DB,B,a+c
time=30
[Command]
name="hcb2k"
command=~F,DF,D,DB,B,b+c
time=30

[Command]
name="ddd2p"
command=D,D,D,x+y
time=30
[Command]
name="ddd2p"
command=D,D,D,x+z
time=30
[Command]
name="ddd2p"
command=D,D,D,y+z
time=30

[Command]
name="ddd2k"
command=D,D,D,a+b
time=30
[Command]
name="ddd2k"
command=D,D,D,a+c
time=30
[Command]
name="ddd2k"
command=D,D,D,b+c
time=30

[Command]
name="2qcfp"
command=~D,DF,F,D,DF,F,x
time=30
[Command]
name="2qcfp"
command=~D,DF,F,D,DF,F,y
time=30
[Command]
name="2qcfp"
command=~D,DF,F,D,DF,F,z
time=30
[Command]
name="2qcfp"
command=~D,DF,F,D,DF,F,~x
time=30
[Command]
name="2qcfp"
command=~D,DF,F,D,DF,F,~y
time=30
[Command]
name="2qcfp"
command=~D,DF,F,D,DF,F,~z
time=30

[Command]
name="2dfp"
command=~D,DF,F,D,DF,x
time=30
[Command]
name="2dfp"
command=~D,DF,F,D,DF,y
time=30
[Command]
name="2dfp"
command=~D,DF,F,D,DF,z
time=30
[Command]
name="2dfp"
command=~D,DF,F,D,DF,~x
time=30
[Command]
name="2dfp"
command=~D,DF,F,D,DF,~y
time=30
[Command]
name="2dfp"
command=~D,DF,F,D,DF,~z
time=30

[Command]
name="2qcfk"
command=~D,DF,F,D,DF,F,a
time=30
[Command]
name="2qcfk"
command=~D,DF,F,D,DF,F,b
time=30
[Command]
name="2qcfk"
command=~D,DF,F,D,DF,F,c
time=30
[Command]
name="2qcfk"
command=~D,DF,F,D,DF,F,~a
time=30
[Command]
name="2qcfk"
command=~D,DF,F,D,DF,F,~b
time=30
[Command]
name="2qcfk"
command=~D,DF,F,D,DF,F,~c
time=30

[Command]
name="2qcbp"
command=~D,DB,B,D,DB,B,x
time=30
[Command]
name="2qcbp"
command=~D,DB,B,D,DB,B,y
time=30
[Command]
name="2qcbp"
command=~D,DB,B,D,DB,B,z
time=30
[Command]
name="2qcbp"
command=~D,DB,B,D,DB,B,~x
time=30
[Command]
name="2qcbp"
command=~D,DB,B,D,DB,B,~y
time=30
[Command]
name="2qcbp"
command=~D,DB,B,D,DB,B,~z
time=30

[Command]
name="2qcbk"
command=~D,DB,B,D,DB,B,a
time=30
[Command]
name="2qcbk"
command=~D,DB,B,D,DB,B,b
time=30
[Command]
name="2qcbk"
command=~D,DB,B,D,DB,B,c
time=30
[Command]
name="2qcbk"
command=~D,DB,B,D,DB,B,~a
time=30
[Command]
name="2qcbk"
command=~D,DB,B,D,DB,B,~b
time=30
[Command]
name="2qcbk"
command=~D,DB,B,D,DB,B,~c
time=30

[Command]
name="teamsuper"
command=~D,DF,F,D,DF,F,c+z
time=30


;===================<SPECIAL MOTIONS>===================
[Command]
name="qcbs"
command=~D,DB,B,s
time=15
[Command]
name="qcfs"
command=~D,DF,F,s
time=15
[Command]
name="hcbs"
command=F,D,B,s
time=20
[Command]
name="hcbs"
command=~F,D,B,~s
time=20
[Command]
name="hcfs"
command=B,D,F,s
time=25
[Command]
name="hcfs"
command=~B,D,F,~s
time=25
[Command]
name="dds"
command=~D,D,~s
time=30
[Command]
name="dds"
command=D,D,s
time=30

[Command]
name="hcbx"
command=~F,D,B,x
time=30
[Command]
name="hcby"
command=~F,D,B,y
time=30
[Command]
name="hcbz"
command=~F,D,B,z
time=30
[Command]
name="hcbx"
command=~F,D,B,~x
time=30
[Command]
name="hcby"
command=~F,D,B,~y
time=30
[Command]
name="hcbz"
command=~F,D,B,~z
time=30

[Command]
name="qcfx"
command=~D,DF,F,x
time=15
[Command]
name="qcfy"
command=~D,DF,F,y
time=15
[Command]
name="qcfz"
command=~D,DF,F,z
time=15
[Command]
name="qcfx"
command=~D,DF,F,~x
time=15
[Command]
name="qcfy"
command=~D,DF,F,~y
time=15
[Command]
name="qcfz"
command=~D,DF,F,~z
time=15

[Command]
name="qcbx"
command=~D,DB,B,x
time=15
[Command]
name="qcby"
command=~D,DB,B,y
time=15
[Command]
name="qcbz"
command=~D,DB,B,z
time=15
[Command]
name="qcbx"
command=~D,DB,B,~x
time=15
[Command]
name="qcby"
command=~D,DB,B,~y
time=15
[Command]
name="qcbz"
command=~D,DB,B,~z
time=15

[Command]
name="qcba"
command=~D,DB,B,a
time=15
[Command]
name="qcbb"
command=~D,DB,B,b
time=15
[Command]
name="qcbc"
command=~D,DB,B,c
time=15
[Command]
name="qcba"
command=~D,DB,B,~a
time=15
[Command]
name="qcbb"
command=~D,DB,B,~b
time=15
[Command]
name="qcbc"
command=~D,DB,B,~c
time=15

[Command]
name="dfx"
command=F,D,DF,x
time=20
[Command]
name="dfy"
command=F,D,DF,y
time=20
[Command]
name="dfz"
command=F,D,DF,z
time=20
[Command]
name="dfx"
command=~F,D,DF,~x
time=15
[Command]
name="dfy"
command=~F,D,DF,~y
time=20
[Command]
name="dfz"
command=~F,D,DF,~z
time=20

[Command]
name="dfa"
command=~F,D,DF,a
time=20
[Command]
name="dfb"
command=~F,D,DF,b
time=20
[Command]
name="dfc"
command=~F,D,DF,c
time=20
[Command]
name="dfa"
command=~F,D,DF,~a
time=20
[Command]
name="dfb"
command=~F,D,DF,~b
time=20
[Command]
name="dfc"
command=~F,D,DF,~c
time=20

[Command]
name="df2p"
command=~F,D,DF,x+y
time=25
[Command]
name="df2p"
command=~F,D,DF,x+z
time=25
[Command]
name="df2p"
command=~F,D,DF,y+z
time=25
[Command]
name="db2p"
command=~B,D,DB,x+y
time=25
[Command]
name="db2p"
command=~B,D,DB,x+z
time=25
[Command]
name="db2p"
command=~B,D,DB,y+z
time=25

[Command]
name="df2k"
command=~F,D,DF,a+b
time=25
[Command]
name="df2k"
command=~F,D,DF,a+c
time=25
[Command]
name="df2k"
command=~F,D,DF,b+c
time=25

[Command]
name="db2k"
command=~B,D,DB,a+b
time=25
[Command]
name="db2k"
command=~B,D,DB,a+c
time=25
[Command]
name="db2k"
command=~B,D,DB,b+c
time=25

[Command]
name="bdx"
command=~B,DB,D,x
time=20
[Command]
name="bdy"
command=~B,DB,D,y
time=20
[Command]
name="bdz"
command=~B,DB,D,z
time=20
[Command]
name="bdx"
command=~B,DB,D,~x
time=20
[Command]
name="bdy"
command=~B,DB,D,~y
time=20
[Command]
name="bdz"
command=~B,DB,D,~z
time=20

[Command]
name="ddp"
command=D,D,x
time=20
[Command]
name="ddp"
command=D,D,y
time=20
[Command]
name="ddp"
command=D,D,z
time=20
[Command]
name="ddp"
command=D,D,~x
time=20
[Command]
name="ddp"
command=D,D,~y
time=20
[Command]
name="ddp"
command=D,D,~z
time=20

[Command]
name="2dk"
command=D,D,a
time=20
[Command]
name="2dk"
command=D,D,b
time=20
[Command]
name="2dk"
command=D,D,c
time=20
[Command]
name="2dk"
command=D,D,~a
time=20
[Command]
name="2dk"
command=D,D,~b
time=20
[Command]
name="2dk"
command=D,D,~c
time=20

[Command]
name="bda"
command=~B,DB,D,a
time=20
[Command]
name="bdb"
command=~B,DB,D,b
time=20
[Command]
name="bdc"
command=~B,DB,D,c
time=20
[Command]
name="bda"
command=~B,DB,D,~a
time=20
[Command]
name="bdb"
command=~B,DB,D,~b
time=20
[Command]
name="bdc"
command=~B,DB,D,~c
time=20


;===================<OTHER>===================

[Command]
name="superjump"
command=$D,$U
time=15

[Command]
name="jump"
command=$U
time=1


;===================<DOUBLE TAP>===================
[Command]
name="FF"
command=F,F
time=10
[Command]
name="BB"
command=B,B
time=10


;===================<2/3 BUTTON COMBINATION>===================

[Command]
name="recovery"
command=x+y
time=1
[Command]
name="recovery"
command=x+z
time=1
[Command]
name="recovery"
command=y+z
time=1

[Command]
name="2k"
command=a+b
time=1
[Command]
name="2k"
command=a+c
time=1
[Command]
name="2k"
command=b+c
time=1

[Command]
name="excelcombo"
command=c+z
time=1

[Command]
name="roll"
command=a+x
time=1


;===========================================================================
;===============================<-1 STATES>=================================
;===========================================================================
[Statedef -1]

[State -1, AIhelper]
type=changestate
trigger1= ishelper(9741) && !var(59)
value=9741

[State -1, Tick Fix]
type=ctrlset
triggerall= !ctrl
trigger1= (stateno=52 || stateno=105 || stateno=5120) && !animtime
trigger2= (stateno=[200,259]) && !animtime
trigger3= ((stateno=[700,701]) || (stateno=[710,729]) || stateno=760) && !animtime
trigger4= (stateno=5001 || stateno=5011 || stateno=151 || stateno=153) && hitover
value=1

[State -1, roll combo]
type=changestate
value=720
triggerall= var(59)<=0
triggerall= command="roll"
triggerall= roundstate=2 && statetype!=A && var(20)
trigger1= var(20) && (stateno=[200,289]) && movecontact
trigger2= var(20) && (stateno=[1000,2999]) && statetype!=A && movecontact
trigger3= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger3= helper(stateno+5),var(3)

[State -1, roll/dodge]
type=changestate
value=ifelse(command="holdfwd",720,710)
trigger1= var(59)<=0
trigger1= command="roll"
trigger1= roundstate=2 && statetype!=A && ctrl

[State -1, ashurasenkuu]
type=changestate
value=1400
triggerall= var(59)<=0
triggerall= command="df2p" || command="db2p" || command="df2k" || command="db2k"
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=1100 && time<=7)  || stateno=3100 || (stateno=1400 && time>=16)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= stateno=195 && animelemtime(6)>=0 && animelemtime(20)<0
trigger4= stateno=1020 && animelemtime(3)>=0 && animelemtime(9)<0
trigger5= stateno=1500 && anim=1500 && animelemtime(3)>=0 && animelemtime(4)<0

[State -1, superfakehadou]
type=changestate
value=3040
triggerall= var(59)<=0 && roundstate=2 && statetype!=A && power>=2000 && (var(20)<=60)
triggerall= command="super_fake"
trigger1= ctrl ||(stateno=[200,255]) && stateno!=207
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= stateno=1100 || stateno=1505 || stateno=1305
trigger4= (stateno=3100 || anim=3001) && time >=3
trigger5= (stateno=[1000,4999]) && numhelper(stateno+5) && stateno!=3000
trigger6= stateno=1321 && numtarget && animelemtime(2)>0

[State -1, shungokusatsu]
type=changestate
value=4000
triggerall= var(59)<=0
triggerall= command="sgs" || command="qcfs"
triggerall= roundstate=2 && statetype!=A && power>=2000 && !var(20)
trigger1= ctrl || ((stateno=[200,299]) && time<=2)
trigger2= (stateno=[200,255]) || stateno = 1400
trigger3= (stateno=1100 || stateno=1305 || stateno=1505 || stateno=3000 || stateno=3100) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5) && var(10)<5
trigger4= helper(stateno+5),var(3)
trigger5= stateno=1321 && numtarget && animelemtime(2)>0
trigger6= stateno=52 && (prevstateno=[1000,4999]) 

[State -1, misogi]
type=changestate
value=4100
triggerall= var(59)<=0
triggerall= command="hcb2k" || command="hcbs"
triggerall= roundstate=2 && statetype!=A && power>=2000
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245||stateno=1100||(stateno= 3000 && time >= 12)||stateno=3100||(stateno=4200 && time >= 82))
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= (stateno=1100 || stateno=1305 || stateno=1505) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5) && var(10)<5
trigger4= helper(stateno+5),var(3)
trigger5= stateno=1321 && numtarget && animelemtime(2)>0
trigger6= stateno=52 && (prevstateno=[1000,4999]) 

[State -1, kkz]
type=changestate
value=4200
triggerall= var(59)<=0
triggerall= command="ddd2p" || command="dds"
triggerall= roundstate=2 && statetype!=A && power>=1500
triggerall= !numhelper(4205)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= (stateno=1100 || stateno=1305 || stateno=1505 || stateno=3100 || stateno=3300) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5) && stateno!=4200
trigger4= helper(stateno+5),var(3)
trigger5= stateno=1321 && numtarget && animelemtime(2)>0
trigger6= stateno=52 && (prevstateno=[1000,4999]) 

[State -1, tenshoukairekijin]
type=changestate
value=4300
triggerall= var(59)<=0
triggerall= command="ddd2k" || command="qcbs"
triggerall= roundstate=2 && statetype!=A && power>=1500 && !var(20)
triggerall= !numhelper(4305)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= (stateno=1100 || stateno=1305 || stateno=1505 || stateno=3100 || stateno=3300) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5) && stateno!=4300
trigger4= helper(stateno+5),var(3)
trigger5= stateno=1321 && numtarget && animelemtime(2)>0
trigger6= helper(stateno+5),var(3)

[State -1, tenmagouzankuu2]
type=changestate
value=3070
triggerall= var(59)<=0
triggerall= command="hcf2p"
triggerall= roundstate=2 && statetype=A && var(9)!=2 && power>=2000 && !var(20)
triggerall= !numhelper(3075)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[260,285]) 
trigger3= (stateno=1100 || (stateno=[1200,1250]) || stateno=3100 || stateno=3200 || stateno=3250 || stateno=3300 || (stateno=[1301,1303])) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5) && stateno!=3070
trigger4= helper(stateno+5),var(3)
trigger5= var(20) && (stateno=[200,289])
trigger6= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger7= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger7= helper(stateno+5),var(3)

[State -1, messatsugoushoryuu]
type=changestate
value=3100
triggerall= var(59)<=0
triggerall= command="2dfp"
triggerall= roundstate=2 && statetype!=A && power>=1000 && (var(20)<=60)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245) || stateno = 1400
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= (stateno=1100 || stateno=1305 || stateno=1505 || stateno=3300) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5)
trigger4= helper(stateno+5),var(3)
trigger5= stateno=1321 && numtarget && animelemtime(2)>0
trigger6= var(20) && (stateno=[200,289])
trigger7= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) && movecontact
trigger8= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger8= helper(stateno+5),var(3)
trigger9= stateno=52 && (prevstateno=[1000,4999]) && movecontact

[State -1, messatsugousenpuu]
type=changestate
value=3250
triggerall= var(59)<=0
triggerall= command="2qcbk"
triggerall= roundstate=2 && statetype=A && var(9)!=2 && power>=1000 && (var(20)<=60)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[260,285]) 
trigger3= (stateno=1100 || (stateno=[1200,1250]) || stateno=3100 || stateno=3300 || (stateno=[1301,1303])) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5)
trigger4= helper(stateno+5),var(3)
trigger5= var(20) && (stateno=[200,289])
trigger6= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger7= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger7= helper(stateno+5),var(3)

[State -1, messatsugourasen]
type=changestate
value=3200
triggerall= var(59)<=0
triggerall= command="2qcbk"
triggerall= roundstate=2 && statetype!=A && power>=1000 && (var(20)<=60)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= (stateno=1100 || stateno=1305 || stateno=1505 || stateno=3100 || stateno=3300) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5)
trigger4= helper(stateno+5),var(3)
trigger5= stateno=1321 && numtarget && animelemtime(2)>0
trigger6= var(20) && (stateno=[200,289])
trigger7= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger8= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger8= helper(stateno+5),var(3)
trigger9= stateno=52 && (prevstateno=[1000,4999]) 

[State -1, tenmashinzuiwari]
type=changestate
value=3300
triggerall= var(59)<=0
triggerall= command="2qcfk"
triggerall= roundstate=2 && statetype=A && var(9)!=2 && power>=1000 && (var(20)<=60)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[260,285]) 
trigger3= (stateno=1100 || (stateno=[1200,1250]) || stateno=3100 || (stateno=[3200,3250]) || (stateno=[1301,1303])) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5)
trigger4= helper(stateno+5),var(3)
trigger5= var(20) && (stateno=[200,289])
trigger6= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger7= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger7= helper(stateno+5),var(3)

[State -1, tenmagouzankuu]
type=changestate
value=3050
triggerall= var(59)<=0
triggerall= command="2qcfp"
triggerall= roundstate=2 && statetype=A && var(9)!=2 && power>=1000 && (var(20)<=60)
triggerall= !numhelper(3005) && !numhelper(3055)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[260,285]) 
trigger3= (stateno=1100 || (stateno=[1200,1250]) || stateno=3100 || stateno=3200 || stateno=3250 || stateno=3300 || (stateno=[1301,1303])) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5) && stateno!=3050
trigger4= helper(stateno+5),var(3)
trigger5= var(20) && (stateno=[200,289])
trigger6= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger7= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger7= helper(stateno+5),var(3)

[State -1, messatsugouhadou]
type=changestate
value=3000
triggerall= var(59)<=0
triggerall= command="2qcbp"
triggerall= roundstate=2 && statetype!=A && power>=1000 && (var(20)<=60)
triggerall= !numhelper(3005) && !numhelper(3055)
trigger1= ctrl
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= (stateno=1100 || stateno=1505 || stateno=1305 || stateno=3100 || stateno=3300) 
trigger4= (stateno=[1000,4999]) && numhelper(stateno+5) && stateno!=3000
trigger4= helper(stateno+5),var(3)
trigger5= stateno=1321 && numtarget && animelemtime(2)>0
trigger6= var(20) && (stateno=[200,289])
trigger7= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger8= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger8= helper(stateno+5),var(3)

[State -1, shakunetsuhadouken]
type=changestate
value=1020
triggerall= var(59)<=0
triggerall= command="hcbx" || command="hcby" || command="hcbz"
triggerall= roundstate=2 && statetype!=A
triggerall= ifelse((var(20)<=60),(!numhelper(1005) && !numhelper(1025) && !numhelper(1055)),1) && !numhelper(3005) && !numhelper(3055)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, goushoryuuken]
type=changestate
value=1100
triggerall= var(59)<=0
triggerall= command="dfx" || command="dfy" || command="dfz"
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245) || stateno=1400
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)
trigger6= stateno=1321 && time>15

[State -1, kuuchuutatsumakizankuukyaku]
type=changestate
value=1250
triggerall= var(59)<=0
triggerall= command="qcba" || command="qcbb" || command="qcbc"
triggerall= roundstate=2 && statetype=A && var(9)!=2
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[260,285]) 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, tatsumakizankuukyaku]
type=changestate
value=1200
triggerall= var(59)<=0
triggerall= command="qcba" || command="qcbb" || command="qcbc"
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, hyakkishuu]
type=changestate
value=1300
triggerall= var(59)<=0
triggerall= command="dfa" || command="dfb" || command="dfc"
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)
trigger6= (stateno=1000 || Anim=3001) && time>15

[State -1, zankuuhadouken]
type=changestate
value=1050
triggerall= var(59)<=0
triggerall= command="qcfx" || command="qcfy" || command="qcfz"
triggerall= roundstate=2 && statetype=A && var(9)!=2
triggerall= ifelse((var(20)<=60),(!numhelper(1005) && !numhelper(1025) && !numhelper(1055)),1) && !numhelper(3005) && !numhelper(3055)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[260,285])  && prevstateno!=1050
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, gouhadouken]
type=changestate
value=1000
triggerall= var(59)<=0
triggerall= command="qcfx" || command="qcfy" || command="qcfz"
triggerall= roundstate=2 && statetype!=A
triggerall= ifelse((var(20)<=60),(!numhelper(1005) && !numhelper(1025) && !numhelper(1055)),1) && !numhelper(3005) && !numhelper(3055)
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, tenmashurettou]
type=changestate
value=1500
triggerall= var(59)<=0
triggerall= command="ddp" || command="2dk" || (command="holdback" && command="start") || (command="holddown" && command="start")
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, zenpoutenshin]
type=changestate
value=1450
triggerall= var(59)<=0
triggerall= roundstate=2 && (command="qcbx" || command="qcby" || command="qcbz") && statetype!=A
trigger1= ctrl || ((stateno=[200,299]) && time<=2) || (stateno=200||stateno=230||stateno=245)
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)


[State -1, excelcombo]
type=changestate
value=760
trigger1= var(59)<=0
trigger1= command="excelcombo"
trigger1= roundstate=2 && power>=1000 && !var(20) && ctrl

[State -1, zerocounter]
type=changestate
value=750
trigger1= var(59)<=0
trigger1= stateno=150 || stateno=152
trigger1= command="bdx" || command="bdy" || command="bdz" || command="bda" || command="bdb" || command="bdc"
trigger1= roundstate=2 && !var(20) && power>=500 && statetype!=A

[State -1, recoveryroll]
type=changestate
trigger1= var(59)<=0
trigger1= command="2k"
trigger1= stateno=5050 && vel y>-1 && alive
value=5220

[State -1, run/dash]
type=changestate
value=ifelse(command="FF",100,105)
trigger1= var(59)<=0
trigger1= command="FF" || command="BB"
trigger1= roundstate=2 && (stateno!=[100,106]) && statetype=S && ctrl

[State -1, airthrow]
type=changestate
value=850
trigger1= var(59)<=0
trigger1= (command="2k") && (command="holdfwd" || command="holdback")
trigger1= roundstate=2 && statetype=A && var(9)!=2 &&(pos y<=-42 || vel y<0) && ctrl

[State -1, throw]
type=changestate
value=800
trigger1= var(59)<=0
trigger1= (command="recovery" || command="2k") && (command="holdfwd" || command="holdback")
trigger1= roundstate=2 && ctrl && statetype=S && stateno!=100

[State -1, powercharge]
type=changestate
value=740
trigger1= var(59)<=0
trigger1= command="holdb" && command="holdy"
trigger1= roundstate=2 && statetype!=A && ctrl
trigger1= power<const(data.power) && power<powermax && !var(20)

[State -1, SLP]
type=changestate
value=200
triggerall= var(59)<=0
triggerall= command="x" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=230 || stateno=245) && time>=5
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, SMP2]
type=changestate
value=207
triggerall= var(59)<=0
triggerall= command="y" && command="holdfwd" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=215 || stateno=230 || stateno=245) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, SMP]
type=changestate
value=205
triggerall= var(59)<=0
triggerall= command="y" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=215 || stateno=230 || stateno=245) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, SHP]
type=changestate
value=210
triggerall= var(59)<=0
triggerall= command="z" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= ((stateno=[200,205]) || (stateno=[230,235]) || (stateno=[215,220]) || (stateno=[245,250])) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, SLK]
type=changestate
value=215
triggerall= var(59)<=0
triggerall= command="a" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=230) 
trigger3= (stateno=200 || stateno=230 || stateno=245) && time>=5
trigger4= var(20) && (stateno=[200,289]) 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger6= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger6= helper(stateno+5),var(3)

[State -1, SMK2]
type=changestate
value=222
triggerall= var(59)<=0
triggerall= command="b" && command="holdfwd" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= ((stateno=[200,205]) || stateno=215 || (stateno=[230,235]) || stateno=245) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, SMK]
type=changestate
value=220
triggerall= var(59)<=0
triggerall= command="b" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= ((stateno=[200,205]) || stateno=215 || (stateno=[230,235]) || stateno=245) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, SHK]
type=changestate
value=225
triggerall= var(59)<=0
triggerall= command="c" && command!="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=205 || stateno=210 || (stateno=[230,240]) || (stateno=[215,220]) || (stateno=[245,250])) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, CLP]
type=changestate
value=230
triggerall= var(59)<=0
triggerall= command="x" && command="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=230 || stateno=245) && time>=5
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, CMP]
type=changestate
value=235
triggerall= var(59)<=0
triggerall= command="y" && command="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=215 || stateno=230 || stateno=245) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, CHP]
type=changestate
value=240
triggerall= var(59)<=0
triggerall= command="z" && command="holddown" && statetype!=A
trigger1= ctrl
trigger2= ((stateno=[200,205]) || (stateno=[230,235]) || (stateno=[215,220]) || (stateno=[245,250])) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, CLK]
type=changestate
value=245
triggerall= var(59)<=0
triggerall= command="a" && command="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=230) 
trigger3= (stateno=200 || stateno=230 || stateno=245) && time>=5
trigger4= var(20) && (stateno=[200,289]) 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger6= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger6= helper(stateno+5),var(3)

[State -1, CMK]
type=changestate
value=250
triggerall= var(59)<=0
triggerall= command="b" && command="holddown" && statetype!=A
trigger1= ctrl
trigger2= ((stateno=[200,205]) || stateno=215 || (stateno=[230,235]) || stateno=245) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, CHK]
type=changestate
value=255
triggerall= var(59)<=0
triggerall= command="c" && command="holddown" && statetype!=A
trigger1= ctrl
trigger2= (stateno=200 || stateno=205 || stateno=210 || (stateno=[230,240]) || (stateno=[215,220]) || (stateno=[245,250])) 
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, ALP]
type=changestate
value=260
triggerall= var(59)<=0
triggerall= command="x" && statetype=A
trigger1= ctrl
trigger2= var(20) && (stateno=[200,289]) 
trigger3= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger4= helper(stateno+5),var(3)

[State -1, AMP]
type=changestate
value=265
triggerall= var(59)<=0
triggerall= command="y" && statetype=A
trigger1= ctrl
trigger2= (stateno=260 || stateno=275)  && var(9)!=2
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, AHP]
type=changestate
value=270
triggerall= var(59)<=0
triggerall= command="z" && statetype=A
trigger1= ctrl
trigger2= ((stateno=[260,265]) || (stateno=[275,280]))  && var(9)!=2
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, ALK]
type=changestate
value=275
triggerall= var(59)<=0
triggerall= command="a" && statetype=A
trigger1= ctrl
trigger2= stateno=260  && var(9)!=2
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, TKK]
type=changestate
value=282
triggerall= var(59)<=0
triggerall= command="holddown" && command="b" && statetype=A
;triggerall= vel x>0 && (vel y=[-3,3])
trigger1= ctrl || (stateno=1050 && animelemtime(3)>=2)
trigger2= ((stateno=[260,265]) || stateno=275)  && var(9)!=2
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, AMK]
type=changestate
value=280
triggerall= var(59)<=0
triggerall= command="b" && statetype=A
trigger1= ctrl
trigger2= ((stateno=[260,265]) || stateno=275)  && var(9)!=2
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, AHK]
type=changestate
value=285
triggerall= var(59)<=0
triggerall= command="c" && statetype=A
trigger1= ctrl
trigger2= (stateno=[260,280])  && var(9)!=2
trigger3= var(20) && (stateno=[200,289]) 
trigger4= var(20) && (stateno=[1000,2999]) && statetype!=A 
trigger5= var(20) && (stateno=[1000,2999]) && statetype!=A && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)

[State -1, AerialRave]
type=changestate
value=40
trigger1= var(59)<=0
trigger1= roundstate=2 && command="holdup"
trigger1= stateno=240  && var(20)>0

[State -1, sparry]
type=hitoverride
trigger1= var(59)<=0
trigger1= roundstate=2 && statetype=S
trigger1= command="fwd" && command!="back" && command!="up" && command!="down"
trigger1= ctrl || (stateno=[700,701])
trigger1= var(21):=1
attr=SA,AA,AP
stateno=700
slot=0
time=12

[State -1, cparry]
type=hitoverride
trigger1= var(59)<=0
trigger1= roundstate=2 && statetype!=A
trigger1= command="down" && command!="fwd" && command!="back" && command!="up"
trigger1= ctrl || (stateno=[700,701])
trigger1= var(21):=2
attr=C,AA,AP
stateno=701
slot=0
time=12

[State -1, aparry]
type=hitoverride
trigger1= var(59)<=0 && roundstate=2 && statetype=A
trigger1= command="fwd" && command!="back" && command!="up" && command!="down"
trigger1= ctrl || stateno=702
trigger1= var(21):=3
attr=SA,AA,AP
stateno=702
forceair=1
slot=0
time=12

[State -1, taunt]
type=changestate
value=195
triggerall= var(59)<=0
triggerall= command="start" && statetype!=A
trigger1= ctrl
trigger2= (stateno=[200,255]) && stateno!=207 
trigger3= var(20) && (stateno=[200,289])
trigger4= var(20) && ((stateno=[1000,2999]) || stateno=52 && (prevstateno=[1000,2999])) 
trigger5= var(20) && (stateno=[1000,2999]) && numhelper(stateno+5)
trigger5= helper(stateno+5),var(3)


;====================================================================================================================================
;=================================<A.I.>=============================================================================================
;====================================================================================================================================

[State -1, StopGuarding]
type = AssertSpecial
triggerall = var(59)>=1 && numenemy && roundstate=2
trigger1 = (EnemyNear, hitdefattr=SA,SA,SP,HA,HP) && ifelse(life <= 250,1,random > 900)
trigger2 = P2BodyDist X >= 110
trigger3 = (EnemyNear,p2dist x<8)
trigger4 = (stateno=[120,132]) && !(stateno=[150,155]) && (enemynear,time > 100) && (enemynear,vel x=0) && (enemynear,vel y=0)
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State -1, sparry]
type=hitoverride
triggerall= var(59)>=1 && numenemy && roundstate=2 && statetype!=A && var(21):=1
trigger1= ctrl && ifelse(life<250,random<650,random<=128)
trigger2= P2BodyDist x >= 110 && ifelse(life<250,1,random<=512)
trigger3= (EnemyNear, hitdefattr=SA,SA,SP,HA,HP) && ifelse(life <= 300,1,random > 400)
trigger4= ((stateno=[700,701]) || (prevstateno=[700,701])) && ifelse(life<250,1,random<550)
trigger5= ((prevstateno=[100,105]) || prevstateno= 1400) && time <= 6 && random < 512
trigger6= stateno=[10,13]
attr=SA,AA,AP
stateno=700
slot=0
time=16

[State -1, cparry]
type=hitoverride
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && (EnemyNear, hitdefattr=C,AA,AP) && var(21):=2
trigger1= ctrl && ifelse(life<250,random<999,random<=384)
trigger2= ((stateno=[700,701]) || (prevstateno=[700,701])) && ifelse(life<250,1,random<999)
trigger4= ((prevstateno=[100,105]) || prevstateno= 1400) && time <= 6 && random < 768
trigger5= stateno=[10,13]
attr=C,AA,AP
stateno=701
slot=0
time=12

[State -1, aparry]
type=hitoverride
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
trigger1= (ctrl && random<256) || (stateno=702 && random<950)
trigger1= var(21):=3
attr=SA,AA,AP
stateno=702
forceair=1
slot=0
time=9

[State -1, resetparry]
type=hitoverride
trigger1= (!ctrl && (stateno!=[700,702])) || var(20)
trigger2= movetype!=I || (stateno=[100,106])|| (stateno=[120,132])
trigger3= var(59)<=0 && (command="holdback" || command="holdup")
trigger4= (statetype=S || statetype=C) && var(21)!=1 && var(21)!=2
;trigger5= statetype=A && var(21)!=3
slot=0
time=0


[State -1, airrecover]
type=changestate
value= ifelse((pos y>=-20), 5200, 5210)
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && alive
trigger1= stateno=5050 && canrecover
trigger1= vel y>=-1 && random<200

[State -1, recoveryroll]
type=changestate
value=5220
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && alive
trigger1= !ctrl
trigger1= (stateno=5040 || stateno=5050) && vel y>=-1 && pos y>-vel y
trigger1= (p2bodydist x=[-10,10]) && random<200

[State -1, goushoryuuken]
type=changestate
value=1100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (enemynear,stateno!=[120,155]) && (p2statetype!=L || p2stateno!=5120) && (p2bodydist x=[0,50]) && (p2dist y=[-100,0])
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A) && (p2stateno!=[816,817])
trigger1= ctrl && p2statetype=A && (enemynear,vel x>0) && (enemynear,vel y>0) && random<ifelse(p2movetype=A, 256, 100)
trigger2= ctrl && prevstateno=1200 && (enemynear,statetype=A) && random<512
trigger3= (stateno=210 || stateno=240 || stateno=245) && movehit && (p2bodydist x=[0,22]) && random<200
trigger4= (ctrl || (stateno=1400 && time>=24))&& !(enemynear,movetype=A) && (p2bodydist x=[0,22]) && random<128
trigger5= ctrl && prevstateno=5120 && time<=2 && (p2bodydist x=[-30,30]) && random<164
trigger6= stateno=1321 && time>=16 && random<256


[State -1, ashurasenkuu]
type=changestate
value=1400
triggerall= var(59)>=1 && numenemy
triggerall= statetype !=A && roundstate=2 || (stateno=1400 && time >= 18)
trigger1= !MoveHit && (stateno=3100 && Time = 39)
trigger2= ctrl && enemynear,movetype=A && (p2bodydist x=[-90,90])
trigger2= (enemynear,p2bodydist x>0) && (enemynear,facing!=facing)
trigger2= random<ifelse((enemy,hitdefattr=SC,AT),500,250)
trigger2= var(10):=2
trigger3= (stateno=[120,132]) && !(stateno=[150,155]) && (statetype=S || statetype=C)
trigger3= (enemynear,movetype=A) && (enemynear,time > 90) && (enemynear,vel x=0) && (enemynear,vel y=0) && random<146
trigger4= ctrl && BackEdgeBodyDist<=20 && p2bodydist x<=46 && p2movetype!=H && random<128


[State -1, roll/dodge]
type=changestate
value=ifelse(random<660,710,720)
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && statetype!=A
trigger1= ctrl && random<50 && (enemynear,movetype=A) && (enemynear,hitdefattr=SCA,AA,AP,AT)
trigger1= (p2bodydist x=[18,60]) && (enemynear,animtime<=7)

[State -1, crouch/forEarthquake]
type=changestate
triggerall= var(59)>=1 && var(57)>0 && numenemy && roundstate=2
triggerall= statetype!=A && stateno!=11 && stateno!=13 && (ctrl || (stateno=[100,105]))
trigger1= p2bodydist x>=120 && p2movetype=A
value=13

[State -1, tenmashurettou]
type=changestate
value=1500
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && statetype!=A
trigger1= ctrl && (p2bodydist x=[-10,56]) && (EnemyNear,p2dist x>-18)
trigger1= enemynear,movetype=A && (enemy,hitdefattr=SCA,AA) && random<200

[State -1, backdash]
type=changestate
value=105
triggerall= var(59)>=1 && numenemy && roundstate=2 && statetype!=A && backedgedist>=80
trigger1= ctrl && (stateno!=[100,106]) && (stateno!=[700,701]) && random < ifelse((enemynear,hitdefattr=SC,AT), 150, 50)
trigger1= (enemynear,movetype=A) && (p2bodydist x=[0,100]) && (enemynear,vel x)
trigger2= ctrl && (enemynear,stateno=5120) && time>4 && (p2bodydist x<40) && random<512
trigger3= ctrl && (enemynear,statetype=L) && (enemynear,time>=8) && (p2bodydist x<45) && random<256

[State -1, Guard]
type=changestate
value=120
triggerall= var(59)>=1 && numenemy && (EnemyNear,p2dist x>-6) && roundstate=2 && inguarddist && P2BodyDist X < 110
triggerall= ctrl && (stateno!=[120,155]) && !var(20) && !(enemynear,hitdefattr=SCA,AT)
trigger1= (statetype!=A || p2statetype=A) && ((EnemyNear,time<=100) && (EnemyNear,vel x!=0) && (EnemyNear,vel y!=0))
trigger1= random<ifelse((p2stateno=[200,699]), 100, ifelse((p2stateno=[1000,2999]), 333, 1000))

[State -1, run/dash]
type=changestate
value=102
triggerall= var(59)>=1 && numenemy && statetype=S && roundstate=2 && prevstateno!=105
trigger1= ctrl && (stateno!=[100,105])
trigger1= !inguarddist && (p2bodydist x=[80,100]) && p2statetype!=L && random<(ifelse(var(57)>0,16,80))
trigger2= ctrl && (enemynear,p2bodydist x<0) && !(enemynear,ctrl) && p2bodydist x>=46 && p2statetype=S && random<256

[State -1, Jump]
type=changestate
value=39
triggerall = var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && ctrl
trigger1= p2movetype=A && p2bodydist x>200 && (((enemynear,NumHelper) && !numhelper(9741)) || (enemynear,NumProj)) && random<60
trigger2= p2movetype!=A && (p2bodydist x=[50,105]) && !(enemynear,ctrl) && random<100

[State -1, zerocounter]
type=changestate
value=750
triggerall= var(59)>=1 && numenemy && (stateno=150 || stateno=152)
triggerall= roundstate=2 && statetype!=A && power>=500 && !var(20)
trigger1= (p2bodydist x=[-20,60]) && random<ifelse(life<=300,128,50)

[State -1, powercharge]
type=changestate
value=740
triggerall= var(59)>=1 && numenemy && var(57)<1
trigger1= roundstate=2 && statetype!=A && ctrl
trigger1= power<const(data.power) && power<powermax && !var(20)
trigger1= !inguarddist && p2bodydist x>=180 && random<100


[State -1, Air Throw]
type=changestate
value=850
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && statetype=A && var(9)!=2
trigger1= ctrl &&(pos y<=-42 || vel y<0)
trigger1= p2statetype=A && p2movetype!=H
trigger1= (p2bodydist x=[0,20]) && (p2dist y=[-80,-40]) && random<333

[State -1, Throw]
type=changestate
value=800
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=S
triggerall= p2statetype!=A && p2statetype!=L && p2movetype!=H
triggerall= (p2bodydist x=[0,20]) && p2dist y=0 
trigger1= ctrl && random<100
trigger2= ctrl && (p2stateno=[120,140]) && random<750

[State -1, SHP]
type=changestate
value=210
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (p2bodydist x=[0,70]) && (p2dist y=[-50,50]) && p2statetype!=C && p2statetype!=L && !(enemynear,hitfall)
triggerall= (p2stateno!=[120,155]) && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && p2bodydist x<25 && p2movetype!=A && random<256
trigger2= stateno=200 || stateno=205 || stateno=215 || stateno=230 || stateno=235
trigger2= p2bodydist x<=68 && movehit && random<512
trigger3= ctrl && (prevstateno=222 || prevstateno=52 || stateno=52) && p2movetype=H && time<=2 && random<512
trigger4= ctrl && (enemynear,p2bodydist x<0) &&  !(enemynear, ctrl) && (p2stateno!=[120,155]) && random<128

[State -1, SHK]
type=changestate
value=225
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= p2statetype!=C && p2statetype!=L && !(enemynear,hitfall)
triggerall= (p2stateno!=[120,155]) && p2movetype!=A && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= (p2bodydist x=[0,66]) && (p2dist y=[-50,50]) && (stateno=205 || stateno=215 || stateno=220 || stateno=235 || stateno=245 || stateno=250)
trigger1= p2bodydist x=0 && movehit && random<250
trigger2= ctrl && p2statetype=A && (enemynear,vel y>0) && (enemynear,vel x>=0) && (p2bodydist x=[50,80]) && (p2dist y=[-120,-70]) && ((enemynear,numhelper=1) && (numhelper(9741) || numhelper(6000))) && random<128
trigger3= ctrl && p2statetype=S && (enemynear,vel x>0) && (p2bodydist x=[50,74]) && random<100


[State -1, SMP2]
type=changestate
value=207
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (p2bodydist x=[0,45]) && (p2dist y=[-50,0]) && p2statetype=C && !(enemynear,hitfall)
triggerall= ((p2stateno!=[120,155]) || p2stateno=131 || p2stateno=152 || p2stateno=153) && p2movetype!=A && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random < 100

[State -1, SMK2]
type=changestate
value=222
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && prevstateno!=205
triggerall= (p2bodydist x<=90) && p2statetype=S && p2movetype!=A && (enemynear,const(size.head.pos.y)<=-40)
trigger1= (ctrl || stateno=[100,101])&& (p2bodydist x=[40,90]) && random <= 20
trigger2= stateno=215 && movecontact && random < 512


[State -1, SMP]
type=changestate
value=205
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (p2bodydist x=[0,46]) && (p2dist y=[-50,50]) && p2statetype!=C && p2statetype!=L && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40)
trigger1= (stateno=200 || stateno=215 || stateno=230 || stateno=245)
trigger1= p2bodydist x<=16 && movecontact && random<250
trigger2= ctrl && (enemynear,p2bodydist x<0) &&  !(enemynear, ctrl) && p2bodydist x<=28 && (p2stateno!=[120,155]) && random<512


[State -1, SMK]
type=changestate
value=220
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (p2bodydist x=[0,65]) && (p2dist y=[-50,50]) && (p2statetype=S || p2statetype=A) && (p2stateno!=[120,155]) && p2movetype!=A
triggerall= (enemynear,const(size.head.pos.y)<=-40)
trigger1= (stateno=200 || stateno=205 || stateno=215 || stateno=230 || stateno=235 || stateno=245) && anim!=201
trigger1= p2bodydist x<=16 && movehit && random<250
trigger2= anim=201 && movecontact && p2statetype!=A

[State -1, SLP]
type=changestate
value=200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !inguarddist
triggerall= (p2bodydist x=[0,60]) && (p2dist y=[-50,50]) && p2statetype!=C && p2statetype!=L && !(enemynear,hitfall)
triggerall= (p2stateno!=[120,155]) && p2movetype!=A && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<100
trigger2= (stateno=200 || stateno=230 || stateno=245) && time>=5 && random<64
trigger3= ctrl && p2bodydist x<25 && random<256

[State -1, SLK]
type=changestate
value=215
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !inguarddist
triggerall= (p2bodydist x=[0,62]) && (p2dist y=[-50,50]) && p2statetype!=C && p2statetype!=L && !(enemynear,hitfall)
triggerall= p2movetype!=A && !(enemynear,hitfall)
trigger1= (stateno=200 || stateno=230) && movecontact && random < 256
trigger2= ctrl && ((p2stateno=[120,150]) || prevstateno=101) && random<480

[State -1, CHP]
type=changestate
value=240
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !inguarddist
triggerall= (p2bodydist x=[0,40]) && (p2dist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
triggerall= (p2stateno!=[120,155]) && p2movetype!=A && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= (stateno=200 || stateno=205 || stateno=215 || stateno=220 || stateno=230 || stateno=235 || stateno=245 || stateno=250)
trigger1= p2bodydist x<=4 && (movehit=[1,4]) && random<250

[State -1, CHK]
type=changestate
value=255
triggerall= var(59)>=1 && numenemy && roundstate=2 && statetype!=A && !inguarddist
triggerall= p2bodydist x<=64 && p2statetype=S && (p2stateno!=[120,155]) && p2movetype!=A
trigger1= (stateno=205 || stateno=215 || stateno=220 || stateno=230 || stateno=235 || stateno=250) && movecontact && random<250
trigger2= anim=221 && movecontact && random<999

[State -1, CMP]
type=changestate
value=235
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !inguarddist && p2statetype!=A
triggerall= (p2bodydist x=[0,45]) && (p2dist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
triggerall= (p2stateno!=[120,155]) && p2movetype!=A && !(enemynear,hitfall)
trigger1= (stateno=200 || stateno=215 || stateno=230 || stateno=245)
trigger1= p2bodydist x<=20 && (movehit=[1,4]) && random<250

[State -1, CMK]
type=changestate
value=250
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !inguarddist && p2statetype!=A
triggerall= (p2bodydist x=[0,68]) && (p2dist y=[-50,50]) && p2stateno!=5120
triggerall= ((p2stateno!=[120,155]) || p2stateno=130 || p2stateno=150 || p2stateno=151) && p2movetype!=A
trigger1= (stateno=200 || stateno=205 || stateno=215 || stateno=230 || stateno=235 || stateno=245)
trigger1= p2bodydist x<=45 && (movehit=[1,4]) && random<250
trigger2= ctrl && (p2bodydist x=[36,66]) && p2statetype=S && (p2stateno!=[120,155]) && random<140

[State -1, CLP]
type=changestate
value=230
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !inguarddist && !(enemynear,hitfall)
triggerall= (p2bodydist x=[0,50]) && (p2dist y=[-50,50]) && p2statetype!=L && p2statetype!=A && !(enemynear,hitfall)
triggerall= (p2stateno!=[120,155]) && p2movetype!=A
trigger1= ctrl && random<100
trigger2= (stateno=200 || stateno=230 || stateno=245) && time>=5 && random<50

[State -1, CLK]
type=changestate
value=245
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !inguarddist
triggerall= (p2bodydist x=[0,50]) && (p2dist y=[-20,0]) && p2stateno!=5120
triggerall= ((p2stateno!=[120,155]) || p2stateno=130 || p2stateno=150 || p2stateno=151) && p2movetype!=A
trigger1= ctrl && random<100
trigger2= (stateno=200 || stateno=230 || stateno=245) && time>=5 && random<50
trigger3= ctrl && (p2stateno=130 || p2stateno=150 || p2stateno=151 || p2stateno=5110) && random<300

[State -1, AHP]
type=changestate
value=270
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && !inguarddist
triggerall= (p2bodydist x=[0,60]) && (p2dist y=[-10,60]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && p2statetype=S && !(enemynear,ctrl) && vel x>0 && vel y>0
trigger2= (stateno=260 || stateno=265 || stateno=275) && var(9)!=2 && (movehit=[1,4]) && random<250

[State -1, AHK]
type=changestate
value=285
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && !inguarddist
triggerall= (p2bodydist x=[6,100]) && (p2dist y=[-20,80]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && p2statetype=S && p2movetype!=A && vel x>0 && vel y>0 && ((p2stateno!=[120,155]) || (enemynear,vel x<0)) &&  random<128
trigger2= (stateno=260 || stateno=265 || stateno=275 || stateno=280) && var(9)!=2 && (movehit=[1,4]) && random<250

[State -1, TKK]
type=changestate
value=282
triggerall= var(59)>=1 && numenemy && roundstate=2 && statetype=A 
triggerall= (p2dist x=[-5,85]) && (p2dist y=[30,220]); && (vel y=[-5,5])
trigger1= ctrl && p2statetype!=A && (p2dist y=[65,220]) && (p2dist x=[40,85]) && random<ifelse(var(9)=3,128,32)
trigger2= stateno=1050 && animelemtime(3)>=2 && random<46
trigger3= stateno=275 && movehit && p2statetype=S && sysvar(1)=1 && random<256

[State -1, AMP]
type=changestate
value=265
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= (p2bodydist x=[0,100]) && (p2dist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && random<25 && (vel x>0) && (vel y>0)

[State -1, AMK]
type=changestate
value=280
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= (p2dist x=[-30,70]) && (p2dist y=[-40,86]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && p2statetype=A && sysvar(1)=1 && random<80
trigger2= stateno=275 && movehit && (enemynear,time>4) && p2statetype=A && random<128
trigger3= ctrl && vel x>0 && vel y>0 && (p2dist x=[-36,6]) && (p2statetype=S || p2statetype=C) && random<500

[State -1, ALP]
type=changestate
value=260
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= (p2bodydist x=[0,35]) && (p2dist y=[-20,65]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && vel x<0 && vel y<0 && p2movetype=A && random<128

[State -1, ALK]
type=changestate
value=275
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= (p2dist x=[8,45]) && (p2dist y=[-100,50]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && random<34
trigger2= ctrl && p2statetype=S && p2movetype!=A && (p2dist x=[8,45]) && random<128
trigger3= ctrl && p2statetype=A && random<64


[State -1, kuuchuutatsumakizankuukyaku]
type=changestate
value=1250
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && var(9)!=2
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[0,80]) && (p2dist y=[-40,60]) && p2statetype!=L
trigger1= ctrl && random<ifelse(p2dist x<0, 200, 25)
trigger2= (stateno=[260,285])
trigger2= movehit && (p2bodydist x=[0,25]) && random<250

[State -1, tatsumakizankuukyaku]
type=changestate
value=1200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[0,90]) && (p2dist y=[-90,0]) && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= (stateno=210 || stateno=225 || stateno=240)
trigger1= movehit && (p2bodydist x=[0,30]) && random<250
trigger2= stateno=255
trigger2= movehit && (p2bodydist x=[0,60]) && random<250

[State -1, hyakkishuu]
type=changestate
value=1300
triggerall= var(59)>=1 && numenemy && roundstate=2 && statetype!=A && (p2dist y=[-160,0]) && (p2bodydist x=[20,260]) && (p2stateno!=[120,155]) && life>450
trigger1= stateno=225 && p2movetype=H && p2statetype!=A && random<256
trigger2= stateno=250 && movehit && p2statetype!=A && random<64
trigger3= stateno=210 && movehit && p2statetype!=A && (p2bodydist x>40) && random<20
trigger4= (stateno=1000 || Anim=3001) && time>15 && p2statetype!=A && random<256
trigger4= (p2stateno=[5030,5035]) && (p2dist y=[-40,0]) && (p2bodydist x=[120,200]) && random<128
trigger5= ctrl && p2movetype=A && p2statetype=S && (p2bodydist x=[120,190]) && (((enemynear,numhelper) && !numhelper(9741)) || (enemynear,NumProj)) && p2stateno!=3000 && random<80
trigger6= ctrl && (enemynear,statetype=L) && (p2bodydist x=[20,60]) && random<112






[State -1, zankuuhadouken]
type=changestate
value=1050
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && var(9)!=2
triggerall= ifelse((var(20)<=60),(!numhelper(1005) && !numhelper(1025) && !numhelper(1055)),1) && !numhelper(3005) && !numhelper(3055)
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= p2bodydist x>=60 && p2dist y>=60
trigger1= ctrl && vel y>-2 && random<333
trigger2= (stateno=[260,285]) && movehit && random<100

[State -1, gouhadouken]
type=changestate
value=1000
triggerall= var(59)>=1 && numenemy && roundstate=2 && statetype!=A
triggerall= ifelse((var(20)<=60),(!numhelper(1005) && !numhelper(1025) && !numhelper(1055)),1) && !numhelper(3005) && !numhelper(3055)
triggerall= (p2bodydist x>=2) && (p2dist y>=-25) && (p2statetype!=L || p2stateno=5120)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && p2bodydist x>=100 && random<ifelse(var(57)>0,16,64) && (!enemynear,NumProj) && (!enemynear,NumHelper) && life>=600
trigger2= stateno=205 || (stateno=[210,211]) || stateno=226 || stateno=235 || stateno=250 || stateno=255
trigger2= movehit && (p2bodydist x=[30,90]) && random<100
trigger3= (stateno=[120,132]) && !(stateno=[150,155]) && (statetype=S || statetype=C)
trigger3= (enemynear,movetype=A) && (enemynear,time > 84) && (EnemyNear,p2dist x<8) && (enemynear,vel x=0) && (enemynear,vel y=0) && random<256
trigger4= ctrl && (enemynear,p2bodydist x<0) &&  !(enemynear, ctrl) && (p2stateno!=[120,155]) && (p2bodydist x>=45) && random<128

[State -1, shakunetsuhadouken]
type=changestate
value=1020
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ifelse((var(20)<=60),(!numhelper(1005) && !numhelper(1025) && !numhelper(1055)),1) && !numhelper(3005) && !numhelper(3055)
triggerall= (p2bodydist x>=0) && (p2dist y>=-25) && p2movetype!=A && p2statetype!=L && !(enemynear,numhelper) && !(enemynear,NumProj)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && p2bodydist x>=120 && var(57)<1 && random<50
trigger2= (stateno=210 || stateno=225 || stateno=240 || stateno=255)
trigger2= movehit && (p2bodydist x=[0,25]) && random<50

[State -1, shungokusatsu]
type=changestate
value=4000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= power>=2000 && !var(20)
triggerall= !(enemynear,ctrl) && (p2stateno!=40) && (p2stateno!=[5030,5119])
triggerall= (p2bodydist x=[0,160]) && (p2dist y=[-120,0]) && p2statetype!=L
;triggerall= (enemynear,vel y=0) || (enemynear,vel y>0 && enemynear,vel x<0)
trigger1= ctrl && (p2bodydist x=[0,60]) && (enemynear,statetype!=A) && random<150
trigger2= stateno=3100 && ((movehit && Time = 25 && p2statetype!=A && p2life >= 600) || (MoveGuarded && Time = 39 && p2statetype!=A))
trigger3= stateno=1400 && animelemtime(6)>=16 && (p2bodydist x=[0,50]) && p2statetype!=A && random<250
trigger4= time<=1 && prevstateno=222 && p2bodydist x<20 && p2statetype!=A && p2statetype!=L && p2life>=400 && random < 100

[State -1, misogi]
type=changestate
value=4100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= power>=3000 && !var(20)
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155]) && p2statetype!=L
triggerall= (p2stateno!=[5030,5119]) && (enemynear,vel x=[-1,1]) && (enemynear,vel y<4)
triggerall= movetype=A ||  !(enemynear,hitfall)
trigger1= ctrl && (enemynear,statetype=S || enemynear,statetype=C) && (enemynear,animtime<=-30) && random<100
trigger2= ctrl && (enemynear,statetype=A) && (enemynear,pos y<=-60) && (enemynear,movetype=A) && random<500
trigger3= stateno=1100 && movehit && random<100

[State -1, kkz]
type=changestate
value=4200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && prevstateno!=4200
triggerall= !numhelper(4205)
triggerall= power>=1000 && !var(20)
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[-30,30]) && (p2dist y=[-90,0])
trigger1= (stateno=1100 || stateno=3300) && movehit && random<50
trigger2= stateno=3000 && numhelper(3005)
trigger2= helper(3005),var(3) && random<100
trigger3= ctrl && inguarddist
trigger3=(p2stateno=[3000,4999]) && random<200

[State -1, tkj]
type=changestate
value=4300
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && prevstateno!=4300
triggerall= !numhelper(4305)
triggerall= power>=2000 && !var(20)
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[-80,80]) && (p2dist y=[-60,0])
trigger1= stateno=3300 && movehit && random<50
trigger2= stateno=3100 && movehit && animelemtime(17)>=0 && random<200

[State -1, tenmagouzankuu2]
type=changestate
value=3070
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && var(9)!=2 && prevstateno!=3070
triggerall= !numhelper(3075)
triggerall= power>=2000 && !var(20)
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[0,50]) && p2dist y>=-20
trigger1= (stateno=1100 || stateno=1250 || stateno=[1301,1303])
trigger1= movehit && (p2bodydist x=[0,35]) && random<250
trigger2= stateno=3100 && movehit && random<200
trigger3= (stateno=[3200,3250]) && movehit && (hitcount>=7 || anim=3205) && random<200
trigger4= stateno=3050 && numhelper(3055)
trigger4= helper(3055),var(3) && random<100

[State -1, messatsugoushoryuu]
type=changestate
value=3100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && prevstateno!=3100
triggerall= power>=1000 && var(20)<=60
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[-80,80]) && (p2dist y=[-40,0]) && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= (stateno=210 || stateno=225 || stateno=240 || stateno=255) && movehit && (p2bodydist x=[0,30]) && random<128
trigger2= (stateno=1100 || stateno=1305)&& movehit && (p2bodydist x=[0,30]) && random<200
trigger3= (stateno=[1000,4999]) && numhelper(stateno+5) && var(10)<=6
trigger3= helper(stateno+5),var(3) && random<128
trigger4= (ctrl || (stateno=1400 && time>=16)) && enemynear,movetype=A && (p2bodydist x=[0,60]) && random<88
trigger5= stateno=1321 && time>15 && random<512

[State -1, messatsugousenpu]
type=changestate
value=3250
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && var(9)!=2 && (prevstateno!=[3200,3250])
triggerall= power>=1000 && var(20)<=60
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[0,40]) && (p2dist y=[-90,0]) && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ((stateno=[1200,1250]) || stateno=[1301,1303])
trigger1= movehit && (p2bodydist x=[0,30]) && random<100
trigger2= stateno=3100 && movehit && random<333
trigger3= (stateno=[1000,4999]) && numhelper(stateno+5) && var(10)<=6 && stateno!=3070
trigger3= helper(stateno+5),var(3) && random<100

[State -1, messatsugourasen]
type=changestate
value=3200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && (prevstateno!=[3200,3250]) && power>=1000 && var(20)<=60
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[-40,40]) && (p2dist y=[-60,0]) && p2statetype!=L
trigger1= (stateno=210 || stateno=225 || stateno=240 || stateno=255)
trigger1= movehit && p2bodydist x=0 && random<100
trigger2= stateno=3100 && movehit && animelemtime(17)>=0 && p2bodydist x=0 && random<333
trigger3= stateno=4200 && numhelper(4205)
trigger3= helper(4205),var(3) && random<100
trigger4= ctrl && enemynear,movetype=A && (p2bodydist x=[0,10]) && random<200

[State -1, tenmashinzuiwari]
type=changestate
value=3300
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && var(9)!=2 && pos y>=-50 && prevstateno!=3300
triggerall= power>=1000 && var(20)<=60
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[-30,60]) && p2dist y>=-15 && (enemynear,vel y<6)
trigger1= (stateno=270 || stateno=285)
trigger1= movehit && random<100
trigger2= (stateno=1100 || stateno=1250 || stateno=[1301,1303])
trigger2= movehit && random<250
trigger3= stateno=3100 && movehit && random<200
trigger4= (stateno=[3200,3250]) && movehit && (hitcount>=7 || anim=3205) && random<200
trigger5= stateno=1050 || stateno=3050 || stateno=3070
trigger5= ifelse(stateno=3070, animelemtime(31)>=0, 1)
trigger5= numhelper(stateno+5)
trigger5= helper(stateno+5),var(3) && random<200

[State -1, tenmagouzankuu]
type=changestate
value=3050
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && var(9)!=2 && prevstateno!=3050
triggerall= !numhelper(3005) && !numhelper(3055) && power>=1000 && var(20)<=60
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x=[4,120]) && p2dist y>=-20 && (enemynear,vel y<4)
trigger1= (stateno=270 || stateno=285) && movehit && (p2bodydist x=[0,30]) && random<100
trigger2= (stateno=1100 || stateno=[1301,1303]) && movehit && random<250
trigger3= stateno=3100 && movehit && random<200
trigger4= (stateno=[3200,3250]) && movehit && (hitcount>=7 || anim=3205) && random<200
trigger5= (stateno=[1000,4999]) && numhelper(stateno+5) && var(10)<=6 && stateno!=3050 && helper(stateno+5),var(3) && random<100
trigger5= ifelse(stateno=3070, animelemtime(21)>=0, 1)
trigger6= ctrl && (p2bodydist x=[18,120]) && (p2dist y=[25,120]) && p2statetype!=L && p2movetype=A && random<100

[State -1, messatsugouhadou]
type=changestate
value=3000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && prevstateno!=3000 && !numhelper(3005) && !numhelper(3055)
triggerall= power>=1000 && var(20)<=60 && !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= (p2bodydist x>2) && (p2dist y=[-55,0]) && (enemynear,vel y<8) && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= (stateno=1100 || stateno=1305) && movehit && (p2bodydist x=[0,60]) && random<250
trigger2= stateno=3100 && movehit && animelemtime(17)>=0 && random<200
trigger3= (stateno=[1000,4999]) && numhelper(stateno+5) && var(10)<=6 && stateno!=3000
trigger3= helper(stateno+5),var(3) && random<100
trigger4= (stateno=[120,132]) && !(stateno=[150,155]) && (statetype=S || statetype=C)
trigger4= (enemynear,movetype=A) && (enemynear,time > 85) && (enemynear,vel x=0) && (enemynear,vel y=0) && random<512
trigger5= p2movetype=A && (enemy,name="Ryu" || enemy,name="cvsryu" || enemy,name="Shin AKUMA" || enemy,name="Shin Gouki" || enemy,name="Gouki" || enemy,name="Akuma")
trigger5= ctrl && (p2stateno=1000 || p2stateno=3000 || p2stateno=1020) && p2bodydist x>100 && (enemynear,time<40)&& random<ifelse(life<=250,512,50)
trigger6= ctrl && !(enemynear,ctrl) && p2statetype=S && (enemynear,time>30) && p2bodydist x>110 && random<64

[State -1, superfakehadou]
type=changestate
value=3040
triggerall= var(59)>=1 && numenemy && stateno!=3040
triggerall= roundstate=2 && statetype!=A && power>=2000 && (!numhelper(3051) || !numhelper(3053)  || !numhelper(3053))
trigger1= ctrl && p2statetype=L && p2bodydist x>=160 && random<100
trigger2= anim=3001 && numhelper(3005) && p2movetype=H && random<200
trigger3= ctrl && p2bodydist x>=160 && p2statetype=A && (enemynear, vel x<0) &&  random<200


[State -1, taunt]
type=changestate
value=195
triggerall= var(59)>=1 && numenemy
triggerall= !var(37)
triggerall= roundstate=2 && statetype!=A && prevstateno!=195
triggerall= life>=(lifemax/2)
trigger1= ctrl && numenemy
trigger1= (enemynear,life)<=(enemynear,lifemax/2)
trigger1= p2dist x>=160 && !(enemynear,ctrl) && (enemynear,movetype=H)
trigger1= (enemynear,statetype=A || enemynear,statetype=L) && random<500
