[StateDef 192]
type = A
movetype= A
physics = N
juggle  = 1
velset = 14,0
ctrl = 0
anim = 191

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S300,3
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S300,3


[State 192, end]
type = destroyself
trigger1 = time=35
;-----------------------------
[StateDef 194]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 4002
sprpriority=6
[State 0, Explod]
type = Explod
trigger1 = time=0
anim = 4004
ID =194
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = -2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =time>145
id = 194
;ignorehitpause =
;persistent =

[State 0, BindToParent]
type = BindToParent
trigger1 =time<20
time = 1
facing = 0
pos = 0,0
[State 0, SprPriority]
type = SprPriority
trigger1 = time>100
value = -1

[State 0, VelSet]
type = VelSet
trigger1 =time=100
x = 10
[State 0, VelMul]
type = VelMul
trigger1 =time>100
x = 1.08

[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name = "Blue Falcon2"
ID =196
stateno =196
pos = -39,-88
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=110
value = S0,4


[State 0, DestroySelf]
type = DestroySelf
trigger1 = time>150


;-----------------------------
[StateDef 196]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 4003
sprpriority=9
[State 0, DestroySelf]
type = DestroySelf
trigger1 = time>200 || !root,numhelper(194)
[State 0, BindToParent]
type = BindToParent
trigger1 =1
time = 1
facing = 0
pos = -40,-89
[State 0, SprPriority]
type = SprPriority
trigger1 = time>100
value = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=20
value = S0,5
volume=100


[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>20
value =  ((time-20)*3)
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time=[45,60]
value =  90
;scale =  (winmugen only)
;ignorehitpause =
;persistent =
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>60
value =  90-((time-56)*3)
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>85
value =  0
[State 0, Trans]
type = Trans
trigger1 =1
trans =add

;--------------------------------------------------------------------------
[StateDef 10011]
type = A
movetype=I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1003
poweradd =0
sprpriority=9

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(1)>=0&&root,animelemtime(2)<0
facing = 1
pos =38,-80
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(2)>=0&&root,animelemtime(3)<0
facing = 1
pos = 28,-94
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(3)>=0&&root,animelemtime(4)<0
facing = 1
pos =-16,-89
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(4)>=0&&root,animelemtime(5)<0
facing = 1
pos = -42,-76
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(5)>=0&&root,animelemtime(6)<0
facing = 1
pos =-43,-60
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(6)>=0&&root,animelemtime(7)<0
facing = 1
pos =-44,-62
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(7)>=0&&root,animelemtime(8)<0
facing = 1
pos = 28,-75
[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime=0|| root,stateno!=1000
;--------------------------------------------------------------------------
[StateDef 10010]
type = A
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = ifelse(parent,stateno=1050,1002,1001)
poweradd =0
sprpriority=9
[State 0, Pause]
type = Pause
triggerall = (parent,stateno=[1000,1005])
trigger1 =p2stateno=1025&&enemy,time=1
time = 9
[State 0, VarSet]
type = Varadd
trigger1 =time>7 && (parent,stateno=[1000,1005])
trigger2=parent,anim!=1010 && parent,stateno=1050
trigger3= root,animelemtime(7)>=0 && root,anim=1010
v = 1   ;fv = 10
value = cond(root,anim=1010,2,1)
ignorehitpause=0
[State 0, BindToParent]
type = BindToParent
triggerall = parent,stateno=1050
trigger1 = parent,anim=1010
time = 1
facing = 1
pos = 62,-26

[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1000|| parent,anim=1004
trigger1 =1
time = 1
facing = 1
pos =58,-57
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noshadow


[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>7 && (parent,stateno=[1000,1005])
trigger2=parent,anim!=1010 && parent,stateno=1050
trigger3= root,animelemtime(7)>=0 && root,anim=1010
;value =  (winmugen only)
scale =  1,1-(var(1)*.14)
ignorehitpause=0
[State 0, Trans]
type = Trans
trigger1 =1
trans =add
;ignorehitpause =
;persistent =

[State 192, end]
type = destroyself
trigger1 = var(1)=10 || parent,movetype=H ||parent,stateno!=[1000,1050]
;--------------------------------------------------------------------------
[StateDef 1002]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1002
poweradd =0
sprpriority=9

[State 0, VarSet]
type = Varadd
trigger1 =parent,pos y >-20
v = 1   ;fv = 10
value = 1
ignorehitpause=0
[State 0, BindToParent]
type = BindToParent
trigger1 =parent,anim=1050
time = 1
facing = 1
pos = 42,-42
[State 0, AngleDraw]
type = AngleDraw
trigger1 =1
value =  -45

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noshadow


[State 0, AngleDraw]
type = AngleDraw
trigger1 =parent,pos y >-20
;value =  (winmugen only)
scale =  1,1-(var(1)*.14)
ignorehitpause=0
[State 0, Trans]
type = Trans
trigger1 =1
trans =add
;ignorehitpause =
;persistent =

[State 192, end]
type = destroyself
trigger1 = var(1)=10 || parent,movetype=H || parent,stateno!=1050
;--------------------------------------------------------------------------
[StateDef 1003]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1001
poweradd =0
sprpriority=9

[State 0, VarSet]
type = Varadd
trigger1 =time>5
v = 1   ;fv = 10
value = 1
ignorehitpause=0
[State 0, BindToParent]
type = BindToParent
trigger1 =parent,anim=[1030,1031]
time = 1
facing = 1
pos = 40,-71
[State 0, AngleDraw]
type = AngleDraw
trigger1 =1
value =  -45

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noshadow


[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>5
;value =  (winmugen only)
scale =  1,1-(var(1)*.14)
ignorehitpause=0
[State 0, Trans]
type = Trans
trigger1 =1
trans =add
;ignorehitpause =
;persistent =

[State 192, end]
type = destroyself
trigger1 = var(1)=10 || parent,movetype=H ||( parent,stateno!=1000&&parent,stateno!=1005)
;--------------------------------------------------------------------------
;push
[StateDef 1011]
type = A
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =root,anim
poweradd =0
sprpriority=-5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag= invisible
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = anim
elem = root,animelemno(0)
ignorehitpause = 1
;persistent = 

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 =1 
time = 1
facing = 1
pos = 0,30
;ignorehitpause = 
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,stateno!=1010 || root,animelemtime(8)>=0
;ignorehitpause = 
;persistent = 

;--------------------------------------------------------------------------
;Ice helper
[StateDef 1056]
type = A
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =root,anim
poweradd =0
sprpriority=-5

;[State 0, ChangeAnim]
;type = ChangeAnim
;trigger1 = 1
;value = root,anim
;elem = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S3,2
channel = 5

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time>0
scale=1+(time*.02),1+(time*.04)

[State 0, Trans]
type = Trans
trigger1 =  time<7
trans = add ;none, add, addalpha, add1, sub

[State 0, Trans]
type = Trans
trigger1 = time=7
trans = addalpha;, sub
alpha = 175,250
[State 0, Trans]
type = Trans
trigger1 = time=8
trans = addalpha;, sub
alpha = 150,250
[State 0, Trans]
type = Trans
trigger1 = time=9
trans = addalpha;, sub
alpha = 125,250
[State 0, Trans]
type = Trans
trigger1 = time=10
trans = addalpha;, sub
alpha = 100,250
[State 0, Trans]
type = Trans
trigger1 = time=11
trans = addalpha;, sub
alpha = 75,250
[State 0, Trans]
type = Trans
trigger1 = time=12
trans = addalpha;, sub
alpha = 50,250
[State 0, Trans]
type = Trans
trigger1 = time=13
trans = addalpha;, sub
alpha = 25,250
[State 0, Trans]
type = Trans
trigger1 = time=14
trans = addalpha;, sub
alpha = 10,250


[State 192, end]
type = destroyself
trigger1 = time>=15
;-----------------------------
[StateDef 3100]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 8103
sprpriority=-1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = nobardisplay
flag2 = noBG
flag3 = noFG
[State 0, Trans]
type = Trans
trigger1 =1
trans =add
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
;value =  (winmugen only)
scale = .8+(time*.04),.8+(time*.04)
;ignorehitpause =
;persistent =

 [State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 1002, 1]
type = AfterImage
trigger1 = 1
time = 5
framegap = 1
length = 2
PalAdd = 0, 0, 0
PalMul = 1, 1, 1
PalContrast = 255-((Time)*6), 255-((Time)*6), 255-((Time)*6)
trans = Add

[State 0, DestroySelf]
type = DestroySelf
trigger1 =time=45


;-----------------------------
[StateDef 4000]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 4002
sprpriority=6
[State 0, Explod]
type = Explod
trigger1 = time=0
anim = 4004
ID =194
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = -2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

;[State 0, RemoveExplod]
;type = RemoveExplod
;trigger1 =time>145
;id = 194
;ignorehitpause =
;persistent =
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =enemy,time=[230,350]
ID =194
scale =.3,.3
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =enemy,time=[350,420]
ID =194
scale =.3+((enemy,time-350)*.01),.3+((enemy,time-350)*.01)
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =enemy,time>=420
ID =194
scale =  1,1

[State 0, BindToParent]
type = BindToParent
trigger1 =parent,anim=3081&&parent,animelemtime(9)>0
time = 1
facing = 0
pos = 0,0
[State 0, SprPriority]
type = SprPriority
trigger1 = parent,anim=3081&&parent,animelemtime(9)<0
value = -1
[State 0, SprPriority]
type = SprPriority
trigger1 = parent,anim=3081&&parent,animelemtime(9)>0
value = 7
[State 0, SprPriority]
type = SprPriority
trigger1 = parent,anim=3084
value = -2
[State 0, VelSet]
type = VelSet
trigger1 =time=0
x = 10.5

[State 0, VelSet]
type = VelSet
trigger1 = time>50
x = 0


[State 0, AngleDraw]
type = AngleDraw
trigger1 =enemy,time=[230,350]
scale =.3,.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 =enemy,time=[350,420]
scale =   .3+((enemy,time-350)*.01),.3+((enemy,time-350)*.01)

[State 0, AngleDraw]
type = AngleDraw
trigger1 =enemy,time>=420
scale =  1,1
[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name = "Blue Falcon2"
ID =196
stateno =4001
pos = -39,-88
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0
value = S0,4
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 3    ;fv = 10
value = parent,fvar(3)
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =parent,animelemtime(15)>55
id =194
;ignorehitpause =
;persistent =
[State 0, VarSet]
type = VarSet
trigger1 =parent,anim=3081&&parent,animelemtime(9)<0
v = 10    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1=parent,anim=3081&&parent,animelemtime(9)>0
v = 10    ;fv = 10
value = 2

[State 0, VarSet]
type = VarSet
trigger1 =parent,anim=3084
v = 10    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = parent,anim=3081 &&parent,animelemtime(9)<0
v = 11    ;fv = 10
value =1

[State 0, VarSet]
type = VarSet
trigger1 = parent,anim=3081 &&parent,animelemtime(9)>0
v = 11    ;fv = 10
value =0
[State 0, VarSet]
type = Varadd
trigger1 =parent,anim=3081 &&parent,animelemtime(9)>0
v = 6    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = parent,animelemtime(15)>55
v = 11    ;fv = 10
value =2
[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,animelemtime(15)>55


;-----------------------------
[StateDef 4001]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 4003
sprpriority=9
[State 0, AngleDraw]
type = AngleDraw
trigger1 =enemy,time=[230,350]
scale =.3,.3
[State 0, AngleDraw]
type = AngleDraw
trigger1 =enemy,time=[350,420]
scale =   .3+((enemy,time-350)*.01),.3+((enemy,time-350)*.01)

[State 0, AngleDraw]
type = AngleDraw
trigger1 =enemy,time>=420
scale =  1,1

[State 0, BindToParent]
type = BindToParent
trigger1 =1
time = 1
facing = 0
pos = ceil(-40*parent,fvar(3)),ceil(-89*parent,fvar(3))
[State 0, SprPriority]
type = SprPriority
trigger1 = parent,var(10)=1
value = 0
[State 0, SprPriority]
type = SprPriority
trigger1 = parent,var(10)=2
value = 9
[State 0, SprPriority]
type = SprPriority
trigger1 =parent,var(10)=0
value = -1
[State 0, PlaySnd]
type = PlaySnd
trigger1 =parent,animelemtime(9)=1
value = S0,5
volume=100


;[State 0, AngleDraw]
;type = AngleDraw
;trigger1 =time>20
;value =  ((time-20)*3)
[State 0, AngleDraw]
type = AngleDraw
trigger1 =parent,var(11)=1
value =  90
;scale =  (winmugen only)
;ignorehitpause =
;persistent =


[State 0, AngleDraw]
type = AngleDraw
trigger1 =parent,var(6)>0
value =  90-((parent,var(6))*4.5)
[State 0, AngleDraw]
type = AngleDraw
trigger1 =parent,var(6)>17
value =  0
[State 0, Trans]
type = Trans
trigger1 =1
trans =add
[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,var(11)=2
;---------------------------------------------------------------------------
[Statedef 6000]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 3333
ctrl = 0
sprpriority = 5

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = 999,3
channel=1
[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = 999,2
channel=2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time<29
flag2=noFG
flag=nokosnd
ignorehitpause = 1
persistent = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time<29
flag = nobardisplay
flag2=nokosnd
flag3=noBG
ignorehitpause = 1
persistent = 1
[State 11009, dust]
type = Explod
trigger1 = time = 35
anim = 8001
ID = 11009
postype =back
pos = 160,ifelse(GameHeight=180,90,120)
bindtime = -1
facing = ifelse(facing = -1, -1,1)
sprpriority = 9
scale = .5,ifelse(GameHeight=180,.35,.5)
ownpal = 1
ignorehitpause =1
removetime=35
ontop =1
pausemovetime = 999
supermovetime = 9999
[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =35
value = S999,1
channel=3
[State 0, Pause]
type = Pause
trigger1 =time=2
time = 30
movetime = 30
ignorehitpause = 1
[State 0, PosSet]
type = PosSet
trigger1 = time=0
x =enemy,pos x 
y = enemy,pos y
[State 11009, dust]
type = Explod
trigger1 = time = 0
anim = 8000
ID = 11009
postype =p1
pos = 0,0
bindtime = -1
facing = ifelse(facing = -1, -1,1)
sprpriority = -2
scale = .5,ifelse(GameHeight=180,.41,.5)
ownpal = 0
ignorehitpause =1
ontop =0
pausemovetime = 999
supermovetime = 9999


[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,statetype !=A  && time > 120
;---------------------------------------------------------------------------
[Statedef 6001]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 3333
ctrl = 0
sprpriority = 5


[State 11009, dust]
type = Explod
trigger1 = parent,animelemtime(15)=240 && parent,anim=3084
anim = 8001
ID = 11009
postype =back
pos = 160,ifelse(GameHeight=180,90,120)
bindtime = -1
facing = ifelse(facing = -1, -1,1)
sprpriority = 9
scale = .5,ifelse(GameHeight=180,.35,.5)
ownpal =1
ignorehitpause =1
removetime=60
ontop =1
pausemovetime = 999
supermovetime = 9999
[State 0, Pause]
type = Pause
trigger1 =parent,animelemtime(15)=240 && parent,anim=3084
time =100
movetime=100
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = nomusic
[State 11009, PlaySnd]
type = PlaySnd
trigger1 =time=0
value = S200,28
[State 11009, PlaySnd]
type = PlaySnd
trigger1 =parent,animelemtime(15)=240 && parent,anim=3084
value = S999,1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2=noFG
flag3=nokoslow
flag3=nokosnd
flag3=noBG
ignorehitpause = 1
persistent = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2=nokosnd
flag3=noBG
ignorehitpause = 1
persistent = 1

;-------------------------------------------------------------------------------
[Statedef 7000]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3333
ctrl = 0
sprpriority = 6

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 9
y = 9
[State 7180, flames]
type = explod
trigger1 =1
anim = 8200
ID = 11014
sprpriority = 3
postype = p2
random=30,60
scale=.3,.3
ownpal=1
pos = (enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y));+90
bindtime = 4

[State 8050, 5]
type = destroyself
trigger1 =p2movetype!=H||p2statetype=L||time>120||root,stateno=5150
;-------------------------------------------------------------------------------
[Statedef 7001]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3333
ctrl = 0
sprpriority = 6

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(2)>=0&&root,animelemtime(3)<0&& !var(0)
time = 1
facing = 0
pos =-14,-120

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelem=3 && !var(0)
time = 1
facing = 0
pos =35,-95
;[State 9000, BindToParent]
;type = BindToParent
;trigger1 =  root,animelemtime(3)>=0&&root,animelemtime(7)<0
;facing = 1
;time = 1
;pos =(25.25)*(sin(1.085)*var(1)),(-102)*(cos(1.085)*var(1));+root,const(size.mid.pos.y)
[State 0, VarSet]
type = VarSet
trigger1 = root, animelemtime(3)>=0
v = 0    ;fv = 10
value = 1


[State 0, VelSet]
type = VelSet
trigger1 =  var(0)
x = 26
persistent=0
[State 0, VelAdd]
type = VelAdd
trigger1 = var(0)
y = 2.75

[State 0, VelAdd]
type = VelAdd
trigger1 = var(1)<3
x = -3.5
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 =  var(1)>3
x = 0


;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 =var(0)
v = 1    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 


[State 7180, flames]
type = explod
trigger1 =1
anim = 8200
ID = 11014
sprpriority = 3
postype = p1
random=10,20
scale=.3,.3
pos = 0,0;+90
bindtime =1
ignorehitpause=0

[State 8050, 5]
type = destroyself
trigger1 =root,stateno!=1010 || var(1)>7
;---------------------------------------------------------------------------------------------------
[Statedef 9997]
type    = A
movetype= I
physics = N
juggle  = 0
velset=0,0
poweradd= 0
ctrl = 0
anim =10000
sprpriority = 9
;#region cvs2_buffer_dec.vns
;==============================================================================;
;Command Buffering File for: Alex (Capcom VS. SNK 2)                           ;
;Original system for Capcom VS. SNK: Collision Course                          ;
;by Vans                                                                       ;
;Modifications by Jesuszilla for Capcom VS. SNK 2.                             ;
;==============================================================================;
;Introduction:
;This is the 9-tick / 2-tick based command buffering system. Coded to be Capcom
;compliant following Capcom vs. SNK 2 as a guide.
;
;The helper is capable of providing buffering as well as PERFECT reversedz
;commands in addition to negative edge checking for command var iables.
;
;Any and all editions should be done in the BUFFER DEFINITION section.
;
;Unless you plan to modify the whole system, do not touch the numbers in the
;varsets, ever.
;
;Try to keep a list of the variables used as well as the respective commands,
;just to keep some sort of order.
;
;In addition, try to follow this list as much as possible to avoid problems:
;Basic and system commands   = var(0)  - var(8) (RESERVED.)
;Special move type commands  = var(10) - var(29)
;Multiple button commands    = var(30) - var(39) (RESERVED.)
;Super move type commands    = var(40) - var(49)
;Double-tap                  = var(54) - var(56)
;Free commands               = var(57) - var(59)

[State 10371, NO TURN BEHAVIOR.]
type = AssertSpecial
trigger1 = 1
flag = invisible ;Just in case.
ignorehitpause = 1

[State 10371, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = -Const(size.ground.back),Const(size.mid.pos.y)
ignorehitpause = 1

[State 10371, P]
type = null;DisplayToClipboard
trigger1 = 1
text = "X %d  -X = %d | Y = %d  -Y = %d | Z = %d  -Z = %d"
params = var(0),var(7),var(1),var(8),var(2),var(9)
ignorehitpause = 1
[State 10371, K]
type = null;DisplayToClipboard
trigger1 = 1
text = "A %d  -A = %d | B = %d  -B = %d | C = %d  -C = %d"
params = var(3),var(10),var(4),var(11),var(5),var(12)
ignorehitpause = 1

[State 10371, AM I WORKING ?]
type = null;DisplayToClipboard
trigger1 = 1
text = "U = %d  D = %d  F = %d   B = %d\n"
params = var(6),var(7),var(8),var(9)
ignorehitpause = 1
[State 10371, AM I WORKING ?]
type = null;AppendToClipboard
trigger1 = 1
text = "\n             -F = %d  -B = %d Var(51) = %d"
params = var(10),var(11),var(51)
ignorehitpause = 1

[State 10371, AM I WORKING ?]
type = null;AppendToClipboard
trigger1 = 1
text = "DD = %d  FF = %d  BB = %d  POW = %d"
params = var(54),var(55),var(56),var(28)
ignorehitpause = 1

[State 10371, DOES THE DAMN THING WORK]
type = null;AppendToClipboard
trigger1 = 1
text = "K: LM: %d  LH: %d  MH: %d"
params = var(33),var(34),var(35)
ignorehitpause = 1

[State 10371, DOES THE DAMN THING WORK]
type = null;DisplayToClipboard
trigger1 = 1
text = "RLS_DIR = %d, CDBDFDBU: %d, BT = %d, CF,B = %d, Special = %d"
params = var(5), var(41), var(26), var(30), var(59)
ignorehitpause = 1

[State 10371, DOES THE DAMN THING WORK]
type = DisplayToClipboard
trigger1 = 1
text = "CD = %d, SUPUH = %d\nSpecial = %d"
params = var(3), var(4), var(5) ; var(26), var(30), var(59)
ignorehitpause = 1

[State 10371, Custom Combo]
type = VarSet
trigger1 = 1
fvar(30) = root,Var(30)

;----------------------------[BUFFER DECREASE]---------------------------------;
; The button and cardinal direction buffers are special in that they do not use
; normal integer subtraction for each buffer. That is because it would make the
; code ugly and unreadable. Thus, it uses bitwise shifting through division due
; to M.U.G.E.N's lack of bitwise shift operators.
;
; Think of each button and direction as an enumeration flag. When initializing
; (when a button is first pressed), it initializes the most significant bits.
; The buffer decreases by shifting the entire array down to the next size of
; bits. There are 7 buttons, so 7 bits are used. Therefore, up to 4 ticks of
; button buffering can be stored in one var in this architecture. Directions
; only require 4 bits because there are only 4 directions. Therefore, the
; direction arrays can store up to 8 ticks of buffering.
;
; In either case, however, the Capcom vs. SNK 2 buffering system used here only
; uses 2 ticks of buffering.
;
; Suppose a user presses LP and LK at the same time. The basic bit array in this
; structure would look as follows:
;
; 0010001
;
; Going from least significant bit (the rightmost bit) to the most significant
; bit (the leftmost bit), the bits that are filled for LP and LK are the 1st
; and 5th bits, respectively.
;
; So for the buffering system defined in this file, the variable would actually
; look as follows for the first tick. Recall that M.U.G.E.N int variables are
; 32 bits:
;
; 00000000000000000000100010000000
;
; The next tick, this array of 7 bits would be shifted down to the next 7 bits.
; In M.U.G.E.N, this is accomplished by dividing the number by 128. Thus, the
; bits in the variable would look as follows on the second tick:
;
; 00000000000000000000000000010001
;
;
; This algorithm is the same for every variable used for buffering. However,
; each variable used in this system serves a specific purpose:
;
; Var(0) - Used to signify button presses.
; Var(1) - Used to signify button holds.
; Var(2) - Used to signify button releases.
; Var(3) - Used to signify direction presses.
; Var(4) - Used to signify direction holds.
; Var(5) - Used to signify direction releases.
;
; A command for Var(0) or Var(3) is like a raw button, such as x or F. Similarly,
; Var(1) and Var(4) can be used for hold behavior, like /x or /F. Finally, Var(2)
; and Var(5) are used for release behavior, like ~x or ~F. These are all
; necessary in order to overcome M.U.G.E.N's limitations to provide a more solid
; command system.
;
; If you don't understand this explanation, that is OK. CNS may be your first,
; or only, computer language, and this system is built upon years of expertise
; in computer science. You can read up on bitwise operations here. I hope these
; links survive time!
;
; English:
; http://mugenguild.com/forum/topics/bitwise-variables-demystified-137076.0.html
; https://en.wikipedia.org/wiki/Bitwise_operation
;
; 日本語:
; https://ja.wikipedia.org/wiki/%E3%83%93%E3%83%83%E3%83%88%E6%BC%94%E7%AE%97
;
;--------------------------------[BUTTONS]-------------------------------------;
;BUTTON:
;var(0) = PRESS
;var(1) = HOLD
;var(2) = RELEASE
;Final tick (pattern repeats going up, can store 4 ticks):
; LP    = 0x01
; MP    = 0x02
; HP    = 0x04
; Start = 0x08
; LK    = 0x10
; MK    = 0x20
; HK    = 0x40

[State 10371, Hold Dec]
type = VarSet
trigger1 = root, HitPauseTime = 0
var(1) = var(1)/128
ignorehitpause = 1

[State 10371, Press Dec]
type = VarSet
trigger1 = root, HitPauseTime = 0
var(0) = (var(0)/128)
ignorehitpause = 1

[State 10371, Negative Edge Dec]
type = VarSet
trigger1 = root, HitPauseTime = 0
var(2) = var(2)/128
ignorehitpause = 1

;---------------------------------[DIRECTIONS]---------------------------------;
;DIRECTIONAL:
;var(3) = PRESS
;var(4) = HOLD
;var(5) = RELEASE
;Final tick (pattern repeats going up, can store 8 ticks):
; Up      = 0x01
; Down    = 0x02
; Back    = 0x04
; Forward = 0x08

[State 10371, Hold Dec]
type = VarSet
trigger1 = Var(4)
var(4) = var(4)/16
ignorehitpause = 1

[State 10371, Press Dec]
type = VarSet
trigger1 = Var(3)
var(3) = var(4) | (var(3)/16)
ignorehitpause = 1

[State 10371, Negative Edge Dec]
type = VarSet
trigger1 = Var(5)
var(5) = var(5)/16
ignorehitpause = 1

;DIRECTIONAL:
;var(6) = UP
;var(7) = DOWN
;var(8) = FWD
;var(9) = BWD
;var(10) = RELEASE FWD
;var(11) = RELEASE BWD
;var(54) = DD
;var(55) = FF
;var(56) = BB
[State 10371, Neg FWD Dec]
type = VarAdd
trigger1 = Var(6)
var(6) = -1
ignorehitpause = 1
[State 10371, Neg BWD Dec]
type = VarAdd
trigger1 = Var(7)
var(7) = -1
ignorehitpause = 1
[State 10371, Neg DOWN Dec]
type = VarAdd
trigger1 = Var(8)
var(8) = -1
ignorehitpause = 1

[State 10371, FF Dec]
type = VarSet
trigger1 = (var(55)&15)
var(55) = (var(55)^(var(55)&15)) | ((var(55)&15) - 1)
ignorehitpause = 1
[State 10371, BB Dec]
type = VarSet
trigger1 = (var(56)&15)
var(56) = (var(56)^(var(56)&15)) | ((var(56)&15) - 1)
ignorehitpause = 1
;------------------------------[MULTIPLE BUTTONS]------------------------------;
;DOUBLE BUTTON:
;var(30) = LP+MP
;var(31) = LP+HP
;var(32) = MP+LK
;var(33) = LK+MK
;var(34) = LK+HK
;var(35) = MK+LP
;var(36) = LP+LK
;var(37) = MP+MK
;var(38) = HP+HK
[State 10371, LP+MP Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(30)
var(30) = -1
ignorehitpause = 1
[State 10371, LP+HP Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(31)
var(31) = -1
ignorehitpause = 1
[State 10371, MP+HP Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(32)
var(32) = -1
ignorehitpause = 1

[State 10371, LK+MK Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(33)
var(33) = -1
ignorehitpause = 1
[State 10371, LK+HK Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(34)
var(34) = -1
ignorehitpause = 1
[State 10371, MK+HK Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(35)
var(35) = -1
ignorehitpause = 1

[State 10371, LP+LK Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(36)
var(36) = -1
ignorehitpause = 1
[State 10371, MP+MK Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(37)
var(37) = -1
ignorehitpause = 1
[State 10371, HP+HK Dec]
type = VarAdd
triggerall = root, HitPauseTime = 0
trigger1 = var(38)
var(38) = -1
ignorehitpause = 1
;#endregion

;----------------------------------[COMMANDS]----------------------------------;
;var(21)  = QCF
;var(22)  = DP
;var(23)  = QCB
;var(24)  = HCB
;var(25)  = HCF
;var(26)  = CB,F
;var(27)  = CF,B
;var(28)  = CD,U
;var(40)  = QCFx2
;var(41)  = QCBx2

;------------------- SUPERS ---------------------------------------------------;
[State 10371, QCFx2 Dec]
type = VarSet
trigger1 = (var(40)&15)
var(40) = (var(40)^(var(40)&15)) | ((var(40)&15) - 1)
ignorehitpause = 1

[State 10371, QCBx2 Dec]
type = VarSet
trigger1 = (var(41)&15)
var(41) = (var(41)^(var(41)&15)) | ((var(41)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(42)&15)
var(42) = (var(42)^(var(42)&15)) | ((var(42)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(43)&15)
var(43) = (var(43)^(var(43)&15)) | ((var(43)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(44)&15)
var(44) = (var(44)^(var(44)&15)) | ((var(44)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(45)&15)
var(45) = (var(45)^(var(45)&15)) | ((var(45)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(46)&15)
var(46) = (var(46)^(var(46)&15)) | ((var(46)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(47)&15)
var(47) = (var(47)^(var(47)&15)) | ((var(47)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(48)&15)
var(48) = (var(48)^(var(48)&15)) | ((var(48)&15) - 1)
ignorehitpause = 1

[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(49)&15)
var(49) = (var(49)^(var(49)&15)) | ((var(49)&15) - 1)
ignorehitpause = 1
[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(57)&15)
var(57) = (var(57)^(var(57)&15)) | ((var(57)&15) - 1)
ignorehitpause = 1
[State 10371, 360 Dec]
type = VarSet
trigger1 = (var(58)&15)
var(58) = (var(58)^(var(58)&15)) | ((var(58)&15) - 1)
ignorehitpause = 1
;------------------- SPECIALS -------------------------------------------------;
[State 10371, DP Dec]
type = VarSet
trigger1 = (var(22)&15)
var(22) = (var(22)^(var(22)&15)) | ((var(22)&15) - 1)
ignorehitpause = 1

[State 10371, rDP Dec]
type = VarSet
trigger1 = (var(23)&15)
var(23) = (var(23)^(var(23)&15)) | ((var(23)&15) - 1)
ignorehitpause = 1

[State 10371, QCF Dec]
type = VarSet
trigger1 = (var(20)&15)
var(20) = (var(20)^(var(20)&15)) | ((var(20)&15) - 1)
ignorehitpause = 1

[State 10371, QCB Dec]
type = VarSet
trigger1 = (var(21)&15)
var(21) = (var(21)^(var(21)&15)) | ((var(21)&15) - 1)
ignorehitpause = 1

[State 10371, HCF Dec]
type = VarSet
trigger1 = (var(24)&15)
var(24) = (var(24)^(var(24)&15)) | ((var(24)&15) - 1)
ignorehitpause = 1

[State 10371, HCB Dec]
type = VarSet
trigger1 = (var(25)&15)
var(25) = (var(25)^(var(25)&15)) | ((var(25)&15) - 1)
ignorehitpause = 1

[State 10371, CB,F Dec]
type = VarSet
trigger1 = (var(26)&15)
var(26) = (var(26)^(var(26)&15)) | ((var(26)&15) - 1)
ignorehitpause = 1

[State 10371, CF,B Dec]
type = VarSet
trigger1 = (var(27)&15)
var(27) = (var(27)^(var(27)&15)) | ((var(27)&15) - 1)
ignorehitpause = 1

[State 10371, FBF Dec]
type = VarSet
trigger1 = (var(28)&15)
var(28) = (var(28)^(var(28)&15)) | ((var(28)&15) - 1)
ignorehitpause = 1
[State 10371, FBF Dec]
type = VarSet
trigger1 = (var(29)&15)
var(29) = (var(29)^(var(29)&15)) | ((var(29)&15) - 1)
ignorehitpause = 1
;#region cvs2_buffer_init.vns
;--------------------------[BUFFER DEFINITION]---------------------------------;
;----------------------------[BUTTON BUFFER]-----------------------------------;
;Leave the BUTTON BUFFER alone for compatibility.
;BUTTON:
;var(0) = PRESS
;var(1) = HOLD
;var(2) = RELEASE
;Final tick (pattern repeats going up, can store 4 ticks):
; 1 - LP
; 2 - MP
; 4 - HP
; 8 - Start
;16 - LK
;32 - MK
;64 - HK
;DIRECTIONAL:
;var(3) = PRESS
;var(4) = HOLD
;var(5) = RELEASE
;Final tick (pattern repeats going up, can store 8 ticks):
; 1 - U
; 2 - D
; 4 - B
; 8 - F

;BUTTON PRESS:

;BUTTON HOLD:
[State 10371, START Init]
type = VarSet
trigger1 = command = "start" || command = "hold_start"
var(1) = var(1)|1024
ignorehitpause = 1

[State 10371, HK Init]
type = VarSet
trigger1 = command = "c" || command = "hold_c"
var(1) = var(1)|8192
ignorehitpause = 1

[State 10371, HP Init]
type = VarSet
trigger1 = command = "z" || command = "hold_z"
var(1) = var(1)|512
ignorehitpause = 1

[State 10371, MK Init]
type = VarSet
trigger1 = command = "b" || command = "hold_b"
var(1) = var(1)|4096
ignorehitpause = 1

[State 10371, MP Init]
type = VarSet
trigger1 = command = "y" || command = "hold_y"
var(1) = var(1)|256
ignorehitpause = 1

[State 10371, LK Init]
type = VarSet
trigger1 = command = "a" || command = "hold_a"
var(1) = var(1)|2048
ignorehitpause = 1

[State 10371, LP Init]
type = VarSet
trigger1 = command = "x" || command = "hold_x"
var(1) = var(1)|128
ignorehitpause = 1

[State 10371, HK Init]
type = VarSet
trigger1 = (var(1)&1024) = 1024 && (var(1)&32) = 0
trigger2 = command="start"&& (var(0)&1024) = 0
var(0) = var(0)|1024
ignorehitpause = 1


[State 10371, HK Init]
type = VarSet
trigger1 = (var(1)&8192) = 8192 && (var(1)&64) = 0
trigger2 = command="c"&& (var(0)&8192) = 0
var(0) = var(0)|8192
ignorehitpause = 1


[State 10371, HP Init]
type = VarSet
trigger1 = (var(1)&512) = 512 && (var(1)&4) = 0
trigger2 = command="z"&& (var(0)&512) = 0
var(0) = var(0)|512
ignorehitpause = 1

[State 10371, MK Init]
type = VarSet
trigger1 = (var(1)&4096) = 4096 && (var(1)&32) = 0
trigger2 = command="b"&& (var(0)&4096) = 0
var(0) = var(0)|4096
ignorehitpause = 1

[State 10371, MP Init]
type = VarSet
trigger1 = (var(1)&256) = 256 && (var(1)&2) = 0
trigger2 = command="y"&& (var(0)&256) = 0
var(0) = var(0)|256
ignorehitpause = 1

[State 10371, LK Init]
type = VarSet
trigger1 = (var(1)&2048) = 2048 && (var(1)&16) = 0
trigger2 = command="a"&& (var(0)&2048) = 0
var(0) = var(0)|2048
ignorehitpause = 1


[State 10371, LP Init]
type = VarSet
trigger1 = (var(1)&128) = 128 && (var(1)&1) = 0
trigger2 = command="x"&& (var(0)&128) = 0
var(0) = var(0)|128
ignorehitpause = 1


;BUTTON RELEASE:
[State 10371, Neg START Init]
type = VarSet
trigger1 = (var(1)&1024) = 0 && (var(1)&8) > 0
var(2) = var(2)|8
ignorehitpause = 1

[State 10371, Neg HK Init]
type = VarSet
trigger1 = (var(1)&8192) = 0 && (var(1)&64) > 0
var(2) = var(2)|64;8192
ignorehitpause = 1

[State 10371, Neg HP Init]
type = VarSet
trigger1 = (var(1)&512) = 0 && (var(1)&4) > 0
var(2) = var(2)|4;512
ignorehitpause = 1

[State 10371, Neg MK Init]
type = VarSet
trigger1 = (var(1)&4096) = 0 && (var(1)&32) > 0
var(2) = var(2)|32;4096
ignorehitpause = 1

[State 10371, Neg MP Init]
type = VarSet
trigger1 = (var(1)&256) = 0 && (var(1)&2) > 0
var(2) = var(2)|2;256
ignorehitpause = 1

[State 10371, Neg LK Init]
type = VarSet
trigger1 = (var(1)&2048) = 0 && (var(1)&16) > 0
var(2) = var(2)|16;2048
ignorehitpause = 1

[State 10371, Neg LP Init]
type = VarSet
trigger1 = (var(1)&128) = 0 && (var(1)&1) > 0
var(2) = var(2)|1;128
ignorehitpause = 1

;DIRECTION PRESS:
[State 10371, UP Init]
type = VarSet
trigger1 = command = "up"
var(3) = var(3)|16
ignorehitpause = 1

[State 10371, DOWN Init]
type = VarSet
trigger1 = command = "down"
var(3) = var(3)|32
ignorehitpause = 1

[State 10371, BWD Init]
type = VarSet
trigger1 = command = "back"
var(3) = var(3)|64
ignorehitpause = 1

[State 10371, FWD Init]
type = VarSet
trigger1 = command = "fwd"
var(3) = var(3)|128
ignorehitpause = 1

;DIRECTION HOLD:
[State 10371, UP Init]
type = VarSet
trigger1 = command = "up" || command = "holdup"
var(4) = var(4)|16
ignorehitpause = 1

[State 10371, DOWN Init]
type = VarSet
trigger1 = command = "down" || command = "holddown"
var(4) = var(4)|32
ignorehitpause = 1

[State 10371, BWD Init]
type = VarSet
trigger1 = command = "back" || command = "holdback"
var(4) = var(4)|64
ignorehitpause = 1

[State 10371, FWD Init]
type = VarSet
trigger1 = command = "fwd" || command = "holdfwd"
var(4) = var(4)|128
ignorehitpause = 1

;DIRECTION RELEASE:
[State 10371, Neg UP Init]
type = VarSet
trigger1 = (var(4)&16) = 0 && (var(4)&1) > 0
var(5) = var(5)|1;16
ignorehitpause = 1

[State 10371, Neg DOWN Init]
type = VarSet
trigger1 = (var(4)&32) = 0 && (var(4)&2) > 0
var(5) = var(5)|2;32
ignorehitpause = 1

[State 10371, Neg BWD Init]
type = VarSet
trigger1 = (var(4)&64) = 0 && (var(4)&4) > 0
var(5) = var(5)|4;64
ignorehitpause = 1

[State 10371, Neg FWD Init]
type = VarSet
trigger1 = (var(4)&128) = 0 && (var(4)&8) > 0
var(5) = var(5)|8;128
ignorehitpause = 1

; TODO
[State 10371, NEG FWD Init]
type = VarSet
triggerall = !Var(6)
trigger1 = p2dist X >= 0
trigger1 = (var(5)&240) = 128 || (var(5)&15) = 8
trigger2 = p2dist X < 0
trigger2 = (var(5)&240) = 64 || (var(5)&15) = 4
var(6) = 10
ignorehitpause = 1
[State 10371, NEG BWD Init]
type = VarSet
triggerall = !Var(7)
trigger1 = p2dist X >= 0
trigger1 = (var(5)&240) = 64 || (var(5)&15) = 4
trigger2 = p2dist X < 0
trigger2 = (var(5)&240) = 128 || (var(5)&15) = 8
var(7) = 10
ignorehitpause = 1
[State 10371, NEG DOWN Init]
type = VarSet
triggerall = !Var(8)
trigger1 = (var(5)&240) = 32 || (var(5)&15) = 2
var(8) = 10
ignorehitpause = 1

;---------------------------[MULTIPLE BUTTON BUFFER]---------------------------;
;DOUBLE BUTTON:
;var(30) = LP+MP
;var(31) = LP+HP
;var(32) = MP+HP
;var(33) = LP+MP
;var(34) = LP+HP
;var(35) = MP+HP
;var(36) = LP+LK
;var(37) = MP+MK
;var(38) = HP+HK

[State 10371, LP+MP init]
type = VarSet
triggerall = !Var(30)
trigger1 = (var(0)&129) > 0 && (var(0)&258) > 0
var(30) = 2
[State 10371, LP+HP init]
type = VarSet
triggerall = !Var(31)
trigger1 = (var(0)&129) > 0 && (var(0)&516) > 0
var(31) = 2
[State 10371, MP+LK init]
type = VarSet
trigger1 = (var(0)&258) > 0 && (var(0)&516) > 0
var(32) = 2

[State 10371, LK+MK init]
type = VarSet
triggerall = !Var(33)
trigger1 = (var(0)&2064) > 0 && (var(0)&4128) > 0
var(33) = 2
[State 10371, cancel init]
type = VarSet
triggerall = !Var(34)
trigger1 = (var(0)&129) > 0 && (var(0)&258) > 0 && (var(0)&516) > 0
var(34) = 2
[State 10371, Install activation init]
type = VarSet
triggerall = !Var(35)
trigger1 = (( var(0)&2064) > 0 && ( var(0)&258) > 0 || (var(0)&129) > 0 && (var(0)&4128))  > 0
var(35) = 2

[State 10371, LP+LK init]
type = VarSet
triggerall = !Var(36)
trigger1 = (var(0)&129) > 0 && (var(0)&2064) > 0
var(36) = 2
[State 10371, MP+MK init]
type = VarSet
triggerall = !Var(37)
trigger1 = (var(0)&258) > 0 && (var(0)&4128) > 0
var(37) = 2
[State 10371, HP+HK init]
type = VarSet
triggerall = !Var(38)
trigger1 = (var(0)&516) > 0 && (var(0)&8256) > 0
var(38) = 2
;#endregion

;----------------------------[COMMAND BUFFER]----------------------------------;
;This is where ONLY THE NECESSARY commands are buffered. The buffer requires
;both the regular command and its reversed equivalent.
;
;ALL COMMANDS SET HERE MUST ALSO BE PUT IN [Commands] UNDER [Buffer Decrease]
;
;One last thing, just like the CMD file, put the complicated commands on top.
;Command checklist:
;
;var(21)         = QCF
;var(22)         = DP
;var(23)         = HCB
;var(28)         = CB,F
;var(29)         = CD,U
;var(40)         = QCFx2
;var(41)         = QCBx2
;var(42)-var(49) = 360

;-----------------[SUPERS]-----------------
[State 10371, QCFx2 Init]
type = Null
trigger1 = !Var(40)  && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger1 = e||(var(40) := 15 + (2**4))

trigger2 = (Var(40)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 2560 || (var(3)&240) = 160 || (var(3)&15) = 10)
trigger2 = e||(var(40) := 15 + (2**5))

trigger3 = (Var(40)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger3 = e||(var(40) := 15 + (2**6))

trigger4 = (Var(40)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger4 = e||(var(40) := 15 + (2**7))

trigger5 = (Var(40)&(2**8 - 1)) > (2**7) && ((var(3)&3840) = 2560 || (var(3)&240) = 160 || (var(3)&15) = 10)
trigger5 = e||(var(40) := 15 + (2**8))

trigger6 = (Var(40)&(2**9 - 1)) > (2**8) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger6 = e||(var(40) := 15 + (2**9))

trigger7 = Var(40) && (Var(40)&15) = 0
trigger7 = e||(var(40) := 0)
ignorehitpause = 1


[State 10371, QCBx2 Init]
type = Null
trigger1 = !Var(41)  && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger1 = e||(var(41) := 15 + (2**4))

trigger2 = (Var(41)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 1536 || (var(3)&240) = 96 || (var(3)&15) = 6)
trigger2 = e||(var(41) := 15 + (2**5))

trigger3 = (Var(41)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger3 = e||(var(41) := 15 + (2**6))

trigger4 = (Var(41)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger4 = e||(var(41) := 15 + (2**7))

trigger5 = (Var(41)&(2**8 - 1)) > (2**7) && ((var(3)&3840) = 1536 || (var(3)&240) = 96 || (var(3)&15) = 6)
trigger5 = e||(var(41) := 15 + (2**8))

trigger6 = (Var(41)&(2**9 - 1)) > (2**8) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger6 = e||(var(41) := 15 + (2**9))

trigger7 = Var(41) && (Var(41)&15) = 0
trigger7 = e||(var(41) := 0)
ignorehitpause = 1

[State 10380, FHCF Init]
type = Null
trigger1 = !Var(42)  && ((var(5)&3840) = 2048 || (var(5)&240) = 128 || (var(5)&15) = 8)
trigger1 = e||(var(42) := 25 + (2**4))

trigger2 = (Var(42)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger2 = e||(var(42) := 25 + (2**5))

trigger3 = (Var(42)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 1536 || (var(3)&240) = 96 || (var(3)&15) = 6)
trigger3 = e||(var(42) := 25 + (2**6))

trigger4 = (Var(42)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger4 = e||(var(42) := 25 + (2**7))

trigger5 = (Var(42)&(2**8 - 1)) > (2**7) && ((var(3)&3840) = 2560 || (var(3)&240) = 160 || (var(3)&15) = 10)
trigger5 = e||(var(42) := 25 + (2**8))

trigger6 = (Var(42)&(2**9 - 1)) > (2**8) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger6 = e||(var(42) := 25 + (2**9))

trigger7 = Var(42) && (Var(42)&15) = 0
trigger7 = e||(var(42) := 0)
ignorehitpause = 1


[State 10380, BHCB Init]
type = Null
trigger1 = !Var(43)  && ((var(5)&3840) = 1024 || (var(5)&240) = 64 || (var(5)&15) = 4)
trigger1 = e||(var(43) := 25 + (2**4))

trigger2 = (Var(43)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger2 = e||(var(43) := 25 + (2**5))

trigger3 = (Var(43)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 2560 || (var(3)&240) = 160 || (var(3)&15) = 10)
trigger3 = e||(var(43) := 25 + (2**6))

trigger4 = (Var(43)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger4 = e||(var(43) := 25 + (2**7))

trigger5 = (Var(43)&(2**8 - 1)) > (2**7) && ((var(3)&3840) = 1536 || (var(3)&240) = 96 || (var(3)&15) = 6)
trigger5 = e||(var(43) := 25 + (2**8))

trigger6 = (Var(43)&(2**9 - 1)) > (2**8) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger6 = e||(var(43) := 25 + (2**9))

trigger7 = Var(43) && (Var(43)&15) = 0
trigger7 = e||(var(43) := 0)
ignorehitpause = 1

[State 10380, QCFHCB Init]
type = Null
trigger1 = !Var(44)  && ((var(5)&3840) = 512 || (var(5)&240) = 32 || (var(5)&15) = 2)
trigger1 = e||(var(44) := 25 + (2**4))

trigger2 = (Var(44)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger2 = e||(var(44) := 25 + (2**5))

trigger3 = (Var(44)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger3 = e||(var(44) := 25 + (2**6))

trigger4 = (Var(44)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger4 = e||(var(44) := 25 + (2**7))

trigger5 = Var(44) && (Var(44)&15) = 0
trigger5 = e||(var(44) := 0)
ignorehitpause = 1

[State 10380, QCBHCF Init]
type = Null
trigger1 = !Var(45)  && ((var(5)&3840) = 512 || (var(5)&240) = 32 || (var(5)&15) = 2)
trigger1 = e||(var(45) := 25 + (2**4))

trigger2 = (Var(45)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger2 = e||(var(45) := 25 + (2**5))

trigger3 = (Var(45)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger3 = e||(var(45) := 25 + (2**6))

trigger4 = (Var(45)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger4 = e||(var(45) := 25 + (2**7))

trigger5 = Var(45) && (Var(45)&15) = 0
trigger5 = e||(var(45) := 0)
ignorehitpause = 1

;----------------[SPECIALS]----------------
[State 10380, CB,F Init]
type = Null
trigger1 = !Var(26) && cond(FVar(30), (var(5)&68) > 0, ((Var(10)&511) = [1,9])) ; If in custom combo, use normal release
trigger1 = e||(var(26) := 9 + (2**4))

trigger2 = (Var(26)&(2**5 - 1)) > (2**4) && (var(3)&136) > 0
trigger2 = e||(var(26) := 9 + (2**5))

trigger3 = Var(26) && (Var(26)&15) = 0
trigger3 = e||(var(26) := 0)
ignorehitpause = 1

[State 10380, CF,B Init]
type = Null
trigger1 = !Var(27) && cond(FVar(30), (var(5)&136) > 0, ((Var(10)&511) = [1,9])) ; If in custom combo, use normal release
trigger1 = e||(var(27) := 9 + (2**4))

trigger2 = (Var(27)&(2**5 - 1)) > (2**4) && (var(3)&68) > 0
trigger2 = e||(var(27) := 9 + (2**5))

trigger3 = Var(27) && (Var(27)&15) = 0
trigger3 = e||(var(27) := 0)
ignorehitpause = 1

[State 10380, BFB Init]
type = Null
trigger1 = !Var(28)  && ((var(5)&3840) = 1024 || (var(5)&240) = 64 || (var(5)&15) = 4)
trigger1 = e||(var(28) := 15 + (2**4))

trigger2 = (Var(28)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger2 = e||(var(28) := 15 + (2**5))

trigger3 = (Var(28)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger3 = e||(var(28) := 15 + (2**6))

trigger4 = Var(28) && (Var(28)&15) = 0
trigger4 = e||(var(28) := 0)
ignorehitpause = 1

[State 10380, FBF Init]
type = Null
trigger1 = !Var(29)  && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger1 = e||(var(29) := 15 + (2**4))

trigger2 = (Var(29)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger2 = e||(var(29) := 15 + (2**5))

trigger3 = (Var(29)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger3 = e||(var(29) := 15 + (2**6))

trigger4 = Var(29) && (Var(29)&15) = 0
trigger4 = e||(var(29) := 0)
ignorehitpause = 1



[State 10380, Charge Back]
type = VarAdd
triggerall = var(10) = (255,255+48] ; 48 ticks
trigger1 = p2dist X >= 0
trigger1 = (var(4)&68) > 0          ; holdback
trigger2 = p2dist X < 0
trigger2 = (var(4)&136) > 0         ; holdfwd
var(10) = -1
[State 10380, Charge Down]
type = VarAdd
triggerall = var(11) = (255,255+48] ; 48 ticks
trigger1 = (var(4)&34) > 0          ; holddown
var(11) = -1

[State 10371, Charge Back Dec]
type = VarSet
triggerall = (var(10)&511) = [1,9]
trigger1 = (var(10)&15)
var(10) = (var(10)^(var(10)&15)) | ((var(10)&15) - 1)
[State 10371, Charge Down Dec]
type = VarSet
triggerall = (var(11)&511) = [1,9]
trigger1 = (var(11)&15)
var(11) = (var(11)^(var(11)&15)) | ((var(11)&15) - 1)

[State 10380, Charge Back Buffer]
type = VarSet
triggerall = var(10) = 255
trigger1 = p2dist X >= 0
trigger1 = (var(5)&68) > 0          ; releaseback
trigger2 = p2dist X < 0
trigger2 = (var(5)&136) > 0         ; releasefwd
var(10) = 9
[State 10380, Charge Down Buffer]
type = VarSet
trigger1 = var(11) = 255
trigger1 = (var(5)&34)              ; releasedown
var(11) = 9

[State 10380, Charge Back Reset]
type = VarSet
trigger1 = var(10) = 255    ; Buffer ended or buffer didn't start
trigger1 = p2dist X >= 0
trigger1 = (var(5)&68) > 0
trigger2 = var(10) = 255    ; Buffer ended or buffer didn't start
trigger2 = p2dist X < 0
trigger2 = (var(5)&136) > 0
trigger3 = var(10) = 0      ; INIT
var(10) = 255+48
[State 10380, Charge Down Reset]
type = VarSet
trigger1 = var(11) = 255    ; Buffer ended or buffer didn't start
trigger1 = (var(5)&34)
trigger2 = var(11) = 0      ; INIT
var(11) = 255+48

[State 10371, HCB Init]
type = Null
trigger1 = !Var(25)  && ((var(5)&3840) = 2048 || (var(5)&240) = 128 || (var(5)&15) = 8)
trigger1 = e||(var(25) := 15 + (2**4))

trigger2 = (Var(25)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger2 = e||(var(25) := 15 + (2**5))

trigger3 = (Var(25)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger3 = e||(var(25) := 15 + (2**6))

trigger4 = Var(25) && (Var(25)&15) = 0
trigger4 = e||(var(25) := 0)
ignorehitpause = 1



[State 10371, HCF Init]
type = Null
trigger1 = !Var(24)  && ((var(5)&3840) = 1024 || (var(5)&240) = 64 || (var(5)&15) = 4)
trigger1 = e||(var(24) := 15 + (2**4))

trigger2 = (Var(24)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger2 = e||(var(24) := 15 + (2**5))

trigger3 = (Var(24)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger3 = e||(var(24) := 15 + (2**6))

trigger4 = Var(24) && (Var(24)&15) = 0
trigger4 = e||(var(24) := 0)
ignorehitpause = 1
[State 10371, rDP Init]
type = Null
trigger1 = !Var(23)  && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger1 = e||(var(23) := 15 + (2**4))

trigger2 = (Var(23)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger2 = e||(var(23) := 15 + (2**5))

trigger3 = (Var(23)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 1536 || (var(3)&240) = 96 || (var(3)&15) = 6)
trigger3 = e||(var(23) := 15 + (2**6))

trigger4 = Var(23) && (Var(23)&15) = 0
trigger4 = e||(var(23) := 0)
ignorehitpause = 1
[State 10371, DP Init]
type = Null
trigger1 = !Var(22)  && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger1 = e||(var(22) := 15 + (2**4))

trigger2 = (Var(22)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger2 = e||(var(22) := 15 + (2**5))

trigger3 = (Var(22)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 2560 || (var(3)&240) = 160 || (var(3)&15) = 10)
trigger3 = e||(var(22) := 15 + (2**6))

trigger4 = Var(22) && (Var(22)&15) = 0
trigger4 = e||(var(22) := 0)
ignorehitpause = 1

[State 10380, QCB Init]
type = Null
trigger1 = !Var(21) && ((var(4)&240) = 32 || (var(4)&15) = 2)
trigger1 = e||(var(21) := 9 + (2**4))

trigger2 = (Var(21)&(2**5 - 1)) > (2**4) && ((var(3)&240) = 96 || (var(3)&15) = 6)
trigger2 = e||(var(21) := 9 + (2**5))

trigger3 = (Var(21)&(2**6 - 1)) > (2**5) && ((var(3)&240) = 64 || (var(3)&15) = 4)
trigger3 = e||(var(21) := 9 + (2**6))

trigger4 = Var(21) && (Var(21)&15) = 0
trigger4 = e||(var(21) := 0)
ignorehitpause = 1

[State 10380, QCF Init]
type = Null
trigger1 = !Var(20)  && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger1 = e||(var(20) := 15 + (2**4))

trigger2 = (Var(20)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 2560 || (var(3)&240) = 160 || (var(3)&15) = 10)
trigger2 = e||(var(20) := 15 + (2**5))

trigger3 = (Var(20)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger3 = e||(var(20) := 15 + (2**6))

trigger4 = Var(20) && (Var(20)&15) = 0
trigger4 = e||(var(20) := 0)
ignorehitpause = 1
[State 10380, 360 Init]
type = Null
trigger1 = !Var(46)  && ((var(5)&3840) = 2048 || (var(5)&240) = 128 || (var(5)&15) = 8)
trigger1 = e||(var(46) := 15 + (2**4))

trigger2 = (Var(46)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger2 = e||(var(46) := 15 + (2**5))

trigger3 = (Var(46)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger3 = e||(var(46) := 15 + (2**6))

trigger4 = (Var(46)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 256 || (var(3)&240) = 16 || (var(3)&15) = 1)
trigger4 = e||(var(46) := 15 + (2**7))

trigger5 = Var(46) && (Var(46)&15) = 0
trigger5 = e||(var(46) := 0)
ignorehitpause = 1
[State 10380, 360 Init]
type = Null
trigger1 = !Var(47)  && ((var(5)&3840) = 512 || (var(5)&240) = 32 || (var(5)&15) = 2)
trigger1 = e||(var(47) := 15 + (2**4))

trigger2 = (Var(47)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger2 = e||(var(47) := 15 + (2**5))

trigger3 = (Var(47)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 256 || (var(3)&240) = 16 || (var(3)&15) = 1)
trigger3 = e||(var(47) := 15 + (2**6))

trigger4 = (Var(47)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger4 = e||(var(47) := 15 + (2**7))

trigger5 = Var(47) && (Var(47)&15) = 0
trigger5 = e||(var(47) := 0)
ignorehitpause = 1

[State 10380, 360 Init]
type = Null
trigger1 = !Var(48)  && ((var(5)&3840) = 1024 || (var(5)&240) = 64 || (var(5)&15) = 4)
trigger1 = e||(var(48) := 15 + (2**4))

trigger2 = (Var(48)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 256 || (var(3)&240) = 16 || (var(3)&15) = 1)
trigger2 = e||(var(48) := 15 + (2**5))

trigger3 = (Var(48)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger3 = e||(var(48) := 15 + (2**6))

trigger4 = (Var(48)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger4 = e||(var(48) := 15 + (2**7))

trigger5 = Var(48) && (Var(48)&15) = 0
trigger5 = e||(var(48) := 0)
ignorehitpause = 1

[State 10380, 360 Init]
type = Null
trigger1 = !Var(49)  && ((var(5)&3840) = 256 || (var(5)&240) = 16 || (var(5)&15) = 1)
trigger1 = e||(var(49) := 15 + (2**4))

trigger2 = (Var(49)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 2048 || (var(3)&240) = 128 || (var(3)&15) = 8)
trigger2 = e||(var(49) :=  15  + (2**5))

trigger3 = (Var(49)&(2**6 - 1)) > (2**5) && ((var(3)&3840) = 512 || (var(3)&240) = 32 || (var(3)&15) = 2)
trigger3 = e||(var(49) :=  15  + (2**6))

trigger4 = (Var(49)&(2**7 - 1)) > (2**6) && ((var(3)&3840) = 1024 || (var(3)&240) = 64 || (var(3)&15) = 4)
trigger4 = e||(var(49) := 15 + (2**7))

trigger5 = Var(49) && (Var(49)&15) = 0
trigger5 = e||(var(49) := 0)
ignorehitpause = 1
;---------------------------[COMMAND BUFFER ACTIVE]----------------------------;
; This is a single variable for two bits for each command: regular and reversed.
; These should be built upon all previous commands.
;
; Order doesn't really matter since the CMD's going to pick it all up in the
; same tick.
;
; Stores up to 32 commands. If you have even that many unique commands, either
; you're making MvC3 Dante or doing something completely wrong.
;
; I'm doing this for cleanliness, but if you're making a SF2 character, this is
; pretty much required.
;
[State 10380, Command Active]
type = Null
trigger1 = e||(var(59) := 0) ; INIT
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  1,  0))*((Var(20)&(2**7  - 1)) > (2**6))))) ; QCF
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0, 0, 1))*((Var(21)&(2**7  - 1)) > (2**6))))) ; QCB
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  3,  2))*((Var(22)&(2**7  - 1)) > (2**6))))) ; DP
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  2,  3))*((Var(23)&(2**7  - 1)) > (2**6))))) ; rDP
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  5,  4))*(( Var(24)&(2**7 - 1)) > (2**6))))) ; HCF
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  4,  5))*(( Var(25)&(2**7 - 1)) > (2**6))))) ; HCB
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  7,  6))*((Var(26)&(2**6  - 1)) > (2**5))))) ; CB,F
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  6,  7))*((Var(27)&(2**6  - 1)) > (2**5))))) ; CF,B
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  9,  8))*((Var(28)&(2**7  - 1)) > (2**6))))) ; BFB
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  8,  9))*((Var(29)&(2**7  - 1)) > (2**6))))) ; FBF
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0, 11,  10))*((Var(40)&(2**10 - 1)) > (2**9))))) ; QCFx2
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  10, 11))*((Var(41)&(2**10 - 1)) > (2**9))))) ; QCBx2
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  13, 12))*((Var(42)&(2**10 - 1)) > (2**9)))))            ; F,HCF
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  12, 13))*((Var(43)&(2**10 - 1)) > (2**9)))))             ; B,HCB
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  15, 14))*(( Var(44)&(2**8 - 1)) > (2**7)))))            ; QCF,HCB
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  14, 15))*((Var(45)&(2**8 - 1)) > (2**7)))))           ; QCB,HCF
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  17, 16))*(( Var(57)&(2**6 - 1)) > (2**5)))))                        ; DUF
trigger1 = e||(var(59) := (var(59)|((2**cond(P2Dist X < 0,  16, 17))*(( Var(58)&(2**6 - 1)) > (2**5)))))                        ; DUB
trigger1 = e||(var(59) := (var(59)|((2**18)*((Var(46)&(2**8  - 1)) > (2**7)))))                         ; 360
trigger1 = e||(var(59) := (var(59)|((2**18)*((Var(47)&(2**8  - 1)) > (2**7)))))                         ; 360
trigger1 = e||(var(59) := (var(59)|((2**18)*((Var(48)&(2**8  - 1)) > (2**7)))))                         ; 360
trigger1 = e||(var(59) := (var(59)|((2**18)*((Var(49)&(2**8  - 1)) > (2**7)))))                         ; 360
trigger1 = e||(var(59) := (var(59)|(cond(P2Dist X < 0, -2147483648, 2**30)*((Var(55)&(2**6  - 1)) > (2**5))))) ; FF
trigger1 = e||(var(59) := (var(59)|(cond(P2Dist X < 0, 2**30, -2147483648)*((Var(56)&(2**6  - 1)) > (2**5))))) ; BB
ignorehitpause = 1

;-----------------------------[DIRECTIONAL BUFFER]-----------------------------;
[State 10371, No dash]
type = VarRangeSet
trigger1 = root, Var(13)    ; Parry
trigger2 = root, Var(1) > 0 ; Just Defend
trigger3 = Var(51) > 7      ; Held for 8 ticks or more
value = 0
first = 55
last = 56

[State 10371, Reset X direction]
type = VarRangeSet
triggerall = Var(50) < 1
trigger1 = root, P2Dist X < 0
value = 0
first = 6
last = 7

[State 0, Trigger Once]
type = VarAdd
trigger1 = root, P2Dist X < 0
var(50) = 1
[State 0, Trigger Once]
type = VarSet
trigger1 = root, P2Dist X >= 0
var(50) = 0

[State 10371, F/B Timer] ; Because fuck you, that's why
type = VarSet
trigger1 = var(51) <= 0
trigger2 = (var(4)&204) = 0
var(51) = 0
[State 10371, Timer Inc]
type = VarAdd
trigger1 = (var(4)&192) > 0 && var(51) < 9
var(51) = ifElse((var(4)&192) > 0, 1, -1)

[State 10371, DOWN Timer]
type = VarSet
trigger1 = (var(4)&34) = 0
var(52) = 0
[State 10371, Timer Inc]
type = VarAdd
trigger1 = Var(52)
trigger1 = (var(4)&34) > 0
var(52) = 1

[State 10371, FF Init]
type = Null
trigger1 = !Var(55) && (var(5)&15) = 8 && var(51) < 8
trigger1 = e||(var(55) := 9 + (2**4))

trigger2 = (Var(55)&(2**5 - 1)) > (2**4) && (var(3)&240) = 128
trigger2 = e||(var(55) := 6 + (2**5))

trigger3 = Var(55) && ((Var(55)&15) = 0 || (var(4)&204) > 0)
trigger3 = e||(var(55) := 0)
[State 10371, BB Init]
type = Null
trigger1 = !Var(56) && (var(5)&15) = 4 && var(51) < 8
trigger1 = e||(var(56) := 9 + (2**4))

trigger2 = (Var(56)&(2**5 - 1)) > (2**4) && (var(3)&240) = 64
trigger2 = e||(var(56) := 6 + (2**5))

trigger3 = Var(56) && ((Var(56)&15) = 0 || (var(4)&204) > 0)
trigger3 = e||(var(56) := 0)

[State 10380, LJF Init]
type = Null
trigger1 = !Var(57)  && (((var(5)&61440) = 8192 || (var(5)&3840) = 512 || (var(5)&240) = 32 || (var(5)&15) = 2)||  ((var(5)&3840) = 2560 || (var(5)&240) = 160 || (var(5)&15) = 10)||  ((var(5)&3840) = 2560 || (var(5)&240) = 160 || (var(5)&15) = 10))
trigger1 = e||(var(57) := 12 + (2**4))

trigger2 = (Var(57)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 2304 || (var(3)&240) = 144 || (var(3)&15) = 9)
trigger2 = e||(var(57) := 11 + (2**5))

trigger3 = Var(57) && (Var(57)&15) = 0
trigger3 = e||(var(57) := 0)
ignorehitpause = 1
[State 10380, LJB Init]
type = Null
trigger1 = !Var(58)  && (((var(5)&61440) = 8192 || (var(5)&3840) = 512 || (var(5)&240) = 32 || (var(5)&15) = 2)||  ((var(5)&3840) = 2560 || (var(5)&240) = 160 || (var(5)&15) = 10)||  ((var(5)&3840) = 2560 || (var(5)&240) = 160 || (var(5)&15) = 10))
trigger1 = e||(var(58) := 12 + (2**4))

trigger2 = (Var(58)&(2**5 - 1)) > (2**4) && ((var(3)&3840) = 1280 || (var(3)&240) = 80 || (var(3)&15) = 5)
trigger2 = e||(var(58) := 12 + (2**5))

trigger3 = Var(58) && (Var(58)&15) = 0
trigger3 = e||(var(58) := 0)
ignorehitpause = 1
;---------------------------------------------------------------------------------------------------
[Statedef 9998]
type    = A
movetype= H
physics = N
juggle  = 8
velset=0,0
poweradd= 0
ctrl = 0
anim =10000
sprpriority = 9
[State 0, VarSet]
type = VarSet
triggerall = numenemy=1
triggerall= roundno>1 
triggerall = p2life <=root,var(9)
trigger1 = root,power>=1000
v = 1    ;fv = 10
value = 1

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=[40,57]
trigger2 = p2movetype!=H || p2stateno=5120
v = 30    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %f"
params = root,stateno=1010&& (var(34)=-1)&&(root,anim=1001  && (root,var(6)<200 && root,var(21)=2||root,var(6)=200 && root,numexplod(1010)<2)&& (p2statetype=A||p2statetype=L)),vel x
ignorehitpause = 1
;persistent = 


;var(35) = movehit
[State 0, VarSet]
type = VarSet
triggerall = var(35)=0
trigger1 = root,movehit&& root,hitpausetime=1
;define exceptions where movecontact is fine
;trigger2 = root,movecontact=1&& enemy,hitshakeover
;trigger2 = root,stateno=210 || root,stateno=410
;trigger3 = p2stateno=1051 && enemy,time=1
;trigger4 = root,movehit&&root,stateno=1010&&root,var(2)=2&& (p2stateno=833 || p2stateno=1045)
v = 35    ;fv = 10
value = 1
[State 0, VarSet]
type = parentVarSet
trigger1 = 1;&& enemy,hitshakeover
v = 35    ;fv = 10
value = var(35)
[State 0, VarSet]
type = parentVarSet
trigger1 = 1
v = 34    ;fv = 10
value = var(34)

[State 0, VarSet]
type = parentVarSet
trigger1 = 1;&& enemy,hitshakeover
v = 32    ;fv = 10
value = var(32)
[State 0, ParentVarAdd]
type = VarAdd
trigger1 = var(32)>0 && root,stateno<1000
v =  32   ;fv = 
value = -1

[State 0, VarRandom]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999
;ignorehitpause = 
;persistent = 



;===non attacks

;45
[State 0, Null]
type = Null
triggerall =root,stateno=45&& !var(35) && var(34)=-1 
trigger1 = root,numexplod(610)>2
trigger1 = var(34):=611
;55
;[State 0, Null]
;type = Null
;triggerall =root,stateno=55&& !var(35) && root,time>=6 && p2movetype=H && var(34)=-1 && p2statetype!=L
;trigger1 = root,ctrl && root,fvar(21)>-20
;trigger1 = var(34):=610
;trigger2 = root,ctrl && root,fvar(21)<-20
;trigger2 = p2statetype=A
;trigger2 = var(34):=605

;4
;[State 0, Null]
;type = Null
;triggerall =root,stateno=4&& !var(35) 
;trigger1 = root,numhelper(1001)>0 
;trigger1 = helper(1001),movehit
;trigger1 = var(34):=600
;trigger1 = var(30):=1
;trigger2 = p2stateno=[300,303]
;trigger2 = var(30):=1
;trigger2 = var(34):=600
;trigger3 = p2stateno=1101
;trigger3 = var(30):=0
;trigger3 = var(34):=205

;1003
;[State 0, Null]
;type = Null
;triggerall =root,stateno=1003&& !var(35) 
;trigger1 = var(34):=610 
;trigger1 = var(30):=1
;trigger2 = p2stateno=[300,303]
;trigger2 = var(30):=1
;trigger2 = var(34):=600



;105
;[State 0, Null]
;type = Null
;triggerall =root,stateno=105&& !var(35) 
;trigger1 =  p2statetype=L
;trigger1 = var(34):=1001
;trigger2 = p2statetype!=L
;trigger2 = var(34):=-1
;1002
;[State 0, Null]
;type = Null
;triggerall =root,stateno=1002&& !var(35) &&  root,numexplod(1005)=0
;trigger1 =(var(0)%5<3)  && p2statetype= A && (root,var(6)<300 || p2movetype=A && enemy,numproj=0)&&var(34)=-1
;trigger1 = var(34):=1005
;trigger2 =(var(0)%5<3)  && p2statetype= A && (root,var(6)=300|| p2movetype=A && enemy,numproj>0)&&var(34)=-1
;trigger2 = var(34):=1006
;trigger3 =(var(0)%5<3)  && p2statetype!= A &&var(34)=-1
;trigger3 = var(34):=cond(random%2,200,400)

;3055
;[State 0, Null]
;type = Null
;triggerall =root,stateno=3055&& !var(35) 
;trigger1 = p2statetype=A   && (var(0)%5>1) && root,fvar(22) < 75&&var(34)=-1&& p2movetype=H
;trigger1 = var(34):=1010
;trigger2 = p2statetype!=A || ( root,fvar(22) <70)&&var(34)=-1 && p2movetype=H;&& (random%5>1) 
;trigger2 = var(34):=210

;3000
;[State 0, Null]
;type = Null
;triggerall =root,stateno=3000&& !var(35) 
;trigger1 = var(34)=-1 && random%6<2
;trigger1 = var(34):=1010
;trigger1 = var(2):=0
;trigger2 =var(34)=-1&& var(0)%6=[2,3]
;trigger2 = var(34):=212
;trigger3 = (var(0)%6>3)&& var(34)=-1
;trigger3 = var(34):=210
;====
;f200
;205
[State 0, Null]
type = Null
triggerall =root,stateno=205&& var(35) && root,AIlevel>6
trigger1 = var(34)=-1&& (var(0)%5>3) && root,var(21)>0 && (!enemy,hitfall)
trigger1 = (1||var(2):=cond(root,numexplod(1010)>0,1,0))
trigger1 = var(34):=1010
trigger2 = var(34)=-1 && (var(0)%5>1) && root,var(21)=2 && enemy,hitfall 
trigger2 = var(34):=211
;f600
;[State 0, Null]
;type = Null
;triggerall =(root,stateno=600)&& var(35)
;trigger1 = p2statetype=A && var(34)=-1
;trigger1= var(34):=605
;
;
;
;605
;[State 0, Null]
;type = Null
;triggerall =root,stateno=605&& var(35)
;trigger1 = (root,fvar(21) <=10)&&var(34)=-1&& (var(0)%5>3) && root,var(21)=0
;trigger1 = var(34):=1100
;trigger1 = var(2):=cond(var(0)%2&&root,power>350,2,0)
;trigger2 = p2statetype=A  &&root,var(21)>0&&var(34)=-1&& (var(0)%5<4)
;trigger2 = var(34):=1001
;trigger3 = p2statetype=A  && root,fvar(21) >10&& root,var(21)!=1&&var(34)=-1&& (var(0)%5<4)
;trigger3 = var(34):=610


;210
[State 0, Null]
type = Null
triggerall =root,stateno=210&& var(35) &&var(34)=-1 && root,AIlevel>6
trigger1 = root,movehit && (var(0)%5>1) && root,power>525 && p2life<125&var(34)=-1
trigger1 = var(34):=3000
trigger2 = root,numexplod(1010)<2 && root,frontedgebodydist >62
trigger2 = var(34):=1010
trigger2= var(2):=cond(p2statetype=A,1,0)
trigger3 =root,numexplod(1010)>=2 && root,power>450 && var(0)%3=1 && p2statetype!=A&& enemy,backedgebodydist >40
trigger3 = var(34):=1010
trigger3 = var(2):=2
trigger4 =p2statetype=A && AIlevel>6
trigger4 = var(34):=cond(enemy,backedgebodydist<42,1001,1005)

;410
[State 0, Null]
type = Null
triggerall =root,stateno=410&& var(35)&&var(34)=-1 && root,AIlevel>6
trigger1 = root,movehit && (var(0)%5>1) && root,power>525 && p2life<125&var(34)=-1
trigger1 = var(34):=3000
trigger2 = root,numexplod(1010)<2
trigger2 = var(34):=1010
trigger2= var(2):=cond(p2statetype=A,1,0)
trigger3 =root,numexplod(1010)>=2 && root,power>450 && var(0)%3=1 && p2statetype!=A
trigger3 = var(34):=1010
trigger3 = var(2):=2
trigger4 =var(34)=-1
trigger4 = var(34):=1005


;ignorehitpause = 
;persistent = 


;610
[State 0, Null]
type = Null
triggerall =root,stateno=610&& var(35) && var(34)=-1  && root,AIlevel>6
trigger1 = (var(0)%5>1) && root,power>525 && p2life<125
trigger1 = var(34):=3000
trigger2 = root,vel y <-2&&p2statetype=A  && (var(0)%5<3||root,AIlevel>6) && root,numexplod(610)<2&& root,pos y >-85
trigger2 = var(34):=610
trigger3 = root,vel y <0&&p2statetype=A  && (var(0)%5<3||root,AIlevel>6) && (root,numexplod(610)>1|| root,pos y <-85) && root,fvar(15)<10
trigger3 = var(34):=611
trigger4 = root,vel y >0&&p2statetype=A  && (var(0)%5<3||root,AIlevel>6) && (root,numexplod(610)>1||vel y >-2) && root,pos y >-40
trigger4 = (1||var(30):=0)
trigger4 = var(34):=cond(root,var(21)=2,205,210)
trigger5 = root,vel y >0&&p2statetype=A  && (var(0)%5<3||root,AIlevel>6) && (root,numexplod(610)>1||vel y >-2||root,fvar(15)>10) && root,pos y <-40
trigger5 = var(34):=1010

;611
[State 0, Null]
type = Null
triggerall =root,stateno=611&& var(35) && var(34)=-1  && root,AIlevel>6
trigger1 = root,vel y <0&&p2statetype=A  && (var(0)%5<3) && root,time>22
trigger1 = var(34):=1010




;211
[State 0, Null]
type = Null
triggerall =root,stateno=211&& var(35)&& p2statetype=A&&var(34)=-1 && root,AIlevel>6; && root,numhelper(3011)=0
trigger1 = (var(0)%5>1) && root,power>525 && p2life<125
trigger1 = var(34):=3050
trigger2=  (p2statetype=L || p2stateno=1033) && root,numexplod(1050)<=1 && enemy,backedgebodydist <40
trigger2= var(34):=1050
trigger3 =(var(0)%5>2) 
trigger3 = var(34):=1010


;810
[State 0, Null]
type = Null
triggerall =root,stateno=810&&root,time=1&& !var(35) && var(34)=-1 && root,AIlevel>6
trigger1 =  root,frontedgebodydist >50 
trigger1 = var(34):=1010
trigger1 = var(2):=cond(root,frontedgebodydist >90,1,0)
trigger2 =  root,frontedgebodydist <50&& (var(0)%5>1)
trigger2 = var(34):=1005

;840
[State 0, Null]
type = Null
triggerall =root,stateno=831&&root,time=1&& !var(35) && root,AIlevel>6
trigger1 =  root,var(19) && (var(0)%6<3)
trigger1 = var(34):=1050





;1001
[State 0, Null]
type = Null
triggerall =root,stateno=1001&& var(35) && root,AIlevel>6
trigger1 =root,hitcount=2  &&var(34)=-1 &&(root,var(19)||root,time>22);&& root,frontedgebodydist <170
trigger1 = var(34):=1000
;1005
[State 0, Null]
type = Null
triggerall =root,stateno=1005&& var(35) && root,AIlevel>6
trigger1 =(var(0)%5<3||root,AIlevel>6) &&var(34)=-1 && root,frontedgebodydist <90 && (root,numtarget(20010) || root,var(19)>0)
trigger1 = var(34):=211
trigger2 =(var(0)%5<3) &&var(34)=-1 && root,frontedgebodydist >90 && root,numexplod(1050)<2 && root,numtarget(20010)
trigger2 = var(34):=1050
trigger3 =(var(0)%5<3) &&var(34)=-1 && root,frontedgebodydist >90 && root,numexplod(1010)<2 && root,numtarget(20010)
trigger3 = var(34):=1010




;====specials
;1000
[State 0, Null]
type = Null
triggerall =root,stateno=1000&& var(35)&&var(34)=-1 && root,AIlevel>6
trigger1 =root,AIlevel>6 && root,statetype!=A && enemy,backedgebodydist <65 && root,p2bodydist y <-35
trigger1 = var(34):=1005
trigger2 =root,AIlevel>6 && root,statetype!=A && enemy,backedgebodydist <65 && root,p2bodydist y >-35
trigger2 = var(34):=205
trigger3 =root,AIlevel>6 &&( root,statetype!=A && enemy,backedgebodydist >=65||root,statetype=A)
trigger3 = var(34):=210

;1010
[State 0, Null]
type = Null
triggerall =root,stateno=1010&& var(35) && (var(34)=-1) && root,AIlevel>6
trigger1=root,statetype!=A&& p2statetype!=A && (root,var(21)=0||root,fvar(15)>=50)
trigger1 = var(34):=1050
trigger1= (var(30):=1)
trigger2= root,statetype!=A&&(root,var(2)=0 && root,var(21)>0&& p2statetype!=A) && root,fvar(15)<75
trigger2= var(34):=205
trigger3= root,statetype!=A&&(root,var(2)=1 && root,var(21)>0 || p2statetype=A && root,var(2)<2) && p2statetype=A
trigger3= var(34):=610
trigger3= (var(30):=1)
trigger4= root,statetype!=A&&(root,var(2)=2  ) 
trigger4= var(34):=1000
trigger4= (var(30):=1)
trigger5= root,statetype=A&&(root,var(19)>0 ||root,var(21)>0||enemy,time <10&&root,ctrl &&p2stateno=834 ) 
trigger5= var(34):=211
;1050
[State 0, Null]
type = Null
triggerall =root,stateno=1050&&( var(35) &&var(34)=-1) && root,AIlevel>6
trigger1=  (root,var(19)=0||(var(0)%5>=1)) && enemy,backedgebodydist <30&&root,frontedgebodydist<60&& root,anim=1050&& !root,numtarget(997) && root,fvar(15)<70
trigger1= var(34):=1001
trigger2=  (root,var(19)=0||(var(0)%5>=3)) && (enemy,backedgebodydist >30&&root,frontedgebodydist>60&& root,anim=1050) && !root,numtarget(997)
trigger2= var(34):=610 
trigger2= (var(30):=1)
trigger3 = (var(0)%5<3)&& !root,numtarget(997)
trigger3 = var(34):=210
trigger4 = (var(0)%5<3)&& root,numtarget(997)
trigger4 = var(34):=211


;=====================
[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=50 
v = 30    ;fv = 10
value = 0



[State 0, VarSet]
type = parentVarSet
trigger1 = p2movetype=H 
v = 34    ;fv = 10
value = var(34)
;ignorehitpause = 
;persistent =
[State 0, VarSet]
type = VarSet
;triggerall = var(34)!=1010 
trigger1 = root,stateno=1010 && root,time=1 
v = 2    ;fv = 10
value = -1 
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
trigger2 = root,stateno=var(34)  && root,time=1
;trigger3 = p2stateno!=2000 &&var(34)=1003
;trigger3 = var(34)=1011  && root,time=1 && root,stateno=1010
v = 34    ;fv = 10
value = -1

[State 0, VarSet]
type = VarSet
trigger1 = var(35)
v = 35    ;fv = 10
value = 0
persistent=2
;selection made?

;ignorehitpause = 
;persistent = 
;---------------------------------------------------------------------------------------------------
[Statedef 9999]
type    = A
movetype= H
physics = N
juggle  = 8
velset=0,0
poweradd= 0
ctrl = 0
anim =10000
sprpriority = 9
;[State 0, VarSet]
;type = parentVaradd
;trigger1 = root,var(6)>0 && (p2movetype!=H|| p2stateno=[120,132]) && gametime%2=0
;v =6    ;fv = 10
;value = -1
[State 0, VarSet]
type = parentVarSet
trigger1 = 1
fv = 15    ;fv = 10
value = root,p2bodydist x + root,var(36)
ignorehitpause = 1
;persistent = 
[State 0, VarSet]
type = parentVarSet
trigger1 = root,movetype=H || root,statetype!=A
v =6    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,movehit && root,hitpausetime=1
v = 28    ;fv = 10
value = enemy,gethitvar(hittime)
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H || p2stateno=[120,155]
v = 28    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 =root,movehit && root,hitpausetime=1
fv = 28   ;fv = 10
value = enemy,gethitvar(fall.recovertime)

[State 0, VarSet]
type = VarSet
triggerall =(root,prevstateno!=[800,850])&&root,stateno!=[800,850]
triggerall = p2stateno!=[1045,1047]
triggerall = !root,var(19)
triggerall = root,stateno!=[3000,3099] 
triggerall = p2stateno!=834 || enemy,time>25
triggerall = p2statetype!=S&&p2statetype!=C
trigger1 = (enemy,gethitvar(hittime)<=0&&(fvar(28)=0&&enemynear,canrecover&&root,var(19)=0||enemy,statetype!=A)) && p2movetype=H && p2stateno!=[120,155]
v = 29    ;fv = 10
value = 1
[State 0, VarSet]
type = Varadd
trigger1 =fvar(28)>0
fv = 28   ;fv = 10
value = -1
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
v = 29    ;fv = 10
value = 0
[State 0, ParentVarSet]
type = ParentVaradd
trigger1 = win
v =  57   ;fv = 
value = 1
persistent = 0
[State -3, Hit0]
type = PlaySnd
triggerall = root,Alive
triggerall = root,Time = 0
triggerall = random%3 =0
triggerall = root,movetype=H
trigger1 = root,Stateno = 1025
trigger2 =root, Stateno = 1045
trigger3 =root, Stateno = 1033
trigger4 =root, Stateno = 1034
trigger5 = root,Stateno = 1035
trigger6 = root,Stateno = 1036
value = 5000, random%4
channel=0
[State 1, VarSet]
type = parentVarSet
trigger1 =root,movetype=H 
v = 1    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 36    ;fv = 10
value = root,animelemno(0)
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = var(35) < var(36)
v = 35   ;fv = 10
value = root,animelemno(0)
[State 0, VarSet]
type = VarSet
trigger1 = root,anim !=var(34)
trigger2 = root,time<=1
v = 35   ;fv = 10
value = 0
;sadclaps detection
[State 0, VarSet]
type = VarSet
triggerall = root,movetype!=H
triggerall = root,stateno!=[800,899]
triggerall =root,stateno=[200,2030]
trigger1 = root,animelemno(0)<var(35)
v = 37    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = root,statetype!=A
v =  6   ;fv = 
value = 0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet

trigger1 =1
v = 34   ;fv = 10
value = root,anim

[State 0, VarSet]
type = parentVarSet
trigger1 =p2stateno=5210 && enemy,time>14
v = 33    ;fv = 10
value = 1

[State 0, VarSet]
type = parentVarSet
trigger1 = p2statetype!=A
trigger2= root,stateno=[800,855] 
v = 33    ;fv = 10
value = 0


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

;persistent = 

[State 2, VarSet]
type = Varset
trigger1 =var(10)>=0
trigger2 =var(11)>=0
trigger3 =var(12)>=0
trigger4 =var(13)>=0
trigger10 =var(20)>=0
trigger11 =var(21)>=0
v = 2   ;fv = 10
value = 1
ignorehitpause = 1

[State 3, VarSet]
type = Varset
trigger1 =var(10)>=0
trigger2 =var(11)>=0
v = 3   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = root,prevstateno=[190,199]
v = 19   ;fv = 10
value = 49
;ignorehitpause = 
;persistent = 
[State 0, VarAdd]
type = VarAdd
trigger1 = var(19)>0 && roundstate=2
v = 19    ;fv = 
value = -1
;ignorehitpause = 
;persistent = 

[State 4, VarSet]
type = Varset
trigger1 =root,statetype=A&& root,movetype!=H
v = 4   ;fv = 10
value = 1
ignorehitpause = 1

[State 5, VarSet]
type = Varadd
trigger1 =var(4)=2
v = 5   ;fv = 10
value = 1
ignorehitpause = 1



;ignorehitpause = 
;persistent = 
[State 6, VarSet]
type = Varset
trigger1 = roundstate=2 && var(6)<200
v = 6   ;fv = 10
value =1
ignorehitpause = 1
[State 6, VarSet]
type = Varset
trigger1 = (root,stateno=[5000,5200])&&root,prevstateno=[120,155]
v = 6   ;fv = 10
value = p2stateno
ignorehitpause = 1
;persistent = 

[State 7, VarSet]
type = VarSet
trigger1 =  p2stateno=var(6)
v =7   ;fv = 10
value = 1
ignorehitpause = 1
[State 8, VarSet]
type = VarSet
trigger1 = root,stateno=5120 
v = 8    ;fv = 10
value = 6
[State 8, VarSet]
type = Varadd
trigger1 = root,stateno!=5120 && var(8)>0
v = 8    ;fv = 10
value = -1
[State 8, VarSet]
type = VarSet
triggerall = var(13) || root,p2bodydist x= [15,45]
trigger1 = p2stateno=5201 && enemy,time >10 
trigger2 = p2stateno=5210 && enemy,time >10 
trigger3 = p2stateno=5120 && enemy,time >13
v = 9    ;fv = 10
value = 1
;enough for lights
[State 10, Explod]
type = varset 
triggerall = root,numtarget
triggerall = (enemynear,statetype!=A && root,stateno=52 || var(10)=0&& root,statetype=A && root,stateno=[600,699] ) || stateno=1010
trigger1 = (root,stateno=52&&(root,ctrl||root,animtime=-1) )||var(10)>0 && root,ctrl 
trigger2 = root,movehit &&root,animtime=-1
v=10
value=enemynear,gethitvar(hittime)
ignorehitpause = 1




;enough for heavys
[State 0, Explod]
type = varset
triggerall = var(11)=0
trigger1 = root,movecontact=1 && (root,anim=610)&& root,pos y >-70
trigger2 = root,movehit=1 && root,stateno=605&& root,pos y >-50
v=11
value=1

;blocked so inch slowly
[State 12, Explod]
type = varset
triggerall = var(12)=0
triggerall = var(13)=0
triggerall = root,numhelper(1001)=0
trigger1= root,p2bodydist x >175 && root,ctrl
trigger2= root,stateno=410 && root,movehit
trigger3= root,stateno=610 && p2statetype=A && root,var(21)=0
v=12
value=1
;[State 13, Explod]
;type = varset
;triggerall = var(12)=0
;triggerall = var(13)=0
;triggerall = root,numhelper(1001)=1
;trigger1= p2movetype=A &&root,var(17)&& (p2stateno!=5201||enemy,time>12)
;trigger2= p2statetype=L &&root,var(17) 
;v=13
;value=1

;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 

;persistent = 

;------can air dash
;[State 0, Explod]
;type = varset
;triggerall = root,movetype!=H
;triggerall = root,statetype=A
;triggerall = root,ctrl
;triggerall = root,var(31)=0
;triggerall = root,p2bodydist y >30 || p2movetype!=A || root,statetype=A
;trigger1= p2movetype=A  && p2bodydist x !=[1,30]
;trigger2 = p2stateno=5120 || enemy,prevstateno=5120
;trigger3 = root,p2bodydist x <80 && p2statetype=A
;trigger4 = (p2bodydist x>120 && (p2movetype!=A || p2statetype!=A))||backedgebodydist <117
;trigger5 = (root,p2bodydist x =[-30,0]) && p2statetype!=A && root,frontedgebodydist >60
;v=14
;value=1
;ignorehitpause =1


;------can air dash back
;[State 15, Explod]
;type = varset
;triggerall = root,movetype!=H
;triggerall = root,statetype=A
;triggerall = root,ctrl
;triggerall = root,var(31)=0 
;triggerall = p2bodydist x <120
;trigger1 = (root,p2bodydist x =[-10,40]) && p2statetype=A
;trigger2 = (root,p2bodydist x =[-30,0]) && p2statetype!=A && root,frontedgebodydist <60
;trigger3= p2bodydist x<90 && (p2movetype=A && p2statetype!=A&&backedgebodydist >117)
;v=15
;value=1
;ignorehitpause =1

;[State 0, VarSet]
;type = Varadd
;triggerall = enemy,hitshakeover
;trigger1 =root,moveguarded=1 
;v = 1   ;fv = 10
;value = 1
;ignorehitpause = 0
;[State 0, VarSet]
;type = VarSet
;trigger1 = root,movehit
;v = 1    ;fv = 10
;value = 0
;ignorehitpause = 
;persistent = 

;persistent = 


;persistent = 


;bait
;[State 16, VarSet]
;type = Varadd
;triggerall = var(17)=0
;triggerall = root,numhelper(1001)
;triggerall = enemy,hitshakeover
;trigger1=helper(1001),moveguarded=1
;v =16  ;fv = 10
;value = 1
;ignorehitpause =0
;persistent = 

;[State 17, VarSet]
;type = VarSet
;trigger1 = var(16)=3 && var(17)=0
;v = 17   ;fv = 10
;value = 12
;ignorehitpause = 
;persistent = 
;[State 17, VarSet]
;type = Varadd
;trigger1 = var(17)>0  && root,stateno!=1000
;v = 17   ;fv = 10
;value = -1
;ignorehitpause = 1


;persistent = 

;1000

;1001

;ignorehitpause = 
;persistent = 


;230
;[State 20, RemoveExplod]
;type = varset
;triggerall = p2stateno!=[833,834]
;trigger1 = root,stateno=1001 && p2statetype=S ||  root,stateno=1001 &&root,p2bodydist y <-25 && var(31)=0 && p2statetype=A
;v = 20
;value=0
;ignorehitpause = 1
;rolling elbow strike
;[State 20, Explod]
;type = varset
;triggerall =root,var(31)!=[40,59]
;triggerall = root,p2bodydist x >-5
;triggerall = root,stateno=1001 || root,stateno=1002 && (root,var(6)>0 || root,var(21)=2) || root,stateno=1003
;trigger1= p2statetype=C && p2movetype!=A || p2statetype=L ||p2stateno=[833,834]
;v=20
;value=1
;ignorehitpause =1
;ex tristan kick
;[State 20, Explod]
;type = varset
;triggerall =root,var(31)!=[40,59]
;triggerall = p2stateno!=[833,834]
;triggerall = root,stateno=1001 || root,stateno=1003
;trigger1= p2statetype=A && root,p2bodydist y >-25
;trigger2 = p2statetype=A &&p2bodydist x <5
;trigger3= p2statetype=C && p2movetype=A
;v=20
;value=2
;ignorehitpause =1
;
;ex tristan fist
;[State 20, Explod]
;type = varset
;triggerall =root,var(31)!=[40,59]
;triggerall = p2stateno!=[833,834]
;triggerall = root,stateno=1001 || root,stateno=1003
;trigger1 = p2statetype!=A &&p2bodydist x <15
;trigger2 = p2movetype=A && root,var(10)=0 
;trigger3 = p2statetype=A && root,stateno=1003 && (p2bodydist y >-35 || p2bodydist x =[-35,120])
;v=20
;value=3
;ignorehitpause =1
;1001
;[State 20, Explod]
;type = varset
;trigger1 = root,stateno!=[1001,1003] 
;v=20
;value=-1
;ignorehitpause =1
;do the knock up
;[State 20, Explod]
;type = varset
;triggerall = var(21)=0
;trigger1= (p2stateno=[1051,1052])  
;trigger2=(root,var(19)=1 && p2stateno=[833,834]) 
;trigger3= root,var(19)=1 && p2stateno=[1031,1032]
;v=21
;value=1
;ignorehitpause =1

;walking
[State 25, VarSet]
type = VarSet
triggerall = random <249|| root,var(31)>0
triggerall = p2statetype!=A|| p2movetype=H 
trigger1 = ((enemy,movetype !=A)|| root,p2bodydist x >5)&& p2statetype!=L && root,var(31)=0
trigger2 = root,backedgebodydist <20 && p2movetype=A&& root,var(31)=0
trigger3 = root,p2bodydist x <0 && p2statetype=A  && root,var(31)=0
trigger4 = root,var(31)>0
v = 25   ;fv = 10
value = 1

;---adjust for p2's position
[State 0, VarSet]
type = Varadd
;triggerall = var(20)=0
trigger1 = p2statetype=L  && p2stateno!=5101
v = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = var(20)=0
trigger1 = var(21)=0
trigger1 = var(22)=0
v = 0    ;fv = 10
value = -1
;ignorehitpause = 
;persistent = 
[State 2, VarSet]
type = Varset
trigger1 =var(10)=0
trigger1 =var(11)=0
trigger1 =var(12)=0
trigger1 =var(13)=0
trigger1 =var(20)=0
trigger1 =var(21)=0
v = 2   ;fv = 10
value = 0
ignorehitpause = 1
[State 2, VarSet]
type = Varset
trigger1 =var(10)=0
trigger1 =var(11)=0
v = 3   ;fv = 10
value = 0
ignorehitpause = 1


[State 4, VarSet]
type = Varset
trigger1 =var(6)=1
v = 4   ;fv = 10
value = 0
ignorehitpause = 1
[State 5, VarSet]
type = Varset
trigger1 =root,movehit
trigger2 = root,var(15)
v = 5   ;fv = 10
value =0
ignorehitpause = 1
[State 7, VarSet]
type = VarSet
trigger1 =  p2stateno!=var(6)
v =7   ;fv = 10
value = 0
ignorehitpause = 1


[State 8, VarSet]
type = VarSet
trigger1 = var(8)<0
v = 8    ;fv = 10
value = 0
;0----------removeexplods---
[State 8, VarSet]
type = VarSet
trigger1 = p2stateno=5201 && enemy,time <10 
trigger2 = p2stateno=5210 && enemy,time <10 
trigger3 =p2statetype!=A
v = 9    ;fv = 10
value = 0
[State 10, RemoveExplod]
type = varset
trigger1 = p2movetype!=H || root,movehit && root,statetype!=A && root,stateno=[200,499]
v =10
value=0
ignorehitpause = 1
[State 11, RemoveExplod]
type = varset
trigger1 = p2movetype!=H|| root,movehit && root,statetype!=A&&root, stateno=[200,499]
v = 11
value=0
ignorehitpause = 1

[State 12, RemoveExplod]
type = varset
trigger1 =root,numhelper(1001)=1
v = 12
value=0
ignorehitpause = 1

[State 13, RemoveExplod]
type = varset
trigger1 =root,numhelper(1001)=0
trigger2 = var(12)=1
trigger3= !root,var(17)
v = 13
value=0
ignorehitpause = 1
;persistent = 



;do the knock up
[State 20, Explod]
type = varset
triggerall = var(21)=1
trigger2= (p2stateno!=[1051,1052])  && p2statetype!=L
trigger1=root,var(19)=0 
v=21
value=0
ignorehitpause =1

[State 25, VarSet]
type = VarSet
triggerall = root,var(31)=0
triggerall = root,backedgebodydist >20
trigger1 =  enemy,movetype =A
trigger2 = root,p2bodydist x <15 && p2statetype=L && root,var(31)=0
trigger3 = p2statetype=A && p2movetype!=H&& root,p2bodydist x <15 && p2statetype!=L && root,var(31)=0
v = 25   ;fv = 10
value = 0

[State 42, ParentVarSet]
type = ParentVarSet
trigger1 = var(5)=0
v =42   ;fv = 
value = 0
;-----------
[State 0, VarSet]
type = VarSet
trigger1 = root,statetype = A
trigger2 = root,movetype=H && root,stateno!=[120,155]
trigger3= root,prevstateno=40
trigger4= (p2stateno=[5121,5899])
trigger5 = (root,prevstateno=52 ||root,prevstateno=5120) && p2statetype=A
trigger6 = root,p2bodydist x <65 && root,frontedgebodydist >60 && p2statetype!=L&&!helper(10002),var(30)
trigger7 = var(18)>0 ||var(8)>0 || enemy,hitdefattr=SC,AT 
trigger8 = (var(41)>0 && enemy,hitdefattr!=SC,AT) &&!helper(10002),var(30)
v=30
value = 0

[State 0, VarSet]
type = VarSet
triggerall = root,statetype != A
triggerall = (var(8)<=0) ||enemy,hitdefattr=SC,AT  && root,AIlevel >6
triggerall =  cond(root,AIlevel >0,random <ceil(((699*1.0)*(fvar(5)/(root,AIlevel*1.0)))),1)||enemy,hitdefattr=SC,AT && root,AIlevel >6 ||helper(10002),var(30)
triggerall = var(41)=0||enemy,hitdefattr=SC,AT  && root,AIlevel >6
triggerall = root,p2bodydist x >55 || root,frontedgebodydist <60 || helper(10002),var(30)
trigger1= enemy,hitdefattr=SC,AT && (root,ctrl||root,stateno=20)
trigger2 = ((root,p2bodydist x=[95,cond(p2movetype=A,220,140)])||root,frontedgedist <60)&& (root,ctrl||root,stateno=20||root,stateno=100) && root,movetype!=H&&(p2movetype!=H||p2statetype=L) 
trigger3 = (root,p2bodydist x =[70,240]) && enemy,numproj >0 && var(8)=0
;trigger6 = ((root,p2bodydist x=[45,150])||root,frontedgedist <40)&& (root,ctrl||root,stateno=20) && root,movetype!=H&&(p2stateno=5301||p2movetype!=H) 
trigger4 = root,backedgebodydist <30 && enemy,statetype=L && root,p2bodydist x < 70
trigger5 = helper(10002),var(30)
v = 30   ;fv = 10
value = 1
[State 0, VarSet]
type = Varset;how often should I jump?
trigger1 = time=0
fv = 5   ;fv = 10
value = .9

[State 0, VarSet]
type = Varset
triggerall = var(40)=1
triggerall=enemy,stateno=[200,699]
trigger1 = root,movetype=H && root,statetype=A && root,stateno!=[120,155]
trigger1 = root,gethitvar(hitshaketime)=1
fv = 5   ;fv = 10
value = fvar(5)*.85

[State 0, VarSet]
type = Varset
triggerall = var(40)=1
triggerall=enemy,stateno=[1000,1999]
trigger1 = root,movetype=H && root,statetype=A && root,stateno!=[120,155]
trigger1 = root,gethitvar(hitshaketime)=1
fv = 5   ;fv = 10
value = fvar(5)*.70
[State 0, VarAdd]
type = VarAdd
trigger1 = fvar(5)<.9&& time%240=0
fv = 5    ;fv = 
value = .15*fvar(5)
[State 0, VarSet]
type = Varset
trigger1 =root,statetype=A&& root,movetype!=H
v = 40   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =root,statetype=A&&root,movetype=H&& root,stateno=[5030,5050]
v = 40   ;fv = 10
value = 2
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =root,statetype!=A
v = 40   ;fv = 10
value = 0
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =var(40)=2
v = 41   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = Varset
triggerall =root,AILevel>0
trigger1 =root,movehit
trigger2 = root,var(15)
trigger3= var(42)%(30*root,AIlevel)=0
v = 41   ;fv = 10
value =0
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 =  var(41)=0
v = 42    ;fv = 10
value = 0
[State 0, VarSet]
type = Varadd
trigger1 = var(41)=1
v = 42    ;fv = 10
value = 1


[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(2) = %d var(3) = %d  vel x = %d movehit= %d"
params = var(21),var(10),var(11),(var(14))
ignorehitpause = 1