;--------------------------------------------------------------------------
[StateDef 199]
type =A
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim =10000
poweradd =0
sprpriority=9
[State 0, Explod]
type = Explod
trigger1= time=0
triggerall = root,var(21)=1 || root,var(21)=2 &&root,var(27)=0 
triggerall = root,var(27)=0|| root,var(21)=2 &&root,var(27)=0 
triggerall = root,var(23)=0 || root,var(6)=2
anim = ifelse(teamside=1,12000,12001)
ID = 7611
pos = ifelse(teamside=1,20,180),130-(root,numhelper(199))
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time=0
triggerall = root,var(27)=1
triggerall = root,var(21)=2
triggerall = p2movetype=H
anim = ifelse(teamside=1,12002,12003)
ID = 7611
pos = ifelse(teamside=1,20,180),130-(root,numhelper(199))
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=1
ignorehitpause=1
[State 0, DestroySelf]
type = DestroySelf
trigger1 = numexplod(7611)<1 && time >1
;------------------------------------------------------------------------------
[Statedef 10008]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim =10000
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 5405
ID = 5404+time
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
pausemovetime = 99
supermovetime=99
scale = .65,.65
sprpriority = cond(ishelper(10007),9,ifelse(vel x >0,9,-9))
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;
;[State 0, ModifyExplod]
;type = ModifyExplod
;trigger1 = 1
;ID =5404+time
;sprpriority = ifelse(vel x >0,9,-9)

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


[State 0, VelSet]
type = VelSet
trigger1 =1
x = (3.5)*(cos(0.45*time))
y= .35




[State 0, DestroySelf]
type = DestroySelf
trigger1 = time=18
;------------------------------------------------------------------------------
[Statedef 10009]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =10000
sprpriority = 2


;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0
[State 0, VarSet]
type = VarSet
trigger1 = (root,anim=3061)
fv = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = (root,anim=3062&&root,animelemtime(5)>0)
fv = 0    ;fv = 10
value = -2.75

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 5405
ID = 5404
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,cond(fvar(0)=1,-4,7.75)*(root,stateno=3060)
accel = 0,0
random = 0,0
pausemovetime = 99
supermovetime=99
scale = .5,.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
[State 0, VelSet]
type = VelSet
trigger1 =root,var(10)=4 
x = -2
[State 0, VelSet]
type = VelSet
trigger1 =root,var(10)=6 
x = 2

[State 0, VelSet]
type = VelSet
trigger1 =root,var(10)=8
y = -cond(fvar(0)=1,5,2)

[State 0, VelSet]
type = VelSet
trigger1 =root,var(10)=2
y = cond(fvar(0)=-2.75,9,2)

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time=18
;------------------------------------------------------------------------------
[Statedef 10010]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =5404
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = time=0
x = 20

[State 0, VelSet]
type = VelSet
trigger1 = p2bodydist x <7
x = ifelse(p2statetype=A&&p2movetype!=H,5.5,2.5)
;ignorehitpause = 
;persistent = 
[State 4003, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
persistent = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time=18
;------------------------------------------------------------------------------
[Statedef 10011]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =5999
sprpriority = 2
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =time=0
id =16010
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =time=0
id =16011
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = time=0
v = 7    ;fv = 
value =ifelse((root,anim=301 || root,anim=306),170,300)
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S3,4
channel = 5



;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = parentVarSet
trigger1 = root,var(10)=6 && root,facing=1
trigger2 = root,var(10)=4 && root,facing=-1
fv = 6    ;fv = 10
value = 1.25
[State 0, VarSet]
type = parentVarSet
trigger1 = root,var(10)!=[4,6]
fv = 6    ;fv = 10
value = 1
[State 0, VarSet]
type = parentVarSet
trigger1 = root,var(10)=6 && root,facing=-1
trigger2 = root,var(10)=4 && root,facing=1
fv = 6    ;fv = 10
value = .75
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = root,var(8)>0
v =  7   ;fv = 
value = root,var(8)

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

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 40    ;fv = 10
value = 20*(random%15)
;ignorehitpause = 
;persistent = 
 [State 0, VarSet]
type = VarSet
trigger1 = 1
v = 41   ;fv = 10
value = -20*(random%11)
[State 0, Helper]
type = Helper
triggerall =  !root,var(53)
trigger1 =  time%4=0
helpertype = normal ;player
name ="Wind"
ID = 10009
stateno = 10009
pos = var(40),var(41)
postype = left
facing = 1
keyctrl = 0
ownpal = 1
pausemovetime=300
supermovetime=300
[State 0, Helper]
type = Helper
triggerall =root,numhelper(10010)=0 && (root,var(10)!=4 && root,var(12)!=6 ||root,var(10)!=6 && root,var(12)!=4) 
trigger1 = root,var(10)=4
trigger2 = root,var(10)=6
helpertype = normal ;player
name ="Wind"
ID = 10010
stateno = 10010
pos = ifelse(root,var(10)=6,0,320),0
postype = left
facing = ifelse(root,var(10)=6,1,-1)
keyctrl = 0
ownpal = 1
size.height=550
ignorehitpause = 1
pausemovetime=300
supermovetime=300
[State 0, Explod]
type = Explod
triggerall = teamside = 1
trigger1 =  numexplod(16010) < 1
anim = 16007
ID = 16010
pos = 35,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
ignorehitpause = 1
[State 0, Explod]
type = Explod
triggerall = teamside = 2
trigger1 =  numexplod(16010) < 1
anim = 16007
ID = 16010
pos = 220,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
ignorehitpause = 1
[State 0, Explod]
type = Explod
triggerall = teamside = 2
trigger1 =  numexplod(16011) < 1
anim = 16008
ID = 16011
pos = 237,211
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 0
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 0, Explod]
type = Explod
triggerall = teamside = 1
trigger1 =  numexplod(16011) < 1
anim = 16008
ID = 16011
pos = 52,211
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 0
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =1
ID = 16011
removetime = -1
shadow = 0,0,0
ownpal = 1
scale =  (fvar(0) * .00165),.75
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 =root,var(7)<=0
trigger2 = root,animelemtime(3)<0 && root,anim=[300,301]
trigger3 = root,animelemtime(3)<0 && root,anim=[305,306]
trigger4 = roundstate !=2

v = 1   ;fv = 10
value = 1
ignorehitpause = 1
;persistent = 
[State 0, StopSnd]
type = StopSnd
trigger1 = var(1)
channel = 5
ignorehitpause = 1
;persistent = 


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =var(1)=1
id =16010
ignorehitpause = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =var(1)=1
id =16011
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = var(1)=1
;------------------------------------------------------------------------------
[Statedef 10012]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =5999
sprpriority = 2
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = time=0
v = 8    ;fv = 
value =120


[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = root,var(8)>0
v = 8    
value = -1
[State 0, Helper]
type = Helper
trigger1 = root,numhelper(10010)=0 && (root,var(10)!=4 && root,var(12)!=6 ||root,var(10)!=6 && root,var(12)!=4) 
helpertype = normal ;player
name ="Wind"
ID = 10010
stateno = 10010
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
size.height=550
pausemovetime=300
supermovetime=300
[State 0, Explod]
type = Explod
triggerall = teamside = 1
trigger1 =  numexplod(16010) < 1
anim = 16007
ID = 16010
pos = 35,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 = 16007
ID = 16010
pos = 220,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 = 16009
ID = 16011
pos = 237,211
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 0
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0
[State 0, Explod]
type = Explod
triggerall = teamside = 1
trigger1 =  numexplod(16011) < 1
anim = 16009
ID = 16011
pos = 52,211
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = .5,.5
ontop = 0
sprpriority = 9
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 =  (fvar(0) * .00165),.75
ignorehitpause=1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =root,var(8)<=0
trigger2 = roundstate !=2
id =16010
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,var(8)<=0
trigger2 = roundstate !=2
id =16011


[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,var(8)<=0
;---------------------------------------------------------------------------------
[Statedef 10001]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =1055
sprpriority = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
ignorehitpause =1 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =1
text = "17 = %d"
params = (var(3))
ignorehitpause =1
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(1011)  
v = 0    ;fv = 10
value = 12
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(1049)  
v = 0    ;fv = 10
value = 20
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(1050)  
v = 0    ;fv = 10
value = 18
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(1051)  
v = 0    ;fv = 10
value = 25
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(1052)  
v = 0    ;fv = 10
value = 18
[State 0, AngleDraw]
type = AngleDraw
trigger1 = ishelper(1011)
value = -ceil((time*10))
scale =1,1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = ishelper(1049)
value = time*-11
scale =1,1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = ishelper(1051)||ishelper(1050)
value = -ceil((time*(8+((root,fvar(5)!=1)*3))))
scale =1,1
ignorehitpause = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(1051)||ishelper(1050)
trigger1=anim!=1058
value = 1058
;elem = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = ishelper(1052)
value = -ceil((time*(10+((root,fvar(5)!=1)*2))))
scale =1,1
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 =1 
trans = add 
ignorehitpause = 1
;persistent = 
[State 0, Explod]
type = Explod
triggerall =  !root,var(53)
trigger1=time=0 && !ishelper(1050) && !ishelper(1051)
anim =1056
ID =1056
pos = -20,-ceil(pos y)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = const(size.xscale)*2,const(size.yscale)*2
sprpriority = 5
removetime=-1
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=0

[State 0, Explod]
type = Explod
triggerall =  !root,var(53)
triggerall = ishelper(1050) || ishelper(1051) || ishelper(1049)
trigger1=root,fvar(5)=1 && root,fvar(6)=1  && time%5=0
trigger2=(root,fvar(5)!=1 || root,fvar(6)!=1) && time%3=0
anim = 8300
ID = 8300
pos = -5,-ceil(pos y)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = -1.5,0
accel = 0,0
random = 0,0
scale = .6,.6
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=1

[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1
v = 1  ;fv = 10
value = 1
ignorehitpause =0 
;persistent = 
[State 0, VarAdd]
type = parentVarAdd
trigger1 =movehit && p2statetype=A
v =4     ;fv =
value = 2
persistent=0
ignorehitpause=1


[State 0, Helper]
type = Helper
trigger1 = movehit=1
triggerall = root,var(21)>0
triggerall = p2movetype=H
triggerall= root,numhelper(199)=0
helpertype = normal ;player
name = "Counter I guess"
ID =199
stateno =199
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = movecontact
v = 15    ;fv = 10
value = 1
ignorehitpause =1 
;persistent = 
[State 1000, 5] ;Opponent near
type = HitDef
triggerall = ishelper(1049)
trigger1 =  1
attr = S, SP
animtype  = Hard
damage    = ceil(20*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 2,2
getpower=0
sparkxy = -24,-0
sparkno =-1
guard.sparkno= S7500
hitsound = S4, 1
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 15
guard.ctrltime=10
ground.velocity = -0
air.velocity = -0,-1
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recovertime=7
ground.cornerpush.veloff=0
ID =200
[State 1000, 5] ;Opponent near
type = HitDef
triggerall = ishelper(1011)
trigger1 =  var(1)<4
attr = S, SP
animtype  = Hard
damage    = ceil(20*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 2,2
getpower=0
sparkxy = -24,-0
sparkno =-1
guard.sparkno= S7500
hitsound = S4, 1
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 15
guard.ctrltime=10
ground.velocity = -0
air.velocity = -0,-1
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recovertime=7
ground.cornerpush.veloff=0
ID =200

[State 1000, 5] ;Opponent near
type = HitDef
triggerall = ishelper(1011)
trigger1 =  var(1)>=4
attr = S, SP
animtype  = Hard
damage    = ceil(23*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 3,3
getpower=0
sparkxy = -24,-0
sparkno =-1
guard.sparkno= S7500
hitsound = S4, 1
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 15
guard.ctrltime=10
ground.velocity = -9*root,fvar(6),-5
air.velocity = -9*root,fvar(6),-5
yaccel=.5
guard.velocity=-8
fall=1
fall.recovertime=7
ground.cornerpush.veloff=0
ID =202
nochainid=202
[State 0, VarSet]
type = parentVarSet
triggerall = ishelper(1011)
trigger1 =  var(1)>=4
v = 19    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, TargetState]
type = TargetState
trigger1 = movehit && (p2stateno!=[1025,1028])&& (p2stateno!=[1045,1048])
value =ifelse(root,fvar(6)>1,1045,1025)
ID = 202
ignorehitpause =0

[State 0, VelSet]
type = VelSet
trigger1 =ishelper(1051) 
x = ifelse(root,fvar(6)>1,7,ifelse(root,fvar(6)<1,0,1.5))
y =ifelse(root,var(10)=2,2,ifelse(root,var(10)=8,-2,0))
;ignorehitpause = 
;persistent = 

[State 1000, 5] ;Opponent near
type = HitDef
triggerall = ishelper(1050) ||ishelper(1051)
trigger1 =  (time%5=0||!var(15)) && (root,fvar(6)=1&&root,fvar(5)=1)&&ishelper(1050)
trigger2 =  (time%3=0||!var(15)) && (root,fvar(6)!=1||root,fvar(6)!=1) &&ishelper(1050)
trigger3 =  (time%3=0||!var(15)) &&ishelper(1051) && (root,fvar(5)<=1||(p2statetype=S||p2statetype=C))
attr = S, SP
animtype  = Hard
damage    = ceil(10*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 2,2
getpower=10,5
sparkxy = -24,-0
sparkno = -1
guard.sparkno= S7500
hitsound = S4, 1
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 16
guard.ctrltime=15
ground.velocity = -2
air.velocity = -3,-2
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recovertime=ifelse(root,var(21)=1,30,ifelse(root,fvar(5)<1,40,7))
ground.cornerpush.veloff=0
ID =200

[State 1000, 5] ;Opponent near
type = HitDef
triggerall = ishelper(1052) && time <16
trigger1 =  (time%3=0||!var(15)) &&(root,fvar(6)=1&&root,fvar(5)=1)
trigger2 = (time%2=0||!var(15)) && (root,fvar(5)!=1||root,fvar(6)!=1) 
attr = S, SP
animtype  = Hard
damage    = ceil(22*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 2,2
getpower=0
sparkxy = -24,-0
sparkno =-1
guard.sparkno= S7500
hitsound = S4, 1
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 15
guard.ctrltime=15
ground.velocity = -0,-1
air.velocity = -0,-1
down.velocity=1.5*root,var(20),-9*root,var(20)
yaccel=.5*root,fvar(5)
guard.velocity=-3
air.fall=1
fall.recovertime=ifelse(root,var(21)=1,30,7)
down.hittime = ifelse(root,var(21)>0,95,70)-ceil((root,numexplod(10101))*10)
ground.cornerpush.veloff=0
ID =200

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = ishelper(1052) && var(3)>6&& (root,fvar(5)!=1||root,fvar(6)!=1) 
trigger2= ishelper(1052) && var(3)>5&&(root,fvar(6)=1&&root,fvar(5)=1)
trigger3= ishelper(1051) &&(root,fvar(5)>1 && (p2statetype=A||p2statetype=L)) && time%3=0
attr = S, SP
animtype  = Hard
damage    = ceil(20*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 2,2
getpower=ifelse(ishelper(1051),5,0)
sparkxy = -24,-0
sparkno = -1
guard.sparkno= S7500
hitsound = S4, 1
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 15
guard.ctrltime=15
ground.velocity = -.3,-ifelse(root,fvar(5)>1,7,10)
air.velocity = -.3,ifelse(ishelper(1051),7,-ifelse(root,fvar(5)>1,8,10))
down.velocity=-.3,ifelse(ishelper(1051),7,-ifelse(root,fvar(5)>1,8,10))
yaccel=.52
guard.velocity=-3
air.fall=1
fall.recovertime=65-ceil(root,numexplod(10001)*4)
down.hittime = 65-ceil(root,numexplod(10001)*4)
ground.cornerpush.veloff=0
ID =203
nochainid=203-ishelper(1051)


[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 0, TargetState]
type = TargetState
trigger1 = movehit=1 && (p2stateno!=[201,203])&& (p2stateno!=[1029,1033])
value =ifelse(ishelper(1051),1033,201)
ID =203
ignorehitpause =1 
[State 0, VarSet]
type = parentVarSet
triggerall = enemy,movetype = H&&(p2stateno!=[120,155])
triggerall =  enemy,gethitvar(hitcount)>1
trigger1= movehit=1
fv =2 ;fv = 10
value = root,fvar(2)*.92
ignorehitpause=0
[State 0, VarSet]
type = Varadd
trigger1 = movehit=1
v = 3   ;fv = 10
value = 1
[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name = "Shield"
ID =10004
stateno =10004
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause=1

[State 0, Helper]
type = Helper
triggerall =  !root,var(53) && p2movetype=H
trigger1 = movehit=1 && root,numhelper(1002+(enemy,gethitvar(hitcount)))=0
helpertype = normal ;player
name = "midspark"
ID = 1002 +(enemy,gethitvar(hitcount))
stateno = 10020
pos = 5,-55
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 25
ignorehitpause=1

[State 0, Helper]
type = Helper
triggerall =  !root,var(53) && p2movetype!=H
trigger1 = movehit=1 && root,numhelper(1002+(enemy,gethitvar(hitcount)))=0
helpertype = normal ;player
name = "midspark"
ID = 1002 +(enemy,gethitvar(hitcount))
stateno = 10020
pos = 35,-55
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 25
ignorehitpause=1
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(3)>=8
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = time=var(0)
value =10002
;anim =
;ignorehitpause = 
;persistent = 

;--------------------------------------------------------------------------------------------
[Statedef 10002]
type    = S
movetype= I
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1056
;ignorehitpause = 
;persistent = 

[State 0, HitBy]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP
;value2 = S,NA
time = 1
ignorehitpause = 1
persistent = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -ceil(time*10)
scale =1+((time*4)*.01),1+((time*4)*.01)
 

[State 1010, 2]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

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

[State 0, Explod]
type = Explod
triggerall =  !root,var(53)
trigger1=time=0&& !ishelper(1050) && !ishelper(1051)
anim =1057
ID =1056
pos = -20,-ceil(pos y)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = -3,0
accel = 0,0
random = 0,0
scale = const(size.xscale)*2,const(size.yscale)*2
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=0

;[State 1060, 1]
;type = AssertSpecial
;trigger1 = Time
;flag = Invisible
[State 0, Trans]
type = Trans
trigger1 = time=1
trans = addalpha;, sub
alpha = 175,250
[State 0, Trans]
type = Trans
trigger1 = time=2
trans = addalpha;, sub
alpha = 150,250
[State 0, Trans]
type = Trans
trigger1 = time=3
trans = addalpha;, sub
alpha = 125,250
[State 0, Trans]
type = Trans
trigger1 = time=4
trans = addalpha;, sub
alpha = 100,250
[State 0, Trans]
type = Trans
trigger1 = time=5
trans = addalpha;, sub
alpha = 75,250
[State 0, Trans]
type = Trans
trigger1 = time=6
trans = addalpha;, sub
alpha = 50,250
[State 0, Trans]
type = Trans
trigger1 = time=7
trans = addalpha;, sub
alpha = 25,250
[State 0, Trans]
type = Trans
trigger1 = time=8
trans = addalpha;, sub
alpha = 10,250


[State 1002, Destroy]
type = destroyself
trigger1 = time = 8
;--------------------------------------------------------------------------------------------
[Statedef 10003]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority =5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = (root,anim=[1000,1001]) && anim!=1003
value = 1003
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,anim=1006 && anim!=1007
value = 1007
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

;flag = unguardable

[State 0, AngleDraw]
type = AngleDraw
trigger1 =  1
value = 1
[State 0, AngleSet]
type = AngleSet
trigger1 =root,anim=[1000,1001] 
value = 270
;ignorehitpause = 
;persistent = 
[State 0, AngleSet]
type = AngleSet
trigger1 =root,anim=1006
value = -90
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
ignorehitpause =1 
;persistent = 


[State 0, BindToRoot]
type = BindToRoot
trigger1 =  root,anim=1000
time = 1
facing = 1
pos = 16,-45
[State 0, BindToRoot]
type = BindToRoot
trigger1 =  root,anim=1001
time = 1
facing = 1
pos = 10,-25
[State 0, BindToRoot]
type = BindToRoot
trigger1 =  root,anim=1006
time = 1
facing = 1;
pos = 0,-65
;ignorehitpause = 
;persistent = 

;scale = 
;ignorehitpause = 
;persistent = 
[State 1002, Destroy]
type = destroyself
trigger1 = animtime = 0 || root,anim!=1006&&root,anim!=[1000,1001]
;--------------------------------------------------------------------------------------------
[Statedef 10004]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 0
anim=1056
ctrl = 0
velset = 0,0
sprpriority =5

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

[State 0, BindToParent]
type = BindToParent
trigger1 = root,numhelper(1050) || root,numhelper(1051)||root,numhelper(1052) 
time = 1
facing = 1
pos = 0,0
ignorehitpause =1 
;persistent = 

[State 1002, Destroy]
type = destroyself
trigger1 = !root,numhelper(1050) && !root,numhelper(1051)&&!root,numhelper(1052)
;--------------------------------------------------------------------------
;spark
[StateDef 10020]
type = A
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =7015
poweradd =0
sprpriority=9

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


[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value =30*var(0)
scale=.3-(time*.06),.15*(time*2.25)
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1


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


[State 192, end]
type = destroyself
trigger1 = time>=14

;--------------------------------------------------------------------------
;Ice helper
[StateDef 1056]
type = A
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =root,anim
poweradd =0
sprpriority=-5
[State 0, SprPriority]
type = SprPriority
trigger1 = root,anim=3061 || root,anim=3062
value = 3
;ignorehitpause = 
;persistent = 

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


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

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


[State 0, AngleDraw]
type = AngleDraw
trigger1 = time>0
scale=1+(time*.02),1+(time*.04)
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 =  time<7
trans = add ;none, add, addalpha, add1, sub
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=7
trans = addalpha;, sub
alpha = 175,250
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=8
trans = addalpha;, sub
alpha = 150,250
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=9
trans = addalpha;, sub
alpha = 125,250
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=10
trans = addalpha;, sub
alpha = 100,250
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=11
trans = addalpha;, sub
alpha = 75,250
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=12
trans = addalpha;, sub
alpha = 50,250
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=13
trans = addalpha;, sub
alpha = 25,250
ignorehitpause = 1
[State 0, Trans]
type = Trans
trigger1 = time=14
trans = addalpha;, sub
alpha = 10,250
ignorehitpause = 1

[State 192, end]
type = destroyself
trigger1 = time>=15


;--------------------------------------------------------------------------
[StateDef 3001]
type =A
movetype=A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =3001
poweradd =0
sprpriority=9
[State 0, SprPriority]
type = SprPriority
trigger1 =1 
value = 5
ignorehitpause =1 
;persistent = 

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


[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "p2bodydist x = %f  vel x = %f"
params =p2bodydist x,vel x
ignorehitpause =1 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0 
value = S3,5
channel = 4
[State 0, Explod]
type = Explod
triggerall = !root,var(45)
trigger1=time%5=0 && !movehit
trigger2=time%11=0 && movehit
anim =1057
ID =1056
pos = -30,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale =const(size.xscale)*1.25,const(size.yscale)*1.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=0
[State 0, Explod]
type = Explod
triggerall = !root,var(45)
trigger1=time%5=0 && !movehit
trigger2=time%11=0 && movehit
anim =1057
ID =1056
pos = 30,0
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = const(size.xscale)*1.25,const(size.yscale)*1.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=0
[State -2, Helper]
type = Helper
trigger1= winko && movehit
triggerall = 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 = 0
supermovetime =999
pausemovetime = 999
ignorehitpause = 1
persistent=0
[State 0, Helper]
type = Helper
triggerall = movehit=1
triggerall = root,var(21)=1
triggerall = root,var(23)=0
triggerall = p2movetype=H
trigger1 = root,numhelper(199)=0
helpertype = normal ;player
name = "Counter I guess"
ID =199
stateno =199
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = -1
keyctrl = 0
ownpal = 1
ignorehitpause=0

[State 0, Helper]
type = Helper
trigger1 =p2stateno!=3002 && time%5=0
helpertype = normal ;player
name ="Wind"
ID = 10010
stateno = 30001
pos = 170,0
postype = p1
facing = -1
keyctrl = 0
ownpal = 1
size.height=550
ignorehitpause = 1
pausemovetime=300
supermovetime=300
[State 0, Helper]
type = Helper
trigger1 =p2stateno!=3002 && time%5=0
helpertype = normal ;player
name ="Wind"
ID = 10010
stateno = 30001
pos = -170,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.height=550
ignorehitpause = 1
pausemovetime=300
supermovetime=300

[State 0, NotHitBy]
type = notHitBy
trigger1 =1 
value = SCA
;value2 = S,NA
time = 1
[State 0, VarSet]
type = parentVarSet
triggerall = root,var(21)<2  && root,var(2)=0
trigger1 = time=0 && root,var(21)=1
v = 21   ;v = 570
value = 0
ignorehitpause =1



[State 0, VelSet]
type = VelSet
trigger1 = var(1)=0 && p2stateno!=3002 &&  frontedgebodydist >25
x = 5*root,fvar(6)

[State 0, VelSet]
type = VelSet
trigger1 = var(1)>0 || p2stateno=3002 || frontedgebodydist <25
x = 0
;ignorehitpause = 
;persistent = 

[State 0, Helper]
type = Helper
Trigger1 = time=0
helpertype = normal ;player
name ="shield"
ID = 3002
stateno = 3006
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

;[State 0, ParentVarSet]
;type = ParentVarSet
;trigger1 = 1
;v = 11   ;fv = 

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = p2statetype=A
flag = unguardable


[State 1000, 5] ;Opponent near
type = HitDef
trigger1 =   ((p2stateno!=[140,153])||p2stateno!=[120,132])
attr = S, HP
animtype  = diagup
air.animtype= diagup
damage    =0, 0
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 1,1
getpower=0
sparkxy = 0,-65
sparkno =-1
guard.sparkno= S7500
hitsound = S300, 2
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 35
guard.ctrltime=10
ground.velocity = -5.5
air.velocity = -8,-4.5
down.velocity=-4,0
yaccel=.48
guard.velocity=-4
fall=1
fall.recover=0
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
ID =3001
nochainid=3001
envshake.time =8
envshake.ampl = 7
envshake.freq=85
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = p2stateno=30002
trigger2= var(1)>0
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

[State 200, 1]
type = PlaySnd
trigger1 =movehit
value = 200, 26
channel=0
persistent=0

[State 0, VarSet]
type = parentVarSet
triggerall = enemy,movetype = H&&(p2stateno!=[120,155])
trigger1= movehit=1
fv =2 ;fv = 10
value = root,fvar(2)*.75
ignorehitpause=1
persistent=0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit && (p2stateno!=3002)
value =3002
ID =3001
persistent=0
ignorehitpause =1 
[State 0, TargetBind]
type = TargetBind
trigger1 = enemy,time=1
id = 3001
pos = -40,0
persistent=0
[State 0, VarSet]
type = Varadd
trigger1 =time>30 && p2stateno!=3002
v = 1   ;fv = 10
value = 1
ignorehitpause=0
[State 0, Trans]
type = Trans
trigger1 =  p2stateno=3002
trans = addalpha;, sub
alpha = 150,250
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>30&& p2stateno!=3002
;value =  (winmugen only)
scale =  1-(var(1)*.09),1
ignorehitpause=0
[State 0, Trans]
type = Trans
trigger1 = var(1)=1
trans = addalpha;, sub
alpha = 175,250
[State 0, Trans]
type = Trans
trigger1 =  var(1)=2
trans = addalpha;, sub
alpha = 150,250
[State 0, Trans]
type = Trans
trigger1 =  var(1)=3
trans = addalpha;, sub
alpha = 125,250
[State 0, Trans]
type = Trans
trigger1 =  var(1)=4
trans = addalpha;, sub
alpha = 100,250
[State 0, Trans]
type = Trans
trigger1 =  var(1)=5
trans = addalpha;, sub
alpha = 75,250
[State 0, Trans]
type = Trans
trigger1 =  var(1)=6
trans = addalpha;, sub
alpha = 50,250
[State 0, Trans]
type = Trans
trigger1 =  var(1)=7
trans = addalpha;, sub
alpha = 25,250
[State 0, Trans]
type = Trans
trigger1 =  var(1)=8
trans = addalpha;, sub
alpha = 10,250


[State 192, end]
type = destroyself
trigger1 =  var(1)=9
;--------------------------------------------------------------------------
[StateDef 3002]
type =A
movetype=H
physics = N
juggle  =0
velset = 0,0
ctrl = 0
poweradd =0
sprpriority=9
[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = time=0
value = 1029
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
;ignorehitpause = 
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 
[State 0, SprPriority]
type = SprPriority
trigger1 = vel x <=0
value = 3
[State 0, SprPriority]
type = SprPriority
trigger1 = vel x >0
value = 6
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -3.75*(sin(0.095*time))
y = -2.5

[State 0, ChangeState]
type = ChangeState
trigger1 = time =80 
value = 30002
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 
;--------------------------------------------------------------------------------------------
[Statedef 3006]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 0
anim=3002
ctrl = 0
velset = 0,0
sprpriority =5

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

[State 0, BindToParent]
type = BindToParent
trigger1 = root,numhelper(3001) 
time = 1
facing = 1
pos = 0,0
ignorehitpause =1 
;persistent = 

[State 1002, Destroy]
type = destroyself
trigger1 = !root,numhelper(3001) 
;-----------------------------
[StateDef 3100]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 8104
sprpriority=-1

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

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 =time=45
;--------------------------------------------------------------------
[Statedef 4001]
movetype=I
physics =N
ctrl = 0
anim =12999
velset = 0,0
anim =12999
velset = 0,0

;-Pal Number, 10's
[State 0, Explod]
type = Explod
triggerall = roundstate!=2
trigger1 =numexplod(12000)<1
anim =13000+(((root,Var(54) % 100) - (root,Var(54) % 10))/10)
ID =12000
pos = 30,42
postype = p1  ;p2,front,back,left,right
facing = ifelse(facing=-1,1,1)
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = .5,.5
sprpriority = 1
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

;---pal number 1's
[State 0, Explod]
type = Explod
trigger1 =numexplod(12001)<1
anim =13000+(root,var(54)%10)
ID =12001
pos = 50,42
postype = p1  ;p2,front,back,left,right
facing = ifelse(facing=-1,1,1)
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = .5,.5
sprpriority = 1
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

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

;------used so you cant select another pal after the first time
[State 0, VarSet]
type = parentVarSet
trigger1 =1
v = 53   ;fv = 10
value =1
;ignorehitpause =
;persistent =


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =root,command="dwn"||root,command="up"||root,command="fwd"||root,command="back"
id =12000
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =root,command="dwn"||root,command="up"||root,command="fwd"||root,command="back"
id =12001


[State 0, ParentVarSet]
type = ParentVarSet
trigger1 =time=0
v =54     ;fv =
value = palno

;-----move up 10
[State 0, ParentVarSet]
type = ParentVaradd
trigger1 =root,command="fwd"
v =54     ;fv =
value = 10
;-----move down 10
[State 0, ParentVarSet]
type = ParentVaradd
trigger1 =root,command="back"
v =54     ;fv =
value = -10
;---move up 1
[State 0, ParentVarSet]
type = ParentVaradd
triggerall = root,var(54)<var(50)
trigger1 =root,command="up"
v =54     ;fv =
value = 1


;---move down 1
[State 0, ParentVarSet]
type = ParentVaradd
triggerall = root,var(54)>1
trigger1 =root,command="dwn"
v =54     ;fv =
value = -1

;--reset back to one incase of error
[State 0, ParentVarSet]
type = ParentVarset
triggerall = root,var(54)>var(50)
trigger1 =root,command="up"
v =54     ;fv =
value = 1
[State 0, ParentVarSet]
type = ParentVarset
triggerall = root,var(54)<=0
trigger1 =root,command="back"
v =54     ;fv =
value = 1
;-------------------------

;--reset back to max incase of error
[State 0, ParentVarSet]
type = ParentVarset
triggerall = root,var(54)<=0
trigger1 =root,command="dwn"
v =54     ;fv =
value = var(50)



[State 0, ParentVarSet]
type = ParentVarset
triggerall = root,var(54)>var(50)
trigger1 =root,command="fwd"
v =54     ;fv =
value = var(50)

;---max pal no setting
[State 0, VarSet]
type = VarSet
trigger1 =1
v = 50  ;fv = 10
value =14


;ignorehitpause =
;persistent =
;---remove everything
[State 0, RemoveExplod]
type = RemoveExplod
triggerall = time >5
trigger1 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z" || root,command="start"
trigger2 = roundstate > 1
trigger3= time >400
id =12000
;---remove everything
[State 0, RemoveExplod]
type = RemoveExplod
triggerall = time >5
trigger1 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z" || root,command="start"
trigger2 = roundstate > 1
trigger3= time >400
id =12001
;ignorehitpause =
;persistent =
;---remove everything
[State 6000, DestroySelf]
type = destroyself
triggerall = time >5
trigger1 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z" || root,command="start"
trigger2 = roundstate > 1
trigger3= time >400
;------------------------------------------------------------------------------
[Statedef 30011]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim =10000
sprpriority = 2
[State 0, VarSet]
type = VarSet
trigger1 = time=1
v = 1   ;fv = 10
value = (random%45)


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

;
;[State 0, ModifyExplod]
;type = ModifyExplod
;trigger1 = 1
;ID =5404+time
;sprpriority = ifelse(vel x >0,9,-9)

;trans = 
;persistent =
;supermove = 0
;pausemove = 0
[State 0, VarSet]
type = Varset
trigger1 = var(0)=250
v = 0   ;fv = 10
value = 0
[State 0, VarSet]
type = Varadd
trigger1 = var(0)<250
v = 0   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 =ishelper(30011)
x = (6)*(cos(.12*var(0)))
y= -1-(var(1)*.05)
[State 0, VelSet]
type = VelSet
trigger1 =ishelper(30012)
x = (-6)*(cos(.12*var(0)))
y= -1-(var(1)*.05)


[State 0, Explod]
type = Explod
trigger1 = 1
anim = 5405
ID = 5404+time
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = cond(ishelper(30011),-6,6),-1-(var(1)*.05)
accel = cond(ishelper(30011),.15,-.15),0
random = 0,0
pausemovetime = 99
supermovetime=99
scale = .75,.65
sprpriority =ifelse(vel x >0,9,-9)
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time=30
;------------------------------------------------------------------------------
;final saws
[Statedef 30012]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim =1055
sprpriority = 4

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -ceil((time*25))
scale =.45,.45
ignorehitpause = 1

;alpha = 256,256
[State 0, PosAdd]
type = PosAdd
trigger1 =1 
y = -6
;ignorehitpause = 
;persistent = 



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

;
;[State 0, ModifyExplod]
;type = ModifyExplod
;trigger1 = 1
;ID =5404+time
;sprpriority = ifelse(vel x >0,9,-9)

;trans = 
;persistent =
;supermove = 0
;pausemove = 0
[State 0, VarSet]
type = Varset
trigger1 = var(0)=250
v = 0   ;fv = 10
value = 0
[State 0, VarSet]
type = Varadd
trigger1 = var(0)<250
v = 0   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 =  time >45
v = 1   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 



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

[State 0, Trans]
type = Trans
trigger1 = var(1)>=0
trans = addalpha;, add1, sub
alpha = 256-(var(1)*28),256
;ignorehitpause = 
;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = var(1)>8
;------------------------------------------------------------------------------
;final saws
[Statedef 30013]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim =1055
sprpriority = 4

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -ceil((time*25))
scale =.35,.35
ignorehitpause = 1

;alpha = 256,256


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

;
;[State 0, ModifyExplod]
;type = ModifyExplod
;trigger1 = 1
;ID =5404+time
;sprpriority = ifelse(vel x >0,9,-9)

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

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, PosAdd]
type = PosAdd
trigger1 =1 
y = 7.5
;ignorehitpause = 
;persistent = 


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


;ignorehitpause = 
;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = pos y >100
;--------------------------------------------------------------------------
[StateDef 30002]
type =A
movetype=H
physics = N
juggle  = 0
ctrl = 0
poweradd =0
sprpriority=9
[State 5030, 1]
type = VelAdd;Gravity
trigger1 = time>0
y = GetHitVar(yaccel)*enemy,fvar(5)
[State 0, VelSet]
type = VelSet
trigger1 = enemy,fvar(6)=1 && time=0
x = -5
[State 0, Turn]
type = Turn
trigger1 =  frontedgebodydist <20
persistent=0
[State 0, VelSet]
type = VelSet
trigger1 = enemy,var(10)=8||enemy,var(10)=2
y = ifelse(enemy,var(10)=8,-2,12)
[State 0, VelSet]
type = VelSet
trigger1 =enemy,fvar(6)!=1
x= cond(enemy,fvar(6)<1,14,-14)
persistent=0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 0, LifeAdd]
type = LifeAdd
trigger1 = (enemy,var(10)=8||enemy,var(10)=0) && time=0
value = -130*enemy,fvar(2)
kill = 1
persistent=0
[State 0, LifeAdd]
type = LifeAdd
trigger1 = enemy,var(10)=2&& Pos Y >= const(size.mid.pos.y)+40&& vel y >0
value = -235*enemy,fvar(2)
kill = 1
persistent=0
[State 0, LifeAdd]
type = LifeAdd
trigger1 = enemy,var(10)=4 || enemy,var(10)=6
trigger1=BackEdgeBodyDist <= 20
value = -200*enemy,fvar(2)
kill = 1
persistent=0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = (enemy,fvar(5)>1 ||enemy,fvar(6)!=1) && Pos Y >= const(size.mid.pos.y)+40&& vel y >0
value = SCA
;value2 = S,NA
time = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = enemy,fvar(5)<=1 && enemy,fvar(6)=1 && Pos Y >= const(size.mid.pos.y)+40&& vel y >0
trigger2 = Pos Y >= const(size.mid.pos.y)+40&& vel y >0 && enemy,fvar(5)>=1
value = 303

[State 0, ChangeState]
type = selfState
trigger1 = enemy,fvar(5)>1 && enemy,fvar(6)=1 && Pos Y >= const(size.mid.pos.y)+40&& vel y >0
value = 5110

;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = vel x = -14
trigger1=BackEdgeBodyDist <= 20
value = 20011


;------------------------------------------------------------------------------
[Statedef 30001]
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =5404
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = time=0
x = 22

[State 0, VelSet]
type = VelSet
trigger1 = p2bodydist x <10
x = 6.5
;ignorehitpause = 
;persistent = 
[State 4003, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
persistent = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

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

;---------------------------------------------------------------------------
[Statedef 30060]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3065
ctrl = 0
sprpriority = 5

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

;ignorehitpause = 
;persistent = 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0 
value = S3,5
channel = 4
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S3,4
loop=1
channel = 5
[State 0, ChangeAnim]
type = ChangeAnim
triggerall =  animelem=13
trigger1 =  root,var(14)<6 && root,animelemtime(7)<190 && root,anim=3062
trigger2 = root,anim=3061
value = anim
elem = 7
;ignorehitpause = 
;persistent = 
[State 0, AngleDraw]
type = AngleDraw
trigger1 = root,var(14)<5
value = 0
scale = 3*root,fvar(10), 4.5*root,fvar(10)
;ignorehitpause = 
;persistent = '
[State 0, PosSet]
type = Posset
trigger1 = time=0
y = 0
;persistent = 0
[State 0, PosSet]
type = Posadd
trigger1 = root,var(14)=2 && root,pos y !=0
y =3
[State 0, PosSet]
type = Posadd
trigger1 = root,var(14)=3 && pos y <360
y =12
[State 0, PosSet]
type = PosSet
trigger1 = root,var(14)=5 
x = 30

[State 0, PosSet]
type = Posset
trigger1 = root,var(14)=5
y =300
persistent=0
[State 0, PosSet]
type = Posadd
trigger1 = root,var(14)=5 && root,animelemtime(7)>55
y =-1.25

[State 0, AngleDraw]
type = AngleDraw
trigger1 = root,var(14)=5
value = 0
scale = 4*root,fvar(10), 2.5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = root,var(14)=4
flag = invisible

[State 0, AngleDraw]
type = AngleDraw
trigger1 = root,var(14)>=6
value = 0
scale = 0.394328, 1.5
[State 0, PosAdd]
type = PosAdd
trigger1 = root,var(14)=5 && root,animelemtime(7)=[55,65]
x =.75
;ignorehitpause = 
;persistent = 

[State 0, Helper]
type = Helper
trigger1 = root,var(14)=5&& root,animelemtime(7)>=90&& root,animelemtime(7)<160
trigger1 = root,animelemtime(7)%15=0
helpertype = normal ;player
name = "streaks"
ID =30018
stateno =30012
pos =-18,-20
postype = p1   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause=1
size.xscale  = .25
size.yscale = .25
[State 0, Helper]
type = Helper
trigger1 = root,var(14)=5&& root,animelemtime(7)>=90&& root,animelemtime(7)<160
trigger1 = root,animelemtime(7)%15=0
helpertype = normal ;player
name = "streaks"
ID =30018
stateno =30012
pos = 18,-20
postype = p1   ;p2,front,back,left,right
facing = -1
keyctrl = 0
ownpal = 1
ignorehitpause=1
size.xscale  =.25
size.yscale = .25
[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = -120,0,-120
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, VarSet]
type = Varadd
trigger1 = animelemtime(30)>=0
v = 1   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, PlaySnd]
type = PlaySnd
trigger1 =root,var(14)=6&& root,animelemtime(7)=210
value = S2,7
channel = 1
[State 11009, dust]
type = Explod
trigger1 =root,var(14)=6&& root,animelemtime(7)=210
anim =3066
ID = 3066
postype =p1
pos = 0,-50
vel =0,-2
bindtime = -1
facing = 1
scale = .25,.25
ownpal = 1
ignorehitpause =1
ontop =1
sprpriority=-6
persistent=0
[State 11009, dust]
type = Explod
trigger1 =root,var(14)=6&& root,animelemtime(7)=210
anim =3066
ID = 3066
postype =p1
pos = 0,-50
bindtime = -1
facing = -1
vel =0,-2
scale = .25,.25
ownpal = 1
ignorehitpause =1
ontop =1
sprpriority=-6
persistent=0

[State 0, StopSnd]
type = StopSnd
trigger1 = animelem=30
channel = 5
;ignorehitpause = 
;persistent = 

[State 0, Trans]
type = Trans
trigger1 = var(1)>=0
trans = addalpha;, add1, sub
alpha = 256-(var(1)*26),256
[State 0, DestroySelf]
type = DestroySelf
trigger1 =animtime=0

;---------------------------------------------------------------------------
[Statedef 8050]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 8003
ctrl = 0
sprpriority = 5

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = time = 0
v = 10    ;fv =
value = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0 && numexplod(8000) < 1
anim =8001
ID =8000
pos = 0,80
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 0
supermovetime = 640
pausemovetime  = 640

[State 0, Explod]
type = Explod
trigger1 = time = 0 && numexplod(8001) < 1
anim =8002
ID =8001
pos = 0,80
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 0
supermovetime = 640
pausemovetime  = 640

[State 8050, 5]
type = destroyself
trigger1 = AnimTime = 0
;---------------------------------------------------------------------------
[Statedef 6000]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 5999
ctrl = 0
sprpriority = 5




[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag2=noFG
flag=nokosnd
ignorehitpause = 1
persistent = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2=nokosnd
flag3=noBG
ignorehitpause = 1
persistent = 1

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =2
value = S999,1
[State 0, Pause]
type = Pause
trigger1 =time=4
time = 35
movetime = 35
ignorehitpause = 1

[State 11009, dust]
type = Explod
trigger1 = time = 0
anim = 8000
ID = 11009
postype =left
pos = 0,-10
bindtime = -1
facing = ifelse(facing = -1, -1,1)
sprpriority = -8
scale = .5,ifelse(GameHeight=180,.39,.54)
ownpal = 0
ignorehitpause =1
ontop =0
pausemovetime = 999
supermovetimetime = 9999


[State 0, DestroySelf]
type = DestroySelf
trigger1 =  !numexplod(11009)
;---------------------------------------------------------------------------------------------------
[Statedef 9998]
type    = A
movetype= H
physics = N
juggle  = 8
velset=0,0
poweradd= 0
ctrl = 0
anim =10000
sprpriority = 9

[State 0, VarSet]
type = VarSet
triggerall = numenemy=1
triggerall= roundno>1 
triggerall = p2life <=root,var(9)
trigger1 = root,power>=1000
v = 1    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 


;1010
[State 0, VarSet]
type = Varadd
trigger1 = root,stateno=1010 && var(35)
v = 40    ;fv = 10
value = 1
;1050
[State 0, VarSet]
type = Varadd
trigger1 = root,stateno=1050 && var(35)
v = 41   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = var(34)!=[1010,1100]
v =2    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,statetype=A
v = 30    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 




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

[State 0, VarSet]
type = parentVarSet
trigger1 = 1
v = 34    ;fv = 10
value = var(34)

;[State 0, VarSet]
;type = parentVarSet
;trigger1 = var(34)=[1001,1002]
;v = 10    ;fv = 10
;value = var(10)

[State 0, VarSet]
type =VarSet
trigger1 = p2movetype!=H
v = 10    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = var(35) && root,stateno=var(34)
v = 36   ;fv = 10
value = 1
ignorehitpause =1
 
[State 0, VarSet]
type = VarSet
trigger1 =  root,stateno!=var(34) && root,time=1 
trigger2 = var(34)=-1
v = 36   ;fv = 10
value = 0
ignorehitpause =1

[State 0, Varrandom]
type = Varrandom
trigger1 = 1
v = 59
range = 0,1000
;ignorehitpause = 
;persistent = 

;===non attacks


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

;1000
[State 0, Null]
type = Null
triggerall =(root,stateno=1000)&& !var(35) 
trigger1 =  ( root,var(10)=2  && root,p2movetype=H)&&var(34)=-1 && var(6)<2
trigger1 = var(34):=1005
trigger2 =  ( root,var(10)=2  && root,p2movetype=H)&&var(34)=-1 && var(6)=2
trigger2 = var(34):=cond(root,fvar(22)<35,1007,1006)
trigger3 = (var(59)%3=1) && (root,power >=550 && root,var(10)=0 || p2life < 300 && root,power >=500)
trigger3 = var(34):=3050
;1001
[State 0, Null]
type = Null
triggerall =(root,stateno=1001)&& !var(35) && root,var(10)!=0
trigger1 =  (root,var(10)=cond(root,facing=1,6,4) && root,p2movetype=H )&&var(34)=-1 && root,var(2)!=3
trigger1 = var(34):=210
trigger2 =  ( root,var(10)=2  && root,p2movetype=H)&&var(34)=-1&& root,var(2)!=3&&var(1)
trigger2 = var(34):=3060
trigger3 =  ( root,var(10)=2  && root,p2movetype=H)&&var(34)=-1&& root,var(2)!=3
trigger3 = var(34):=1050
trigger3 = var(2):=2
trigger4 =  ( root,var(10)=cond(root,facing=1,6,4) && root,p2movetype=H)&&var(34)=-1&& root,var(2)=3
trigger4 = var(34):=605
trigger4 = var(30):=1

;1002
[State 0, Null]
type = Null
triggerall =(root,stateno=1002)&& !var(35)&& var(10)!=0 && root,time=2
trigger1 =  ((root,var(10)=4) && root,fvar(21)>-45&& root,p2movetype=H &&(p2stateno!=[20010,20014]) && (root,frontedgebodydist <60||root,backedgebodydist <50) )&&var(34)=-1&& root,var(2)!=3
trigger1 = var(34):=1100
trigger1 = var(2):=1
trigger2 =  ((root,var(10)=8||root,var(10)=cond(root,facing=1,4,6))&& root,p2movetype=H )&&var(34)=-1&& root,var(2)!=3 && (root,fvar(21)<-45 || root,var(10)=8)
trigger2 = var(34):=210
trigger3 =  ((root,var(10)=cond(root,facing=1,4,6)) && root,frontedgebodydist >60 )&&var(34)=-1&& root,var(2)!=3
trigger3 = var(34):=1050
trigger3 = var(32):=63

;====
;f200
[State 0, Null]
type = Null
triggerall =(root,stateno=200||root,stateno=400)&& var(35)
trigger1 =  (var(59)%5<4||p2statetype=A )&&var(34)=-1
trigger1 = var(34):=205
trigger2 = p2statetype!=A && (var(59)%5>=3)&&var(34)=-1
trigger2 = var(34):=405

;f600
[State 0, Null]
type = Null
triggerall =(root,stateno=600)&& var(35)
trigger1 = p2statetype=A
trigger1 = var(34):=605


;205
[State 0, Null]
type = Null
triggerall =root,stateno=205&& var(35)
trigger1 =root,fvar(22) <50&& p2statetype!=A&var(34)=-1
trigger1 = var(34):=210
trigger2 = root,fvar(22) <50&& ((var(59)%5<=2))  &&var(34)=-1
trigger2 = var(34):=410
trigger3 = p2statetype=A&var(34)=-1
trigger3 = var(34):=1010
trigger3 = var(2):=1
trigger4 =root,fvar(22) >=50&& ((var(59)%5<=2))&var(34)=-1
trigger4 = var(34):=1100
;405
[State 0, Null]
type = Null
triggerall =root,stateno=405&& var(35)
trigger1 =  (root,fvar(22) <=40||p2statetype!=A|| (root,frontedgebodydist <50))&&var(34)=-1
trigger1 = var(34):=210
trigger2 =  p2statetype!=A && root,numhelper(3011)=0  && (root,numexplod(1001)>1 ||  (var(59)%5>4)) && root,var(10)>3 && root,fvar(22)<55&&var(34)=-1
trigger2 = var(34):=410
trigger3 = root,fvar(22) >=40&& ((var(59)%5<=2))  &&var(34)=-1
trigger3 = var(34):=1010
trigger4 = root,fvar(22) >=40&& ((var(59)%5>2))  &&var(34)=-1
trigger4 = var(34):=1050
;605
[State 0, Null]
type = Null
triggerall =root,stateno=605&& var(35)
trigger1 = p2statetype=A && (root,fvar(21) =[-15,45])&&var(34)=-1 && var(10)=0
trigger1 = var(34):=cond(root,fvar(21) >-15&& root,var(6)<2,1000,610)
trigger2 = (root,pos y >-20||root,pos y >-40&&root,var(19))&&var(34)=-1
trigger2 = var(34):=210
trigger3 = p2statetype=A&&var(34)=-1 && var(10)!=0
trigger3 = var(34):=610
trigger3 = var(32)=13
;210
[State 0, Null]
type = Null
triggerall =root,stateno=210&& var(35) && var(34)<=210
trigger1 = root,fvar(22) <70 && root,fvar(21)>-45&& (var(59)%10<=3)&&var(34)=-1 && (root,var(10)=0 ||root,var(7)<10)
trigger1 = var(34):=1010
trigger1 = var(2):= cond(p2statetype!=A,(var(59)%2)+1,1)
trigger1 = var(50):=var(59)%10
trigger2 = root,fvar(22) <70 && ((var(59)%10=[4,7])&&root,var(7)<10||root,var(19)=1&&p2statetype=A||((root,var(10)=cond(root,facing=1,6,4)&&root,var(7)>140)))&&var(34)=-1
trigger2= root,var(10)!=8
trigger2 = var(34):=1100
trigger2 = var(2):= cond(var(19),2,cond(power>=350&&root,frontedgebodydist <70,3,1))
trigger2 = var(50):=var(59)%10
trigger3 = root,fvar(22) <60 && ((root,var(10)!=0)||root,var(10)=6&&(var(59)%3=2)&&p2statetype=A)&&root,var(7)>20&&var(34)=-1
trigger3 = var(34):=1050
trigger3 = var(2):= 1+(root,var(10)=2||root,var(10)=8)
trigger3 = var(50):=var(59)%10
trigger4 =  (var(59)%10=[8,9])&&root,power>550&&var(34)=-1
trigger4 = var(34):=3000
trigger4 = var(50):=var(59)%10

;410
[State 0, Null]
type = Null
triggerall =root,stateno=410&& var(35)
trigger1 = root,fvar(22) <70 && root,fvar(21)>-45&&var(34)=-1 && (root,var(10)=0 ||root,var(7)<10)
trigger1 = var(34):=1010
trigger1 = var(2):= cond(p2statetype!=A,(var(59)%2)+1,1)
trigger1 = var(50):=var(59)%10
trigger2 = var(2):= cond(var(19),2,cond(power>=450&&root,frontedgebodydist <60,3,1))
trigger2 = var(50):=var(59)%10
trigger3 = root,fvar(22) <70 && ((root,var(10)!=0)||root,var(10)=6&&(var(59)%3=2)&&p2statetype=A)&&root,var(7)>20&&var(34)=-1
trigger3 = var(34):=1050
trigger3 = var(2):= 1+(root,var(10)=2||root,var(10)=8)
trigger3 = var(50):=var(59)%10
trigger4 =  (var(59)%10=[8,9])&&root,power>550&&var(34)=-1
trigger4 = var(34):=3000
trigger4 = var(50):=var(59)%10

;610
[State 0, Null]
type = Null
triggerall =root,stateno=610&& var(35) 
trigger1 = root,fvar(22) <90&& p2statetype=A &&root,var(19)=0&&var(34)=-1 ;  && (var(59)%5>1)
trigger1 = var(34):=1000
trigger2 = root,var(19)=1&&var(34)=-1 && p2statetype=A
trigger2 = var(34):=1100
trigger2 = var(2):=2


;211
[State 0, Null]
type = Null
triggerall =root,stateno=211&& var(35) 
trigger1 =root,var(21)=0 && (root,numtarget(211)&&root,frontedgebodydist <65 )&&var(34)=-1
trigger1 = var(34):=1001
trigger1 = var(10):=2
trigger2 =root,var(21)=0 && (root,numtarget(210)&&root,frontedgebodydist <70 )&&var(34)=-1
trigger2 = var(34):=1002
trigger2 = var(10):=8
trigger2= var(32):=0

;800
[State 0, Null]
type = Null
triggerall =root,stateno=810&& !var(35) && root,time >25
trigger1 =  root,power >350
trigger1 = var(34):=1050
trigger1 = var(2):=3

;800
[State 0, Null]
type = Null
triggerall =root,stateno=831&& var(35)
trigger1 =  root,var(19)=1 && root,pos y >-77
trigger1 = var(34):=1100
trigger1 = var(2):=2
trigger2 =  root,var(19)=1 && root,pos y <-77
trigger2 = var(34):=205


;1005
[State 0, Null]
type = Null
triggerall =root,stateno=1005&& var(35) 
trigger1 = root,fvar(22) <80 && root,var(6)<2&&var(34)=-1 && (root,var(19)=0 || root,var(10)=2)
trigger1 = var(34):=1000
trigger2 =root,var(19)=1 && root,var(10)=0&&var(34)=-1 && root,var(10)!=2
trigger2 = var(34):=210
trigger3 =  (var(59)%5<=3)   && root,var(10)!=0&&var(34)=-1
trigger3 = var(34):=cond(var(10)=8,205,210)

;1006
[State 0, Null]
type = Null
triggerall =root,stateno=1006&& var(35) 
trigger1 = root,var(19)=1&&var(34)=-1
trigger1 = var(34):=1100
trigger1 = var(2):=2
;1007
[State 0, Null]
type = Null
triggerall =root,stateno=1007&& var(35) 
trigger1 = root,var(19)=1&&var(34)=-1 && p2statetype=A
trigger1 = var(34):=1100
trigger1 = var(2):=2
;==Helpers==
;1002
[State 0, Null]
type = Null
trigger1 =root,numhelper(1050)
trigger1 = helper(1050),movehit && (root,var(10)=cond(root,facing=1,4,6)||root,var(10)=6&&enemy,backedgebodydist <15&&p2statetype=A)&&var(34)=-1
trigger1 = var(34):=cond(root,var(10)=4,cond(p2statetype=A,200,400),210)
trigger2 =root,numhelper(1051)
trigger2 = helper(1051),movehit &&var(34)=-1 && root,fvar(22)<60
trigger2 = var(34):=cond(root,var(10)=2,1000,cond(root,var(10)=0||p2statetype!=A,cond(p2statetype=A,205,400),210))
trigger3 =root,numhelper(1052)
trigger3 = helper(1052),movehit && (var(10)=0)&&var(34)=-1 && root,stateno=1050 
trigger3 = var(34):=1100
trigger3 = var(2):=2
trigger4 =root,numhelper(1011)
trigger4 = helper(1011),movehit && (var(10)=0);&&var(34)=-1
trigger4 = var(34):=cond((var(59)%8=[4,6])&&power >600,3000,1100)
trigger4 = var(2):=2*(var(34)=1100)
trigger3 =root,numhelper(1051)
trigger3 = helper(1051),movehit && (root,var(10)=0)&&var(34)=-1 && root,fvar(22)>=55 && var(59)%2=0 && p2statetype=A
trigger3 = var(34):=1002
trigger3 =var(10):=2



;3000
[State 0, Null]
type = Null
triggerall =root,numhelper(3001) && var(34)=-1
triggerall = p2stateno=3002  || p2stateno=30002 && enemy,time =2 
trigger1 = root,frontedgebodydist <30 
trigger1 = var(34):=1002
trigger1 = var(10):=2
trigger1 = var(32):=47
trigger2 = root,frontedgebodydist >140&& root,var(10)=0
trigger2= var(34):=1002
trigger2 = var(32):=47
trigger2 = var(10):=cond(root,facing=1,4,6)
trigger3 = root,frontedgebodydist =[30,140] 
trigger3= var(34):=1001
trigger3 = var(10):=cond(root,facing=1,6,4)
trigger3 = var(32):=47

;trigger3 = p2statetype=A   && (var(59)%5>1) && root,p2bodydist x > 50&&var(34)=-1 && p2movetype=H
;trigger3 = var(34):=210
;trigger4 = p2movetype=A   && (var(59)%5>2) &&var(34)=-1
;trigger4 = var(34):=1050
;trigger4 = var(2):=2
;====


;====specials

;1010
[State 0, Null]
type = Null
triggerall =root,stateno=1010&& var(35) 
trigger1 = root,var(10)=0 || root,var(10)=2
trigger1 =root,var(2)=1 && var(34)=-1 && var(1)
trigger1 = var(34):=3060
trigger2 = root,var(10)=0 || root,var(10)=8
trigger2 =root,var(2)=2 && root,fvar(22) <45 && var(34)=-1 ; (var(59)%5>1) && 
trigger2 = var(34):=205
trigger3 = root,var(10)=0
trigger3 = (var(59)%5>2) && root,var(2)=1&& root,var(19)=0&& var(34)=-1
trigger3 = var(34):=1000
trigger4 = root,var(10)=0
trigger4 = (var(59)%5<=2&& root,var(19)=0 || root,var(19)=1&&power >250) && root,var(2)=1&& var(34)=-1
trigger4 = var(34):=1050
trigger4 = var(2):=cond(var(19)=0||power <250,2,3)
trigger5 = (root,var(10)=6||root,var(10)=8) && root,var(7)>40
trigger5 =(root,var(2)=[1,2]) && var(34)=-1 ; (var(59)%5>1) && 
trigger5 = var(34):=210
trigger6 = root,var(10)=6 && root,var(7)<40
trigger6 =root,var(2)=2 && var(34)=-1 ; (var(59)%5>1) && 
trigger6 = var(34):=1100
trigger6= var(2):=2


;1100
[State 0, Null]
type = Null
triggerall =root,stateno=1100&& var(35) 
trigger1 =root,var(2)=1  && root,var(7)>40 && root,frontedgebodydist <75&&var(34)=-1
trigger1 = (root,var(10)=6 || root,var(10)=4) && p2statetype=A
trigger1 = var(34):=210
trigger2 =root,var(2)=2  && root,frontedgebodydist <65&&var(34)=-1
trigger2 = root,var(10)=0
trigger2 = var(34):=211
trigger3 =root,var(2)=2  && root,frontedgebodydist>105&&var(34)=-1 && root,power >600 && var(59)%5>1
trigger3 = var(34):=3000
trigger4 =root,var(2)=3  && root,frontedgebodydist <65&&var(34)=-1
trigger4 = var(34):=1001
trigger4 = var(10):=cond(root,facing=1,6,4)
trigger4 = var(32):=58
trigger5 =root,var(2)=2  && root,frontedgebodydist>85&&var(34)=-1
trigger5 = var(34):=1002
trigger5 = var(10):=cond(root,facing=1,4,6)
trigger5 = var(2):=(var(34)=1010)
trigger6 =root,var(2)=2  && (root,frontedgebodydist=[65,85])&&var(34)=-1
trigger6 = var(34):=1010
trigger6= var(2):=1


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



[State 0, VarSet]
type = parentVarSet
trigger1 = p2movetype=H 
v = 34    ;fv = 10
value = var(34)
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
trigger2 = root,stateno=var(34) && var(34)!=600 && root,time=1
v = 34    ;fv = 10
value = -1

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

;ignorehitpause = 
;persistent = 

 [State 0, DestroySelf]
type = DestroySelf
trigger1 =roundstate!=2
;---------------------------------------------------------------------------------------------------
[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, VarSet]
type = VarSet
trigger1 = 1
v = 36    ;fv = 10
value = root,animelemno(0)
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = var(35) < var(36)
v = 35   ;fv = 10
value = root,animelemno(0)
[State 0, VarSet]
type = VarSet
trigger1 = root,anim !=var(34)
trigger2 = root,time<=1
v = 35   ;fv = 10
value = 0
;sadclaps detection
[State 0, VarSet]
type = VarSet
triggerall = root,movetype!=H
triggerall = root,stateno!=[800,899]
triggerall = root,stateno!=1010
triggerall = root,stateno!=[1005,1007]
triggerall = root,stateno!=1000
triggerall =root,stateno=[200,2030]
trigger1 = root,animelemno(0)<var(35)
v = 37    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1=var(39)>4
v = 37    ;fv = 10
value =0

[State 0, VarSet]
type = Varadd
trigger1 = root,animtime=0
v = 39    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varset
trigger1 = !var(37)
v = 39    ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet

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

[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(21),var(10),var(11),(var(14))
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
[State 8, VarSet]
type = VarSet
trigger1 = root,stateno=5120 
v = 8    ;fv = 10
value = 6
[State 8, VarSet]
type = Varadd
trigger1 = root,stateno!=5120 && var(8)>0
v = 8    ;fv = 10
value = -1
[State 8, VarSet]
type = VarSet
triggerall = var(13) || root,p2bodydist x= [15,45]
trigger1 = p2stateno=5201 && enemy,time >10 
trigger2 = p2stateno=5210 && enemy,time >10 
trigger3 = p2stateno=5120 && enemy,time >13
v = 9    ;fv = 10
value = 1
;enough for lights
[State 10, Explod]
type = varset
triggerall = var(10)=0
trigger1 = root,movehit && ((root,stateno=600)) && root,pos y >=-40
trigger2 = root,movehit &&( root,stateno=605) && root,pos y =[-75,-60]
trigger3= root,movehit && (root,anim=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,anim=610)&& root,pos y >-70
trigger2 = root,movehit && root,stateno=605&& root,pos y >-60
trigger3= root,movehit && root,stateno=1007 && p2statetype!=A
v=11
value=1

;blocked so inch slowly
[State 12, Explod]
type = varset
triggerall = var(12)=0
triggerall = var(13)=0
trigger1=root,numhelper(1050)
trigger1= helper(1050),movecontact=1&& p2statetype!=A
trigger2=root,numhelper(1051)
trigger2= helper(1051),movecontact=1&& p2statetype!=A
trigger3= root,moveguarded=1 && root,stateno=1006 && p2statetype!=A
trigger4= root,moveguarded=1 && root,stateno=1007 && p2statetype!=A
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
[State 0, VarSet]
type = VarSet
triggerall = root,stateno=[4,5]
trigger1 = root,prevstateno=[1000,1009]
v = 17    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet

trigger1 =var(17) && root,time>1
v = 14   ;fv = 10
value = 1
ignorehitpause = 1

[State 0, VarSet]
type = Varadd
trigger1 = var(15)<240 && var(14)
v = 15    ;fv = 10
value = 1
;[State 0, VarSet]
;type = VarSet
;trigger1 =var(14)=0
;v = 16   ;fv = 10
;value = root,power
;ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = var(15)>=180
v = 17    ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 =var(15)>=180
v = 14   ;fv = 10
value = 0
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 =var(14)=0
v = 15   ;fv = 10
value = 0
ignorehitpause = 1
;ignorehitpause = 
;persistent = 

;bounced up
[State 16, VarSet]
type = Varset
trigger1=p2stateno=1030  &&root,p2bodydist y>-80 &&enemy,vel y >-0
trigger2 = root,numhelper(1052) &&root,p2bodydist y>-90
trigger2= helper(1052),movehit=1
trigger3 =(p2stateno=1028)&&root,p2bodydist y>-105 &&enemy,vel y >-0
trigger4 =(p2stateno=1048)&&root,p2bodydist y>-85 &&enemy,vel y >-0
v =16  ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

;persistent = 

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


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

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

;persistent = 


;persistent = 



;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

[State 0, VarSet]
type = VarSet
trigger1 = root,var(34)=[1001,1002]
v = 17    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

;persistent = 

;1000

;1001

;ignorehitpause = 
;persistent = 

[State 20, RemoveExplod]
type = varset
trigger1 =p2movetype!=H
v = 16
value=0
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = root,var(34)!=[1001,1002]
v = 17    ;fv = 10
value = 0
;230
[State 20, RemoveExplod]
type = varset
triggerall = p2stateno!=[833,834]
trigger1 = root,stateno=1001 && p2statetype=S ||  root,stateno=1001 &&root,p2bodydist y <-25 && var(31)=0 && p2statetype=A
v = 20
value=0
ignorehitpause = 1
;rolling elbow strike
[State 20, Explod]
type = varset
triggerall =root,var(31)!=[40,59]
triggerall = root,p2bodydist x >-5
triggerall = root,stateno=1001 || root,stateno=1002 && (root,var(6)>0 || root,var(21)=2) || root,stateno=1003
trigger1= p2statetype=C && p2movetype!=A || p2statetype=L ||p2stateno=[833,834]
v=20
value=1
ignorehitpause =1
;ex tristan kick
[State 20, Explod]
type = varset
triggerall =root,var(31)!=[40,59]
triggerall = p2stateno!=[833,834]
triggerall = root,stateno=1001 || root,stateno=1003
trigger1= p2statetype=A && root,p2bodydist y >-25
trigger2 = p2statetype=A &&p2bodydist x <5
trigger3= p2statetype=C && p2movetype=A
v=20
value=2
ignorehitpause =1

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

;walking
[State 25, VarSet]
type = VarSet
triggerall = random <249|| root,var(34)=210
triggerall = p2statetype!=A|| p2movetype=H 
trigger1 = ((enemy,movetype !=A)|| root,p2bodydist x >5)&& p2statetype!=L && root,var(31)=0
trigger2 = root,backedgebodydist <20 && p2movetype=A
trigger3 = root,p2bodydist x <0 && p2statetype=A  && root,var(31)=0
trigger4 = root,var(34)=210 && root,fvar(22)>60
trigger5 =  root,backedgebodydist <20 && (root,var(34)=210||root,var(34)=1100) 
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 
trigger2 = root,movecontact && statetype!=A
v =10
value=0
ignorehitpause = 1
[State 11, RemoveExplod]
type = varset
trigger1 = p2movetype!=H
trigger2 = root,movecontact && statetype!=A
v = 11
value=0
ignorehitpause = 1

[State 12, RemoveExplod]
type = varset
trigger1 =p2movetype!=H
v = 12
value=0
ignorehitpause = 1

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



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

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

[State 42, ParentVarSet]
type = ParentVarSet
trigger1 = var(5)=0
v =42   ;fv = 
value = 0
;-----------
 [State 0, VarSet]
type = parentVarSet
;triggerall=  root,var(31)=0 
trigger1 =  root,statetype = A
trigger2 =  root,movetype=H &&  root,stateno!=[120,155]
trigger3=  root,prevstateno=40
trigger4= (p2stateno=[5090,5119]) &&(p2stateno=[5121,5899])
trigger5 = ( root,prevstateno=52 || root,prevstateno=5120) && p2statetype=A &&  root,var(31)=0
trigger6 =  root,p2bodydist x <55 && frontedgebodydist >50 && p2statetype!=L && p2movetype!=H &&  root,var(31)=0
trigger7=var(8)>0
trigger8 =var(19)>0 && var(31)=0
trigger9=  root,numhelper(3001)=0

v=30
value = 0

[State 0, VarSet]
type = parentVarSet
triggerall =  root,statetype != A
triggerall = roundstate=2 && var(19)=0
triggerall = (var(8)<=0)
triggerall = p2stateno =5120||random <334|| p2movetype=A&&  root,p2bodydist x >100||enemy,hitdefattr=SC,AT ||  root,var(31)>0||  helper(10002),var(30)
trigger1= enemy,hitdefattr=SC,AT &&  root,ctrl
trigger2 = root,p2bodydist x >130 &&  root,ctrl &&  root,movetype!=H&&(p2movetype!=H) &&  root,var(31)=0 
trigger3=  root,var(33)=1 && ( root,fvar(21) >-50||  root,p2bodydist x <60)
trigger4 = helper(10002),var(30)
;trigger7 =  var(31)=
v = 30   ;fv = 10
value = 1
 [State 0, DestroySelf]
type = DestroySelf
trigger1 =roundstate!=2


