; _______________________________________
;| Edmond Honda by Phantom.of.the.Server |
; ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;==============================================================================================
;=======================================<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=1

;===================<AI>===================30
[Command]
name = "CPU1"
command = U, D, F
time = 1

[Command]
name = "CPU2"
command = U, B, F
time = 1

[Command]
name = "CPU3"
command = U, D, D
time = 1

[Command]
name = "CPU4"
command = F, B, U
time = 1

[Command]
name = "CPU5"
command = U, F, U, B
time = 1

[Command]
name = "CPU6"
command = U, D, B
time = 1

[Command]
name = "CPU7"
command = F, F, B
time = 1

[Command]
name = "CPU8"
command = U, D, U
time = 1

[Command]
name = "CPU9"
command = F, B, B
time = 1

[Command]
name = "CPU10"
command = F, F, B, B
time = 1

[Command]
name = "CPU11"
command = U, U, F
time = 1

[Command]
name = "CPU12"
command = U, B, B
time = 1

[Command]
name = "CPU13"
command = U, B, F, F
time = 1

[Command]
name = "CPU14"
command = U, F, B, U
time = 1

[Command]
name = "CPU15"
command = U, B, F, U
time = 1

[Command]
name = "CPU16"
command = U, B, B, B
time = 1

[Command]
name = "CPU17"
command = U, D, B, F
time = 1

[Command]
name = "CPU18"
command = U, D, B, D
time = 1

[Command]
name = "CPU19"
command = U, D, F, U
time = 1

[Command]
name = "CPU20"
command = U, D, U, B
time = 1

[Command]
name = "CPU21"
command = U, D, F, F
time = 1

[Command]
name = "CPU22"
command = F, F, F, F
time = 1

[Command]
name = "CPU23"
command = U, U, U, D
time = 1

[Command]
name = "CPU24"
command = B, B, B
time = 1

[Command]
name = "CPU25"
command = D, D, D, D
time = 1

[Command]
name = "CPU26"
command = D, D, D
time = 1

[Command]
name = "CPU27"
command = F, F, F
time = 1

[Command]
name = "CPU28"
command = U, U, U
time = 1

[Command]
name = "CPU29"
command = U, U, B, B
time = 1

[Command]
name = "CPU30"
command = D, D, F, F
time = 1

[Command]
name = "CPU31"
command = a,a,a
time = 1

[Command]
name = "CPU32"
command = b,b,b
time = 1

[Command]
name = "CPU33"
command = c,c,c
time = 1

[Command]
name = "CPU34"
command = x,x,x
time = 1

[Command]
name = "CPU35"
command = y,y,y
time = 1

[Command]
name = "CPU36"
command = z,z,z
time = 1

[Command]
name = "CPU37"
command = a,b,c
time = 1

[Command]
name = "CPU38"
command = x,y,z
time = 1

[Command]
name = "CPU39"
command = s,s,s
time = 1

[Command]
name = "CPU40"
command = a,a,a,a
time = 1

[Command]
name = "CPU41"
command = b,b,b,b
time = 1

[Command]
name = "CPU42"
command = c,c,c,c
time = 1

[Command]
name = "CPU43"
command = x,x,x,x
time = 1

[Command]
name = "CPU44"
command = y,y,y,y
time = 1

[Command]
name = "CPU45"
command = z,z,z,z
time = 1

[Command]
name = "CPU46"
command = a,a,b,c
time = 1

[Command]
name = "CPU47"
command = x,x,y,z
time = 1

[Command]
name = "CPU48"
command = s,s,s,s
time = 1

[Command]
name = "CPU49"
command = s,s,s,s,s
time = 1

[Command]
name = "CPU50"
command = s,s,s,s,s,s
time = 1

;====================<SINGLE BUTTON>====================7(37)

[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>====================4(41)

[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>====================7(48)

[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


;====================<DIR>====================4(52)

[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


;====================<RELEASE DIR>====================4(56)

[Command]
name="rlsfwd"
command=~$F
time=1
[Command]
name="rlsback"
command=~$B
time=1
[Command]
name="rlsup"
command=~$U
time=1
[Command]
name="rlsdown"
command=~$D
time=1


;====================<RELEASE BUTTON>====================6(62)

[Command]
name="rlsx"
command=~x
time=1
[Command]
name="rlsy"
command=~y
time=1
[Command]
name="rlsz"
command=~z
time=1
[Command]
name="rlsa"
command=~a
time=1
[Command]
name="rlsb"
command=~b
time=1
[Command]
name="rlsc"
command=~c
time=1


;====================<SUPER MOTIONS>====================5(67)

[Command]
name="6321463214p"
command=~D,DB,B,D,DB,B,x
time=64
[Command]
name="6321463214p"
command=~D,DB,B,D,DB,B,y
time=64
[Command]
name="6321463214p"
command=~D,DB,B,D,DB,B,z
time=64
[Command]
name="6321463214p"
command=~D,DB,B,D,DB,B,~x
time=64
[Command]
name="6321463214p"
command=~D,DB,B,D,DB,B,~y
time=64
[Command]
name="6321463214p"
command=~D,DB,B,D,DB,B,~z
time=64

[Command]
name="4646pp"
command=~$B,F,B,F,x+y
time=32
[Command]
name="4646pp"
command=~$B,F,B,F,x+z
time=32
[Command]
name="4646pp"
command=~$B,F,B,F,y+z
time=32

[Command]
name="4646p"
command=~$B,F,B,F,x
time=32
[Command]
name="4646p"
command=~$B,F,B,F,y
time=32
[Command]
name="4646p"
command=~$B,F,B,F,z
time=32
[Command]
name="4646p"
command=~$B,F,B,F,~x
time=32
[Command]
name="4646p"
command=~$B,F,B,F,~y
time=32
[Command]
name="4646p"
command=~$B,F,B,F,~z
time=32

[Command]
name="4646kk"
command=~$B,F,B,F,a+b
time=32
[Command]
name="4646kk"
command=~$B,F,B,F,a+c
time=32
[Command]
name="4646kk"
command=~$B,F,B,F,b+c
time=32

[Command]
name="4646k"
command=~$B,F,B,F,a
time=32
[Command]
name="4646k"
command=~$B,F,B,F,b
time=32
[Command]
name="4646k"
command=~$B,F,B,F,c
time=32
[Command]
name="4646k"
command=~$B,F,B,F,~a
time=32
[Command]
name="4646k"
command=~$B,F,B,F,~b
time=32
[Command]
name="4646k"
command=~$B,F,B,F,~c
time=32


;====================<SPECIAL MOTIONS>====================9(76)

[Command]
name="63214pp"
command=~F,DF,D,DB,B,x+y
time=32
[Command]
name="63214pp"
command=~F,DF,D,DB,B,x+z
time=32
[Command]
name="63214pp"
command=~F,DF,D,DB,B,y+z
time=32

[Command]
name="63214p"
command=~F,DF,D,DB,B,x
time=32
[Command]
name="63214p"
command=~F,DF,D,DB,B,y
time=32
[Command]
name="63214p"
command=~F,DF,D,DB,B,z
time=32
[Command]
name="63214p"
command=~F,DF,D,DB,B,~x
time=32
[Command]
name="63214p"
command=~F,DF,D,DB,B,~y
time=32
[Command]
name="63214p"
command=~F,DF,D,DB,B,~z
time=32

[Command]
name="46pp"
command=~$B,F,x+y
time=16
[Command]
name="46pp"
command=~$B,F,x+z
time=16
[Command]
name="46pp"
command=~$B,F,y+z
time=16

[Command]
name="46p"
command=~$B,F,x
time=16
[Command]
name="46p"
command=~$B,F,y
time=16
[Command]
name="46p"
command=~$B,F,z
time=16
[Command]
name="46p"
command=~$B,F,~x
time=16
[Command]
name="46p"
command=~$B,F,~y
time=16
[Command]
name="46p"
command=~$B,F,~z
time=16

[Command]
name="28kk"
command=~$D,$U,a+b
time=16
[Command]
name="28kk"
command=~$D,$U,a+c
time=16
[Command]
name="28kk"
command=~$D,$U,b+c
time=16

[Command]
name="28k"
command=~$D,$U,a
time=16
[Command]
name="28k"
command=~$D,$U,b
time=16
[Command]
name="28k"
command=~$D,$U,c
time=16
[Command]
name="28k"
command=~$D,$U,~a
time=16
[Command]
name="28k"
command=~$D,$U,~b
time=16
[Command]
name="28k"
command=~$D,$U,~c
time=16

[Command]
name="412p"
command=~B,DB,D,x
time=16
[Command]
name="412p"
command=~B,DB,D,y
time=16
[Command]
name="412p"
command=~B,DB,D,z
time=16
[Command]
name="412p"
command=~B,DB,D,~x
time=16
[Command]
name="412p"
command=~B,DB,D,~y
time=16
[Command]
name="412p"
command=~B,DB,D,~z
time=16

[Command]
name="412k"
command=~B,DB,D,a
time=16
[Command]
name="412k"
command=~B,DB,D,b
time=16
[Command]
name="412k"
command=~B,DB,D,c
time=16
[Command]
name="412k"
command=~B,DB,D,~a
time=16
[Command]
name="412k"
command=~B,DB,D,~b
time=16
[Command]
name="412k"
command=~B,DB,D,~c
time=16

[Command]
name="buchikamashi"
command=~F,DF,D,DB,B,a
time=20
[Command]
name="buchikamashi"
command=~F,DF,D,DB,B,b
time=20
[Command]
name="buchikamashi"
command=~F,DF,D,DB,B,c
time=20
[Command]
name="buchikamashi"
command=~F,DF,D,DB,B,~a
time=20
[Command]
name="buchikamashi"
command=~F,DF,D,DB,B,~b
time=20
[Command]
name="buchikamashi"
command=~F,DF,D,DB,B,~c
time=20

;====================<OTHER>====================1(77)
[Command]
name="highjump"
command=$D,$U
time=15


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


;====================<2/3 BUTTON COMBINATION>====================8(87)
[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="recovery"
command=a+x
time=1

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

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

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

[Command]
name="b+y"
command=b+y
time=1

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


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

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

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

[State -1, AI Helper]
type=changestate
trigger1= ishelper(9741)
value=9741

[State -1, AI Idlevar]
type=VarSet
trigger1= var(59)>=1 && !var(9)
var(9)=1
[State -1, AI Idlevar reset]
type=VarSet
trigger1= var(59)=-1 && var(9)
var(9)=0

[State -1, AI];AItO
type=VarSet
triggerall= var(59)<=0
triggerall= RoundState=2;[1,2]
trigger1= command="CPU1" || command="CPU26"
trigger2= command="CPU2" || command="CPU27"
trigger3= command="CPU3" || command="CPU28"
trigger4= command="CPU4" || command="CPU29"
trigger5= command="CPU5" || command="CPU30"
trigger6= command="CPU6" || command="CPU31"
trigger7= command="CPU7" || command="CPU32"
trigger8= command="CPU8" || command="CPU33"
trigger9= command="CPU9" || command="CPU34"
trigger10= command="CPU10" || command="CPU35"
trigger11= command="CPU11" || command="CPU36"
trigger12= command="CPU12" || command="CPU37"
trigger13= command="CPU13" || command="CPU38"
trigger14= command="CPU14" || command="CPU39"
trigger15= command="CPU15" || command="CPU40"
trigger16= command="CPU16" || command="CPU41"
trigger17= command="CPU17" || command="CPU42"
trigger18= command="CPU18" || command="CPU43"
trigger19= command="CPU19" || command="CPU44"
trigger20= command="CPU20" || command="CPU45"
trigger21= command="CPU21" || command="CPU46"
trigger22= command="CPU22" || command="CPU47"
trigger23= command="CPU23" || command="CPU48"
trigger24= command="CPU24" || command="CPU49"
trigger25= command="CPU25" || command="CPU50"
trigger26= var(9)=1
;trigger27=1
var(59)=1

[state -1, stageedge distance right]
type=helper
;trigger1= var(59)>=1
trigger1= !NumHelper(22222)
helpertype= normal
name= "stageedge distance right"
postype= left
stateno= 22222
ID= 22222
pos= 160,9999
facing= -1
pausemovetime= 2147483647
supermovetime= 2147483647
persistent= 0
ignorehitpause= 1
keyctrl= 0
ownpal= 1

[State -1, stageedge distance right]
type=changestate
trigger1= ishelper
trigger1= ishelper(22222)
trigger1= stateno!=22222
value=22222

[state -1, stageedge distance left]
type=helper
;trigger1= var(59)>=1
trigger1= !NumHelper(33333)
helpertype= normal
name= "stageedge distance left"
postype= left
stateno= 33333
ID= 33333
pos= 160,9999
facing= 1
pausemovetime= 2147483647
supermovetime= 2147483647
persistent= 0
ignorehitpause= 1
keyctrl= 0
ownpal= 1

[State -1, stageedge distance left]
type=changestate
trigger1= ishelper
trigger1= ishelper(33333)
trigger1= stateno!=33333
value=33333

[State -1, hadou defence]
type=helper
trigger1=!numhelper(55555)
name="hadou defence"
stateno=55555
id=55555
supermovetime=99999
pausemovetime=99999
keyctrl=0

[State -1, hadou defence]
type=changestate
trigger1= ishelper
trigger1= ishelper(55555)
trigger1= stateno!=55555
value=55555

[State -1, reflex]
type=destroyself
trigger1= ishelper
trigger1= ishelper(66666)
trigger1= stateno!=[66666,66667]
ignorehitpause=1
pausemove=1
supermove=1

[State -1, Tick Fix]
type=ctrlset
triggerall= !ctrl
trigger1= (stateno=52 || stateno=101 || stateno=5120) && !animtime
trigger2= (stateno=[200,499]) && !animtime
trigger3= ((stateno=[760,762]) || (stateno=[700,715]) || (stateno=[900,905])) && !animtime
trigger4= stateno=810 && !animtime
trigger5= (stateno=5001 || stateno=5011 || stateno=151 || stateno=153) && hitover
value=1

[State -1, AI no auto guard]
type=assertspecial
trigger1= var(59)>=1
flag = nostandguard
flag2= nocrouchguard
flag3= noairguard
ignorehitpause=1
[State -1, AI no random walk]
type=assertspecial
trigger1= var(59)>=1
flag= nowalk
ignorehitpause=1

[State -1, AI test]
type=changestate
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (ctrl || stateno=21) && var(29)
triggerall= p2statetype!=A && enemynear,ctrl=0 && enemynear,animtime<=-6-1-(fvar(37)>28)*ceil((fvar(37)-28)/9.268)
trigger1= fvar(37)=(28,28+floor(9.268*27)]
trigger1= !(enemynear,hitdefattr=SCA,AA,AT,AP)
trigger1= helper(55555),var(50)=1 && helper(55555),var(56)=2 && enemy,numproj=0
trigger1= (life>500 || life-p2life>250) && random<100
value=1100+0*(var(10):=3)
[State -1, AI test]
type=changestate
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && power>=500
triggerall= (ctrl || stateno=21) && var(29)
triggerall= p2statetype!=A && enemynear,ctrl=0 && enemynear,animtime<=-7-1-(fvar(37)>28)*ceil((fvar(37)-28)/12.357)
trigger1= fvar(37)=(28,28+floor(12.357*27)]
trigger1= !(enemynear,hitdefattr=SCA,AA,AT,AP)
trigger1= helper(55555),var(50)+enemy,numproj<=2 && (enemy,numproj=0 || !inguarddist)
trigger1= helper(55555),var(56)=1
trigger1= (life>500 || life-p2life>250) && random<25
value=1130

;=================================================================================================
;===========================================<PLAYER>==============================================
;=================================================================================================

[State -1, Roll Forward]
type=changestate
value=710
triggerall= var(59)<=0
triggerall= command="a+x"
triggerall= roundstate=2 && statetype!=A
trigger1= (ctrl || (stateno=[100,101])) && command="holdfwd"
trigger2= var(20) && var(4)

[State -1, Roll Backward]
type=changestate
value=715
triggerall= var(59)<=0
triggerall= command="a+x"
triggerall= roundstate=2 && statetype!=A
trigger1= (ctrl || (stateno=[100,101])) && command="holdback"

[State -1, Dodge]
type=changestate
value=700
triggerall= var(59)<=0
triggerall= command="a+x"
triggerall= roundstate=2 && statetype!=A
trigger1= (ctrl || (stateno=[100,101]))

[State -1, Orochi Kudaki]
type=changestate
value=4000
triggerall= 0
triggerall= var(59)<=0
triggerall= command="ppp"
triggerall= roundstate=2 && statetype!=A
triggerall= power>=3000 && !var(20)
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101]) || stateno=195
trigger2= var(7)

[State -1, Orochi Kudaki]
type=changestate
value=3100
triggerall= var(59)<=0
triggerall= command="6321463214p"
triggerall= roundstate=2 && statetype!=A
triggerall= power>=3000 && !var(20)
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101]) || stateno=195
trigger2= var(7)

[State -1, MAX Oni Musou]
type=changestate
value=3050
triggerall= var(59)<=0
triggerall= command="4646pp" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>0)
triggerall= roundstate=2 && statetype!=A
triggerall= power>=2000 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101]) || stateno=195
trigger2= var(7) || var(8)

[State -1, MAX Fuji Oroshi]
type=changestate
value=3250
triggerall= var(59)<=0
triggerall= command="4646kk" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>0)
triggerall= roundstate=2 && statetype!=A
triggerall= power>=2000 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101]) || stateno=195
trigger2= var(7) || var(8)

[State -1, Oni Musou]
type=changestate
value=3000
triggerall= var(59)<=0
triggerall= command="4646p" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>0)
triggerall= roundstate=2 && statetype!=A
triggerall= power>=1000 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101]) || stateno=195
trigger2= var(7)
trigger3= (stateno=[3200,3201]) && var(8)

[State -1, Fuji Oroshi]
type=changestate
value=3200
triggerall= var(59)<=0
triggerall= command="4646k" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>0)
triggerall= roundstate=2 && statetype!=A
triggerall= power>=1000 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101]) || stateno=195
trigger2= var(7)
trigger3= (stateno=[3000,3002]) && var(8)

[State -1, EX Super Hyakkan Otoshi]
type=changestate
value=1230
triggerall= var(59)<=0
triggerall= command="28kk" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(40)>16)
triggerall= roundstate=2 && statetype!=A
triggerall= power>=500 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, EX Super Zutsuki]
type=changestate
value=1130
triggerall= var(59)<=0
triggerall= command="46pp" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
triggerall= roundstate=2 && statetype!=A
triggerall= power>=500 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, EX Hyakuretsu Harite]
type=changestate
value=1030
triggerall= var(59)<=0
triggerall= command="pp" && var(26)>=5
triggerall= roundstate=2 && statetype!=A
triggerall= power>=500 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, EX Ooichou Nage]
type=changestate
value=1330
triggerall= var(59)<=0
triggerall= command="63214pp"
triggerall= roundstate=2 && statetype!=A
triggerall= power>=500 && var(20)<=60
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, Buchikamashi]
type=changestate
value=1800
triggerall= var(59)<=0
triggerall= command="buchikamashi"; && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(40)>16)
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, Super Hyakkan Otoshi]
type=changestate
value=1200
triggerall= var(59)<=0
triggerall= command="28k" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(40)>16)
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, Super Zutsuki]
type=changestate
value=1100
triggerall= var(59)<=0
triggerall= command="46p" && ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, Hyakuretsu Harite]
type=changestate
value=1000
triggerall= var(59)<=0
triggerall= (command="x" || command="y" || command="z") && var(26)>=5
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, Ooichou Nage]
type=changestate
value=1300
triggerall= var(59)<=0
triggerall= command="63214p"
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || stateno=40 || stateno=52 || (stateno=[100,101])
trigger2= var(6)

[State -1, Zero Counter]
type=changestate
value=750
trigger1= var(59)<=0
trigger1= stateno=150 || stateno=152
trigger1= command="412p" || command="412k"
trigger1= roundstate=2 && statetype!=A
trigger1= power>=1000 && !var(20)

[State -1, Custom Combo]
type=changestate
value= ifelse(statetype=A, 905, 900)
trigger1= var(59)<=0
trigger1= command="c+z"
trigger1= roundstate=2
trigger1= power>=1000 && !var(20)
trigger1= ctrl || stateno=52 || (stateno=[100,101])

[State -1, Power Charge]
type=changestate
value=730
trigger1= var(59)<=0
trigger1= command="holdb" && command="holdy"
trigger1= roundstate=2 && statetype!=A
trigger1= power<const(data.power) && power<powermax && !var(20)
trigger1= ctrl || (stateno=[100,101])

[State -1, Dash/Run]
type=changestate
value=102
trigger1= var(59)<=0
trigger1= command="FF"
trigger1= roundstate=2 && statetype=S
trigger1= ctrl

[State -1, Dash Backward]
type=changestate
value=105
trigger1= var(59)<=0
trigger1= command="BB"
trigger1= roundstate=2 && statetype=S
trigger1= ctrl

[State -1, Air Throw]
type=changestate
value=850
trigger1= var(59)<=0
trigger1= (command="holdfwd" || command="holdback") && (command="pp" || command="kk")
trigger1= roundstate=2 && statetype=A
trigger1= ctrl

[State -1, Throw]
type=changestate
value=800
trigger1= var(59)<=0
trigger1= (command="holdfwd" || command="holdback") && (command="pp" || command="kk")
trigger1= roundstate=2 && statetype=S
trigger1= ctrl

[State -1, SHP]
type=changestate
value=220
triggerall= var(59)<=0
triggerall= command!="holddown" && command="z"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, Harai-geri]
type=changestate
value=255
triggerall= var(59)<=0
triggerall= command!="holddown" && command="holdfwd" && command="c"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, SHK]
type=changestate
value=250
triggerall= var(59)<=0
triggerall= command!="holddown" && command="c"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, SMP]
type=changestate
value=210
triggerall= var(59)<=0
triggerall= command!="holddown" && command="y"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, ScMK]
type=changestate
value=241
triggerall= var(59)<=0
triggerall= command!="holddown" && command="b"
triggerall= statetype!=A
triggerall= p2bodydist x = [-26, ceil(const(size.xscale)*16)]
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, SfMK]
type=changestate
value=240
triggerall= var(59)<=0
triggerall= command!="holddown" && command="b"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, SLP]
type=changestate
value=200
triggerall= var(59)<=0
triggerall= command!="holddown" && command="x"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, SLK]
type=changestate
value=230
triggerall= var(59)<=0
triggerall= command!="holddown" && command="a"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, CHP]
type=changestate
value=420
triggerall= var(59)<=0
triggerall= command="holddown" && command="z"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, CHK]
type=changestate
value=450
triggerall= var(59)<=0
triggerall= command="holddown" && command="c"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, CMP]
type=changestate
value=410
triggerall= var(59)<=0
triggerall= command="holddown" && command="y"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, CMK]
type=changestate
value=440
triggerall= var(59)<=0
triggerall= command="holddown" && command="b"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, CLP]
type=changestate
value=400
triggerall= var(59)<=0
triggerall= command="holddown" && command="x"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, CLK]
type=changestate
value=430
triggerall= var(59)<=0
triggerall= command="holddown" && command="a"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(4)

[State -1, AHP]
type=changestate
value=621
triggerall= var(59)<=0
triggerall= command="z"
triggerall= statetype=A && !vel x
trigger1= ctrl
trigger2= var(4)

[State -1, AHP]
type=changestate
value=620
triggerall= var(59)<=0
triggerall= command="z"
triggerall= statetype=A
trigger1= ctrl
trigger2= var(4)

[State -1, AHK]
type=changestate
value=650
triggerall= var(59)<=0
triggerall= command="c"
triggerall= statetype=A
trigger1= ctrl
trigger2= var(4)

[State -1, AMP]
type=changestate
value=610
triggerall= var(59)<=0
triggerall= command="y"
triggerall= statetype=A
trigger1= ctrl
trigger2= var(4)

[State -1, AMK]
type=changestate
value=640
triggerall= var(59)<=0
triggerall= command="b"
triggerall= statetype=A
trigger1= ctrl
trigger2= var(4)

[State -1, ALP]
type=changestate
value=600
triggerall= var(59)<=0
triggerall= command="x"
triggerall= statetype=A
trigger1= ctrl
trigger2= var(4)

[State -1, ALK]
type=changestate
value=630
triggerall= var(59)<=0
triggerall= command="a"
triggerall= statetype=A
trigger1= ctrl
trigger2= var(4)

[State -1, Taunt]
type=changestate
value=195
triggerall= var(59)<=0
triggerall= command="start"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])
trigger2= var(6)


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

[State -1, AI]
type=null
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && var(10)>1 && movetype=I
trigger1= stateno<200
trigger1= var(10):=1

[State -1, okizeme-var reset]
type=varset
;triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2
trigger1= (enemynear,stateno!=[5000,5120]) && enemynear,statetype!=L && enemynear,hitfall=0 && enemynear,statetype!=A
trigger2= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)<=44
trigger3= enemynear,statetype=S || enemynear,statetype=C || enemynear,ctrl
sysvar(4)=0
[State -1, okizeme-var]
type=varset
;triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && numenemy; && statetype!=A
triggerall= enemynear,stateno=[5110,5111]
triggerall= helper(33333),var(59)>16+2
triggerall= !sysvar(4)
triggerall= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44
trigger1= ((enemynear,stateno=[5110,5111]) && enemynear,time=2); || (enemynear,stateno=[5100,5120))
trigger1= fvar(35)<const(velocity.jump.fwd.x)*28+(helper(33333),var(59)-helper(33333),var(56)-16-1)*const(velocity.run.fwd.x)
trigger1= random<500+100*((power>=1000)+(power>=2000)+(life-p2life>250)+(life-p2life>500)+(enemynear,power<750)+(p2dist x<120)) || power>=2500
trigger2= (stateno=[100,101]) || (prevstateno=[100,101])
trigger2= fvar(35)<const(velocity.jump.fwd.x)*28
trigger2= helper(33333),var(59)-helper(33333),var(56)>35-(8+7)+1
trigger2= random<100
sysvar(4)=1
[State -1, okizeme-var special]
type=varset
;triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && numenemy; && statetype!=A
triggerall= numtarget && ((stateno=255 || stateno=1110 || stateno=1131 || stateno=1210 || stateno=1231) && !animtime)
triggerall= helper(33333),var(59)>16+2
triggerall= !sysvar(4)
trigger1= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44
trigger1= fvar(35)<const(velocity.jump.fwd.x)*28+(helper(33333),var(59)-16-1)*const(velocity.run.fwd.x)
trigger1= random<500+100*((power>=1000)+(power>=2000)+(life-p2life>250)+(life-p2life>500)+(enemynear,power<750)) || power>=2500
sysvar(4)=1
[State -1, okizeme-var special(throw)]
type=varset
;triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && numenemy; && statetype!=A
triggerall= numtarget
triggerall= (target,stateno=828 && target,pos y+target,vel y+0.5>-1 && target,pos y+target,vel y*2+0.5*3<=-1) || ((stateno=1312 || stateno=1342) && time=1 && (target,stateno=1317 || target,stateno=1319))
triggerall= helper(33333),var(59)>16+2
triggerall= !sysvar(4)
trigger1= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44
trigger1= fvar(35)<const(velocity.jump.fwd.x)*28+(helper(33333),var(59)-16-1)*const(velocity.run.fwd.x)
trigger1= random<500+100*((power>=1000)+(power>=2000)+(life-p2life>250)+(life-p2life>500)+(enemynear,power<750)+(p2dist x<120)) || power>=2500
sysvar(4)=1
[State -1, okizeme-var(mekuri or not)]
type=null
;triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (enemynear,stateno=[5110,5111]) && enemynear,time=3
triggerall= helper(33333),var(59)>7
triggerall= sysvar(4)=1
trigger1= fvar(3):=ifelse(random<750,640,600)
[State -1, okizeme-var(mekuri or not)]
type=null
;triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
trigger1= abs(helper(ifelse(facing=1,33333,22222)),pos x-enemynear,pos x)<const(velocity.jump.fwd.x)*19+44
trigger1= sysvar(4)=1 && fvar(3)=600
trigger1= fvar(3):=640
trigger2= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)<44
trigger2= sysvar(4)=1 && fvar(3)=640
trigger2= fvar(3):=600

[State -1, avoid test]
type=changestate
value=105
trigger1=0
trigger1= ctrl || stateno=52 || (stateno=[150,155])
trigger1= enemynear,hitdefattr=SCA,HA,AT

[State -1, Orochi Kudaki]
type=changestate
value=3100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= power>=3000 && !var(20)
triggerall= fvar(35)>=0;+enemynear,vel x*2*(enemynear,statetype=A || enemynear,vel x<0)
triggerall= enemynear,statetype!=L && enemynear,hitfall=0
;counter
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]))
trigger1= enemynear,hitdefattr=SC,NA,AP,NT,ST && enemynear,animtime<=-2-1
trigger1= fvar(37)<=43+enemynear,vel x*2*(-1*facing*enemynear,facing)
trigger1= enemynear,hitdefattr=SCA,NA,SA,AP,AT
trigger1= enemynear,time>=10-(random%3=0)*2-(random%6=0)*2-(random%12=0)*2
trigger1= random<150+(enemynear,time>10)+(enemynear,time-10)*25
trigger2= (stateno=[200,499]) && movecontact
trigger2= enemynear,hitdefattr=SC,NA,NP,SP,NT,ST && enemynear,time<time && enemynear,animtime<=-2-1
trigger2= fvar(37)<=43
;atenage
trigger3= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]))
trigger3= (enemynear,stateno=151 || enemynear,stateno=153) && enemynear,gethitvar(hittime)=1
trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(1)<=43
trigger4= ((stateno=[200,499]) || stateno=1210) && movecontact
trigger4= (enemynear,stateno=151 || enemynear,stateno=153) && enemynear,gethitvar(hittime)=1
trigger4= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(1)<=43

[State -1, MAX Oni Musou]
type=changestate
value=3050
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
triggerall= power>=2000 && var(20)<=7
triggerall= !var(16) && (var(15)<4 || var(20) || (stateno=[1000,4999]))
triggerall= numtarget
triggerall= ceil((fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))-23)/((53.7/6)-helper(33333),fvar(0)))<target,gethitvar(hittime)-7-1
;triggerall= (p2bodydist y=[-67,0])
triggerall= (p2statetype!=A || var(20)) && p2statetype!=L && p2movetype!=A
triggerall= enemynear,life>=240 && power<2900;[210,240]
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= stateno=1010 && anim=1012 && movehit=1
trigger1= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(3)>=76+vel x*3-ceil(0.72*6)
;trigger1= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))=[-78,28+(53/6)*18]
trigger2= stateno=1010 && anim=1011 && movehit=1
trigger2= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(5)>=76+vel x*5-ceil(0.53896*15)
;trigger2= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))=[-78,23+floor(53.7/6)*18]
trigger3= stateno=1010 && anim=1010 && movehit=1
trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(7)>=76+vel x*7-ceil(0.53896*28)
;trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))=[-78,23+floor(53.7/6)*18]

[State -1, MAX Fuji Oroshi juggle];5+1,18
type=changestate
value=3250
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= power>=2000 && var(20)<=7
;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
;triggerall= !var(16) && (var(15)<2 || var(20) || (stateno=[1000,4999]))
;triggerall= ifelse((enemynear,statetype=A && enemynear,movetype=H), (enemynear,hitfall), 1)
triggerall= p2statetype!=L
triggerall= helper(55555),var(50)=0 && enemy,numproj=0
trigger1= stateno=3002 && movehit && numtarget
trigger1= fvar(37)+helper(33333),fvar(0)*9>68 && 5>helper(33333),fvar(0)
trigger1= ceil((fvar(37)+helper(33333),fvar(0)*9-68)/(5-helper(33333),fvar(0)))<18
trigger1= fvar(2):=ceil((fvar(37)+helper(33333),fvar(0)*9-68)/(5-helper(33333),fvar(0))) || 1
;trigger1= fvar(36)+target,vel y*(fvar(2)+9)+helper(33333),fvar(23)*(fvar(2)+9)*(fvar(2)+10)*0.5+12*fvar(2)-1.33*fvar(2)*(fvar(2)+1)=[-58-fvar(39),-1]
trigger1= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]
trigger2= stateno=3002 && movehit && numtarget
trigger2= fvar(37)+helper(33333),fvar(0)*9<68 && 5<helper(33333),fvar(0)
trigger2= ceil((68-fvar(37)-helper(33333),fvar(0)*9)/(helper(33333),fvar(0)-5))>18
trigger2= fvar(2):=ceil((68-fvar(37)-helper(33333),fvar(0)*9)*(helper(33333),fvar(0)-5)) || 1
;trigger2= fvar(36)+target,vel y*(fvar(2)+9)+helper(33333),fvar(23)*(fvar(2)+9)*(fvar(2)+10)*0.5+12*fvar(2)-1.33*fvar(2)*(fvar(2)+1)=[-58-fvar(39),-1]
trigger2= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]
trigger3= stateno=3002 && movehit && numtarget
trigger3= fvar(37)+helper(33333),fvar(0)*9<68 && 5>helper(33333),fvar(0)
trigger3= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]
trigger4= stateno=3002 && movehit && numtarget
trigger4= fvar(37)+helper(33333),fvar(0)*5<33 && 5>=helper(33333),fvar(0)
trigger4= fvar(36)+helper(33333),fvar(22)*5+helper(33333),fvar(23)*15=[-64-fvar(39),-1]
trigger5= stateno=3002 && movehit && numtarget && fvar(35)>=0
trigger5= (helper(22222),rootdist x<90+target,const(size.air.front) && facing=1)||(helper(33333),rootdist x<90+target,const(size.air.front) && facing=-1)
trigger5= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]

[State -1, MAX Fuji Oroshi counter];5+1,18
type=changestate
value=3250
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= power>=2000 && var(20)<=7
;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
;triggerall= !var(16) && (var(15)<2 || var(20) || (stateno=[1000,4999]))
;triggerall= ifelse((enemynear,statetype=A && enemynear,movetype=H), (enemynear,hitfall), 1)
triggerall= p2statetype!=L
triggerall= helper(55555),var(50)=0 && enemy,numproj=0
trigger1= ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]) || var(6) || var(7) || var(8)
trigger1= enemynear,hitdefattr=SCA,NA,SA,AP,AT && (enemynear,life>=210)
trigger1= enemynear,time>=10-(random%3=0)*2-(random%6=0)*2-(random%12=0)*2
trigger1= random<150+(enemynear,time>10)+(enemynear,time-10)*25
trigger1= fvar(37)=[-22,50+enemynear,vel x*7*(-1*facing*enemynear,facing)]
trigger1= p2statetype!=A || (p2bodydist y+enemynear,vel y*8+enemynear,const(movement.yaccel)*36=[-53-fvar(39),-1])

[State -1, Oni Musou]
type=changestate
value=3000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
triggerall= power>=1000 && var(20)<=7
triggerall= !var(16) && (var(15)<2 || var(20) || (stateno=[1000,4999]))
triggerall= !(enemynear,ctrl) && ((enemynear,stateno!=[120,155]) || enemynear,statetype=A)
triggerall= numtarget
triggerall= ceil((fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))-23)/((53.7/6)-helper(33333),fvar(0)))<target,gethitvar(hittime)-8-1
triggerall= (p2statetype!=A || var(20)) && p2statetype!=L && p2movetype!=A
trigger1= stateno=1010 && anim=1012 && movehit=1
trigger1= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(3)>=76+vel x*3-ceil(0.719*6)
;trigger1= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))=[-78,23+floor(53.7/6)*18]
trigger2= stateno=1010 && anim=1011 && movehit=1
trigger2= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(5)>=76+vel x*5-ceil(0.53896*15)
;trigger2= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))=[-78,23+floor(53.7/6)*18]
trigger3= stateno=1010 && anim=1010 && movehit=1
trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(7)>=76+vel x*7-ceil(0.53896*28)
;trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(target,gethitvar(hittime))=[-78,23+floor(53.7/6)*18]

[State -1, Fuji Oroshi juggle];7+1,18
type=changestate
value=3200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= power>=1000 && var(20)<=7
triggerall= p2statetype!=L
triggerall= helper(55555),var(50)=0 && enemy,numproj=0
trigger1= stateno=3002 && movehit && numtarget
trigger1= fvar(37)+helper(33333),fvar(0)*11>68 && 4>helper(33333),fvar(0)
trigger1= ceil((fvar(37)+helper(33333),fvar(0)*11-68)/(4-helper(33333),fvar(0)))<18
trigger1= fvar(2):=ceil((fvar(37)+helper(33333),fvar(0)*11-68)/(5-helper(33333),fvar(0))) || 1
;trigger1= fvar(36)+target,vel y*(fvar(2)+9)+helper(33333),fvar(23)*(fvar(2)+9)*(fvar(2)+10)*0.5+12*fvar(2)-1.33*fvar(2)*(fvar(2)+1)=[-58-fvar(39),-1]
trigger1= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]
trigger2= stateno=3002 && movehit && numtarget
trigger2= fvar(37)+helper(33333),fvar(0)*11<68 && 4<helper(33333),fvar(0)
trigger2= ceil((68-fvar(37)-helper(33333),fvar(0)*11)/(helper(33333),fvar(0)-4))>18
trigger2= fvar(2):=ceil((68-fvar(37)-helper(33333),fvar(0)*11)*(helper(33333),fvar(0)-5)) || 1
;trigger2= fvar(36)+target,vel y*(fvar(2)+9)+helper(33333),fvar(23)*(fvar(2)+9)*(fvar(2)+10)*0.5+12*fvar(2)-1.33*fvar(2)*(fvar(2)+1)=[-58-fvar(39),-1]
trigger2= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]
trigger3= stateno=3002 && movehit && numtarget
trigger3= fvar(37)+helper(33333),fvar(0)*11<68 && 4>helper(33333),fvar(0)
trigger3= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]
trigger4= stateno=3002 && movehit && numtarget
trigger4= fvar(37)+helper(33333),fvar(0)*7<33 && 4>=helper(33333),fvar(0)
trigger4= fvar(36)+helper(33333),fvar(22)*7+helper(33333),fvar(23)*28=[-70-fvar(39),-1]
trigger5= stateno=3002 && movehit && numtarget && fvar(35)>=0
trigger5= (helper(22222),rootdist x<90+target,const(size.air.front) && facing=1)||(helper(33333),rootdist x<90+target,const(size.air.front) && facing=-1)
trigger5= fvar(36)+target,vel y*27+helper(33333),fvar(23)*378+12*18-1.33*171=[-70-fvar(39),-1]

[State -1, Fuji Oroshi];7+1
type=changestate
value=3200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
;;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
triggerall= power>=1000 && var(20)<=7
triggerall= !var(16) && (var(15)<2 || var(20) || (stateno=[1000,4999]))
triggerall= !(enemynear,ctrl) && (!(enemynear,stateno=[120,155]) || enemynear,statetype=A)
triggerall= ifelse((enemynear,statetype=A && enemynear,movetype=H), (enemynear,hitfall), 1)
triggerall= p2statetype!=L; && p2movetype!=A
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])) || var(6) || var(7) || var(8)
trigger1= enemynear,hitdefattr=SCA,NA,SA,AP,AT
trigger1= enemynear,time>=10-(random%3=0)*2-(random%6=0)*2-(random%12=0)*2
trigger1= random<150+(enemynear,time>10)+(enemynear,time-10)*25
trigger1= fvar(37)=[-22+enemynear,vel x*8*(enemynear,vel x<0 || enemynear,statetype=A),32+enemynear,vel x*8*(enemynear,vel x<0 || enemynear,statetype=A)]
trigger1= p2statetype!=A || (p2dist y+enemynear,vel y*8+enemynear,const(movement.yaccel)*36=[-53,-1])
trigger2= (stateno=1100 || stateno=1110 || stateno=1131) && movehit && numtarget && statetype=S
trigger2= ((fvar(37)+helper(33333),fvar(0)*7=[-32,32*.5]) && (p2bodydist y+enemynear,gethitvar(yvel)*7+enemynear,gethitvar(yaccel)*28=[-53,-1]))
trigger3= (((stateno=1210 || stateno=1231) && movehit) || ((prevstateno=1210 || prevstateno=1231) && ctrl) || ctrl) && enemynear,movetype=H; && enemynear,life<210
trigger3= ((fvar(37)+enemynear,vel x*7=[-32,32]) && (p2dist y+enemynear,vel y*7+enemynear,gethitvar(yaccel)*28=[-53,-1]))

[State -1, Super Hyakkan Otoshi]
type=changestate
value=1200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
;triggerall= !var(16) && (var(15)<1 || var(20))
trigger1= numtarget(3201) && ctrl
trigger1= var(10):=2 || 1

;===================================<excel>=====================================

[State -1, excel]
type=changestate
value= ifelse(statetype=A, 905, 900)
triggerall= var(59)>=11 && numenemy
triggerall= roundstate=2 && (statetype!=A || (vel x>0 && vel y>=0))
triggerall= power>=1000 && !var(20)
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])) && statetype!=A && enemynear,statetype=S
trigger1= enemynear,hitdefattr=SC,NA,NT,ST && enemynear,animtime<=-7-1-1
trigger1= fvar(37)+4.86*helper(33333),fvar(18)<18+12.81*(7-1)-1.0779234*21;hyakkan
trigger1= fvar(37)=[-22,64+enemynear,vel x*7*(enemynear,vel x<0 || enemynear,ctrl=0)*ifelse((facing=enemynear,facing),-1,1)];chop
trigger1= fvar(8):=(-1*(-6.65)-(6.65**2-4*.1105563*(-enemynear,const(size.head.pos.y)-40))**0.5)/(.1105563) || 1
trigger1= fvar(37)+4.65*helper(33333),fvar(3+floor(fvar(8)))<=18+fvar(8)*12.81-1.0779234*fvar(8)*(fvar(8)+1)*0.5
trigger1= enemynear,life>110

[State -1, SHP excel]
type=changestate
value=220+(enemynear,statetype=C)*200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && var(20)>0
trigger1= fvar(37)=[-22,64+enemynear,vel x*7*(enemynear,vel x<0 || enemynear,ctrl=0)*ifelse((facing=enemynear,facing),-1,1)]; && (p2dist y=[-86,0])
trigger1= fvar(8):=(-1*(-6.65)-(6.65**2-4*.1105563*(-enemynear,const(size.head.pos.y)-40))**0.5)/(.1105563) || 1
trigger1= fvar(37)+4.65*helper(33333),fvar(3+floor(fvar(8)))<=18+fvar(8)*12.81-1.0779234*fvar(8)*(fvar(8)+1)*0.5
trigger1= stateno=900 && !animtime && ctrl && enemynear,animtime<=-7-1+4 && enemynear,ctrl=0
;trigger2= (helper(22222),rootdist x<=22+enemynear,const(size.ground.front)+enemynear,const(size.ground.back)+23 && facing=1) || (helper(33333),rootdist x<=22+enemynear,const(size.ground.front)+enemynear,const(size.ground.back)+23 && facing=-1)
trigger2= (stateno=52 || ctrl) && enemynear,vel y>0 && enemynear,statetype=A
trigger2= fvar(37)+helper(33333),fvar(0)*5<23
trigger2= p2bodydist y+enemynear,vel y*5+enemynear,gethitvar(yaccel)*15=[-98,-66]

[State -1, Super Hyakkan excel]
type=changestate
value=1200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && var(20)>0;ceil((fvar(37)-20)/9.268+6)
;triggerall= (p2bodydist y+enemynear,vel y*ceil((fvar(37)-20)/9.268+6)-enemynear,gethitvar(yaccel)*0.5*ceil((fvar(37)-20)/9.268+6)*ceil((fvar(37)-20)/9.268+6+1)=[-67,-1]) || !(enemynear,statetype=A); && p2statetype!=L && (fvar(37)=[-96,96])
triggerall= !(enemynear,statetype=L) && !(enemynear,statetype=C)
trigger1= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(15)<18+12.81*(7-1)-1.0779234*21
trigger1= (stateno=220 || stateno=420) && movehit
trigger1= var(10):=2
trigger2= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(15)<18+19.82*(7-1)-1.5270582*21
trigger2= (stateno=52 || (stateno=1110 && movehit))
trigger2= p2bodydist y+(enemynear,gethitvar(yvel)+enemynear,time*enemynear,gethitvar(yaccel))*15+enemynear,gethitvar(yaccel)*120>-45-6.65*(7-1)+.1105563*21 || (helper(22222),rootdist x>100 && facing=1) || (helper(33333),rootdist x>100 && facing=-1)
;trigger2= p2bodydist y+enemynear,vel y*15+enemynear,const(movement.yaccel)*120>-45-6.65*(7-1)+.1105563*21 || (helper(22222),rootdist x>100 && facing=1) || (helper(33333),rootdist x>100 && facing=-1)
trigger2= var(10):=2+(fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(15)>=18+12.81*(7-1)-1.0779234*21 || p2bodydist y+enemynear,vel y*15+enemynear,gethitvar(yaccel)*15<-45-7.89*6+.1105563*21)*1
trigger3= stateno=1210 && movehit
trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(15)<18+12.81*(7-1)-1.0779234*21

[State -1, Jump excel]
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= var(20);ceil((fvar(37)-20)/9.268+6);!var(16) &&
;triggerall= (p2bodydist y+enemynear,vel y*ceil((fvar(37)-20)/9.268+6)-enemynear,gethitvar(yaccel)*0.5*ceil((fvar(37)-20)/9.268+6)*ceil((fvar(37)-20)/9.268+6+1)=[-67,-1]) || !(enemynear,statetype=A); && p2statetype!=L && (fvar(37)=[-96,96])
triggerall= !(enemynear,statetype=L) && !(enemynear,statetype=C)
trigger1= ctrl
;trigger1= p2bodydist y+(enemynear,gethitvar(yvel)+enemynear,time*enemynear,gethitvar(yaccel))*15+enemynear,gethitvar(yaccel)*120<=-45-6.65*(7-1)+.1105563*21 && ((helper(22222),rootdist x<=100 && facing=1) || (helper(33333),rootdist x<=100 && facing=-1))
trigger1= ((helper(22222),rootdist x<=100 && facing=1) || (helper(33333),rootdist x<=100 && facing=-1))
trigger1= var(3):=3 || 1
trigger1= fvar(1):=1 || 1

[State -1, AMP excel]
type=changestate
value=610
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && var(20)>0
triggerall= fvar(37)+helper(33333),fvar(0)*5=[-22,23]
triggerall= p2bodydist y+enemynear,gethitvar(yvel)*5+enemynear,gethitvar(yaccel)*15=[-142-enemynear,const(size.head.pos.y)*0.5,-enemynear,const(size.head.pos.y)-58]
triggerall= pos y+vel y*5+0.85*15<0 || vel y<=0
trigger1= (stateno=1200 || stateno=1210) && movehit
trigger2= (stateno=620 || stateno=610) && movehit
[State -1, AHP excel]
type=changestate
value=620
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && var(20)>0
triggerall= fvar(37)+helper(33333),fvar(0)*5=[-22,40]
triggerall= p2bodydist y+enemynear,gethitvar(yvel)*5+enemynear,gethitvar(yaccel)*15=[-58-enemynear,const(size.head.pos.y)*0.5,-enemynear,const(size.head.pos.y)-38]
triggerall= pos y+vel y*5+0.85*15<0 || vel y<=0
trigger1= (stateno=1200 || stateno=1210) && movehit
trigger2= (stateno=620 || stateno=610) && movehit

[State -1, AMP excel]
type=changestate
value=610
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && var(20)>0
triggerall= fvar(37)+helper(33333),fvar(0)*5=[-22,33]
triggerall= p2bodydist y+(enemynear,gethitvar(yvel)+enemynear,time*enemynear,gethitvar(yaccel))*5+enemynear,gethitvar(yaccel)*15=[-115-enemynear,const(size.head.pos.y)*0.5,-enemynear,const(size.head.pos.y)-58]
triggerall= pos y+vel y*5+0.85*15<0 || vel y<=0
trigger1= ctrl
[State -1, AHP excel]
type=changestate
value=620
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && var(20)>0
triggerall= fvar(37)+helper(33333),fvar(0)*5=[-22,40]
triggerall= p2bodydist y+(enemynear,gethitvar(yvel)+enemynear,time*enemynear,gethitvar(yaccel))*5+enemynear,gethitvar(yaccel)*15=[-58-enemynear,const(size.head.pos.y)*0.5,-enemynear,const(size.head.pos.y)-38]
triggerall= pos y+vel y*5+0.85*15<0 || vel y<=0
trigger1= ctrl

;==================================<counter>====================================

[State -1, CLP counter]
type=changestate
value=400
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype=S || enemynear,statetype=C
;triggerall= !(enemynear,hitdefattr=SCA,HA,HP)
trigger1= (fvar(37)=[-22,50]) && (p2dist y=[-19,0])
trigger1= (stateno=[760,761]) && !animtime
trigger1= enemynear,hitpausetime-enemynear,animtime*(enemynear,hitdefattr=SC,SA,SP && enemynear,movecontact=0)>2
trigger2= fvar(37)<=50+enemynear,vel x*2*(facing*enemynear,facing*-1)
trigger2= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger2= helper(22222),var(10) || helper(55555),var(55)=1
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-2-1 && enemynear,time*0.5>=-enemynear,animtime
trigger2= enemynear,movetype=I || enemynear,animtime=-2-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
[State -1, SHP counter]
type=changestate
value=220
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype=S || enemynear,statetype=C
;triggerall= !(enemynear,hitdefattr=SCA,HA,HP)
trigger1= (fvar(37)=[50,64]);50,64
trigger1= (stateno=[760,761]) && !animtime
trigger1= enemynear,hitpausetime-enemynear,animtime*(enemynear,hitdefattr=SC,SA,SP && enemynear,movecontact=0)>7
trigger2= fvar(37)<=64+enemynear,vel x*7*(facing*enemynear,facing*-1)
trigger2= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger2= helper(22222),var(10) || helper(55555),var(55)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-7-1 && enemynear,time*0.5>=-enemynear,animtime
trigger2= enemynear,movetype=I || enemynear,animtime=-7-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
[State -1, SHP counter]
type=changestate
value=220
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype=A
;triggerall= !(enemynear,hitdefattr=SCA,HA,HP)
trigger1= (fvar(37)=[-22,23]) && (p2dist y=[-118-fvar(39),-1])
trigger1= (stateno=[760,761]) && ctrl
trigger1= enemynear,hitpausetime+ceil((abs(enemynear,const(velocity.jump.y))-abs(enemynear,vel y))/enemynear,const(movement.yaccel))>5
trigger2= fvar(37)<=23+enemynear,vel x*5*(facing*enemynear,facing*-1)
trigger2= fvar(36)+enemynear,vel y*5+enemynear,const(movement.yaccel)*15=[-118-fvar(39),-1]
trigger2= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger2= helper(22222),var(10) || helper(55555),var(55)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-5-1 && (enemynear,movetype=I || enemynear,animtime=-5-1)
trigger2= enemynear,movecontact=0 || (enemynear,hitdefattr=SCA,SA,HA && enemynear,power<1000)
[State -1, SHP counter]
type=changestate
value=250
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype=A
;triggerall= !(enemynear,hitdefattr=SCA,HA,HP)
trigger1= (fvar(37)=[-22,50]) && (p2dist y=[-102-fvar(39),-1])
trigger1= (stateno=[760,761]) && ctrl
trigger1= enemynear,hitpausetime+ceil((abs(enemynear,const(velocity.jump.y))-abs(enemynear,vel y))/enemynear,const(movement.yaccel))>6
trigger2= fvar(37)<=50+enemynear,vel x*6*(facing*enemynear,facing*-1)
trigger2= fvar(36)+enemynear,vel y*6+enemynear,const(movement.yaccel)*21=[-102-fvar(39),-1]
trigger2= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger2= helper(22222),var(10) || helper(55555),var(55)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-6-1 && (enemynear,movetype=I || enemynear,animtime=-6-1)
trigger2= enemynear,movecontact=0 || (enemynear,hitdefattr=SCA,SA,HA && enemynear,power<1000)
[State -1, Harai-geri parry counter]
type=changestate
value=255
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype=S || enemynear,statetype=C
;triggerall= !(enemynear,hitdefattr=SCA,HA,HP)
trigger1= (fvar(37)=[64,93]) && (p2dist y=[-12,0]) && p2statetype!=A && p2statetype!=L
trigger1= (stateno=[760,761]) && !animtime
trigger1= enemynear,hitpausetime-enemynear,animtime>9
trigger2= fvar(37)<=93+enemynear,vel x*9*(facing*enemynear,facing*-1)
trigger2= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger2= helper(22222),var(10) || helper(55555),var(55)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-9-1 && (enemynear,time*0.5>=-enemynear,animtime || enemynear,movetype=I)
trigger2= enemynear,movetype=I || enemynear,animtime=-9-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
[State -1, Hyakuretsu Harite special]
type=changestate
value=1000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= (stateno=[760,761]) && ctrl
trigger1= enemynear,hitpausetime-enemynear,animtime*(enemynear,hitdefattr=SC,NA)>8+3
trigger1= fvar(37)=[93,76+12*2-0.72*3]
trigger1= var(10):=3 || 1
trigger2= ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])
trigger2= fvar(37)<=93+enemynear,vel x*9*(facing*enemynear,facing*-1)
trigger2= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger2= helper(22222),var(10) || helper(55555),var(55)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-8-3-1 && (enemynear,time*0.5>=-enemynear,animtime || enemynear,movetype=I)
trigger2= enemynear,movetype=I || enemynear,animtime=-8-3-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
trigger2= fvar(37)=[93,76+12*2-0.72*3]
trigger2= random<200
trigger2= var(10):=3 || 1
[State -1, Zutsuki special]
type=changestate
value=1100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype=S || enemynear,statetype=C
triggerall= enemy,numproj=0 && helper(55555),var(59)=0
triggerall= helper(55555),var(59)=0 && enemynear,numproj=0
triggerall= helper(55555),var(50)
trigger1= (stateno=[760,761]) && ctrl
trigger1= enemynear,hitpausetime-enemynear,animtime*(enemynear,hitdefattr=SC,NA)>6+ceil((fvar(37)-28)/9.2)
trigger1= fvar(37)>=93
trigger1= var(10):=3 || 1
trigger2= ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])
trigger2= fvar(37)<=93+enemynear,vel x*9*(facing*enemynear,facing*-1)
trigger2= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger2= helper(55555),var(55) && !inguarddist
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-6-ceil((fvar(37)-28)/12)-1 && (enemynear,time*0.5>=-enemynear,animtime || enemynear,movetype=I || !inguarddist)
trigger2= enemynear,movetype=I || enemynear,animtime=-6-ceil((fvar(37)-28)/9.2)-1 || !inguarddist
;trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
trigger2= fvar(37)>=93
trigger2= random<200
trigger2= var(10):=3 || 1

[State -1, Throw counter];4,43
type=changestate
value=850
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && p2statetype!=L
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= pos y+vel y*2+0.525*3<=-1
triggerall= p2statetype=A
trigger1= (fvar(37)-vel x*2=[-22,38])
trigger1= (p2dist y+vel y*2+0.525*3=[-64-fvar(39),-enemynear,const(size.head.pos.y)-18])
trigger1= p2statetype=A || pos y+vel y*22+0.525*253>-1
trigger1= (stateno=762 || stateno=763) && ctrl
trigger1= enemynear,hitpausetime-enemynear,animtime*(p2statetype!=A)>2
trigger2= fvar(37)-vel x*2-enemynear,vel x*2=[-22,38]
trigger2= enemynear,pos y+enemynear,vel y*2+enemynear,const(movement.yaccel)*3<=-1
trigger2= p2dist y-vel y*2-0.525*3+enemynear,vel y*2+enemynear,const(movement.yaccel)*3=[-64-fvar(39),-enemynear,const(size.head.pos.y)-18]
trigger2= ctrl && var(29)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-2-1 && enemynear,time*0.5>=-enemynear,animtime
trigger2= enemynear,movetype=I || enemynear,animtime=-2-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
[State -1, ALP counter];4,43
type=changestate
value=600
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && p2statetype!=L
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= pos y+vel y*5+0.525*15<=-1
triggerall= (p2statetype=A && enemynear,pos y+enemynear,vel y*5+enemynear,const(movement.yaccel)*15<=-1) || pos y+vel y*12+const(movement.yaccel)*78>-1;8+4
trigger1= (fvar(37)-vel x*4=[-22,43])
trigger1= (p2dist y+vel y*4+0.525*10=[-70-fvar(39),-enemynear,const(size.head.pos.y)-43])
trigger1= p2statetype=A || pos y+vel y*12+0.525*78>-1
trigger1= (stateno=762 || stateno=763) && ctrl
trigger1= enemynear,hitpausetime-enemynear,animtime*(enemynear,statetype!=A && helper(22222),var(10)=1)>6
trigger2= fvar(37)-vel x*4-enemynear,vel x*4=[-22,43]
trigger2= p2dist y-vel y*4-0.525*10+enemynear,vel y*4+enemynear,const(movement.yaccel)*10=[-72-fvar(39),-enemynear,const(size.head.pos.y)-48]
trigger2= ctrl && var(29)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-4-1 && enemynear,time*0.5>=-enemynear,animtime
trigger2= enemynear,movetype=I || enemynear,animtime=-4-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
[State -1, AHP counter];5,38,
type=changestate
value=620+(vel x=0)*1
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && p2statetype!=L
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= pos y+vel y*6+0.525*21<=-1
triggerall= (p2statetype=A && enemynear,pos y+enemynear,vel y*5+enemynear,const(movement.yaccel)*15<=-1) || pos y+vel y*13+0.525*91>-1;8+5
trigger1= fvar(37)-vel x*5=[-22,38]
trigger1= p2dist y+vel y*5+0.525*15=[-70-fvar(39),-enemynear,const(size.head.pos.y)-46]
trigger1= (stateno=762 || stateno=763) && ctrl
trigger1= enemynear,hitpausetime-enemynear,animtime*(enemynear,statetype!=A && helper(22222),var(10)=1)>6
trigger2= fvar(37)-vel x*5-enemynear,vel x*5=[-22,38]
trigger2= p2dist y-vel y*5-0.525*15+enemynear,vel y*5+enemynear,const(movement.yaccel)*15=[-70-fvar(39),-enemynear,const(size.head.pos.y)-46]
trigger2= ctrl && var(29)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-5-1 && enemynear,time*0.5>=-enemynear,animtime
trigger2= enemynear,movetype=I || enemynear,animtime=-5-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)
[State -1, AHK counter]
type=changestate
value=650
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && p2statetype!=L
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= pos y+vel y*9+0.525*45<=-1;8+1
triggerall= (p2statetype=A && enemynear,pos y+enemynear,vel y*8+enemynear,const(movement.yaccel)*36<=-1) || pos y+vel y*16+0.525*136>-1;(12-3-1)+8
trigger1= (fvar(37)-vel x*8=[-22,58])
trigger1= (p2dist y+vel y*8+0.525*36=[-52-fvar(39),-enemynear,const(size.head.pos.y)-28])
trigger1= stateno=762 && ctrl
trigger1= enemynear,hitpausetime-enemynear,animtime*(enemynear,statetype!=A && helper(22222),var(10)=1)>8
trigger2= fvar(37)-vel x*8-enemynear,vel x*8=[-22,58]
trigger2= p2dist y-vel y*8-0.525*36+enemynear,vel y*8+enemynear,const(movement.yaccel)*36=[-52-fvar(39),-enemynear,const(size.head.pos.y)-28]
trigger2= ctrl && var(29)
trigger2= enemynear,ctrl=0 && enemynear,animtime<=-8-1 && enemynear,time*0.5>=-enemynear,animtime
trigger2= enemynear,movetype=I || enemynear,animtime=-8-1
trigger2= enemynear,movecontact=0 || (helper(22222),var(10)>=2 && enemynear,power<1000)

[State -1, Super zutsuki conter]
type=changestate
value=1100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(40)>16)
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= fvar(37)<=3+enemynear,vel x*7*(-1*facing*enemynear,facing) || (stateno=220 && movecontact && enemynear,hitdefattr=SCA,NA,SA)
triggerall= fvar(35)>=ifelse(p2statetype!=A,0,-8.3+enemynear,vel x*7*(-1*facing*enemynear,facing))
triggerall= (p2dist y+enemynear,vel y*8+enemynear,const(movement.yaccel)*36=[-98-fvar(39),-1]) || p2statetype!=A
trigger1= (ctrl || (stateno=[21,25]) || (stateno=[100,101])) || var(6)
trigger1= enemynear,hitdefattr=SCA,NA,SA,AP,AT
trigger1= enemynear,time>=10-(random%3=0)*2-(random%6=0)*2-(random%12=0)*2
trigger1= random<150+(enemynear,time>10)*(enemynear,time-10)*25
trigger1= enemynear,animtime<=-7-1 || enemynear,statetype=A
trigger1= var(10):=1 || 1

[State -1, EX Super Hyakkan Otoshi combo]
type=changestate
value=1230
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
;;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(40)>16)
triggerall= power>=500 && var(20)<=60
triggerall= !var(16) && (var(15)<2 || var(20))
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155])
triggerall= p2statetype!=L
trigger1= (stateno=420 || stateno=450 || stateno=255 || stateno=220) && movehit && numtarget
trigger1= fvar(2):=((24.33-helper(33333),fvar(0))-((24.33-helper(33333),fvar(0))**2-4*0.92*(fvar(37)-18))**0.5)/1.84 || 1
trigger1= enemynear,pos y+enemynear,gethitvar(yvel)*(8+fvar(2))+.5*enemynear,gethitvar(yaccel)*(9+fvar(2))*(9+fvar(2)+1)=[-45-8.76*fvar(2)+.1105563*fvar(2)*(fvar(2)+1)*.5,-10]

[State -1, Super Hyakkan Otoshi]
type=changestate
value=1200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(40)>16)
triggerall= !var(16) && (var(15)<1 || var(20))
;triggerall= (fvar(37)=[-22,13+10.7*7-0.9*28+enemynear,vel x*17*(enemynear,vel x<0 || (enemynear,ctrl=0 && enemynear,animtime<=-18))]) || (enemynear,hitdefattr=SCA,AT && enemynear,movetype=A);152
;triggerall= ((p2bodydist y+enemynear,vel y*17+enemynear,const(movement.yaccel)*153=[-64,-1]) && p2stateno!=5120) || p2statetype!=A
triggerall= fvar(35)>=0 && fvar(37)<=18+10.7*7-0.9*28
triggerall= ifelse(enemynear,statetype=S,-5.31*7+0.11*28>=enemynear,const(size.head.pos.y)+24,1)
triggerall= ifelse(enemynear,statetype=C,-5.31*7+0.11*28>=enemynear,const(size.mid.pos.y)+24,1)
triggerall= !(enemynear,statetype=A) && enemynear,animtime<=-17-1
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])) || var(6)
trigger1= enemynear,hitdefattr=SC,AA,AT
trigger1= enemynear,time>=10-(random%3=0)*2-(random%6=0)*2-(random%12=0)*2 || enemynear,hitdefattr=SC,AT
trigger1= random<150+(enemynear,time>10)*(enemynear,time-10)*25 || enemynear,hitdefattr=SC,AT
trigger1= enemynear,time*2<=-enemynear,animtime
trigger1= var(10):=1 || 1
trigger2= var(6)=1 && time>enemynear,time
trigger2= enemynear,hitdefattr=SC,AA,AT
trigger2= enemynear,time*2<=-enemynear,animtime
trigger2= var(10):=1 || 1

[State -1, Super Zutsuki]
type=changestate
value=1100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && !var(20)
;triggerall= fvar(37)<=3+enemynear,vel x*8*(-1*facing*enemynear,facing) || (movecontact && enemynear,hitdefattr=SCA,NA && enemynear,vel x>0)
;triggerall= fvar(35)>=-8.3+enemynear,vel x*8*(-1*facing*enemynear,facing)
triggerall= fvar(37)<=ifelse(-enemynear,animtime>12,28+4.864*(-enemynear,animtime-12),3)
triggerall= (p2dist y+enemynear,vel y*8+enemynear,const(movement.yaccel)*36=[-98-fvar(39),-1]) || p2statetype!=A
trigger1= var(6)
trigger1= enemynear,hitdefattr=SCA,AA,AT && time>enemynear,time && enemynear,time*2<=-enemynear,animtime
trigger1= var(10):=1 || 1

;==========<defence>==========

[State -1, throw counter]
type=changestate
value=1330
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && power>=500
triggerall= fvar(37)<40+enemynear,vel x*2*(enemynear,vel x<0) && fvar(35)>=0
trigger1= ctrl || (anim=[0,21])
trigger1= enemynear(var(5)),statetype!=A && enemynear(var(5)),hitdefattr=SC,AT
trigger1= enemynear,prevstateno!=5120

[State -1, back step]
type=changestate
value=105
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
trigger1= ctrl || (anim=[0,21]) || (stateno=[100,101]) || stateno=13000 || stateno=13001
trigger1= (helper(22222),rootdist x>70 && facing=-1) || (helper(33333),rootdist x>70 && facing=1) || (enemynear,animtime<=-ceil(-const(velocity.run.back.y)/0.608)*2-1 && p2statetype!=A)
trigger1= enemynear(var(5)),movetype=A && fvar(35)<160 && enemynear(var(5)),hitdefattr=SC,AT; && enemynear,animtime<=-18
trigger1= enemynear,vel x=0

[State -1, roll front];dist:97
type=changestate
value=710
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && (ctrl || (anim=[0,21]) || (stateno=[100,101]) || stateno=13000 || stateno=13001)
triggerall= (prevstateno!=[760,762])
triggerall= !(enemynear(var(5)),hitdefattr=SCA,AT)
triggerall= enemy,numproj=0 || (enemy,numproj=1 && helper(55555),inguarddist) || fvar(35)<85
trigger1= enemynear,hitdefattr=SCA,AA,AP
trigger1= (enemynear,animtime<=-25-1 && enemynear,statetype!=A) || (enemynear,statetype=A && p2dist y+enemynear,vel y*25+enemynear,const(movement.yaccel)*325<=-1)
;trigger1= p2stateno!=helper(55555),var(10) || p2stateno!=helper(55555),var(11) || enemynear,numproj || helper(55555),var(58)=1
trigger1= enemynear,time>=10-(random%2=0)*2-(random%4=0)*2-(random%8=0)*2-(random%16=0)*2
trigger1= random<150+(p2life>life)*25+(life<333)*25+(enemynear,time>9)*(enemynear,time-9)*25 || (!inguarddist && fvar(35)<enemynear,const(size.attack.dist) && fvar(35)>0 && facing!=enemynear,facing)
trigger1= helper(55555),var(58)=1 || helper(55555),var(50)=0
trigger2= inguarddist
trigger2= var(29) && enemynear(var(5)),ctrl=0 && !(enemynear,hitdefattr=SCA,AA,AT,AP)
trigger2= (enemynear,animtime<=-25-1 && enemynear(var(5)),statetype!=A) || (enemynear,statetype=A && fvar(36)+enemynear,vel y*25+enemynear,const(movement.yaccel)*325<=-1)
trigger2= random<150+(p2life>life)*25+(life<333)*25+(enemynear,time>9)*(enemynear,time-9)*25
trigger2= helper(55555),var(58)=1 || (helper(55555),var(50)=0 && enemy,numproj=1 && helper(55555),inguarddist)

[State -1, Dodge]
type=null;changestate
value=700
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (fvar(37)=[0,60])
trigger1= (ctrl || (stateno=[21,23]) || (stateno=[100,101]))
trigger1= enemynear,hitdefattr=SCA,NA,SA
trigger1= random<50 || enemynear,time>7
trigger1= enemynear,animtime=[-28-5,-28-1]

[State -1, Dash Backward]
type=changestate
value=105
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (ctrl || (anim=[0,21])) && (stateno!=[100,105])
trigger1= (helper(33333),rootdist x>60 && facing=1) || (helper(22222),rootdist x>60 && facing=-1)
trigger1= enemynear,movetype=A && enemynear,time<=2 && helper(55555),var(55)=0 && enemynear,animtime<=-31-1
trigger1= fvar(35)-enemynear,vel x*31=[enemynear,const(size.attack.dist)-60+22,enemynear,const(size.attack.dist)+22]
trigger1= random<50
trigger2= helper(ifelse(facing=1,33333,22222)),rootdist x>60 || (enemynear,statetype!=A && enemynear,animtime<=-32-1)
trigger2= enemynear,hitdefattr=SC,AT && (enemynear,vel x=0 || enemynear,statetype=A)
trigger2= enemynear,time<=5 || enemynear,statetype=A

[State -1, throw avoid]
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (ctrl || (anim=[0,21]) || (anim=[100,101]))
trigger1= enemynear,hitdefattr=SC,AT
trigger1= fvar(1):=1 || 1
trigger1= var(3):=1 || 1
trigger1= fvar(3):=600 || 1

[State -1, Guard]
type=changestate
value=120
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && (inguarddist || helper(55555),inguarddist) && !var(20)
triggerall= (ctrl || (stateno=[21,23]) || stateno=24 || (stateno=[100,101]) || (stateno=[13000,13001])) && (stateno!=[120,155])
triggerall= !(enemynear,hitdefattr=SCA,AT)
triggerall= statetype!=A || enemynear,statetype=A || enemynear,hitdefattr=SC,AA
;direct attack
trigger1= enemynear,hitdefattr=SA,AA,AP
trigger1= !numhelper(10700) && !numhelper(10702)
trigger2= enemynear,hitdefattr=SA,AA,AP && statetype!=A
trigger2= numhelper(10700)
trigger2= helper(10700),var(59)>=7
trigger3= enemynear,hitdefattr=C,AA,AP
trigger3= !numhelper(10701) && !numhelper(10702)
trigger4= enemynear,hitdefattr=C,AA,AP && statetype!=A
trigger4= numhelper(10701)
trigger4= helper(10701),var(59)>=7
trigger5= enemynear,hitdefattr=SCA,AA,AP && statetype=A
trigger5= numhelper(10702)
trigger5= helper(10702),var(59)>=7

[State -1, Guard hadou]
type=changestate
value=120
triggerall= var(59)>=1 && numenemy && numhelper(55555)
triggerall= roundstate=2 && inguarddist && !var(20)
triggerall= (ctrl || (stateno=[21,23]) || stateno=24 || (stateno=[100,101]) || stateno=13000 || stateno=13001) && (stateno!=[120,155])
triggerall= !(enemynear,hitdefattr=SCA,AT)
;direct attack
trigger1= helper(55555),var(59) && !numhelper(10700) && !numhelper(10702)
trigger2= numhelper(44445)
trigger2= helper(44445),var(59) && !numhelper(10700) && !numhelper(10702)
trigger3= (enemy,numproj>=2 || (helper(55555),var(49)=0 && enemy,numproj=1)) && helper(55555),inguarddist && !numhelper(10700) && !numhelper(10702)
trigger4= fvar(35)<enemynear,const(size.proj.attack.dist) && fvar(35)>=0
trigger4= helper(55555),var(59)=0 && enemynear,numproj=0
trigger4= (enemynear,stateno=helper(55555),var(10) && helper(55555),var(10)>0) || (enemynear,stateno=helper(55555),var(11) && helper(55555),var(11)>0)
trigger5= fvar(35)<enemynear,const(size.proj.attack.dist) && fvar(35)>=0
trigger5= helper(55555),var(50)=0 && enemynear,numproj=0
trigger5= (enemynear,stateno=helper(55555),var(12) && helper(55555),var(12)>0) || (enemynear,stateno=helper(55555),var(13) && helper(55555),var(13)>0)

[State -1, Zero Counter]
type=changestate
value=750
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= stateno=150 || stateno=152
triggerall= power>=1000 && var(20)<=60
triggerall= fvar(35)>=0 && fvar(37)<=ifelse(p2statetype=A,50,60)
triggerall= p2statetype!=A || (fvar(36)=[-72-fvar(39),-1])
triggerall= (helper(33333),var(55)>=3 && random<50+(helper(33333),var(55)-3)*50+(helper(33333),var(59)>=24 && (helper(ifelse(facing=1,22222,33333)),rootdist x-fvar(35)>=44+160))*100)
trigger1= enemynear,hitdefattr=SC,AT && -enemynear,animtime>=4+1
trigger2= enemynear,hitdefattr=SCA,NA && enemynear,movecontact=0 && -enemynear,animtime>=4+1
trigger3= enemynear,hitdefattr=SCA,NA,SA && enemynear,hitpausetime>=4+1

;==========<throw>==========

[State -1, Air Throw]
type=changestate
value=850
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= p2statetype=A && p2movetype!=H
triggerall= fvar(37)-vel x*2-enemynear,vel x*2<=38 && fvar(35)-vel x*2-enemynear,vel x*2>=0
triggerall= fvar(36)+enemynear,vel y*2+enemynear,const(movement.yaccel)*3-vel y*2-const(movement.yaccel)*3=[-64-fvar(39),-enemynear,const(size.head.pos.y)-18]
triggerall= enemynear,pos y+enemynear,vel y*2+enemynear,const(movement.yaccel)*3<=-1
trigger1= ctrl && enemynear,ctrl && enemynear,movetype=I

[State -1, Throw]
type=changestate
value=800
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= p2statetype!=L
triggerall= fvar(35)>=enemynear,vel x*2*(enemynear,statetype=A || enemynear,vel x<0)*(-1*facing*enemynear,facing)
triggerall= (helper(55555),var(50)=0 && enemy,numproj=0) || (facing=enemynear,facing && helper(55555),var(59)=0)
triggerall= p2movetype!=H || (enemynear,stateno=[150,155])
triggerall= enemynear,hitfall=0 && !numtarget && (p2stateno!=[5000,5999])
;enemy landing front
trigger1= !var(24) || var(24)=1;var(24)&2=0var(24)&2=0
trigger1= (ctrl || (anim=[0,21])) && enemynear,statetype=A && enemynear,vel y>0 && facing!=enemynear,facing
trigger1= enemynear,movetype=I
trigger1= p2dist y+enemynear,vel y*2+enemynear,const(movement.yaccel)*3>-1
trigger1= p2dist y+enemynear,vel y*1+enemynear,const(movement.yaccel)<=-1
trigger1= fvar(37)<=38+enemynear,vel x*2
;enemy landing back
trigger2= !var(24) || var(24)=1;var(24)&2=0var(24)&2=0
trigger2= (ctrl || (anim=[0,21])) && facing=enemynear,facing
trigger2= enemynear,statetype=A && enemynear,vel y>0
trigger2= p2dist y+enemynear,vel y*2+enemynear,const(movement.yaccel)*2>-1
trigger2= p2dist y+enemynear,vel y+enemynear,const(movement.yaccel)<=-1
trigger2= fvar(37)<38-enemynear,vel x*2
;enemy rolling
trigger3= fvar(37)<=38+enemynear,vel x*2*(-1*facing*enemynear,facing)
trigger3= (ctrl || (stateno=[21,23]) || stateno=24) && enemynear,ctrl=0 && enemynear,movetype=I && !var(29) && enemynear,animtime<=-2-1
trigger3= !(enemynear,statetype=A) && !(enemynear,anim=[20,21]) && enemynear,vel x
trigger3= enemynear,animtime<=-15-1; || random<333+(prevstateno!=800)*667
;enemy attacking over
trigger4= (ctrl || (stateno=[21,23]) || stateno=52)
trigger4= p2statetype!=A && enemynear,movecontact=0 && var(29) && enemynear,animtime=-2-1 && enemynear,ctrl=0
trigger4= fvar(37)<=38+enemynear,vel x*2*(-1*facing*enemynear,facing)

[State -1, Ooichou Nage]
type=changestate
value=1300
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= p2statetype!=L && enemynear,hitfall=0 && (p2movetype!=H || p2statetype!=A)
triggerall= !(enemynear,movetype=H) || (p2stateno=[150,155])
triggerall= !numtarget && (p2stateno!=[5000,5999])
triggerall= fvar(35)>=0+enemynear,vel x*2*(enemynear,statetype=A || enemynear,vel x<0)*(-1*(facing*enemynear,facing)) || (fvar(35)>=0 && p2statetype!=A)
;atenage
trigger1= !var(24) || var(24)=2;var(24)&1=0;
trigger1= ctrl || (anim=[0,21]) || (stateno=52&&movecontact&&(prevstateno=[600,699])) || (stateno=[100,101]) || (stateno=[13000,13001])
trigger1= (enemynear,stateno=[150,155]) && enemynear,statetype!=A && enemynear,gethitvar(hittime)=2
trigger1= fvar(37)<=38+enemynear,vel x*helper(33333),fvar(2)*(-1*facing*enemynear,facing)
trigger2= !var(24) || var(24)=2;var(24)&1=0;
trigger2= (stateno=[200,499]) && movecontact
trigger2= (enemynear,stateno=[150,155]) && enemynear,statetype!=A && enemynear,gethitvar(hittime)=2
trigger2= (fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(2)*(-1*facing*enemynear,facing)<=38 && movehit=1) || (movehit>1 && fvar(37)<=38+enemynear,vel x*helper(33333),fvar(2)*(-1*facing*enemynear,facing))
;enemy parrying
trigger3= stateno=[200,499]
trigger3= movehit && !numtarget && !(enemynear,movetype=H) && !(enemynear,statetype=A)
trigger3= fvar(37)<=38+enemynear,vel x*2*(enemynear,ctrl=0 || enemynear,vel x<0)*(-1*facing*enemynear,facing); && p2dist y=0
trigger3= life>750 && random<333 && enemynear,movetype=I
;enemy landing
trigger4= !var(24) || var(24)=1;var(24)&2=0
trigger4= (ctrl || (anim=[0,21]) || ((stateno=[200,499]) && movecontact))
trigger4= enemynear,movetype=I && enemynear,statetype=A && enemynear,vel y>0
trigger4= p2dist y+enemynear,vel y*2+enemynear,const(movement.yaccel)*2>-1 && p2dist y+enemynear,vel y+enemynear,const(movement.yaccel)<=-1
trigger4= fvar(37)<=38+enemynear,vel x*2*(-1*facing*enemynear,facing)
;enemy avoiding
trigger5= (stateno=[200,499]) && var(6)
trigger5= enemynear,movetype=I && enemynear,stateno>=200 && !var(29) && enemynear,ctrl=0 && enemynear,animtime<=-2-1
trigger5= fvar(37)<=38+enemynear,vel x*2*(-1*facing*enemynear,facing)

[State -1, Ooichou Nage]
type=changestate
value=1300
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= enemynear,movetype=H && (enemynear,statetype=S || enemynear,statetype=C)
triggerall= fvar(35)>=0+enemynear,vel x*2*(enemynear,statetype=A || enemynear,vel x<0)*(-1*(facing*enemynear,facing)) || (fvar(35)>=0 && p2statetype!=A)
;atenage
trigger1= stateno=52 && (ctrl || var(6))
trigger1= numtarget
trigger1= target,gethitvar(hittime)=2
trigger1= fvar(37)<=38+enemynear,vel x*helper(33333),fvar(2)*(-1*facing*enemynear,facing)
;kakutei
trigger2= ctrl || (anim=[20,21]) || (anim=[100,101]) || var(6)
trigger2= !var(29) && enemynear,stateno>=200 && enemynear,ctrl=0 && enemynear,vel x=0 && enemynear,vel y=0 && enemynear,animtime<=-13-1+2
trigger2= enemynear,movetype=I

[State -1, Throw Special]
type=changestate
value=22
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= enemynear,statetype=S || enemynear,statetype=C
triggerall= enemynear,movetype!=H
trigger1= ctrl || (stateno=[21,23])
trigger1= enemynear,ctrl=0 && (enemynear,stateno=[200,4999]) && enemynear,animtime<=-2-1-1 && helper(22222),var(58)=1
trigger1= fvar(37)<=38+const(velocity.walk.fwd.x)*(-enemynear,animtime-2-1)
[State -1, Throw Special]
type=changestate
value=1300
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= enemynear,statetype=S || enemynear,statetype=C
triggerall= enemynear,movetype!=H
triggerall= fvar(35)>=0+enemynear,vel x*2*(enemynear,statetype=A || enemynear,vel x<0)*(-1*facing*enemynear,facing) || (fvar(35)>=0 && p2statetype!=A)
triggerall= ctrl || (stateno=[21,23]) || stateno=24 || (stateno=[13000,13001]) || var(6)
triggerall= fvar(37)<=38
triggerall= helper(55555),var(59)=0 && enemy,numproj=0
trigger1= enemynear,ctrl=0 && enemynear,animtime<=-2-1 && helper(22222),var(58)=1
trigger2= enemynear,ctrl=0 && var(29) && helper(22222),var(10)=0 && enemynear,animtime=-2-1 && enemynear,movecontact=0
trigger2= enemynear,time*.5>=-enemynear,animtime

;==========<cross>==========

[State -1, EX Super Zutsuki]
type=changestate
value=1130
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
;;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
triggerall= power>=500 && var(20)<=60
;triggerall= !var(16) && (var(15)<2 || var(20))
triggerall= !(enemynear,ctrl) && (enemynear,stateno!=[120,155]) && !(enemynear,statetype=L)
triggerall= (fvar(37)=[-22,240]); && (p2dist y=[-66,0]) && p2statetype!=L
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])) && fvar(35)>120 && p2statetype!=A
trigger1= (p2stateno=helper(55555),var(10) || p2stateno=helper(55555),var(11) || p2stateno=helper(55555),var(12))
trigger1= enemynear,animtime<=-1-7-(fvar(37)-38)/12.357
trigger2= (((prevstateno=1210||prevstateno=1231||prevstateno=1110) && ctrl) || ((stateno=1210 || stateno=1231) && !animtime)) && enemynear,movetype=H && enemynear,statetype=A && enemynear,vel y
trigger2= p2bodydist y+enemynear,vel y*((fvar(37)-38)/(12.357-helper(33333),fvar(0))+7)+helper(33333),fvar(23)*((fvar(37)-38)/(12.357-helper(33333),fvar(0))+7)*((fvar(37)-38)/(12.357-helper(33333),fvar(0))+7+1)*.5<=-1
trigger2= fvar(2):=fvar(35)+4+enemynear,const(size.air.back) || 1
trigger2= p2bodydist y+enemynear,vel y*(fvar(2)/(12.357-helper(33333),fvar(0))+7)+helper(33333),fvar(23)*(fvar(2)/(12.357-helper(33333),fvar(0))+7)*(fvar(2)/(12.357-helper(33333),fvar(0))+7+1)*.5>=-64

[State -1, Super Zutsuki]
type=null;changestate
value=1100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
;;triggerall= ifelse(var(20)>0 || (stateno=[1000,4999]), 1, var(38)>16)
triggerall= !var(16) && (var(15)<2 || var(20))
triggerall= (fvar(37)=[-22,320]) && (p2dist y=[-66,0]) && p2statetype!=L
triggerall= enemy,numproj=0 && helper(55555),var(59)=0 && (!inguarddist || enemynear,hitdefattr=SCA,NA,SA)
trigger1= helper(55555),var(50)=0 && enemy,numproj=0 && helper(22222),var(2)
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]))
trigger1= !(enemynear,stateno=helper(22222),var(2)) && !(enemynear,stateno=helper(22222),var(3))
trigger1= enemynear,animtime<=-6-ceil((fvar(37)-18)/9.268)*(fvar(37)>18) && enemynear,ctrl=0 && helper(22222),var(10)
trigger1= fvar(37)>160
trigger1= var(10):=3
trigger2= var(6) && movehit && (stateno=210 || stateno=220 || stateno=240 || stateno=250 || stateno=410 || stateno=440)
trigger2= enemynear,gethitvar(hittime)>=6+ceil((fvar(37)-18)/9.268)*(fvar(37)>18) && !(enemynear,statetype=A)
trigger2= fvar(37)>=80+12*(enemynear,gethitvar(hittime)-8)-0.72*0.5*(enemynear,gethitvar(hittime)-8)*(enemynear,gethitvar(hittime)-8+1);(enemynear,gethitvar(hittime)>=12)*85.5
trigger2= var(10):=3

[State -1, atenage walk]
type=changestate
value=13000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= !var(24) || var(24)=2
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= (enemynear,stateno=[150,155]) && enemynear,gethitvar(hittime)>3
trigger1= fvar(37)-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))*(facing*enemynear,facing*-1)-2.5*(enemynear,gethitvar(hittime)-3)<=38

[State -1, atenage run]
type=changestate
value=13001
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= !var(24) || var(24)=2
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= (enemynear,stateno=[150,155]) && enemynear,gethitvar(hittime)>3
trigger1= fvar(37)-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))*(facing*enemynear,facing*-1)-4.6*(enemynear,gethitvar(hittime)-3)<=38

[State -1, Hyakuretsu Harite]
type=changestate
value=1000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
;triggerall= (fvar(37)=[-22,80]) && (p2dist y=[-54,0]);12*12-0.75*6*13;144-58.5;224-58.5
triggerall= p2statetype!=L && p2statetype!=A
triggerall= helper(55555),var(50)=0 && enemy,numproj=0 && !inguarddist
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])) && (helper(22222),var(5) || helper(55555),var(10))
trigger1= !(enemynear,stateno=helper(55555),var(11)) && !(enemynear,stateno=helper(55555),var(10))
trigger1= enemynear,ctrl=0 && helper(22222),var(10) && (enemynear,animtime=[-12-8-1,-8-1])
trigger1= (fvar(37)=[64,80+12*(-enemynear,animtime-1-8)])
trigger1= var(10):=3 || 1
trigger2= stateno=430;|| stateno=200 || stateno=230 || stateno=400 || stateno=430
trigger2= moveguarded && enemynear,gethitvar(hittime)>=8+1 && random<100+(life-enemynear,life>333 || enemynear,life<35)
trigger3= var(6) && movehit && numtarget && (stateno=210 || stateno=220 || stateno=240 || stateno=410 || (stateno=440 && animelemtime(3)>=2) || stateno=250 || stateno=241)
trigger3= enemynear,gethitvar(hittime)>=8+4
trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(12)*(facing*enemynear,facing*-1)<76+12*4-0.72*10
trigger3= var(10):=3 || 1
trigger4= (stateno=200 || stateno=230) && movehit=1 && numtarget && enemynear,gethitvar(hittime)>=8+4
trigger4= !(target,statetype=A)
trigger4= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(7+(stateno=230)*2+4+1)*(facing*enemynear,facing*-1)>=58
trigger4= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(12)*(facing*enemynear,facing*-1)<76+12*4-0.72*10
trigger4= var(10):=3 || 1
trigger5= (stateno=400 || stateno=430) && movehit=1 && numtarget && enemynear,gethitvar(hittime)>=8+1
trigger5= !(target,statetype=A)
trigger5= fvar(37)+ceil(helper(33333),fvar(0)*helper(33333),fvar(7+(stateno=400)*2)+4+1)*(facing*enemynear,facing*-1)>=64
trigger5= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(12)*(facing*enemynear,facing*-1)<76+12*4-0.72*10
trigger5= var(10):=3 || 1

[State -1, mekuri];S-Jump:26,N-Jump:35,L-Jump:38+2
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl && (stateno=[200,499])
triggerall= enemynear,statetype!=A && (enemynear,stateno=[130,155])
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger1= random<250
trigger1= fvar(2):=ceil((fvar(35)-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime)))/const(velocity.jump.fwd.x)) || 1
trigger1= fvar(2)<35;(-const(velocity.jump.y)/const(movement.yaccel))*2
trigger1= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height);head.pos.y)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*20-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))>=-30-enemynear,const(size.ground.back)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*28-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))<0
trigger1= fvar(3):=699 || 1
trigger1= var(3):=0 || 1
trigger1= fvar(1):=1 || 1
trigger2= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger2= random<250
trigger2= fvar(2):=ceil((fvar(35)-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime)))/const(velocity.jump.fwd.x)) || 1
trigger2= fvar(2)<26;(-7.066/const(movement.yaccel))*2
trigger2= -7.066*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height);head.pos.y)
trigger2= fvar(35)-const(velocity.jump.fwd.x)*11-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))>=-30-enemynear,const(size.ground.back)
trigger2= fvar(35)-const(velocity.jump.fwd.x)*19-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))<0
trigger2= fvar(3):=699 || 1
trigger2= var(3):=1 || 1
trigger2= fvar(1):=1 || 1
trigger3= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger3= random<125
trigger3= fvar(2):=ceil((fvar(35)-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime)))/const(velocity.runjump.fwd.x)) || 1
trigger3= fvar(2)<35;(-7.066/const(movement.yaccel))*2
trigger3= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height)
trigger3= fvar(35)-const(velocity.runjump.fwd.x)*20-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))>=-30-enemynear,const(size.ground.back)
trigger3= fvar(35)-const(velocity.runjump.fwd.x)*28-enemynear,vel x*helper(33333),fvar(enemynear,gethitvar(hittime))<0
trigger3= fvar(3):=699 || 1
trigger3= var(3):=3 || 1
trigger3= fvar(1):=1 || 1

[State -1, SLK]
type=changestate
value=230+(random<250)*200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (fvar(37)=[-22,48+enemynear,vel x*(enemynear,vel x<0)*3])
triggerall= !(enemynear,statetype=A) && !(enemynear,statetype=L)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0 && prevstateno!=230
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= random<100
;trigger2= (stateno=[200,499]) && !animtime && ctrl
;trigger2= movehit && (enemynear,gethitvar(hittime)>=3) && random<250

[State -1, SLP]
type=changestate
value=200
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (p2bodydist y=[-35,0]) && p2statetype!=A && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
triggerall= enemynear,statetype=S
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0 && prevstateno!=200
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= (fvar(37)=[-22,49+enemynear,vel x*(enemynear,vel x<0)*3*(facing*enemynear,facing*-1)])
trigger1= random<100
trigger2= stateno=52 && (prevstateno=[600,699]) && ctrl && (enemynear,movetype=H || (enemynear,stateno=[130,155]))
trigger2= (target,gethitvar(hittime)=[3-1,7-1]); && power>=1000 && random<250
trigger2= fvar(37)=[-22,49+enemynear,vel x*helper(33333),fvar(3)*(facing*enemynear,facing*-1)]

[State -1, CLK]
type=changestate
value=430
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= p2statetype!=A && p2statetype!=L
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0 && prevstateno!=430
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= (fvar(37)=[-22,54+enemynear,vel x*(enemynear,vel x<0)*3*(facing*enemynear,facing*-1)])
trigger1= random<100+(enemynear,statetype=S)*20 || ((prevstateno=50 || stateno=52) && helper(33333),var(50)=0)
trigger2= stateno=230 && movehit && numtarget && ctrl
trigger2= (enemynear,gethitvar(hittime)>=3-1) && (enemynear,statetype=C || enemynear,const(size.head.pos.y)>=-40)
trigger2= (fvar(37)=[-22,54+enemynear,vel x*helper(33333),fvar(3)*(facing*enemynear,facing*-1)])
trigger3= (stateno=200 || stateno=230 || stateno=400) && ctrl && random<250
trigger3= moveguarded && (enemynear,gethitvar(hittime)>=3-1)
trigger3= (fvar(37)=[-22,54+enemynear,vel x*helper(33333),fvar(3)*(facing*enemynear,facing*-1)])

[State -1, CLP]
type=changestate
value=400
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= p2statetype!=A && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0 && prevstateno!=400
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= fvar(37)=[-22,60+enemynear,vel x*(enemynear,vel x<0)*3*(facing*enemynear,facing*-1)]
trigger1= random<100
trigger2= (stateno=200 || stateno=400) && ctrl
trigger2= moveguarded && (enemynear,gethitvar(hittime)>=3-1) && random>750
trigger2= fvar(37)=[-22,60+enemynear,vel x*helper(33333),fvar(3)*(facing*enemynear,facing*-1)]
[State -1, CLP Special]
type=changestate
value=400
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= helper(55555),var(50)=0 && enemynear,numproj=0
triggerall= ctrl || stateno=1 || (stateno=[21,23]) || stateno=24 || (stateno=[100,101])
trigger1= p2statetype!=A && p2statetype!=L
trigger1= fvar(37)<=60+enemynear,vel x*(enemynear,vel x<0)*3*(facing*enemynear,facing*-1) && fvar(35)>=0
trigger1= enemynear,movetype=A && enemynear,time=2 && helper(22222),var(55)=1 && helper(22222),var(54)<=0
trigger1= random<250+(life<333)*125+(p2life-life>333)*125
trigger2= enemynear,stateno=5120 && enemynear,animtime=0
trigger2= fvar(37)=[40,60]
trigger2= random<333

[State -1, ScMK]
type=null;changestate
value=241
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= fvar(37) = [-26, ceil(const(size.xscale)*16)]
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (fvar(37)=[-22,20])
triggerall= p2statetype!=A && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= random<60

[State -1, SfMK]
type=null;changestate
value=240
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= fvar(37) > ceil(const(size.xscale)*16)
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (fvar(37)=[-22,50+enemynear,vel x*(enemynear,vel x<0)*5])
triggerall= p2statetype!=A && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= random<60

[State -1, CMK]
type=null;changestate
value=440
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (fvar(37)=[-22,49]) && (p2dist y=[-33,0]) && p2statetype!=A && p2statetype!=L
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= (ctrl || (stateno=[21,23]) || (stateno=[100,101])) && random<25
trigger2= (stateno=[200,499]) && !animtime && ctrl
trigger2= movehit && (enemynear,gethitvar(hittime)>=3) && power>=1000 && random<250

[State -1, SMP]
type=changestate
value=210
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= p2statetype!=A && p2statetype!=L
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= (fvar(37)=[-22,58+enemynear,vel x*(enemynear,vel x<0)*4*(facing*enemynear,facing*-1)])
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= random<75
trigger2= (fvar(37)=[-22,58+enemynear,vel x*helper(33333),fvar(4)*(facing*enemynear,facing*-1)])
trigger2= (stateno=200 || stateno=230) && ctrl && enemynear,gethitvar(hittime)>=4-1 && movehit
trigger3= stateno=52 && (prevstateno=[600,699]) && ctrl && enemynear,movetype=H && (enemynear,gethitvar(hittime)=[4-1,7-1])
trigger3= (fvar(37)=[-22,58+enemynear,vel x*helper(33333),fvar(4)*(facing*enemynear,facing*-1)])

[State -1, CMP]
type=changestate
value=410
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= p2statetype!=A && p2statetype!=L
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= fvar(37)=[58+enemynear,vel x*(enemynear,vel x<0)*4,64+enemynear,vel x*(enemynear,vel x<0)*4*(facing*enemynear,facing*-1)]
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= random<75 && life>750
trigger2= fvar(37)=[-22,64+enemynear,vel x*helper(33333),fvar(4)*(facing*enemynear,facing*-1)]
trigger2= (stateno=400 || stateno=430) && numtarget && ctrl && enemynear,gethitvar(hittime)>=4-1

[State -1, CHK]
type=null;changestate
value=450
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (fvar(37)=[48,52]) && (p2dist y=[-12,60]) && p2statetype!=A && p2statetype!=L
triggerall= (p2statetype=S || (p2statetype=C && p2movetype=H))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101]) || ((stateno=[760,761]) && !animtime)
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= random<60

[State -1, SHP]
type=changestate
value=220
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= !(enemynear,statetype=A) && p2statetype!=L
triggerall= enemynear,const(size.head.pos.y)<=-40
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,anim=[20,21]) || (enemynear,stateno=[100,102])
trigger1= random<50
trigger1= fvar(37)=[58+enemynear,vel x*(enemynear,vel x<0)*4,64+enemynear,vel x*(enemynear,vel x<0)*(-1*facing*enemynear,facing)*7]
trigger2= stateno=52 && (prevstateno=[600,699]) && ctrl && enemynear,movetype=H
trigger2= enemynear,gethitvar(hittime)>=7-1; && power>=1000 && random<250
trigger2= fvar(37)=[-22,64+enemynear,vel x*helper(33333),fvar(7)*(-1*facing*enemynear,facing)]

[State -1, SHP to air]
type=changestate
value=220
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (p2dist y+enemynear,vel y*5+enemynear,const(movement.yaccel)*15=[-90-fvar(39),-1]) && enemynear,vel y>0
triggerall= fvar(37)<=23+enemynear,vel x*5*(enemynear,facing*facing*-1)
triggerall= fvar(35)>=enemynear,vel x*5*(enemynear,facing*facing*-1);fvar(37)>=-3+enemynear,vel x*5*(enemynear,facing*facing*-1)
triggerall= p2statetype=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= !var(53)
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl && (prevstateno!=220)
trigger1= random<500
;trigger1= fvar(37)>helper(33333),fvar(25)
[State -1, SHK]
type=changestate
value=250
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype=A
triggerall= (p2dist y+enemynear,vel y*6+enemynear,const(movement.yaccel)*21=[-102-fvar(39),-1]); && enemynear,vel y>0
triggerall= fvar(37)<=50+enemynear,vel x*6*(enemynear,facing*facing*-1)
triggerall= fvar(37)>=23+enemynear,vel x*5*(enemynear,facing*facing*-1);SHP
triggerall= enemynear,statetype=A; (p2statetype!=C && p2statetype!=L)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= !var(53)
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl
trigger1= random<333
;trigger1= fvar(37)>fvar(32)

[State -1, Zutsuki Juggle]
type=changestate
value=1100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
trigger1= (((stateno=220 || stateno=250) && movehit) || prevstateno=220 || prevstateno=250) && numtarget(200)
trigger1= target,statetype=A && target,vel x=-helper(33333),fvar(0)
trigger1= (fvar(37)+helper(33333),fvar(0)*6-28)/(9.268-helper(33333),fvar(0))<28 && fvar(37)+helper(33333),fvar(0)*6-28>0
trigger1= fvar(2):=ceil((fvar(37)+helper(33333),fvar(0)*6-28)/(9.268-helper(33333),fvar(0))) || 1
trigger1= p2dist y+target,vel y*7+target,gethitvar(yaccel)*28<=-1
trigger1= p2dist y+target,vel y*(fvar(2)+7)+target,gethitvar(yaccel)*(fvar(2)+7)*(fvar(2)+7+1)*0.5=[-64-fvar(39),-1]
trigger1= var(10):=3 || 1
trigger2= (((stateno=220 || stateno=250) && movehit) || prevstateno=220 || prevstateno=250) && numtarget(200)
trigger2= target,statetype=A && target,vel x=-helper(33333),fvar(0)
trigger2= fvar(37)+helper(33333),fvar(0)*6=[0,28]
trigger2= p2dist y+target,vel y*6+target,gethitvar(yaccel)*21=[-64-fvar(39),-1]
trigger2= var(10):=3 || 1

[State -1, CHP]
type=null;changestate
value=420
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (fvar(37)=[64,78]) && (p2dist y=[-12,60]) && p2statetype!=A && p2statetype!=L
triggerall= (p2statetype=S || (p2statetype=C && p2movetype=H))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= (ctrl || (stateno=[21,23]) || (stateno=[100,101])) && random<25
trigger2= (stateno=[200,499]) && !animtime && ctrl
trigger2= movehit && (enemynear,gethitvar(hittime)>=4) && power>=1000 && random<250

[State -1, Harai-geri]
type=changestate
value=255
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (p2statetype!=A || (p2bodydist y+enemynear,vel y*9+enemynear,const(movement.yaccel)*45<=-1 && p2dist y+enemynear,vel y*15+enemynear,const(movement.yaccel)*120>-1)) && p2statetype!=L
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= fvar(37)=[64+enemynear,vel x*(enemynear,vel x<0)*4,93+enemynear,vel x*9*(enemynear,vel x<0 || p2statetype=A)*(facing*enemynear,facing*-1)]
trigger1= ctrl || (stateno=[21,23]) || (stateno=[100,101])
trigger1= enemynear,ctrl || (enemynear,anim=[20,21]) || (enemynear,stateno=[100,102])
trigger1= fvar(37)>80 || p2statetype!=A
trigger1= (life>500 || life-enemynear,life>300) && enemynear,power<1000
trigger1= random<25+(fvar(37)>80 && enemynear,power/enemynear,powermax<0.5 && enemynear,power<1000)*25
trigger2= (((stateno=[200,450]) && moveguarded && !animtime) || (ctrl && prevstateno=52)) && enemynear,gethitvar(hittime)>=10-1 && (enemynear,stateno=[130,153])
trigger2= fvar(37)-enemynear,vel x*helper(33333),fvar(9)*(facing*enemynear,facing*-1)<93
[State -1, Harai-geri special]
type=changestate
value=255
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,stateno=5120 && enemynear,animtime>=-9+3 && sysvar(4)=0
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= fvar(37)=[64+enemynear,vel x*(enemynear,vel x<0)*4,93+enemynear,vel x*9*(enemynear,vel x<0 || p2statetype=A)*(facing*enemynear,facing*-1)]
trigger1= ctrl || stateno=1 || (stateno=[21,23]) || stateno=24 || (stateno=[100,101])
trigger1= fvar(37)>80 || p2statetype!=A
trigger1= random<250

[State -1, Hyakuretsu Harite]
type=changestate
value=1000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
;triggerall= (fvar(37)=[-22,80]) && (p2dist y=[-54,0]);12*12-0.75*6*13;144-58.5;224-58.5
triggerall= p2statetype!=L && p2statetype!=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]))
trigger1= enemynear,ctrl || (enemynear,anim=[20,21]) || (enemynear,stateno=[100,102])
trigger1= fvar(37)=[64,76+9*2-0.54*3]
trigger1= random<75-(enemynear,power>1000)*25-(enemynear,power>2000)*25+(life-p2life>200)*25+(helper(33333),var(55)>=3)*225
trigger1= var(10):=2 || 1
trigger2= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]))
trigger2= enemynear,ctrl || (enemynear,anim=[20,21]) || (enemynear,stateno=[100,102])
trigger2= fvar(37)=[76+9*2-0.54*3,76+12*4-0.72*10]
trigger2= random<75-(enemynear,power>1000)*25-(enemynear,power>2000)*25+(life-p2life>200)*25+(helper(33333),var(55)>=3)*225
trigger2= var(10):=3 || 1
trigger3= stateno=255 && moveguarded=1
trigger3= enemynear,gethitvar(hittime)>=7
trigger3= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(enemynear,gethitvar(hittime))<=76+12*4-0.72*10
trigger3= var(10):=3 || 1
trigger4= stateno=52 && ctrl && movecontact && (prevstateno=[600,650])
trigger4= enemynear,gethitvar(hittime)>=7
trigger4= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(enemynear,gethitvar(hittime))=[64,76+12*4-0.72*10]
trigger4= var(10):=3 || 1
[State -1, Hyakuretsu Harite special]
type=changestate
value=1000
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]) || var(6)
trigger1= enemynear,stateno=[105,106]
trigger1= (fvar(36)+enemynear,vel y*9+enemynear,const(movement.yaccel)*45>-1 && enemynear,statetype=A) || (enemynear,statetype!=A && enemynear,animtime<=-8-1+1 && enemynear,animelemtime(2)>0)
trigger1= fvar(37)-enemynear,vel x*9<=76+12
trigger1= random<150-(enemynear,power>1000)*50-(enemynear,power>2000)*50+(life-p2life>200)*50+(helper(33333),var(55)>=3)*100
trigger1= var(10):=3 || 1
trigger2= ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101]) || var(6)
trigger2= enemynear,stateno=[105,106]
trigger2= (fvar(36)+enemynear,vel y*10+enemynear,const(movement.yaccel)*55>-1 && enemynear,statetype=A) || (enemynear,statetype!=A && enemynear,animtime<=-8-2+1 && enemynear,animelemtime(2)>0)
trigger2= fvar(37)-enemynear,vel x*10<=76+12*2-0.72*3
trigger2= random<150-(enemynear,power>1000)*50-(enemynear,power>2000)*50+(life-p2life>200)*50+(helper(33333),var(55)>=3)*100
trigger2= var(10):=3 || 1
trigger3= ctrl || stateno=1 || (stateno=[21,23]) || stateno=24 || stateno=52 || (stateno=[100,101]) || var(6)
trigger3= enemynear,stateno=5120 || (helper(33333),var(59)>0 && (stateno=[5110,5120]))
trigger3= (enemynear,stateno=5120 && enemynear,animtime>=-8-2+3) || ((enemynear,stateno=[5110,5120]) && helper(33333),var(59)-helper(33333),var(56)<=8+2-3)
trigger3= fvar(37)=[93,76+12*4-0.72*10]
trigger3= random<200
trigger3= var(10):=3 || 1
[State -1, EX Hyakuretsu Harite]
type=changestate
value=1030
triggerall= var(59)>=1 && numenemy && power>=500
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
;triggerall= (fvar(37)=[-22,80]) && (p2dist y=[-54,0]);12*12-0.75*6*13;144-58.5;224-58.5
triggerall= p2statetype!=L && p2statetype!=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= (ctrl || (stateno=[21,23]) || stateno=52 || (stateno=[100,101])) && power>=500
trigger1= enemynear,ctrl || (enemynear,stateno=[20,29]) || (enemynear,stateno=[100,102])
trigger1= fvar(37)=[76+12*4-0.72*10,76+12.44*3-0.9*6]
trigger1= random<25-(enemynear,power>1000)*25-(enemynear,power>2000)*25+(life-p2life>200)*25+(helper(33333),var(55)>=3)*100
[State -1, kezuri]
type=changestate
value=1030
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && power>=500
triggerall= p2statetype!=L && p2statetype!=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= var(6) && moveguarded=1 && p2life<=90
trigger1= (enemynear,stateno=[150,155]) && enemynear,gethitvar(hittime)>=7
trigger1= fvar(37)<=76+12.44*3-0.9*6
trigger1= power>=1500 || life-p2life>333 || p2life<=70 || enemy,power<1000
trigger2= stateno=210 || stateno=220 || stateno=410
trigger2= movehit=1 && numtarget && enemy,life<=180
trigger2= fvar(37)+helper(33333),fvar(0)*helper(33333),fvar(7)<=76+12.44*3-0.9*6
[State -1, Super Zutsuki]
type=changestate
value=1100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= enemynear,statetype!=A
triggerall= !inguarddist && enemynear,movetype!=A && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= ctrl || (stateno=[21,23])
trigger1= enemynear,ctrl || (enemynear,anim=[20,21])
trigger1= 6+ceil((fvar(37)-28+enemynear,vel x*6)/(9.2+enemynear,vel x))<=18
trigger1= fvar(37)>76+12*4-0.72*10
trigger1= random<50+(helper(33333),var(55)>2)*100
trigger1= var(10):=3 || 1
trigger2= stateno=210 || stateno=220 || stateno=255 || stateno=410
trigger2= moveguarded=1 && enemynear,gethitvar(hittime)>0 && random<250
trigger2= 6+ceil(fvar(37)-28+helper(33333),fvar(0)*helper(33333),fvar(enemynear,gethitvar(hittime))/9.2)<enemynear,gethitvar(hittime)
trigger2= var(10):=3 || 1

[State -1, Jump Counter];S-Jump:26,N-Jump:35,L-Jump:38+2
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl || (stateno=[21,23])
trigger1= helper(55555),var(57)=1 && enemy,numproj=0 && !(enemynear,hitdefattr=SCA,AA,AT,AP)
trigger1= fvar(37)>58
trigger1= fvar(2):=ceil((fvar(37)-58)/const(velocity.jump.fwd.x)) || 1
trigger1= fvar(2)<=35-8-1
trigger1= enemynear,statetype=S || enemynear,statetype=C
trigger1= random<750 || helper(33333),var(55)>2
trigger1= var(3):=0 || 1
trigger1= fvar(1):=1 || 1
trigger1= fvar(3):=600 || 1
trigger2= enemynear,hitdefattr=SC,AT
trigger2= var(3):=1 || 1
trigger2= fvar(1):=1 || 1
trigger2= fvar(3):=600 || 1

[State -1, Jump];S-Jump:26,N-Jump:35,L-Jump:38+2
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl || (stateno=[21,23])
triggerall= enemynear,movetype!=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= enemynear,statetype=S || enemynear,statetype=C
trigger1= fvar(37)-enemynear,vel x*(enemynear,vel x<0)*15=[40+26*const(velocity.jump.fwd.x),59+34*const(velocity.jump.fwd.x)]
trigger1= life>500 || fvar(37)-enemynear,vel x*(enemynear,vel x<0)*27>=59+26*const(velocity.jump.fwd.x)
trigger1= random<25+(life-p2life>333)*25+(fvar(37)>=59+26*const(velocity.jump.fwd.x))*25
trigger1= var(3):=0 || 1
trigger1= fvar(1):=1 || 1
trigger1= fvar(3):=600+(random>750)*99 || 1
trigger2= enemynear,statetype=S || enemynear,statetype=C
trigger2= fvar(37)-enemynear,vel x*(enemynear,vel x<0)*15=[50+18*const(velocity.jump.fwd.x),59+24*const(velocity.jump.fwd.x)]
;trigger2= life>500 || fvar(37)-enemynear,vel x*(enemynear,vel x<0)*18>=59+18*const(velocity.jump.fwd.x)
trigger2= random<25+(life-p2life>333)*25+(enemynear,vel x<=0)*25+(fvar(37)>=59+18*const(velocity.jump.fwd.x))*25
trigger2= var(3):=1 || 1
trigger2= fvar(1):=1 || 1
trigger2= fvar(3):=600+(random>750)*99 || 1

[State -1, Jump to air-throw];S-Jump:26,N-Jump:35,L-Jump:38+2
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl || (stateno=[21,23])
triggerall= enemynear,statetype=A && enemynear,ctrl && enemynear,movetype=I
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= fvar(37)>38+enemynear,vel x*3 && enemynear,vel x+const(velocity.jump.fwd.x)>0
trigger1= enemynear,time>=10 && random<100 && enemynear,vel y<=0
trigger1= fvar(2):=ceil((fvar(37)-38-enemynear,vel x*3)/(enemynear,vel x+const(velocity.jump.fwd.x))) || 1
trigger1= fvar(2)<35 && enemynear,pos y+enemynear,vel y*(3+fvar(2))+enemynear,const(movement.yaccel)*(3+fvar(2))*(3+fvar(2)+1)*0.5<=-1
trigger1= fvar(36)+enemynear,vel y*(fvar(2)+3)+enemynear,const(movement.yaccel)*(fvar(2)+3)*(fvar(2)+3+1)*0.5-const(velocity.jump.y)*fvar(2)-const(movement.yaccel)*fvar(2)*(fvar(2)+1)*0.5=[-64-fvar(39),-enemynear,const(size.head.pos.y)-18]
trigger1= fvar(3):=699 || 1
trigger1= var(3):=0 || 1
trigger1= fvar(1):=1 || 1
trigger2= fvar(37)>38+enemynear,vel x*3 && enemynear,vel x>0
trigger2= enemynear,time>=10 && random<100 && enemynear,vel y<=0
trigger2= fvar(2):=ceil((fvar(37)-38-enemynear,vel x*3)/enemynear,vel x) || 1
trigger2= fvar(2)<35 && enemynear,pos y+enemynear,vel y*(3+fvar(2))+enemynear,const(movement.yaccel)*(3+fvar(2))*(3+fvar(2)+1)*0.5<=-1
trigger2= fvar(36)+enemynear,vel y*(fvar(2)+3)+enemynear,const(movement.yaccel)*(fvar(2)+3)*(fvar(2)+3+1)*0.5-const(velocity.jump.y)*fvar(2)-const(movement.yaccel)*fvar(2)*(fvar(2)+1)*0.5=[-64-fvar(39),-enemynear,const(size.head.pos.y)-18]
trigger2= fvar(3):=699 || 1
trigger2= var(3):=0 || 1
trigger2= fvar(1):=0 || 1
trigger3= fvar(37)>38+enemynear,vel x*3 && enemynear,vel x+const(velocity.jump.fwd.x)>0
trigger3= enemynear,time>=10 && random<100 && enemynear,vel y<=0
trigger3= fvar(2):=ceil((fvar(37)-38-enemynear,vel x*3)/(enemynear,vel x+const(velocity.jump.fwd.x))) || 1
trigger3= fvar(2)<26 && enemynear,pos y+enemynear,vel y*(3+fvar(2))+enemynear,const(movement.yaccel)*(3+fvar(2))*(3+fvar(2)+1)*0.5<=-1
trigger3= fvar(36)+enemynear,vel y*(fvar(2)+3)+enemynear,const(movement.yaccel)*(fvar(2)+3)*(fvar(2)+3+1)*0.5-(-7.066)*fvar(2)-const(movement.yaccel)*fvar(2)*(fvar(2)+1)*0.5=[-64-fvar(39),-enemynear,const(size.head.pos.y)-18]
trigger3= fvar(3):=699 || 1
trigger3= var(3):=1 || 1
trigger3= fvar(1):=1 || 1
trigger4= fvar(37)>38+enemynear,vel x*3 && enemynear,vel x>0
trigger4= enemynear,time>=10 && random<100 && enemynear,vel y<=0
trigger4= fvar(2):=ceil((fvar(37)-38-enemynear,vel x*3)/enemynear,vel x) || 1
trigger4= fvar(2)<26 && enemynear,pos y+enemynear,vel y*(3+fvar(2))+enemynear,const(movement.yaccel)*(3+fvar(2))*(3+fvar(2)+1)*0.5<=-1
trigger4= fvar(36)+enemynear,vel y*(fvar(2)+3)+enemynear,const(movement.yaccel)*(fvar(2)+3)*(fvar(2)+3+1)*0.5-(-7.066)*fvar(2)-const(movement.yaccel)*fvar(2)*(fvar(2)+1)*0.5=[-64-fvar(39),-enemynear,const(size.head.pos.y)-18]
trigger4= fvar(3):=699 || 1
trigger4= var(3):=1 || 1
trigger4= fvar(1):=0 || 1

[State -1, mekuri];S-Jump:26,N-Jump:35,L-Jump:38+2
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl || (stateno=[21,23])
triggerall= enemynear,ctrl || (enemynear,anim=[20,21]) || (enemynear,movetype=I && enemynear,statetype=C)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger1= (enemynear,anim=[20,21]) || enemynear,statetype=C
trigger1= random<50
trigger1= fvar(2):=ceil((fvar(35)-enemynear,vel x*3)/(const(velocity.jump.fwd.x)+enemynear,vel x)) || 1
trigger1= fvar(2)<35;(-const(velocity.jump.y)/const(movement.yaccel))*2
trigger1= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height);head.pos.y)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*20-enemynear,vel x*(20+3)>=-30-enemynear,const(size.ground.back)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*28-enemynear,vel x*(28+3)<0
trigger1= fvar(3):=699 || 1
trigger1= var(3):=0 || 1
trigger1= fvar(1):=1 || 1
trigger2= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger2= (enemynear,anim=[20,21]) || enemynear,statetype=C || (enemynear,stateno=5120 && animtime>=-19+5)
trigger2= random<50
trigger2= fvar(2):=ceil((fvar(35)-enemynear,vel x*3)/(const(velocity.jump.fwd.x)+enemynear,vel x)) || 1
trigger2= fvar(2)<26;(-7.066/const(movement.yaccel))*2
trigger2= -7.066*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height);head.pos.y)
trigger2= fvar(35)-const(velocity.jump.fwd.x)*11-enemynear,vel x*(11+3)>=-30-enemynear,const(size.ground.back)
trigger2= fvar(35)-const(velocity.jump.fwd.x)*19-enemynear,vel x*(19+3)<0
trigger2= fvar(3):=699 || 1
trigger2= var(3):=1 || 1
trigger2= fvar(1):=1 || 1
trigger3= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger3= (enemynear,anim=[20,21]) || enemynear,statetype=C
trigger3= random<25
trigger3= fvar(2):=ceil((fvar(35)-enemynear,vel x*3)/(const(velocity.runjump.fwd.x)+enemynear,vel x)) || 1
trigger3= fvar(2)<35;(-7.066/const(movement.yaccel))*2
trigger3= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height)
trigger3= fvar(35)-const(velocity.runjump.fwd.x)*20-enemynear,vel x*(20+3)>=-30-enemynear,const(size.ground.back)
trigger3= fvar(35)-const(velocity.runjump.fwd.x)*28-enemynear,vel x*(28+3)<0
trigger3= fvar(3):=699 || 1
trigger3= var(3):=3 || 1
trigger3= fvar(1):=1 || 1

[State -1, okizeme];S-Jump:26,N-Jump:35,L-Jump:38+2
type=changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl || (stateno=[21,23]) || stateno=24 || stateno=101 || stateno=1
triggerall= enemynear,stateno=[5100,5120]
;triggerall= (helper(33333),var(59)>=10 || enemynear,stateno=5120)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= fvar(3)=640
trigger1= (abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44)
trigger1= (helper(33333),var(59)-helper(33333),var(56)=[20+3-3-1,28+3-3-1]) || (enemynear,stateno=5120 && (-enemynear,animtime=[20+3-3-1,28+3-3-1]));ifelse(enemynear,stateno<5120,helper(33333),var(59)-helper(33333),var(56),-enemynear,animtime)=[20+3-3-1,28+3-3-1]
trigger1= fvar(2):=ceil(fvar(35)/const(velocity.jump.fwd.x)) || 1
trigger1= fvar(2)<35;(-const(velocity.jump.y)/const(movement.yaccel))*2
trigger1= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height) || fvar(2)+1<ifelse(enemynear,stateno<5120,helper(33333),var(59)-enemynear,time,-animtime)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*20>=-30-enemynear,const(size.ground.back)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*28<0
trigger1= fvar(3):=640 || 1
trigger1= var(3):=0 || 1
trigger1= fvar(1):=1 || 1
;trigger2=0
trigger2= fvar(3)=640
trigger2= (abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44)
trigger2= (helper(33333),var(59)-helper(33333),var(56)=[11+3-3-1,19+3-3-1]) || (enemynear,stateno=5120 && (-enemynear,animtime=[11+3-3-1,19+3-3-1]));ifelse(enemynear,stateno<5120,helper(33333),var(59)-helper(33333),var(56),-enemynear,animtime)=[11+3-3-1,19+3-3-1]
trigger2= fvar(2):=ceil(fvar(35)/const(velocity.jump.fwd.x)) || 1
trigger2= fvar(2)<26;(-7.066/const(movement.yaccel))*2
trigger2= -7.066*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height); || fvar(2)+1<ifelse(enemynear,stateno=5110,helper(33333),var(59)-enemynear,time,-animtime)
trigger2= fvar(35)-const(velocity.jump.fwd.x)*11>=-30-enemynear,const(size.ground.back)
trigger2= fvar(35)-const(velocity.jump.fwd.x)*19<0
trigger2= fvar(3):=640 || 1
trigger2= var(3):=1 || 1
trigger2= fvar(1):=1 || 1
trigger3= fvar(3)=600
trigger3= ifelse(enemynear,stateno<5120,helper(33333),var(59)-helper(33333),var(56),-enemynear,animtime)=[11+3-3-1,19+3-3-1]
trigger3= fvar(37)<=59+24*const(velocity.jump.fwd.x);[40+15*const(velocity.jump.fwd.x),59+25*const(velocity.jump.fwd.x)]
trigger3= var(3):=1 || 1
trigger3= fvar(1):=1 || 1
trigger3= fvar(3):=600
;fake
trigger4=0
trigger4= fvar(3)=640
trigger4= (abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44)
trigger4= ifelse(enemynear,stateno<5120,helper(33333),var(59)-helper(33333),var(56),-enemynear,animtime)>=(3+35+1)*2+1
trigger4= fvar(2):=ceil(fvar(35)/const(velocity.jump.fwd.x)) || 1
trigger4= fvar(2)<35;(-const(velocity.jump.y)/const(movement.yaccel))*2
trigger4= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height) || fvar(2)+1<ifelse(enemynear,stateno<5120,helper(33333),var(59)-enemynear,time,-animtime)
trigger4= fvar(35)-const(velocity.jump.fwd.x)*20>=-30-enemynear,const(size.ground.back)
trigger4= fvar(35)-const(velocity.jump.fwd.x)*28<0
trigger4= random<500
trigger4= fvar(3):=640 || 1
trigger4= var(3):=0 || 1
trigger4= fvar(1):=1 || 1

[State -1, okizeme];S-Jump:26,N-Jump:35,L-Jump:38+2
type=null;changestate
value=41
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl || stateno=1 || (stateno=[21,23]) || stateno=24 || stateno=101
triggerall= enemynear,stateno=[5100,5120]
;triggerall= helper(33333),var(59)>0 || enemynear,stateno=5120
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
trigger1= fvar(3)=640
trigger1= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44
trigger1= fvar(2):=ceil(fvar(35)/const(velocity.jump.fwd.x)) || 1
trigger1= (helper(33333),var(59)-helper(33333),var(56)=[3,19]) || (enemynear,stateno=5120 && (-enemynear,animtime=[3,19]))
trigger1= fvar(2)<35;(-const(velocity.jump.y)/const(movement.yaccel))*2
trigger1= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*0.5*fvar(2)*(fvar(2)+1)<-enemynear,const(size.height) || fvar(2)+1<ifelse(enemynear,stateno<5120,helper(33333),var(59)-enemynear,time,-animtime)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*20>=-30-enemynear,const(size.ground.back)
trigger1= fvar(35)-const(velocity.jump.fwd.x)*28<0
trigger1= random<60
trigger1= fvar(3):=640 || 1
trigger1= var(3):=0 || 1
trigger1= fvar(1):=1 || 1

;==========<air>==========

[State -1, ALK]
type=changestate
value=630
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= p2statetype!=A && p2statetype!=L
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= fvar(35)<0
trigger1= fvar(35)>=-15-enemynear,const(size.ground.back)+vel x*3+enemynear,vel x*3*(facing*enemynear,facing*-1)
trigger1= pos y+vel y*10+const(movement.yaccel)*55>-1
trigger1= pos y+vel y*4+const(movement.yaccel)*10<=-1
trigger1= ctrl
trigger1= vel y>0 && random<500
trigger2= ctrl && (fvar(2)=699 || fvar(2)=640)
trigger2= p2movetype=I && fvar(35)>0
trigger2= fvar(35)>0 && fvar(37)<=4+vel x*3+enemynear,vel x*3*(enemynear,vel x<0)
trigger2= pos y+vel y*11+const(movement.yaccel)*66>-1
trigger2= pos y+vel y*4+const(movement.yaccel)*10<=-1

[State -1, ALP]
type=changestate
value=600
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= p2statetype!=A && p2statetype!=L
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= fvar(37)<=45+vel x*4+enemynear,vel x*4*(enemynear,vel x<0);fvar(37)=[4+vel x*4-enemynear,vel x*4,45+vel x*4]
trigger1= fvar(35)>=0
trigger1= pos y+vel y*7+const(movement.yaccel)*28>-1
trigger1= pos y+vel y*5+const(movement.yaccel)*15<=-1
trigger1= p2movetype=I
trigger1= ctrl
trigger1= vel y>0
trigger1= random<250 || fvar(600)
;trigger2= ctrl && enemynear,ctrl=0 && enemynear,animtime=-4-1 && var(29)

[State -1, AHP]
type=changestate
value=621
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && !vel x
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (fvar(37)=[-22,40+5])
triggerall= p2statetype!=A && p2statetype!=L
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= pos y+vel y*7+const(movement.yaccel)*28>-1
trigger1= pos y+vel y*5+const(movement.yaccel)*15<=-1
trigger1= ctrl && fvar(3)=600
trigger1= vel y>0
;trigger2= var(4) && random<50
[State -1, AHP jump counter];5,41
type=changestate
value=620
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && vel x
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (enemynear,numproj=0 || !inguarddist) && var(29) && !(enemynear,hitdefattr=SCA,AA,AP)
trigger1= enemynear,statetype=S || enemynear,statetype=C
trigger1= fvar(35)>=vel x*5
trigger1= fvar(37)<=40+vel x*5+enemynear,vel x*5*(enemynear,vel x<0)
trigger1= pos y+vel y*6+const(movement.yaccel)*21<=-1
trigger1= pos y+vel y*13+const(movement.yaccel)*91>-1
trigger1= random<250 || pos y+vel y*7+const(movement.yaccel)*28>-1 || enemynear,animtime<=-7-1
trigger1= ctrl && fvar(3)=600
trigger1= vel y>0
[State -1, AHP];5,41
type=changestate
value=620
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && vel x
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= enemynear,statetype=S && enemynear,movetype=I
trigger1= (fvar(37)=[-22,40+vel x*5+enemynear,vel x*5*(enemynear,vel x<0)])
trigger1= pos y+vel y*6+const(movement.yaccel)*21<=-1
trigger1= pos y+vel y*7+const(movement.yaccel)*28>-1
trigger1= ctrl && fvar(3)=600
trigger1= vel y>0
[State -1, AHP];5,41
type=changestate
value=620
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A && vel x
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= enemynear,statetype=S && enemynear,movetype=I
trigger1= fvar(35)>=vel x*5
trigger1= fvar(37)<=40+vel x*5+enemynear,vel x*5*(enemynear,vel x<0)
trigger1= pos y+vel y*6+const(movement.yaccel)*21<=-1
trigger1= pos y+vel y*13+const(movement.yaccel)*91>-1
trigger1= ctrl && fvar(3)=600
trigger1= vel y>0
trigger1= random<100+(enemynear,vel x>0)*150+(var(3)=1)*100

[State -1, AMP]
type=changestate
value=610
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= (fvar(37)=[-22,58+vel x*7+enemynear,vel x*7])
trigger1= p2dist y-vel y*7-const(movement.yaccel)*28+enemynear,vel y*7+enemynear,const(movement.yaccel)*28=[-98-fvar(39),-enemynear,const(size.head.pos.y)-74]
trigger1= ctrl && p2statetype=A && p2movetype=I
trigger1= (enemynear,vel y || enemynear,vel x=enemynear,const(velocity.jump.fwd.x) || enemynear,vel x=enemynear,const(velocity.runjump.fwd.x) || enemynear,vel x=enemynear,const(velocity.jump.back.x))
trigger1= random<100+(helper(22222),var(56)=1)*400

[State -1, AHK jump counter];8,59
type=changestate
value=650
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= (enemynear,numproj=0 || !inguarddist) && var(29) && !(enemynear,hitdefattr=SCA,AA,AP)
trigger1= fvar(35)>=vel x*8
trigger1= fvar(37)<=59+vel x*8+enemynear,vel x*8*(enemynear,vel x<0);[40+vel x*5+enemynear,vel x*5*(enemynear,vel x<0),59+vel x*8+enemynear,vel x*8*(enemynear,vel x<0)]
trigger1= pos y+vel y*16+const(movement.yaccel)*55>-1
trigger1= pos y+vel y*9+const(movement.yaccel)*45<=-1
trigger1= ctrl && fvar(3)=600 && p2statetype!=A && p2statetype!=L
trigger1= random<125 || pos y+vel y*10+const(movement.yaccel)*55>-1 || enemynear,animtime<=-8-1
trigger1= vel y>0
[State -1, AHK];8,59
type=changestate
value=650
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= fvar(35)>=vel x*8
trigger1= fvar(37)<=59+vel x*8+enemynear,vel x*8*(enemynear,vel x<0);[40+vel x*5+enemynear,vel x*5*(enemynear,vel x<0),59+vel x*8+enemynear,vel x*8*(enemynear,vel x<0)]
trigger1= pos y+vel y*10+const(movement.yaccel)*55>-1
trigger1= pos y+vel y*9+const(movement.yaccel)*45<=-1
trigger1= ctrl && fvar(3)=600 && p2statetype!=A && p2statetype!=L && p2movetype=I
trigger1= vel y>0
[State -1, AHK];8,59
type=changestate
value=650
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
trigger1= fvar(37)=[40+vel x*5+enemynear,vel x*5*(enemynear,vel x<0),59+vel x*8+enemynear,vel x*8*(enemynear,vel x<0)]
trigger1= pos y+vel y*16+const(movement.yaccel)*66>-1
trigger1= pos y+vel y*9+const(movement.yaccel)*45<=-1
trigger1= ctrl && fvar(3)=600 && p2statetype!=A && p2statetype!=L && p2movetype=I
trigger1= random<75+(enemynear,vel x>0)*175+(var(3)=1)*150

[State -1, AMK]
type=changestate
value=640
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
triggerall= !var(16) && (var(15)<1 || var(20))
triggerall= fvar(35)<vel x*3+enemynear,vel x*3+(facing*enemynear,facing*-1)
triggerall= fvar(35)>=-30-enemynear,const(size.ground.back)+vel x*7+enemynear,vel x*(facing*enemynear,facing*-1)*7
triggerall= pos y+vel y*15+const(movement.yaccel)*120>-1 || (p2statetype=A && enemynear,pos y*8+enemynear,const(movement.yaccel)*36<=-1)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0
triggerall= ctrl
triggerall= enemynear,movetype=I || (enemynear,movetype=A && enemynear,time=2 && enemynear,movecontact=0 && facing!=enemynear,facing && fvar(35)<-22)
trigger1= (pos y+vel y*8+const(movement.yaccel)*36=[enemynear,const(size.head.pos.y)+32,-1]) && p2statetype=S
trigger2= (pos y+vel y*8+const(movement.yaccel)*36=[enemynear,const(size.mid.pos.y)+32,-1]) && p2statetype=C
trigger3= (p2dist y-vel y*8-const(movement.yaccel)*36+enemynear,vel y*8+enemynear,const(movement.yaccel)*36=[enemynear,const(size.mid.pos.y)+32,-1]) && p2statetype=A

;==========<others>==========

[State -1, standing]
type=null;changestate
value=1
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= fvar(35)>=0
triggerall= enemynear,statetype=L || (enemynear,stateno=[5100,5120])
triggerall= fvar(3)=640
triggerall= stateno=24
trigger1= fvar(35)=[const(velocity.jump.fwd.x)*20-30-enemynear,const(size.ground.back),const(velocity.jump.fwd.x)*28]
trigger2= fvar(37)<=11 && var(1)=1
ctrl=0

[State -1, Okizeme walk back]
type=changestate
value=24
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= fvar(35)>=0
triggerall= enemynear,statetype=L || (enemynear,stateno=[5100,5120]) || enemynear,hitfall
;triggerall= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger1= fvar(3)=640
trigger1= ctrl || (stateno=[21,23]) || stateno=1
trigger1= fvar(35)-const(velocity.jump.fwd.x)*20<-30-enemynear,const(size.ground.back) || fvar(37)<=0
trigger1= var(1):=-1 || 1
trigger2= fvar(3)=600 && sysvar(4)
trigger2= ctrl || (stateno=[21,23]) || stateno=1
trigger2= fvar(37)<40+19*const(velocity.jump.fwd.x)
trigger2= var(1):=-1 || 1

[State -1, Okizeme walk fwd]
type=changestate
value=24
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= fvar(35)>=0
triggerall= enemynear,statetype=L || (enemynear,stateno=[5100,5120]) || enemynear,hitfall
;triggerall= (abs(helper(22222),pos x-enemynear,pos x)>44 && facing=1) || (abs(helper(33333),pos x-enemynear,pos x)>44 && facing=-1)
trigger1= fvar(3)=640 && sysvar(4)
trigger1= ctrl || (stateno=[21,23])
trigger1= fvar(2):=ceil(fvar(35)/const(velocity.jump.fwd.x)) || 1
trigger1= const(velocity.jump.y)*fvar(2)+const(movement.yaccel)*fvar(2)*(fvar(2)+1)*0.5>-enemynear,const(size.height) || fvar(2)>=28
trigger1= var(1):=1 || 1
trigger2= fvar(3)=600 && sysvar(4)
trigger2= ctrl || (stateno=[21,23])
trigger2= fvar(37)>59+24*const(velocity.jump.fwd.x)
trigger2= var(1):=1 || 1
trigger3= stateno=22 && sysvar(4)
;trigger3= fvar(37)<=const(velocity.jump.fwd.x)*28;44

[State -1, okizeme walk]
type=changestate
value=22
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= sysvar(4)
triggerall= stateno!=22
trigger1= ctrl || (stateno=[21,23])
trigger1= fvar(35)<=const(velocity.jump.fwd.x)*28

[State -1, okizeme run]
type=changestate
value=100
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ctrl || stateno=21
triggerall= fvar(37)>=0
triggerall= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)>44
triggerall= ceil((fvar(37)-const(velocity.jump.fwd.x)*28)/const(velocity.run.fwd.x))<(helper(33333),var(59)-(1+1+1+3+28))
triggerall= fvar(35)>const(velocity.jump.fwd.x)*28
trigger1= sysvar(4)
trigger1= numtarget
trigger1= target,hitfall
trigger2= stateno=255 || stateno=828 || stateno=1110||stateno=1131 || stateno=1210||stateno=1231 || stateno=1312||stateno=1342
trigger2= numtarget
trigger2= sysvar(4)
trigger3= (sysvar(4) && fvar(2)=640) || numtarget(750)
trigger3= (enemynear,stateno=[5110,5111])

[State -1, walk]
type=changestate
value=21
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= (enemynear,movetype=I || fvar(35)>enemynear,const(size.attack.dist)) && helper(55555),var(59)=0 && enemy,numproj<2
triggerall= !sysvar(4)
;far
trigger1= ctrl
trigger1= fvar(37)>48 && random<333
trigger1= var(1):=1 || 1
;cross
trigger2= ctrl
trigger2= fvar(37)<=11 && random<333
trigger2= var(1):=1 || 1
;uzouzo
trigger3= helper(22222),var(5)=0
trigger3= stateno=21 && var(1)=1
trigger3= random%12=1 && time>15
trigger3= fvar(37)=[100,160]
trigger3= var(1):=-1 || 1
trigger4= stateno=21 && var(1)=-1
trigger4= random%6=1 && time>15
trigger4= fvar(37)>=100
trigger4= var(1):=1 || 1
;hide attack
trigger5= ctrl
trigger5= fvar(35)>0 && facing=enemynear,facing && enemynear,statetype=A
trigger5= random<333
trigger5= var(1):=1 || 1
;landing
trigger6= ctrl
trigger6= fvar(35)>0 && facing=enemynear,facing && enemynear,gethitvar(hittime)>0
trigger6= var(1):=1 || 1
trigger7= stateno=22
trigger7= !sysvar(4) && (enemynear,stateno=[5110,5111]) && enemynear,time>2
trigger7= var(1):=-1 || 1

[State -1, walk_fwd]
type=changestate
value=22
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= helper(22222),var(9)=[1,2]
triggerall= enemynear,statetype=A && var(29)
triggerall= !sysvar(4)
trigger1= ctrl || anim=21
trigger1= fvar(35)>=60
[State -1, walk]
type=changestate
value=21
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= enemynear,statetype=L
triggerall= (helper(22222),rootdist x>44 && facing=1) || (helper(33333),rootdist x>44 && facing=-1)
triggerall= !sysvar(4)
trigger1= ctrl
trigger1= power>=2500
trigger1= fvar(35)<=120

[State -1, Roll forward]
type=changestate
value=710
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
trigger1= (ctrl || (stateno=[21,23]) || (stateno=[100,101]))
trigger1= p2statetype=A && enemynear,ctrl && (p2stateno!=[110,119]) && (p2stateno=[40,52])
trigger1= p2dist y+enemynear,vel y*25+enemynear,const(movement.yaccel)*325<=-1
trigger1= fvar(35)<85+enemynear,vel x*25-22-enemynear,const(size.air.back)-22 && fvar(35)>0 && facing!=enemynear,facing
trigger1= random<250; || fvar(35)<85+enemynear,vel x*25-22-enemynear,const(size.air.back)

[State -1, Roll backward]
type=changestate
value=715
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= ((helper(22222),rootdist x>90 && facing=-1) || (helper(33333),rootdist x>90 && facing=1))
triggerall= (backedgebodydist>90 || enemynear,backedgebodydist>90)
trigger1= prevstateno!=715
trigger1= (ctrl || (stateno=[21,23]) || (stateno=[100,101])); && var(20)<=164
trigger1= fvar(37)>=50+enemynear,vel x*26; && fvar(37)+90>helper(33333),fvar(21) && fvar(37)+90>helper(33333),fvar(23)
trigger1= enemynear,ctrl && !(enemynear,statetype=A) && enemynear,vel x<5.2
trigger1= random<25
trigger1= fvar(37)+90-enemynear,vel x*26>fvar(30) && fvar(37)+90-enemynear,vel x*26>fvar(31)

[State -1, back step]
type=changestate
value=105
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
triggerall= !inguarddist && helper(55555),var(50)=0 && enemynear,numproj=0
triggerall= ((helper(22222),rootdist x>90 && facing=-1) || (helper(33333),rootdist x>90 && facing=1))
triggerall= !sysvar(4)
triggerall= ctrl || (stateno=[21,23]) || (stateno=[100,101])
triggerall= fvar(37)<enemynear,const(size.attack.dist)+22-60 && (power<2500 || !sysvar(4))
trigger1= ((enemynear,stateno=[5110,5111]) && enemynear,time>2) || (enemynear,stateno=5120 && enemynear,animtime<=-15)
trigger2= enemynear,statetype=L
trigger2= abs(helper(ifelse(facing=1,22222,33333)),pos x-enemynear,pos x)<=44

[State -1, Power Charge]
type=changestate
value=730
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && power<powermax
triggerall= power<const(data.power) && !var(20)
triggerall= !inguarddist && helper(55555),var(50)=0 && enemy,numproj=0 && enemynear,statetype!=A
triggerall= ctrl || (stateno=[21,23])
trigger1= !(enemynear,movetype=A) && fvar(37)>160 && (random<50 || p2statetype=L)
trigger2= enemynear,movetype=I && enemynear,stateno>=200 && enemynear,ctrl=0 && !var(29) && enemynear,vel x=0
trigger2= fvar(35)>=120 && helper(22222),var(5)=1

[State -1, Taunt]
type=changestate
value=195
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && life>=.5*lifemax
triggerall= (enemynear,life)<=.5*(enemynear,lifemax)
trigger1= ctrl || (stateno=[21,23])
trigger1= fvar(35)>=160 && !(enemynear,ctrl)
trigger1= (enemynear,movetype=H) && (enemynear,hitfall) && random<50+(power>=3000)*450

[State -1, Fall Recovery]
type=selfstate
value= ifelse((pos y>=-20), 5200, 5210)
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && alive
trigger1= stateno=5050 && canrecover
trigger1= vel y>=-1
trigger1= random<50 || fvar(37)>=enemynear,const(size.attack.dist)
