;---------------------------------------------------------------------------
;Cell Bullet
[Statedef 1010]
type = S
physics = S
movetype = A
ctrl = 0
anim = 1010
velset = 0, 0
poweradd = 72 
juggle = 8
facep2 = 1
sprpriority = 2

[State 1000, width]
type = width
trigger1 = anim = 1010 && animelemtime(3) >= 0
value = 20
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = animelem =3 
value = 1010, ifelse(random >40, 0, 1)
volume = 255

[State 1000, Push]
type = playerpush
trigger1 = anim = 1010 && animelemtime(5) >= 0
value = 0
ignorehitpause = 1

[State 1000, nothitby]
type = nothitby
trigger1 = anim = 1010 && animelemtime(5) >= 0
value = , NP
time = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 8100
ID = 6062
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1

[State 1000, FX]
type = helper
trigger1 = anim = 1010 && animelem = 5
helpertype = normal
stateno = 1005
ID = 1005
name = "Seru Bullet Aura"
postype = p1
size.xscale = 0.5
size.yscale = 0.4
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 1000, Hit]
type = hitdef
trigger1 = !time
attr = A, SA
damage = 80
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 6,20
sparkno = s8030 
guard.sparkno = S8022+(random%2)
sparkxy = -10, -59
hitsound = s300, 4
guardsound = s2, 0
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = 3,-6
ground.cornerpush.veloff = 0
guard.velocity = -10.52
air.type = Low
air.velocity =  -6,-5
forcestand = 1
envshake.time = 16
envshake.freq = 120
envshake.ampl = 4
fall = 1
fall.recover = 1
fall.recovertime = 120
yaccel = 0.5
airguard.ctrltime = 16
airguard.velocity =  -4, -8
airguard.cornerpush.veloff = 0

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1010 && animelemtime(3) >= 0
x = 7.5
y = 0

[State 1000, statetype]
type = statetypeset
trigger1 = anim = 1010 && animelemtime(3) >= 0
statetype = A
physics = N

[State 1000, statetype]
type = statetypeset
trigger1 = anim = 1011 && animelem = 2
statetype = S
physics = S

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 34
value = 1011
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 1011 && !animtime
value = 0
ctrl = 1

;------------------------------------------------------------------------
;Cell Bullet 2
[Statedef 1011]
type = S
physics = S
movetype = A
ctrl = 0
anim = 1010
velset = 0, 0
poweradd = 72 
juggle = 8
facep2 = 1
sprpriority = 2

[State 1000, width]
type = width
trigger1 = anim = 1010 && animelemtime(3) >= 0
value = 20
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = animelem =3 
value = 1010, ifelse(random >40, 0, 1)
volume = 255

[State 1000, Push]
type = playerpush
trigger1 = anim = 1010 && animelemtime(5) >= 0
value = 0
ignorehitpause = 1

[State 1000, nothitby]
type = nothitby
trigger1 = anim = 1010 && animelemtime(5) >= 0
value = , NP
time = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 8100
ID = 6062
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1

[State 1000, FX]
type = helper
trigger1 = anim = 1010 && animelem = 5
helpertype = normal
stateno = 1005
ID = 1005
name = "Seru Bullet Aura"
postype = p1
size.xscale = 0.5
size.yscale = 0.4
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 1000, Hit]
type = hitdef
trigger1 = !time
attr = A, SA
damage = 100
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 6,20
sparkno = s8030 
guard.sparkno = S8022+(random%2)
sparkxy = -10, -59
hitsound = s300, 4
guardsound = s2, 0
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = 3,-6
ground.cornerpush.veloff = 0
guard.velocity = -10.52
air.type = Low
air.velocity =  -6,-5
forcestand = 1
envshake.time = 16
envshake.freq = 120
envshake.ampl = 4
fall = 1
fall.recover = 1
fall.recovertime = 120
yaccel = 0.5
airguard.ctrltime = 16
airguard.velocity =  -4, -8
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1010 && animelemtime(3) >= 0
x = 10
y = 0

[State 1000, statetype]
type = statetypeset
trigger1 = anim = 1010 && animelemtime(3) >= 0
statetype = A
physics = N

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 34
value = 1011
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 1011 && !animtime
value = 0
ctrl = 1

;------------------------------------------------------------------------
;Cell Bullet 3
[Statedef 1012]
type = S
physics = S
movetype = A
ctrl = 0
anim = 1010
velset = 0, 0
poweradd = 72 
juggle = 8
facep2 = 1
sprpriority = 2

[State 1000, width]
type = width
trigger1 = anim = 1010 && animelemtime(3) >= 0
value = 20
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = animelem =3 
value = 1010, ifelse(random >40, 0, 1)
volume = 255

[State 1000, Push]
type = playerpush
trigger1 = anim = 1010 && animelemtime(5) >= 0
value = 0
ignorehitpause = 1

[State 1000, nothitby]
type = nothitby
trigger1 = anim = 1010 && animelemtime(5) >= 0
value = , NP
time = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 8100
ID = 6062
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1

[State 1000, FX]
type = helper
trigger1 = anim = 1010 && animelem = 5
helpertype = normal
stateno = 1005
ID = 1005
name = "Seru Bullet Aura"
postype = p1
size.xscale = 0.5
size.yscale = 0.4
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 1000, Hit]
type = hitdef
trigger1 = !time
attr = A, SA
damage = 120
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 6,20
sparkno = s8030 
guard.sparkno = S8022+(random%2)
sparkxy = -10, -59
hitsound = s300, 4
guardsound = s2, 0
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = 3,-6
ground.cornerpush.veloff = 0
guard.velocity = -10.52
air.type = Low
air.velocity =  -6,-5
forcestand = 1
envshake.time = 16
envshake.freq = 120
envshake.ampl = 4
fall = 1
fall.recover = 1
fall.recovertime = 120
yaccel = 0.5
airguard.ctrltime = 16
airguard.velocity =  -4, -8
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1010 && animelemtime(3) >= 0
x = 16
y = 0

[State 1000, statetype]
type = statetypeset
trigger1 = anim = 1010 && animelemtime(3) >= 0
statetype = A
physics = N

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 34
value = 1011
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 1011 && !animtime
value = 0
ctrl = 1

;------------------------------------------------------------------------
; Counter Ki Shield
[Statedef 1020]
type                    = S
movetype                = I
physics                 = S
velset                  = 0,0
ctrl                    = 0
anim                    = 1020
poweradd                = 50

[State 0: Reversal]
type                    = reversaldef
trigger1                = !Time
attr                    = C, SA
reversal.attr           = C, NA, SA, HA
;getpower = 80,0
pausetime               = 20, 20
sparkno                 = S8030
sparkxy                 = -42, -28
hitsound                = S800, 0
p2facing                = 1
sprpriority             = -1
p1stateno               = 1023
fall                    = 0
fall.recover            = 0

[State 0: ]
type                    = ChangeState
trigger1                = animtime = 0
value                   = 0
ctrl                    = 1

;-------------------------------------------------------------------------
; Counter Ki Shield
[Statedef 1021]
type                    = S
movetype                = I
physics                 = S
velset                  = 0,0
ctrl                    = 0
anim                    = 1020
poweradd                = 50

[State 0: Reversal]
type                    = reversaldef
trigger1                = !Time
attr                    = S, SA
reversal.attr           = AS, NA, SA,NP,SP
;getpower = 80,0
pausetime               = 10, 20
sparkno                 = S8030
hitsound                = S800, 0
sparkxy                 = 0, -18
p2facing                = 1
sprpriority             = -1
p1stateno               = 1023
fall                    = 0
fall.recover            = 0
ignorehitpause          = 1



[State 0: ]
type                    = ChangeState
trigger1                = animtime = 0
value                   = 0
ctrl                    = 1

;------------------------------------------------------------------------
; Counter Ki Shield
[Statedef 1022]
type                    = S
movetype                = I
physics                 = S
velset                  = 0,0
ctrl                    = 0
anim                    = 1020
poweradd                = 50

[State 0: Reversal]
type                    = reversaldef
trigger1                = !Time
attr                    = S, SA
reversal.attr           = A, NA, SA,NP,SP
;getpower = 80,0
pausetime               = 20, 20
sparkno                 = S8030
hitsound                = S800, 0
sparkxy                 = 0, -18
p2facing                = 1
sprpriority             = -1
p1stateno               = 1023
fall                    = 0
fall.recover            = 0



[State 0: ]
type                    = ChangeState
trigger1                = animtime = 0
value                   = 0
ctrl                    = 1

;------------------------------------------------------------------------
;Energy Shield
[Statedef 1023]
type 	                  = S
movetype		        = I
physics		        = S
juggle	    	        = 1
anim    		        = 1021
velset		        = 0,0
ctrl		        = 0
poweradd		        = 0
facep2		        = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority	        = 2

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


[State 0:       EnvShake]
type 		        = EnvShake
Triggerall                  = AnimElem = 3, > 0 && AnimElem = 4, < 0
trigger1 		        = gametime%4
time 		        = 5
freq 		        = 70
ampl 		        = 7

[State 0: 	BGPalFX]
type		    = BGPalFX
trigger1                = !Time
time		    = 55
add	              = 0,0,0
mul		    = 154,154,154
sinadd		    = 85,85,85,25
invertall		    = 0
color	              = 256

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 8141
ID = 8141
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 7040
ID = 7040
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1

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

[State 0:       PlaySND]
type                    = PlaySnd
trigger1                = !Time
value                   = 3001, 0
channel	                = -1

[State 0:       PlaySND]
type                    = PlaySnd
trigger1                = !Time
value                   = 210, 7
channel	                = -1

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

[State 0: Helper]
type                    = Helper
trigger1                = animelem = 3
helpertype              = normal
name                    = "Energy Shield"
ID                      = 8330
pos                     = 0,-50
stateno                 = 8330
ownpal                  = 1
;size.xscale             = 
;size.yscale             = 

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

[State 0:     PlaySND]
type                    = PlaySnd
trigger1                = AnimElem = 3
value                   = 700, 0
channel	                = -1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !animtime
id = 7040
;ignorehitpause = 
;persistent = 



[State 0:       Screen Flash]
type                    = EnvColor
trigger1                = animelem = 4
value                   = 255,255,255
time                    = 2
under                   = 0

[State 0, ]
type                    = ChangeState
trigger1                = !AnimTime
value                   = 0
ctrl                    = 1

;-------------------------------------------------------------------------
;Ka (Kapow)
[Statedef 1025, Kapow! (ka)]
type    = S
movetype= A
physics = S
juggle  = 12
velset = 0,0
ctrl = 0
anim = 1025
poweradd = 45
sprpriority = 1


[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S235, 0

[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S210, 5


[State 0, VelSet]
type = VelSet
triggerall = var(15) = 1
trigger1 = animelem = 3,2
x = 12

[State 0, VelSet]
type = VelSet
triggerall = var(15) = 2
trigger1 = animelem = 3,2
x = 17

[State 0, VarSet]
type = VarSet
trigger1 = command = "DP_a"
v = 15    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = command = "DP_b"
v = 15    ;fv = 10
value = 2
;ignorehitpause = 
;persistent = 


[State 200, 1]
type = HitDef
trigger1 = !time 
attr = S, NA
damage = ifelse(var(15)= 1,55,40),1 
animtype = up
guardflag  = HA
hitflag    = HA
priority = 3, Hit
numhits = 1
pausetime = 5, 12
sparkno = S8000+(random%2)
sparkxy = -31,-62
hitsound = S300, 3
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
guard.sparkno = S8020+(random%2)
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -2.63655 ,-9.344
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.63655, -9.344
air.hittime = 12
fall= 1
fall.recover = 0
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3


[State 0, ChangeState]
type = ChangeState
trigger1 = movehit && animelemtime(3) >=5
value = 1026
ctrl = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------
[Statedef 1026,Idle]
type    = S
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1026
poweradd = 0
sprpriority = 1


[State 0, ChangeState]
type = ChangeState
trigger1 = (Command = "QCF_a") || (command = "QCF_b") 
value = 1027
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = (!animtime)
value = 0
ctrl = 1

;-------------------------------------------------------------------------
[Statedef 1027,pow]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1027
poweradd = 45
sprpriority = 1


[State InitVel]
Type 		= VelAdd
Trigger1 	= AnimElemTime(1) = 1
X 			= 8.1
Y 			= -7.3

[State Accel]
Type 		= VelAdd
Trigger1 	= AnimElemTime(4) > 0
Y 			= .45

[State 0, Pause]
type = Pause
trigger1 = (!time)
time = 5
movetime = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 4
value = S200,4


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem =7
value = S210,2


[State 200, 1]
type = HitDef
trigger1 = !time
attr = A, NA
damage = 56,1
animtype = hard
guardflag  = HA
hitflag    = HAF
priority = 3, Hit
pausetime = 15, 12
sparkno = S8000+(random%2)
sparkxy = -20,-18
hitsound = S203, 2
guardsound = S400, 0
guard.sparkno = S8020+(random%2)
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = 12.5, -2.6
airguard.velocity = 1.9,2.8
air.type = High
air.velocity = -6.5, 2.6
air.hittime = 12
fall = 1
envshake.time = 10
envshake.freq = 110
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6

[State 310, End]
type = ChangeState
trigger1 = movehit && !animtime
value = 50
ctrl = 1

;------------------------------------------------------------------------
;Destroy
[Statedef 1030]
type		= S
movetype		= A
physics		= N
anim	          = 1030
ctrl	          = 0
poweradd		= 50
facep2		= 1
hitdefpersist 	= 0
movehitpersist	= 0
hitcountpersist	= 1
sprpriority 	= 2

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



[State 700		Veladd]
type			= Velset
trigger1		          = animelemtime(6) >= 0 && animelemtime(8) < 0
x			= 6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S100,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S210,2



[State 0, Explod]
type = Explod
trigger1 = Animelem = 6
anim = 8100
ID = 6062
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1



[State 210, 1]
type = HitDef
trigger1 = animelem = 6
attr = S, SA
damage = 25,7
animtype = Heavy
air.animtype = back
guardflag = MA
hitflag = MA
priority = 5, Hit
sparkno = s8000+(random%2)
sparkxy = -17, -64
hitsound = s300,3
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
guard.sparkno =s8020+(random%2)
ground.type = Low
pausetime = 9,13
guard.pausetime = 12,11
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -2.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-6.5
air.hittime = 13
air.juggle = 0
getpower = 47,47
givepower = 16,16
id = 1200
nochainid = 1200
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.recovertime = 35
envshake.time = 15
envshake.freq = 110
envshake.ampl = 3


[State 1200, VelSet]
type = VelSet
trigger1 = animelem = 8
x = 0

[State 700		Swing]
type			= PlaySND
trigger1		= (!time)
value			= S3,2


[State 1000, 6]
type = ChangeState
trigger1 = movecontact
value = stateno+3
ctrl = 0



[State 700		End]
type			= Changestate
trigger1		          = !animtime
value			= 0
ctrl			= 1

;------------------------------------------------------------------------
;Destroy 2
[Statedef 1031]
type		= S
movetype		= A
physics		= N
anim	          = 1030
ctrl	          = 0
poweradd		= 50
facep2		= 1
hitdefpersist 	= 0
movehitpersist	= 0
hitcountpersist	= 1
sprpriority 	= 2

[State 700		Veladd]
type			= Velset
trigger1		          = animelemtime(6) >= 0 && animelemtime(8) < 0
x			= 12


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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S100,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S210,2


[State 0, Explod]
type = Explod
trigger1 = Animelem = 6
anim = 8100
ID = 6062
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1

[State 210, 1]
type = HitDef
trigger1 = animelem = 6
attr = S, SA
damage = 19,7
animtype = Heavy
air.animtype = back
guardflag = MA
hitflag = MA
priority = 7, Hit
sparkno = s8000+(random%2)
sparkxy = -17, -64
hitsound = s300,3
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
guard.sparkno =s8020
ground.type = Low
pausetime = 12,13
guard.pausetime = 12,11
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -5.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-6.5
air.hittime = 13
air.juggle = 0
getpower = 47,47
givepower = 16,16
id = 1200
nochainid = 1200
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.recovertime = 35
envshake.time = 15
envshake.freq = 110
envshake.ampl = 3


[State 1200, VelSet]
type = VelSet
trigger1 = animelem = 8
x = 0

[State 700		Swing]
type			= PlaySND
trigger1		= (!time)
value			= S3,2


[State 1000, 6]
type = ChangeState
trigger1 = movecontact
value = stateno+2
ctrl = 0



[State 700		End]
type			= Changestate
trigger1		          = !animtime
value			= 0
ctrl			= 1

;------------------------------------------------------------------------
;Destroy 2
[Statedef 1032]
type		= S
movetype		= A
physics		= N
anim	          = 1030
ctrl	          = 0
poweradd		= 50
facep2		= 1
hitdefpersist 	= 0
movehitpersist	= 0
hitcountpersist	= 1
sprpriority 	= 2

[State 700		Veladd]
type			= Velset
trigger1		          = animelemtime(6) >= 0 && animelemtime(8) < 0
x			= 12

[State 3035, 1]
type = AfterImage
trigger1 = animelem = 6
time = 50
length = 9
framegap = 3
palcolor = 0
trans = add1
palbright = 96,96,28
palcontrast = 96,64,60
paladd = 0,0,0
palmul = 1,1,1
persistent = 0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S100,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S210,2


[State 0, Explod]
type = Explod
trigger1 = Animelem = 6
anim = 8100
ID = 6062
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove=999
pausemove=999
scale = 1,1
sprpriority = 3
removeongethit = -1

[State 210, 1]
type = HitDef
trigger1 = animelem = 6
attr = S, SA
damage = 25,1
animtype = Heavy
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
sparkno = s8000+(random%2)
sparkxy = -17, -64
hitsound = s301,0
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
guard.sparkno =s8020
ground.type = Low
pausetime = 12,13
guard.pausetime = 12,11
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-6.5
air.hittime = 13
air.juggle = 0
getpower = 47,47
givepower = 16,16
id = 1200
nochainid = 1200
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.recovertime = 35
envshake.time = 15
envshake.freq = 110
envshake.ampl = 3


[State 1200, VelSet]
type = VelSet
trigger1 = animelem = 8
x = 0

[State 700		Swing]
type			= PlaySND
trigger1		= (!time)
value			= S3,2


[State 1000, 6]
type = ChangeState
trigger1 = movecontact
value = stateno+1
ctrl = 0



[State 700		End]
type			= Changestate
trigger1		          = !animtime
value			= 0
ctrl			= 1

;-------------------------------------------------------------------------
;Demolish
[Statedef 1033]
type		= S
movetype		= A
physics		= N
anim	          = 1032
ctrl	          = 0
poweradd		= 50
facep2		= 1
hitdefpersist 	= 0
movehitpersist	= 0
hitcountpersist	= 1
sprpriority 	= 2

[State 700		Veladd]
type			= Velset
trigger1		          = animelemtime(1) >= 0 && animelemtime(4) < 2
x			= 3.2



[State 700		Veladd]
type			= Velset
trigger1		          = animelem = 3,5
x			= 0

[State 700		Swing]
type			= PlaySND
trigger1		= (!time)
value			= S3,2


[State 200, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 1200, VelSet]
type = VelSet
trigger1 = animelemtime(6) = 5
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S210,5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S210,6



[State 210, 1]
type = HitDef
trigger1 = animelem = 3
attr = S, SA
damage = 17,7
animtype = Heavy
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
sparkno = s8000+(random%2)
sparkxy = -10, -67
hitsound = s300,3
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
guard.sparkno =s8020
ground.type = Low
pausetime = 9,13
guard.pausetime = 12,11
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -4.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-6.5
air.hittime = 13
air.juggle = 0
getpower = 47,47
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.recovertime = 35

[State 0, Helper]
type = Helper
trigger1 =  AnimElem = 6
helpertype = normal
name = "Ki Flare"
ID = 8336
stateno = 8336
pos = 68,-69
postype = p1
facing = 1
ownpal = 1
size.xscale = .80
size.yscale = .80


[State 700		End]
type			= Changestate
trigger1		          = !animtime
value			= 0
ctrl			= 1

;------------------------------------------------------------------------
[Statedef 1040, Seru Stomp]
type = S
movetype = I
physics = S
anim = 1040
ctrl = 0
velset = 0,0

[state 1023]
type = velset
trigger1 = animelem = 2
x = 7
y = -10

[state 1023]
type = veladd
trigger1 = p2dist X> 50
x = 0.1


[State 1041, statetype]
type = statetypeset
trigger1 = animelem = 2
statetype = A
physics = N
movetype = A


[state 1023]
type = veladd
trigger1 = p2dist X< 100
x = -0.3

[state 1023]
type = gravity
trigger1 = pos Y!= 0

[State 0, ]
type                    = HitDef
trigger1                = time = 10
attr                    = A, SA
damage                  = 0
animtype                = light
guardflag               = M
hitflag                 = HAFD
priority                = 5, Hit
pausetime               = 0, 0
sparkno                 = S8000+(random%4)
guard.sparkno           = S7113
sparkxy                 = 0, 0
hitsound                = S800, 0
guardsound              = S400, 0
ground.type             = high
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = 0, 0
airguard.velocity       = 0, 0
air.type                = high
air.velocity            = 0, 0
air.hittime             = 12
getpower                = 27
givepower		      = 0
ID = 9000
Fall.recover            = 0
p2stateno = 850
p2getp1facing = 1

[state 1020]
type = targetlifeadd
trigger1 = pos Y>= -10 && movecontact
value = -ceil((95-(var(13)*2))*fvar(13))
persistent = 0

[state 1020]
type = changeanim
trigger1 = movecontact && anim != 1041 && anim != 1043
value = 1041

[state 1020]
type = targetbind
trigger1 = movecontact
ID = 9000
pos = 0,0

[state 1020]
type = changeanim
trigger1 = pos Y>= 0 && anim != 1043 && movecontact
value = 1043

[state 1020]
type = targetstate
trigger1 = pos Y>= 0 && anim = 1043 && animtime = 0
value = 851
persistent = 0



[state 1020]
type = changestate
trigger1 = pos Y>= 0 && movecontact && anim = 1043 && animtime = 0
trigger2 = moveguarded
value = 0
ctrl = 1

[state 1020]
type = posset
trigger1 = anim = 1043
y = 0

[state 1020]
type = velset
trigger1 = anim = 1043
x = 0
y = 0

[State 0:     Explode]
type                    = Explod
trigger1                = pos Y>= -10 && movecontact
anim                    = 8111
ID                      = 8100
pos                     = 0,0
scale                   = 1,1
sprpriority             = 5
persistent              = 0

[State 0: Helper]
type                    =  Helper
triggerall              = !NumHelper(8101)
trigger1                = pos Y>= -10 && movecontact
id                      = 8102
pos                     = 0,0
postype                 = p1
stateno                 = 8101
ownpal                  = 1
size.xscale             = 1.9
size.yscale             = 1.9
ignorehitpause          = 1
persistent              = 0



[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = pos Y>= -10 && movecontact
value                   = s815, 0
persistent              = 0

[state 1020]
type = envshake
trigger1 = pos Y>= -10 && movecontact
time = 15
freq = 100
ampl = -10
phase = 90
persistent = 0

[state 1020]
type = changestate
trigger1 = pos Y>= 0 && !movecontact && anim = 1040 && time >= 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Seru Stomp Air
[statedef 1042]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1042


[state 1020]
type = velset
trigger1 = time = 0
trigger2 = pos Y>= 0
x = 0
y = 0

[state 1020]
type = velset
trigger1 = time = 10
x = 4
y = 8

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 1042
trigger1 = !time
value = S25,0
persistent = 0



[state 1020]
type = veladd
trigger1 = time > 10 && pos Y!= 0
y = 0.1

[state 1020]
type = veladd
trigger1 = command = "holdfwd" && pos Y!= 0
x = 0.2

[state 1020]
type = posset
trigger1 = pos Y>= 0
y = 0

[State 0, ]
type                    = HitDef
trigger1                = Time = 10
attr                    = A, SA
damage                  = 0
animtype                = light
guardflag               = M
hitflag                 = MAFD
priority                = 5, Hit
pausetime               = 0, 0
sparkno                 = S IfElse(random<500,IfElse(random<500,7104,7105),IfElse(random<500,7106,7107))
guard.sparkno           = S7113
sparkxy                 = 0, 0
hitsound                = S800, 1
guardsound              = S400, 0
ground.type             = high
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = 0, 0
airguard.velocity       = 0, 0
air.type                = high
air.velocity            = 0, 0
air.hittime             = 12
getpower                = 27
givepower		      = 0
ID = 9000
Fall.recover            = 0
p2stateno = 850
p2getp1facing = 1

[state 1020]
type = targetlifeadd
trigger1 = pos Y>= -10 && movecontact
value = -ceil((95-(var(13)*2))*fvar(13))
persistent = 0


[state 1020]
type = changeanim
trigger1 = movecontact && anim != 1041 && anim != 1043
value = 1041

[state 1020]
type = targetbind
trigger1 = movecontact
ID = 9000
pos = 0,0

[state 1020]
type = changeanim
trigger1 = pos Y>= 0 && anim != 1043 && movecontact
value = 1043

[state 1020]
type = targetstate
trigger1 = pos Y>= 0 && anim = 1043 && animtime = 0
value = 851
persistent = 0



[state 1020]
type = changestate
trigger1 = pos Y>= 0 && movecontact && anim = 1043 && animtime = 0
trigger2 = moveguarded
value = 1042
ctrl = 0

[state 1020]
type = posset
trigger1 = anim = 1043
y = 0

[state 1020]
type = velset
trigger1 = anim = 1043
x = 0
y = 0

[State 0:     Explode]
type                    = Explod
trigger1                = pos Y>= -10 && movecontact
anim                    = 8111
ID                      = 8100
pos                     = 0,0
scale                   = 1,1
sprpriority             = 5
persistent              = 0

[State 0: Helper]
type                    =  Helper
triggerall              = !NumHelper(8101)
trigger1                = pos Y>= -10 && movecontact
id                      = 8102
pos                     = 0,0
postype                 = p1
stateno                 = 8101
ownpal                  = 1
size.xscale             = 1.9
size.yscale             = 1.9
ignorehitpause          = 1
persistent              = 0



[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = pos Y>= -10 && movecontact
value                   = s815, 0
persistent              = 0


[state 1020]
type = envshake
trigger1 = pos Y>= -10 && movecontact
time = 15
freq = 100
ampl = -10
phase = 90
persistent = 0

[state 1020]
type = changestate
trigger1 = pos Y>= 0 && !movecontact 
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;head hurts custom state
[statedef 850]
type = A
movetype = H
physics = N
ctrl = 0

[state 850]
type = playerpush
trigger1 = 1
value = 0

[state 815]
type = changeanim2
trigger1 = time = 0
value = 815

;---------------------------
[statedef 851]
type = S
movetype = H
physics = N
ctrl = 0

[state 851]
type = posadd
trigger1 = time = 0
x = 20

[state 851]
type = selfstate
trigger1 = time = 0
value = 5110

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

[Statedef 1041, zanzoken hammer smash]
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1041
poweradd = 0
sprpriority = 1


[State 0, Posset]
type = Posset
trigger1 = (!time)
y = floor(enemynear, const(size.head.pos.y)-5)

[State 0, PosAdd]
type = Posadd
trigger1 = (!time)
x = (p2dist x)-15

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S235,0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem =2
value = S2,7

[State 0, VelSet]
type =  VelSet
trigger1 = movecontact
x = -5
y = -2


[State 0, VelSet]
type =  VelSet
trigger1 = animelem = 2
y = 2

[State 200, 1]
type = HitDef
trigger1 = !time
attr = A, SA
damage = 90
animtype = Light
guardflag  = HA
hitflag    = HAF
priority = 3, Hit
pausetime = 10, 12
sparkno = S IfElse(random<500,IfElse(random<500,7200,7201),IfElse(random<500,7201,7202))
sparkxy = -10,8
hitsound = S235, 2
guardsound = S400, 0
guard.sparkno = S6005
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = 0,4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = 8.5,9
air.hittime = 12
fall = 1


[State 310, End]
type = ChangeState
trigger1 = movehit && !animtime
value = 50
ctrl = 0

[State 310, End]
type = ChangeState
trigger1 = !movehit && (!animtime)
value = 50
ctrl = 0

;-------------------------------------------------------------------------
;Cell jr 
[Statedef 1046, Cell Jr. Attack - Low]
type    = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1045
poweradd = 0
sprpriority = 1


[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 1046
trigger1 = animelem = 3
value = S100,0


[State 0, VarSet]
type = VarSet
trigger1 =  !time
v = 30    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 =  command = "x"  && time >= 27
v = 30    ;fv = 10
value = 8

[State 0, VarSet]
type = VarSet
trigger1 =  command = "y"  && time >= 27
v = 30    ;fv = 10
value = 9



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(30) = 8 || var(30) = 9
value = 1046
persistent = 0



[State 0, Helper]
type = Helper
trigger1 = animelem = 1
helpertype = normal ;player
name = "Cell jr clone" 
ID = 1550
stateno = 1550
pos = 30,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1.1
size.yscale = 1.1
persistent = 0


[State 0, ChangeState]
type = ChangeState
trigger1 = !numhelper(1550) 
value = 0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 
;------------------------------------------------------------------------
;Cell jr - Low
[Statedef 1047, Cell Jr. Attack - Anti Air]
type    = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1045
poweradd = 0
sprpriority = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S100,0
volumescale = 75


[State 0, Helper]
type = Helper
trigger1 = animelem = 1
helpertype = normal ;player
name = "Cell clone anti air" 
ID = 1555
stateno = 1555
pos = 30,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1
persistent = 0


[State 0, ChangeState]
type = ChangeState
trigger1 = !animtime  
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Rising Tackle
[Statedef 1050]
type 			        = S
movetype		        = A
physics		            = N
juggle	    	        = 1
anim    			    = 1050
velset		            = 0,0
ctrl			        = 0
poweradd		        = 69
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 2

[State InitVel]
type                    = VelAdd 
trigger1                = animelem = 2
Y                       = -9
X                       = 3

[State Accel]
type                    = VelAdd 
trigger1                = animelem = 2,>  0
Y                       = 0.44

[State 0: StateTypeSet]
type                    = StateTypeSet
trigger1                = AnimElem = 2
statetype               = A

[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = AnimElem = 2
trigger2                = AnimElem = 4
value                   = 50, 1

[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = AnimElem = 2
value                   = 210, 0

[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = AnimElem = 4
value                   = 210, 1

[State 0: Explod]
type                    = Explod
trigger1                = AnimElem = 2
anim                    = 8612
ID                      = 8612
pos                     = 38, -80
bindtime                = -1
scale                   = 1,1
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1

[State 0: Explod]
type                    = Explod
trigger1                = AnimElem = 3, 6
anim                    = 7039
ID                      = 7039
pos                     = 89, -95
bindtime                = -1
scale                   = .8,.6
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1
ignorehitpause          = 0




[State 0: Explod]
type                    = Explod
trigger1                = AnimElem = 2
anim                    = 8100
ID                      = 7012
pos                     = 0,0
facing                  = 1
bindtime                = 1
scale                   = 1,1
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1

[State 0, ]
type                    = HitDef
trigger1                = AnimElem = 2
attr                    = A, SA
damage                  = 45
animtype                = Heavy
guardflag               = M
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 11, 12
sparkno                 = S8000+(random%2)
guard.sparkno           = S8020+(random%2)
sparkxy                 = 0, -50
hitsound                = S300, 3
guardsound              = S400, 0
ground.type             = low
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -3.5, -10
airguard.velocity       = -3, -1
air.type                = low
air.velocity            = -3, -9
air.hittime             = 12
getpower                = 27
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
envshake.time           = 10
envshake.freq           = 100
envshake.ampl           = -4
envshake.phase          = 10
yaccel		            = 0.5

[State 0, ]
type                    = HitDef
trigger1                = AnimElem = 5
attr                    = A, SA
damage                  = 45
animtype                = Heavy
guardflag               = M
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 12, 10
sparkno                 = S8000+(random%2)
guard.sparkno           = S8020+(random%2)
sparkxy                 = -10, -30
hitsound                = S300, 3
guardsound              = S400, 0
ground.type             = low
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = 0, 8
airguard.velocity       = -3.9,-1
air.type                = High
air.velocity            = -12, 9
air.hittime             = 12
getpower                = 27
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
envshake.time           = 10
envshake.freq           = 100
envshake.ampl           = -4
envshake.phase          = 10
yaccel		            = 0.5
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6

[State 0, ]
type                    = ChangeState
trigger1                = (AnimElem = 6, > 0 && Pos Y >= 0)
value                   = 52
ctrl                    = 0
;--------------------------------------------------------------------------
; Rising Tackle 2
[Statedef 1051]
type 			        = S
movetype		        = A
physics		            = N
juggle	    	        = 1
anim    			    = 1051
velset		            = 0,0
ctrl			        = 0
poweradd		        = 69
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 2

[State InitVel]
type                    = VelAdd 
trigger1                = animelem = 2
Y                       = -11
X                       = 4

[State Accel]
type                    = VelAdd 
trigger1                = animelem = 2,>  0
Y                       = 0.44

[State 0: StateTypeSet]
type                    = StateTypeSet
trigger1                = AnimElem = 2
statetype               = A

[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = AnimElem = 2
trigger2                = AnimElem = 4
value                   = 50, 1

[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = AnimElem = 2
value                   = 210, 0

[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = AnimElem = 4
value                   = 210, 2

[State 0: Explod]
type                    = Explod
trigger1                = AnimElem = 2
anim                    = 8612
ID                      = 8612
pos                     = 38, -80
bindtime                = -1
scale                   = 1,1
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1



[State 0: Explod]
type                    = Explod
trigger1                = AnimElem = 2
anim                    = 8100
ID                      = 7012
pos                     = 0,0
facing                  = 1
bindtime                = 1
scale                   = 1,1
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1

[State 0: Explod]
type                    = Explod
trigger1                = AnimElem = 3, 9
anim                    = 7039
ID                      = 7039
pos                     = 89, -95
bindtime                = -1
scale                   = .8,.6
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1
ignorehitpause          = 0

[State 0, ]
type                    = HitDef
trigger1                = AnimElem = 2
attr                    = A, SA
damage                  = 35
animtype                = Heavy
guardflag               = M
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 11, 12
sparkno                 = S8000+(random%2)
guard.sparkno           = S8020+(random%2)
sparkxy                 = 0, -50
hitsound                = S300, 3
guardsound              = S400, 0
ground.type             = low
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -3.5, -12
airguard.velocity       = -3, -1
air.type                = low
air.velocity            = -3, -12
air.hittime             = 12
getpower                = 27
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
envshake.time           = 10
envshake.freq           = 100
envshake.ampl           = -4
envshake.phase          = 10
yaccel		            = 0.5

[State 0, ]
type                    = HitDef
trigger1                = AnimElem = 5
attr                    = A, SA
damage                  = 45
animtype                = Heavy
guardflag               = M
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 12, 10
sparkno                 = S8000+(random%2)
guard.sparkno           = S8020+(random%2)
sparkxy                 = -10, -30
hitsound                = S300, 3
guardsound              = S400, 0
ground.type             = low
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = 0, 8
airguard.velocity       = -3.9,-1
air.type                = High
air.velocity            = -12, 11
air.hittime             = 12
getpower                = 27
givepower		        = 0
Fall                    = 1
Fall.recover            = 0
envshake.time           = 10
envshake.freq           = 100
envshake.ampl           = -4
envshake.phase          = 10
yaccel		            = 0.5
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6

[State 0, ]
type                    = ChangeState
trigger1                = (AnimElem = 6, > 0 && Pos Y >= 0)
value                   = 52
ctrl                    = 0

;---------------------------------------------------------------------------
;  Dash Burst
[Statedef 1100]
type    = S
movetype= I
physics = S
anim = 100
ctrl = 0
poweradd = 0
sprpriority = -1

[State 0, PowerAdd]
type = PowerAdd
triggerall = !time
trigger1 = Prevstateno = [200,219]
trigger2 = Prevstateno = [400,419]
trigger2 = Prevstateno = 1300
value = -1000

[State 0, PalFXWiz]
type = PalFX
triggerall = !time
trigger1 = Prevstateno = [200,219]
trigger2 = Prevstateno = [400,419]
trigger2 = Prevstateno = 1300
time = 10
add = 256,0,0
mul = 256,256,256
sinadd = -256,0,0,40
invertall = 0
color = 256
;ignorehitpause = 0
;persistent = 1


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = pos Y < 0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N
;ignorehitpause =
;persistent =


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = prevstateno = 100 && !Time
value = 100
elem = 2
;ignorehitpause =
;persistent =

[State 0, AfterImage]
type = AfterImage
trigger1 = !time
time = 20
length = 5
palbright = 10,10,10
palcontrast = 120,120,120
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 1
trans = Add

;-------------------------
[State 0, Explod]
type = Explod
trigger1 = (time%4)=0
anim =8221
ID = 8100
pos = -15,-15
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),1
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = (time%6)=0
anim =8221
ID = 8101
pos = -5,-30
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),1
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = (time%3)=0
anim =8221
ID = 8102
pos = 5,-45
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),1
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = (time%5)=0
anim =8221
ID = 8103
pos = 15,-60
bindtime = 99
random = 5,15
scale = .5-((random%5)/10),1
sprpriority = 0
removetime = 5
ownpal = 1
removeongethit = 1
;--------------------------

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "flamesside"
ID = 8301
stateno = 8001
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State 0, ]
type = Explod
triggerall = pos Y >= 0
trigger1 = AnimElem = 2
anim = 8100
ID = 8100
pos = -20,0
facing = 1
scale = 1.3,1.3
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = !time
value = 2000,0
channel = 0

[State 0, ]
type = PlaySnd
trigger1 = !time
value = 100,0
channel = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 =AnimElem = 2,>=1
value = 0
ignorehitpause = 1
;persistent =

[State 0, ]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
;ignorehitpause = 0
;persistent = 1

[State ****: VelSet]
type = VelSet
trigger1 = AnimELem = 2,>1
x = const(velocity.run.fwd.x)*2
;y = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A       ;S,A,C,L
physics = A         ;A,C,S,N
;ignorehitpause =
;persistent =

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk
ignorehitpause = 1

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
ignorehitpause = 1

[State 100, 4]
type = ChangeState
trigger1 = time = 15
value = ifelse(statetype = S,1101,1102)
ctrl = 0

;---------------------------------------------------------------------------
;  Dash Burst End
[Statedef 1101]
type    = S
physics = S
anim = 1101
sprpriority = 1

[State 0, Turn]
type = Turn
trigger1 = P2Dist X <0

[State 0, VelMul]
type = VelMul
trigger1 = 1
x = .8
y = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
;persistent =

[State 0, ]
type = Explod
trigger1 = AnimElem = 1
anim = 8100
ID = 8100
pos = 25-(vel X<0)*50,0
facing = -1+(vel X<0)*2
scale = 1,1
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = !time
value = 52,0

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

[State 100, 4]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Dash Burst End AIR
[Statedef 1102]
type    = A
physics = A
anim = 1102
sprpriority = 1
ctrl = 1


[State 0, VelMul]
type = VelMul
trigger1 = 1
x = .8
y = 1


[State 0, Turn]
type = Turn
trigger1 = P2Dist X <0
;ignorehitpause =
;persistent =

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1
;persistent =


;--------------------------------------------------------------------------
;ki blast weak
[StateDef 1300]
type = S
movetype= A
physics = S
juggle = 6
velset = 0+12*(prevstateno=100),0
ctrl = 0
anim = 1300
poweradd = 0
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 3
value = -150
ignorehitpause =  1
;persistent =

[State 0, VarAdd]
type = VarAdd
trigger1 = Anim = 1300 && AnimElem = 3
trigger2 = Anim = 1301 && AnimElem = 3
v = 13    ;fv =
value = 1
ignorehitpause = 1
;persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1000,1
volume = 255
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S210,1+(random%3)
volume = 255
channel = 2

[State 0, ]
type = Explod
trigger1 = AnimElem = 2
anim = 8100
ID = 8100
pos = -20,0
facing = 1
scale = 1,1
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, PalFX]
type = PalFX
trigger1 = AnimElem = 3,1
time = 10
add = 128,128,128
mul = 356,356,256
sinadd = -128,-128,-128,40

[State 0, Helper]
type = Helper
trigger1 = anim = 1300 && AnimElem = 3
helpertype = normal
name = "Kiblast weak"
ID = 1310
stateno = 1310
pos = 69,-81
postype = p1
facing = 1
ownpal = 1
size.xscale = .15
size.yscale = .15

[State 0, Helper]
type = Helper
trigger1 = anim = 1301 && AnimElem = 3
helpertype = normal
name = "Kiblast weak"
ID = 1310
stateno = 1310
pos = 69,-81
postype = p1
facing = 1
ownpal = 1
size.xscale = .20
size.yscale = .20

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Power > 0 && command = "b" && var(13) < 9
trigger1 = anim = 1300 && AnimElem = 3,>5
value = 1301
elem = 2
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Power > 0 && command = "b" && var(13) < 9
trigger1 = anim = 1301 && AnimElem = 3,>5
value = 1300
elem = 2
ignorehitpause = 1


[State 0, ChangeState]
type = ChangeState
trigger1 =!AnimTime
value = ifelse(power <= 0,9020,0)
ctrl = ifelse(power <= 0,0,1)

;--------------------------------------------------------------------------
;ki blast weak AIR
[StateDef 1305]
type = A
movetype= A
physics = A
juggle = 6
;velset = 0,0
ctrl = 0
anim = 1320
poweradd = 0
sprpriority = 1

[State 0, VelMul]
type = VelMul
trigger1 = time < 12
x = .8
y = .8
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2, 1
y = -3.5
;ignorehitpause =
;persistent =


[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1000,1
volume = 255
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S210,1+(random%3)
volume = 255
channel = 2

[State 0, BGPalFX]
type = PalFX
trigger1 = AnimElem = 2,1
time = 10
add = 128,128,128
mul = 356,356,256
sinadd = -128,-128,-128,40

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 2
helpertype = normal
name = "Kiblast weak AIR"
ID = 1315
stateno = 1315
pos = 67,-30
postype = p1
facing = 1
ownpal = 1
size.xscale = .3
size.yscale = .3


[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 8600
ID =   8600
pos = 70,-20
scale = 1, 1
postype = p1
bindtime = 1
sprpriority = 2
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0
persistent = 1


[State 0, ChangeState]
type = ChangeState
trigger1 =!AnimTime
value = 50
ctrl = 0
;--------------------------------------------------------------------------
;ki blast - hard
[StateDef 1350]
type = S
movetype= A
physics = S
juggle = 6
velset = 0+12*(prevstateno=100),0
ctrl = 0
anim = 1350
poweradd = -250
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Anim = 1350 && AnimElem = 1)
value = S210,8
volume = 255
channel = 3

[State 0, PalFXWiz]
type = PalFX
triggerall = Anim = 1350
trigger1 = (time%5)=0
time = 5
add = -50,-50,-50
mul = 300,300,500
sinadd = 50,50,50,1
invertall = 0
color = 256


[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 20
value = 0

[State 0, ]
type = Explod
trigger1 = (Anim = 1351) && (AnimElem = 2)
anim = 8100
ID = 8100
pos = -20,0
facing = 1
scale = 1,1
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = Anim = 1350
trigger1 = (time%15)=0
anim = 8140
ID =   8140
pos = 0,10
facing = -1+(random%2)*2
scale = 1, 1
postype = p1
bindtime = 1
sprpriority = -1
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0

[State 0, Explod]
type = Explod
trigger1 = Anim = 1350
trigger1 = (time%30)=0
anim = 8141
ID =   8141
pos = 0,0
facing = -1+(random%2)*2
scale = .7, .7
postype = p1
bindtime = 1
sprpriority = 4
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0


[State 0, VarAdd]
type = VarAdd
trigger1 = (Anim = 1350) && (AnimElem = 2,>=20) && (command = "holdz")
v = 20
value = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 1350 && AnimElemTime(2) >= 20-(prevstateno = 1300)*5
trigger1 = command != "holdz"
trigger2 = var(20) >= 35
value = 1351

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(20)
trigger1 = (Anim = 1350) && (AnimElem = 2,>=20) && (command = "holdz")
value = -10


[State 0, Helper]
type = Helper
trigger1 = Anim = 1350 && AnimElem = 1
helpertype = normal
name = "electriccharge"
ID = 1320
stateno = 1320
pos = -35,-70
postype = p1
facing = 1
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Anim = 1351 && AnimElem = 1)
value = S210,6
volume = 255
channel = 3

[State 0, PalFX]
type = PalFX
trigger1 = (Anim = 1351 && AnimElem = 2)
time = 10
add = 128,128,128
mul = 356,356,256
sinadd = -128,-128,-128,40

[State 0, Helper]
type = Helper
trigger1 = (Anim = 1351 && AnimElem = 2)
helpertype = normal ;player
name = "Shockwave"
ID = 8200
stateno = 8200
pos = 27,-86
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
size.xscale = .5
size.yscale = .5

[State 0, Helper]
type = Helper
trigger1 = (Anim = 1351 && AnimElem = 2)
helpertype = normal
name = "Kiblast Strong"
ID = 1330
stateno = 1330
pos = 95,-99
postype = p1
facing = 1
ownpal = 1
size.xscale = .35
size.yscale = .35

[State 0, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = ifelse(power <= 0,9020,0)
ctrl = ifelse(power <= 0,0,1)

;--------------------------------------------------------------------------
;Power up start
[StateDef 2000]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 2000
poweradd = 0;0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,1
value = S2000,0
volume = 255
channel = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,1
value = S210,6
volume = 255
channel = 3

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2,1
anim = 8140
ID =   8140
pos = 0,0
scale = 1, 1
postype = p1
bindtime = 1
sprpriority = -1
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2,1
anim = 8141
ID =   8141
pos = 0,0
scale = 1.3, 1.3
postype = p1
bindtime = 1
sprpriority = 4
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 2,1
helpertype = normal ;player
name = "Shockwave"
ID = 8200
stateno = 8200
pos = 0,-40
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999



[State 0, ChangeState]
type = ChangeState
trigger1 = AnimElem = 2,5
value = 2001
ctrl = 0

;--------------------------------------------------------------------------
;Powering up
[StateDef 2001]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 2001
poweradd = 0;0
sprpriority = 2



[State 0, BGPalFX]
type = BGPalFX
triggerall = PalNo = [1,6]
trigger1 = (time%10)=0
time = 10
add = -32,-32,-16
mul = 256,256,192
sinadd = 32,32,16,5

[State 0, BGPalFX]
type = PalFX
triggerall = PalNo = [1,6]
trigger1 = (time%10)=0
time = 10
add = 64,64,0
mul = 256,256,256
sinadd = 128,128,64,5

[State 0, BGPalFX]
type = BGPalFX
triggerall = PalNo = [7,9]
trigger1 = (time%10)=0
time = 10
sinadd = 32,32,32,5

[State 0, BGPalFX]
type = PalFX
triggerall = PalNo = [1,9]
trigger1 = (time%10)=0
time = 10
add = 0,0,0
mul = 256,256,256
sinadd = 64,64,64,5

[State 0, Explod]
type = Explod
trigger1 = (time%15)=0
anim = 8140
ID =   8140
pos = 0,10
facing = -1+(random%2)*2
scale = 1, 1
postype = p1
bindtime = 1
sprpriority = -1
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0

[State 0, Explod]
type = null; Explod
triggerall = random = [1,333]
trigger1 = (time%20)=0
anim = 8141
ID =   8141
pos = 0,0
facing = -1+(random%2)*2
scale = 1,1
postype = p1
bindtime = 1
sprpriority = 4
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0

[State 0, Explod]
type =null; Explod
triggerall = random = [334,666]
trigger1 = (time%20)=0
anim = 8141
ID =   8141
pos = 0,0
facing = -1+(random%2)*2
scale = .8,.8
postype = p1
bindtime = 1
sprpriority = 4
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0

[State 0:		Helper]
type			        = Helper
Triggerall              = Power >= 200
trigger1		        = (Time > 20) && ((GameTime%10) = 0) && (Random < 249) && (NumHelper(8300) < 5)
helpertype		        = Normal
name			        = "Rock000"
id			            = 8300
pos			            = 0,0
postype		            = p1
facing		            = 0
stateno		            = 8201
ownpal		            = 1
size.xscale		        = (IfElse(Random <= 799,0.75,3))
size.yscale		        = (IfElse(Random <= 799,0.75,3))

[State 0:		Helper]
type			        = Helper
Triggerall              = Power >= 200
trigger1		        = (Time > 20) && ((GameTime%20) = 0) && (Random > 749) && (NumHelper(8310) < 5)
helpertype		        = Normal
name			        = "Rock001"
id			            = 8310
pos			            = 0,0
postype		            = p1
facing		            = 0
stateno		            = 8202
ownpal		            = 1
size.xscale		        = (IfElse(Random <= 499,0.75,0.50))
size.yscale		        = (IfElse(Random <= 499,0.75,0.50))

[State 0:		Helper]
type			        = Helper
Triggerall                           = Power >= 200
trigger1		        = (Time > 20) && ((GameTime%30) = 0) && (Random = [249,749]) && (NumHelper(8320) < 5)
helpertype		        = Normal
name			        = "Rock002"
id			            = 8320
pos			            = 0,0
postype		            = p1
facing		            = 0
stateno		            = 8220
ownpal		            = 1
size.xscale		        = (IfElse(Random <= 499,0.50,0.75))
size.yscale		        = (IfElse(Random <= 499,0.50,0.75))

[State 0, Explod]
type = Explod
triggerall = random = [667,999]
trigger1 = (time%20)=0
anim = 8141
ID =   8141
pos = 0,0
facing = -1+(random%2)*2
scale = .6,.6
postype = p1
bindtime = 1
sprpriority = 4
ownpal = 1
removetime = -2
supermovetime = 999
pausemovetime = 999
ontop = 0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time < 60
value = 9

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = [60,119]
value = 11

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time  = [120,179]
value = 14

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time >= 180
value = 17


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S700,1
volume = 255
channel = 7
loop = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S700,3
volume = 150
channel = 12
loop = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S700,2
volume = 255
channel = 11
loop = 1





[State 0: Helper]
type                    = Helper
trigger1                = time = 0
helpertype              = normal
ID                      = 8000
pos                     = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype                 = p1
facing                  = 1
stateno                 = 8000
ownpal                  = 1
size.xscale             = .7
size.yscale             = .7
supermovetime = 999
pausemovetime = 999




[State 0:       EnvShake]
type 			        = EnvShake
trigger1 		        = (TimeMod = 10, 0)
time 			        = 10
freq 			        = 70
ampl 			        = 7

[State 0, ChangeState]
type = ChangeState
triggerall = time > 20
trigger1 = (command != "holda") && (command != "holdb") || (Power >= 5000)
Value = 0
ctrl = 1

;--------------------------------------------------------------------------
;Zanzoken - Start
[StateDef 2100]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 100
poweradd = -500
sprpriority = 2

[State 0, VarAdd]
type = VarAdd
trigger1 = !time && var(3) <= 2
v = 3
value = 2

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "afterimage"
ID =8211
stateno = 8211
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S2100,0
volume = 255
channel = 6

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 1
value =  2101
ctrl = 0

;--------------------------------------------------------------------------
;zanzoken dissapear!
[StateDef 2101]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 2101
poweradd = 0;0
sprpriority = 0

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "linezanzouken"
ID =8210
stateno = 8210
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

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

[State 0, Pause]
type = Pause
trigger1 = P2MoveType = H
time = 5
movetime = 5

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =Pos Y < 0
statetype = A
movetype = A
physics = N

[State 0, PosSet]
type = PosSet
trigger1 = !time && numtarget
x = ifelse(  facing = -1,(target, pos X-20), (target, pos X+20)  )
y = target, pos Y

[State 0, PosSet]
type = PosSet
trigger1 = !time && !numtarget
x = ifelse(  facing = -1,(enemynear, pos X-20), (enemynear, pos X+20)  )
y = enemynear, pos Y

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 1
y = 0

[State 0, ChangeState - idle]
type = ChangeState
trigger1 = !AnimTime; && command = "holddown"
value =  2105
ctrl = 1


;--------------------------------------------------------------------------
;Zanzoken attack - Start
[StateDef 2110]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 100
poweradd = -500
sprpriority = 2

[State 0, VarAdd]
type = VarAdd
trigger1 = !time && var(3) <= 2
v = 3
value = 1

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "afterimage"
ID =8211
stateno = 8211
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S2100,0
volume = 255
channel = 6

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 1
value =  2111
ctrl = 0

;--------------------------------------------------------------------------
;zanzoken attack - dissapear!
[StateDef 2111]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 2101
poweradd = 0;0
sprpriority = 0

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "linezanzouken"
ID =8210
stateno = 8210
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

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

[State 0, Pause]
type = Pause
trigger1 = P2MoveType = H
time = 15
movetime = 15

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =Pos Y < 0
statetype = A
movetype = A
physics = N

[State 0, PosSet]
type = PosSet
trigger1 = !time && numtarget
x = ifelse(  facing = -1,(target, pos X-20), (target, pos X+20)  )
y = target, pos Y

[State 0, PosSet]
type = PosSet
trigger1 = !time && !numtarget
x = ifelse(  facing = -1,(enemynear, pos X-20), (enemynear, pos X+20)  )
y = enemynear, pos Y

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 1
y = 0

[State 0, ChangeState - Attack]
type = ChangeState
trigger1 = !AnimTime
value =  2112+(var(3)-1)
ctrl = 0

;--------------------------------------------------------------------------
;Zanzoken Attack 1
[StateDef 2112]
type = U
movetype= A
physics = U
juggle = 0
velset = 0,0
ctrl = 0
anim = 2112
poweradd = 0;0
sprpriority = 2

[State 0, Turn]
type = Turn
trigger1 = !time

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = !time
value = 1010,2
volume = 255
channel = 2




[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "Shockwave"
ID = 8200
stateno = 8200
pos = 0,-55
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 48, 9
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 15, 15
sparkno = S8010
guard.sparkno = S8020+(random%2)
sparkxy = -10, -55
hitsound = S203, 1
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
ground.type = Low
ground.slidetime = 35
ground.hittime  = 35
ground.velocity = -14,-7
p2stateno = 6000
Fall = 1
air.type = Low
air.hittime = 35
air.velocity = -14,-7
airguard.velocity = -4.5,0
getpower = 0;30
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
yaccel = .4

[State 0, ]
type = ChangeState
trigger1 = !AnimTime
value = 0+(statetype=A)*50
ctrl = 1

;--------------------------------------------------------------------------
;Zanzoken Attack 2
[StateDef 2113]
type = U
movetype= A
physics = U
juggle = 0
velset = 0,0
ctrl = 0
anim = 2113
poweradd = 0;0
sprpriority = 2

[State 0, Turn]
type = Turn
trigger1 = !time

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1



[State 0, ]
type = PlaySnd
trigger1 = !time
value = 1010,3
volume = 255
channel = 2

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "Shockwave"
ID = 8200
stateno = 8200
pos = 0,-66
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 48, 9
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 15, 15
sparkno = S8011
guard.sparkno = S8020+(random%2)
sparkxy = -10, -66
hitsound = S203, 1
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
ground.type = High
ground.slidetime = 35
ground.hittime  = 35
ground.velocity = -14,-14
p2stateno = 6000
Fall = 1
air.type = High
air.hittime = 35
air.velocity = -14,-14
airguard.velocity = -4.5,0
getpower = 0;30
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
yaccel = .4

[State 0, ]
type = ChangeState
trigger1 = !AnimTime
value = 0+(statetype=A)*50
ctrl = 1

;--------------------------------------------------------------------------
;Zanzoken Attack 3
[StateDef 2114]
type = U
movetype= A
physics = U
juggle = 0
velset = 0,0
ctrl = 0
anim = 2114
poweradd = 0;0
sprpriority = 2

[State 0, Turn]
type = Turn
trigger1 = !time

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = !time
value = 1010,4
volume = 255
channel = 2

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "Shockwave"
ID = 8200
stateno = 8200
pos = 0,-40
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = 55, 11
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 15, 15
sparkno = S8017
guard.sparkno = S8020+(random%2)
sparkxy = -10, -40
hitsound = S203, 1
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
ground.type = High
ground.slidetime = 35
ground.hittime  = 35
ground.velocity = -7,14
p2stateno = 6000
Fall = 1
air.type = High
air.hittime = 35
air.velocity = -7,14
airguard.velocity = -4.5,0
getpower = 0;30
envshake.time = 15
envshake.freq = 140
envshake.ampl = 3
fall.envshake.time = 10
fall.envshake.freq = 190
fall.envshake.ampl = 6
yaccel = .4

[State 0, ]
type = ChangeState
trigger1 = !AnimTime
value = 0+(statetype=A)*50
ctrl = 1


;--------------------------------------------------------------------------
;Zanzoken - Reappear AIR
[StateDef 2105]
type = A
movetype= A
physics = A
juggle = 6
velset = 0,-3
ctrl = 1
anim = 2105
poweradd = 0;0
sprpriority = 2

[State 0, Turn]
type = Turn
trigger1 = !time

[State 0, ]
type = ChangeState
trigger1 = Pos Y >= 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Tired
[Statedef 9020]
type = S
physics = S
movetype = H
ctrl = 0

[State 9000, Change Animation]
type = ChangeAnim
trigger1 = !time
value = 5300

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 2
value = 0

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
v = 2
value = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = command = "x" || command = "y" || command = "z"
v = 2
value = 5

[State 9003, Flash]
type = PalFX
trigger1 =  command = "x" || command = "y" || command = "z"
time = 2
add = 50,50,50
mul = 300,300,300

[State 9000, Next]
type = SelfState
trigger1 = var(2)>= 120
value = 0
ctrl = 1
