;---------------------------------------------------------------------------
[Statedef 3]
type = S
movetype = I
physics = N
ctrl = 0
anim = 9741
sprpriority = 4

[State 20000, Bind]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 0, ChangeState];mov basico
type = ChangeState
triggerall = movetype != H
trigger1 = root,anim = 0
value = 2
ctrl = 0
;---------------------------------------------------------------
;Fondo rojo stand
[Statedef 2]
type = S
movetype = I
physics = N
ctrl = 0
anim = 2
sprpriority = -1

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

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

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

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

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

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

[State 20000, 1]
type = VarSet
trigger1 = time = 0
var(0) = root,anim

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(1) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(2) < 0
value = 2
elem = 1

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(2) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(3) < 0
value = 2
elem = 2

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(3) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(4) < 0
value = 2
elem = 3

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(4) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(5) < 0
value = 2
elem = 4

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(5) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(6) < 0
value = 2
elem = 5

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(6) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(7) < 0
value = 2
elem = 6

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(7) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(8) < 0
value = 2
elem = 7

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(8) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(9) < 0
value = 2
elem = 8

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(9) >= 0
trigger1 = parent,stateno = 0 && parent,animelemtime(10) < 0
value = 2
elem = 9

[State 1, ChangeAnim]
type = ChangeAnim
trigger1 = parent,stateno = 0 && parent,animelemtime(10) >= 0
value = 2
elem = 10

[State 2, changestate]
type = changestate
;trigger1 = parent,stateno = [5000,5999]
;;trigger2 = parent,movetype = H
;trigger2 = animtime = 0
trigger1 = root,anim != var(0)
value=3
;-----------------------------------------------------------------
;gou hadouken
[Statedef 1061]
type = A
movetype = A
physics  = N
ctrl = 0
anim = 7101
sprpriority = 3
velset = ifelse(parent,var(10)=0,5,ifelse(parent,var(10)=1,6,7.2)),ifelse(parent,var(10)=0,3.5,ifelse(parent,var(10)=1,4.5,5.7))

[State -2, Dampener]
type=attackmulset
trigger1= 1
value=root,fvar(10)
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1100,0
volume = 200
channel = -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: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 901: HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA,AP
time  = 1
ignorehitpause = 1

[State 901: hitoverride]
type = HitOverride
trigger1 = 1
stateno  = 1062
attr = SCA,AP
slot = 0
time = -1

[State 0, Explod]
type = Explod
triggerall = !numexplod(7103)
trigger1 = !time
anim =  1057
ID = 7103
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 = 9999999
supermove
pausemove
scale = .5,.5
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
persistent = 1

[State 1001:hitdef 5]
type = HitDef
Trigger1 = !time
sparkno = -1 ;* (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = 5,5
attr = S, NA
damage = 80,5
animtype = hard
getpower = 80
guardflag = MA
hitflag = MAFD
pausetime = 0,4
hitsound = s1,9
guardsound = s2,1
ground.type = Low
ground.slidetime = 18
ground.hittime = 18
air.hittime = 18
guard.ctrltime = 18
ground.velocity = -11,0
guard.velocity = -10.5
air.velocity = -3.5, -3.5
fall = 0
air.juggle = 2
air.fall = 1
air.recover = 0
envshake.time = 8
envshake.ampl = 2

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact
trigger2 = pos y >= 0
;trigger2 = frontedgebodydist <= 0
id =  7103

[State 1001: destroyself]
type  = Changestate
;trigger1 = frontedgebodydist <= 1
trigger1  = Movecontact
trigger2 = pos y >= 0
value = 1063
;----------------------------------------
;---Hitpause---
[Statedef 1063]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=4
movehitpersist=1

[State 1261, freeze]
type=posfreeze
trigger1= 1
value=1

[State 1261, Spark]
type=helper
trigger1= movehit=1 && numtarget
trigger1= !(target,hitshakeover)
helpertype=normal
stateno=8020
ID=8000
name="Spark"
postype=p1
pos= 5,5;(target,const(size.ground.front) -1) * (target,facing) * (-facing), floor(pos y-target,pos y)
ownpal=1
size.xscale=.5
size.yscale=.5
pausemovetime=65535
supermovetime=65535
ignorehitpause=1

[State 1261, end]
type=changestate
trigger1= time>=0
value=1062
;---------------------------------------------------------------------------;
[Statedef 1062]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 9741
velset = 0,0
poweradd = 0

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 7102
ID = 7102
pos = 15,5
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 1,.5
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .65,.65
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 2054]
type= palfx
trigger1= !Time
add = 0, 0, 0
sinadd = -255,-255,-255,200
time= 50
invertall = 0

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

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

[State -2, Dampener]
type=attackmulset
trigger1= 1
value=root,fvar(10)
ignorehitpause=1

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

[State 0, Explod]
type = Explod
triggerall = !numexplod(10090)
trigger1 = !time
anim =  10090
ID = 10090
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 = 9999999
supermove
pausemove
scale = .52,.52
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
persistent = 1

[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 901: HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA,AP
time  = 1
ignorehitpause = 1

[State 901: hitoverride]
type = HitOverride
trigger1 = 1
stateno = 10091
attr = SCA,AP
slot = 0
time = -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
animtype = hard
attr = S,SP
priority = 3
damage = 75,15
guardflag = MA
hitflag = MAF
pausetime = 0,8
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=0
hitsound = s1,9
guardsound = s2,1
ground.type = high
ground.slidetime = 18
ground.hittime =18
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

[State 901:projectile]
type = hitdef
trigger1 = Time = 0 && P2BodyDist X <= 18
animtype = hard
attr = S,SP
priority = 3
damage = 75,15
guardflag = MA
hitflag = MAF
pausetime = 0,8
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=0
hitsound = s1,9
guardsound = s2,1
ground.type = high
ground.slidetime = 18
ground.hittime = 18
ground.velocity = -8,-3
air.hittime = 13
air.velocity = -3,-7
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
yaccel = .5

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

[State 901:destroyself]
type = changestate
trigger1 = movecontact
trigger2 = frontedgedist <= -70
value = 10093
;----------------------------------------
;---Hitpause---
[Statedef 10093]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=4
movehitpersist=1

[State 1261, freeze]
type=posfreeze
trigger1= 1
value=1

[State 1261, Spark]
type=helper
trigger1= movehit=1 && numtarget
trigger1= !(target,hitshakeover)
helpertype=normal
stateno=8020
ID=8000
name="Spark"
postype=p1
pos= 5,5;(target,const(size.ground.front) -1) * (target,facing) * (-facing), floor(pos y-target,pos y)
ownpal=1
size.xscale=.5
size.yscale=.5
pausemovetime=65535
supermovetime=65535
ignorehitpause=1

[State 1261, end]
type=changestate
trigger1= time>=0
value=10091
;---------------------------------------------------------------------------;
[Statedef 10091]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 9741
velset = 0,0
poweradd = 20

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 10091
ID = 10091
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 1,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .55,.55
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 2054]
type= palfx
trigger1= !Time
add = 0, 0, 0
sinadd = -255,-255,-255,200
time= 50
invertall = 0

[State 1002]
type = Destroyself
trigger1 = time = 1
;------------------------------------------SPARKS----------------
;---Normal---
[Statedef 8010]
type=A
anim=8010
velset=0,0
sprpriority=5

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

[State 8010, angle]
type=angleset
trigger1= !time
value=15*(random%24)

[State 8010, scale]
type=angledraw
trigger1= 1;1time<10
scale= 1,1;1+(time*.3), 1-(time*.1)

;[State 8010, scale]
;type=angledraw
;trigger1= time>=10
;scale=0,0

[State 8010, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 8030, Circle]
type=explod
trigger1= !time
anim=8012
ID=8012
postype=p1
removetime=10
sprpriority=4
pausemovetime=-1
supermovetime=-1

[State 8030, Circle Scale]
type=modifyexplod
trigger1= numexplod(8012)
ID=8012
scale=.12+(.035*time),.12+(.035*time)
trans=addalpha
alpha=ceil(256-30.6*time),256

[State 8010, Particles]
type=explod
trigger1= time<=4
trigger1= random<(1000.0/numhelper(8000))
anim=8011
ID=8011
postype=p1
vel= -10+(random/50.0), -10+(random/50.0)
scale= .4 + (random/5000.0), .4 + (random/5000.0)
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles Scale]
type=modifyexplod
trigger1= numexplod(8011)
ID=8011
trans=addalpha
alpha=256-16*time,256

[State 8010, end]
type=removeexplod
trigger1= time>=15

[State 8010, end]
type=destroyself
trigger1= time>=15
;------------------------------------------SPARKS----------------
;---Special---
[Statedef 8020]
type=A
anim=8020
velset=0,0
sprpriority=5

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

[State 8010, angle]
type=angleset
trigger1= !time
value=15*(random%24)

[State 8010, scale]
type=angledraw
trigger1= 1;1time<10
scale= 1,1;1+(time*.3), 1-(time*.1)

;[State 8010, scale]
;type=angledraw
;trigger1= time>=10
;scale=0,0

[State 8010, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 8030, Circle]
type=explod
trigger1= !time
anim=8012
ID=8012
postype=p1
removetime=10
sprpriority=4
pausemovetime=-1
supermovetime=-1

[State 8030, Circle Scale]
type=modifyexplod
trigger1= numexplod(8012)
ID=8012
scale=.15+(.035*time),.15+(.035*time)
trans=addalpha
alpha=ceil(256-30.6*time),256

[State 8010, Particles]
type=explod
trigger1= time<=6
trigger1= random<(1000.0/numhelper(8000))
anim=8021
ID=8021
postype=p1
vel= -10+(random/50.0), -10+(random/50.0)
scale= .4 + (random/5000.0), .4 + (random/5000.0)
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles Scale]
type=modifyexplod
trigger1= numexplod(8021)
ID=8021
trans=addalpha
alpha=256-16*time,256

[State 8010, end]
type=removeexplod
trigger1= time>=15

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

;---Super---
[Statedef 8030]
type=A
anim=8030
velset=0,0
sprpriority=5

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

[State 8010, angle]
type=angleset
trigger1= !time
value=15*(random%24)

[State 8010, scale]
type=angledraw
trigger1= 1;1time<10
scale= 1,1;1+(time*.3), 1-(time*.1)

;[State 8010, scale]
;type=angledraw
;trigger1= time>=10
;scale=0,0

[State 8010, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 8030, Circle]
type=explod
trigger1= !time
anim=8012
ID=8012
postype=p1
removetime=10
sprpriority=4
pausemovetime=-1
supermovetime=-1

[State 8030, Circle Scale]
type=modifyexplod
trigger1= numexplod(8012)
ID=8012
scale=.1+(.045*time),.1+(.045*time)
trans=addalpha
alpha=ceil(256-30.6*time),256

[State 8010, Particles]
type=explod
trigger1= time<=6
trigger1= random<(1000.0/numhelper(8000))
anim=8031
ID=8031
postype=p1
vel= -10+(random/50.0), -10+(random/50.0)
scale= .4 + (random/5000.0), .4 + (random/5000.0)
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles Scale]
type=modifyexplod
trigger1= numexplod(8031)
ID=8031
trans=addalpha
alpha=256-16*time,256

[State 8010, end]
type=removeexplod
trigger1= time>=15

[State 8010, end]
type=destroyself
trigger1= time>=15
;==========<ZERO COUNTER FX>==========
[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 =

;--------------------------------------------------------------------------------
;dramatic ko
[Statedef 6100]
type = s
movetype = i
physics = n

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

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

[State 0, Dramatic KO Helper]
type = helper
triggerall = (root,alive || enemy,alive)
trigger1 = roundstate = 3 && (root,life <= 0 || enemy,life <= 0)
helpertype = Normal
id = 6110
pos = 0,0
postype = p1
name = "K.O."
stateno = 6110
supermovetime = 9999999999
pausemovetime = 9999999999
persistent = 0
ignorehitpause = 1

;-----------------------------------------------------------------
;Dramatic K.O. Effects
;-----------------------------------------------------------------
[Statedef 6110]
type = s
movetype = i
physics = n

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible
flag3 = nokoslow;<------------optional
ignorehitpause = 1

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

[State 0, pause]
type = Pause
trigger1 = 1
time = 40;<---adjust to your likings
ignorehitpause = 1
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time >= 40
trigger2 = root,life<=0;<---make the time match the time in the pause code above
