;==========<ZERO COUNTER>==========
[Statedef 9750]
type=A
physics=N
movetype=I
anim=8070
ctrl=0
velset=0,0
poweradd=0
sprpriority=4

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


[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0-(time*20),0-(time*20),0-(time*20)
;mul = 256,256,256
;sinadd = 0,0,0,10
invertall = 0
color = 256
;ignorehitpause =
;persistent =

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time >=15
trigger2 = parent,movetype = H
;ignorehitpause =
;persistent =

;========================<FIRE>=============================
[Statedef 9995]
physics=N
velset=0,0
anim=9741
sprpriority=4

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

[State 1195, flames]
type=explod
trigger1= 1
anim=9995
ID=9995
sprpriority=5
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))+(ifelse((enemynear,statetype != A),-5,10))
random=40,40;40,40;50,40
removetime=-2
scale=(.3-(.001*time)),(.3-(.001*time))
ownpal=0

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 9995
trans=addalpha
alpha=220,256

[State 7180, pos]
type=posadd
trigger1= 1
x=ceil(p2dist x)
y=ceil(p2dist y)

[State 7180, end]
type=destroyself
trigger1= time>=(ifelse(enemynear,statetype != A ,20,120))
trigger2= enemynear,ctrl || (enemynear,movetype!=H) || (enemynear,statetype=L)

;------------------------------
[Statedef 225]
type = A
movetype = A
physics = N
ctrl = 0
anim = 225
sprpriority = 4
velset = 9,0
juggle = 0

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(10) = ifelse((parent,stateno=[620,621]), 2, ifelse((parent,stateno=[420,421]), 1, 0))

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = parent,var(10)=1
value = .3
ignorehitpause = 1
persistent = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = parent,var(10)>=2
value = .15
ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,0
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=226
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
triggerall = var(10) = 0 ;Parent,Stateno = 220
trigger1 = !time
attr=A,NP
damage=ceil(60*root,fvar(10)),0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-7
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = var(10) = 1 ;Parent,Stateno = 420
trigger1 = !time
attr=A,NP
damage=ceil(60*root,fvar(10)),0
animtype=Hard
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=0,9
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = var(10) = 2 ;Parent,Stateno = 620
trigger1 = !time
attr=A,NP
damage=ceil(60*root,fvar(10)),0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-12,-8),ifelse(parent,var(11)=1,15,12)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
persistent=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 226
;---------------------------------------------------------------------------;
[Statedef 226]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 226
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .45

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1012
ID = 1010
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 = !time&&!prevstateno
var(9) = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,1
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(9)>=2,1011,1010)
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 0, VarAdd]
type = VarAdd
trigger1 = movecontact=1
trigger2 = !time&&prevstateno
var(9)=1

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 0
trigger1 = var(9)<3
attr=A,SP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-3,-3
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 1
trigger1 = var(9)<3
attr=A,NP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 2
trigger1 = var(9)<3
attr=A,NP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-4.5,-3),ifelse(parent,var(11)=1,-3,1.5)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = var(9)>=3
trigger2 = frontedgedist <= -140
value = 1011
ignorehitpause=1
;---------------------------------------------------------------------------;
[Statedef 1011]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1011
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .3

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1022
ID = 1020
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2.5,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 = !time&&!prevstateno
var(9) = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,1
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(9)>=4,1021,1020)
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 0, VarAdd]
type = VarAdd
trigger1 = movecontact=1
trigger2 = !time&&prevstateno
var(9)=1

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 0
trigger1 = var(9)<4
;trigger1 = (time%6)=1
attr=A,SP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-3,-3
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 1
trigger1 = var(9)<4
;trigger1 = (time%6)=1
attr=A,NP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 2
trigger1 = var(9)<4
;trigger1 = (time%6)=1
attr=A,NP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-4.5,-3),ifelse(parent,var(11)=1,-3,1.5)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = var(9)>=4
trigger2 = frontedgedist <= -140
value = 1021
ignorehitpause=1
;---------------------------------------------------------------------------;
[Statedef 1021]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1021
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .15

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1032
ID = 1020
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2.5,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 = !time&&!prevstateno
var(9) = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,1
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(9)>=5,1031,1030)
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 0, VarAdd]
type = VarAdd
trigger1 = movecontact=1
trigger2 = !time&&prevstateno
var(9)=1

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 0
trigger1 = var(9)<5
;trigger1 = (time%6)=1
attr=A,SP
damage=ceil(40*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-3,-3
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 1
trigger1 = var(9)<5
;trigger1 = (time%6)=1
attr=A,NP
damage=ceil(40*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 2
trigger1 = var(9)<5
;trigger1 = (time%6)=1
attr=A,NP
damage=ceil(40*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-4.5,-3),ifelse(parent,var(11)=1,-3,1.5)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = var(9)>=5
trigger2 = frontedgedist <= -140
value = 1031
ignorehitpause=1
;---------------------------------------------------------------------------;
[Statedef 1031]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1031
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(10) = ifelse((parent,stateno=[620,621]), 2, ifelse((parent,stateno=[420,421]), 1, 0))

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1012
ID = 1040
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=1
value = S10,0
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1041
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
triggerall = var(10) = 0 ;Parent,Stateno = 220
trigger1 = !time
attr=A,NP
damage=ceil(60*root,fvar(10)),0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-7
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = var(10) = 1 ;Parent,Stateno = 420
trigger1 = !time
attr=A,NP
damage=ceil(60*root,fvar(10)),0
animtype=Hard
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=0,9
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = var(10) = 2 ;Parent,Stateno = 620
trigger1 = !time
attr=A,NP
damage=ceil(60*root,fvar(10)),0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-12,-8),ifelse(parent,var(11)=1,15,12)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
persistent=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -105
value = 1041
;---------------------------------------------------------------------------;
[Statedef 1041]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1041
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 1050]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1030
sprpriority = 4
velset = 7.5,0
juggle = 0

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1022
ID = 1050
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -3,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 = !time&&!prevstateno
var(9) = ceil(root,var(20)/40)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,1
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(9)<=0, 1051, 1050);ifelse(var(9)>=5,1031,1030)
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 0, VarAdd]
type = VarAdd
trigger1 = movecontact=1
trigger2 = !time&&prevstateno
var(9)=-1

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 0
trigger1 = var(9)>0;<5
;trigger1 = (time%6)=1
attr=A,SP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,5
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-3,-3
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 1
trigger1 = var(9)>0;<5
;trigger1 = (time%6)=1
attr=A,NP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=6,5
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = parent,var(10) = 2
trigger1 = var(9)>0;<5
;trigger1 = (time%6)=1
attr=A,NP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
sprpriority=3
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,5
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-4.5,-3),ifelse(parent,var(11)=1,-3,1.5)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = var(9)<=0;>=5
trigger2 = frontedgedist <= -140
value = 1051
ignorehitpause=1
;---------------------------------------------------------------------------;
[Statedef 1051]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1051
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 1060]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1060
sprpriority = 4
velset = 9,0
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = time>0
y = -5*-(cos(time/6))

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(10) = ifelse((parent,stateno=[620,621]), 2, ifelse((parent,stateno=[420,421]), 1, 0))

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1032
ID = 1060
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1061
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
triggerall = P2BodyDist X >= 20
triggerall = var(10) = 0 ;Parent,Stateno = 220
trigger1 = !time
attr=A,SP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-7
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0
[State 220, hit]
type=hitdef
triggerall = P2BodyDist X < 20
triggerall = var(10) = 0 ;Parent,Stateno = 220
trigger1 = !time
attr=A,SP
damage=ceil(30*root,fvar(10)),2
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-7
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = P2BodyDist X >= 20
triggerall = var(10) = 1 ;Parent,Stateno = 420
trigger1 = !time
attr=A,SP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0
[State 220, hit]
type=hitdef
triggerall = P2BodyDist X < 20
triggerall = var(10) = 1 ;Parent,Stateno = 420
trigger1 = !time
attr=A,SP
damage=ceil(30*root,fvar(10)),2
animtype=Hard
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = P2BodyDist X >= 20
triggerall = var(10) = 2 ;Parent,Stateno = 620
trigger1 = !time
attr=A,SP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-12,-8),ifelse(parent,var(11)=1,15,12)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
persistent=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0
[State 220, hit]
type=hitdef
triggerall = P2BodyDist X < 20
triggerall = var(10) = 2 ;Parent,Stateno = 620
trigger1 = !time
attr=A,SP
damage=ceil(30*root,fvar(10)),2
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-12,-8),ifelse(parent,var(11)=1,15,12)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
persistent=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 1061
;---------------------------------------------------------------------------;
[Statedef 1061]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1061
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 1065]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1060
sprpriority = 4
velset = 9,0
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = time>0
y = 5*-(cos(time/6))

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(10) = ifelse((parent,stateno=[620,621]), 2, ifelse((parent,stateno=[420,421]), 1, 0))

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1032
ID = 1060
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1066
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
triggerall = var(10) = 0 ;Parent,Stateno = 220
trigger1 = !time
attr=A,SP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-7
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = var(10) = 1 ;Parent,Stateno = 420
trigger1 = !time
attr=A,SP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3
down.velocity = -4,0
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = var(10) = 2 ;Parent,Stateno = 620
trigger1 = !time
attr=A,SP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity = ifelse(parent,var(11)=1,-12,-8),ifelse(parent,var(11)=1,15,12)
air.fall=ifelse(parent,var(11)=1,1,0)
fall.recover=ifelse(parent,var(11)=1,0,1)
fall.yvelocity=ifelse(parent,var(11)=1,0,-4.5)
yaccel=ifelse(parent,var(11)=1,.65,.5)
persistent=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 1066
;---------------------------------------------------------------------------;
[Statedef 1066]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1061
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;---------------------------------------------------------------------------
;Charge FX
[Statedef 1090]
type = A
physics = N
anim = 1090
velset = 0,0
sprpriority = 5

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = A
facing = ifelse(root,facing = -1, -1, 1)
pos = const(size.mid.pos.x),const(size.head.pos.y)
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = S
facing = ifelse(root,facing = -1, -1, 1)
pos = const(size.mid.pos.x),const(size.mid.pos.y)
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = C
facing = ifelse(root,facing = -1, -1, 1)
pos = const(size.mid.pos.x),ceil(const(size.mid.pos.y)/1.5)
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = L
facing = ifelse(root,facing = -1, -1, 1)
pos =const(size.mid.pos.x),ceil(const(size.mid.pos.y)/4.5)
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root,var(32)=1
trigger1 = root, var(20) >= 80 && anim != 1091 && anim = 1090||anim=1092
value = 1091

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root,var(32)=0
trigger1 = root, var(20) >= 120 && anim != 1091 && anim = 1090
value = 1091

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root,var(32)=0
trigger1 = root, var(20) >= 210 && anim != 1092 && anim = 1091
value = 1092

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

[State 0,destroyself]
type = DestroySelf
trigger1 = root, var(20) = 0
;trigger2 = (root,stateno = [220,221])||(root,stateno = [420,421])||((root,stateno = [620,621])&&(anim!=44))
trigger2 = root,stateno=[1000,1007]
;trigger2 = root, command != "holdx" || root, command = "endx" || root, command = "x"
;trigger2 = root, movetype = H

;------------------------------
[Statedef 1105]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1105
sprpriority = 3
velset = 0,0
juggle = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = root, Anim = 1100
trigger2 = root, Anim = 1102
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1106
ID = 1105
pos = 15,-90
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2,5
accel = 0,1
random = 30,45
removetime = -2
scale = .25,.5
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,2
volume = 255
channel = -1
freqmul = 2

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:destroyself]
type = destroyself
trigger1 = root,anim=1101||root,stateno = 1101
trigger2 = root,movetype=H
trigger3 = root,stateno != 1100
trigger3 = root,stateno != 1102

;------------------------------
[Statedef 1310]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1310
velset = 0,0
sprpriority = 4
juggle = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S10,10
volume = 255
channel = -1
freqmul = 2
pan = 1

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 8
value = ifelse(parent,var(8)=2, 2, ifelse(parent,var(8)=1, 1, 0))

[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 99999
add = -200,50,-200
mul = 256,256,256
sinadd = 80,40,40,7
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,HA

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

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,SA,HA,AT
stateno = 1312
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time < 5
scale= (.2*time),1;-(.065*time)

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
helpertype = normal ;player
name = "Buster Shot"
ID = 1301
stateno = 1320
pos = ceil(24*const(size.xscale)),ceil(-47*const(size.xscale))
postype = p1
keyctrl = 0
ownpal = 1

[State 901:destroyself]
type = changestate
trigger1 = time >= ifelse(var(8)=2, 76, ifelse(var(8)=1, 58, 40))
trigger2 = parent,command = "QCF_z"||parent,command = "QCF_y"||parent,command = "QCF_x"
value = 1312

;------------------------------
[Statedef 1311]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1311
velset = 0,0
sprpriority = 4
juggle = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S10,10
volume = 255
channel = -1
freqmul = 2
pan = 1

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 8
value = ifelse(parent,var(8)=2, 2, ifelse(parent,var(8)=1, 1, 0))

[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 99999
add = -200,50,-200
mul = 256,256,256
sinadd = 80,40,40,7
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,HA

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

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,SA,HA,AT
stateno = 1312
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time < 5
scale= (.2*time),1;-(.065*time)

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
helpertype = normal ;player
name = "Buster Shot"
ID = 1301
stateno = 1320
pos = ceil(29*const(size.xscale)),ceil(-68*const(size.xscale))
postype = p1
keyctrl = 0
ownpal = 1

[State 901:destroyself]
type = changestate
trigger1 = time >= ifelse(var(8)=2, 76, ifelse(var(8)=1, 58, 40))
trigger2 = parent,command = "QCF_z"||parent,command = "QCF_y"||parent,command = "QCF_x"
value = 1312

;------------------------------
[Statedef 1312]
type = U
movetype = I
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 7

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

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

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

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time <= 15
scale= 1-(.065*time),1;-(.065*time)

[State 901:destroyself]
type = DestroySelf
trigger1 = time >= 15

;------------------------------
[Statedef 1315]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1315
velset = 0,0
sprpriority = 4
juggle = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S10,10
volume = 255
channel = -1
freqmul = 2
pan = 1

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

[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 99999
add = -200,50,-200
mul = 256,256,256
sinadd = 80,40,40,7
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,HA

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

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,SA,HA,AT
stateno = 1312
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time < 5
scale= (.2*time),1;-(.065*time)

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
helpertype = normal ;player
name = "Buster Shot"
ID = 1301
stateno = 1330
pos = ceil(24*const(size.xscale)),ceil(-47*const(size.xscale))
postype = p1
keyctrl = 0
ownpal = 1

[State 901:destroyself]
type = changestate
trigger1 = time >= 63
trigger2 = parent,command = "QCF_z"||parent,command = "QCF_y"||parent,command = "QCF_x"
value = 1312

;------------------------------
[Statedef 1316]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1316
velset = 0,0
sprpriority = 4
juggle = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S10,10
volume = 255
channel = -1
freqmul = 2
pan = 1

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

[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 99999
add = -200,50,-200
mul = 256,256,256
sinadd = 80,40,40,7
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,HA

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

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,SA,HA,AT
stateno = 1312
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time < 5
scale= (.2*time),1;-(.065*time)

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
trigger3 = AnimElem = 9
helpertype = normal ;player
name = "Buster Shot"
ID = 1301
stateno = 1330
pos = ceil(29*const(size.xscale)),ceil(-68*const(size.xscale))
postype = p1
keyctrl = 0
ownpal = 1

[State 901:destroyself]
type = changestate
trigger1 = time >= 56
trigger2 = parent,command = "QCF_z"||parent,command = "QCF_y"||parent,command = "QCF_x"
value = 1312

;------------------------------
[Statedef 1320]
type = A
movetype = A
physics = N
ctrl = 0
anim = 225
sprpriority = 4
velset = 9,0
juggle = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 99999
add = -200,50,-200
mul = 256,256,256
sinadd = 80,40,40,7
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1321
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
attr=A,SP
damage=ceil(15*root,fvar(10)),0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,5
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-2
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-2,-2.5
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 1321
;---------------------------------------------------------------------------;
[Statedef 1321]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 226
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .45

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

[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 99999
add = -200,50,-200
mul = 256,256,256
sinadd = 80,40,40,7
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1012
ID = 1010
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno-320
value = stateno-320
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 = !time&&!prevstateno
var(9) = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,2
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(9)>=2,1331,1330)
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 0, VarAdd]
type = VarAdd
trigger1 = movecontact=1
trigger2 = !time&&prevstateno
var(9)=1

[State 220, hit]
type=hitdef
trigger1 = var(9)<3
attr=A,SP
damage=ceil(35*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-3,-3
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = var(9)>=3
trigger2 = frontedgedist <= -140
value = 1331
ignorehitpause=1
;---------------------------------------------------------------------------;
[Statedef 1331]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1011
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 1401]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1401
velset = ifelse(parent,var(8)=2,9,ifelse(parent,var(8)=1, 7.5, 6)),ifelse(parent,var(8)=2,-2,ifelse(parent,var(8)=1, -.5, 2))
sprpriority = 3
juggle = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .5

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
y = 0
[State 0, PosSet]
type = PosSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = frontedgedist <= 15
x = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:destroyself]
type = changestate
trigger1 = vel Y >= 0 ;time >= 9
trigger1 = pos Y >= 0
value = 1402
;---------------------------------------------------------------------------;
[Statedef 1402]
type = S
movetype = A
physics = S
juggle = 1
ctrl = 0
anim = 1402
sprpriority = -1
velset = 0,0
poweradd = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, Helper]
type = Helper
trigger1 = time=1
helpertype = normal ;player
name = "Tornado Ground"
ID = 1410
stateno = 1410
pos = 0,0
postype = p1
keyctrl = 0
ownpal = 1
persistent=0

[State 0, Helper]
type = Helper
trigger1 = time=12
helpertype = normal ;player
name = "Tornado 3"
ID = 1405
stateno = 1405
pos = 0,ceil(-160*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0
[State 0, Helper]
type = Helper
trigger1 = time=8
helpertype = normal ;player
name = "Tornado 2"
ID = 1405
stateno = 1405
pos = 0,ceil(-95*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0
[State 0, Helper]
type = Helper
trigger1 = time=4
helpertype = normal ;player
name = "Tornado 1"
ID = 1405
stateno = 1405
pos = 0,ceil(-30*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0

[State 226, DestroySelf]
type = Destroyself
trigger1 = time >= 25

;------------------------------
[Statedef 1405]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1405
velset = 0,0
sprpriority = 5
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 0, Explod]
type = null;Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

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

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = Up
damage = ceil(37*root,fvar(10)),1
pausetime = 0,3
sprpriority=5
hitsound = S1,6
guardsound = S2,0
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=0,-15
air.type=Low
air.hittime=18
air.velocity=0,-13.5
yaccel=.8
getpower=0
envshake.time = 12
envshake.ampl=3

[State 901:destroyself]
type = changestate
trigger1 = numhelper(1410)=0
value = 1406
;---------------------------------------------------------------------------;
[Statedef 1406]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1406
sprpriority = 5
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 1410]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1410
sprpriority = 4
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S10,8
volume = 255
channel = -1

[State 0, Explod]
type = Explod
trigger1 = (time%3)=1
anim = 1411
ID = 1410
pos = 0,-15
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 0,-5
accel = 0,-.5
random = 60,30
removetime = -2
scale = .25,3
sprpriority = 7
ownpal = 1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numhelper(1400)=0
trigger2 = time >= 25
id = 1410

[State 901:destroyself]
type = DestroySelf
trigger1 = numhelper(1400)=0
trigger2 = time >= 25

;------------------------------
[Statedef 1421]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1401
velset = 2,4
sprpriority = 3
juggle = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .5

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
y = 0
[State 0, PosSet]
type = PosSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = frontedgedist <= 15
x = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:destroyself]
type = changestate
trigger1 = vel Y >= 0 ;time >= 9
trigger1 = pos Y >= 0
value = 1422
;---------------------------------------------------------------------------;
[Statedef 1422]
type = S
movetype = A
physics = N
juggle = 1
ctrl = 0
anim = 1402
sprpriority = -1
velset = 3,0
poweradd = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, Helper]
type = Helper
trigger1 = time=1
helpertype = normal ;player
name = "Tornado Ground"
ID = 1430
stateno = 1430
pos = 0,0
postype = p1
keyctrl = 0
ownpal = 1
persistent=0

[State 0, Helper]
type = Helper
trigger1 = time = 20
helpertype = normal ;player
name = "Tornado 1"
ID = 1425
stateno = 1425
pos = 0,ceil(-290*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0

[State 0, Helper]
type = Helper
trigger1 = time = 16
helpertype = normal ;player
name = "Tornado 1"
ID = 1425
stateno = 1425
pos = 0,ceil(-225*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0

[State 0, Helper]
type = Helper
trigger1 = time = 12
helpertype = normal ;player
name = "Tornado 3"
ID = 1425
stateno = 1425
pos = 0,ceil(-160*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0
[State 0, Helper]
type = Helper
trigger1 = time = 8
helpertype = normal ;player
name = "Tornado 2"
ID = 1425
stateno = 1425
pos = 0,ceil(-95*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0
[State 0, Helper]
type = Helper
trigger1 = time = 4
helpertype = normal ;player
name = "Tornado 1"
ID = 1425
stateno = 1425
pos = 0,ceil(-30*root,const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1
persistent=0

[State 226, DestroySelf]
type = DestroySelf
trigger1 = frontedgedist <= -70

;------------------------------
[Statedef 1425]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1405
velset = 3,0
sprpriority = 5
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 0, Explod]
type = null;Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

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

[State 0, HitDef]
type = HitDef
trigger1 = (Time%24)=1
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Heavy
sprpriority=5
air.animtype = Up
damage = ceil(25*root,fvar(10)),1
pausetime = 0,3
hitsound = S1,6
guardsound = S2,0
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity= ifelse(p2bodydist X >= 25, 1.5, ifelse(p2bodydist X <= -25, -4.5, -3)),-15
air.type=Low
air.hittime=18
air.velocity=ifelse(p2bodydist X >= 25, 1.5, ifelse(p2bodydist X <= -25, -4.5, -3)),-13.5
yaccel=.8
getpower=0
envshake.time = 12
envshake.ampl=3

[State 901:destroyself]
type = changestate
trigger1 = numhelper(1430)=0
value = 1426
;---------------------------------------------------------------------------;
[Statedef 1426]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1406
sprpriority = 5
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 1430]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1410
sprpriority = 4
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (time%12)=1
value = S10,8
volume = 255
channel = -1

[State 0, Explod]
type = Explod
trigger1 = (time%3)=1
anim = 1411
ID = 1410
pos = 0,-15
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 3,-8
accel = 0,-.5
random = 60,30
removetime = -2
scale = .25,3
sprpriority = 7
ownpal = 1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numhelper(1405)=0
id = 1410

[State 901:destroyself]
type = DestroySelf
trigger1 = numhelper(1405)=0
;------------------------------
[Statedef 1510]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1510
velset = 0,0
sprpriority = 5
juggle = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 0, Explod]
type = null;Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time = 1
anim = 8030
ID = 8030
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
supermovetime=9999
pausemovetime=9999
scale = root,const(size.xscale),root,const(size.yscale)
sprpriority = -1
ownpal = 1
ignorehitpause = 1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,7
freqmul = 1.2
channel = -1
pan = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = time=1
time = 10
freq = 30
ampl = 2

[State 0, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 2
ignorehitpause=1

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = Up
sprpriority=3
damage = ceil(35*root,fvar(10)),2
pausetime = 2,15
hitsound = S1,7
guardsound = S2,0
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,Ceil(p2Dist Y+enemynear,const(size.head.pos.y))
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-2,-15
air.type=Low
air.hittime=18
air.velocity=-2,-13.5
yaccel=.65
getpower=0
envshake.time = 12
envshake.ampl=3

[State 901:destroyself]
type = DestroySelf
trigger1 = AnimTime = 0

;------------------------------
[Statedef 1511]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1510
velset = 0,0
sprpriority = 5
juggle = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 0, Explod]
type = null;Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time = 1
anim = 8030
ID = 8030
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
supermovetime=9999
pausemovetime=9999
scale = root,const(size.xscale),root,const(size.yscale)
sprpriority = -1
ownpal = 1
ignorehitpause = 1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,7
freqmul = 1.2
channel = -1
pan = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = time=1
time = 10
freq = 30
ampl = 2

[State 0, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 2
ignorehitpause=1

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = Up
sprpriority=3
damage = ceil(70*root,fvar(10)),5
pausetime = 2,15
hitsound = S1,7
guardsound = S2,0
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,Ceil(p2Dist Y+enemynear,const(size.head.pos.y))
ground.type=Low
ground.slidetime=18
ground.hittime=18
ground.velocity=-2,-15
air.type=Low
air.hittime=18
air.velocity=-2,-13.5
yaccel=.65
getpower=0
envshake.time = 12
envshake.ampl=3

[State 901:destroyself]
type = DestroySelf
trigger1 = AnimTime = 0

;------------------------------
[Statedef 1515]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1515
velset = 0,0
sprpriority = 5
juggle = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = ceil(8*root,const(size.xscale)),ceil(-50*root,const(size.yscale))

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,4
freqmul = 1.5
channel = -1

[State 901:destroyself]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = parent,movetype=H
trigger3 = parent,stateno != [1500,1506]

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

[State 0, VelSet]
type = VelSet
trigger1 = 1
y = -2.5*(cos(time/5))

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,0
freqmul = 1.5
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1615
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
attr=A,AP
damage=ceil(25*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=1,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=15
ground.hittime=15
ground.velocity=-5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=15
air.velocity=-3,-5
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 1615
;------------------------------
[Statedef 1611]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1610
sprpriority = 4
velset = 4,2
juggle = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = -.15

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,0
freqmul = 1.5
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1615
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
attr=A,AP
damage=ceil(25*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=1,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=15
ground.hittime=15
ground.velocity=-5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=15
air.velocity=-3,-5
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 1615
;------------------------------
[Statedef 1612]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1610
sprpriority = 4
velset = 4,-2
juggle = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .15

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,0
freqmul = 1.5
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1615
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
attr=A,AP
damage=ceil(25*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=1,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=15
ground.hittime=15
ground.velocity=-5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=15
air.velocity=-3,-5
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
trigger3 = Pos Y >= 0
value = 1615
;---------------------------------------------------------------------------;
[Statedef 1615]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1611
sprpriority = 4
velset = 0,0
poweradd = 0

[State 1615, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1615, DestroySelf]
type = Destroyself
trigger1 = animtime=0

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

[State 0, VarSet]
type = VarAdd
trigger1 = 1
var(0) = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=1710
value = 1710

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add

[State 0, BindToParent]
type = BindToParent
trigger1 = parent,anim=1700
pos = ceil(25*root,const(size.xscale)),ceil(-45*root,const(size.xscale))

[State 0, BindToParent]
type = BindToParent
trigger1 = parent,anim=1701
pos = ceil(30*root,const(size.xscale)),ceil(-66*root,const(size.xscale))

[State 0, Explod]
type = null;Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -7.5,0
accel = 0,0
random = 30,30
removetime = -2
scale = 1,.25
sprpriority = 5
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,16
volume = 128
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AP,HA
stateno=1710
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP,HA
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = var(0)=1
attr=A,SA
damage=ceil(90*root,fvar(10)),2
animtype=Back
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=2,9
sprpriority = 3
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,8
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8,-6
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.fall=ifelse(parent,var(11)=1, 1, 0)
fall.recover=ifelse(parent,var(11)=1, 1, 0)
air.type=Low
air.hittime=18
air.velocity=-8,-3
yaccel=.65
fall.yvelocity=0
palfx.time = 30
palfx.add = 240,100,-50
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,6
envshake.time = 10
envshake.ampl = 2
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = AnimTime=0
value = 1711

[State 901:destroyself]
type = DestroySelf
trigger1 = parent,movetype = H
trigger2 = parent,stateno!=[1700,1704]
;---------------------------------------------------------------------------;
[Statedef 1711]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1711
sprpriority = 4
velset = 0,0
poweradd = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = parent,anim=1700
pos = ceil(25*root,const(size.xscale)),ceil(-45*root,const(size.xscale))

[State 0, BindToParent]
type = BindToParent
trigger1 = parent,anim=1701
pos = ceil(30*root,const(size.xscale)),ceil(-66*root,const(size.xscale))

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = DestroySelf
trigger1 = animtime=0
trigger2 = parent,movetype = H
trigger3 = parent,stateno!=[1700,1704]

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=1715
value = 1715

[State 0, BindToParent]
type = BindToParent
trigger1 = parent,anim=1705
pos = ceil(45*root,const(size.xscale)),ceil(-30*root,const(size.xscale))

[State 0, BindToParent]
type = BindToParent
trigger1 = parent,anim=1706
pos = ceil(45*root,const(size.xscale)),ceil(-50*root,const(size.xscale))

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 8
framegap = 3
trans = add1

[State 0, Explod]
type = null;Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -7.5,0
accel = 0,0
random = 30,30
removetime = -2
scale = 1,.25
sprpriority = 5
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=1
value = S10,17
volume = 128
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:destroyself]
type = DestroySelf
trigger1 = parent,movetype = H
trigger2 = parent,stateno!=[1705,1709]
trigger3 = parent,stateno=1705&&parent,animelemtime(3)>=1
trigger4 = parent,stateno=1706&&parent,animelemtime(3)>=1

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

[State 0, VarRandom]
type = VarRandom
trigger1 = !time&&!prevstateno
v = 2
range = -3,3
[State 0, VarRandom]
type = VarRandom
trigger1 = !time&&!prevstateno
v = 3
range = -20,-10

[State 0, VelSet]
type = VelSet
trigger1 = !time&&!prevstateno
x = var(2)
y = var(3)

[State 0, VarSet]
type = VarAdd
trigger1 = 1
var(1) = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .6

[State 0, Explod]
type = Explod
trigger1 = !prevstateno
anim = 1810+(random%8)
ID = 1800
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 3
facing = ifelse(random < 500, -1, 1)
ownpal = 0
removeongethit = 0
persistent=0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1805
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=!prevstateno
time=1
value=SCA,AP,AA
ignorehitpause=1

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

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 4
value = ifelse(Vel Y < 0, 1, 0)

[State 220, hit]
type=hitdef
triggerall = var(4) = 1
trigger1 = var(1)=1
attr=A,SP
damage=ceil(20*root,fvar(10)),2
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=1,5
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,3
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
down.hittime = 25
ground.velocity=-8
down.velocity = -4,0
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-9
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = var(4) = 0
trigger1 = var(1)=1
attr=A,SP
damage=ceil(20*root,fvar(10)),2
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=1,5
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,3
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-3,-9
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0

[State 901:destroyself]
type = changestate
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
value = 1806
;---------------------------------------------------------------------------;
[Statedef 1806]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1806
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&!prevstateno
value = 1825+(random%4)

[State 0, VarRandom]
type = VarRandom
trigger1 = !time&&!prevstateno
v = 2
range = 1,5
[State 0, VarRandom]
type = VarRandom
trigger1 = !time&&!prevstateno
v = 3
range = 100,150

[State 0, VelSet]
type = VelSet
trigger1 = !time&&!prevstateno
x = var(2)
y = var(3)/15

[State 0, VarSet]
type = VarAdd
trigger1 = 1
var(1) = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=1
value = S10,25
volume = 0
channel = -1

[State 0, Explod]
type = null;Explod
trigger1 = !prevstateno
anim = 1810+(random%8)
ID = 1800
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 3
facing = ifelse(random < 500, -1, 1)
ownpal = 0
removeongethit = 0
persistent=0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1825
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=!prevstateno
time=1
value=SCA,AP,AA
ignorehitpause=1

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

[State 220, hit]
type=hitdef
trigger1 = var(1)=1
attr=A,SP
damage=ceil(40*root,fvar(10)),4
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=1,9
sparkno=s8210+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,3
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
down.hittime = 25
ground.velocity=-2,5
down.velocity = 0,0
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-3,8
fall=1
fall.recover=0
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 0, RemoveExplod]
type = null;RemoveExplod
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0

[State 901:destroyself]
type = changestate
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
value = 1826

;---------------------------------------------------------------------------;
[Statedef 1826]
type = S
movetype = I
physics = S
juggle = 1
ctrl = 0
;anim = 1806
sprpriority = 4
velset = 0,0
poweradd = 0

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

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

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

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

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = time >= 10
trigger1 = (time%3)=1
flag = invisible

[State 226, DestroySelf]
type = Destroyself
trigger1 = time >= 25

;------------------------------
[Statedef 3090]
type = A
movetype = A
physics = N
ctrl = 0
anim = 225
sprpriority = 4
velset = 9,0
juggle = 0

;[State 0, AttackMulSet]
;type = AttackMulSet
;trigger1 = !time
;value = .775**parent,var(31)
;ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = root,command != "holdup"&&root,command!="holddown"
trigger1 = !time
y = ifelse(random < 333, -.75, ifelse((random = [333,665]),0, .75))

[State 0, VelSet]
type = VelSet
trigger1 = root,command = "holdup"&&root,command!="holddown"
trigger1 = !time
y = ifelse(random < 333, -2, ifelse((random = [333,665]),-1, -3))

[State 0, VelSet]
type = VelSet
trigger1 = root,command = "holddown"&&root,command!="holdup"
trigger1 = !time
y = ifelse(random < 333, 2, ifelse((random = [333,665]),1, 3))

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,0
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3091
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
triggerall = p2bodydist X <= 15
trigger1 = !time
attr=A,HP
damage=ceil(10*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=0,2
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=ifelse(parent,var(7)>=26, -5, -2),ifelse(parent,var(7)>=26, -3, 0)
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=ifelse(parent,var(7)>=26, -5, -2),-.75
fall = ifelse(parent,var(7)>=26, 1, 0)
fall.recover = ifelse(parent,var(7)>=26, 0,1)
fall.yvelocity = 0
down.velocity = -.5,0
down.bounce = 0
down.hittime = 18
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 220, hit]
type=hitdef
triggerall = p2bodydist X > 15
trigger1 = !time
attr=A,HP
damage=ceil(12*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=0,2
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=ifelse(parent,var(7)>=26, -5, -2),ifelse(parent,var(7)>=26, -3, 0)
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=ifelse(parent,var(7)>=26, -5, -2),-.75
fall = ifelse(parent,var(7)>=26, 1, 0)
fall.recover = ifelse(parent,var(7)>=26, 0,1)
fall.yvelocity = 0
down.velocity = -.5,0
down.bounce = 0
down.hittime = 18
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
trigger3 = pos Y >= 0&& Vel Y >= 0
value = 3091
;---------------------------------------------------------------------------;
[Statedef 3091]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 226;9741
sprpriority = 4
velset = 0,0
poweradd = 0

[State 0, Explod]
type = null;Explod
trigger1 = !time
anim = 226
ID = 3091
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = root,const(size.xscale),root,const(size.yscale)
sprpriority = 4
ownpal = 0
removeongethit = 0
ignorehitpause = 1

[State 3091, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = !animtime;time >= 5

;------------------------------
[Statedef 3095]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1040
sprpriority = 4
velset = 7.5,0
juggle = 0

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1012
ID = 1040
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=1
value = S10,0
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3096
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = root,command != "holdup"&&root,command!="holddown"
trigger1 = !time
y = ifelse(random < 333, -.5, ifelse((random = [333,665]),0, .5))

[State 0, VelSet]
type = VelSet
trigger1 = root,command = "holdup"&&root,command!="holddown"
trigger1 = !time
y = ifelse(random < 333, -1, ifelse((random = [333,665]),-.5, -1.5))

[State 0, VelSet]
type = VelSet
trigger1 = root,command = "holddown"&&root,command!="holdup"
trigger1 = !time
y = ifelse(random < 333, 1, ifelse((random = [333,665]),.5, 1.5))

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3091
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
attr=A,HP
damage=ceil(25*root,fvar(10)),2
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=0,4
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=ifelse(parent,var(7)>=10, -5, -2),ifelse(parent,var(7)>=10, -4.5, 0)
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=ifelse(parent,var(7)>=10, -5, -2),-3
fall = ifelse(parent,var(7)>=10, 1, 0)
fall.recover = ifelse(parent,var(7)>=10, 0,1)
fall.yvelocity = 0
down.velocity = -.5,0
down.bounce = 0
down.hittime = 18
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -140
trigger3 = pos Y >= 0&& Vel Y >= 0
value = 3096
;---------------------------------------------------------------------------;
[Statedef 3096]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1041
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 3305]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3305
sprpriority=5
velset = 4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
;------------------------------
[Statedef 3306]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3306
sprpriority=5
velset = 4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
;------------------------------
[Statedef 3307]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3305
sprpriority=5
velset = -4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
;------------------------------
[Statedef 3308]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3306
sprpriority=5
velset = -4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 3309]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3305
sprpriority=-1
velset = 4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
;------------------------------
[Statedef 3310]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3306
sprpriority=-1
velset = 4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
;------------------------------
[Statedef 3311]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3305
sprpriority=-1
velset = -4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
;------------------------------
[Statedef 3312]
type = A
movetype = I
physics = N
ctrl = 0
anim = 3306
sprpriority=-1
velset = -4,-(parent, vel Y)
juggle = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add1

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 3310
ID = 3305
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 4.5,3
accel = 0,0
random = 20,30
removetime = -2
scale = .2,.7
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 3405]
type = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0
juggle = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&!prevstateno
value = 3405

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 0, VelSet]
type = VelSet
trigger1 = !time&&!prevstateno
x = 12
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = Time = 60
x = 0
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = time>=80
x = -12
ignorehitpause = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3405
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=Vel X >= 0
time=-1
value=SCA,AA,AP
ignorehitpause=1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Vel X < 0
value = SCA

[State 220, hit]
type=null;hitdef
triggerall = var(10) = 0 ;Parent,Stateno = 220
trigger1 = !time
attr=A,NP
damage=ceil(60*root,fvar(10)),0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,9
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-7
yaccel=.65
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 0, PosAdd]
type = PosAdd
trigger1 = Vel X = 0
x = 5-(Time % 2) * 10
y = 5-(Time % 2) * 10

[State 901:destroyself]
type = DestroySelf
trigger1 = backedgedist <= -240

;------------------------------
[Statedef 3510]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1020
sprpriority = 4
velset = 9,0
juggle = 0

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1012
ID = 1010
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2.5,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,2
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3511
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
;trigger1 = (time%6)=1
attr=A,HP
damage=ceil(35*root,fvar(10)),3
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=0,8
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-3.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3.5
fall = 1
fall.recover=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = frontedgedist <= -140
value = 3511
;---------------------------------------------------------------------------;
[Statedef 3511]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 3511
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 3520]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1020
sprpriority = 4
velset = 9,0
juggle = 0

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1022
ID = 1020
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2.5,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,2
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3521
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
;trigger1 = (time%6)=1
attr=A,HP
damage=ceil(35*root,fvar(10)),3
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=0,8
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-5
fall = 1
fall.recover=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = frontedgedist <= -140
value = 3521
;---------------------------------------------------------------------------;
[Statedef 3521]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 3521
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 3530]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1020
sprpriority = 4
velset = 9,0
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = time > 5
y = 3

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
y = 0

[State 0, Explod]
type = Explod
trigger1 = (gametime%2)=1
anim = 1032
ID = 1030
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2.5,0
accel = -.6,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time&&!prevstateno
value = S10,2
volume = 255
channel = -1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3531
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
;trigger1 = (time%6)=1
attr=A,HP
damage=ceil(35*root,fvar(10)),3
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=0,8
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-7
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-7
fall = 1
fall.recover=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = changestate
trigger1 = frontedgedist <= -140
value = 3531
;---------------------------------------------------------------------------;
[Statedef 3531]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 3531
sprpriority = 4
velset = 0,0
poweradd = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 226, DestroySelf]
type = Destroyself
trigger1 = animtime=0

;------------------------------
[Statedef 3540]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1020
sprpriority = 4
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = .25
y = ifelse(random < 500, -4.5, -9)
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 2
y = ifelse(random < 500, -3, -6)
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 3
y = -1.5
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 4
x = 5
y = ifelse(random < 500, -.25, -.5)
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 9
y = 0

[State 0, Explod]
type = null;Explod
trigger1 = !time
anim = 3520
ID = 3510
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = root,const(size.xscale),root,const(size.yscale)
sprpriority = 5
ownpal = 0
removeongethit = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3545
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
;trigger1 = (time%6)=1
attr=A,HP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,3
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-3.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3.5
fall = 1
fall.recover=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = ChangeState
trigger1 = frontedgedist <= -140
value = 3545
;------------------------------
[Statedef 3541]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1020
sprpriority = 4
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
x = 3
y = ifelse(random < 500, 3, 6)
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 4.5
y = ifelse(random < 500, 1.5, 3)
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 1
trigger2 = AnimElem = 5
x = 9
y = 0

[State 0, Explod]
type = null;Explod
trigger1 = !time
anim = 3520
ID = 3510
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = root,const(size.xscale),root,const(size.yscale)
sprpriority = 5
ownpal = 0
removeongethit = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3545
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
;trigger1 = (time%6)=1
attr=A,HP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,3
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-3.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3.5
fall = 1
fall.recover=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = ChangeState
trigger1 = frontedgedist <= -140
value = 3545
;------------------------------
[Statedef 3542]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1020
sprpriority = 4
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = ifelse(random < 500, 4.5, 9)
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 4.5
y = ifelse(random < 500, -3, -6)
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 9
y = ifelse(random < 500, -4.5, -9)

[State 0, Explod]
type = null;Explod
trigger1 = !time
anim = 3520
ID = 3510
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = root,const(size.xscale),root,const(size.yscale)
sprpriority = 5
ownpal = 0
removeongethit = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3545
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
;trigger1 = (time%6)=1
attr=A,HP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,3
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-3.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3.5
fall = 1
fall.recover=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = ChangeState
trigger1 = frontedgedist <= -140
value = 3545

;------------------------------
[Statedef 3543]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1020
sprpriority = 4
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 1
trigger2 = AnimElem = 5
x = ifelse(random < 500, 4.5, 9)
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
x = 4.5
y = ifelse(random < 500, 3, 6)
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 9
y = ifelse(random < 500, 4.5, 9)

[State 0, Explod]
type = null;Explod
trigger1 = !time
anim = 3520
ID = 3510
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = root,const(size.xscale),root,const(size.yscale)
sprpriority = 5
ownpal = 0
removeongethit = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time&&anim!=stateno
value = stateno
ignorehitpause=1

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3545
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 220, hit]
type=hitdef
trigger1 = !time
;trigger1 = (time%6)=1
attr=A,HP
damage=ceil(15*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,3
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,9
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-3.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-3.5
fall = 1
fall.recover=0
yaccel=.65
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 901:destroyself]
type = ChangeState
trigger1 = frontedgedist <= -140
value = 3545

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 3545
ID = 3545
postype = p1
bindtime = 1
removetime = -2
scale = (root,const(size.xscale)/2),(root,const(size.yscale)/2)
sprpriority = 3
ownpal = 0

[State 226, assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S10,19
volume = 255
channel = -1

[State 226, DestroySelf]
type = Destroyself
trigger1 = time >= 16

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

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4
ignorehitpause = 1

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = ceil(110*root,const(size.xscale)),ceil(-115*root,const(size.yscale))
ignorehitpause = 1

[State 0, Explod]
type = null;Explod
trigger1 = (gametime%2)=1
anim = 227
ID = 225
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -4.5,0
accel = 0,0
random = 20,30
removetime = -2
scale = .5,.25
sprpriority = ifelse(random<500,-1,5)
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S10,7
volume = 128
channel = -1

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 2
time = 15
ampl = 5

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 220, hit]
type=hitdef
trigger1 = animelem = 1
trigger2 = animelem = 4
trigger3 = animelem = 7
trigger4 = animelem = 10
trigger5 = animelem = 13
trigger6 = animelem = 16
trigger7 = animelem = 19
trigger8 = animelem = 22
trigger9 = animelem = 25
trigger10 = animelem = 28
trigger11 = animelem = 31
trigger12 = animelem = 34
trigger13 = animelem = 37
trigger14 = animelem = 40
trigger15 = animelem = 43
trigger16 = animelem = 46
trigger17 = animelem = 49
attr=A,HA
damage=ceil(25*root,fvar(10)),1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=0,4
sparkno=s8220+(random%8)
guard.sparkno=s8100
sparkxy=-10,0
hitsound=s1,6
guardsound=s2,1
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-5,-2
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
air.type=Low
air.hittime=18
air.velocity=-5,-.75
yaccel=.65
fall = 1
fall.recover = 0
envshake.time = 2
envshake.ampl = 1
getpower=0

[State 901:destroyself]
type = DestroySelf
trigger1 = AnimTime=0
trigger2 = parent,movetype = H
trigger3 = parent,stateno != [3500,3505]

;------------------------------------------------------------------------
;Leave Everything Below From This Point Alone
;------------------------------------------------------------------------
[Statedef 7005]
type = S
movetype = I
physics = N
ctrl = 0
anim = 9741
sprpriority = 5
juggle = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = nobardisplay

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 901: NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA,AA,AT
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S7001,1
volume = 255
channel = 15

[State 0, EnvColor]
type = BGPalFX
;trigger1 = animelem = 1
trigger1 = time <= 50
add = -200,-200,-200
;sinadd=-255,-255,-255,160
;mul = 10-((time)*10),10-((time)*10),10-((time-45)*10)
;mul = ceil(1-((animtime-15)*10)),ceil(10-((animtime)*15)),ceil(140-((animtime-30)*10))
time = 1
;invertall = 1
;ignorehitpause = 1

[State 0, Helper]
type = Helper
trigger1 = (time = 0) && (parent,stateno=3400)
helpertype = normal ;player
name = "portraitlvl3"
ID = 7006
stateno = 7006
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove = 99999
pausemove = 99999
supermovetime=9999

[State 0, Explod]
type = Explod
trigger1 = time =0
anim = 7005
ID =  7000
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove =999999
pausemove =999999
supermovetime=9999
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = parent,stateno !=3400
trigger1 = time =0
anim = 7009
ID =  7009
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 10
supermove =999999
pausemove =999999
scale = .5,.5
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall= parent,stateno !=3400
trigger1 = time =10
anim = 7009
ID =  7010
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = -.15,0
accel = 0,0
random = 0,0
removetime = 50
supermove =999999
pausemove =999999
scale = .5,.5
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time <=10
ID=7009
scale = 2.5-(.21*(time)),2.5-(.21*(time))

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time >10
ID=7010
scale = .5,.5

[State 4300, circle]
type=explod
trigger1=time = 28
anim=7007
ID=7007
sprpriority=5
postype=p1
ownpal = 1
removetime=30
supermovetime=300

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7007)
ID=7007
scale = .5+(.04*(time-28)),.5+(.04*(time-28))

[State 4300, circle]
type=explod
trigger1=time = 20
anim=7008
ID=7008
sprpriority=5
postype=p1
ownpal = 1
removetime=30
supermovetime=300

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7008)
ID=7008
scale = .5+(.08*(time-20)),.5+(.08*(time-20))

[State -3, StopSnd]
type = StopSnd
trigger1 = time >=50
trigger2 = parent,movetype=H
channel = 15
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time >=50
trigger2 = parent,movetype=H

[State 901:destroyself]
type = destroyself
trigger1 = time >=50
trigger2 = parent,movetype=H
;------------------------------------------------------------------------
[Statedef 7006]
type = S
movetype = I
physics = N
ctrl = 0
anim = 9741
sprpriority = 5
juggle = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 2
;facing = 0
;pos = 0,0
;ignorehitpause =
;persistent =

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = nobardisplay

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 901: NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA,AA,AT
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = time =0
anim = 7010
ID =  7010
pos = 160,119
postype = back ;p2,front,back,left,right
facing = ifelse((root,facing= 1),1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove =999999
pausemove =999999
scale = 1,1
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7010) && time <=8
ID=7010
scale = .5,.5;2-(.145*(time)),2-(.145*(time))

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7010) && time = [9,40]
ID=7010
scale = .5,.5

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7010) && time >40
ID=7010
scale = .5+(.16*(time-40)),.5+(.16*(time-40))

[State 0, PalFX]
type = PalFX
trigger1=numexplod(7010) && time <=20
time = 1
add = 255-(10*(time)),255-(10*(time)),255-(10*(time))

[State 0, PalFX]
type = PalFX
trigger1=numexplod(7010) && time >40
time = 1
add = 0-(10*(time-40)),0-(10*(time-40)),0-(10*(time-40))

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time >=50
trigger2 = root,movetype=H

[State 901:destroyself]
type = destroyself
trigger1 = time >=50
trigger2 = root,movetype=H
;========================<KANJI B.G.>=============================
[Statedef 7610]
physics=N
velset=0,0
anim=9741

[State 7610, assert]
type=assertspecial
trigger1=time<120
flag=nomusic

[State 7610, snd]
type=playsnd
trigger1=!time
value=7610,0

[State 7610, black]
type=bgpalfx
trigger1=time<120
time=2
add=-255,-255,-255

[State 7610, black]
type=bgpalfx
trigger1=time=120
time=60
add=-255,-255,-255
sinadd=255,255,255,240

[State 7610, fade]
type=palfx
trigger1=time=120
time=60
sinadd=-255,-255,-255,240

[State 7610, kanji]
type=explod
trigger1=!time
anim=7610
ID=7610
sprpriority=-5
postype=left
pos=160,120
scale=.5,.5
bindtime=-1

[State 7610, shrink]
type=modifyexplod
trigger1=time<6
ID=7610
scale=(5.5-time),(5.5-time)

[State 7610, shrink]
type=modifyexplod
trigger1=time>=6
ID=7610
scale=.5,.5

[State 7610, flamebg]
type=explod
trigger1=!time
anim=7611
ID=7611
sprpriority=5
postype=left
pos=0,0
bindtime=-1
removetime=-1
pausemovetime=300
supermovetime=300

;[State 9999, PlaySnd]
;type = PlaySnd
;triggerall = roundstate = 4
;trigger1 = root,stateno = 362
;trigger2 = root,stateno = [382,383]
;value = s9999,0
;ignorehitpause = 1
;volume = 255
;persistent = 0
;abspan = 1

[State 7610, assert]
type=assertspecial
trigger1=1
flag=invisible
flag2=nobardisplay
ignorehitpause=1

[State 7610, assert]
type=assertspecial
trigger1=time<120
flag=noFG
ignorehitpause=1

[State 7610, safety]
type=removeexplod
trigger1=time>=180

[State 7610, end]
type=destroyself
trigger1=time>=180
;========================<CAMERA CONTROL>=============================
[Statedef 7650]
physics=N
velset=0,0
anim=9741
[State 7650, bound]
type=screenbound
trigger1= 1
value=0
movecamera=1,1
[State 7650, end]
type=destroyself
trigger1= roundstate=2
;---------------------------------------------------------
;hyper bg
[Statedef 7021]
physics = N
anim = 9741
sprpriority = -3

[State 0, PalFXWiz]
type = PalFX
trigger1 = root, stateno = [3500,3505]
trigger1 = time = 0
time =  99999
add = 30,-150,-150
;mul = 256,256,256
;sinadd = 40,80,40,10
invertall = 0
color = 0
;ignorehitpause = 0
;persistent = 1

[State 7020, 9]
type = AssertSpecial
trigger1 = 1;1
flag = noFG
ignorehitpause = 1

[State 7020, 9]
type   = Explod
;triggerall = p2life >0
trigger1 = numexplod(7021)=0
anim = 7021
postype = left
ID = 7021
sprpriority = -10
removetime = -2
pos = 0,0;160,0
scale = 1,1
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 7020, 9] ;animação de fundo
type  = null;Explod
;triggerall = p2life >0
trigger1 = numexplod(7022)=0
anim = 7021
postype = right
ID = 7022
sprpriority = -4
removetime = -2
pos = -160,0
scale = 0.642,1
bindtime = -1
facing=-1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

;[State 8000, 1] ;Anim for Super KO FX
;type = ChangeAnim
;trigger1 = anim=9741 && roundstate=3 && p2life=0
;value = 8550

[State 8500, 7]
Type = RemoveExplod
trigger1 = root, movetype = H
trigger2 = root, var(45)=0;stateno!=3000
trigger3 = numhelper(9998) = 1
trigger4 = numhelper(9999) = 1
trigger5 = numhelper(7005) = 1
;trigger3 = p2life <= 0
;triggerall = root, var(9)<=0
;triggerall = anim=8500
;trigger1 = root, stateno!=3000
;trigger1 = root, stateno!=3100
;trigger1 = root, stateno!=[3000,3604]
;trigger2 = anim=8500 && roundstate=3

[State 8500, 7]
Type = destroyself
trigger1 = root, movetype = H
trigger2 = root, var(45)=0;stateno!=3000
trigger3 = numhelper(9998) = 1
trigger4 = numhelper(9999) = 1
trigger5 = numhelper(7005) = 1
;value = 7022
;trigger3 = p2life <= 0
;triggerall = root, var(9)<=0
;triggerall = anim=8500
;trigger1 = root, stateno!=3000
;trigger1 = root, stateno!=3100
;trigger1 = root, stateno!=[3000,3604]
;trigger2 = anim=8500 && roundstate=3
;---------------------------------------------------------
;hyper bg
[Statedef 7022]
physics = N
anim = 9741
sprpriority = -3

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0-(time*4),0-(time*4),0-(time*4)
;mul = 256,256,256
;sinadd = 0,0,0,10
invertall = 0
color = 256
;ignorehitpause =
;persistent =

[State 7020, 9]
type = AssertSpecial
trigger1 = 1;1
flag = noFG
ignorehitpause = 1

[State 7020, 9]
type   = Explod
triggerall = p2life >0
trigger1 = numexplod(7021)=0
anim = 70210
postype = left
ID = 7021
sprpriority = -5
supermovetime = 1
removetime = -2
pos = 160,0
scale = 0.642,1
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999
ownpal=0

[State 7020, 9] ;animação de fundo
type  = Explod
triggerall = p2life >0
trigger1 = numexplod(7022)=0
anim = 70210
postype = right
ID = 7022
sprpriority = -5
supermovetime = 1
removetime = -2
pos = -160,0
scale = 0.642,1
bindtime = -1
facing=-1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999
ownpal=0

;[State 8500, 7]
;Type = RemoveExplod
;trigger1 = root, movetype = H
;trigger2 = root, var(45)=0;stateno!=3000
;trigger3 = p2life <= 0
;triggerall = root, var(9)<=0
;triggerall = anim=8500
;trigger1 = root, stateno!=3000
;trigger1 = root, stateno!=3100
;trigger1 = root, stateno!=[3000,3604]
;trigger2 = anim=8500 && roundstate=3

[State 8500, 7]
Type = Destroyself
trigger1 = time >=40
;trigger2 = root, var(45)=0;stateno!=3000
;trigger3 = p2life <= 0
;triggerall = root, var(9)<=0
;triggerall = anim=8500
;trigger1 = root, stateno!=3000
;trigger1 = root, stateno!=3100
;trigger1 = root, stateno!=[3000,3604]
;trigger2 = anim=8500 && roundstate=3

;------------------------------------
[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9741, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9741, PauseCheck]
type = VarSet
trigger1 = (GameTime>(Parent,var(59)))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)+(var(4):=0)

[State 9741, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9741, DirTurnOnAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = !var(9)
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = !(var(4):=1)
var(59) = var(4)

[State 9741, DirTurnOffAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = (var(4):=0)

[State 9741, ButtonTurnOnAI]
type = ParentVarSet
triggerall = var(1)
triggerall = !var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
var(59) = 1

[State 9741, ButtonTurnOffAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9741, UnPauseCheck]
type = VarSet
triggerall = var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(2) = 2)
trigger8 = (var(2):=0)
var(2) = 2

[State 9741, Goodbye]
type = DestroySelf
triggerall = (var(1):=1)
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)


;------------------
; AI Activation Helper State - Compatibly Partnered Version
;
; var(1) - First tick dir activation prevention
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Hitpause check.
; var(5) - No button on previous tick.
; var(6) - Any dir on this tick.
; var(7) - Any button on this tick.
; var(8) - Matching partner button detected.
; var(9) - AutoTurn bug fixer.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(59) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9742]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9742, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9742, PauseCheck]
type = VarSet
trigger1 = (GameTime>Parent,var(57))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)

[State 9742, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9742, ParentDirCheck]
type = VarSet
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = (var(6):=0)
var(6) = 1

[State 9742, ParentButtonCheck]
type = VarSet
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(7):=0)
var(7) = 1

[State 9742, SameButtonCheck]
type = VarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = NumPartner
trigger1 = (Parent,command = "a")
trigger1 = (Partner,command = "a")
trigger2 = (Parent,command = "b")
trigger2 = (Partner,command = "b")
trigger3 = (Parent,command = "c")
trigger3 = (Partner,command = "c")
trigger4 = (Parent,command = "x")
trigger4 = (Partner,command = "x")
trigger5 = (Parent,command = "y")
trigger5 = (Partner,command = "y")
trigger6 = (Parent,command = "z")
trigger6 = (Partner,command = "z")
trigger7 = (Parent,command = "start")
trigger7 = (Partner,command = "start")
trigger8 = (var(15):=0)
var(15) = 1

[State 9742, DirTurnOnAI]
type = ParentVarSet
trigger1 = var(1)
trigger1 = var(6)
trigger1 = !var(3)
trigger1 = !var(4)
trigger1 = !var(16)
var(59) = 1

[State 9742, DirTurnOffAI]
type = ParentVarSet
triggerall = var(6)
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = 0

[State 9742, ButtonTurnOnAI]
type = ParentVarSet
trigger1 = var(5)
trigger1 = var(7)
trigger1 = !var(2)
trigger1 = !var(15)
var(59) = 1

[State 9742, ButtonTurnOffAI]
type = ParentVarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = !var(15)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9742, UnPauseCheck]
type = VarSet
triggerall = var(2)
triggerall = !var(4)
trigger1 = var(7)
trigger2 = (var(2) = 2)
trigger2 = (var(2):=0)
var(2) = 2

[State 9742, Goodbye]
type = DestroySelf
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

[State 9742, HitPauseCheck]
type = VarSet
trigger1 = var(6)
trigger2 = var(7)
trigger3 = !(Parent,HitPauseTime)
var(4) = Parent,HitPauseTime

[State 9742, Delay]
type = VarSet
trigger1 = (var(1):=1)
var(5) = !var(7)
;-------------------------------------------
; Ffffffinish!!
[StateDef 9998]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 9741

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,2
ignorehitpause = 1
volume = -255
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,3
ignorehitpause = 1
volume = 255
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = root,stateno = [180,185]
value = s9999,0
ignorehitpause = 1
volume = 255
persistent = 0
abspan = 1

[State 9999, Short Pause]
type = Pause
trigger1 = Time = 1
time = 60
movetime = 0
ignorehitpause = 1

[State 9999, Explod]
type = Explod
trigger1 = time = 0
anim = 9997
postype = back  ;p2,front,back,left,right
pos = 0,240
bindtime = -1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
ontop = 1
ownpal = 1
removeongethit = 0
;ignorehitpause =
;persistent =

;-------------------------------------------
; Hyper Combo Finish!!
[StateDef 9999]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 9741

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,4
volume = 255
ignorehitpause = 1
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,5
volume = 0
ignorehitpause = 1
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = root,stateno = [180,185]
value = s9999,0
ignorehitpause = 1
volume = 255
persistent = 0
abspan = 1

[State 9999, Explod]
type = Explod
trigger1 = time = 0
anim = 9999
id = 9999
postype = left  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = 1,1
facing = 1
supermovetime = 9999
pausemovetime = 9999
sprpriority = -5
ownpal = 1
removeongethit = 0
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent, movetype = H
id = 9999

