;========================<FIRE>=============================
[Statedef 1195]
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=1195
ID=1195
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 = 1195
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)

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

;------------------------------------------------------------------------
[Statedef 1090]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1092
sprpriority = 5
velset = 5,0 ;ifelse(parent,var(10) = 2,6,ifelse(parent,var(10) = 1,4,2)),0
juggle = 0

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

[State 0, Helper]
type = Helper
trigger1 = animelem = 1 && (numhelper(1092)=0)
helpertype = normal ;player
name = "hadouken"
ID = 1092
stateno = 1092
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
sprpriority = 4
supermove = 9999
pausemove = 9999
size.xscale =1
size.yscale =1

[State 0, Explod]
type = Explod
trigger1 = ifelse(var(10)=2,(GameTime%1),(GameTime%7)) = 1
anim = 3793
ID = 3793
pos = -45,0
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = (ifelse(parent,var(10) = 2,5,ifelse(parent,var(10) = 1,5.8,4)))-2,0
accel = 0,0
random = 0,40
removetime = 35
supermove = 99999
pausemovetime = 99999
scale = .4,.2
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 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=1091
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 1005, NotHitBy]
type = NotHitBy
trigger1 = 1
value = ,HA,NT,ST,HT,NA
time = -1
ignorehitpause=1

[State 0, Explod]
type = Explod
trigger1= p2stateno = [5000,5999]
trigger1 = movehit = 1
anim = 9996
ID = 9996
pos = 0,200
postype = back  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 1
supermove = 99999
pausemove = 99999
scale = 1,1
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 901:projectile]
type = hitdef
trigger1 = Time = 0 && P2BodyDist X > 18
sparkxy = -10,0
animtype = hard
attr = S,SP
priority = 3
damage = 45,5
guardflag = MA
hitflag = MAF
pausetime = 0,8
sparkno = s8210+(random%8)
guard.sparkno = s8105
hitsound = s1,9
guardsound = s2,1
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime = 22
ground.velocity = -8,0
air.hittime = 13
air.velocity = -3,-7
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
yaccel = .5
palfx.time= 15
palfx.add = 45,30,45
palfx.mul = 256,256,256
palfx.sinadd = -20,-20,-20,5

[State 901:projectile]
type = hitdef
trigger1 = Time = 0 && P2BodyDist X <= 18
sparkxy = -10,0
animtype = hard
attr = S,SP
priority = 3
damage = 75,15
guardflag = MA
hitflag = MAF
pausetime = 0,8
sparkno = s8210+(random%8)
guard.sparkno = s8105
hitsound = s1,9
guardsound = s2,1
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime = 22
ground.velocity = -5,-3
air.hittime = 13
air.velocity = -5,-2
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
yaccel = .5
palfx.time= 15
palfx.add = 45,30,45
palfx.mul = 256,256,256
palfx.sinadd = -20,-20,-20,5

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "Fire"
ID = 1195
stateno = 1195
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
sprpriority = 4
supermove = 9999
pausemove = 9999
size.xscale =1
size.yscale =1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = movehit = 1
v = 20    ;fv =
value = 1

[State 0, Attack MulSet]
type = AttackMulSet
trigger1 = root, Var(20) >= 0
trigger1 = movehit = 1
value = ifelse((root, var(20) = [21,35]), .5, ifelse(root, var(20) > 35, .2, 1))

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact
trigger2 = frontedgedist <= -70
;id =  1090

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 1091

[State 901:destroyself]
type = changestate
trigger1 = time >= ifelse(parent,var(10) = 2,30,ifelse(parent,var(10) = 1,20,10))
trigger2 = frontedgedist <= -70
value = 1093
;---------------------------------------------------------------------------;
[Statedef 1091]
type = S
movetype = I
physics = S
juggle = 1
ctrl = 0
anim = 9741
velset = 0,0
poweradd = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,2
volume = 200
channel = -1

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1091
ID = 1091
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 = 9999
pausemove = 9999
scale = 1,1
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 707]
type= PlayerPush
trigger1= 1
value= 0
persistent= 1

[State 1002]
type = Destroyself
trigger1 = time = 1

;---------------------------------------------------------------------------;
[Statedef 1093]
type = S
movetype = I
physics = S
juggle = 1
ctrl = 0
anim = 1091
velset = 5,0
poweradd = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,2
volume = 200
channel = -1

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 707]
type= PlayerPush
trigger1= 1
value= 0
persistent= 1

[State 1002]
type = Destroyself
trigger1 = AnimTime = 0
;------------------------------------------------------------------------
[Statedef 1092]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1090
sprpriority = 4
velset = 0
juggle = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
facing = 1
pos = 0,0

[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, AfterImageTime]
type = AfterImageTime
trigger1 = parent,anim !=1092
time = 0
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,anim !=1092
;trigger2 = animtime=0

[State 901:destroyself]
type = destroyself
trigger1 = parent,anim !=1092;numhelper(1000)=0
;trigger2 = animtime=0

;------------------------------------------------------------------------
[Statedef 1095]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1097
sprpriority = 5
velset = 6,4.2
;velset = ifelse(parent,var(10) = 2,7.2,ifelse(parent,var(10) = 1,6,4)),0
juggle = 0

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

[State 0, Helper]
type = Helper
trigger1 = animelem = 1 && (numhelper(1097)=0)
helpertype = normal ;player
name = "hadouken"
ID = 1097
stateno = 1097
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
sprpriority = 4
supermove = 9999
pausemove = 9999
size.xscale =1
size.yscale =1

[State 0, Explod]
type = Explod
trigger1 = ifelse(var(10)=2,(GameTime%1),(GameTime%7)) = 1
anim = 3793
ID = 3793
pos = -45,0
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = (ifelse(parent,var(10) = 2,-5,ifelse(parent,var(10) = 1,-5.8,-4)))+2,(ifelse(parent,var(10) = 2,-5,ifelse(parent,var(10) = 1,-5.8,-4)))+2
accel = 0,0
random = 0,40
removetime = 35
supermove = 99999
pausemovetime = 99999
scale = .4,.2
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 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=1096
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 1005, NotHitBy]
type = NotHitBy
trigger1 = 1
value = ,HA,NT,ST,HT,NA
time = -1
ignorehitpause=1

[State 0, Explod]
type = Explod
trigger1= p2stateno = [5000,5999]
trigger1 = movehit = 1
anim = 9996
ID = 9996
pos = 0,200
postype = back  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 1
supermove = 99999
pausemove = 99999
scale = 1,1
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 901:projectile]
type = hitdef
trigger1 = Time = 0 && P2BodyDist X > 18
sparkxy = -10,0
animtype = hard
attr = S,SP
priority = 3
damage = 45,5
guardflag = MA
hitflag = MAF
pausetime = 0,8
sparkno = s8210+(random%8)
guard.sparkno = s8105
hitsound = s1,9
guardsound = s2,1
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime = 22
ground.velocity = -8,0
air.hittime = 13
air.velocity = -3,-7
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
yaccel = .5
palfx.time= 15
palfx.add = 45,30,45
palfx.mul = 256,256,256
palfx.sinadd = -20,-20,-20,5

[State 901:projectile]
type = hitdef
trigger1 = Time = 0 && P2BodyDist X <= 18
sparkxy = -10,0
animtype = hard
attr = S,SP
priority = 3
damage = 75,15
guardflag = MA
hitflag = MAF
pausetime = 0,8
sparkno = s8210+(random%8)
guard.sparkno = s8105
hitsound = s1,9
guardsound = s2,1
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime = 22
ground.velocity = -5,-3
air.hittime = 13
air.velocity = -5,-2
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
yaccel = .5
palfx.time= 15
palfx.add = 45,30,45
palfx.mul = 256,256,256
palfx.sinadd = -20,-20,-20,5

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "Fire"
ID = 1195
stateno = 1195
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
sprpriority = 4
supermove = 9999
pausemove = 9999
size.xscale =1
size.yscale =1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = movehit = 1
v = 20    ;fv =
value = 1

[State 0, Attack MulSet]
type = AttackMulSet
trigger1 = root, Var(20) >= 0
trigger1 = movehit = 1
value = ifelse((root, var(20) = [21,35]), .5, ifelse(root, var(20) > 35, .2, 1))

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact
trigger2 = frontedgedist <= -70
trigger3 = pos Y >= 0
;id =  1090

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
trigger3 = pos Y >= 0
value = 1096

[State 901:destroyself]
type = changestate
trigger1 = time >= ifelse(parent,var(10) = 2,30,ifelse(parent,var(10) = 1,20,10))
trigger2 = frontedgedist <= -70
trigger3 = pos Y >= 0
value = 1098
;---------------------------------------------------------------------------;
[Statedef 1096]
type = S
movetype = I
physics = S
juggle = 1
ctrl = 0
anim = 9741
velset = 0,0
poweradd = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,2
volume = 200
channel = -1

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1096
ID = 1096
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 = 9999
pausemove = 9999
scale = 1,1
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 707]
type= PlayerPush
trigger1= 1
value= 0
persistent= 1

[State 1002]
type = Destroyself
trigger1 = time = 1
;------------------------------------------------------------------------
[Statedef 1097]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1095
sprpriority = 4
velset = 0
juggle = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
facing = 1
pos = 0,0

[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, AfterImageTime]
type = AfterImageTime
trigger1 = parent,anim !=1097
time = 0
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,anim !=1097
;trigger2 = animtime=0

[State 901:destroyself]
type = destroyself
trigger1 = parent,anim !=1097;numhelper(1000)=0
;trigger2 = animtime=0
;---------------------------------------------------------------------------;
[Statedef 1098]
type = A
movetype = I
physics = N
juggle = 1
ctrl = 0
anim = 1096
velset = 6,4.2
poweradd = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,2
volume = 200
channel = -1

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

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 707]
type= PlayerPush
trigger1= 1
value= 0
persistent= 1

[State 1002]
type = Destroyself
trigger1 = AnimTime = 0
;---------------------------------------------------------------------------
;stand
[Statedef 1190]
type = S
movetype = I
physics = N
ctrl = 0
anim = 1199
sprpriority = 4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S5,1
channel = -1

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

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 3793
ID = 3793
pos = 15,-60
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = -10,5
accel = 0,0
random = -60,60
removetime = 5
supermove = 99999
pausemovetime = 99999
scale = .4,.2
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1

[State 20000, Turn]
type = Turn
trigger1 = facing != root,facing

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

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add ;"none","add1","sub"

[State 2, changestate]
type = changestate
;trigger1 = parent,stateno = [5000,5999]
;;trigger2 = parent,movetype = H
;trigger2 = animtime = 0
trigger1 = root, Vel Y >= 0
value = 1191

[State 2, changestate]
type = destroyself
;trigger1 = parent,stateno = [5000,5999]
;;trigger2 = parent,movetype = H
;trigger2 = animtime = 0
trigger1 = root, movetype = H
;---------------------------------------------------------------------------
;stand
[Statedef 1191]
type = S
movetype = I
physics = N
ctrl = 0
anim = 1191
sprpriority = 5

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S5,2
channel = -1
persistent = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add ;"none","add1","sub"

[State 20000, Turn]
type = Turn
trigger1 = facing != root,facing

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

[State 2, changestate]
type = destroyself
;trigger1 = parent,stateno = [5000,5999]
trigger1 = root,movetype = H
trigger2 = animtime = 0
trigger3 = root,anim != 1105

;---------------------------------------------------------------------------;
[Statedef 1590]
type = S
movetype = A
physics = S
juggle = 0
ctrl = 0
anim = 9741
velset = 0,0
poweradd = 0
sprpriority=4

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

[State 0, BindToParent]
type = BindToParent
trigger1= parent,stateno=[1500,1505]
time = 2
facing = 1
pos = 65,-56
;ignorehitpause =
;persistent =

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
trigger2 = parent,movetype = H

[State 1002]
type = Destroyself
trigger1 = animtime = 0
trigger2 = parent,movetype = H

;---------------------------------------------------------------------------
;stand
[Statedef 3090]
type = S
movetype = I
physics = N
ctrl = 0
anim = ifelse(root, anim = 3002, 1199, 3093)
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S5,1
channel = -1

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

[State 20000, Turn]
type = Turn
trigger1 = facing != root,facing

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

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add ;"none","add1","sub"

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 3793
ID = 3793
pos = 15,-60
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = -10,5
accel = 0,0
random = -60,60
removetime = 5
supermove = 99999
pausemovetime = 99999
scale = .4,.2
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1

[State 2, changestate]
type = changestate
;trigger1 = parent,stateno = [5000,5999]
;;trigger2 = parent,movetype = H
;trigger2 = animtime = 0
trigger1 = root, anim = 3000
trigger1 = root, animelem = 5
trigger2 = root, anim = 3001
trigger2 = root, animelem = 5
trigger3 = root, stateno = 3005
trigger3 = root, vel Y >= 0
value = 3091

[State 2, changestate]
type = destroyself
;trigger1 = parent,stateno = [5000,5999]
;;trigger2 = parent,movetype = H
;trigger2 = animtime = 0
trigger1 = root, movetype = H
;---------------------------------------------------------------------------
;stand
[Statedef 3091]
type = S
movetype = I
physics = N
ctrl = 0
anim = ifelse(root, stateno = 3005, 1191, 3094)
sprpriority = 5

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S5,2
channel = -1
persistent = 0

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 99999
length = 5
framegap = 1
trans = add ;"none","add1","sub"

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

[State 20000, Turn]
type = Turn
trigger1 = facing != root,facing

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

[State 2, changestate]
type = destroyself
;trigger1 = parent,stateno = [5000,5999]
trigger1 = root,movetype = H
trigger2 = animtime = 0

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

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

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 1
time = 20
freq = 80
;phase = 90
;ignorehitpause =
;persistent =

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

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0

[State 1002]
type = Destroyself
trigger1 = animtime = 0
;---------------------------------------------------------------------------;
[Statedef 3293]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3293
velset = 0,0
poweradd = 0
sprpriority=5

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
pos = 10,-120

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 9999
length = 15
framegap = 4
trans = add1 ;"none","add1","sub"
PalContrast = 70,50,150

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 1
value = 3293
elem = 1
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 2
value = 3293
elem = 2
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 3
value = 3293
elem = 3
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 4
value = 3293
elem = 4
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 5
value = 3293
elem = 5
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 6
value = 3293
elem = 6
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 7
value = 3293
elem = 7
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 8
value = 3293
elem = 8
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 9
value = 3293
elem = 9
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 10
value = 3293
elem = 10
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 11
value = 3293
elem = 11
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 12
value = 3293
elem = 12
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 13
value = 3293
elem = 13
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 14
value = 3293
elem = 14
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 15
value = 3293
elem = 15
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 16
value = 3293
elem = 16
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 17
value = 3293
elem = 17
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 18
value = 3293
elem = 13
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 19
value = 3293
elem = 14
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 20
value = 3293
elem = 15
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 21
value = 3293
elem = 16
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 22
value = 3293
elem = 17
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 23
value = 3293
elem = 13
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 24
value = 3293
elem = 14
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, anim = 3201
trigger1 = root, animelem = 25
value = 3293
elem = 15

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1002]
type = Destroyself
trigger1 = parent, stateno != 3201
trigger2 = parent, anim = 1105
trigger3 = parent,movetype = H

;---------------------------------------------------------------------------;
[Statedef 3295]
type = S
movetype = A
physics = S
juggle = 0
ctrl = 0
anim = 9741
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 1
time = 10
freq = 80
;phase = 90
;ignorehitpause =
;persistent =

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

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 2
length = 15
framegap = 4
trans = add1 ;"none","add1","sub"
PalContrast = 150,50,70

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 3295
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 3
supermovetime = 0
pausemovetime = 0
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent, stateno != [3200,3202]
trigger2 = parent, anim = 1105
trigger3 = parent,movetype = H

[State 1002]
type = Destroyself
trigger1 = parent, stateno != [3200,3202]
trigger2 = parent, anim = 1105
trigger3 = parent,movetype = H

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

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S5,6
volume = 0
channel = -1

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1002]
type = Destroyself
trigger1 = parent,stateno!=3300
trigger2 = parent,movetype = H
trigger3 = animtime=0
;---------------------------------------------------------------------------;
[Statedef 3391]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 9741
velset = 0,0
poweradd = 0
sprpriority=4

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = S5,18
volume = 0
channel = -1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 3391
ID = 3391
postype = p1
scale = 1,1
removetime = -2
bindtime = 1
pos = 30,-80
sprpriority = 3
ownpal = 1

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
trigger2 = parent,stateno!=3301
trigger3 = parent,movetype = H

[State 1002]
type = Destroyself
trigger1 = parent,stateno!=3301
trigger2 = parent,movetype = H

;------------------------------------------------------------------------
[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 = [3400,3405]
trigger1 = time = 0
time =  99999
add = 20,20,20
;mul = 256,256,256
;sinadd = 40,80,40,10
invertall = 0
color = 0
;ignorehitpause = 0
;persistent = 1

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

[State 0, PalFXWiz]
type = PalFX
trigger1 = root, stateno = [3200,3205]
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 0, PalFXWiz]
type = PalFX
trigger1 = root, stateno = [3100,3125]
trigger1 = time = 0
time =  99999
add =  -150,30,-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
;========================<POWER CHARGE>=============================
;-----<MAIN FX>-----
[Statedef 7240]
physics=N
anim=7240
sprpriority=-2

[State 7240, bind]
type=bindtoroot
trigger1=(root,stateno=950)&&(root,anim=950)
pos=0,0
time=-1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1100,7
volume = 128
channel = 0

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

[State 7240, image]
type=afterimage
trigger1=!time
time=999
timegap=1
framegap=1
length=4
palmul=.5,.33,.25
palcontrast=120,120,120
trans=add

[State 7240, fx]
type=helper
trigger1=anim=7240&&!(time%7)&&numhelper(7243)<8
helpertype=normal
stateno=7243
ID=7243
name="Power Particle"
postype=p1;left
pos=ceil((240-random/2.1)-40),-ceil((random/4))
size.xscale=.5
size.yscale=.5
ownpal=1

[State 7240, anim]
type=changeanim
trigger1=anim=7240&&((root,stateno!=950)||(root,anim!=950))
value=7241
elem=animelemno(0)

[State 7240, stopsnd]
type=stopsnd
trigger1=anim=7241
channel=0
persistent=0

[State 7240, fade]
type=palfx
trigger1=anim=7241
sinadd=-255,-255,-255,64
time=17
persistent=0

[State 7240, remove]
type=removeexplod
trigger1=anim=7241&&!animtime
trigger2=root,statetype=A
trigger3=root,movetype=H
trigger4=root,stateno !=950

[State 7240, end]
type=destroyself
trigger1=anim=7241&&!animtime
trigger2=root,statetype=A
trigger3=root,movetype=H
trigger4=root,stateno !=950

;-----<PARTICLES>-----
[Statedef 7243]
physics=N
anim=7243
sprpriority=4

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

[State 7243, assert]
type=assertspecial
trigger1=!time
flag=invisible

[State 7243, fade]
type=palfx
trigger1=!time
add=-255,-255,-255
sinadd=300,300,300,240
time=56

[State 7243, vel]
type=velset
trigger1=!time
x=(rootdist x+10)/60;(rootdist x-4)/60
y=(rootdist y-90)/60

[State 7243, end]
type=destroyself
trigger1=time>=56
trigger2=(root,stateno!=950)||(root,anim!=950)
;-------------------------------------------
; 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 =

;------------------------------------
[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)
;-------------------------------------------
; 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

