;--------------------------------------------------------------------------
[StateDef 1941]
type =A
movetype=A
physics = N
juggle  = 0
velset = 0,-9
ctrl = 0
anim =3002
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, AngleDraw]
type = AngleDraw
trigger1 = time%2=0 && anim=3002
value = 1
scale = .8,.8

[State 0, VelSet]
type = VelSet
trigger1 = time=10
y = 0
;ignorehitpause = 
;persistent = 
[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro
ignorehitpause=1

[State 0, Helper]
type = Helper
Trigger1 = time=25
Trigger2 = time=30
Trigger3 = time=35
Trigger4 = time=40
Trigger5 = time=45
helpertype = normal ;player
name ="Reppuken"
ID = 3011
stateno = 1942
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.25
size.yscale=.31
pausemovetime=120
supermovetime=120

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




;ignorehitpause = 
;persistent = 


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

;persistent = 

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

[State 0, VarSet]
type = Varadd
trigger1 =time>45 && p2stateno!=3002
v = 1   ;fv = 10
value = 1
ignorehitpause=0
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>47&& p2stateno!=3002
;value =  (winmugen only)
scale =  1,1-(var(1)*.09)
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 1942]
type =A
movetype=A
physics = N
juggle  =0
velset = 4,6
ctrl = 0
poweradd =0
sprpriority=9
anim=306
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add;, addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
;persistent = 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -45
[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 12    ;fv = 10
value = -45
;ignorehitpause = 
;persistent = 
[State 0, Helper]
type = Helper
Trigger1 = time=0
helpertype = normal ;player
name ="Reppuken"
ID = 6002
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99
[State 0, Helper]
type = Helper
Trigger1 = time=0
helpertype = normal ;player
name ="Reppuken"
ID = 6003
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)
size.yscale=const(size.xscale)
pausemovetime=99
[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 = 10002
time = 5
;scale = 
;ignorehitpause = 
;persistent = 

;--------------------------------------------------------------------------
[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 316]
type =A
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =316
poweradd =0
sprpriority=9
[State 0, BindToRoot]
type = BindToRoot
trigger1 =1 
time = 1
;facing = 0
pos = 0,0
ignorehitpause = 1
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,animelemtime(3)>=0&& root,animelemtime(4)<0
value = anim
elem = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,animelemtime(4)>=0&& root,animelemtime(5)<0
value = anim
elem = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,animelemtime(5)>=0
value = anim
elem = 3
;ignorehitpause = 
;persistent = 

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,anim!=315
;---------------------------------------------------------------------------------
[Statedef 10001]
type=A
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =305
sprpriority = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, NotHitBy]
type = notHitBy
trigger1 = enemy,numproj>0
value = SCA
;value2 = S,NA
time = 1
ignorehitpause =1 

[State 0, HitOverride]
type = HitOverride
trigger1 = !ishelper(1002)
attr = SCA,AA,AP,AT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 10002
time = 5
[State 0, HitOverride]
type = HitOverride
trigger1 = ishelper(1002)
attr = SCA,AA,AP,AT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 10001
time = 5
[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
ignorehitpause =1 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =1
text = "17 = %d"
params = (var(3))
ignorehitpause =1
[State 0, VarSet]
type = Varadd
trigger1 = time=0
v = 30    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = ishelper(1001) && time=0 && var(30)=1
v = 0;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=1001   && time=0  && var(30)=1
v = 0;fv = 10
value = 2
[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=1002   && time=0  && var(30)=1
v = 0;fv = 10
value = 3
[State 0, VarSet]
type = VarSet
trigger1 =ishelper(1004)  && time=0  && var(30)=1
v = 0;fv = 10
value = 4
[State 0, VarAdd]
type = parentVarAdd
trigger1 = time=0 && var(0)!=1&& var(0)!=4 && root,fvar(4)=0
v =  10   ;fv = 
value = -1
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
triggerall = var(0)=2 || var(0)=4
trigger1 = root,animelem=5 && var(1)=0
v = 1    ;fv = 10
value = 1

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

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
triggerall = var(0)=[2,4]
trigger1 =var(3)=0 
fv = 4    ;fv = 10
value = p2bodydist y
ignorehitpause = 1
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
triggerall = (var(0)=2 || var(0)=4) && var(1)=1
trigger1 = var(2)>8
v = 1    ;fv = 10
value = 2

[State 0, VarSet]
type = VarSet
triggerall = var(0)=2 && var(2)>32
trigger1 = var(1)=2
;trigger1= root,command!="holda" || helper(10003),var(16) && AIlevel>0
v = 1    ;fv = 10
value = 3
[State 0, VarSet]
type = VarSet
triggerall = var(0)=4 && var(2)>60
trigger1 = var(1)=2
v = 1    ;fv = 10
value = 3
[State 0, VarSet]
type = VarSet
triggerall = var(0)=2
trigger1 = ishelper(1003)  
v = 0;fv = 10
value = 3
[State 0, VarSet]
type = VarSet
triggerall = var(0)=2
trigger1 = ishelper(1052)  
v = 0;fv = 10
value = 18

;persistent = 
;[State 0, ChangeAnim]
;type = ChangeAnim
;trigger1 = ishelper(1051)||ishelper(1050)
;trigger1=anim!=1058
;value = 1058
;elem = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, Trans]
type = Trans
trigger1 =1 
trans = add 
ignorehitpause = 1
[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
;persistent = 
;[State 0, Explod]
;type = Explod
;trigger1=time=0 && !ishelper(1050) && !ishelper(1051)
;anim =1056
;ID =1056
;pos = -20,-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 = ishelper(1050) || ishelper(1051)
;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,-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, AngleDraw]
type = AngleDraw
triggerall = var(0)=1 ||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(1)>=0 && root,animelemtime(2)<0 &&var(0)=1 
trigger2 = root,animelemtime(2)>=0 && root,animelemtime(3)<0&&var(0)=3 
value = -90
;scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(3)>=0 && root,animelemtime(4)<0&&var(0)=1 
trigger2 = root,animelemtime(4)>=0 && root,animelemtime(5)<0&&var(0)=3 
value = 15
;scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
triggerall = (var(0)=2 || var(0)=4)
triggerall = root,stateno=1001
trigger1 = root,animelemtime(3)>=0 && root,animelemtime(4)<0
value = 70
;scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = (var(0)=2 || var(0)=4)
triggerall = root,stateno=1001
trigger1 = root,animelemtime(4)>=0 && root,animelemtime(5)<0
value = 90
;scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
triggerall = (var(0)=2 || var(0)=4)
trigger1 = var(1)=1
value = 90
;scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1

[State 0, SprPriority]
type = SprPriority
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(1)>=0 && root,animelemtime(2)<0 &&  var(0)=1
trigger2 = root,animelemtime(2)>=0 && root,animelemtime(3)<0 &&  var(0)=3
value =3
[State 0, SprPriority]
type = SprPriority
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(2)>=0 && root,animelemtime(4)<0&&  var(0)=1
trigger2 = root,animelemtime(3)>=0 && root,animelemtime(5)<0 &&  var(0)=3
value =0
[State 0, SprPriority]
type = SprPriority
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(4)>=0 &&  var(0)=1
trigger2 = root,animelemtime(5)>=0 &&  var(0)=3
value =1
;ignorehitpause = 
;persistent = 
[State 0, SprPriority]
type = SprPriority
triggerall = (var(0)=2 || var(0)=4)
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(3)>=0 && root,animelemtime(4)<0
value =3
[State 0, SprPriority]
type = SprPriority
triggerall =(var(0)=2 || var(0)=4)
trigger1 = var(1)=3
value =3
[State 0, SprPriority]
type = SprPriority
triggerall = (var(0)=2 || var(0)=4)
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(4)>=0 && root,animelemtime(5)<0
value =1
[State 0, BindToRoot]
type = BindToRoot
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(1)>=0 && root,animelemtime(2)<0&&var(0)=1 
trigger2 = root,animelemtime(2)>=0 && root,animelemtime(3)<0&&var(0)=3 
facing = 1
pos = -23,-75
[State 0, BindToRoot]
type = BindToRoot
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(2)>=0 && root,animelemtime(3)<0&&var(0)=1 
trigger2 = root,animelemtime(3)>=0 && root,animelemtime(4)<0&&var(0)=3 
facing = 1
pos = -15,-67
[State 0, BindToRoot]
type = BindToRoot
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelemtime(3)>=0 && root,animelemtime(4)<0&&var(0)=1 
trigger2 = root,animelemtime(4)>=0 && root,animelemtime(5)<0&&var(0)=3 
facing = 1
pos = 60,-67
[State 0, BindToRoot]
type = BindToRoot
triggerall = var(0)=1||var(0)=3
triggerall = root,stateno=[1000,1002]
trigger1 = root,animelem=4&&var(0)=1 
trigger2 = root,animelem=5&& root,animelemtime(3)<0&&var(0)=3 
facing = 1
pos =60,-54

[State 0, BindToRoot]
type = BindToRoot
triggerall = (var(0)=2 || var(0)=4)
triggerall = root,stateno=1001
trigger1 = root,animelemtime(3)>=0 && root,animelemtime(4)<0
facing = 1
pos = 32,-55
[State 0, BindToRoot]
type = BindToRoot
triggerall =(var(0)=2 || var(0)=4)
triggerall = root,stateno=1001
trigger1 = root,animelem=4
facing = 1
pos =39,-94

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,animelem=4 && root,stateno=1000
trigger2 = var(1)=3
trigger3 = root,animelem=5 && root,stateno=1002
value = 306
persistent = 0
[State 0, VelSet]
type = VelSet
trigger1 =  var(1)=1
y = -10
;ignorehitpause = 
;persistent =
[State 0, VelSet]
type = VelSet
trigger1 = var(1)=2
x = 0
y = 0

 [State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=2
trigger1=var(1)=2
value = -(time*36)
scale =1,1
ignorehitpause = 1
 [State 0, AngleDraw]
type = AngleDraw
trigger1 = var(0)=4
trigger1=var(1)=2
value = (time*48)
scale =1,1
ignorehitpause = 1

[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
persistent=0

;ignorehitpause = 
;persistent = 

[State 1000, 5] ;Opponent near
type = HitDef
triggerall = var(0)=1
trigger1 = !movecontact
attr = S, SP
animtype  = Hard
damage= ceil(30*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 2,2
getpower=10
sparkxy = 0,-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 = -4,-6.5
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recovertime=15
forcenofall=enemy,pos y =0
ground.cornerpush.veloff=0
ID =200

[State 1000, 5] ;Opponent near
type = HitDef
triggerall =(var(0)=2 || var(0)=4)
trigger1 = !movecontact
attr = S, SP
animtype  = Hard
damage= ceil(ifelse(var(0)=4,20,30)*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 2,2
getpower=20
sparkxy = 0,-0
sparkno =-1
guard.sparkno= S7500
hitsound = S4, 1
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 17
guard.ctrltime=15
ground.velocity = 0
air.velocity = -4,-5
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recovertime=15
ground.cornerpush.veloff=0
ID =201
[State 1000, 5] ;Opponent near
type = HitDef
triggerall = var(0)=3
trigger1 = !movecontact
attr = S, SP
animtype  = Hard
damage= ceil(ifelse(root,fvar(4)>0,80,45)*root,fvar(2)), 5
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 2,2
getpower=20
sparkxy = 0,-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 = -4,-5
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recovertime=15
ground.cornerpush.veloff=0
ID =201

;[State 0, TargetBind]
;type = TargetBind
;triggerall = enemy,pos y <0
;trigger1 =movehit || p2stateno=2000 
;time = 1
;id = 201
;pos = 0,fvar(4)
;ignorehitpause =1 


[State 0, TargetBind]
type = Bindtotarget
triggerall = enemy,pos y <0 || var(0)=3
trigger1 =movehit || p2stateno=2000 
time = 1
id = 201
pos = 0,-fvar(4)
ignorehitpause =1
;persistent = 

;[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 = -7*root,fvar(6),-5
;air.velocity = -7*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: Null]
type = Null
trigger1 = vel x =0
trigger1 = (FVar(0) := (P2Dist X * 11+(1*((var(0)=2 || var(0)=4)))) / (Exp(0.5*ln((P2Dist X* P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := ((P2Dist Y+fvar(10)) * 11) / (Exp(0.5*ln((P2Dist X * P2Dist X) + ((P2Dist Y+fvar(10)) * (P2Dist Y+fvar(10)))))))

[State 0: VelSet]
type = VelSet
triggerall =  (var(0)=1 || var(0)=3)
trigger1 = root,animelem=4&& var(0)=1
trigger2= root,animelem=5 && var(0)=3
x = ifelse((p2bodydist x =[-80,45]),11,FVar(0))
y = ifelse(enemy,pos y >=-15 ||(p2bodydist x =[-45,45]),0,FVar(1))


[State 1005, This is for fossils]
type = Projectile
triggerall = vel x !=0 || vel y!=0
triggerall =  (var(0)=1 || var(0)=3 || var(1)=3) &&  root,numprojid(999)=0
trigger1 = root,animelem=4&& var(0)=1
trigger2= root,animelem=5 && var(0)=3
trigger3 = var(1)=3 
ProjID = 999
projanim = anim
projhitanim = -1
projremanim = -1
projedgebound = 120
projscale = 0,0
offset=-25*(var(0)=1),20*(var(0)=1)
projpriority = cond(var(0)=3,6,1)
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = vel x,vel y
persistent=0

[State 0, Helper]
type = Helper
trigger1 = root,animelem=3&& var(0)=1
trigger2= root,animelem=4 && var(0)=3
trigger3 = var(1)=3 
helpertype = normal ;player
name ="Reppuken"
ID = 6002
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99
persistent=0
[State 0, Helper]
type = Helper
trigger1 = root,animelem=3&& var(0)=1
trigger2= root,animelem=4 && var(0)=3
trigger3 = var(1)=3
helpertype = normal ;player
name ="Reppuken"
ID = 6003
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99
persistent=0
;ignorehitpause = 
;persistent =
[State 0, VarSet]
type = VarSet
triggerall = var(19)=1
trigger1 = vel x !=0
fv = 30    ;fv = 10
value = vel x 
[State 0, VarSet]
type = VarSet
triggerall = var(19)=1
trigger1 = vel y !=0
fv = 31   ;fv = 10
value = vel y 

[State 0, VelSet]
type = VelSet
trigger1 = var(19)>1
x = fvar(30)
y = fvar(31)
[State 0, VarSet]
type = Varadd
trigger1 = time=0
v = 19    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = var(19)>1&&time=0
[State 0: VelSet]
type = VelSet
triggerall = (var(0)=2 || var(0)=4)
trigger1 = var(1)=3 && vel x =0
x = FVar(0)
y = FVar(1)
[State 0, VarSet]
type = VarSet
trigger1 = p2bodydist x <0 && var(1)=2
trigger2 = root,facing =-1
trigger3 = vel x >0 && fvar(12)>180
v = 11   ;fv = 10
value = -1
; [State 0, Turn]
;type = Turn
;triggerall = (var(0)=2 || var(0)=4)  && var(11)=-1
;trigger1 = var(1)=3 
;persistent=0

;[State -3, Distance Between Player and the Nearest enemy]
;Type = VarSet
;trigger1 = 1
;fvar(10) = Exp(0.5*ln((((EnemyNear(0), Pos X) - (Pos X)) * (( EnemyNear(0), Pos X) - (Pos X)) + ((EnemyNear(0), Pos Y - Pos Y) * (EnemyNear(0), Pos Y - Pos Y)))))

[State 0, VarSet]
type = VarSet
trigger1 = EnemyNear(0),pos y!=0
fv = 10    ;fv = 10
value = EnemyNear(0), const(size.mid.pos.y)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = EnemyNear(0),pos y=0
fv = 10    ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
triggerall =fvar(0)>=1
triggerall = EnemyNear(0), Pos X != Pos X 
trigger1 =  var(4)>0|| time=0
fv = 21    ;fv = 10
value = cond(((EnemyNear(0), Pos X - (Pos X))<40 ),90,pos x) 
[State 0, VarSet]
type = VarSet
triggerall =fvar(0)<=-1
triggerall = EnemyNear(0), Pos X != Pos X 
trigger1 =  var(4)>0|| time=0
fv = 21    ;fv = 10
value = cond(((EnemyNear(0), Pos X - (Pos X))>-40 ),-90,pos x) 
[State -3, M]
Type = VarSet
trigger1 = EnemyNear(0), Pos X != Pos X && root,animelemtime(5)<0 && root,stateno=1000 && var(0)=1
trigger2 = (var(0)=2 || var(0)=4)&&var(1)!=3
trigger3 = EnemyNear(0), Pos X != Pos X && root,animelemtime(6)<0 && root,stateno=1002 && var(0)=3
fvar(11) = -(((fvar(10)+enemynear,pos y) - Pos Y)/(EnemyNear(0), Pos X - (enemynear,pos y)))

[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
trigger1 = EnemyNear(0), Pos X = Pos X
fvar(11) = 0
[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
triggerall =(fvar(0)=[-2,2])
trigger1= (var(0)=2 || var(0)=4)&&var(1)=3
fvar(11) = ifelse(p2bodydist y <0,-90,90)
[State -3, Angle]
Type = VarSet
trigger1 = vel y !=0
fvar(12) = Atan(fvar(11)) * ((180.0)/Pi) 
[State -3, Angle]
Type = VarSet
trigger1 =  vel x =0
fvar(12) = 0.0

;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 11   ;fv = 10
value = 1
;[State 0, ChangeAnim]
;type = ChangeAnim
;trigger1 =var(1)=3 && var(11)=-1
;value = 307
;persistent = 0
[State 0, Turn]
type = Turn
trigger1 = var(1)=2 && var(11)=-1
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
[State 0, VarSet]
type = VarSet
trigger1 =!movecontact  
fv = 35    ;fv = 10
value =cond((vel y =[-.3,.3]),0,cond((vel y <0&&vel x =[-.2,.2]),-90,((fvar(12) + (90*(fvar(0)<0)))*var(11))))
;ignorehitpause = 
;persistent = 


[State 0, AngleDraw]
type = AngleDraw

trigger1 = fvar(12)!=0&& (root,animelemtime(4)>0&&root,stateno=1000||root,stateno!=1000) && var(0)=1
trigger2 = (var(0)=2 || var(0)=4) && var(1)=3
;trigger3 = fvar(12)!=0&& (root,animelemtime(5)>0&&root,stateno=1002||root,stateno!=1002) && var(0)=3
value =fvar(35)
ignorehitpause =1 
;persistent = 




[State 0, TargetState]
type = TargetState
trigger1 = movehit=1 && (p2stateno!=2000)
value =2000
ID =201
ignorehitpause =1 

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
 
[State 0, VarSet]
type = parentVarSet
triggerall = enemy,movetype = H&&(p2stateno!=[120,155]) && var(0)=1
triggerall =  enemy,gethitvar(hitcount)>1
trigger1= movehit=1
fv =2 ;fv = 10
value = root,fvar(2)*.98
ignorehitpause=0
[State 0, VarSet]
type = parentVarSet
triggerall = enemy,movetype = H&&(p2stateno!=[120,155]) && var(0)=[2,3]
triggerall =  enemy,gethitvar(hitcount)>1
trigger1= movehit=1
fv =2 ;fv = 10
value = root,fvar(2)*.85
ignorehitpause=0
[State 0, VarSet]
type = parentVarSet
triggerall = enemy,movetype = H&&(p2stateno!=[120,155]) && var(0)=4
triggerall =  enemy,gethitvar(hitcount)>1
trigger1= movehit=1
fv =2 ;fv = 10
value = root,fvar(2)*.99
ignorehitpause=0

[State 0, VarSet]
type = Varadd
trigger1 = movehit=1 && p2movetype=H
v = 3   ;fv = 10
value = 1
[State 0, Helper]
type = Helper
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, StateTypeSet]
type = StateTypeSet
trigger1 = var(3)>=8
movetype = I;I,A,H
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type =  parentVarSet
trigger1 =  numtarget(201) && movehit && (var(0)=2 ||var(0)=4)
v =22    ;fv = 10
value =1
persistent=0
ignorehitpause=1
[State 0, ChangeState]
type = ChangeState
triggerall = numtarget(201) && movehit
triggerall = var(1)>2 || var(0)!=2
;triggerall = var(0)=[3,4]
trigger1 =pos y >=0 
trigger2 = (frontedgebodydist <15 ||backedgebodydist <15) && (vel y=0 || enemy,pos y <0)
trigger3 = screenpos y <-20
value =10003

[State 0, ChangeState]
type = ChangeState
;triggerall = var(0)!=2 
triggerall =!var(3) || var(0)<2 
trigger1 =movecontact && var(0)=1 
trigger2 = frontedgebodydist <-15&& (!movehit  || !numtarget(201) && var(1)=3) 
trigger3 = pos y >0&& (var(0)!=2&&var(0)!=4 || !numtarget(201)&& var(1)=3)
trigger4= moveguarded
trigger5= var(1)>0&&root,movetype=H && root,stateno!=[120,155]
value =10002


[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %f  vel x = %f absangle = %f angle = %f"
params = var(1), var(0), fvar(35), (fvar(12) + (90*(fvar(0)<0)))*var(11)
ignorehitpause = 1
;persistent = 

;
[State 0, DestroySelf]
type = DestroySelf
triggerall=var(1)<=1 || var(0)!=2  &&var(0)!=4|| var(1)=3
triggerall=var(1)=3||root,movetype=H && root,stateno!=[120,155]
trigger1 = anim=305 && root,stateno!=[1000,1002]
trigger2 = frontedgebodydist <-60 || backedgebodydist<-60



;--------------------------------------------------------------------------------------------
[Statedef 10002]
type= A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = ifelse(var(3)=0,-4,((Parentdist X)/13)),-8
sprpriority = 2

[State 0, VelAdd]
type = VelAdd
trigger1 =1 
y = .5
;ignorehitpause = 
;persistent = 
[State 1121,VelMul]
type = VelMul
trigger1 =1
x = .925

[State 0, VarAdd]
type = parentVarAdd
triggerall = roundstate=2
trigger1 = time=0 && var(3)=0 && var(0)=1 && root,fvar(4)=0
v =  10   ;fv = 
value = -1
[State 0, Trans]
type = Trans
trigger1 =1 
trans = add 
ignorehitpause = 1
[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
;ignorehitpause = 
;persistent = 

[State 0, HitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
ignorehitpause = 1
persistent = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = (time*64)+fvar(12)
ignorehitpause=1

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

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



;[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 0, VarSet]
type = parentVaradd
trigger1 = (parentdist x =[-40,10]) && (parentdist y =[40,65])
v = 10    ;fv = 10
value = 1

;ignorehitpause = 
;persistent = 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %f  vel x = %f"
params = parentdist x, var(13) 
ignorehitpause = 1
;
[State 1002, Destroy]
type = destroyself
trigger1 = (parentdist x =[-40,10]) && (parentdist y =[40,65])|| pos y >0

;--------------------------------------------------------------------------------------------
[Statedef 10003]
type= S
movetype= I
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority =5
;facep2=1

;persistent = 

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

;flag = unguardable

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

;elem = 1
;ignorehitpause = 
;persistent = 


[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = fvar(35)
;ignorehitpause = 
;persistent = 

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
;ignorehitpause = 
;persistent = 

[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
ignorehitpause =1 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = pos y >0
y = -5
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type =  parentVarSet
trigger1 =  pos y >=-5 && (var(0)=2 ||var(0)=4)
trigger2 = ishelper(1004) && p2stateno=2000 && p2movetype=H
v =22    ;fv = 10
value =1
persistent=0
ignorehitpause=1
[State 0, VarSet]
type = parentVarSet
trigger1 = ishelper(1002)
trigger2 =ishelper(1003)
v = 7   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = parentVarSet
trigger1 = frontedgebodydist <30 && (pos y <-5 ||var(0)=3) 
v =22    ;fv = 10
value =2
persistent=0
ignorehitpause=1
[State 0, VarSet]
type = parentVarSet
trigger1 = screenpos y <-20
v =22    ;fv = 10
value =3
persistent=0
ignorehitpause=1
[State 0, TargetBind]
type = TargetBind
triggerall =root,stateno!=3000
triggerall = root,stateno!=1003 || root,stateno=1003 && animelemtime(3)<0
triggerall = var(0)!=4
triggerall = var(0)!=3
trigger1 =enemy,pos y<0 
time = 1
id = 201
pos = 0,fvar(4)
ignorehitpause = 1

[State 0, TargetBind]
type = Bindtotarget
triggerall =root,stateno!=3000
triggerall = root,stateno!=1003 || root,stateno=1003 && animelemtime(3)<1
triggerall = var(0)=3
trigger1 =1
time = 1
id = 201
pos = 0,-fvar(4)
ignorehitpause =1

[State 0, TargetBind]
type = Bindtotarget
triggerall =root,stateno!=3000
triggerall = pos y =-5 && var(0)!=3 && var(0)!=4
triggerall = root,stateno!=1003 || root,stateno=1003 && animelemtime(3)<1
trigger1 = 1
time = 1
id = 201
pos = 0,0
ignorehitpause =1
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = vel x =0 && vel y =0
v = 10    ;fv = 10
value = 75+((root,fvar(4)>0)*40)
;ignorehitpause = 
persistent =0
[State 0, PlaySnd]
type = PlaySnd
trigger1=pos y <-5 && time=0 
value = S2,2
channel=2
[State 0, EnvShake]
type = EnvShake
trigger1 =pos y <-5 && time=0
time = 6
freq = 60
ampl = -4
phase = 90
;ignorehitpause = 
;persistent = 

[State 1027, Spark]
type = Explod
trigger1 = pos y <-5 && time=0
anim = F72
pos = 0, floor(screenpos y)
postype = front
sprpriority = 3 
facing=-1
[State 0, VarSet]
type = Varadd
triggerall = ishelper(1002)
trigger1 =var(10)>0
v = 10    ;fv = 10
value = -1

[State 0, VarSet]
type = Varadd
triggerall = helper(1002),stateno!=10003
triggerall = ishelper(1004)
trigger1 =var(10)>0
v = 10    ;fv = 10
value = -1
;scale = 
;ignorehitpause = 
;persistent =
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = root,stateno=1003 && root,animelem=3
v =19     ;fv = 
value = 1
;ignorehitpause = 
;persistent = 
;[State 0, TargetVelSet]
;type = TargetVelSet
;trigger1 =root,stateno=1003 && root,animelem=3
;x = -2
;y =-7
;ID = 201
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
trigger1 =root,stateno=1003 && root,animelem=3
value =301
ID = 201 
[State 0, ChangeState]
type = ChangeState
trigger1 =root,stateno=1003 && root,animelem=3
;trigger2=root,var(23)=1
value =10004
;anim =
;ignorehitpause = 
;persistent = 
[State 0, TargetDrop]
type = TargetDrop
trigger1 = var(10)<=0 
trigger2=root,numhelper(1001) 
trigger2= helper(1001),movehit
trigger3 = root,stateno=1010 && root,movehit
;excludeID = -1
;keepone = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, Helper]
type = Helper
triggerall = root,var(21)=1
triggerall = NumTarget(201)
trigger1 =time=0
helpertype = normal ;player
name = "flames"
ID = 8000
stateno = 8001
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
triggerall = root,var(21)=1
triggerall = NumTarget(201)
trigger1 = time=0
anim = 3008
ID = 1006
pos = 0,-pos y
postype = p1
facing = 1
vfacing = 1
bindtime =1
scale =1,1.5
ontop = 1
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0
removeongethit=1

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

[State 1002, Destroy]
type = destroyself
trigger1 = var(10)<=0 
trigger2=root,numhelper(1001) 
trigger2= helper(1001),movehit
trigger3 = root,stateno=1010 && root,movehit
trigger4 = time>150 && ishelper(1004)
trigger5=root,stateno=[800,831]
trigger6 = root,stateno=1005 && root,movehit
trigger7 = root,stateno=3000 && root,movehit 
trigger8 = root,var(21)=1
;--------------------------------------------------------------------------------------------
[Statedef 10004]
type= A
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
anim=307
velset = 0,0
sprpriority =5

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

[State 0: Null]
type = Null
trigger1 = time=0
trigger1 = (FVar(0) := (parentdist x * 13) / (Exp(0.5*ln((parentdist x* parentdist x) + (-50* -50)))))
trigger1 = (FVar(1) := ((parentdist y -50)* 13) / (Exp(0.5*ln((parentdist x * parentdist x) + (-50 * -50)))))

[State 0: VelSet]
type = VelSet
trigger1 = time=0
x = FVar(0)
y = FVar(1)
;ignorehitpause = 
;persistent =
[State 0, Trans]
type = Trans
trigger1 =1 
trans = add 
ignorehitpause = 1
[State 29, VarSet]
type = parentVarSet
trigger1 = 1
v = 29    ;fv = 10
value = 1
;[State -3, Distance Between Player and the Nearest enemy]
;Type = VarSet
;trigger1 = time=0
;fvar(10) = Exp(0.5*ln((((root, Pos X) - (Pos X)) * (( root, Pos X) - (Pos X)) + (((root, Pos Y-50) - Pos Y) * ((root, Pos Y-50) - Pos Y)))))

[State 0, VarSet]
type = VarSet
triggerall =fvar(0)>=1
triggerall = EnemyNear(0), Pos X != Pos X 
trigger1 = time=0
fv = 21    ;fv = 10
value = cond(((root, Pos X - (Pos X))<40 ),90,pos x) 
[State 0, VarSet]
type = VarSet
triggerall =fvar(0)<=-1
triggerall = EnemyNear(0), Pos X != Pos X 
trigger1 =   time=0
fv = 21    ;fv = 10
value = cond(((root, Pos X - (Pos X))>-40 ),-90,pos x) 
[State -3, M]
Type = VarSet
trigger1 = time=0
fvar(11) = -(((fvar(10)+enemynear,pos y) - Pos Y)/(root, Pos X - (p2bodydist y )))

[State -3, M]
Type = VarSet
trigger1 = time=0
fvar(11) = -(((root, Pos Y+50) - Pos Y)/((root, Pos Y+50)- Pos X))

[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
trigger1 = root, Pos X = Pos X
fvar(11) = 0

[State -3, Angle]
Type = VarSet
trigger1 = vel x =0
fvar(12) = Atan(fvar(11)) * (180.0/Pi) ;Angle given in degrees. 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =1
value = fvar(12)
ignorehitpause =1 
[State 0, VarSet]
type = VarSet
trigger1 = (parentdist x =[-35,20]) && (parentdist y =[35,65])
v =30    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarAdd]
type = parentVarAdd
triggerall = var(30)=1
trigger1 = (parentdist x =[-25,10]) && (parentdist y =[40,65])
v =  10   ;fv = 
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = parentVarset
trigger1 = (parentdist x =[-25,10]) && (parentdist y =[40,65])
v = 13    ;fv = 10
value = 1
persistent=0
[State 1002, Destroy]
type = destroyself
triggerall = var(30)=1
trigger1 = (parentdist x =[-25,10]) && (parentdist y =[40,65])
;---------------------------------------------------------------------------------
[Statedef 10005]
type=A
movetype=I
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =306
sprpriority = 2
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
ignorehitpause = 1

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(3)>=0 && root,animelemtime(4)<0
time = 1
pos = 3,-110
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(4)>=0 && root,animelemtime(5)<0
time = 1
pos = 20,-100
[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,animelemtime(5)>=0 
time = 1
pos = 47,-42
ignorehitpause = 1
;persistent = 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = root,animelemtime(3)>=0 && root,animelemtime(4)<0
value = 35
[State 0, AngleDraw]
type = AngleDraw
trigger1 = root,animelemtime(4)>=0 && root,animelemtime(5)<0
value = 45
[State 0, AngleDraw]
type = AngleDraw
trigger1 = root,animelemtime(5)>=0 
value = -90


[State 1002, Destroy]
type = destroyself
trigger1 = root,stateno!=1005
;--------------------------------------------------------------------------
[StateDef 10006]
type =A
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =305
poweradd =0
sprpriority=9
[State 0: Null]
type = Null
;trigger1 = time=0
trigger1 = (FVar(0) := (P2Dist X * 11+(1*((var(0)=2 || var(0)=4)))) / (Exp(0.5*ln((P2Dist X* P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := ((P2Dist Y+fvar(10)) * 11) / (Exp(0.5*ln((P2Dist X * P2Dist X) + ((P2Dist Y+fvar(10)) * (P2Dist Y+fvar(10)))))))
[State 0, VarSet]
type = VarSet
trigger1 = EnemyNear(0),pos y!=0
fv = 10    ;fv = 10
value = EnemyNear(0), const(size.mid.pos.y)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = EnemyNear(0),pos y=0
fv = 10    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = fvar(0)>0
fv = 2    ;fv = 10
value =  atan(FVar(0)/FVar(1))*(180 /PI)
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =fvar(0)<0
fv = 2    ;fv = 10
value = atan(FVar(0)/FVar(1))+180
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = fvar(2)

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "fvar(1) = %f  fvar(0) = %f angle = %f"
params = fvar(1),fvar(0),fvar(2)
;ignorehitpause = 
;persistent = 

;[State 1002, Destroy]
;type = destroyself
;trigger1 = time =20
;--------------------------------------------------------------------------
;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 1101]
type= S
movetype= A
physics = S
poweradd= 0
ctrl = 0
anim = 1101
sprpriority = 2

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

[State 0, BindToParent]
type = BindToParent
triggerall = parent,stateno =3052
trigger1 = 1
time = 1
pos = 87,-64
ignorehitpause =1
persistent = 1

;persistent = 

[State 0, BindToParent]
type = BindToParent
triggerall = parent,stateno =4002
trigger1 = 1
time = 1
pos = 87,-64
ignorehitpause =1
persistent = 1

[State 0, BindToParent]
type = BindToParent
triggerall = parent,stateno =3065
trigger1 = 1
time = 1
pos = -87,-44
ignorehitpause =1
persistent = 1


[State 0, BindToParent]
type = BindToParent
triggerall = parent,stateno =4050
trigger1 = 1
time = 1
pos = 105,0
ignorehitpause =1
persistent = 1

[State 0, BindToParent]
type = BindToParent
triggerall = parent,stateno =4051
trigger1 = 1
time = 1
pos = 45,-85
ignorehitpause =1
persistent = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = parent,var(14) = 1
value =  -30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = parent,var(14) = 2
value =  30

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

[State 0, DestroySelf]
type = changestate
trigger1 = parent,stateno !=3052
trigger1 = parent,stateno !=3064
trigger1 = parent,stateno !=3065
trigger1 = parent,stateno !=4002
trigger1 = parent,stateno !=4050
trigger1 = parent,stateno !=4051
value= 1102
;-----------------------------------------------------------------------
[Statedef 1102]
type= S
movetype= A
physics = S
poweradd= 0
ctrl = 0
anim = 1102

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = parent,var(14) = 1
value =  -30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = parent,var(14) = 2
value =  30


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

[State 0, DestroySelf]
type = destroyself
trigger1 = animtime = 0
;------------------------------------------------------------------------------
[Statedef 1401]
type= S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =1001
sprpriority = 2

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,4

[State 0, VelSet]
triggerall = !movecontact
type = VelSet
trigger1 =1
x = 8

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

[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 210, 2]
type = HitDef
trigger1 =  time > 0
attr = S, HP
animtype  = Medium
damage= 190,10
guardflag = MA
pausetime = 2,2
sparkno = S7010+(random%4)
guard.sparkno = -1
sparkxy = 0,-4
hitsound   =  S100,1
guardsound = S2, 7
ground.type = High
ground.slidetime = 70
ground.hittime  = 70
ground.velocity = 0
guard.velocity = -7
air.velocity = 0,-5
getpower = 0
givepower = 0
air.fall=1
fall.recover= 0

[State 0, Helper]
type = Helper
trigger1 = movecontact && numhelper(1402) <1
helpertype = normal ;player
name ="Reppuken"
ID = 1402
stateno = 1402
pos = 0,0
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =1.4
size.yscale =1.8


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



[State 210, 5]
type = ChangeState
trigger1 = movecontact||  ((frontedgedist <= -90 || backedgedist <= -90) && time > 5)
value = 1002
;--------------------------------------------------------------------------------------------
[Statedef 1402]
type= S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1102
sprpriority = 2



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


[State 0, AngleDraw]
type = AngleDraw
trigger1 =  1
value = -90

[State 0, Trans]
type = Trans
trigger1 =1
trans = add1
;ignorehitpause =
;persistent =


[State 1002, Destroy]
type = destroyself
trigger1 = animtime = 0
;-----------------------------------------------------------------------
[Statedef 1216]
type= S
movetype= A
physics = S
poweradd= 0
ctrl = 0
anim = 1101
sprpriority = 9

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = parent,stateno =1211
value =  -60

[State 0, AngleDraw]
type = AngleDraw
trigger1 = parent,stateno =1212
trigger2 = parent,stateno =4001
value =  -53

[State 0, BindToParent]
type = BindToParent
trigger1 =parent,stateno =1211
time = 1
pos = 44,-8
ignorehitpause = 1
persistent = 1
[State 0, BindToParent]
type = BindToParent
trigger1 =parent,stateno =1212
trigger2 = parent,stateno =4001
time = 1
pos = 59,-20
ignorehitpause = 1
persistent = 1

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


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

[State 0, DestroySelf]
type = changestate
triggerall =parent,stateno =1211
trigger1 = pos y > -30
value = 1217

[State 0, DestroySelf]
type = changestate
triggerall =parent,stateno =1212|| parent,stateno =4001
trigger1 = pos y > -30
value = 1217

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, movetype = H || parent,stateno  = 102 || parent,stateno = 52

;-----------------------------------------------------------------------
[Statedef 1217]
type= S
movetype= A
physics = S
poweradd= 0
ctrl = 0
anim = 1102
sprpriority = 9

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value =  -60

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


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

[State 0, DestroySelf]
type = destroyself
trigger1 = animtime =0
;--------------------------------------------------------------------------
[StateDef 3001]
type =A
movetype=A
physics = N
juggle  = 0
velset = 0,-9
ctrl = 0
anim =3002
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, AngleDraw]
type = AngleDraw
trigger1 = time%2=0 && anim=3002
value = 1
scale = .8,.8

[State 0, VelSet]
type = VelSet
trigger1 = time=10
y = 0
;ignorehitpause = 
;persistent = 


[State 0, Helper]
type = Helper
Trigger1 = time=25
helpertype = normal ;player
name ="Reppuken"
ID = 3011
stateno = 3002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.25
size.yscale=.31
pausemovetime=120
supermovetime=120

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




;ignorehitpause = 
;persistent = 


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

;persistent = 

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

[State 0, VarSet]
type = Varadd
trigger1 =time>25 && p2stateno!=3002
v = 1   ;fv = 10
value = 1
ignorehitpause=0
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>30&& p2stateno!=3002
;value =  (winmugen only)
scale =  1,1-(var(1)*.09)
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=A
physics = N
juggle  =0
velset = 0,0
ctrl = 0
poweradd =0
sprpriority=9
anim=3007

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "p2d =%f at = %f var(0) = %f var(1) = %f \n vel x = %f 11= %d"
params = p2bodydist x, -Atan(fvar(11)) * ((180.0*var(11))/Pi) ,fvar(0),fvar(1),((fvar(10)+enemynear,pos y)-fvar(20)),var(11)
ignorehitpause = 1
;persistent = 


[State 0, Trans]
type = Trans
trigger1 =1 
trans =  add;, addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 11   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 =time=0
fv = 10    ;fv = 10
value = EnemyNear(0), const(size.head.pos.y)
[State 0: Null]
type = Null
trigger1 = var(4)>0 || time=0
trigger1 = (FVar(0) := cond( (p2bodydist x =[-2,2]),0,(P2Dist X * 13) / (Exp(0.5*ln((P2Dist X* P2Dist X) + (P2Dist Y * P2Dist Y))))))
trigger1 = (FVar(1) :=  cond(pos y>=0,-13,((P2Dist Y+fvar(10)) * 13) / (Exp(0.5*ln((P2Dist X * P2Dist X) + ((P2Dist Y+fvar(10)) * (P2Dist Y+fvar(10))))))))

[State 0, VarSet]
type = VarSet
trigger1 =var(4)<=0 
v = 3   ;fv = 10
value =0
;ignorehitpause = 
;persistent = 

;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
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 = 0
supermovetime =999
pausemovetime = 999
ignorehitpause = 1
persistent=0


[State 0, VelSet]
type = varSet
trigger1 = var(4)>0 && p2bodydist x =[-1,1]
fv =1
value= ifelse((p2bodydist y <-0+fvar(10)||pos y >=0),-13,13)

;[State 0, Turn]
;type = Turn
;trigger1 = var(4)=39 && p2bodydist x <-15
[State 0: VelSet]
type = VelSet
trigger1 = var(3)=0
x = FVar(0);*var(11)
y = FVar(1)

;ignorehitpause = 
;persistent = 

;  [State 0, Turn]
;type = Turn
;triggerall =  var(11)=-1 && vel y <=0; &&time=0
;trigger1 = 1
;persistent=0
;[State 0, VarSet]
;type = VarSet
;trigger1 = p2bodydist x <-15&& time<=0
;v = 11   ;fv = 10
;value = -1

;[State 0, VarSet]
;type = VarSet
;trigger1 = ishelper(3009)
;;trigger2= ishelper(3008)
;v = 10    ;fv = 10
;value = 1
;ignorehitpause = 
;persistent = 
;[State 0, VarSet]
;type = VarSet
;trigger1 = ishelper(3007)
;v = 12   ;fv = 10
;value = 1


;ignorehitpause = 
;persistent = 


[State 0, VarSet]
type = VarSet
triggerall =fvar(0)>=1
triggerall = EnemyNear(0), Pos X != Pos X 
trigger1 =  var(4)>0|| time=0
fv = 21    ;fv = 10
value = cond(((EnemyNear(0), Pos X - (Pos X))<40 ),60,pos x) 
[State 0, VarSet]
type = VarSet
triggerall =fvar(0)<=-1
triggerall = EnemyNear(0), Pos X != Pos X 
trigger1 =  var(4)>0|| time=0
fv = 21    ;fv = 10
value = cond(((EnemyNear(0), Pos X - (Pos X))>-40 ),-60,pos x) 
[State -3, M]
Type = VarSet
trigger1 =  var(4)>0|| time=0
fvar(11) = (((fvar(10)+enemynear,pos y) - pos y)/(EnemyNear(0), Pos X - p2bodydist y ));-(atan(FVar(1)/(FVar(0))) + (3*pi/2)) *(ifelse(var(11)=-1,ifelse(vel y >0 &&var(10),-160,-180),ifelse(var(12),220,240))/Pi)

[State 0, VarSet]
type = VarSet
trigger1 = fvar(0)<0 && var(4)=38
trigger2= time=0
v = 11    ;fv = 10
value = -1*facing
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = fvar(0)>=0&& var(4)=5
trigger2= time=0
v = 11    ;fv = 10
value = 1*facing

[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
triggerall =(fvar(0)=[-2,2])
trigger1= var(4)>0 || time=0
fvar(11) = ifelse(p2bodydist y  <0,90,-90)
[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
triggerall = FVar(1)=0
trigger1=fvar(1)=0 && var(4)>0 || time=0
fvar(11) = 0
[State -3, Angle]
Type = VarSet
trigger1 =var(4)>0|| time=0
fvar(12) = -Atan(fvar(11)) * ((180.0*var(11))/Pi) 

[State 0, VarSet]
type = VarSet
trigger1 = var(5)>=4
v = 4   ;fv = 10
value = 40
[State 0, VarAdd]
type = VarAdd
trigger1 = var(4)>0 
v =4
value = -1
;ignorehitpause = 
;persistent = 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4)=0
movetype = A
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4)>0
movetype = I
;ignorehitpause = 
;persistent = 

[State 0, Helper]
type = Helper
trigger1 = var(3)=0
trigger1 = var(8)=0
helpertype = normal ;player
name ="Reppuken"
ID = 6002
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99
[State 0, Helper]
type = Helper
trigger1 = var(3)=0
trigger1 = var(8)=0
helpertype = normal ;player
name ="Reppuken"
ID = 6003
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99

[State 0, VarSet]
type = VarSet
trigger1 =var(3)=0 
v = 8    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 =var(4)>0 
v = 3   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =var(3)=1
v = 8    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 11   ;fv = 10
value = 1

;ignorehitpause = 
;  [State 0, Turn]
;type = Turn
;triggerall =  var(11)=-1 && vel y <=0 
;trigger1 = 1
;persistent=0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(4)=0
value = fvar(12)
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 = var(4)>0
value = time*26
ignorehitpause =1 
    ;I,A,H
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 =  var(4)>0
x = 0
y = 0
[State 0, VarSet]
type = Varadd
trigger1 = movecontact || var(6)>=9&&var(8)=0 || fvar(1)>0&& pos y >0 && var(3)=0 ||(frontedgebodydist <-60 || backedgebodydist<-60)&& var(3)=0 
v = 5   ;fv = 10
value = 1

[State 0, PosSet]
type = PosSet
trigger1 = pos y >0
y = 15
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 8   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = movecontact
v = 8   ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
       ;I,A,H
;ignorehitpause = 
;persistent = 
[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = var(4)=1
;ignorehitpause = 
;persistent = 

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


[State 0, VarSet]
type = VarSet
trigger1 = var(4)>0
v = 5    ;fv = 10
value = 0
[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = !movecontact
attr = S, HP
animtype  = Hard
damage= 30, 5
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 2,ifelse(p2statetype=A,16,2)
getpower=10
sparkxy = 0,-0
sparkno =-1
guard.sparkno= S7500
guardsound = S6, 0
hitsound= S4,1
ground.type = high
ground.slidetime = 32
ground.hittime  = 16
guard.ctrltime=16
ground.velocity = -0
air.velocity = -4,-5
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recover=0
ground.cornerpush.veloff=0
ID =200
palfx.time = 16
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,1
palfx.invertall = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =ifelse(root,var(22)>0,2000,201)
ID =200
ignorehitpause =1 
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype!= A && movehit=1 && (p2stateno!=[201,203]) && root,var(22)
value =2000
ID =200
ignorehitpause =1 
[State 0, Helper]
type = Helper
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
;anim =
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = root,var(36)=0
trigger2= root,movetype=H && root,stateno!=[120,155]
value =10002
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

;[State 0, DestroySelf]
;type = DestroySelf
;trigger1= frontedgebodydist <-60 || backedgebodydist<-60
;-----------------------------
[StateDef 3100]
type = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 8100
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 4004]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 5999
ctrl = 0
sprpriority = 5

[State 0, VarSet]
type = parentVarSet
trigger1 = time = 0
fv = 4   ;fv = 10
value = 390

[State 0, VarAdd]
type = parentVarAdd
triggerall = parent,fvar(4) >0
trigger1 = 1
fv = 4    ;fv =
value = -1.0
ignorehitpause=1

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

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =1
ID = 16011
removetime = -1
shadow = 0,0,0
ownpal = 1
scale =  (root,fvar(4) * 0.0012820512820513),.75
ignorehitpause=1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,fvar(4) <= 0
trigger2 = roundstate !=2
id =16010
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,fvar(4) <= 0
trigger2 = roundstate !=2
id =16011


[State 911, Destroy]
type = destroyself
trigger1 = parent,fvar(4) <= 0
trigger2 = roundstate !=2
;---------------------------------------------------------------------------\
;Airdash FX
;---------------------------------------------------------------------------/
[Statedef 6002]
type = U 
physics = N   
anim =308
sprpriority = cond(ishelper(6002),4,-4)

[State 0, Null]
type = Null
triggerall = time=0 && (root,numhelper(30622)||parent,var(21)>0)
trigger1 = parent,var(21)=0
trigger1= var(0):=1
trigger1 = fvar(1):=helper(30622),fvar(12)
trigger2 = parent,var(21)=1
trigger2= var(0):=1
trigger2 = fvar(1):=helper(30623),fvar(12)
trigger3 =parent,var(21)=2
trigger3= var(0):=1
trigger3 = fvar(1):=helper(30624),fvar(12)
trigger4 =parent,var(21)=3
trigger4= var(0):=1
trigger4= fvar(1):=helper(30625),fvar(12)
trigger5 =parent,var(21)=4
trigger5= var(0):=1
trigger5 = fvar(1):=helper(30626),fvar(12)
trigger6 =parent,var(21)=5
trigger6= var(0):=1
trigger6 = fvar(1):=helper(30627),fvar(12)
trigger7 =parent,var(21)=6
trigger7= var(0):=1
trigger7 = fvar(1):=helper(30628),fvar(12)
trigger8 = parent,var(21)=7
trigger8= var(0):=1
trigger8 = fvar(1):=helper(30629),fvar(12)
trigger9 =parent,var(21)=8
trigger9= var(0):=1
trigger9 = fvar(1):=helper(30630),fvar(12)
trigger10 =parent,var(21)=9
trigger10= var(0):=1
trigger10 = fvar(1):=helper(30631),fvar(12)
trigger11 =parent,var(21)=10
trigger11= var(0):=1
trigger11 = fvar(1):=helper(30632),fvar(12)
trigger12 =parent,var(21)=11
trigger12= var(0):=1
trigger12 = fvar(1):=helper(30633),fvar(12)
trigger13 =parent,var(21)=12
trigger13= var(0):=1
trigger13 = fvar(1):=helper(30634),fvar(12)
trigger14 =parent,var(21)=13
trigger14= var(0):=1
trigger14 = fvar(1):=helper(30635),fvar(12)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(6002)
value = anim
elem = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(6003)
value = anim
elem = 2

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,numhelper(1001)
fv = 0    ;fv = 10
value = helper(1001),fvar(35)
[State 0, VarSet]
type = VarSet
trigger1 = root,numhelper(1002)
fv = 0    ;fv = 10
value = helper(1002),fvar(35)
[State 0, VarSet]
type = VarSet
trigger1 = root,numhelper(3011)
fv = 0    ;fv = 10
value = helper(3011),fvar(12)
[State 0, VarSet]
type = VarSet
trigger1 = root,numhelper(1049)
fv = 0    ;fv = 10
value = helper(1049),fvar(12)

[State 0, VarSet]
type = VarSet
trigger1 = root,numhelper(30602) 
fv = 0    ;fv = 10
value = helper(30602),fvar(12)
[State 0, VarSet]
type = VarSet
trigger1 = var(0)
fv = 0    ;fv = 10
value = fvar(1)
[State 6090, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 0, BindToParent]
type = BindToParent
trigger1 = time<3
time = 1
facing = 0
pos = 0,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0 && root,anim!=3061
trigger2 = time = 0 &&  (parent,var(0)=1 ||  parent,var(0)=7)
value = S300,0
channel = 2
volumescale=50

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

[State 0, Trans]
type = Trans
trigger1 =1
trans =add
[State 0, AngleDraw]
type = Angledraw
trigger1 = 1
value=ceil(fvar(0))
scale=(time*.08),(time*.08)
[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 100,40,180
mul = 170,20,255
sinadd = 85,110,55,1
invertall = 0
color = 60
[State 0, VarSet]
type = Varadd
trigger1 = time >4
v = 1   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

[State 0, Trans]
type = Trans
trigger1 = var(1)=1
trans = addalpha;, sub
alpha = 175,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=2
trans = addalpha;, sub
alpha = 150,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=3
trans = addalpha;, sub
alpha = 125,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=4
trans = addalpha;, sub
alpha = 100,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=5
trans = addalpha;, sub
alpha = 75,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=6
trans = addalpha;, sub
alpha = 50,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=7
trans = addalpha;, sub
alpha = 25,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=8
trans = addalpha;, sub
alpha = 10,256
[State 7180, end]
type = destroyself
trigger1 = time = 12
;---------------------------------------------------------------------------\
;Airdash FX
;---------------------------------------------------------------------------/
[Statedef 6003]
type = U 
physics = N   
anim =8104
[State 6090, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,1
channel = 2
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, Trans]
type = Trans
trigger1 =1
trans =add
[State 0, AngleDraw]
type = Angledraw
trigger1 = 1
scale=.47+(time*.02),.47+(time*.02)

[State 1002, 1]
type = AfterImage
trigger1 = 1
time = 5
framegap = 1
length = 2
PalAdd = 0, 0, 0
PalMul = 1, 1, 1
PalContrast = 255-((Time)*12), 255-((Time)*12), 255-((Time)*12)
trans = Add
[State 7180, end]
type = destroyself
trigger1 = time = 20
;---------------------------------------------------------------------------/
[Statedef 6004]
type = U 
physics = N   
anim =10000
sprpriority = 0

;ignorehitpause = 
;persistent = 

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


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

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

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 75,30,160
mul = 170,20,255
sinadd = 85,110,55,1
invertall = 0
color = 60
[State 0, VarRandom]
type = Varset
trigger1 = 1
v = 0
value = random%50
ignorehitpause = 1
;persistent = 

[State 0, Explod]
type = Explod
trigger1 =  1
anim = 3065
ID = 3065
pos = (var(0)-((var(0)>25)*2))*cond(var(0)>25,-1,1),0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = (random%3)*cond(var(0)>25,-1,1),cond(random%2,8,-8)
scale = const(size.yscale),const(size.yscale)
ontop = 1
 
sprpriority = 9
shadow = 0,0,0
ownpal = 0
removeongethit=1
[State 7180, end]
type = destroyself
trigger1 = time = 165
;---------------------------------------------------------------------------/
[Statedef 6005]
type = U 
physics = N   
anim =308
sprpriority = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(6002)
value = anim
elem = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(6003)
value = anim
elem = 2
;ignorehitpause = 
;persistent = 
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 90
;scale = 
;ignorehitpause = 
;persistent = 

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


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

[State 0, Trans]
type = Trans
trigger1 =1
trans =add
[State 0, AngleDraw]
type = Angledraw
trigger1 = 1
value=-90
scale=(time*.12),(time*.12)
[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 100,40,180
mul = 170,20,255
sinadd = 85,110,55,1
invertall = 0
color = 60
[State 0, VarSet]
type = Varadd
trigger1 = time >4
v = 1   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

[State 0, Trans]
type = Trans
trigger1 = var(1)=1
trans = addalpha;, sub
alpha = 175,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=2
trans = addalpha;, sub
alpha = 150,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=3
trans = addalpha;, sub
alpha = 125,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=4
trans = addalpha;, sub
alpha = 100,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=5
trans = addalpha;, sub
alpha = 75,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=6
trans = addalpha;, sub
alpha = 50,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=7
trans = addalpha;, sub
alpha = 25,256
[State 0, Trans]
type = Trans
trigger1 =  var(1)=8
trans = addalpha;, sub
alpha = 10,256
[State 7180, end]
type = destroyself
trigger1 = time = 12
;-------------------------------------------------------------------------------
[StateDef 6006]
type = U
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim =10000
poweradd = 0
[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 100,40,180
mul = 170,20,255
sinadd = 85,110,55,1
invertall = 0
color = 60
ignorehitpause=1
[State 0, Explod]
type = Explod
trigger1 =  time%2=0
anim = 3065
ID = 3065
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
scale =.5,.5
ontop = 1
sprpriority = 9
shadow = 0,0,0
ownpal = 0
removeongethit=1


[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -4.75*(sin(0.095*time))
y = 4.5
[State 7180, end]
type = destroyself
trigger1 = pos y >0
;-------------------------------------------------------------------------------
[StateDef 6007]
type = U
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim =7511
poweradd = 0

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


[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 15*var(0)
[State 0, Trans]
type = Trans
trigger1 =1
trans = addalpha;, sub
alpha = 255-((time)*51),255
ignorehitpause=1

[State 7180, end]
type = destroyself
trigger1 = time =4

;-------------------------------------------------------------------------------
[StateDef 7000]
type = A
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim =10000
poweradd = 0


[State 0, Explod]
type = Explod
trigger1 =time=0
anim =11011
ID = 11011
pos = ifelse(teamside=1,25,263),ifelse(GameHeight=180,36,50)
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = .10,.10
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
supermovetime =999
pausemovetime = 999
ignorehitpause =1

[State 0, Explod]
type = Explod
trigger1 =time=0
anim =11012
ID = 11011
pos = ifelse(teamside=1,25,263),ifelse(GameHeight=180,36,50)
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = .10,.10
sprpriority = 8
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
supermovetime =999
pausemovetime = 999
ignorehitpause =1

;----------
[State 0, Explod]
type = Explod
trigger1 =1
anim =11000+(var(57)/10)
ID = 11000
pos = ifelse(teamside=1,45,281),ifelse(GameHeight=180,33,45)
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 = 9
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
supermovetime =999
pausemovetime = 999
removetime = 1
ignorehitpause = 1

;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 =1
anim =11000+(var(57)%10)
ID = 11001
pos = ifelse(teamside=1,52,289),ifelse(GameHeight=180,33,45)
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 = 9
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
supermovetime =999
pausemovetime = 999
removetime = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1= 1
v = 57   ;fv = 10
value = root,var(10)
;ignorehitpause =
;persistent =
;-------------
[State 0, Explod]
type = Explod
trigger1 =time=0
anim =11010
ID = 11005
pos = ifelse(teamside=1,34,270),ifelse(GameHeight=180,34,46)
postype = left  ;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
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
supermovetime =999
pausemovetime = 999
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,anim=3061 
trigger2 = p2stateno=[3060,3069]
id = 11011
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,anim=3061 
trigger2 = p2stateno=[3060,3069]
id = 11005
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,anim=3061
trigger2 = p2stateno=[3060,3069] 
id = 11001
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,anim=3061 
trigger2 = p2stateno=[3060,3069]
id = 11000
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,anim=3061 
trigger2 = p2stateno=[3060,3069]
id = 11011
;ignorehitpause = 
;persistent = 


;ignorehitpause =
;persistent =

[State 192, end]
type = destroyself
trigger1 =roundstate!=2


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


[State 0, AngleDraw]
type = AngleDraw
trigger1 = time%2=0
value = 1
scale = .7,.7 
;ignorehitpause = 
;persistent = 
[State 0, Trans]
type = Trans
trigger1 =1 
trans =  add;, addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3001)
v = 21    ;fv = 10
value = 3001
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3002)
v = 21    ;fv = 10
value = 3002
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3003)
v = 21   ;fv = 10
value = 3003
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3004)
v = 21    ;fv = 10
value = 3004
[State 0, VrSet]
type = VarSet
trigger1 = ishelper(3005)
v =21    ;fv = 10
value = 3005
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3006)
v = 21   ;fv = 10
value = 3006
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3007)
v = 21   ;fv = 10
value = 3007
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3008)
v = 21    ;fv = 10
value = 3008
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3009)
v = 21    ;fv = 10
value = 3009
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3010)
v = 21    ;fv = 10
value = 3010
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3011)
v = 21    ;fv = 10
value = 3011
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3012)
v = 21    ;fv = 10
value = 3012
[State 0, Helper]
type = Helper
Trigger1 = time=15
helpertype = normal ;player
name ="Reppuken"
ID = var(21)
stateno = 30002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.225
size.yscale=.225
pausemovetime=120
supermovetime=120
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3001) &&time=0
x = 0
y = -8
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3002) &&time=0
x = -5
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3003) &&time=0
x = 5
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3004) &&time=0
x = -5
y = 4.5
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3005) &&time=0
x = 5
y = 4.5
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3006) &&time=0
x = 0
y =8

[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3007) &&time=0
x = -3
y = -6.5
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3008) &&time=0
x = 3
y = -6.5
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3009) &&time=0
x = -3
y = 6.5
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3010) &&time=0
x = 3
y = 6.5

[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3011) &&time=0
x = 8
[State 0, VelSet]
type = VelSet
trigger1 = ishelper(3012) &&time=0
x = -8
[State 0, VelSet]
type = VelSet
trigger1 = time =10
x = 0
y = 0
;ignorehitpause = 
;persistent = 

 
[State 0, Trans]
type = Trans
trigger1 = time=17
trans = addalpha;, sub
alpha = 175,255
[State 0, Trans]
type = Trans
trigger1 = time=18
trans = addalpha;, sub
alpha = 150,255
[State 0, Trans]
type = Trans
trigger1 = time=19
trans = addalpha;, sub
alpha = 125,255
[State 0, Trans]
type = Trans
trigger1 = time=20
trans = addalpha;, sub
alpha = 100,255
[State 0, Trans]
type = Trans
trigger1 = time=21
trans = addalpha;, sub
alpha = 75,255
[State 0, Trans]
type = Trans
trigger1 = time=22
trans = addalpha;, sub
alpha =50,255
[State 0, Trans]
type = Trans
trigger1 = time=23
trans = addalpha;, sub
alpha = 25,255
[State 0, Trans]
type = Trans
trigger1 = time=24
trans = addalpha;, sub
alpha = 10,255
[State 0, DestroySelf]
type = DestroySelf
trigger1 = time=25
;--------------------------------------------------------------------------
[StateDef 30002]
type =A
movetype=I
physics = N
juggle  = 0
ctrl = 0
poweradd =0
velset=0,0
anim=3007
sprpriority=9
[State 0, Trans]
type = Trans
trigger1 =1 
trans =  add;, addalpha, add1, sub
;alpha = 256,256
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 11   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 =time=0
fv = 10    ;fv = 10
value = EnemyNear(0), const(size.mid.pos.y)
[State 0: Null]
type = Null
trigger1 = time=0
trigger1 = (FVar(0) := (P2Dist X * 11) / (Exp(0.5*ln((P2Dist X* P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := ((P2Dist Y+fvar(10)) * 11) / (Exp(0.5*ln((P2Dist X * P2Dist X) + ((P2Dist Y+fvar(10)) * (P2Dist Y+fvar(10)))))))

[State 0: VelSet]
type = VelSet
trigger1 = time=4 && (!ishelper(3001)&&!ishelper(3006))
x = FVar(0);*var(11)
y = FVar(1)
  [State 0, Turn]
type = Turn
triggerall =  var(11)=-1 && vel y <=0; &&time=0
trigger1 = 1
persistent=0
[State 0, VarSet]
type = VarSet
trigger1 = p2bodydist x <-15&& time<=4
v = 11   ;fv = 10
value = -1

[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3009)
;trigger2= ishelper(3008)
v = 10    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = ishelper(3007)
v = 12   ;fv = 10
value = 1
[State -3, M]
Type = VarSet
trigger1 = time<=4;&& fvar(11)!=0 
fvar(11) = (((fvar(10)+enemynear,pos y) - Pos Y)/(EnemyNear(0), Pos X - (Pos X)));-(atan(FVar(1)/(FVar(0))) + (3*pi/2)) *(ifelse(var(11)=-1,ifelse(vel y >0 &&var(10),-160,-180),ifelse(var(12),220,240))/Pi)

[State -3, M] ;There can be no triangle if both points share the same X cord
Type = VarSet
trigger1 = EnemyNear(0), Pos X = Pos X && fvar(0)=0 && time<=4
fvar(11) = ifelse(p2bodydist y  <0,90,-90)

[State -3, Angle]
Type = VarSet
trigger1 = time<4
fvar(12) = Atan(fvar(11)) * (180.0/Pi)  ;Angle given in degrees. 


[State 0, VelSet]
type = VelSet
trigger1=time=4
trigger1 = (ishelper(3001)||ishelper(3006))
y = ifelse(p2bodydist y  <0,-8,8)
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 11   ;fv = 10
value = 1

;ignorehitpause = 
  [State 0, Turn]
type = Turn
triggerall =  var(11)=-1 && vel y <=0 
trigger1 = 1
persistent=0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = fvar(12)
ignorehitpause =1 

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = vel x !=0 || vel y !=0
movetype = A        ;I,A,H
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = time=10&& root,animelemtime(4)<0
x = 0
y = 0
[State 0, PlaySnd]
type = PlaySnd
triggerall =ishelper(3004)
trigger1 = movecontact 
value = S4,0
ignorehitpause=1
persistent=0
[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = !movecontact
attr = S, HP
animtype  = Hard
damage= 10, 5
priority  = 4
guardflag = MA
hitflag=MAF
pausetime = 2,99
getpower=10
sparkxy = 0,-0
sparkno =-1
guard.sparkno= S7500
guardsound = S6, 0
ground.type = high
ground.slidetime = 32
ground.hittime  = 15
guard.ctrltime=10
ground.velocity = -0
air.velocity = -4,-5
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recover=0
ground.cornerpush.veloff=0
ID =200
kill=0
 [State 0, Turn]
type = Turn
trigger1 = facing !=root,facing 
trigger1 = root,animelem=4
[State 0: Null]
type = Null
trigger1 = root,animelem=4
trigger1 = (FVar(2) := ((parentdist x -40) * 13) / (Exp(0.5*ln((parentdist x* parentdist x) + (-50* -50)))))
trigger1 = (FVar(3) := ((parentdist y )* 13) / (Exp(0.5*ln((parentdist x * parentdist x) + (-50 * -50)))))

;ignorehitpause = 
;persistent = 

[State 0: VelSet]
type = VelSet
trigger1 = root,animelem=4
x = FVar(2)
y = FVar(3)
[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = NumTarget(200)
triggerall = ishelper(3001)
trigger1 =root,animelem=4
value = -70
ID = 200
kill = 1
absolute = 0
;ignorehitpause = 
;persistent = 




;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
triggerall = ishelper(3001)
triggerall = NumTarget(200)
trigger1 =root,animelem=4
value =3003
ID = 200
;ignorehitpause = 
;persistent = 
[State 0, Helper]
type = Helper
triggerall = ishelper(3001)
triggerall = NumTarget(200)
trigger1 =root,animelem=4
helpertype = normal ;player
name = "flames"
ID = 8000
stateno = 8001
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
triggerall = ishelper(3001)
trigger1 = root,animelem=4
anim = 3008
ID = 1006
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime =1
scale =1,1.5
ontop = 1
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0
removeongethit=1

[State 0, Explod]
type = Explod
triggerall = ishelper(3001)
trigger1 = root,animelem=4
anim = 3008
ID = 1006
pos = 0,-60
postype = p2
facing = 1
vfacing = -1
bindtime = 1
scale =1,1.5
ontop = 1
sprpriority = 9
shadow = 0,0,0
ownpal = 1
persistent = 0
removeongethit=1
[State 0, ChangeState]
type = destroyself
trigger1 = root,animelem=4
;--------------------------------------------------------------------------
[StateDef 30601]
type =A
movetype=A
physics = N
juggle  = 0
velset = (p2dist x/7.5),((enemy,const(size.head.pos.y)-40)/8)
ctrl = 0
anim =3002
poweradd =0
sprpriority=9
[State 0, SprPriority]
type = SprPriority
trigger1 =1 
value = 5
ignorehitpause =1 
;persistent = 

[State 0, VelAdd]
type = Velmul
trigger1 = time <10
x = .93
y = .93


[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, AngleDraw]
type = AngleDraw
trigger1 = time%2=0 && anim=3002
value = 1
scale = .8,.8

[State 0, VelSet]
type = VelSet
trigger1 = time=10
y = 0
x =0
;ignorehitpause = 
;persistent = 


[State 0, Helper]
type = Helper
Trigger1 = time=42
helpertype = normal ;player
name ="Reppuken"
ID = 30602
stateno = 30602
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.25
size.yscale=.31
pausemovetime=120
supermovetime=120

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




;ignorehitpause = 
;persistent = 


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

;persistent = 

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

[State 0, VarSet]
type = Varadd
trigger1 =time>42 && p2stateno!=3002
v = 1   ;fv = 10
value = 1
ignorehitpause=0
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>42&& p2stateno!=3002
;value =  (winmugen only)
scale =  1,1-(var(1)*.09)
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 30602]
type =A
movetype=A
physics = N
juggle  =0
velset = 0,12
ctrl = 0
poweradd =0
sprpriority=9
anim=306

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "p2d =%f at = %f var(0) = %f var(1) = %f \n vel x = %f 11= %d"
params = p2bodydist x, -Atan(fvar(11)) * ((180.0*var(11))/Pi) ,fvar(0),fvar(1),((fvar(10)+enemynear,pos y)-fvar(20)),var(11)
ignorehitpause = 1
;persistent = 


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


;ignorehitpause = 
;persistent = 

;  [State 0, Turn]
;type = Turn
;triggerall =  var(11)=-1 && vel y <=0; &&time=0
;trigger1 = 1
;persistent=0
;[State 0, VarSet]
;type = VarSet
;trigger1 = p2bodydist x <-15&& time<=0
;v = 11   ;fv = 10
;value = -1

;[State 0, VarSet]
;type = VarSet
;trigger1 = ishelper(3009)
;;trigger2= ishelper(3008)
;v = 10    ;fv = 10
;value = 1
;ignorehitpause = 
;persistent = 
;[State 0, VarSet]
;type = VarSet
;trigger1 = ishelper(3007)
;v = 12   ;fv = 10
;value = 1


;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =time=0 
fv = 12   ;fv = 10
value = -90

[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name ="Reppuken"
ID = 6002
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99
[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name ="Reppuken"
ID = 6003
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -90
ignorehitpause =1 

;ignorehitpause = 
;persistent = 

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = !movecontact
attr = S, HP
animtype  = Hard
damage= 0, 5
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 2,ifelse(p2statetype=A,16,2)
getpower=10
sparkxy = 0,-0
sparkno =-1
guard.sparkno= S7500
guardsound = S6, 0
hitsound= S4,1
ground.type = high
ground.slidetime = 32
ground.hittime  = 16
guard.ctrltime=16
ground.velocity = -0
air.velocity = -4,-5
yaccel=.5
guard.velocity=-3
air.fall=1
fall.recover=0
ground.cornerpush.veloff=0
ID =200
palfx.time = 60
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,1
palfx.invertall = 0
[State 0, TargetState]
type = TargetState
trigger1 =(p2statetype= A||p2statetype= L) && movehit=1 && (p2stateno!=[201,203])
value =3065
ID =200
ignorehitpause =1 

[State 0, Helper]
type = Helper
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
;anim =
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = velset
trigger1 = pos y>=0
y = 0
[State 0, PosSet]
type = posset
trigger1 = pos y>0
y = 0

[State 0, BindToTarget]
type = BindToTarget
trigger1 = pos y <-5 || pos y = 0 && p2stateno=3065 && root,animelemtime(1)<15 && root,anim=3061
time = 1
ID = 200
pos = 0,-p2bodydist y
ignorehitpause = 1
;persistent =
[State 0, ChangeState]
type = ChangeState
trigger1 = moveguarded
value =10002
ctrl = 0
[State 0, DestroySelf]
type = DestroySelf
trigger1 = movehit && p2stateno!=3065
;ignorehitpause = 
;persistent = 
;------------------------------------------------------------------------------
[Statedef 3065]
type=S
physics=N
movetype=H
velset=0,0
sprpriority=4
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time=0
value = 3062
;elem = 1

[State 0, PosSet]
type = PosSet
trigger1 = pos  y>-5
y = 0
;ignorehitpause = 
;persistent = 
[State 0, PosAdd]
type = PosAdd
trigger1 = screenpos x <200 && enemy,facing=1 && pos y=0 && enemy,animelemtime(1)>=9 && enemy,animelemtime(1)<15
x = -10.5

[State 0, PosAdd]
type = PosAdd
trigger1 = screenpos x >210 && enemy,facing=1 && pos y=0 && enemy,animelemtime(1)>=9 && enemy,animelemtime(1)<15
x = 10.5

[State 0, PosAdd]
type = PosAdd
trigger1 = screenpos x >70 && enemy,facing=-1 && pos y=0 && enemy,animelemtime(1)>=9 && enemy,animelemtime(1)<15
x = -10.5
[State 0, PosAdd]
type = PosAdd
trigger1 = screenpos x <60 && enemy,facing=-1 && pos y=0 && enemy,animelemtime(1)>=9 && enemy,animelemtime(1)<15
x = 10.5

[State 0, PosSet]
type = PosSet
trigger1 =( screenpos x =[200,210]) && enemy,facing=1 && pos y=0
x = 40
[State 0, PosSet]
type = PosSet
trigger1 = (screenpos x =[60,70]) && enemy,facing=-1 && pos y=0
x = -60
[State 0, ChangeState]
type = selfState
trigger1 = p2stateno!=[3060,3061]
value =cond(pos y <0,5040,0)
ctrl = 1
;--------------------------------------------------------------------------
[StateDef 30603]
type =A
movetype=A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim =3002
poweradd =0
sprpriority=9

;ignorehitpause = 

[State 0, Null]
type = Null
trigger1 = ishelper(30604)
trigger1= var(0):=1
trigger2 = ishelper(30605)
trigger2= var(0):=2
trigger3 = ishelper(30606)
trigger3= var(0):=3
trigger4 = ishelper(30607)
trigger4= var(0):=4
trigger5 = ishelper(30608)
trigger5= var(0):=5
trigger6 = ishelper(30609)
trigger6= var(0):=6
trigger7= ishelper(30610)
trigger7= var(0):=7
trigger8 = ishelper(30611)
trigger8= var(0):=8
trigger9 = ishelper(30612)
trigger9= var(0):=9
trigger10 = ishelper(30613)
trigger10= var(0):=10
trigger11 = ishelper(30614)
trigger11= var(0):=11
trigger12 = ishelper(30615)
trigger12= var(0):=12
trigger13 = ishelper(30616)
trigger13= var(0):=13

;ignorehitpause = 
;persistent = 


[State 0, SprPriority]
type = SprPriority
trigger1 =var(0)=[0,3]
trigger2 =var(0)=[7,10]
value = 5
ignorehitpause =1 
;persistent = 
[State 0, SprPriority]
type = SprPriority
trigger1 =var(0)=[4,6]
trigger2 =var(0)=[11,13]
value = -5
ignorehitpause =1
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = ishelper(30603)
trigger2 = ishelper(30610)
x = 5
y = -8*(1+(ishelper(30610)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = ishelper(30604)
trigger2 = ishelper(30611)
x = 2.15
y = -8*(1+(ishelper(30611)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = ishelper(30605)
trigger2 = ishelper(30612)
x = -2.15
y = -8*(1+(ishelper(30612)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = ishelper(30606)
trigger2 = ishelper(30613)
x = -5
y = -8*(1+(ishelper(30613)*-2))

[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = ishelper(30607)
trigger2 = ishelper(30614)
x = 3
y = -8*(1+(ishelper(30614)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = ishelper(30608)
trigger2 = ishelper(30615)
x = 0
y = -8*(1+(ishelper(30615)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = ishelper(30609)
trigger2 = ishelper(30616)
x = -3
y = -8*(1+(ishelper(30616)*-2))

[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, AngleDraw]
type = AngleDraw
trigger1 = time%2=0 && anim=3002
value = 1
scale = .8,.8

[State 0, VelSet]
type = VelSet
trigger1 = time=10
y = 0
x =0
;ignorehitpause = 
;persistent = 


[State 0, Helper]
type = Helper
Trigger1 = time=22
helpertype = normal ;player
name ="Reppuken"
ID = 30622+var(0)
stateno = 30604
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.25
size.yscale=.31
pausemovetime=120
supermovetime=120

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




;ignorehitpause = 
;persistent = 


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

;persistent = 

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

[State 0, VarSet]
type = Varadd
trigger1 =time>22 && p2stateno!=3002
v = 1   ;fv = 10
value = 1
ignorehitpause=0
[State 0, AngleDraw]
type = AngleDraw
trigger1 =time>22&& p2stateno!=3002
;value =  (winmugen only)
scale =  1-(var(1)*.09),1-(var(1)*.09)
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 30604]
type =A
movetype=A
physics = N
juggle  =0
velset = 0,12
ctrl = 0
poweradd =0
sprpriority=9
anim=306

[State 0, Null]
type = Null
trigger1 = ishelper(30622)
trigger1 = fvar(0):=-135

trigger2 = ishelper(30623)
trigger2= var(21):=1
trigger2 = fvar(0):=-120

trigger3 = ishelper(30624)
trigger3= var(21):=2
trigger3 = fvar(0):=-75

trigger4 = ishelper(30625)
trigger4= var(21):=3
trigger4 = fvar(0):=-45

trigger5 = ishelper(30626)
trigger5= var(21):=4
trigger5 = fvar(0):=-115

trigger6 = ishelper(30627)
trigger6= var(21):=5
trigger6 = fvar(0):=-90

trigger7 = ishelper(30628)
trigger7= var(21):=6
trigger7 = fvar(0):=-65

trigger8= ishelper(30629)
trigger8= var(21):=7
trigger8 = fvar(0):=135

trigger9 = ishelper(30630)
trigger9= var(21):=8
trigger9 = fvar(0):=120

trigger10 = ishelper(30631)
trigger10= var(21):=9
trigger10 = fvar(0):=75

trigger11 = ishelper(30632)
trigger11= var(21):=10
trigger11 = fvar(0):=45

trigger12 = ishelper(30633)
trigger12= var(21):=11

trigger13 = fvar(0):=115
trigger13 = ishelper(30634)
trigger13= var(21):=12

trigger14= fvar(0):=90
trigger14 = ishelper(30635)
trigger14= var(21):=13
trigger15 = fvar(0):=65

;ignorehitpause = 
;persistent = 


[State 0, SprPriority]
type = SprPriority
trigger1 =var(21)=[0,3]
trigger2 =var(21)=[7,10]
value = 5
ignorehitpause =1 
;persistent = 
[State 0, SprPriority]
type = SprPriority
trigger1 =var(21)=[4,6]
trigger2 =var(21)=[11,13]
value = -5
ignorehitpause =1
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = var(21)=0 || var(21)=7
x = -5
y = 8*(1+( (var(21)=7)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = var(21)=1 || var(21)=8
x = -2.15
y = 8*(1+((var(21)=8)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = var(21)=2 || var(21)=9
x = 2.15
y = 8*(1+((var(21)=9)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = var(21)=3 || var(21)=10
x = 5
y = 8*(1+((var(21)=10)*-2))

[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = var(21)=4 || var(21)=11
x = -3
y = 8*(1+((var(21)=11)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = var(21)=5 || var(21)=12
x = 0
y = 8*(1+((var(21)=12)*-2))
[State 0, VelAdd]
type = Velset
triggerall = time =0
trigger1 = var(21)=6 || var(21)=13
x = 3
y = 8*(1+((var(21)=13)*-2))

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "p2d =%f at = %f var(0) = %f var(1) = %f \n vel x = %f 11= %d"
params = p2bodydist x, -Atan(fvar(11)) * ((180.0*var(11))/Pi) ,fvar(0),fvar(1),((fvar(10)+enemynear,pos y)-fvar(20)),var(11)
ignorehitpause = 1
;persistent = 


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


;ignorehitpause = 
;persistent = 

;  [State 0, Turn]
;type = Turn
;triggerall =  var(11)=-1 && vel y <=0; &&time=0
;trigger1 = 1
;persistent=0
;[State 0, VarSet]
;type = VarSet
;trigger1 = p2bodydist x <-15&& time<=0
;v = 11   ;fv = 10
;value = -1

;[State 0, VarSet]
;type = VarSet
;trigger1 = ishelper(3009)
;;trigger2= ishelper(3008)
;v = 10    ;fv = 10
;value = 1
;ignorehitpause = 
;persistent = 
;[State 0, VarSet]
;type = VarSet
;trigger1 = ishelper(3007)
;v = 12   ;fv = 10
;value = 1


;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =time=0 
fv = 12   ;fv = 10
value = fvar(0)

[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name ="Reppuken"
ID = 6002
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99
[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name ="Reppuken"
ID = 6003
stateno =6002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)*1.5
size.yscale=const(size.xscale)*1.5
pausemovetime=99

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = fvar(0)
ignorehitpause =1 

;ignorehitpause = 
;persistent = 



[State 0, VelSet]
type = VelSet
trigger1 = time=5
x = 0
y = 0
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time= 5 && (var(21)=0||var(21)=7)
value = S4,1
channel =3
;ignorehitpause = 
;persistent = 

;anim =
;ignorehitpause = 
;persistent = 



;persistent =

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,animelemtime(12)=210
;------------------------------------------------------------------------------
[Statedef 8001]
physics=N
velset=0,0
anim=10000
sprpriority=4


[State 7180, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 7180, flames]
type = explod
trigger1 = 1
anim = 3009
ID = 11014
sprpriority = 3
postype = p2
scale = .5,.5
random=40,40
pos = (enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))+40

[State 7180, end]
type = destroyself
trigger1 = time >= 25
trigger2=enemynear,ctrl||(enemynear,movetype!=H)||(enemynear,statetype=L)
;---------------------------------------------------------------------------
[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 = -2
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
[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 4   ;fv = 10
value = ifelse(root,var(21)=2,22,17) 
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,statetype=A
v = 30    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = !var(35)
v = 22   ;fv = 10
value = root,var(7)
;ignorehitpause = 
;persistent = 


;var(35) = movehit
[State 0, VarSet]
type = VarSet
triggerall = var(35)=0
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
v = 34    ;fv = 10
value = var(34)

[State 0, VarSet]
type = parentVarSet
trigger1 = 1;&& enemy,hitshakeover
v = 32    ;fv = 10
value = var(32)
[State 0, ParentVarAdd]
type = VarAdd
trigger1 = var(32)>0
v =  32   ;fv = 
value = -1
;===non attacks
;45
[State 0, Null]
type = Null
triggerall =root,prevstateno=45&& !var(35)  && p2movetype=H
trigger1 = root,ctrl && root,fvar(21)>-20
trigger1 = var(34):=610
trigger2 = root,ctrl && root,fvar(21)<-20
trigger2 = p2statetype=A
trigger2 = var(34):=605

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

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

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

;100
[State 0, Null]
type = Null
triggerall =root,stateno=100&& !var(35) && root,fvar(4)>0 && p2movetype=H
trigger1 =  (random%5) >2&& var(34)=-1 
trigger1 = var(34):=400

;105
[State 0, Null]
type = Null
triggerall =root,stateno=105&& !var(35) 
trigger1 =  p2statetype=L
trigger1 = var(34):=1001
trigger2 = p2statetype!=L
trigger2 = var(34):=-1


;3000
[State 0, Null]
type = Null
triggerall =root,stateno=3000&& !var(35) 
trigger1 = p2statetype=A   && (random%5>1) && root,p2bodydist x < 50&&var(34)=-1&& p2movetype=H
trigger1 = var(34):=405
trigger1 = var(2):=1
trigger2 = p2statetype!=A || (p2statetype=A && root,p2bodydist x >25)&&var(34)=-1 && p2movetype=H;&& (random%5>1) 
trigger2 = var(34):=205
trigger3 = p2statetype=A   && ((random%5>1) && root,p2bodydist x > 50 || p2statetype=A)&&var(34)=-1 && p2movetype=H
trigger3 = var(34):=210
trigger3 = var(30):=0
trigger4 = p2movetype=A   && (random%5>2) &&var(34)=-1
trigger4 = var(34):=1050
trigger4 = var(2):=2 - (root,fvar(4)>0)
;====
;f200
[State 0, Null]
type = Null
triggerall =(root,stateno=200||root,stateno=400)&& var(35)
trigger1 =  p2statetype!=A && (random%5<4||root,fvar(4)>0)&&var(34)=-1
trigger1 = var(34):=205
trigger2 = (random%5>=3)&&var(34)=-1
trigger2 = var(34):=405
trigger3 =  var(22) && root,stateno=400
trigger3 = var(34):=1010

;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,p2bodydist x >25&& (p2statetype=A && (random%5>0||root,fvar(4)>0))) || (p2statetype!=A )&&var(34)=-1 && var(22)=0
trigger1 = var(34):=210
trigger2 = root,p2bodydist x <55&& p2statetype!=A&& root,numhelper(3011)=0 && root,fvar(4)=0 && root,var(10)>1 &&var(34)=-1
trigger2 = var(34):=410
trigger3 = root,p2bodydist x <=25&& p2statetype=A && random%3>0&&var(34)=-1
trigger3 = var(34):=1001
trigger4 = root,p2bodydist x <=25&& p2statetype=A && random%3=0&&var(34)=-1
trigger4 = var(30):=1
trigger5 = root,p2bodydist x <85&& var(22)>0&&var(34)=-1
trigger5 = var(34):=1010
trigger5 = var(2):=1
;405
[State 0, Null]
type = Null
triggerall =root,stateno=405&& var(35)
trigger1 =  (root,p2bodydist x >=45||p2statetype!=A|| (root,frontedgebodydist <50))&&var(34)=-1
trigger1 = var(34):=210
trigger2 =  p2statetype!=A && root,numhelper(3011)=0  && (root,numexplod(1001)>1 ||  (random%5>4)) && root,var(10)>3 && root,p2bodydist x <45&&var(34)=-1
trigger2 = var(34):=410

;605
[State 0, Null]
type = Null
triggerall =root,stateno=605&& var(35)
trigger1 = p2statetype=A  && root,fvar(21) <-25&& root,var(6)=0&&var(34)=-1
trigger1 = var(34):=45
trigger2 = p2statetype=A && (root,fvar(21) =[-35,35])&&var(34)=-1
trigger2 = var(34):=cond(root,fvar(21) <-15&& root,var(6)=0,cond(root,var(6)=1,1010,45),610)
trigger3 = p2statetype=A  && root,var(6)=1&&var(34)=-1
trigger3 = var(34):=cond(root,fvar(21)<-60&&root,var(6),1010,610)
trigger4 = root,pos y >-20&&var(34)=-1
trigger4 = var(34):=210
trigger5= var(22)&&var(34)=-1 || root,fvar(21)<-60
trigger5 = var(34):=1010
trigger5 = var(2)=1
trigger6 = p2statetype=A  && root,fvar(21) <-30&& root,var(6)=0&& root,vel y >1&&var(34)=-1
trigger6 = var(34):=45
;210
[State 0, Null]
type = Null
triggerall =root,stateno=210&& var(35) && var(34)<=210
trigger1 = root,p2bodydist x <90&& p2statetype!=A && (random%5>2) && root,fvar(4)=0 && root,numhelper(3011)=0&&var(34)=-1
trigger1 = var(34):=211
trigger2 = root,movehit &&p2statetype=A && (root,var(10)<3 || root,numexplod(1001)>=2||p2bodydist x >60)&& (random%5<=3) && root,var(10)<8 &&var(34)=-1
trigger2 = var(34):=1000
trigger3 = root,p2bodydist x <45&& (random%5<=3) && p2statetype=A  &&  root,numexplod(1001)<2&& root,var(4)<var(4)-4&&var(34)=-1
trigger3 = root,fvar(21) =[-55,-35]
trigger3 = var(34):=1010
trigger4 = root,movehit && var(34)<210&& (random%5>3)&& root,var(4)<var(4)-4&&var(34)=-1
trigger4 = p2statetype!=A   || root,fvar(21) =[-35,-1]
trigger4 = root,numhelper(3011)=0 
trigger4 = var(34):=cond(root,power>600 && root,var(10)<2,3050,1050)
trigger5 = root,movehit && (random%5>1)&& root,var(4)<var(4)-4 &&var(34)=-1
trigger5 = p2statetype!=A   || root,fvar(21) =[-41,-12]
trigger5 = root,numhelper(3011)>0 || root,fvar(4)>0&&var(34)=-1 && !var(22) || root,var(10)>3
trigger5 = var(34):=1050
trigger5 = var(2):=cond(root,power>400 && root,var(10)>=4,3,cond(root,fvar(4)=0&& root,numhelper(3011)=0 ,2,1))
trigger6 = root,movehit && var(34)<210&& (random%5>1) && root,power>600 && root,var(10)>3&&var(34)=-1
trigger6 = p2statetype!=A 
trigger6 = var(34):=3000
;410
[State 0, Null]
type = Null
triggerall =root,stateno=410&& var(35)
trigger1 = root,p2bodydist x <70&& (random%5>0) && root,numhelper(3011)=0
trigger1 = var(34):=1001
trigger2 = root,stateno=410&& root,fvar(4)>0 && root,moveguarded&&var(34)=-1
trigger2 = var(34):=1050
trigger2 = var(2):=1
trigger3 =  var(22)>0&&var(34)=-1
trigger3 = var(34):=1010

;610
[State 0, Null]
type = Null
triggerall =root,stateno=610&& var(35) 
trigger1 = root,p2bodydist x <90&& p2statetype=A && root,var(8)=1&&var(34)=-1 ;  && (random%5>1)
trigger1 = var(34):=1010
trigger1 = var(2):=cond(root,numexplod(1001)>=1 && root,power>400&&(random%4>1),3,cond((root,numexplod(1001)>=1 && root,pos y <-60),2,1))
trigger2 =  p2statetype=A && root,var(8)=0 &&var(34)=-1;&& (random%5>1) 
trigger2 = root,pos y <-35
trigger2 = var(34):=cond(root,fvar(21)<-45&&root,var(6)=0,45,55)
trigger3 = root,p2bodydist x <65&& (random%5<=3)   &&  root,var(10)>7&& root,var(4)<var(4)-6 && root,vel x >0&&var(34)=-1
trigger3 = root,fvar(21) =[-35,40]
trigger3 = var(34):=1005



;211
[State 0, Null]
type = Null
triggerall =root,stateno=211&& var(35) && root,numhelper(3011)=0
trigger1 =root,var(21)=0 && (root,var(10)>2&&random%5>3)&&var(34)=-1
trigger1 = var(34):=212
trigger2 = p2statetype=A && (root,var(10)<4 || root,var(4)>var(4)-3)&&var(34)=-1
trigger2 = var(34):=1000
trigger3 = root,p2bodydist x <75&& (random%5<=3)  &&  (root,numexplod(1001)<2&& root,var(4)<var(4)-4 && root,var(19)=1|| var(22)>0)&&var(34)=-1
trigger3 = var(34):=1010
trigger4 = root,movehit && var(34)<210&& (random%5>3)&& root,var(4)<var(4)-4 && root,var(10)>2 &&var(34)=-1
trigger4 = var(34):=1002
trigger5 = root,movehit && (random%5<=3)&& root,var(4)<var(4)-4 && root,var(10)>4&&var(34)=-1 && root,power>400
trigger5 = root,numhelper(3011)=0 || root,fvar(4)>0&&var(34)=-1
trigger5 = var(34):=1050
trigger5 = var(2):=3

;212
[State 0, Null]
type = Null
triggerall =root,stateno=211&& var(35) && root,numhelper(3011)=0
trigger1 =(random%5>2) && (root,var(21)=0 &&root,var(10)>4 || root,var(21)>0 && (root,var(10)>2 || root,var(4)>var(4)-3))&&var(34)=-1
trigger1 = var(34):=1001
trigger2 = root,movehit && var(34)<210&& (random%5>1)&& root,var(4)<var(4)-4 && root,var(10)>1 && root,var(21)>0&&var(34)=-1
trigger2 = var(34):=1001
trigger3 = root,frontedgebodydist <40 && root,var(21)=0
trigger3 = var(34):=105
trigger4 = root,movehit && var(34)<210&& (random%5>1)&& root,var(4)<var(4)-4 && root,var(10)<2 &&var(34)=-1
trigger4 = var(30):=1
trigger4 = var(34):=55
trigger5=  var(1)
trigger5 = var(34):=3060
;trigger2= var(34)=1010&&p2statetype=A&& var(35) && root,var(4)<var(4)-3
;trigger2 = root,p2bodydist x =[26,50]
;trigger2 = root,fvar(21) =[-45,-15]
;trigger2 = var(34):=205
;trigger2= var(35):=0

;800
[State 0, Null]
type = Null
triggerall =root,stateno=810&& var(35)
trigger1 =  (p2statetype!=A) 
trigger1 = var(34):=1001
;1005
[State 0, Null]
type = Null
triggerall =root,stateno=1005&& var(35) 
trigger1 = root,p2bodydist x <90&& (random%10>2) && root,var(24)=4&& root,var(10)>2&& root,var(4)<var(4)-6&&var(34)=-1
trigger1 = var(34):=210
trigger2 = root,p2bodydist x >45&& (random%5>1) && root,var(24)=4&& root,var(10)>2&& root,var(4)<var(4)-6&& root,numhelper(3001)=0&&var(34)=-1
trigger2 = var(34):=1002
trigger3 = (random%5<=3)   && root,var(24)=3&& root,var(10)>3&& root,var(4)<var(4)-6&& root,numhelper(3001)=0&&var(34)=-1
trigger3 = var(34):=1001
trigger4 = root,p2bodydist x <65&& (random%5>=2)   && root,var(24)=3&& root,var(10)<3&&var(34)=-1
trigger4 = var(34):=205
trigger5 = root,p2bodydist x <65&& (random%5<=2)   && root,var(24)=2&& root,var(10)<3&&var(34)=-1
trigger5 = var(34):=405
trigger6= root,var(21)=2 &&  root,var(24)>3&& root,var(10)>2&& root,var(4)<var(4)-6&&var(34)=-1
trigger6 = var(34):=212
trigger7=  var(1)
trigger7 = var(34):=3060
;==Helpers==
;1002
[State 0, Null]
type = Null
trigger1 =root,numhelper(1002)
trigger1 = helper(1002),stateno=10001
trigger1 = p2movetype=H&& (random%5>1) &&var(34)=-1
trigger1 = var(34):=cond(root,p2bodydist x <60,1010,cond(root,var(10)>3,1005,55))
trigger1 = var(30):=var(34)=55
trigger2 =root,numhelper(1002) && var(10)<2 && root,p2bodydist x >99
trigger2 =  helper(1002),vel x =0 && helper(1002),vel y =0
trigger2 = var(22)&& (random%5>1) 
trigger2 = var(34):=1003
trigger2 = var(30):=var(34)=1003
trigger3 =root,numhelper(1003)&&var(34)=-1
trigger3 = var(22)&& (random%5>2) 
trigger3 = helper(1003),stateno=10001
trigger3 = var(34):=cond(root,p2bodydist x <60,1010,cond(root,var(10)>3,1005,605))
trigger3 = var(30):=var(34)=[600,1005]
trigger4 =root,numhelper(1003) && var(10)<2
trigger4 = var(22)&& (random%5>1) && helper(1003),vel x =0 && helper(1003),vel y =0&& root,p2bodydist x >100
trigger4 = var(34):=1003
trigger4 = var(30):=var(34)=1003
trigger5 =root,numhelper(1001) && root,stateno=1000 
trigger5 = root,p2bodydist x <60 && root,frontedgebodydist <45&& enemy,backedgebodydist <20
trigger5 = helper(1001),movehit && (random%5>2) && root,stateno=1000 
trigger5 = root,power >400 && p2statetype=A
trigger5 = var(34):=4
trigger6 = root,numhelper(1002) || root,numhelper(1003)
trigger6= p2stateno=2000 &&var(1)
trigger6 = var(34):=3060

;====


;====specials

;1010
[State 0, Null]
type = Null
triggerall =root,stateno=1010&& var(35) 
trigger1= (root,var(22)=2||p2stateno=[1045,1048])&& var(34)=-1
trigger1= var(34):=210
trigger2 =p2statetype=A && root,var(2)=1 && root,p2bodydist x >30 && root,numexplod(1001)<2&& !var(22)&& var(34)=-1 ; (random%5>1) && 
trigger2 = var(34):=205
trigger3 = (random%5>1) && root,var(2)=2&& root,var(10)>1&& root,numhelper(3001)=0&& var(34)=-1
trigger3 = var(34):=1001
trigger4 = (random%5>1) && root,var(2)=2 && root,pos y <-45&& root,var(10)<3&& root,numhelper(3001)=0&& var(34)=-1
trigger4 = var(34):=105
trigger5 = (root,p2bodydist x <75)&& (random%5<=3 )  &&  (root,var(10)<=3 ) && (root,fvar(21)<-35)&& var(34)=-1 && (var(2)=1 || p2stateno=[1045,1051])
trigger5 = var(30):=1
trigger5 = var(34):=210
trigger6 =p2statetype=A && root,var(2)=1 && (root,p2bodydist x <=30||root,fvar(21)>-45) && root,numexplod(1001)<2 && !var(22)&& var(34)=-1 &&( root,pos y >-75 || root,fvar(21)>-35); (random%5>1) && 
trigger6 = !var(22)
trigger6 = var(34):=405
trigger7 =( var(22)>0 || p2stateno=1051) && p2stateno!=[1045,1049]
trigger7 = var(30):=1
trigger7 = var(34):=605
trigger8 = var(2)>0 
trigger8 = var(2):=0
trigger9 = (random%5>1) && (root,pos y <-75 && root,fvar(21)<-25 || root,numexplod(1001)<2&&p2statetype=A)&&var(34)=-1
trigger9 = var(34):=210
trigger10 = (var(22)) &&var(34)=-1
trigger10 = var(34):=cond(root,var(10)>4,1005,605)
trigger10 = var(30):=var(34)=[600,1005]
trigger12=  var(1)  && enemy,hitfall
trigger13 = var(34):=3060
;1050
[State 0, Null]
type = Null
triggerall =root,stateno=1050&& var(35) 
trigger1 =(random%5>1) && p2stateno=1101&& root,var(2)=1  && root,fvar(4)>0 &&var(34)=-1
trigger1 = var(34):=100
trigger2 = root,var(2)=2 && root,var(21) >0 && var(34)=-1
trigger2 = var(30):=1
trigger2 = var(34):=610
trigger3 = root,var(2)=2 && root,power >700 && root,var(21)=0 && var(34)=-1
trigger3 = var(30):=1
trigger3 = var(34):=4
trigger4 =  root,var(4)<var(4)-6&& root,var(10)>1 && root,var(2)=3  && root,numhelper(3001)=0 && var(34)=-1 
trigger4 = var(34):=1002
trigger5  = (root,var(21)>0|| root,fvar(4)>0)&& root,var(2)=1 && var(34)=-1
trigger5 = var(34):=400
trigger6  = root,power>600 && root,var(2)=1 && root,var(34)=-1
trigger6 = var(34):=4
trigger7 = var(2)>0 
trigger7 = var(2):=0
trigger8 =  root,var(4)<var(4)-6&& root,var(10)<=1 && root,var(2)=3  && root,numhelper(3001)=0 && var(34)=-1 
trigger8 = var(34):=cond( p2bodydist x>120,100,210)
trigger8 = var(32):=cond(var(34)=210,12,0)

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



[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
trigger3 = p2stateno!=2000 &&var(34)=1003
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 -3, Hit0]
type = PlaySnd
triggerall = root,Alive
triggerall = root,Time = 0
triggerall = random%3 =0
triggerall = root,movetype=H
trigger1 = root,Stateno = 1025
trigger2 = root,Stateno = 1045
trigger3 = root,Stateno = 1033
trigger4 =root, Stateno = 1034
trigger5 =root, Stateno = 1035
trigger6 = root,Stateno = 1036
value = 5000, random%6
channel=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(21),var(6),var(7),(var(19))
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=1 && ((root,stateno=600)) && root,pos y >=-40
trigger2 = root,movehit=1 &&( root,stateno=605) && root,pos y =[-75,-60]
trigger3= root,movehit=1 && (root,anim=610)&& root,pos y =[-85,-70]
trigger4 = root,movehit=1 && p2stateno=1101 && (root,fvar(4)>0 || root,prevstateno=4)
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=1 && root,stateno=605&& root,pos y >-60
trigger3 = p2stateno=2000 && p2movetype=H && enemy,pos y =0 
trigger4 = root,movehit=1 && root,var(21)=1 && p2statetype!=A
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 || root,var(34)=[600,1005]
triggerall = root,statetype=A
triggerall = root,ctrl || root,stateno=57
triggerall = root,var(31)=0
triggerall = p2statetype=L ||p2stateno!=[3003,3005]
triggerall = root,fvar(21) >30 || p2movetype!=A || root,statetype=A
trigger1= p2movetype=A  && root,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
trigger6 = root,p2bodydist x >150 && p2stateno=2000
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 = p2movetype!=H
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 = 


;release check
[State 16, VarSet]
type = Varset
triggerall = root,numhelper(1002)
trigger1=p2stateno=[3004,3005]
trigger2= enemy,hitfall && enemy,pos y <-30
trigger3 = root,anim=1051 && animelemtime(4)>0
trigger4= p2stateno=5120 && (enemy,time>25||enemy,animtime=0)
trigger5= p2movetype!=H 
trigger6= (root,var(19)||root,var(21)>0) && (p2statetype=A || p2statetype=L)
trigger7= enemy,time>6 &&p2stateno=[5200,5210]
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 20, Explod]
type = varset
triggerall = var(20)=0
triggerall = var(17)=0
triggerall = root,numhelper(1001)=0
triggerall = root,p2bodydist x >55  || root,movehit
triggerall = p2stateno!=4999
triggerall = root,movetype!=H
triggerall = root,ctrl || root,movehit
trigger1= root,p2bodydist x+20>= var(0) && enemy,pos y >=0 && var(0)>-1
trigger2= root,fvar(21) >-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(19)
triggerall = p2statetype!=A|| p2movetype=H 
trigger1 = ((enemy,movetype !=A)|| root,p2bodydist x >25)&& p2statetype!=L && root,var(31)=0
trigger2 = root,p2bodydist x >=40 && p2stateno=4999&& p2statetype!=L && root,var(31)=0
trigger3 = root,backedgebodydist <20 && p2movetype=A
trigger4 = root,p2bodydist x <10 && p2statetype=A  && root,var(31)=0
trigger5= root,var(34)>0 && root,p2bodydist x >60
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 = root,numhelper(1002)
trigger1=helper(1002),movehit=1
trigger2=root,numhelper(1002)=0
trigger3= p2stateno=5120 && enemy,time<20
trigger4= !root,var(21) &&!root,var(19) && ( p2statetype=L)
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
trigger1 = root,numhelper(1001)>0|| p2stateno=4999 || root,movetype=H
trigger2= root,p2bodydist x >75
trigger3= root,p2bodydist x <25 && !root,movecontact
trigger4 = 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
trigger1 =  enemy,movetype =A
trigger2 = root,p2bodydist x <25 && p2stateno!=4999 && p2statetype!=L && root,var(31)=0
trigger3 = root,p2bodydist x <55 && p2stateno!=4999 && p2statetype=L && root,var(31)=0
trigger4 = p2statetype=A && p2movetype!=H&& root,p2bodydist x <35 && p2statetype!=L && root,var(31)=0
v = 25   ;fv = 10
value = 0


;-----------

 [State 0, VarSet]
type = parentVarSet

triggerall = p2stateno!=2000 || root,fvar(21) >-15 || root,var(34)=1003
trigger1 = root,statetype = A
trigger2 = root,movetype=H && root,stateno!=[120,155]
trigger3= root,prevstateno=50
trigger4= (p2stateno=[5090,5119]) &&(p2stateno=[5121,5899])
trigger5 = (root,prevstateno=52 ||root,prevstateno=5120) && p2statetype=A && root,var(31)=0
trigger6 = root,p2bodydist x <120 && root,frontedgebodydist >50 && p2statetype!=L && p2movetype!=H && root,var(31)=0
trigger7=var(8)>0
trigger8 = var(19)>0 && root,var(31)=0
trigger9 = p2stateno=2000 &&enemy,pos y >-15
trigger10=  p2stateno=[3002,3004]
trigger11 = var(3)>0
trigger12 =root,var(34)=[1002,1003]
trigger13 = root,p2bodydist x <55 && p2statetype!=L && root,var(34)<=0 && root,var(33)=0
trigger14 = p2statetype!=A && root,fvar(4)>0
v=30
value = 0

[State 0, VarSet]
type = parentVarSet
triggerall =  root,var(34)>410 || root,var(34)=-1 ||  helper(10002),var(30)
triggerall = root,statetype != A
triggerall = p2stateno!=2000 || var(34)=[600,1010]
triggerall = roundstate=2 && var(19)=0
triggerall = (var(8)<=0)&& root,var(34)!=1003
trigger1= enemy,hitdefattr=SC,AT && ctrl
trigger2 = p2bodydist x >150 && root,ctrl && root,movetype!=H&&(p2movetype!=H) && root,fvar(4)=0
trigger3= root,var(33)=1 && (root,fvar(21)>-50|| root,p2bodydist x <60 && root,fvar(4)=0)
trigger4= p2stateno=2000 && enemy,pos y <-60
trigger5= (root,fvar(21) <-80) && !root,movecontact
;trigger6= numhelper(1002)>0 && root,p2bodydist x <40
;trigger6 = helper(1002),var(1)=3
trigger6 = helper(10002),var(30)
trigger7 = root,var(34)=[600,610]
trigger8 = p2movetype=A && root,p2bodydist x >100 && root,fvar(4)=0
;trigger7 =  var(31)=
v = 30   ;fv = 10
value = 1


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

