; MvC2 Ryu By Kamekaze Helper states
;--------------------------------------------------------------------------------------------
[Statedef 183]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =183
sprpriority = -4

[State 0, PosSet]
type = PosSet
trigger1 =time=0 
x = -170*facing
[State 1028, Vel X]
type = VelSet
trigger1 =time=0
y=-5.5
[State 1028, Vel X]
type = VelSet
trigger1 =time=0
x = (parentdist x/6.5)+8

[State 0, VelMul]
type = VelMul
trigger1 =animelemtime(2)<0
x = .88
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2)<0
y = .37
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = animelem=2
y = 0
;ignorehitpause = 
;persistent = 


[State 0, VelSet]
type = VelSet
trigger1 = animelem=2
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;--------------------------------------------------------------------------------------------
[Statedef 184]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =184
sprpriority = 4

[State 0, PosSet]
type = PosSet
trigger1 =time=0 
y = -260


[State 0, VelAdd]
type = VelAdd
trigger1 = anim!=185
y = .55
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = anim=184 && var(0)=0 && pos y>-15
y = -10
[State 0, VarSet]
type = VarSet
trigger1 = pos y>-15
v = 0    ;fv = 10
value = 1

;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = var(0)=1
y = -7
persistent=0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=184 && pos y>0 && var(0)=1 && vel y >-5
value = 185
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = anim=185
x = 0
y = 0
[State 0, PosSet]
type = PosSet
trigger1 = anim=185
y = 0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;--------------------------------------------------------------------------------------------
[Statedef 185]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =186
sprpriority = -4


[State 0, PosSet]
type = PosSet
trigger1 =time=0 
x = -230*facing
y=-240

[State 1028, Vel X]
type = VelSet
trigger1 =time=0
x = (parentdist x/10.35)

[State 0, VelMul]
type = VelMul
trigger1 =animelemtime(2)<0
x = .88
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >0
value = 186
elem =2

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2)<0
y = .57
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = animelem=2
y = 0
;ignorehitpause = 
;persistent = 


[State 0, VelSet]
type = VelSet
trigger1 = animelem=2
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

;--------------------------------------------------------------------------------------------
[Statedef 186]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =187
sprpriority = -4


[State 0, PosSet]
type = PosSet
trigger1 =time=0 
y=-240

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >0
value = 187
elem =2

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2)<0
y = .57
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = animelem=2
y = 0
;ignorehitpause = 
;persistent = 


[State 0, VelSet]
type = VelSet
trigger1 = animelem=2
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
;--------------------------------------------------------------------------------------------
[Statedef 187]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 4,0
anim =188
sprpriority = 8


[State 0, PosSet]
type = PosSet
trigger1 =time=0 
x=-240*facing

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim=188
trigger1 = parentdist x <3
value = 189

;ignorehitpause = 
;persistent = 


[State 0, VelSet]
type = VelSet
trigger1 = anim=189
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
;--------------------------------------------------------------------------------------------
[Statedef 192]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =191
sprpriority = -4

[State 0, VelSet]
type = VelSet
trigger1 = root,animelemtime(14)=1
x =-7
y=-5

[State 0, Gravity]
type = Gravity
trigger1 = root,animelemtime(14)>0
;ignorehitpause = 
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 0, DestroySelf]
type = DestroySelf
trigger1 = ((frontedgedist <= -90|| backedgedist <= -90) && time > 5)
;--------------------------------------------------------------------------------------------
[Statedef 193]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =192
sprpriority = 4

[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 192
[State 0, Turn]
type = Turn
trigger1 = animelem=11
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelem=11
x =3
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=11
y=-5
;ignorehitpause = 
persistent =0 






[State 0, DestroySelf]
type = DestroySelf
trigger1 = ((frontedgedist <= -90|| backedgedist <= -90) && time > 5)
 ;--------------------------------------------------------------------------------------------
[Statedef 184]
type    = A
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =186
sprpriority = -8

[State 0, VelSet]
type = VelSet
trigger1 = time=0
x =5
[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim=187 && animelemtime(1)=1
value = S180,4
channel=1
;*facing
[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim=187 && animelemtime(4)=10
value = S180,2
channel=0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parentdist x <=55 && time >1 && anim=186
;trigger2 = root,fvar(39)>-25;&& facing=-1
value = 187
;elem = 1
;ignorehitpause =
;persistent =
[State 0, PosSet]
type = Posset
trigger1 =time=0
x = -350*root,facing

;ignorehitpause =

[State 0, VelSet]
type = VelSet
trigger1 = anim=187
x = 0

;-----------------------------------------------------------------------------
[Statedef 1001]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1056
sprpriority=9

[State 0, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 0, PosSet]
type = Posset
trigger1 = frontedgebodydist <10&& time=0
x = 150*facing
;ignorehitpause = 
;persistent = 

[State 195, Ya Ta De!]
type = PlaySnd
trigger1 =time=8
value = S9,5
channel=3
[State 0, Helper]
type = Helper
trigger1 = time=8
helpertype = normal ;player
name ="shield"
ID = 1005
stateno = 1005
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = time=8
helpertype = normal ;player
name ="Hadouken"
ID = 1002
stateno = 1002
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0


[State 0, Helper]
type = Helper
trigger1 = time=16
trigger2 = time=26
trigger3 = time=34
helpertype = normal ;player
name ="Hadouken"
ID = 1002
stateno = 1002
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0


[State 0, Helper]
type = Helper
trigger1 = time=21
trigger2 = time=30
trigger3 = time=38
helpertype = normal ;player
name ="Hadouken"
ID = 1002
stateno = 1003
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0




[State 0, Helper]
type = Helper
trigger1 = time=42
helpertype = normal ;player
name ="Hadouken"
ID = 1002
stateno = 1004
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

[State 0, VarSet]
type = Varadd
trigger1 = time=8
trigger2 = time=16
trigger3 = time=21
trigger4 = time=26
trigger5 = time=30
trigger6 = time=34
trigger7 = time=38
trigger8 = time=42
v = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 


;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=10
value = 1
scale = .73,1.72
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=11
value = 1
scale = .9,1.9

[State 0, Trans]
type = Trans
trigger1 = time=42
trans = addalpha;, sub
alpha = 175,250
[State 0, Trans]
type = Trans
trigger1 = time=43
trans = addalpha;, sub
alpha = 150,250
[State 0, Trans]
type = Trans
trigger1 = time=44
trans = addalpha;, sub
alpha = 125,250
[State 0, Trans]
type = Trans
trigger1 = time=45
trans = addalpha;, sub
alpha = 100,250
[State 0, Trans]
type = Trans
trigger1 = time=46
trans = addalpha;, sub
alpha = 75,250
[State 0, Trans]
type = Trans
trigger1 = time=47
trans = addalpha;, sub
alpha = 50,250
[State 0, Trans]
type = Trans
trigger1 = time=48
trans = addalpha;, sub
alpha = 25,250
[State 0, Trans]
type = Trans
trigger1 = time=49
trans = addalpha;, sub
alpha = 10,250

[State 210, 5]
type = destroyself
trigger1 = time=50

;-----------------------------------------------------------------------------
[Statedef 1002]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1057
sprpriority = parent,var(0)
 ;none, add, addalpha, add1, sub
;alpha = 256,256
;ignorehitpause = 
;persistent = 
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1002
[State 0, VarSet]
type = Varadd
trigger1 = 1
v = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

;=======================================;

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


[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=0
value = 1
scale = .87,.43
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=1
value = 1
scale = .8,.59
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=2
value = 1
scale = .73,.79
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=3
value = 1
scale = .87,1.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=4
value = 1
scale = .72,1.54
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=5
value = 1
scale = .87,1.64
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=6
value = 1
scale = .72,1.77

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=7
value = 1
scale = .9,1.88

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=8
value = 1
scale = .72,1.48

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=9
value = 1
scale = .86,1.63
;ignorehitpause = 
;persistent = 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=10
value = 1
scale = .73,1.72
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=11
value = 1
scale = .9,1.9

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = p2stateno=[10003,10006]
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

[State 210, 2]
type = HitDef
trigger1 =  !movecontact&&p2stateno!=[10003,10006]
attr = S, SP
animtype  = Medium
damage    = ceil(20*(root,fvar(2))),12
guardflag = MA
hitflag=MAFD
pausetime =4,4
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = 0,ceil(p2bodydist y)-25
nochainid=3000
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = ifelse(root,numexplod(1010)>=3,8,24-ceil(ifelse(root,numexplod(1010)>1,root,numexplod(1010)*8,0)))
ground.velocity = -1.5,-5
air.velocity = -1.5,-7
air.hittime=ifelse(root,numexplod(1010)>=3,8,24-ceil(ifelse(root,numexplod(1010)>1,root,numexplod(1010)*8,0)))
down.hittime=ifelse(root,numexplod(1010)>=3,8,24-ceil(ifelse(root,numexplod(1010)>1,root,numexplod(1010)*8,0)))
fall.recover =0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.53
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
triggerall=root,numhelper(10009)=0
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203]) &&p2stateno!=[10003,10006]
value =202
ID =200
ignorehitpause =1
[State 0, TargetState]
type = TargetState
triggerall=root,numhelper(10009)=1
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203]) &&p2stateno!=[10003,10006]
value =ifelse((helper(10009),stateno=10002&&helper(10009),vel y!=0&&helper(10009),anim=10002),10003,202)
ID =200
ignorehitpause =1
[State 210, 5]
type = destroyself
trigger1 = var(0)=12
;-----------------------------------------------------------------------------
[Statedef 1003]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1057
sprpriority = parent,var(0)
 ;none, add, addalpha, add1, sub
;alpha = 256,256
;ignorehitpause = 
;persistent = 
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1003
[State 0, VarSet]
type = Varadd
trigger1 = 1
v = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

;=======================================;
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=0
value = 1
scale = .87,.43
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=1
value = 1
scale = .8,.59
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=2
value = 1
scale = .73,.79
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=3
value = 1
scale = .87,1.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=4
value = 1
scale = .72,1.54
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=5
value = 1
scale = .87,1.64
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=6
value = 1
scale = .72,1.77

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=7
value = 1
scale = .9,1.88

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=8
value = 1
scale = .72,1.48

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=9
value = 1
scale = .86,1.63
;ignorehitpause = 
;persistent = 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=10
value = 1
scale = .73,1.72
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=11
value = 1
scale = .9,1.9


[State 210, 5]
type = destroyself
trigger1 = var(0)=12
;---------------------------------------------------------------------------------
[Statedef 1004]
type    = S
movetype= I
physics = N
poweradd= 0
juggle=1
ctrl = 0
velset = 0,0
anim =1058
sprpriority = parent,var(0)
 ;none, add, addalpha, add1, sub
;alpha = 256,256
;ignorehitpause = 
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=0
value = 1
scale = .87,.43
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=1
value = 1
scale = .8,.59
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=2
value = 1
scale = .73,.79
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=3
value = 1
scale = .87,1.1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=4
value = 1
scale = .72,1.54
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=5
value = 1
scale = .87,1.64
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=6
value = 1
scale = .72,1.77

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=7
value = 1
scale = .9,1.88

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=8
value = 1
scale = .72,1.48

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=9
value = 1
scale = .86,1.63
;ignorehitpause = 
;persistent = 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=10
value = 1
scale = .73,1.72
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time=11
value = 1
scale = .9,1.9

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

[State 192, end]
type = destroyself
trigger1 =time>11
;---------------------------------------------------------------------------------
[Statedef 1005]
type    = S
movetype= I
physics = N
poweradd= 0
juggle=1
ctrl = 0
velset = 0,0
anim =1059
sprpriority = 0
[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
ignorehitpause = 1
;persistent = 

[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP
forceair = 1
stateno=1008
ignorehitpause = 1
[State 210, 5]
type = destroyself
trigger1 = parent,time>=47 || root,numhelper(1001)=0
;---------------------------------------------------------------------------------
[Statedef 1008]
type    = S
movetype= I
physics = N
poweradd= 0
juggle=1
ctrl = 0
velset = 0,0
anim =1059
sprpriority = 0
[State 0, HitBy]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP
;value2 = S,NA
time = 1
ignorehitpause = 1
[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value =1005
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 
[State 210, 5]
type = destroyself
trigger1 = parent,time>=47|| root,numhelper(1001)=0
;-----------------------------------------------------------------------------
[Statedef 1051]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1016
sprpriority = 3

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

[State 0, Helper]
type = Helper
triggerall = root,numhelper(1053)=0
trigger1 = animelem=2
helpertype = normal ;player
name = "stuff"
ID = 1053
stateno = 1053
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999
size.xscale = root,const(size.xscale)
size.yscale = root,const(size.yscale)
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1011  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1012 
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1013  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1014 
value = -90
ignorehitpause =1 
;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 = root,stateno=3000 ||root,movetype=H ||root,animelem=1 || root,anim=[1005,1006]
;-----------------------------------------------------------------------------
[Statedef 1053]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1015
sprpriority = 2


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

[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, , addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
;persistent = 


[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1011  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1012 
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1013  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1014 
value = -90
ignorehitpause =1 
;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 =root,stateno=3000 ||root,movetype=H || root,animelem=1 || root,anim=[1005,1006]
;-----------------------------------------------------------------------------
[Statedef 1054]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1017
sprpriority = -2

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


[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1011  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1012 
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1013  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1014 
value = -90
ignorehitpause =1 
;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 = root,stateno=3000 ||root,movetype=H ||root,animelem=1 || root,anim=[1005,1006]
;---------------------------------------------------------------------------------
[Statedef 1109]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =1115+root,var(5)
sprpriority = 3

;[State 0, ChangeAnim]
;type = ChangeAnim
;trigger1 = 1
;value = 1115+root,var(5)
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = 1
x = ifelse((p2stateno=[1107,1108]),enemy,pos x,enemy,pos x-8)
y = ifelse((p2stateno=[1107,1108]),((enemy,pos y)+enemy,const(size.mid.pos.y)),(enemy,pos y))
;ignorehitpause = 
;persistent = 



;persistent =
[State 0, DestroySelf]
type = DestroySelf
trigger1 = p2movetype!=H||p2stateno!=1102&&p2stateno!=1105&&p2stateno!=[1107,1108]

;---------------------------------------------------------------------------------
[Statedef 1110]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =1110
sprpriority = 3
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1110

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 = time>0
v = 30  ;fv = 10
value = 1
;=======================================;
[State 0, VarSet]
type = Varadd
triggerall = root,stateno=[1100,1109]
trigger1 = var(30)<16 && vel x >0
v = 0    ;fv = 10
value =1
[State 0, VarSet]
type = Varadd
triggerall = root,stateno=[1100,1109]
trigger1 = var(30)>=16 || vel x <0
v = 0    ;fv = 10
value =-1
[State 0, VarSet]
type = Varset
trigger1 = root,stateno!=[1100,1109]
v = 1    ;fv = 10
value =35
[State 0, VarSet]
type = Varset
trigger1 = root,stateno!=[1100,1109]
v = 1    ;fv = 10
value =-1
[State 0, VarSet]
type = Varadd
trigger1 = root,stateno!=[1100,1109]
v = 2    ;fv = 10
value =1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,stateno!=[1100,1109]
id = 1110+var(1)
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,stateno!=[1100,1109]
id = 1110+var(2)
[State 0, Explod]
type = Explod
trigger1 =  var(30)=0
anim = 1111
ID = 1105
pos = -17,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(30)=16 
ID =1105

pos = -22,0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = movehit||root,stateno!=[1100,1109]
flag = invisible
ignorehitpause=1


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = vel x <0|| root,stateno!=[1100,1109]  
movetype = I  

;CHAINS OF BONDS THAT CANT BE BROKEBN  
[State 0, Explod]
type = Explod
trigger1 =  vel x >0 && numexplod(1111+var(0))=0
anim = 1111
ID = 1111+var(0)
pos = -12,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, VelSet]
type = VelSet
trigger1 = var(30)=0
x =ifelse(root,stateno=1100,8,12.4)*(ifelse(root,var(18),1.5,1))

[State 0, VelSet]
type = VelSet
trigger1 = var(30)=ceil(16/ifelse(root,var(18),1.5,1)) &&!movecontact && root,movetype!=H
x = -vel x
[State 0, VelSet]
type = VelSet
trigger1 =  movecontact&& root,stateno=[1100,1101]
x = -vel x
;ignorehitpause = 
persistent = 0

;ignorehitpause = 
;persistent = 
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numexplod(1111+var(0))>0 && vel x <0
id = 1111+var(0)+1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numexplod(1111+var(0))>0 && vel x <0
id = 1111+var(0)

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = var(30)=32 || var(0)<=0 && var(30)>0
id = 1105

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =numexplod(1111+var(0)+1)>0 && vel x <0
id = 1111
;ignorehitpause = 
;persistent = 
[State 1055, 5]
type = HitDef
triggerall=p2stateno!=1102 ||p2movetype!=H
triggerall = var(30) >1
triggerall = vel x >0

trigger1 = !movecontact
attr = S, SP
animtype  = up
damage    = 30,10
priority  = 7
guardflag = MA
pausetime=3,3
sparkxy = 0,0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,1
guardsound = S3,1

ground.type = High
ground.velocity = -1.5,-10
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =99
guard.ctrltime = 15
air.hittime=99
air.velocity = -1.5,-10
airguard.velocity = -4,-4.5
yaccel=.01
id=100
nochainid=3000
p2stateno=1102
;fall=1
;fall.recover=0
down.bounce=0

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;persistent = 


[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %d"
params = var(0),numexplod(1111)
ignorehitpause = 1
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 =var(30)=100
trigger2=(var(30)=ceil(32/ifelse(root,var(18),1.5,1)) && !movehit&& root,stateno=[1100,1109]) 
trigger3=((var(0)=0 && var(30)>0) && root,stateno=[1100,1109]) && var(2)=0 
trigger4= var(1)<=0 && var(2)>0

;---------------------------------------------------------------------------------
[Statedef 1111]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =1110
sprpriority = 3
[State 0, VarSet]
type = Varadd
triggerall = root,stateno=[1100,1109]
trigger1 = (time=[8,32]) && vel x >0
v = 0    ;fv = 10
value =1
[State 0, VarSet]
type = Varadd
triggerall = root,stateno=[1100,1109]
trigger1 = time>=32|| vel x <0
v = 0    ;fv = 10
value =-1
[State 0, VarSet]
type = Varset
trigger1 = root,stateno!=[1100,1109]
v = 1    ;fv = 10
value =32
[State 0, VarSet]
type = Varset
trigger1 = root,stateno!=[1100,1109]
v = 1    ;fv = 10
value =-1
[State 0, VarSet]
type = Varadd
trigger1 = root,stateno!=[1100,1109]
v = 2    ;fv = 10
value =1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,stateno!=[1100,1109]
id = 1110+var(1)
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,stateno!=[1100,1109]
id = 1110+var(2)
;ignorehitpause = 
;persistent = 

[State 0, Explod]
type = Explod
trigger1 =  time=8
anim = 1111
ID = 1105
pos = -12,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 =  time=8
anim = 1111
ID = 1105
pos = -6,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =time=32
ID =1105

pos = -22,0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = movehit|| root,stateno!=[1100,1109]  
flag = invisible
ignorehitpause=1
;CHAINS OF BONDS THAT CANT BE BROKEBN  
[State 0, Explod]
type = Explod
trigger1 =  vel x >=0 && numexplod(1111+var(0))<2 && time>7
anim = 1111
ID = 1111+var(0)
pos = -18,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 =  vel x >=0 && numexplod(1111+var(0))<2 && time>7
anim = 1111
ID = 1111+var(0)
pos = -12,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, VelSet]
type = VelSet
trigger1 = time=8
x =14*(ifelse(root,var(18),1.5,1))

[State 0, VelSet]
type = VelSet
trigger1 = time=32 &&!movecontact
x = -vel x
[State 0, VelSet]
type = VelSet
trigger1 =  movecontact&& root,stateno=[1103,1104]
x = -vel x
;ignorehitpause = 
persistent = 0

;ignorehitpause = 
;persistent = 
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numexplod(1111+var(0))>0 && vel x <0
id = 1111+var(0)

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=56 || var(0)<=0 && time>0
id = 1105

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =numexplod(1111+var(0)+1)>0 && vel x <0
id = 1111
;ignorehitpause = 
;persistent = 
[State 1055, 5]
type = HitDef
triggerall=p2stateno!=1102 ||p2movetype!=H
triggerall = time >1 && vel x >0
trigger1 = !movecontact
attr = S, SP
animtype  = up
damage    = 30,10
priority  = 7
pausetime=3,3
sparkxy = 0,0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.velocity = -1.5,-10
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =99
guard.ctrltime = 15
air.hittime=99
air.velocity = -1.5,-10
airguard.velocity = -4,-4.5
yaccel=.01
nochainid=3000
id=100
p2stateno=1102
;fall=1
;fall.recover=0
down.bounce=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = vel x <0|| root,stateno!=[1100,1109]  
trigger2 = p2stateno=5040
trigger3 = p2stateno=50 && enemy,vel y <0
movetype = I        ;I,A,H
        ;A,C,S,N
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;persistent = 


[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %d"
params = var(0),numexplod(1111)
ignorehitpause = 1
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 =time=100|| (time=56 && !movehit && root,stateno=[1100,1109]) ||(var(0)=0 && time>8) && root,stateno=[1100,1109] 
;---------------------------------------------------------------------------------
[Statedef 1112]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =1112
sprpriority = 7

[State 0, AngleDraw]
type = AngleDraw
trigger1 =1
value = 45
ignorehitpause =1 
[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime=0
;---------------------------------------------------------------------------------
[Statedef 1113]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =1113
sprpriority = 3

[State 0, AngleDraw]
type = AngleDraw
trigger1 =1
value = 45
ignorehitpause =1 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = movehit
flag = invisible
ignorehitpause=1


[State 0, VelSet]
type = VelSet
trigger1 = time=0
x =7*(ifelse(root,var(18),1.5,1))
y =-7*(ifelse(root,var(18),1.5,1))

;ignorehitpause = 
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =  root,numexplod(1109)=6
flag = unguardable

[State 1055, 5]
type = HitDef
triggerall = root,numexplod(1106)=0
triggerall = time >1
trigger1 = !movecontact
attr = S, SP
animtype  = up
damage    = 50,10
priority  = 4
guardflag = MA
pausetime=3,3
sparkxy = -5,-10
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.velocity = -1.5,-10
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =99
guard.ctrltime = 15
air.hittime=99
air.velocity = -1.5,-10
airguard.velocity = -4,-4.5
yaccel=.01
id=1107
nochainid=3000
p2stateno=1107
;fall=1
fall.recover=0
down.bounce=0

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 


[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %d"
params = var(0),numexplod(1111)
ignorehitpause = 1
;persistent = 
[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
forceair = 1
stateno=1114
ignorehitpause = 1


[State 0, DestroySelf]
type = DestroySelf
trigger1 = ((frontedgedist <= -90 || backedgedist <= -90) && time > 5) || movecontact
;---------------------------------------------------------------------------------
[Statedef 1114]
type    = A
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim =6007
sprpriority = 3

[State 0, DestroySelf]
type = DestroySelf
trigger1 =1
;-----------------------------------------------------------------------------
[Statedef 1155]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1155
sprpriority=3

[State 0, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelemtime(2)>=0&&animelemtime(3)<0 
trigger2 =animelemtime(4)>=0&&animelemtime(4)<0 
trigger3 =animelemtime(6)>=0&&animelemtime(7)<0 
trigger4 =animelemtime(8)>=0&&animelemtime(9)<0 
trigger5 =animelemtime(10)>=0&&animelemtime(11)<0 
trigger6 =animelemtime(12)>=0&&animelemtime(13)<0 
trigger7 =animelemtime(14)>=0&&animelemtime(15)<0 
trigger8 =animelemtime(16)>=0&&animelemtime(17)<0 
value = -7 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelemtime(3)>=0&&animelemtime(4)<0 
trigger2 =animelemtime(5)>=0&&animelemtime(6)<0 
trigger3 =animelemtime(7)>=0&&animelemtime(8)<0 
trigger4 =animelemtime(9)>=0&&animelemtime(10)<0 
trigger5 =animelemtime(11)>=0&&animelemtime(12)<0 
trigger6 =animelemtime(13)>=0&&animelemtime(14)<0 
trigger7 =animelemtime(15)>=0&&animelemtime(16)<0 
trigger8 =animelemtime(17)>=0&&animelemtime(18)<0 
value = 7 
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=1151
v = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=1152
v = 0    ;fv = 10
value = 2
[State 0, Explod]
type = Helper
trigger1 = animelem=19
helpertype = normal ;player
name ="Hadouken"
ID = 1156
stateno = 1156
pos = 1,-25
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(0)=2 && time <60
value = 1155
elem = 1

;persistent = 

[State 0, Explod]
type = Explod
trigger1 = animelem=26
anim = 1156
ID = 1156
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 = (root,const(size.xscale)),(root,const(size.yscale))
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = numhelper(1156)>0 
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time>=196 &&numhelper(1156)=0 || (root,movetype=H && animelemtime(19)<0&& root,stateno!=[120,155])
;-----------------------------------------------------------------------------
[Statedef 1156]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1157
sprpriority=4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 11561

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 = time>0
v = 1  ;fv = 10
value = 1
;=======================================;
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S1,13
;ignorehitpause = 
;persistent = 


[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=1
scale=.4,.4
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=2
scale=.5,.5
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=3
scale=.56,.56
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=4
scale=.62,.62
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=5
scale=.7,.7
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=6
scale=.75,.75
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=7
scale=.8,.8
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=8
scale=.86,.86
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=9
scale=.9,.9
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=10
scale=1,1
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=11
scale=1.08,1.08
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=12
scale=.97,.97
ignorehitpause=1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=0
trigger1 = animelemtime(2)>0
x = 1.8
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=0
trigger1 = animelemtime(10)>0 
y =-3.75*(sin(0.085*time))
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=1
trigger1 = animelemtime(2)>0
x = 1.3
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=1
trigger1 = animelemtime(10)>0 
y =(-7.45+(((var(0)/5.5)*(var(0)/5.5))*.04))*(sin(0.085*var(1)))
ignorehitpause = 1


[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=2
trigger1 = animelemtime(2)>0
x = 6
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=2
trigger1 = animelemtime(10)>0 && animelemtime(10)<80
y =ifelse(p2bodydist y<20,-7,7)
ignorehitpause = 1
[State 0, VarSet]
type = Varadd
trigger1 = var(1)=0
v = 0    ;fv = 10
value = 1

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

;ignorehitpause = 
;persistent = 


[State 210, 2]
type = HitDef
triggerall = root,stateno!=[1100,1105]
trigger1 =  !movecontact 
attr = S, SP
animtype  = Medium
damage    = ceil(20*(root,fvar(2))),5
guardflag = MA
hitflag=MAFD
pausetime =0,4
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = 0,-4
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 8
ground.velocity = -1.5
air.velocity = -4.5,-3
air.hittime=6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.53
nochainid=3000
p2stateno=1159
forcenofall=1
id=200



[State 0, HitBy]
type = HitBy
trigger1 = !movehit
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
ignorehitpause = 1
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 = movehit
value = SCA
;value2 = S,NA
time = 1
ignorehitpause =1 
;persistent = 

[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
forceair = 1
stateno=1157
ignorehitpause = 1


[State 0, DestroySelf]
type = changestate
trigger1 =movehit && enemy,numhelper(5656565656)>0
value=1158
ignorehitpause=1

[State 0, DestroySelf]
type = changestate
trigger1 = ((frontedgedist <= -90 || backedgedist <= -90) && time > 5) || moveguarded
value=1157
;-----------------------------------------------------------------------------
[Statedef 11561]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1157
sprpriority=4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1156

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 = time>0
v = 1  ;fv = 10
value = 1
;=======================================;
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S1,13
;ignorehitpause = 
;persistent = 


[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=1
scale=.4,.4
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=2
scale=.5,.5
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=3
scale=.56,.56
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=4
scale=.62,.62
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=5
scale=.7,.7
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=6
scale=.75,.75
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=7
scale=.8,.8
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=8
scale=.86,.86
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=9
scale=.9,.9
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=10
scale=1,1
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=11
scale=1.08,1.08
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=12
scale=.97,.97
ignorehitpause=1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=0
trigger1 = animelemtime(2)>0
x = 1.8
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=0
trigger1 = animelemtime(10)>0 
y =-3.75*(sin(0.085*time))
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=1
trigger1 = animelemtime(2)>0
x = 1.3
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=1
trigger1 = animelemtime(10)>0 
y =(-7.45+(((var(0)/5.5)*(var(0)/5.5))*.04))*(sin(0.085*var(1)))
ignorehitpause = 1


[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=2
trigger1 = animelemtime(2)>0
x = 6
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = parent,var(0)=2
trigger1 = animelemtime(10)>0 && animelemtime(10)<80
y =ifelse(parentdist y<20,-7,7)
ignorehitpause = 1
[State 0, VarSet]
type = Varadd
trigger1 = var(1)=0
v = 0    ;fv = 10
value = 1

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

;ignorehitpause = 
;persistent = 


[State 210, 2]
type = HitDef

trigger1 =  !movecontact 
attr = S, SP
affectteam=f
animtype  = Medium
damage    = ceil(20*(root,fvar(2))),5
guardflag = MA
hitflag=MAFD
pausetime =0,4
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = 0,-4
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 8
ground.velocity = -1.5
air.velocity = -4.5,-3
air.hittime=6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.53
nochainid=3000
p2stateno=1159
forcenofall=1
id=200



[State 0, HitBy]
type = HitBy
trigger1 = !movehit
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
ignorehitpause = 1
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 = movehit
value = SCA
;value2 = S,NA
time = 1
ignorehitpause =1 
;persistent = 

[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
forceair = 1
stateno=1157
ignorehitpause = 1


[State 0, DestroySelf]
type = changestate
trigger1 =movehit && root,numhelper(5656565656)>0
value=1158
ignorehitpause=1

[State 0, DestroySelf]
type = changestate
trigger1 = ((frontedgedist <= -90 || backedgedist <= -90) && var(1) > 5) || moveguarded
value=1157
;-----------------------------------------------------------------------------
[Statedef 1157]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1157
velset=0,0
sprpriority=4

[State 0, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 =1
scale=1-(.0625*time),1
ignorehitpause=1

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

;-----------------------------------------------------------------------------
[Statedef 1158]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1158
velset=0,0
sprpriority=9
[State 0, Turn]
type = Turn
trigger1 = time=0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =prevstateno=11561 
v = 10    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

[State 210, 2]
type = HitDef
triggerall = var(10)=0
triggerall = enemy,numhelper(5656565656)>0 
trigger1 =1
attr = A, HT
damage =0
guardflag = MA
hitflag=MAFD
pausetime = 0,0
hitsound = -1
sparkno = -1
priority=7
guard.sparkno = -1
guardsound = S5,0
sparkxy = 0,0
ground.type = High
ground.slidetime =0
guard.ctrltime = 0
ground.hittime  = 0
down.velocity=0,0
ground.velocity =  0,0
air.velocity = 0,0
guard.velocity = 0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
numhits=0
p2stateno=565657
[State 210, 2]
type = HitDef
triggerall = var(10)=1
triggerall = root,numhelper(5656565656)>0 
trigger1 =1
attr = A, HT
damage =0
affectteam=f
guardflag = MA
hitflag=MAFD
pausetime = 0,0
hitsound = -1
sparkno = -1
priority=7
guard.sparkno = -1
guardsound = S5,0
sparkxy = 0,0
ground.type = High
ground.slidetime =0
guard.ctrltime = 0
ground.hittime  = 0
down.velocity=0,0
ground.velocity =  0,0
air.velocity = 0,0
guard.velocity = 0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
numhits=0
p2stateno=565658
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =time>3
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=1
scale=1,1
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=2
scale=1.08,1.08
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=3
scale=.97,.97
ignorehitpause=1
[State 0, PosSet]
type = PosSet
trigger1 = time=0;&& p2statetype=A
y = cond(var(10),(root,pos y),(enemy,pos y)) -10
[State 0, VarSet]
type = VarSet
trigger1 = var(0)=1
v = 0    ;fv = 10
value =0
[State 0, PosSet]
type = PosSet
trigger1 = enemy,time=1&& p2statetype!=A && var(0)=1&& !var(10)
y = (enemy,pos y) -10

[State 0, PosSet]
type = PosSet
trigger1 = root,time=1&& root,statetype!=A && var(0)=1&& var(10)
y = (root,pos y) -10

[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A&&!var(10) || root,statetype=A&&var(10)
v = 0    ;fv = 10
value =1
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = pos y >0
y = cond(var(10),(root,pos y),(enemy,pos y)) -10

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = cond(var(10),(root,pos x),(enemy,pos x))
;ignorehitpause = 
;persistent = 
[State 0, PosAdd]
type = PosAdd
trigger1 = enemy,pos y !=0&&!var(10) ;&& enemy,vel y <0
y = (enemy,vel y)
[State 0, PosAdd]
type = PosAdd
trigger1 = enemy,pos y !=0 &&var(10);&& enemy,vel y <0
y = (root,vel y)

;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = 1
y =-1.75*(sin(0.065*time))
ignorehitpause = 1
[State 0, DestroySelf]
type =changestate
trigger1= time=180
value=1157
;-----------------------------------------------------------------------------
[Statedef 1159]
type    = U
movetype= H
physics = N
juggle  = 0
poweradd= 0
sprpriority=4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=0 && statetype!=A 
value = 5000

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=0 && statetype!=A 
value = 5030
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 =1 
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name ="HAITHEREJUSTGONNADRAINYAPOWERANDWUTNOT"
ID =5656565656
stateno = 5000
pos = -5,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 90
pausemovetime  = 90
ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = time=0
x = ifelse(statetype!=A,-5,-3)
y = ifelse(statetype!=A,0,-5)
;ignorehitpause = 
;persistent = 
[State 0, Gravity]
type = Gravity
trigger1 = statetype=A
;ignorehitpause = 
;persistent = 


[State 0, DestroySelf]
type =selfstate
trigger1= time=5
value=ifelse(statetype=A,5040,0)
ctrl=1


;---------------------------------------------------------------------------------------------------
[Statedef 565657]
type    = A
movetype=I
physics = N
juggle  = 8
poweradd= 0
ctrl = 0
sprpriority = -9
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 0, HitBy]
type = notHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
[State 0, PowerAdd]
type = PowerAdd
trigger1 =1
value = -ifelse((root,powermax>0),(root,powermax/600),0)

[State 0, DestroySelf]
type = destroyself
trigger1 =enemy,numhelper(1155)=0
;---------------------------------------------------------------------------------------------------
[Statedef 565658]
type    = A
movetype=I
physics = N
juggle  = 8
poweradd= 0
ctrl = 0
sprpriority = -9
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 0, HitBy]
type = notHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
[State 0, PowerAdd]
type = PowerAdd
trigger1 =1
value = -ifelse((root,powermax>0),(root,powermax/600),0)

[State 0, DestroySelf]
type = destroyself
trigger1 =root,numhelper(1155)=0
;---------------------------------------------------------------------------------
[Statedef 3001]
type    = S
movetype= A
physics = N
juggle=0
poweradd= 0
ctrl = 0
velset = 0,0
anim =3005
sprpriority =2
[State 0, VarSet]
type = parentVaradd
trigger1 =time=0
v = 23  ;fv = 10
value = 1
persistent=0
ignorehitpause=1
[State 0, VarSet]
type = parentVaradd
trigger1 =movehit
v = 32  ;fv = 10
value = 1
persistent=0
ignorehitpause=1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1
[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AP
;value2 = S,NA
time = 1
ignorehitpause = 1
persistent = 1
[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AP
forceair = 1
stateno=1008

[State 0, VelSet]
type = VelSet
trigger1 =time=0
y =ifelse(random<499,.25,-.25)

[State 0, VelSet]
type = VelSet
trigger1 =!movecontact
x = 18
[State 0, VelSet]
type = VelSet
trigger1 =movecontact
x = 0
y=0



[State -2, Helper]
type = Helper
triggerall=winko
trigger1 = NumHelper(6000) < 1 &&movecontact
helpertype = normal ;player
name = "winko"
ID = 6000
stateno = 6000
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove =999
pausemove = 999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = numhelper(3003)<7
trigger1 = movehit && root,var(32)<7
helpertype = normal ;player
name = "cards"
ID = 3003
stateno = 3003
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove =999
pausemove = 999
ignorehitpause = 1


[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1



[State 0, TargetState]
type = TargetState
trigger1 =movehit &&parent,var(28)=0
value =3002
ID = 3002
;ignorehitpause =
;persistent =
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =parent,var(32)>=37
movetype = I        ;I,A,H


[State 210, 2]
type = HitDef
triggerall =parent,var(32)<37
triggerall = enemy,anim!=1200
triggerall = !winko&&!lose
trigger1 =  !movecontact
attr = S, HA
animtype  = up
hitflag=MAFD
damage    = ifelse(parent,animelemtime(15)<0,14,7),4
guardflag = MA
pausetime =0,0
sparkno = -1
guard.sparkno = S7009
sparkxy = 0,-4
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
air.hittime=7
air.slidetime=6
ground.velocity = 0,0
air.velocity =0,0
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.63
id=3002
nochainid=3002



[State 0, VarSet]
type = parentVaradd
triggerall = parent,var(24)<7
trigger1 =movehit
v = 24    ;fv = 10
value = 1
ignorehitpause =1
persistent =0




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

[State 210, 5]
type = destroyself
trigger1 = (frontedgebodydist <= -15  && time > 0) || moveguarded || (enemy,anim=1200&&enemy,animelemtime(1)>=2)
;trigger2= numhelper(3002)<1&&time>0 && enemynear,stateno!=3002
;--------------------------------------------------------------------------------------------
[Statedef 3002]
type    = A
movetype= H
physics = N
juggle  = 0
poweradd= 0
velset=0,0
sprpriority = 6


[State 0, ChangeAnim2]
type = ChangeAnim
triggerall =!lose
trigger1 = enemy,animelemtime(39)<0
value = 5000
;[State 0, LifeAdd]
;type = LifeAdd
;trigger1 =time=0
;value =
;kill = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = enemy,var(32)>=37
value = SCA
;value2 = S,NA
time = 1



[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =enemy,var(28)=1&& anim!=1200
trigger2= lose&& anim!=1200
value = 1200

[State 0, VelSet]
type = VelSet
trigger1 = enemy,var(28)=1&& anim=1200&&animelemtime(1)=2
trigger2= lose&& anim=1200 &&animelemtime(1)=2
x = -5
y = -6

[State 0, VelAdd]
type = VelAdd
trigger1 =enemy,var(28)=1
trigger2= lose&& anim=1200 &&animelemtime(1)>=1
y = .56

[State 0, SelfState]
type = SelfState
trigger1 =pos y >=0 && (enemy,var(28)=1&& anim=1200&&animelemtime(4)>0)
trigger2=pos y >=0 && (lose&& anim=1200&&animelemtime(4)>0)
value =5100
;-----------------------------------------------------------------------------
[Statedef 3003]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =5334
sprpriority = 6



[State 0, Explod]
type = Explod
trigger1= time=1
anim = ifelse(random<333,1033,ifelse((random=[334,666]),1034,1035))
ID = 1033
pos = -5,-var(10)
postype = p2  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
pausemovetime = 0
scale = .833333333333333333333333333333,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal =1
removeongethit = 0

[State 0, VarSet]
type = VarSet
trigger1 =time=0
v = 10    ;fv = 10
value = 20+(random%60)
;ignorehitpause =
;persistent =


[State 0, Explod]
type = Explod
trigger1=enemy,anim=1200&&enemy,animelemtime(1)=1
trigger2=winko||lose
anim = 6001
pos =  -5,-var(10)
postype = p2  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime = 0
scale = .833333333333333333333333333333,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal =1
removeongethit = 0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1=enemy,anim=1200&&enemy,animelemtime(1)>=1
trigger2=winko||lose
id = 1033

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=root,animelemtime(39)>0||enemy,movetype!=H
trigger2=winko||lose
id = 1033

[State 0, DestroySelf]
type = DestroySelf
trigger1 =root,animelemtime(39)>0||enemy,movetype!=H
trigger2=winko||lose
;ignorehitpause = 1
;persistent =


;===============================
[Statedef 4000]
type = S
movetype = I
physics = S
anim = 6000
sprpriority = -2

[State 9999, Floor]
type = PosSet
trigger1 = 1
X = 0
Y = 0

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




[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .5,.5


[State 9999,Destory self]
type = DestroySelf
trigger1 = parent,stateno!=3000
trigger1 = parent,stateno!=3004
trigger1 = parent,stateno !=3100
trigger1 = parent,stateno !=3101
trigger1 = parent,stateno !=3500
trigger1 = parent,stateno !=3501
trigger1 = parent,stateno !=3800
trigger1 = parent,stateno !=3801
trigger1 = parent,stateno !=4004
trigger1 = parent,stateno !=4005
trigger2 = Winko

;===============================
[Statedef 4001]
type = S
movetype = I
physics = S
anim =6007
;velset =15,0
velset =0,0
sprpriority = 2

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

[State 9999, Explod]
type = Explod
trigger1 = Time = [0,6]
anim = 6002
postype = back
ID = 9009
pos = 0,0
sprpriority = -2
removeongethit = 1
removetime = 1
bindtime=-1
supermovetime = 999
pausemovetime  =999
scale = 1.5 -((time) * 0.15),ifelse(GameHeight=180,1.00,1.5) -((time) * 0.15)
ownpal = 1

[State 9999, Explod]
type = explod
trigger1 = time = 7
anim =6002
postype = back
sprpriority = -2
removeongethit = 1
removetime = 43
pos = 0,0
supermovetime = 999
pausemovetime  =999
scale = .5, ifelse(GameHeight = 180,.4,.5)
vel = -0.15,0
ownpal = 1



[State 9999,Destory self]
type = DestroySelf
trigger1 = time = 45


;-----------------------------------------------------------------------------
[Statedef 3007]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1016
sprpriority = 3
[State 0, PalFXWiz]
type = PalFX
trigger1 = time=0
time = 99
add = 240,60,0
mul = 250,224,120
sinadd = 110,55,85,1
invertall = 0
color = 0
ignorehitpause=1


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

[State 0, Helper]
type = Helper
triggerall = root,numhelper(1053)=0
trigger1 = animelem=2
helpertype = normal ;player
name = "stuff"
ID = 1053
stateno = 3008
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999
size.xscale = root,const(size.xscale)
size.yscale = root,const(size.yscale)
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1011  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1012 
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1013  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1014 
value = -90
ignorehitpause =1 
;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2

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

[State 210, 5]
type = destroyself
trigger1 = root,movetype=H ||root,animelem=1 || root,anim=[1005,1006]
;-----------------------------------------------------------------------------
[Statedef 3008]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =3001
sprpriority = 2


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

[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, , addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
;persistent = 


[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1011  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1012 
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1013  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1014 
value = -90
ignorehitpause =1 
;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 =root,movetype=H || root,animelem=1 || root,anim=[1005,1006]

;-----------------------------------------------------------------------------
[Statedef 3009]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1017
sprpriority = -2

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

[State 0, PalFXWiz]
type = PalFX
trigger1 = time=0
time = 99
add = 240,60,0
mul = 250,224,120
sinadd = 110,55,85,1
invertall = 0
color = 0
ignorehitpause=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1011  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1012 
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1013  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1014 
value = -90
ignorehitpause =1 
;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 = root,movetype=H ||root,animelem=1 || root,anim=[1005,1006]

;-----------------------------------------------------------------------------
[Statedef 3010]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1019
sprpriority = -4


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

;persistent = 

 [State 0, PalFXWiz]
type = PalFX
trigger1 = time=0
time = 99
add = 240,60,0
mul = 250,224,120
sinadd = 110,55,85,1
invertall = 0
color = 0
ignorehitpause=1

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 =root,movetype=H || root,animelem=2 || root,anim=[1005,1006]
;--------------------------------------------------------------------------------------------
[Statedef 3011]
type    = S
movetype=I
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =5334
sprpriority = 2

[State 0, VelAdd]
type = Varset
triggerall= p2statetype != L  && ((p2stateno != [120,199])||(enemy,prevstateno!=[120,199]))
trigger1 =1
v = 13
value= parent,var(12)
ignorehitpause=1
persistent=1


[State 0, VelAdd]
type = Varset
trigger1 = numexplod(9000) =1
trigger2 = p2statetype = L  && ((p2stateno = [120,199])||(enemy,prevstateno=[120,199]))
v = 13
value= 0



[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = 3
trigger1 =p2statetype = L || p2movetype !=H   || (p2stateno = 120)
value = S5100,1
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13)= 3
trigger1 =p2statetype = L || p2movetype !=H   || (p2stateno = 120)
value = S5100,1


[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [4,5]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,2
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [4,5]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,2

[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13)= [6,7]
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
value = S5100,3
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13)= [6,7]
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
value = S5100,3


[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [8,9]
trigger1 = p2statetype = L || p2movetype !=H ||(p2stateno = 120)
value = S5100,4
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [8,9]
trigger1 = p2statetype = L || p2movetype !=H ||(p2stateno = 120)
value = S5100,4

[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [10,29]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,5
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [10,29]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,5


[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [30,39]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,6
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [30,39]
trigger1 = p2statetype = L || p2movetype !=H  ||(p2stateno = 120)
value = S5100,6

[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [40,79]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,8
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [40,79]
trigger1 = p2statetype = L || p2movetype !=H  ||(p2stateno = 120)
value = S5100,8

[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13)= [80,998]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,7
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = [80,998]
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
value = S5100,7


[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13) = 999
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
value = S5100,11
[State 0, PlaySnd]
type = PlaySnd
triggerall =var(13)= 999
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
value = S5100,11





[State 9999, Explod]
type = explod
triggerall =var(13) = 3
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8203
id = 9000
postype =left
sprpriority =2
pos = 160,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = 3
triggerall = teamside = 2
trigger1 =p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8303
postype = left
id = 9000
sprpriority =2
pos = 340,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1

[State 9999, Explod]
type = explod
triggerall =var(13) = [4,5]
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8204
postype =left
id = 9000
sprpriority =2
pos = 160,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = [4,5]
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8304
postype = left
id = 9000
sprpriority =2
pos = 340,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1

[State 9999, Explod]
type = explod
triggerall =var(13) = [6,7]
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8205
id = 9000
postype =left
sprpriority =2
pos = 160,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = [6,7]
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8305
postype = left
sprpriority =2
pos = 330,60
id = 9000
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1

[State 9999, Explod]
type = explod
triggerall =var(13) = [8,9]
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
anim =8206
postype =left
sprpriority =2
pos = 160,60
id = 9000
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = [8,9]
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8306
id = 9000
postype = left
sprpriority =2
pos = 330,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1


[State 9999, Explod]
type = explod
triggerall =var(13) = [10,29]
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
anim =8207
postype =left
sprpriority =2
pos = 160,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = [10,29]
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8307
postype = left
sprpriority =2
pos = 320,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1

[State 9999, Explod]
type = explod
triggerall =var(13) = [30,39]
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
anim =8208
postype =left
sprpriority =2
pos = 160,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = [30,39]
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8308
postype = left
sprpriority =2
pos = 320,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1

[State 9999, Explod]
type = explod
triggerall =var(13) = [40,79]
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
anim =8210
postype =left
sprpriority =2
pos = 160,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = [40,79]
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
anim =8310
postype = left
sprpriority =2
pos = 320,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1


[State 9999, Explod]
type = explod
triggerall =var(13) = [80,998]
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = 120)
anim =8209
postype =left
sprpriority =2
pos = 160,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = [80,998]
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8309
postype = left
sprpriority =2
pos = 320,60
facing = 1
id = 9000
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1

[State 9999, Explod]
type = explod
triggerall =var(13) = 999
triggerall = teamside = 1
trigger1 = p2statetype = L || p2movetype !=H || (p2stateno = 120)
anim =8212
id = 9000
postype =left
sprpriority =2
pos = 160,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall =var(13) = 999
triggerall = teamside = 2
trigger1 = p2statetype = L || p2movetype !=H   || (p2stateno = 120)
anim =8312
id = 9000
postype = left
sprpriority =2
pos = 320,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1



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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = p2statetype = L || p2movetype !=H  || (p2stateno = [120,150])
trigger2 = lose || winko
ignorehitpause=1
persistent=1



;--------------------------------------------------------------------------------------------
[Statedef 3012]
type    = S
movetype=I
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =5334
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 =time = 0
value = S5100,9
[State 0, PlaySnd]
type = PlaySnd
trigger1 =time = 0
value = S5100,9


[State 9999, Explod]
type = explod
triggerall = teamside = 1
trigger1 =time = 0
anim =8211
postype =left
sprpriority =2
pos = 160,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1
[State 9999, Explod]
type = explod
triggerall = teamside = 2
trigger1 =time = 0
anim =8311
postype = left
sprpriority =2
pos = 340,60
facing = 1
bindtime = -1
removeongethit = 1
supermovetime = 99999
scale = .5, .5
vel =0,0
ownpal = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,var(14) = 0
;---------------------------------------------------------------------------------
[Statedef 3021]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0

sprpriority = -5

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3021
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && var(10)=0
value = 3011
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 10    ;fv = 10
value = 1


[State 0, VarSet]
type = Varadd
trigger1 =time>0 
v = 1    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 


;=======================================;

[State 0, PosSet]
type = PosSet
trigger1 = var(1)=0 
x = -320*facing
;ignorehitpause = 
;persistent = 
[State 0, SprPriority]
type = SprPriority
trigger1 =1 
value = -5
ignorehitpause =1 
;persistent = 

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %d"
params = var(0),pos x
ignorehitpause = 1


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =var(1)=0
id = 3012
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;persistent = 
[State 0, Explod]
type = Explod
trigger1 =  var(1)=0

anim =3012
ID = 3012
pos = 9,24
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale =  1.1, 1.05
sprpriority = -4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, VelSet]
type = VelSet
trigger1 = var(1)=0
x = 9.5


[State -2, Helper]
type = Helper
trigger1 = winko&&movehit
triggerall = root,NumHelper(6000) < 1
helpertype = normal ;player
name = "winko"
ID = 6000
stateno = 6000
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove =999
pausemove = 999
ignorehitpause = 1
persistent=0

[State 210, 2]
type = HitDef
triggerall = p2stateno!=3074
trigger1 =  !movecontact
attr = S, HA
animtype  = diagup
damage    = ceil(40*(root,fvar(2))),20
priority  = 4
guardflag = MA
pausetime = 18,18
guard.pausetime=4,4
sparkxy = 25,20
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -5.5,-12
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -5.5,-12
airguard.velocity = -4,-4.5
yaccel=.61
p2stateno=3074
id=3000
forcestand=1
nochainid=3000
forcenofall=0
fall=1
fall.recover=0
down.bounce=0
envshake.time = 12
envshake.ampl = 3
envshake.freq=60

[State 0, Explod]
type = Helper
trigger1 =  var(1)=0
helpertype = normal ;player
name ="backcannon"
ID = 3023
stateno = 3022
pos = -15,49
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
persistent=0
[State 0, Explod]
type = Helper
trigger1 =  var(1)=0
helpertype = normal ;player
name ="frontcannon"
ID = 3022
stateno = 3022
pos = 52,49
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
persistent=0
ignorehitpause=1
[State 0, Explod]
type = Helper
trigger1 = root,numhelper(3027)=1 && root,numhelper(3026)=0
helpertype = normal ;player
name ="Hadouken"
ID = 3026
stateno = 3025
pos = 20,49
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, VarSet]
type = VarSet
trigger1 =  movehit && p2movetype=H
v = 0    ;fv = 10
value = 1
ignorehitpause = 1
persistent =0 


[State 0, ParentVarSet]
type = ParentVarSet
trigger1 =  movehit && p2movetype=H
v =49    ;fv = 
value = 1
ignorehitpause = 1
persistent =0
[State 0, VarSet]
type = VarSet
trigger1 =  moveguarded ||movehit && p2movetype!=H
v = 0    ;fv = 10
value = -1
ignorehitpause = 1
persistent =0 

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(0)=-1 || vel x <0
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = moveguarded ||movehit && p2movetype!=H|| (backedgebodydist>=40) &&!movehit  
x = -vel x
[State 0, VelSet]
type = VelSet
trigger1 = var(0)=-1 
x = -9.5
[State 0, VelAdd]
type = Velset
trigger1 = var(0)=1 && var(1)>0 
x = 0

;ignorehitpause = 
;persistent = 

;[State 0, TargetState]
;type = TargetState
;trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[3074,3076]) &&p2stateno!=[10003,10006]
;value =3074
;ID =3000
;ignorehitpause =1
;persistent=0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = backedgebodydist <-240 && vel x <0&& var(1) >20
id = 3013
;ignorehitpause = 
;persistent = 

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = backedgebodydist <-240&& vel x <0&& var(1) >20
id = 3012
 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = backedgebodydist <-260&& var(1) >20
;---------------------------------------------------------------------------------
[Statedef 3022]
type    = S
movetype= A
physics = N
poweradd= 0
velset=0,0
ctrl = 0
anim =3014
sprpriority = -4

[State 0, BindToParent]
type = BindToParent
trigger1 =IsHelper(3022)  
time = 1
pos = 52,49
;ignorehitpause = 
;persistent = 
[State 0, BindToParent]
type = BindToParent
trigger1 =IsHelper(3023)  
time = 1
pos =-15,49
[State 0, ChangeAnim]
type = ChangeAnim
triggerall =IsHelper(3023) 
trigger3 = var(0)=0&& p2stateno!=[3074,3076]
trigger1=var(0)=0&&enemy, vel y <0&& p2bodydist y <-20&& p2stateno=[3074,3076]
trigger2 = var(0)>=6
trigger4 = parent,vel x !=0
value = 3013
elem = 1
;ignorehitpause = 
;persistent = 

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %d"
params = var(0),p2bodydist y
ignorehitpause = 1
[State 0, ChangeAnim]
type = ChangeAnim
triggerall =IsHelper(3022) 
trigger3 = var(0)=0&& p2stateno!=[3074,3076]
trigger1=var(0)=0&&enemy, vel y <3&& p2bodydist y <-20&& p2stateno=[3074,3076]
trigger2 = var(0)>=6
trigger4 = parent,vel x !=0
value = 3014
elem = 1
[State 0, Explod]
type = Helper
trigger1 = animelem=3 
helpertype = normal ;player
name ="Hadouken"
ID = 3027
stateno = 3023
pos = 42,3
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Explod]
type = Explod
trigger1 =  animelem=3
anim =3016
ID = 3016
pos = 41,2
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 = 1
removeongethit = 1


[State 0, VarSet]
type = Varadd
trigger1 = animelem=3
v = 0    ;fv = 10
value = 1

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = parentVarSet
trigger1 = IsHelper(3023) && var(0)>=6
v = 0    ;fv = 10
value = -1
[State 0, VarSet]
type = parentVarSet
trigger1 = IsHelper(3022) && var(0)>=6
v = 1    ;fv = 10
value = -1
[State 0, DestroySelf]
type = DestroySelf
trigger1 =root,numhelper(3021)=0
;---------------------------------------------------------------------------------
[Statedef 3023]
type    = S
movetype= A
physics = N
poweradd= 0
velset=17,0
ctrl = 0
anim =3015
sprpriority = -3
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 30231
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 10    ;fv = 10
value =3023
;ignorehitpause = 
;persistent = 

;elem = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;=======================================;

[State -2, Helper]
type = Helper
trigger1 = winko&&movehit
triggerall = root,NumHelper(6000) < 1
helpertype = normal ;player
name = "winko"
ID = 6000
stateno = 6000
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove =999
pausemove = 999
ignorehitpause = 1
persistent=0
[State 210, 2]
type = HitDef
trigger1 =  !movecontact
attr = S, HP
animtype  = diagup
damage    = ceil(20*(root,fvar(2))),20
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 4,15
guard.pausetime=4,4
sparkxy = 0,0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,14
guardsound = S3,1
ground.type = High
ground.velocity = -2,-4
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=20
air.velocity = -2,-15.2
airguard.velocity = -4,-4.5
yaccel=.65
id=3001
forcestand=1
nochainid=3001
forcenofall=1
down.bounce=0
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1
value = 0
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && anim!=6001
value = 6001
;elem = 1
ignorehitpause =1 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=6001
x = 0
y = 0
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203]) &&p2stateno!=[10003,10006]
value =202
ID =3001
ignorehitpause =1
[State 0, DestroySelf]
type = DestroySelf
trigger1 =anim=6001 && animtime=0||frontedgebodydist <-100&& time >20
;---------------------------------------------------------------------------------
[Statedef 30231]
type    = S
movetype= A
physics = N
poweradd= 0
velset=cond(var(10)=3023,17,18),0
ctrl = 0
anim =3015
sprpriority = -3
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = var(10)

;elem = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;=======================================;

[State -2, Helper]
type = Helper
trigger1 = winko&&movehit
triggerall = root,NumHelper(6000) < 1
helpertype = normal ;player
name = "winko"
ID = 6000
stateno = 6000
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove =999
pausemove = 999
ignorehitpause = 1
persistent=0
[State 210, 2]
type = HitDef
trigger1 =  !movecontact
attr = S, HP
affectteam=f
animtype  = diagup
damage    = ceil(20*(root,fvar(2))),20
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 4,15
guard.pausetime=4,4
sparkxy = 0,0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,14
guardsound = S3,1
ground.type = High
ground.velocity = -2,-4
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=20
air.velocity = -2,-15.2
airguard.velocity = -4,-4.5
yaccel=.65
id=3001
forcestand=1
nochainid=3001
forcenofall=1
down.bounce=0
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1
value = 0
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && anim!=6001
value = 6001
;elem = 1
ignorehitpause =1 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=6001
x = 0
y = 0
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
trigger1 =root,statetype= A && movehit=1 && (root,stateno!=[201,203]) &&root,stateno!=[10003,10006]
value =202
ID =3001
ignorehitpause =1
[State 0, DestroySelf]
type = DestroySelf
trigger1 =anim=6001 && animtime=0||frontedgebodydist <-100&& time >20
;---------------------------------------------------------------------------------
[Statedef 3024]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =3015
velset=18,0
sprpriority = -7
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 30231
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 10    ;fv = 10
value =3024
;ignorehitpause = 
;persistent = 

;elem = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


;=======================================;
[State -2, Helper]
type = Helper
trigger1 = winko&&movehit
triggerall = root,NumHelper(6000) < 1
helpertype = normal ;player
name = "winko"
ID = 6000
stateno = 6000
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove =999
pausemove = 999
ignorehitpause = 1
persistent=0
[State 210, 2]
type = HitDef
trigger1 =  !movecontact
attr = S, HP
animtype  = diagup
damage    = ceil(10*(root,fvar(2))),20
priority  = 4
guardflag = MA
pausetime = 2,15
guard.pausetime=4,4
sparkxy = 0,0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,14
guardsound = S3,1
ground.type = High
ground.velocity = -2,-5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=20
air.velocity = -2,-17.5
airguard.velocity = -4,-4.5
yaccel=.65
id=3001
forcestand=1
nochainid=3001
forcenofall=1
down.bounce=0

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203]) &&p2stateno!=[10003,10006]
value =202
ID =3001
ignorehitpause =1
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1
value = 0
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact&& anim!=6001
value = 6001
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=6001
x = 0
y = 0

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203]) &&p2stateno!=[10003,10006]
value =202
ID =3001
ignorehitpause =1
[State 0, DestroySelf]
type = DestroySelf
trigger1 =anim=6001 && animtime=0 ||frontedgebodydist <-100&& time >20
;---------------------------------------------------------------------------------
[Statedef 3025]
type    = S
movetype= A
physics = N
poweradd= 0
velset=0,0
ctrl = 0
anim =6007
sprpriority = -4

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
trigger1 = root,var(2)=1&& numhelper(30777)=0
anim =3016
ID = 3016
pos = -5,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 = -6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Helper
trigger1 =  root,var(2)=1 && numhelper(30777)=0
helpertype = normal ;player
name ="Hadouken"
ID = 30777
stateno = 3024
pos = 30,3
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, VarSet]
type = Varset
trigger1 = root,numhelper(30777)=1
v = 0    ;fv = 10
value = 2

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 = root,numhelper(30777)=0 && var(0)>0
v = 0    ;fv = 10
value = -1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,numhelper(3023)=0 || root,movetype=H || root,stateno!=3020 || parent,vel x <0
;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 3074]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
triggerall=selfanimexist(ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype))
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = selfanimexist(anim)
trigger1 = Time > 0
value = anim
 
[State 5020, 4] ;Freeze anim
type = ChangeAnim2
trigger1 = !selfanimexist(anim)
trigger1 = Time > 0
value = anim
[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
triggerall=selfanimexist(5051)
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5051
[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
triggerall=selfanimexist(5051)
trigger1 = Time = 0&& selfanimexist(5047 + GetHitVar(animtype))
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) 


[State 0, PosSet]
type = Posadd
trigger1 = p2stateno=1101 && time=0
y = -enemy,const(size.mid.pos.y)-10

[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3020
value = 1
movecamera=1,0
[State 0, HitBy]
type = HitBy
trigger1 = enemy,stateno=3020
value = SCA,HP
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value =ifelse(p2stateno=3049,675,3075)
;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 3075]
type    = A
movetype= H
physics = N


;persistent = 
[State 0, HitVelSet]
type = HitVelSet
trigger1 = p2stateno!=810&&time=0&&backedgebodydist<30 
x = 0
y = 1
[State 0, HitVelSet]
type = HitVelSet
trigger1 = p2stateno!=810&&time=0&&backedgebodydist>30 
x = 1
y = 1
;ignorehitpause = 
;persistent =
[State 0, Turn]
type = Turn
trigger1 = facing=enemy,facing&time=0
;ignorehitpause =
;persistent =
[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3020
value = 1
movecamera=1,0
[State 0, HitVelSet]
type = VelSet
trigger1 =enemy,stateno=3020&&backedgebodydist <30 
x = 0
[State 0, HitBy]
type = HitBy
trigger1 =1
value = SCA,HP
;value2 = S,NA
time = 1
[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1200
[State 0, PosSet]
type = Posadd
trigger1 = p2stateno=1104 && time=0
y = -enemy,const(size.mid.pos.y)-10


[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .5
[State 0, ChangeState]
type = ChangeState
trigger1 = pos y >=10&& (time >5||p2statetype=A)
value = 3076
;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 3076]
type    = L
movetype= H
physics = N

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 614

[State 0, VelSet]
type = VelSet
trigger1 =1
y = 0
[State 0, PosSet]
type = PosSet
trigger1 =1
y = 0
[State 0, HitBy]
type = HitBy
trigger1 =1
value = SCA,HP
;value2 = S,NA
time = 1

[State 0, VelMul]
type = VelMul
trigger1 =1
x = .95
[State 0, VelSet]
type = VelSet
trigger1 =time>27
x = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = animtime=0 && anim=614
value =5101

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = animtime=0 && anim=5101
value =5110
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !selfanimexist(5101)
trigger1 = animtime=0 && anim=614
value =5110



[State 0, ChangeState]
type = selfState
trigger1 = time>47
value = ifelse(!alive, 5110,5120)
;---------------------------------------------------------------------------------
[Statedef 3052]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =3021
sprpriority = 3

[State 0, ReversalDef]
type = ReversalDef
trigger1 = animelemtime(2)<0
reversal.attr = SCA,AA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = S7005
;sparkxy = 0,0 ;offset
hitsound = S1,3
p1stateno = 3053
p2stateno = 3054
;ignorehitpause = 
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, BindToRoot]
type = BindToRoot
trigger1 =root,movetype!=H 
time = 1
facing = 0
pos = 55,0
ignorehitpause=1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=10 
value = 3021
elem = 11
;ignorehitpause = 
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime=0
;---------------------------------------------------------------------------------
[Statedef 3053]
type    = S
movetype= A
physics = S
poweradd= 0
juggle=0
ctrl = 0
velset = 0,0
sprpriority = 5
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =enemy,anim!=3026 && animelemtime(2)<0
value = 3021
elem = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =enemy,anim=3026
value = 3021
elem = 2
;ignorehitpause = 
persistent =0

[State 0, BindToRoot]
type = BindToRoot
triggerall =( p2stateno=3054|| p2movetype=H) && p2stateno!=[120,155]
trigger1 =root,movetype!=H 
time = 1
facing = 0
pos = 55,0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, TargetBind]
type = TargetBind
trigger1 = time=1
pos = 100,0

[State 0, Explod]
type = Explod
triggerall =( p2stateno=3054|| p2movetype=H) && p2stateno!=[120,155]
trigger1 = animelem=10
anim = 1156
ID = 1156
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 = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Helper
triggerall =( p2stateno=3054|| p2movetype=H) && p2stateno!=[120,155]
trigger1 = animelemtime(10)<145 && animelemtime(10)>0
trigger1 = animelemtime(10)%8=0
helpertype = normal ;player
name ="Hadouken"
ID = 3055
stateno = 3055
pos = 1,-35
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale=.85
size.yscale=.85

[State 0, Explod]
type = Helper
triggerall =( p2stateno=3054|| p2movetype=H) && p2stateno!=[120,155]
trigger1 = animelemtime(10)<145&& animelemtime(10)>0
trigger1 = animelemtime(10)%13=0
helpertype = normal ;player
name ="Hadouken"
ID = 3056
stateno = 3055
pos = 1,-35
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale=.85
size.yscale=.85

[State 0, Explod]
type = Helper
triggerall =( p2stateno=3054|| p2movetype=H) && p2stateno!=[120,155]
trigger1 = animelemtime(10)=145
helpertype = normal ;player
name ="Hadouken"
ID = 3057
stateno = 3055
pos = 1,-35
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale=1
size.yscale=1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 = animtime=0 || p2stateno!=3054 && time=0
;---------------------------------------------------------------------------------
[Statedef 3054]
type    = A
movetype= H
physics = S
poweradd= 0
juggle=0
ctrl = 0
velset = 0,0
sprpriority = 8

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time <50
value = anim
elem = enemy,var(44)
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time >=50 && anim!=3026
value =3026
[State 0, Turn]
type = Turn
trigger1 = facing=enemy,facing && time=0
;ignorehitpause = 
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = ishelper
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = anim=3026
y = 0
;ignorehitpause = 
;persistent = 

;-----------------------------------------------------------------------------
[Statedef 3055]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1157
sprpriority=4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S1,13
channel=5

[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=1
scale=.4,.4
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=2
scale=.5,.5
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=3
scale=.56,.56
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=4
scale=.62,.62
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=5
scale=.7,.7
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=6
scale=.75,.75
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=7
scale=.8,.8
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=8
scale=.86,.86
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=9
scale=.9,.9
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=10
scale=1,1
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=11
scale=1.08,1.08
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=12
scale=.97,.97
ignorehitpause=1
[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(2)>0
x = 3.8

[State 0, Turn]
type = Turn
trigger1 = root,p2bodydist x <-5
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
triggerall = !IsHelper(3057) 
trigger1 = animelemtime(10)>0 && p2bodydist y =[-20,20]
y =(fvar(0))*(sin(0.185*time))-(random*.005)
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = !IsHelper(3057) 
trigger1 = animelemtime(10)>0  && p2bodydist y !=[-20,20]
y =(ifelse(p2bodydist y<20,-3,3)*(sin(0.185*time)))-(random*.005)
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 0    ;fv = 10
value = ifelse(IsHelper(3056),1,-2.75)
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
triggerall = IsHelper(3057) 
trigger1 = animelemtime(1)>0 && animelemtime(10)<0 
y =-1.5
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
triggerall = IsHelper(3057) 
trigger1 = animelemtime(10)>0 
y =ifelse(p2bodydist y<20,-7,7)
ignorehitpause = 1

[State 210, 2]
type = HitDef
triggerall = IsHelper(3055) 
trigger1 =  !movecontact 
attr = S, SP
animtype  = Medium
damage    = 7,5
guardflag = MA
hitflag=MAFD
pausetime =0,7
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = 0,-4
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -1.5
air.velocity = -2.5,-3.5
air.hittime=30
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.53
p2stateno=202
forcenofall=1
kill=0

[State 210, 2]
type = HitDef
triggerall = IsHelper(3056)
trigger1 =  !movecontact &&root,var(2)=1
attr = S, SP
animtype  = Medium
damage    = 5,5
guardflag = MA
hitflag=MAFD
pausetime =0,5
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = 0,-4
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -1.5
air.velocity = -1,-1
air.hittime=30
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.53
p2stateno=202
forcenofall=1
kill=0

[State 210, 2]
type = HitDef
triggerall = IsHelper(3057) 
trigger1 =  !movecontact 
attr = S, SP
animtype  = Medium
damage    = 25,5
guardflag = MA
hitflag=MAFD
pausetime =0,3
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = 0,-4
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -1.5
air.velocity = -4.5,-6
air.hittime=30
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.33
id=3050
p1stateno=3056
p2stateno=3057
forcenofall=1
kill=0


[State 0, HitBy]
type = HitBy
trigger1 = !movehit
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
ignorehitpause = 1
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 = movehit
value = SCA
;value2 = S,NA
time = 1
ignorehitpause =1 
;persistent = 




[State 0, DestroySelf]
type = destroyself
trigger1 = ((frontedgedist <= -90 || backedgedist <= -90) && time > 5)
;-----------------------------------------------------------------------------
[Statedef 3056]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =1158
sprpriority=4


;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = (pos x <=10) && vel x !=0&& root,facing=1 
trigger2 = (pos x >=-10) && vel x !=0&& root,facing=-1 
y = 0
x=0

[State 0, VelSet]
type = VelSet
trigger1 = root,anim=3023
y = 0
x=0
[State 0, VelSet]
type = VelSet
triggerall =  vel x !=0
triggerall = parentdist x <10
trigger1 =  time=0
x = ifelse(parentdist x >10,3,-3)
y=-7



[State 0, VelSet]
type = VelSet
trigger1 =  pos y <-200
y=0

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, Turn]
type = Turn
trigger1 =time=0 
;ignorehitpause = 
;persistent = 
;[State 0, VelSet]
;type = VelSet
;trigger1 = time=0
;x = -vel x

[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=1
scale=1,1
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=2
scale=1.08,1.08
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =animelem=3
scale=.97,.97
ignorehitpause=1

[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
;ignorehitpause = 
;persistent = 

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %f  vel x = %f"
params = pos y,pos x
ignorehitpause = 
;persistent = 

[State 0, TargetBind]
type = TargetBind
trigger1 =1 
time = 1
id = 3050
pos = 20,-enemy,const(size.mid.pos.y)
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 =helper(3057),movehit 
value =1157

;anim =
;ignorehitpause = 
;persistent = 

;---------------------------------------------------------------------------------
[Statedef 3057]
type    = A
movetype= H
physics = S
poweradd= 0
juggle=0
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = 1
value =3025

[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 1
movecamera = 1,1
;ignorehitpause = 
;persistent = 

;---------------------------------------------------------------------------------
[Statedef 3058]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim =3029
velset=15,-15
sprpriority = 2
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S1,10

;abspan = 
;ignorehitpause = 
;persistent = 
[State 0, SprPriority]
type = SprPriority
trigger1 =anim=3028 
value = 9
ignorehitpause = 1
;persistent = 

[State -2, Helper]
type = Helper
trigger1 = winko&&movehit
triggerall = root,NumHelper(6000) < 1
helpertype = normal ;player
name = "winko"
ID = 6000
stateno = 6000
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove =999
pausemove = 999
ignorehitpause = 1
persistent=0
[State 210, 2]
type = HitDef
trigger1 =  !movecontact
attr = S, HP
animtype  = diagup
damage    = 200,20
priority  = 4
guardflag = MA
pausetime = 2,5
guard.pausetime=4,4
sparkxy = 0,0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,14
guardsound = S3,1
ground.type = High
ground.velocity = -2,-5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -2,-11.2
airguard.velocity = -4,-4.5
yaccel=.65
id=3001
forcestand=1
nochainid=3001
forcenofall=1
down.bounce=0

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit && (p2stateno!=[675,676])&& (p2stateno!=3074)
value =3074
ID =3001
ignorehitpause =1
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1
value = 0
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact&& anim!=3028
value = 3028
ignorehitpause=1
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=3028
x = 0
y = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = anim=3028
value = 1
scale=1.2,1.2 
;ignorehitpause = 
;persistent = 


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

;persistent = 
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203]) &&p2stateno!=[10003,10006]
value =202
ID =3001
ignorehitpause =1
[State 0, DestroySelf]
type = DestroySelf
trigger1 =anim=3028 && animtime=0 ||frontedgebodydist <-100&& time >20
;--------------------------------------------------------------------------
[Statedef 4004]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 5334
ctrl = 0
sprpriority = 5

[State 0, VarSet]
type = parentVarSet
trigger1 = time = 0
fv =4   ;fv = 10
value = 1000
[State 0, VarSet]
type = parentVarSet
trigger1 =time=0
v = 18   ;fv = 10
value = 1
[State 0, VarAdd]
type = parentVarAdd
triggerall = parent,fvar(4) >0
trigger1 = 1
fv = 4    ;fv =
value = -ifelse((root,life <= root,floor(lifemax/1.5)&& (root,life > root,floor(lifemax/3.25))),1.8,ifelse((root,life <= root,floor(lifemax/3.25)),1.1,2.5))

[State 0, Explod]
type = Explod
triggerall = teamside = 1
trigger1 =  numexplod(16010) < 1
anim = 13000
ID = 16010
pos = 35,ifelse(GameHeight=180,160,210)
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 1
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0

[State 0, Explod]
type = Explod
triggerall = teamside = 2
trigger1 =  numexplod(16010) < 1
anim = 13000
ID = 16010
pos = 200,ifelse(GameHeight=180,160,210)
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 1
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0


[State 0, Explod]
type = Explod
triggerall = teamside = 2
trigger1 =  numexplod(16011) < 1
anim = 13001
ID = 16011
pos = 259,ifelse(GameHeight=180,162,212)
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 1
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
[State 0, Explod]
type = Explod
triggerall = teamside = 1
trigger1 =  numexplod(16011) < 1
anim = 13001
ID = 16011
pos = 94,ifelse(GameHeight=180,162,212)
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 1
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =1
ID = 16011
removetime = -1
shadow = 0,0,0
ownpal = 1
scale =  (parent,fvar(4) * .0005)

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,fvar(4) <= 0
trigger3 = roundstate !=2
id =16010

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,fvar(4) <= 0
trigger3 = roundstate !=2
id =16011


[State 911, Destroy]
type = destroyself
trigger2 = parent,fvar(4) <= 0
trigger1 = roundstate !=2
;--------------------------------------------------------------------------
[Statedef 4005]
type    = S
movetype= I
physics = S
ctrl = 0
sprpriority =-3

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =1
value = root,anim
elem = root,animelemno(0)
ignorehitpause =0
;persistent =
[State 0, NotHitBy]
type = NotHitBy
trigger1 =1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

[State 0, Trans]
type = Trans
trigger1 =1
trans =  sub;, addalpha, add1, sub
[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
facing = 0
pos = 0,0
;ignorehitpause =
;persistent =

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 1
scale = 1+(sin(.0025*var(10))),1+(sin(.0025*var(10)))
ignorehitpause =0
;persistent =
[State 0, VarSet]
type = Varset
trigger1 =var(10)>=50
v = 11    ;fv = 10
value = 1
ignorehitpause =0
[State 0, VarSet]
type = Varset
trigger1 =var(10)=0
v = 11    ;fv = 10
value =0
ignorehitpause =0
[State 0, VarSet]
type = Varadd
triggerall = var(11)=0
trigger1 =var(10)<50
v = 10    ;fv = 10
value = 1
ignorehitpause =0
[State 0, VarSet]
type = Varadd
triggerall = var(11)=1
trigger1 =var(10)>0
v = 10    ;fv = 10
value = -1
ignorehitpause =0
;ignorehitpause =
;persistent =
[State as, *]
type = assertspecial
trigger1 = 1
flag = NoShadow
flag2 = invisible

[State ai, *]
type = AfterImage
trigger1 = 1
time = 2
trans = add
timegap = 1
framegap = 1
length = 2
PalBright = 128,0,0
PalContrast = 255,0,0
PalAdd = 128,0,0

persistent = 1
ignorehitpause = 1

[State turn, *]
type = Turn
trigger1 = Facing != Root,Facing
;alpha = 256,256
;ignorehitpause =
;persistent =
[State 911, Destroy]
type = destroyself
trigger2 = root,fvar(4) <= 0 && time >50
trigger1 = roundstate !=2

;--------------------------------------------------------------------------
[Statedef 161]
physics = N
velset = 0,0
anim = 5333
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 27

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 161

[State 0, VelMul]
type = VelMul
trigger1 = time > 20
x = .85

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S5,1

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 4003, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
persistent = 1

[State 911, Destroy]
type = destroyself
trigger1 = time >= 13
;--------------------------------------------------------------------------
[Statedef 162]
physics = N
velset = 0,0
anim = 5333
ctrl = 0


[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -4.5

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AP
time = -1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 4003



[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 4003, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
persistent = 1

[State 911, Destroy]
type = destroyself
trigger1 = time >= 30
;--------------------------------------------------------------------------
[Statedef 163]
physics = N
velset = 0,0
anim = 5333
ctrl = 0


[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 4.5

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AP
time = -1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 4003



[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 4003, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
persistent = 1

[State 911, Destroy]
type = destroyself
trigger1 = time >= 30
;---------------------------------------------------------------------------
[Statedef 6000]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 5334
ctrl = 0
sprpriority = 5

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = S4000,1
volume = 200

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =10
value = S4000,0
volume = 255

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =10
value = S4000,0
volume = 255

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =10
value = S4000,0
volume = 255

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =10
value = S4000,0
volume = 255


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nokoslow
flag2 = nomusic
flag3 = nokosnd
ignorehitpause = 1
persistent = 1

[State 11009, dust]
type = Explod
trigger1 = time = 0
anim = 8201
ID = 11009
postype =left
pos = 0,0
bindtime = -1
facing = ifelse(facing = -1, -1,1)
sprpriority = -5
scale = 1,ifelse(GameHeight=180,.75,1)
ownpal = 0
ignorehitpause =1
ontop =0
pausetime = 999
supermovetime = 9999


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


[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale =.025*(time*4),.025*(time*4)
ignorehitpause =1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1 
flag = noshadow
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
;persistent = 

 [State 0, Helper]
type = Helper
trigger1 = time=7;movehit
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7012
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0
;persistent = 

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

;---------------------------------------------------------------------------
[Statedef 7012]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 7011
ctrl = 0
sprpriority = 5


[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale =.05*(time*2),.05*(time*2)
ignorehitpause =1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1 
flag = noshadow
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
;persistent = 

 
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time >9
;---------------------------------------------------------------------------------------------------
[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 1, VarSet]
type = parentVarSet
trigger1 =root,movetype=H 
v = 1    ;fv = 10
value = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
;[State 0, DisplayToClipboard]
;type = DisplayToClipboard
;trigger1 = 1
;text = "var(2) = %d var(3) = %d  vel x = %d movehit= %d"
;params = var(20),((Fvar(13)/fvar(15))*5.0),((Fvar(14)/fvar(15))*5.0),(fvar(15)*5.0)
;ignorehitpause = 1
;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
;dun do anything yet
[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
;oki dok
[State 8, VarSet]
type = VarSet
triggerall = var(13) || root,p2bodydist x= [15,45]
trigger1 = p2stateno=5040
v = 9    ;fv = 10
value = 1
;enough for lights
[State 10, Explod]
type = varset
triggerall = var(10)=0
trigger1 = root,movehit=1 && ((root,stateno=630)) && root,pos y >=-60
trigger2 = root,movehit=1 &&( root,stateno=600) && root,pos y =[-75,-60]
trigger3= root,movehit=1 && (root,stateno=605||root,stateno=610)&& root,pos y =[-85,-70]
v=10
value=1
ignorehitpause = 1
;enough for heavys
[State 0, Explod]
type = varset
triggerall = var(11)=0
trigger1 = root,movecontact=1 && (root,stateno=605||root,stateno=610||root,stateno=600)&& root,pos y >-70
trigger2 = root,movehit=1 && root,stateno=630&& root,pos y >-60
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=611 && 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

;------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 = 


[State 1640, X]
Type = VarSet
trigger1 =  roundstate=2
fvar(13) = (EnemyNear, Pos X - root,Pos X) * Facing
[State 1640, Y]
Type = VarSet
trigger1 =  roundstate=2
fvar(14) = (EnemyNear, pos Y - root,Pos Y)
;1000
[State 1640, Vector Length]
Type = VarSet
trigger1 =  roundstate=2
triggerall= fvar(14)!=0
triggerall= fvar(13)!=0
fvar(15) = Exp(0.5*ln((fvar(13) * fvar(13))+(fvar(14) * fvar(14))))
[State 0, Explod]
type = varset
triggerall = roundstate=2
triggerall = root,numhelper(1111)=0
triggerall = root,movetype!=H
triggerall= fvar(14)!=0
triggerall= fvar(13)!=0
triggerall =((Fvar(14)/fvar(15))*5.0)=[-3,-1.5]
triggerall =((Fvar(13)/fvar(15))*5.0)=[3,5]
trigger1= p2statetype=A && p2stateno!=441

v=20
value=1
ignorehitpause =1
;[State 20, Explod]
;type = varset
;triggerall = var(20)=0
;triggerall = var(17)=0
;triggerall = root,numhelper(1001)=0
;triggerall = root,p2bodydist x >85  || root,movehit
;triggerall = p2stateno!=4999
;triggerall = root,movetype!=H
;triggerall = root,ctrl || root,movehit
;trigger1= root,p2bodydist x>= var(0) && enemy,pos y >=0 && var(0)>-1
;trigger2= root,p2bodydist y >-15&&root,p2bodydist x =[0,75]
;trigger3 = root,movecontact && (root,stateno=435||root,stateno=405 || root,stateno=440||root,anim=206)
;v=20
;value=1
;ignorehitpause =1
;1001

;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

;1001
[State 25, VarSet]
type = VarSet
triggerall = random <249|| root,var(40)>0
triggerall = p2statetype!=A|| p2movetype=H 
trigger1 = ((enemy,movetype !=A)|| root,p2bodydist x >25)&& p2statetype!=L && root,var(40)=0
trigger2 = root,p2bodydist x >=40 && p2stateno=4999&& p2statetype!=L && root,var(40)=0
trigger3 = root,backedgebodydist <20 && p2movetype=A
trigger4 = root,p2bodydist x <10 && p2statetype=A  && root,var(40)=0
trigger5= root,var(40)>0 && ( root,p2bodydist x >60) && root,ctrl
trigger6= root,var(40)=164 && ( root,p2bodydist x >40) && root,ctrl
trigger7= root,var(40)=180 && ( root,p2bodydist x >40) && root,ctrl
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 || p2stateno=4999
v =10
value=0
ignorehitpause = 1
[State 11, RemoveExplod]
type = varset
trigger1 = p2movetype!=H|| p2stateno=4999
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 = 
[State 0, Explod]
type = varset
trigger1= root,statetype!=A
trigger2 = root,var(31)!=0 
v=14
value=0
ignorehitpause =1
[State 0, Explod]
type = varset
trigger1= root,statetype!=A
trigger2 = root,var(31)!=0
v=15
value=0
ignorehitpause =1
[State 16, VarSet]
type = Varset
trigger1 = var(17)=1
trigger2 = root,numhelper(1001)
trigger2=helper(1001),movehit=1
v =16  ;fv = 10
value = 0
ignorehitpause =0
[State 17, VarSet]
type = Varset
trigger1 = var(17)<0 
v = 17   ;fv = 10
value = 0

;230
[State 20, RemoveExplod]
type = varset
triggerall =  roundstate=2
triggerall= fvar(14)!=0
triggerall= fvar(13)!=0
trigger1 = p2statetype!=A || p2movetype=H&&p2stateno=[1107,1108]
trigger2 =((Fvar(14)/fvar(15))*5.0)!=[-3,-1.5]
trigger2 =((Fvar(13)/fvar(15))*5.0)!=[3,5]
;trigger2 = root,stateno=240 || root,anim=205 || root,anim=210 || root,stateno=200 || root,stateno=400 || root,stateno=430    
v = 20
value=0
ignorehitpause = 1

;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,backedgebodydist >20
triggerall = root,var(40)!=164
triggerall = root,var(40)!=180
trigger1 =  enemy,movetype =A
trigger2 = root,p2bodydist x <25 && p2stateno!=4999 && p2statetype!=L && root,var(40)=0
trigger3 = root,p2bodydist x <55 && p2stateno!=4999 && p2statetype=L && root,var(40)=0
trigger4 = p2statetype=A && p2movetype!=H&& root,p2bodydist x <35 && p2statetype!=L && root,var(40)=0
trigger5= root,var(40)=21 && (root,p2bodydist x <0 ) && root,ctrl
v = 25   ;fv = 10
value = 0

[State 42, ParentVarSet]
type = ParentVarSet
trigger1 = var(5)=0
v =42   ;fv = 
value = 0
;-----------

 [State 0, DestroySelf]
type = DestroySelf
trigger1 =roundstate!=2


;----------------------------ASSISTS
[Statedef 10000]
type    =S
movetype= A
physics =N
juggle  = 0
poweradd= 0
anim = 10000
ctrl = 0
sprpriority = 1
[State 0, PosSet]
type = PosSet
trigger1 =time=0 
x = -240*root,facing
y = -140
[State 1028, Vel X]
type = VelSet
trigger1 =time<3
x = (parentdist x/10)

[State 0, VelMul]
type = VelMul
trigger1 =anim=10000
x = .88
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = parentVaradd
trigger1 = time=0
v = 1    ;fv = 10
value = 1

;ignorehitpause = 
;persistent = 
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
;persistent = 
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 =time=0 
v =38     ;fv = 
value = -1
;ignorehitpause = 
;persistent = 

[State 0, VelAdd]
type = VelAdd
trigger1 =anim=10000 
y = .56
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >0 && anim=10000
value = 10001
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 =anim=10005 && animelemtime(18)<0 
x = 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 =anim=10005 && animelemtime(18)>=0 
x = -11
y = -5

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

;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =anim=10001 && animelem=1
trigger2 =  anim=10004 
x = 0
y = 0
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2)>=0 && anim=10001
y = .87 *(ifelse(var(18),2,1))


[State 0, Explod]
type = Explod
trigger1 = animelem = 1 && anim = 10001
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim=10001 && animelemtime(2)<0 &&  (root,movetype=H&& root,stateno!=[120,155])
value = 10005
elem = 1


[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
forceair = 1
stateno=10010

[State 0, VelSet]
type = VelSet
trigger1 = animelem=2 && anim=10001
x =  (p2bodydist x/8)
y=-12.5
[State 0, VelMul]
type = VelMul
trigger1 =anim=10001 && animelemtime(2)>0
x = .88

;ignorehitpause = 
;persistent = 



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = moveguarded && anim=10001
value = 10006
[State 0, VelAdd]
type = VelAdd
trigger1 = anim=10006
y = .57
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelem=1 && anim=10006
x = -1
y = -6
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =  anim=10001 && pos y >=0 && animelemtime(2)>0
value = 10004
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=10006 && pos y >=0
trigger2= animtime=0 && anim=10003 
trigger3= animtime=0 && anim=10004
value = 10005

[State 0, PosSet]
type = PosSet
trigger1 =  anim=10005 && animelemtime(18)<0 
trigger2 =  anim=10004 
y = 0
;ignorehitpause = 
;persistent = 

[State 230, 2]
type = HitDef
triggerall = animelemtime(2)>4 && anim=10001
trigger1=!movecontact
attr = S, SA
animtype  =up
damage    = 0,28
guardflag = MA
hitflag=MAF
guard.pausetime = 12,12
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-64
hitsound   = S1,1
guardsound = S3,1
ground.type = high
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime=5
ground.velocity = -6,-3
air.velocity = -3.5,-4.5
fall.recover=0
fall=1
p1stateno=10002
p2stateno=10003
p2facing=1
nochainid=10
id=10
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = animelem=1 && anim = 10005
value = 4,1

[State 200, 1]
type = PlaySnd
trigger1 = animelem=2 && anim = 10001
value = 4,0
[State 0, DestroySelf]
type = DestroySelf
trigger1 = animelemtime(26)>5 && backedgebodydist <-40 && anim=10005
;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 10002]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
anim =10002
ctrl = 0
sprpriority = 1

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10002
trigger1 = AnimElemtime(1)>=0&&animelemtime(2)<0
pos = -23, -51
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10002
trigger1 = AnimElemtime(2)>=0&&animelemtime(3)<0
pos = -35, -57
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10002
trigger1 = AnimElemtime(3)>=0&&animelemtime(4)<0
pos = -34, -46
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10002
trigger1 = AnimElemtime(4)>=0&&animelemtime(5)<0
pos = -49, -76
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10002
trigger1 = AnimElemtime(5)>=0
pos =-58, -94



[State 0, VelSet]
type = VelSet
triggerall = anim=10002
trigger1 =animelem=2
x = 2
y = -3

[State 0, VelAdd]
type = VelAdd
triggerall = anim=10002
trigger1 =animelemtime(2)>=0
y = .4

[State 0, VelSet]
type = VelSet
trigger1 = anim=10003
x = 0
y = 0
[State 0, PosSet]
type = PosSet
trigger1 =  anim=10003
y = 0
;ignorehitpause =
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 =  pos y >-65 && time <2
y = -65


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && anim=10002 && animelemtime(5)>=0  
value = 10003
[State 0, TargetState]
type = TargetState
trigger1 = anim=10003&& animelem=1
value =10004

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10003
trigger1 = AnimElemtime(1)>=0&&animelemtime(2)<0
pos = -58, -87
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10003
trigger1 = AnimElemtime(2)>=0&&animelemtime(3)<0
pos = 14, -110
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10003
trigger1 = AnimElem=4
pos = 36, -104
[State 0, TargetState]
type = TargetState
triggerall = anim=10003
trigger1 =animelem=4
value =10006

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = anim=10003
trigger1 =animelem=4
value = -35
[State 0, Width]
type = Width
trigger1 =1
edge = 90,0
;value = 0,0
;ignorehitpause =
;persistent =

[State 1051, 3] ;Change state when KFM is close to ground
type = Changeanim
trigger1 = animtime=0 && anim=10003
value = 10005
[State 0, PosSet]
type = PosSet
trigger1 =  anim=10005 && animelemtime(18)<0 
y = 0
;ignorehitpause = 
;persistent = 



[State 0, VelSet]
type = VelSet
trigger1 =anim=10005 && animelemtime(18)<0 
x = 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 =anim=10005 && animelemtime(18)>=0 
x = -11
y = -5
[State 200, 1]
type = PlaySnd
trigger1 = animelem=1 && anim = 10005
value = 4,1
[State 0, DestroySelf]
type = DestroySelf
trigger1 = animelemtime(26)>5 && backedgebodydist <-40 && anim=10005
;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 10003]
type    = A
movetype= H
physics = N
sprpriority = -2
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,0
;ignorehitpause =
;persistent =


;ignorehitpause =
;persistent =
[State 0, SelfState]
type = SelfState
trigger1 = time>70
value =5050
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time=0
value = 10008


;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 10004]
type    = A
movetype= H
physics = N
sprpriority = -2
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time=0
value = 10009

;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 10006]
type =A
movetype = H
physics =N
velset = -6,11
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .63



[State 0, NotHitBy]
type = NotHitBy
trigger1 = Pos Y < 0 && Vel Y <0
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =
[State 821, 4] ;Hit ground
type = changeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1030

;----------------------------ASSISTS
[Statedef 10010]
type    =S
movetype= A
physics =N
juggle  = 0
poweradd= 0
anim = 10005
ctrl = 0
sprpriority = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0
value = 10005
elem =18

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 =anim=10005 && animelemtime(18)>=0 
x = -11
y = -5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animelemtime(26)>5 && backedgebodydist <-40
;----------------------------ASSISTS
[Statedef 10001]
type    =S
movetype= A
physics =N
juggle  = 0
poweradd= 0
anim = 10010
ctrl = 0
sprpriority = 1
[State 0, PosSet]
type = PosSet
trigger1 =time=0 
x = -240*root,facing
y = -140
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =anim!=10010 || (anim=10013 && animelemtime(9)<0)
value = 1
movecamera=1,0

[State 0, ScreenBound]
type = ScreenBound
trigger1 =anim=10010 || (anim=10013 && animelemtime(9)>=0)
value = 0
[State 0, VarSet]
type = parentVaradd
trigger1 = time=0
v = 1    ;fv = 10
value = 2
;ignorehitpause = 
;persistent = 

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 =time=0 
fv =38     ;fv = 
value = -1
[State 4003, PlayerPush]
type = PlayerPush
trigger1 =anim=10010 
value = 0
ignorehitpause = 1
persistent = 1

[State 1028, Vel X]
type = VelSet
trigger1 =time<3
x = (parentdist x/10)
[State 0, VelMul]
type = VelMul
trigger1 =anim=10010
x = .9
[State 0, VelAdd]
type = VelAdd
trigger1 =anim=10010
y = .56
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >0 && anim=10010
value = 10011
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim=10011 && animelemtime(3)<0 &&  (root,movetype=H&& root,stateno!=[120,155])
value = 10013
elem = 9
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim=10011 && animtime=0
value = 10013
[State 0, VelSet]
type = VelSet
trigger1 =anim=10011 && animelemtime(4)<0 
x = 0
y = 0
[State 0, VelSet]
type = VelSet
trigger1 =anim=10011 && animelem=4
x = 5.5
[State 0, VelSet]
type = Velmul
trigger1 =anim=10011 && animelemtime(4)>10
x = .94
[State 0, VelSet]
type = VelSet
trigger1 =anim=10011 && animelemtime(5)=4
x =0
[State 0, VelSet]
type = VelSet
trigger1 =anim=10013 && animelemtime(9)>=0 
x = -11
y = -5

[State 200, 1]
type = PlaySnd
trigger1 = animelem=3 && anim = 10011
value = S4,2
channel=5
[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(2)>0
trigger2 = anim!=10011
value = SCA
;value2 = S,NA
time = 1

;persistent =
[State 0, Width]
type = Width
trigger1 = anim!=10010
edge = 55,0
player = 55,0


[State 0, Explod]
type = Explod
trigger1 = animelem = 1 && anim = 10011
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 1060, 4]
type = HitDef
trigger1 =!movecontact
attr = S, SA
animtype  =up
damage    = 0,5
guardflag = MA
hitflag=MAF
guard.pausetime = 12,12
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-64
hitsound   = S1,1
guardsound = S3,1
ground.type = high
ground.slidetime = 5
ground.hittime  = 5
ground.velocity =-6.5,-8.5
air.velocity = -6.5,-8.5
fall.recover=0
fall=1
p2facing=1
p1stateno=10012
p2stateno=10013
nochainid=1050
ground.cornerpush.veloff=0
id=10
ignorehitpause=1




[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
forceair = 1
stateno=10011


[State 0, DestroySelf]
type = DestroySelf
trigger1 = animelemtime(9)>5 && backedgebodydist <-40 && anim=10013
;----------------------------ASSISTS
[Statedef 10011]
type    =S
movetype= A
physics =N
juggle  = 0
poweradd= 0
anim = 10011
ctrl = 0
sprpriority = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0
value = 10013
elem = 9

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 =anim=10013 && animelemtime(9)>=0 
x = -11
y = -5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animelemtime(9)>5 && backedgebodydist <-40
;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 10012]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
anim =10012
ctrl = 0
sprpriority = 1

;9: 1,4,11,20,26
;-9: 2,8,18,24,29
[State 0, SprPriority]
type = SprPriority
trigger1 =animelem=1
trigger2 =animelem=5
trigger3 =animelem=12
trigger4 =animelem=21
trigger5= animelem=27
value = -1
[State 0, SprPriority]
type = SprPriority
trigger1 =animelem=2
trigger2 =animelem=9
trigger3 =animelem=19
trigger4 =animelem=25
trigger5= animelem=30
value = -9
[State 200, 1]
type = PlaySnd
trigger1 = animelem=2 && anim = 10012
trigger2 = animelem=9 && anim = 10012
trigger3= animelem=18 && anim = 10012
trigger4 = animelem=24 && anim = 10012
value = S4,3
channel=5
[State 200, 1]
type = PlaySnd
trigger1 = animelem=2 && anim = 10012
trigger2 = animelem=9 && anim = 10012
trigger3= animelem=18 && anim = 10012
trigger4 = animelem=24 && anim = 10012
value = S4,5
channel=6
[State 200, 1]
type = PlaySnd
trigger1 = animelem=30 && anim = 10012
value = S4,4
channel=5
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(1) >= 0&&animelemtime(2)<0
pos = 36,0

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(2) >= 0&&animelemtime(3)<0
trigger2 = AnimElemTime(9) >= 0&&animelemtime(10)<0
pos = -((enemynear,const(size.mid.pos.y)))+15,-56

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(3) >= 0&&animelemtime(4)<0
trigger2 = AnimElemTime(10) >= 0&&animelemtime(11)<0
pos = -((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/5))),-58

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(4) >= 0&&animelemtime(5)<0
trigger2 = AnimElemTime(11) >= 0&&animelemtime(12)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))-50,-79

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(5) >= 0&&animelemtime(6)<0
trigger2 = AnimElemTime(12) >= 0&&animelemtime(13)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))-40,-86

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(6) >= 0&&animelemtime(7)<0
trigger2 = AnimElemTime(13) >= 0&&animelemtime(14)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))-45,-87

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(7) >= 0&&animelemtime(8)<0
trigger2 = AnimElemTime(14) >= 0&&animelemtime(15)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))-30,-85

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(8) >= 0&&animelemtime(9)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10))),-77

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(15) >= 0&&animelemtime(16)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/8))),-89

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(16) >= 0&&animelemtime(17)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))+15,-99
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(17) >= 0&&animelemtime(18)<0
pos = -((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))+55,-92

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(18) >= 0&&animelemtime(19)<0
trigger2 = AnimElemTime(24) >= 0&&animelemtime(25)<0
pos = -((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))+55,-93

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(19) >= 0&&animelemtime(20)<0
trigger2 = AnimElemTime(25) >= 0&&animelemtime(26)<0
pos = -((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10))),-88
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(20) >= 0&&animelemtime(21)<0
trigger2 = AnimElemTime(26) >= 0&&animelemtime(27)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))-45,-121
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(21) >= 0&&animelemtime(22)<0
trigger2 = AnimElemTime(27) >= 0&&animelemtime(28)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))-40,-130

[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(22) >= 0&&animelemtime(23)<0
trigger2 = AnimElemTime(28) >= 0&&animelemtime(29)<0
pos = ((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))+25,-100
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 = AnimElemTime(23) >= 0&&animelemtime(24)<0
trigger2 = AnimElemTime(29) >= 0&&animelemtime(30)<0
pos = -((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))+45,-95
[State 810, Bind 1]
type = TargetBind
triggerall = anim=10012
trigger1 =animelem=30
pos = -((enemynear,const(size.mid.pos.y))-ceil((enemynear,const(size.mid.pos.y)/10)))+45,-89

;ignorehitpause =
;persistent =

[State 0, Width]
type = Width
trigger1 =time=0
edge = 90,90

[State 0, VelSet]
type = VelSet
triggerall = anim=10012
trigger1 =animelem=15
y = -4.5
[State 0, VelSet]
type = VelSet
triggerall = anim=10012
trigger1 =animelem=27
y = 0

[State 0, VelAdd]
type = VelAdd
triggerall = anim=10012
trigger1 =animelemtime(31)>0
y = .45

;ignorehitpause =
;persistent =

[State 0, TargetVelSet]
type = TargetVelSet
trigger1 =animelem=30 
x = -8
y = -12.5
id=10
[State 0, TargetState]
type = TargetState
trigger1 =animelem=30 && anim=10012
value =675

;ignorehitpause = 
;persistent = 



[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 =animelem=30 
value = -55
[State 0, Width]
type = Width
trigger1 =1
edge = 90,0
;value = 0,0
;ignorehitpause =
;persistent =

[State 1051, 3] ;Change state when KFM is close to ground
type = Changeanim
trigger1 = pos y>=0 && anim=10012 && animelemtime(30)>0
value = 10013
[State 0, PosSet]
type = PosSet
trigger1 =  anim=10013 && animelemtime(7)<0 
y = 0
;ignorehitpause = 
;persistent = 


[State 0, Helper]
type = Helper
trigger1 = animelem=3 && anim=10012
helpertype = normal ;player
name ="Hadouken"
ID = 10014
stateno = 10014
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale=1.15
[State 0, VelSet]
type = VelSet
trigger1 =anim=10013 && animelemtime(7)<0 
x = 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 =anim=10013&& animelemtime(9)>=0 
x = -11
y = -5
[State 200, 1]
type = PlaySnd
trigger1 = animelem=1 && anim = 10005
value = 4,1
[State 0, DestroySelf]
type = DestroySelf
trigger1 = animelemtime(9)>5 && backedgebodydist <-40 && anim=10013
;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 10013]
type    = A
movetype= H
physics = N
sprpriority = -2
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
;ignorehitpause =
;persistent =

;ignorehitpause =
;persistent =
[State 0, SelfState]
type = SelfState
trigger1 = time>400
value =5050
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time=0
value = 10015
;-----------------------------------------------------------------------------
[Statedef 10014]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
anim =10014
sprpriority = 9


[State 0, BindToRoot]
type = BindToparent
trigger1 =parent,animelemtime(15)<0  
time = -1
pos = 0,-85


[State 0, BindToRoot]
type = BindToparent
trigger1 =parent,animelemtime(15)>=0   
time = -1
pos = 0,-100
;ignorehitpause = 
;persistent = 

[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, , addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
;persistent = 


[State 0, AngleDraw]
type = AngleDraw
trigger1 =parent,animelemtime(15)>=0  
value = -12
ignorehitpause =1 


;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 3
;x = 6

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 2
;x = 4

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = var(2) != 1
;triggerall = var(3) = 1
;x = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, 5]
type = destroyself
trigger1 =parent,animelemtime(30)>=0

;------------------------------------------------------------------------------
[Statedef 11013]
ctrl = 1
anim =12000+(random%3)
velset = 0,0
sprpriority = 9

[State 0, VarSet]
type = parentVarSet
trigger1 = anim = 11001
v = 57
value = 0

[State 0, VarSet]
type = parentVarSet
trigger1 = anim = 11000
v = 57
value = 1
[State 0, VarSet]
type = parentVarSet
triggerall = root,var(59)=1
trigger1 = anim = 12000
v = 57
value = 0

[State 0, VarSet]
type = parentVarSet
triggerall = root,var(59)=1
trigger1 = anim = 12001
v = 57
value = 1

[State 0, VarSet]
type = parentVarSet
triggerall = root,var(59)=1
trigger1 = anim = 12002
v = 57
value = 2
[State 0, VarSet]
type = parentVarSet
trigger1 = 1
v = 59
value = 1


;[State 0, VarRandom]
;type = VarRandom
;triggerall = parent,var(59)=1
;triggerall =parent,var(57)=1
;trigger1 = time =[0,3]
;v =56
;range = 0,2

;[State 0, VarSet]
;type = parentVarSet
;triggerall = parent,var(59)=1
;trigger1 =parent,var(57)=1
;v = 58    ;fv = 10
;value = var(56)

;[State 0, ChangeAnim]
;type = ChangeAnim
;trigger1 =roundno >1
;value = ifelse(parent,var(58)=0,13002,ifelse(parent,var(58)=1,13001,13003))


[State 6000, PlaySnd]
type = Playsnd
trigger1 =parent,command = "down"  || parent,command = "up"
value = 90,11
[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=0
trigger1 = parent,command = "down" && parent,var(57) =0
trigger1 = time > 7
value = 11000

[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=0
trigger1 = parent,command = "down" && parent,var(57) = 1
trigger1 = time > 7
value = 11001
[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=0
trigger1 = parent,command = "up" && parent,var(57) =0
trigger1 = time > 7
value = 11000

[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=0
trigger1 = parent,command = "up" && parent,var(57) = 1
trigger1 = time > 7
value = 11001


[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=1
trigger1 = parent,command = "down" && parent,var(57) =0
trigger1 = time > 7
value = 12001

[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=1
trigger1 = parent,command = "down" && parent,var(57) = 1
trigger1 = time > 7
value = 12002

[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=1
trigger1 = parent,command = "down" && parent,var(57) = 2
trigger1 = time > 7
value = 12000


[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=1
trigger1 = parent,command = "up" && parent,var(57) =0
trigger1 = time > 7
value = 12002

[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=1
trigger1 = parent,command = "up" && parent,var(57) = 1
trigger1 = time > 7
value = 12000

[State 6000, ChangeState]
type = Changeanim
triggerall = root,var(59)=1
trigger1 = parent,command = "up" && parent,var(57) = 2
trigger1 = time > 7
value = 12001


[State 0, Turn]
type = Turn
trigger1 = facing = -1

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





[State 6000, PlaySnd]
type = Playsnd
triggerall = parent,var(58)=0
trigger1 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
trigger2 = roundstate > 1
value = 90,10
[State 6000, PlaySnd]
type = Playsnd
triggerall = parent,var(58)=0
trigger1 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
trigger2 = roundstate > 1
value = 90,10


[State 6000, DestroySelf]
type = destroyself
trigger1 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
trigger2 = roundstate > 1
