;Ki Shot 
[Statedef 1050] 
type = S
movetype= A
physics = S
juggle = 6
velset = 0,0
ctrl = 0
anim = 1300
poweradd = 0
sprpriority = 2


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


[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,0
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 = anim = 1300 && AnimElem = 3
anim = 7100
ID = 8100
pos = -20,0
facing = 1
scale = .5,.5
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1



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


[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = AnimElem = 2
ID                      = 7031


[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = AnimElem = 3
ID                      = 7032

[State 0, ]
type = Explod
trigger1 = anim = 1300 && AnimElem = 3
anim = 70313
ID = 8100
pos = 28,-58
facing = 1
scale = .3,.4
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
removetime = 8


[State 0, ]
type = Explod
trigger1 = anim = 1301 && AnimElem = 3
anim = 70313
ID = 8100
pos = 28,-58
facing = 1
scale = .3,.4
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
removetime = 8





[State 0: Helper]
type                    = Helper
trigger1                = anim = 1300 && AnimElemtime(3) = 1
helpertype              = normal
name                    = "Ki Shot Left"
ID                      = 70313
pos                     = 34,-55
stateno                 = 70313
ownpal                  = 1
size.xscale             = .20
size.yscale             = .15

[State 0: Helper]
type                    = Helper
trigger1                = anim = 1301 && AnimElemtime(3) = 1
helpertype              = normal
name                    = "Ki Shot Right"
ID                      = 70313
pos                     = 28,-58
stateno                 = 70313
ownpal                  = 1
size.xscale             = .20
size.yscale             = .11
;---------------

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

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


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

;---------------------------------------------------------------------------
;Air Ki Shot 
[StateDef 1052]
type = A
movetype= A
physics = A
juggle = 2
;velset = 0,0
ctrl = 0
anim = 1320
poweradd = 0
sprpriority = 2

[State 0, VelMul]
type =  Velset 
trigger1 = time < 15 
x = 0

[State 0, VelMul]
type =  Velset 
triggerall = anim = 1320
trigger1 = animelemtime(4)>=0
x = 0
y = 0

[State 0, VelMul]
type =  Velset 
triggerall = anim = 1321
trigger1 = animelemtime(3)>=0
x = 0
y = 0


[State 0, VelMul]
type =  Velset 
triggerall = anim = 1320 
trigger1 = animelemtime(4) = 1 
x = 0
y = -2.9

[State 0, VelMul]
type =  Velset 
triggerall = anim = 1321
trigger1 = animelemtime(3) = 1 
;x = -.2
y = -1.2



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

[State 0, VarAdd]
type = VarAdd
trigger1 = Anim = 1320 && AnimElem = 2
trigger2 = Anim = 1321 && AnimElem = 2
v = 13    ;fv =
value = 1
ignorehitpause = 1
;persistent =

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

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

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

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

[State 0, BGPalFX]
type = PalFX
trigger1 = anim = 1320 && AnimElem = 4,1
time = 3
add = 128,128,128
mul = 356,356,256
sinadd = -128,-128,-128,40

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


[State 0, ]
type = Explod
trigger1 = anim = 1320 && AnimElem = 4
anim = 70314
ID = 8100
pos = 25,-37
facing = 1
scale = .4,.4
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
removetime = 8


[State 0, ]
type = Explod
trigger1 = anim = 1321 && AnimElem = 3
anim = 70314
ID = 8100
pos = 25,-37
facing = 1
scale = .4,.4
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
removetime = 8

[State 0, Helper]
type = Helper
trigger1 = anim = 1320 && AnimElemtime(4) = 1
helpertype = normal
name = "Kiblast weak AIR"
ID = 1315
stateno = 1317
pos = 31,-42
postype = p1
facing = 1
ownpal = 1
size.xscale = .25
size.yscale = .35

[State 0, Helper]
type = Helper
trigger1 = anim = 1321 && AnimElemtime(3) = 1
helpertype = normal
name = "Kiblast weak AIR"
ID = 1315
stateno = 1317
pos = 31,-42
postype = p1
facing = 1
ownpal = 1
size.xscale = .25
size.yscale = .35

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Power > 0 && command = "a" && var(13) < 7
trigger1 = anim = 1320 && AnimElemtime(4) >= 2
value = 1321
elem = 1
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Power > 0 && command = "a" && var(13) < 7
trigger1 = anim = 1321 && AnimElemtime(3) >= 4
value = 1320
elem = 1
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 =!AnimTime || Pos Y = 0
value = 50
ctrl = 0
;-------------------------------------------------------------------------
;Bomb mid
[statedef 1080]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1080
velset = 0,0
sprpriority = 0
poweradd = -100

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S215,7
volume = 255
channel = 10


[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S1030,0
volume = 255
channel = 2


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


[State 1030, Helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal
name = "fire"
ID = 1
stateno = 11041
pos = 2,-53
postype = p1
keyctrl = 0
ownpal = 1
size.xscale = .25
size.yscale = .25



[state 1030]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------------------------
;Evil Orb
[statedef 1090]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1090
velset = 0,0
sprpriority = 0
poweradd = -100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S1050,0
volume = 155
channel = 1



[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElemtime(1) = 1
value = S215,3
volume = 255


[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElemtime(4) = 6 
value = S3001,0
volume = 155
channel = 2

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

[State 0, Helper]
type = Helper
trigger1 = animelemtime(2) = 0
helpertype = normal ;player
name = "Pink Energy Out"
ID = 8200
stateno = 70222
pos = 40,-70
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = animelemtime(4) = 17
helpertype = normal ;player
name = "Pink Energy Out"
ID = 8200
stateno = 70222
pos = 54,-70
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(4) = 8 
anim = 8431
ID = 8460
pos = 30,-60
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = -1
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 4
ownpal = 1
removeongethit = 1


[State 0, Explod]
type = Explod
trigger1 = animelemtime(4) = 7
anim = 8460
ID = 8460
pos = 50,-60
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = -1
removetime = -2
pausemovetime = 0
scale = .6,.6
sprpriority = 4
ownpal = 1
removeongethit = 1


[State 0, Explod]
type = Explod
trigger1 = animelemtime(4) = 22
anim = 8470
ID = 8460
pos = 49,-55
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = -1
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 4
ownpal = 1
removeongethit = 1




[State 200, 1]
type = HitDef
trigger1 		    = AnimElemtime(4) = 5 || animelemtime(4) = 8 || animelemtime(4) = 11
trigger2                = animelemtime(4) = 13 || animelemtime(4) = 15 
attr  		    = S, NA                     
damage                  = 10, 0                   
animtype                = light                 
guardflag               = MA                   
hitflag                 = MAFD                    
priority                = 3, Hit                
pausetime               = 2, 10                
sparkno                 = -1+0*(var(33):=8030)**0
sparkxy                 = -20 + 0*(var(35):=75), var(36):=-40
guard.sparkno           = S8020+(random%2)                   
hitsound 		    = S300, 7              
guardsound              = S400, 0               
ground.type 	    = low               
ground.slidetime 	    = 5             
ground.hittime  	    = 11            
ground.velocity 	    = -0.8             
airguard.velocity 	    = -1.9,-.8     
air.type 	 	    = High                  
air.velocity 	    = -1.4,-3           
air.hittime 	    = 15  
givepower		    = 25
envshake.time           = 10
envshake.freq           = 60
envshake.ampl           = -2
envshake.phase          = 90	


[State 200, 1]
type = HitDef
trigger1 		    = AnimElemtime(4) = 19 
attr  		    = S, NA                     
damage                  = 15, 0                   
animtype                = light                 
guardflag               = MA                   
hitflag                 = MAFD                    
priority                = 3, Hit                
pausetime               = 2, 10                
sparkno                 = -1+0*(var(33):=8030)**0
sparkxy                 = -20 + 0*(var(35):=75), var(36):=-40
guard.sparkno           = S8020+(random%2)                   
hitsound 		    = S300, 6              
guardsound              = S400, 0               
ground.type 	    = low               
ground.slidetime 	    = 5             
ground.hittime  	    = 11            
ground.velocity 	    = -6.1,-4             
airguard.velocity 	    = -1.9,-.8     
air.type 	 	    = High                  
air.velocity 	    = -5.4,-6          
air.hittime 	    = 15  
givepower		    = 25
envshake.time           = 12
envshake.freq           = 100
envshake.ampl           = -2
envshake.phase          = 85	
fall                    = 1



[state 1030]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------------------------
;ki shot (double)
[Statedef 1180]
type                    = S
movetype                = A
physics                 = S
anim                    = 1080
ctrl                    = 0
poweradd                = -50
juggle                  = 4
facep2                  = 0
hitdefpersist           = 1
movehitpersist          = 1
hitcountpersist         = 1
sprpriority             = 2


[State 1035, 1]
type			= EnvShake
trigger1		= (AnimElem = 2)
time			= 10
freq			= 140
ampl			= -2
phase			= 90

[State 1035, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1000, 2
channel = -1


[state 1035, ball]
type                    = Explod
trigger1                = time = 0
anim                    = 6250
ID                      = 6103
pos                     = -2, -64
bindtime                = -1
removetime              = -2
supermovetime           = 999
pausemovetime           = 999
scale                   = .8, .8
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1

[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = animelem = 2
ID                      = 6103


[State 1032: Ki blast]
type = Helper
trigger1 = animelem = 3
helpertype = Normal
size.xscale = 0.3
size.yscale = 0.4
pos	= 40,-35
postype	= p1
facing = 1
stateno	= 1400
keyctrl	= 0
bindtime = -1
supermovetime = 200
pausemovetime = 200
ID =1400

[State 1033, 4]
type =  ChangeState
trigger1 = AnimTime = 0
value =  1081
ctrl= 0
;-----------------------------------------------------------------------
;ki shot(knockdown)
[Statedef 1181]
type                    = S
movetype                = A
physics                 = S
anim                    = 1081
ctrl                    = 0
poweradd                = 69
juggle                  = 4
facep2                  = 0
hitdefpersist           = 1
movehitpersist          = 1
hitcountpersist         = 1
sprpriority             = 2



[State 1035, 1]
type			= EnvShake
trigger1		= (AnimElem = 2)
time			= 10
freq			= 140
ampl			= -2
phase			= 90



[State 1035, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1000, 2
channel = -1


[state 1034, ball]
type                    = Explod
trigger1                = time = 0
anim                    = 6250
ID                      = 6103
pos                     = -14, -51
bindtime                = -1
removetime              = -2
supermovetime           = 999
pausemovetime           = 999
scale                   = .8, .8
sprpriority             = 3
ownpal                  = 1
removeongethit          = 1


[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = animelem = 2
ID                      = 6103


[State 1032: ]
type = Helper
trigger1 = animelem = 3
helpertype = Normal
size.xscale = 0.3
size.yscale = 0.4
pos	= 40,-55
postype	= p1
facing = 1
stateno	= 1401
keyctrl	= 0
supermovetime = 200
pausemovetime = 200
ID=1051


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

;-----------------------------------------------------------------------
;Power Stun
[StateDef 1060]
type = S
movetype= A
physics = S
juggle = 3
velset = 0,0
ctrl = 0
anim = 1060
poweradd = 0;20
sprpriority = 2


[State 0, VarSet]
type = VarSet
trigger1 = !time
;trigger2 = command != "holdz"
v = 20
value = 0




[State 0, VarAdd]
type = VarAdd
trigger1 = animelemtime(2) > 0  && animelemtime(3) < 0 && (command = "holdz")&& var(20)<=40 
v = 20
value = 1
ignorehitpause = 1

 [State 0, ChangeAnim]
type = ChangeAnim
triggerall = animelemtime(3) < 0
trigger1 = var(20) >= 40 || (command != "holdz" && var(20) < 40)
value = Anim
elem = 3
persistent = 0
ignorehitpause = 0

[State 0, ]
type = PlaySnd
trigger1 = var(20)= 6
value = 203,0
volume = 255
channel = 1
ignorehitpause = 1

[State 290, VarSet-General.PalFX.State]
type = Varset
trigger1 = !time
v = 33
value = stateno


[State 300, VarSet-PalFX.Red]
type = Varset
trigger1 = !time
v = 30
value = 5

[State 300, VarAdd-VarSet-PalFX.Red.Add]
type = VarAdd
trigger1 = (var(20)= [10,40])
v = 30
value = 8
ignorehitpause = 1


[State 300, VarSet-PalFX.Green]
type = Varset
trigger1 = !time
v = 31
value = 3

[State 300, VarAdd-VarSet-PalFX.Green.Add]
type = VarAdd
trigger1 = (var(20)= [10,40])
v = 31
value = 6
ignorehitpause = 1


[State 300, PalFx]
type = PalFX
trigger1 = (var(20)= [10,40])
time = 1
add = Var(30),Var(31),0
ignorehitpause = 1

[State 290, VarSet-General.PalFX.NoState]
type = Varset
trigger1 = time = 40
v = 33
value = -1
ignorehitpause = 1




[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = var(20)= 40
flag = unguardable
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = AnimElemtime(3) = 3 && var(20)= 0
value = 200,4
volume = 255
channel = 1

[State 0, ]
type = PlaySnd
trigger1 = AnimElemtime(4) = 0 && var(20)= 40
value = 200,5
volume = 255
channel = 1

[State 0, ]
type = PlaySnd
trigger1 = !time && random < 400
value = ifelse(random > 500,210,-1),ifelse(random > 500,0,ifelse(random > 500,1,2))
volume = 255
channel = 2




[State 0, ]
type 			= HitDef
trigger1 			= AnimElem = 4
attr 			= S, NA
damage 			= 41+var(20), 5
animtype 			= Hard
guardflag 		= MA
hitflag 			= MAF
priority 			= 3, Hit
pausetime 		= 8+2*(var(20)=40), 15 +2*(var(20)=40)
sparkno		    	= -1
guard.sparkno           	= S8020+(random%2) 
sparkxy 			= -17, -48
hitsound 			= S301,2
guardsound 		= S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
ground.type 		= Low
ground.slidetime 		= 17
ground.hittime  		= 17
ground.velocity 		= ifelse(var(20) >= 40, -5,-3),0
air.type 			= Low
air.hittime 		= 15
air.velocity 		= -2,-3
airguard.velocity 		= -2,0
getpower 			= 0;20
envshake.time 		= 15
envshake.freq 		= 120
envshake.ampl 		= 6
persistent 		= 1


[State 240, Hit_Particle.Helper]
type = Helper
trigger1 = movehit = 1 && !numhelper(11006)
name = "Hit Particles"
stateno = 11020
postype = p1
pos = floor(p2bodydist X +(22+const(size.ground.front))), -55
keyctrl = 0
ownpal = 1
id = 11006
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999
size.xscale = 1
size.yscale = 1

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

;--------------------------------------------------------------------------
;Power Break
[StateDef 1061]
type = S
movetype= A
physics = S
juggle = 2
velset = 0,0
ctrl = 0
anim = 1061
poweradd = -500;20
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = var(20) = 2
anim = 8450
ID = 8450
pos = 4,-59
postype = p1  ;p2,front,back,left,right
bindtime = -1
scale = .8,.8
sprpriority = 1
ignorehitpause = 0
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !time
trigger2 = command != "holdz"
v = 21
value = 0

[State 1220		Veladd]
type			= Veladd
trigger1		= animelem = 2
x			= 2.5

[State 1220		Veladd]
type			= Velset
trigger1		= animelemtime(3)>= 3
x			= 12

[State 1220		Veladd]
type			= Velset
trigger1		= Movehit
x			= 0

[State 0, VarAdd]
type = VarAdd
trigger1 = movehit
v = 21
value = 1
ignorehitpause = 1

[State 0, ChangeAnim]
type = null; ChangeAnim
trigger1 = var(21) >= 15 || (command != "holdz")
value = Anim
elem = 3
persistent = 0
ignorehitpause = 0


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = var(21)= 15
flag = unguardable
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = AnimElemtime(1) = 3
value = 200,3
volume = 255
channel = 1

[State 0, ]
type = PlaySnd
trigger1 = !time && random < 400
value = ifelse(random > 500,210,-1),ifelse(random > 500,0,ifelse(random > 500,1,2))
volume = 255
channel = 2

[State 0, ]
type 			= HitDef
trigger1 			= AnimElem = 4
attr 			= S, NA
damage 			= 50
animtype 			= Hard
guardflag 		= MA
hitflag 			= MAF
priority 			= 3, Hit
pausetime 		= 10+5*(var(21)=15), 10 +5*(var(21)=15)
sparkno		    	= -1
guard.sparkno           	= S8020+(random%2) 
sparkxy 			= -10, -53
hitsound     		= S301, 3
guardsound 		= S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
ground.type 		= High
ground.slidetime 		= 17
ground.hittime  		= 17
ground.velocity 		= -4,0
air.type 			= Low
air.hittime 		= 15
air.velocity 		= -2,-3
airguard.velocity 		= -2,0
getpower 			= 0;20
envshake.time 		= 15
envshake.freq 		= 120
envshake.ampl 		= 6
persistent 		= 1


[State 240, Hit_Particle.Helper]
type = Helper
trigger1 = movehit = 1 && !numhelper(11006)
name = "Hit Particles"
stateno = 11020
postype = p1
pos = floor(p2bodydist X +(22+const(size.ground.front))), -55
keyctrl = 0
ownpal = 1
id = 11006
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999
size.xscale = 1
size.yscale = 1

[State 0, ]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;--------------------------------------------------------------------------
;Finisher Set up
[StateDef 1063]
type = S
movetype= A
physics = S
juggle = 5
;velset = 0,0
ctrl = 0
anim = 221
poweradd = -2000;30
sprpriority = 2

[State 0, ]
type = Explod
triggerall = pos Y >= 0 && prevstateno != 100
trigger1 = AnimElem = 2
anim = 8100
ID = 8100
pos = 0,0
facing = 1
scale = 1,1
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

;[State 0, ]
;type = AfterImage
;trigger1 = AnimElem = 2
;time = 22
;length = 4
;palbright = 10,10,10
;palcontrast = 120,120,120
;paladd = 0,0,0
;palmul = 1,1,1
;timegap = 2
;framegap = 1
;trans = Add

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "Shockwave"
ID = 8200
stateno = 8200
pos = floor(p2bodydist X +(42+const(size.ground.front))), -55
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1
persistent = 0


 [State 0, VelSet]
type = VelSet
trigger1 = AnimElemtime(2) = 2
x = 3.4
y = -7.1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(2) = 2
statetype = A
movetype = A
physics = A




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

[State 0, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 210,6
volume = 255
channel = 2



[State 0, ]
type 			= HitDef
trigger1 			= AnimElem = 3
attr 			= A, NA
damage 			= 60, 12
animtype 			= back
guardflag 		= MA
hitflag 			= MAFD
priority 			= 3, Hit
pausetime 		= 16, 12
sparkno		    	= -1
guard.sparkno           	= S8020+(random%2) 
sparkxy 			= -30, -69
hitsound 			= S1010, 0
guardsound 		= S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 0, 1))
ground.type 		= High
ground.slidetime 		= 15
ground.hittime  		= 20
ground.velocity 		= -19,-12
Fall 			= 1
p2stateno 		= 7000
air.type 			= High
air.hittime 		= 20
air.velocity 		= -15,-5
airguard.velocity 		= -3,0
getpower 			= 0;30
givepower                     = 70
envshake.time 		= 15
envshake.freq 		= 120
envshake.ampl 		= 6

[State 0, ChangeState]
type = ChangeState
triggerall = Statetype = A
trigger1 = !animtime
value = 1064
ctrl = 0

;--------------------------------------------------------------------------
;Finisher Set up
[StateDef 1064]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 100
;poweradd = -500
sprpriority = 2


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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noBG
flag3 = noFG

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

[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, ChangeState]
type = ChangeState
trigger1 = time = 27
value = 50
ctrl = 1
;----------------------------------------------------------------------
;Finisher Set up
[StateDef 1065]
type = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3202
;poweradd = -500
sprpriority = 2


[State 0, PosSet]
type = PosSet
trigger1 = !time
x =ifelse (facing =1, -145,145)


[State 0: Pause]
type                    = Pause
trigger1                = AnimElem = 3, 4
trigger2                = AnimElem = 5, 2
trigger3                = AnimElem = 8, 2
trigger4                = AnimElem = 11, 2
trigger5                = AnimElem = 13, 2
trigger6                = AnimElem = 15, 2
time                    = 2
movetime                = 2

[State 0: PosAdd]
type                    = PosAdd
trigger1                = AnimElem = 3, 4
trigger2                = AnimElem = 5, 2
trigger3                = AnimElem = 8, 2
trigger4                = AnimElem = 11, 2
trigger5                = AnimElem = 13, 2
trigger6                = AnimElem = 15, 2
x                       = 80

[State 0: Turn]
type                    = Turn
trigger1                = AnimElem = 3, 4
trigger2                = AnimElem = 5, 2
trigger3                = AnimElem = 8, 2
trigger4                = AnimElem = 11, 2
trigger5                = AnimElem = 13, 2
trigger6                = AnimElem = 15, 2




[State 700,5 speed lines]
type = Explod
trigger1 = !time
Anim = 15000
pos = -120,210
postype = front ;p2,front,back,left,right
bindtime = -1
id=  15000
removetime = -1
scale =1.4, 1.111
pausemovetime = 999
sprpriority = 5
removeongethit = 1
ownpal=1




[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noBG
flag3 = noFG


[State 3101:	End]
type			= changestate
trigger1		= !animtime
value			= 50
ctrl			= 0
;----------------------------------------------------------------------------------------------------------
;Launcher after stun
[StateDef 1070]
type = S
movetype= A
physics = S
juggle = 6
velset = 0,0
ctrl = 0
anim = 1070
poweradd = 0;30
sprpriority = 2

[State 0, ]
type = Explod
triggerall = Animelem = 5,>=1 && AnimElem = 6,<3
trigger1 = (time%6)=0
anim = 8100
ID = 8100
pos = 0,0-pos Y
facing = 1
scale = 1,.5
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 0

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

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 3
value = 200,2
volume = 255
channel = 2



[State 0, VelSet]
type = VelSet
trigger1 = Animelemtime(2)= 0
x = 5


[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 = !time
attr = S, NA
damage = 48, 9
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 15, 15
sparkno = S8010
guard.sparkno = S8022+(random%2)
sparkxy = -10, -47
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,-4
p2stateno = 6000
Fall = 1
air.type = Low
air.hittime = 35
air.velocity = -14,-4
airguard.velocity = -4.5,0
getpower = 0;30
envshake.time = 15
envshake.freq = 120
envshake.ampl = 6
yaccel = .3

[State 0, ScreenBound]
type = ScreenBound
trigger1 = AnimElemtime(5)>=1
value = 0
movecamera = 0,0
ignorehitpause = 1

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

;--------------------------------------------------------------------------
;Dash Burst
[Statedef 1100]
type    = S
movetype= I
physics = S
anim = 1100
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 100, DashLines.Helper]
type = Helper
trigger1 = time=3
name = "Dash Lines"
stateno = 10200
postype = p1
pos = 0
keyctrl = 0
ownpal = 1
id = 10200
ignorehitpause = 1
;--------------------------

[State 0: Helper]
type                    = Helper
trigger1                = time = 0
helpertype              = normal
ID                      = 8001
pos                     = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype                 = p1
facing                  = 1
stateno                 = 8000
ownpal                  = 1
size.xscale             = .8
size.yscale             = 1.0
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 = 1
;persistent = 1

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



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

;-------------------------------------------------------------------------
;Buu punch light
[statedef 1200]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1200
velset = 0,0
hitcountpersist = 1
juggle = 8

[state 1200]
type = velset
trigger1 = animelemtime(5) < 0
x = 1

[state 1200]
type = pause
trigger1 = movehit && time%2 = 0 && movehit < 20
time = 1

[state 1200]
type = playsnd
trigger1 = animelemtime(4) = 4
value = S215,0

[state 1200]
type = playsnd
trigger1 = animelemtime(4) = 3
value = S200,6


[state 1042]
type = explod
trigger1 = animelemtime(5) = 2
anim = 7141
pos = 0,0
bindtime = 1
removetime = -2
removeongethit = 0
ownpal = 1
postype = p1
sprpriority = 4
scale = .4,.3

[State 1200, 2]
type = HitDef
trigger1 = !time
attr = S, SA
animtype  = back
damage    = 40,10
sparkno                       = -1+0*(var(33):=8033)**0
sparkxy                       = -20 + 0*(var(35):=75), var(36):=-68 
guard.sparkno           = S8020+(random%2)
guardflag = MA
pausetime = 20,20
hitsound   = S300,2
guardsound = S400,0
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7,-7
air.velocity = -12,-7
fall = 1
fall.recover = 1
p2stateno = 6000
envshake.time           = 13
envshake.freq           = 130
envshake.ampl           = -8
envshake.phase          = 150
getpower		= 100,0
givepower		= 0,90





[state 1200]
type = changestate
trigger1 = animtime = 0 
value = 0
ctrl = 1

;--------------------------------------------------------------------------
;Rising Double Fist
[Statedef 1210]
type		= S
movetype		= A
physics		= S
anim		= 1240
ctrl		= 0
poweradd		= 100
facep2		= 1
hitdefpersist 	= 0
movehitpersist	= 0
hitcountpersist	= 1
sprpriority 	= 3
juggle              = 7



[State 0, PosAdd]
type = velset
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(5) < 0
y = 0
X = 0

[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(5) < 0
value = 1

[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(5) > 0
value = 0

[State 1500, VelSet]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = 15
y = -12


[State 1500, VelSet]
type = Veladd
trigger1 = AnimElemTime(5) >4 
x = -1.82
y =  1.4


[State going to air]
Type 		= StateTypeSet
Trigger1 	= Pos Y < 0
stateType 		= A
movetype                      = A
physics                       = N




[State 0, PlaySnd]
type =  PlaySnd
trigger1 = animelemtime(4) = 2
value = S210,1


[State 0, PlaySnd]
type =  PlaySnd
trigger1 = animelemtime(5) = 0
value = S25,1


[State 0, ]
type = Explod
trigger1 = animelemtime(5) = 0
anim = 8888
ID = 7100
pos = 70,-30
facing = 1
vel = 11.5,-8
scale = .6,.6
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(2) = 2
anim = 7100
ID = 8100
pos = 0,0
facing = 1
scale = .5,.5
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, ]
type                    = HitDef
trigger1                = !time
attr                    = A, SA
damage                  = 45
animtype                = up
guardflag               = MAF
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 8, 12
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = -13 + 0*(var(35):=75), var(36):=-60 
guard.sparkno           = S8020+(random%2)
hitsound                = S300, 3
guardsound              = S400, 0
ground.type             = high
ground.slidetime        = 15
ground.hittime          = 15
ground.velocity         = -3.63655, -7.46969
airguard.velocity       = -5, 0
air.type                = High
air.velocity            = -1.63655, -5.96969
air.hittime             = 12
getpower                = 20
givepower		      = 0
Fall                    = 1
yaccel		      = 0.4
envshake.time           = 10
envshake.freq           = 100
envshake.ampl           = -4
envshake.phase          = 10
fall.envshake.time = 5
fall.envshake.freq = 140
fall.envshake.ampl = 2


 

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

;-------------------------------------------------------------------------
;Diving Tyrant - 
[Statedef 1211]
type    = A
physics = N
ctrl = 0
anim = 1241
;velset = 0,0


[State 0, PosAdd]
type = veladd
trigger1 = AnimElemTime(1) > 0
y =  .8

[State 0, PosAdd]
type = velmul
trigger1 = AnimElemTime(1) >2
x =  -.005




[State 1505, ChangeState]
type = ChangeState
trigger1 = animtime && movehit
value = 1212

;----------------------------------------------------------------------------------
;Rising Knee - Light
[Statedef 1212]
type		= A
movetype		= A
physics		= A
anim		= 1245
ctrl		= 0
poweradd		= 100
facep2		= 1
hitdefpersist 	= 0
movehitpersist	= 0
hitcountpersist	= 1
sprpriority 	= 3
juggle              = 0


[State 0, velset]
type = velset
trigger1 = AnimElemTime(1) > 0 
y = -1.3
X = 5.12


[State 1500, VelSet]
type = Veladd
trigger1 = AnimElemTime(1) >1
x = - 3.2
y = 1.5


[State 0, PlaySnd]
type =  PlaySnd
trigger1 = animelemtime(4) = 2
value = S210,1


[State 0, PlaySnd]
type =  PlaySnd
trigger1 = animelemtime(2) = 0
value = S200,6



[State 0, Explod]
type = null; Explod
trigger1 = animelemtime(4) = 2
anim = 8110
ID = 8100
pos = 0,30
facing = 1
scale = .5,.5
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 0, ]
type                    = HitDef
trigger1                = !time
attr                    = A, SA
damage                  = 45
animtype                = up
guardflag               = MAF
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 8, 10
sparkno                 = -1
guard.sparkno           = S8020+(random%2)
sparkxy                 = -12,-70
hitsound                = S300, 4
guardsound              = S400, 0
ground.type             = high
ground.slidetime        = 15
ground.hittime          = 15
ground.velocity         = -1.63655, -5.96969
airguard.velocity       = -5, 0
air.type                = High
air.velocity            = -4.63655, 9.96969
air.hittime             = 12
getpower                = 20
givepower		      = 0
Fall                    = 1
yaccel		      = 0.4
envshake.time           = 10
envshake.freq           = 100
envshake.ampl           = -4
envshake.phase          = 10
fall.envshake.time = 5
fall.envshake.freq = 140
fall.envshake.ampl = 2


[State 210, Hit_Particle.Helper]
type = Helper
trigger1 = movehit = 1 && !numhelper(12000)
name = "Hit Particles"
stateno = 12010
postype = p2
pos = 10,-78
keyctrl = 0
ownpal = 1
id = 12000
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999
size.xscale = 1
size.yscale = 1  

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

;-------------------------------------------------------------------------
;Diving Elbow 
[Statedef 1215]
type                    = A
movetype                = A
physics                 = N
anim                    = 1210
ctrl                    = 0
poweradd                = 45
juggle                  = 4
facep2                  = 0
hitdefpersist           = 1
movehitpersist          = 1
hitcountpersist         = 1
sprpriority             = 2

[State 0: VelSet]
type                    = VelSet
trigger1                = AnimElemtime(1) = 0
x                       = 0
y                       = 0


[State 0: VelSet]
type                    = VelSet
trigger1                = AnimElemtime(3) = 0 
x                       = 10
y                       = 10



[State 0: VelSet]
type                    =null; VelSet
trigger1                = Movecontact && animelemtime(3) > 2
x                       = -2
y                       = -7




[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = AnimElemtime(3) = 1
value                   = S900, 0

[State 0, ]
type = Explod
trigger1 = animelemtime(3) = 0
anim = 8889
ID = 7100
pos = 50,0
facing = 1
vel = 7.5,8
scale = .6,.6
postype = p1
sprpriority = 5
ownpal = 1
ignorehitpause = 0



;---------------
;Hit Details
;---------------

[State 0, ]
type                    = HitDef
trigger1                = AnimElem = 3
attr                    = A, SA
damage                  = 85
animtype                = Heavy
guardflag               = M
hitflag                 = MAF
priority                = 5, Hit
pausetime               = 8, 10
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = -20 + 0*(var(35):=75), var(36):=-48 
guard.sparkno           = S8020+(random%2)
hitsound                = S300, 6
guardsound              = S400, 0
ground.type             = High
ground.slidetime        = 20
ground.hittime          = 20
ground.velocity         = -8, 8
airguard.velocity       = -3.9,-1
air.type                = low
air.velocity            = -5, 8
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: ChangeState]
type			        = ChangeState
trigger1		        = Pos y >= 0 
value			        = 1216

;-----------------------------------------------------------------------------------
;Diving Shoulder Bash - Land
[Statedef 1216]
type                    = S
movetype                = I
physics                 = S
anim                    = 1216
ctrl                    = 0
poweradd                = 0
juggle                  = 4
facep2                  = 0
hitdefpersist           = 1
movehitpersist          = 1
hitcountpersist         = 1
sprpriority             = 1

[State 0: PosSet]
type			        = PosSet
trigger1		        = !Time
y			            = 0

[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = !Time
ID                      = 8431

[State 0: VelSet]
type                    = VelSet
trigger1                = !time
y                       = 0

[State 0: PlaySnd]
type                    = PlaySnd
trigger1                = !Time
value                   = 1010, 1

[State 0: VelSet]
type                    = VelSet
trigger1                = !time
x                       = 4

[State 0: MakeDust]
type                    = MakeDust
trigger1                = 1
pos                     = 0,0

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

[State 0: ChangeState]
type			        = ChangeState
trigger1		        = !Animtime
value			        = 0
Ctrl                    = 1

;---------------------------------------------------------------------------
;leg shot (Short)
[statedef 1220]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1220
velset = 0,0
hitcountpersist = 1

[state 1220]
type = playsnd
trigger1 = animelem = 4
value = S500,2

[state 1220]
type = helper
trigger1 = animelem = 4
stateno = 1221
keyctrl = 0
ownpal = 0
pos = 80,0
ID = 1221

[state 1220]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;-----------------------------------------------------------------------------------------
;leg shot (Long)
[statedef 1225]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1220
velset = 0,0
hitcountpersist = 1

[state 1220]
type = playsnd
trigger1 = animelem = 4
value = S500,2


[state 1220]
type = helper
trigger1 = animelem = 4
stateno = 1222
keyctrl = 0
ownpal = 0
pos = 160,0
ID = 1222

[state 1220]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;-----------------------------------------------------------------------------------------
;tassle whip
[statedef 1230]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1230
hitcountpersist = 1

[state 1310]
type = playsnd
trigger1 = animelem = 4
value = S200,6

[State 1200, 2]
type = HitDef
trigger1 = !time
attr = S, SA
animtype  = Medium
damage    = 30,10
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = -22- 0*(var(35):=155), var(36):=-45 
guard.sparkno = S8020+(random%2)
guardflag = MA
priority = 3,miss
pausetime = 11,11
hitsound = S300, 3
guardsound = S6,0
ground.type = high
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5
air.velocity = -5,-3
ID = 400
getpower		= 90,0
givepower		= 0,80



[state 1340]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1
;-----------------------------------------------------------
;Grab and Throw (Tassle whip)
[statedef 1233]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1235
velset = 0,0
sprpriority = 0
poweradd = 50

[state 1341]
type = changestate
trigger1 = numtarget = 0 && time > 0 && animelemtime(5) < 0
value = 0
ctrl = 1

[state 1343]
type = playsnd
trigger1 = !time
value = S8,0


[state 1343]
type = playsnd
trigger1 = animelem = 4
value = S210,0

[state 1343]
type = playsnd
trigger1 = animelem = 4
value = S200,6

[state 1341]
type = targetstate
trigger1 = time = 0
value = 820

[state 1341]
type = explod
trigger1 = time = 0
anim = 1238
ID = 6002
removetime = -2
removeongethit = 1
pos = 41,0
ontop = 1

[state 1341]
type = targetbind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
pos = 75,-44

[state 1341]
type = targetbind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
pos = 30,-98

[state 1341]
type = targetbind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
pos = 20,-80

[state 1341]
type = targetbind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
pos = -78,-61

[state 1343]
type = targetlifeadd
trigger1 = animelem = 5
value = -42

[state 1343]
type = targetvelset
trigger1 = animelem = 5
x = 8
y = -4

[state 1343]
type = turn
trigger1 = animtime = 0

[state 1341]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------
; Smash (Tassle whip)
[statedef 1234]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1236
velset = 0,0
sprpriority = 0

[state 1341]
type = targetstate
trigger1 = time = 0
value = 810
ID = 400

[state 1341]
type = targetbind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
pos = 80,0
ID = 400

[state 1341]
type = targetbind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 1
pos = 50,0
ID = 400

[state 1341]
type = changestate
trigger1 = numtarget = 0 && time > 0 && animelemtime(3) < 1
value = 0
ctrl = 1

[state 1341]
type = explod
trigger1 = time = 0
anim = 1239
ID = 6002
removetime = -1
removeongethit = 1
bindtime = 8
pos = 77,-44
ontop = 1



[state 1341]
type = removeexplod
trigger1 = animelem = 3
ID = 6002

[State 1200, 2]
type = HitDef
trigger1 = !time
attr = S, ST
animtype  = up
damage    = 50,10
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = 0 + 0*(var(35):=45), var(36):=-45 
guard.sparkno = S9007
guardflag = MA
pausetime = 8,11
hitsound = S300, 8
guardsound = S6,0
p2stateno = 6000
ground.type = high
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -12,-11
air.velocity = -31,-27
fall = 1
fall.recover = 0
getpower		= 0,0
givepower		= 50,0


[state 1341]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;-----------------------------------
;Buu Drop
[statedef 1240]
type = A
movetype = A
Physics = S
anim = 1040
ctrl = 0
velset = vel X, 0



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



[state 1040]
type = playerpush
trigger1 = time > 5
value = 0

[State 1021, 2]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage    = 40
animtype  = back
hitflag = MAFD
guardflag = MA
pausetime = 0,12
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = -10 + 0*(var(35):=75), var(36):=-45 
hitsound   = S300,5
guardsound = 6,0
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1,-8
air.velocity = -1.3,7
down.velocity = -4,0
down.hittime = 20
fall = 1
getpower = 0
givepower = 45

[state 1040]
type = velset
trigger1 = time = 0
x = vel X
y = 6

[state 1040]
type = velset
trigger1 = movehit
x = vel X
y = -6

[state 1040]
type = gravity
trigger1 = 1

[state 1040]
type = veladd
trigger1 = command = "holdfwd" && command != "holdback" && vel X < 3
x = 0.3

[state 1040]
type = veladd
trigger1 = command != "holdfwd" && command = "holdback" && vel X > -3
x = -0.3

[state 1040]
type = changestate
trigger1 = pos Y>= 0
trigger2 = movehit
value = 1241
;--------------------------------------------------------------------------------------
;Sonic Meteor up
[statedef 1241]
type = A
movetype = A
Physics = A
anim = 1041
ctrl = 0
velset = vel X,0

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

[state 1010]
type = Explod
triggerall = pos y>= 0
trigger1 = !time
anim = 7153
ID = 7153
pos = 0,10
postype = p1
facing = -1
bindtime = 1
removetime = -2
scale = .4,.2
sprpriority = 1
ontop = 1
ignorehitpause = 1
persistent = 0



[state 1041]
type = veladd
trigger1 = command = "holdfwd" && command != "holdback" && vel X < 3
x = 0.3

[state 1041]
type = veladd
trigger1 = command != "holdfwd" && command = "holdback" && vel X > -3
x = -0.3

[State 1021, 2]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage    = 40
animtype  = back
hitflag = MA
guardflag = MA
pausetime = 0,12
sparkxy = 0,-15
sparkno = 1
hitsound   = ifelse(enemy, animexist(7997), 8,5),ifelse(enemy, animexist(7996), 4,3)
guardsound = 6,0
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1,-6
air.velocity = -1.3,-3
down.velocity = -4,0
down.hittime = 20
fall = 1
getpower = ifelse(var(20) > 0, 150, 70),0
givepower = 0,ifelse(var(20) > 0, 500, 70)

[state 1021]
type = playerpush
trigger1 = time >= 0
value = 0



[state 1041]
type = velset
trigger1 = time = 0
x = 0
y = -9

[state 1041]
type = changestate
trigger1 = time > 40
value = 50

;---------------------------------------------------------------------------
; Buu Wheelie
[statedef 1250]
type = S
movetype = A
physics = N
poweradd= 40
ctrl = 0
anim = 1250
velset = 0,0

[State 0, MakeDust]
type = MakeDust
trigger1 = vel X> 0
pos = -10,0
pos2 = -15,-3
spacing = 5

[state 230]
type = turn
trigger1 = prevstateno = 105 && time = 0

[state 240]
type = playsnd
trigger1 =  animelemtime(9) = 0
value = 25,0
channel = 4

[state 240]
type = playsnd
trigger1 =  animelemtime(7) = 0
value = 210,6
channel = 2

[state 240]
type = velset
trigger1 = animelem = 9
x = 15

[state 240]
type = nothitby
trigger1 = animelemtime(9) >= 0
value = SCA

[state 240]
type = playerpush
trigger1 = animelemtime(9) >= 0
value = 0

[State 160]
type =  AfterImage
trigger1 = Time = 0
time = 120
trans = add1
TimeGap  = 1
FrameGap = 2
length = 3
palcolor = 256
PalBright   =   1,  1,  1
PalContrast = 255,255,255
PalAdd      =   0,  0,  0
PalMul      =   1,  1,  1

[State 400, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage    = 70
priority  = 3
animtype  = back
hitflag = MAF
guardflag = MA
pausetime = 0,11
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = -10 + 0*(var(35):=75), var(36):=-45 
guard.sparkno           = S8020+(random%2)  
hitsound   = s300,5
guardsound = s400,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 2,-7
air.velocity = -5,-4
fall = 1
givepower = 0,10

[state 230]
type = changestate
trigger1 = frontedgebodydist <= 2
value = 1251
ctrl = 0

[state 230]
type = changestate
trigger1 = time >= 120
value = 0
ctrl = 1
;---------------------------------------------
;bounce back
[statedef 1251]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 1251

[state 241]
type = playsnd
trigger1 = time = 0
value = F7,2
volume = 255

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = time = 0
time = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 20
freq = 60
ampl = -4
phase = 90

[state 241]
type = statetypeset
trigger1 = pos Y!= 0
statetype = A
physics = A

[state 241]
type = velset
trigger1 = time = 0
x = -2
y = -5

[state 241]
type = changestate
trigger1 = vel Y> 0 && pos Y>= 0
value = 50
ctrl = 1

;--------------------------------------------
;
;Bakuhatsuha Buster (Mid)
[statedef 1252]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1252
velset = 0,0
poweradd = 96
juggle = 2

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

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


[State 0, VarAdd]
type = VarAdd
trigger1 = Anim = 1252 && AnimElemtime(2) = 0
v = 13    ;fv =
value = 2
ignorehitpause = 1
;persistent =



[State 1200,3		dash dust]
type			= explod
triggerall                    = anim = 1252
trigger1		          = animelemtime(4) = 0
Anim 			= 15161
pos 			= 40,0
Id 			= 8100
sprpriority 	          = 1
ontop 		          = 0
removeongethit 	          = 1
removetime 		= -2
scale 		          = .7, .8
SuperMove 		= 1
ownpal 		          = 1
persistent 		= 0

[State 0, Explod]
type = Explod
triggerall = anim = 1252
trigger1 = AnimElemtime(4) = 0
anim = 8510
ID = 8888
pos = 85,-61
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
removetime = 8
bindtime = -1
scale = .40,.35
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1


[State InitVel]
type                    = VelSet
trigger1                 = animelemtime(4) = 0
X                       = 11

[State InitVel]
type                    = VelAdd 
trigger1                = animelemtime(4) > 1
X                       = -.2


[State 1020, Width]
type = Width
trigger1 = Animelem = 4
value = 30,30



[state 1021]
type = playsnd
triggerall = anim = 1252 
trigger1 = animelem = 1
value = 815,0
volume = 255
channel = -1


[state 1021]
type = playsnd
triggerall = anim = 1252 
trigger1 = animelem = 2
value = 210,2
volume = 255



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

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

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



[State 640, 3]
type = HitDef
triggerall = !numtarget(1252)
trigger1 = !time
attr = S, SA
damage    = 55
hitflag = MAF
guardflag = HA
priority = 6,hit ; = 4
pausetime       = 11, 13
sparkno   = -1
guard.sparkno = S8020+(random%2)
sparkxy = 0,-53
hitsound = S300,3
guardsound = S400, Ifelse (Random < 500, 0, Ifelse (Random < 500, 1, 2))
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity         = -2, -9
air.velocity            = -2,-9
getpower = 48,24
givepower = 48,48
Fall                    = 1
Fall.recover            = 0
envshake.time 		= 15
envshake.freq 		= 100
envshake.ampl 		= 4
yaccel		            = 0.4
ID = 1252
p2facing = 1

[State 210, Hit_Particle.Helper]
type = Helper
trigger1 = movehit = 1 && !numhelper(12000)
name = "Hit Particles"
stateno = 12020
postype = p1
pos = floor(p2bodydist X +(15+const(size.ground.front))), -54
keyctrl = 0
ownpal = 1
id = 12000
ignorehitpause = 1
supermovetime  = 9999
pausemovetime  = 9999
size.xscale = 1
size.yscale = 1  




[State 0: ChangeAnim]
type                    = ChangeAnim
trigger1                = AnimElemtime(4) = 13
value                   = 1255

[State InitVel]
type                    = VelSet
trigger1                = Anim = 1255
X                       = 0

[State 0, ]
type                    = ChangeState
triggerall              = command = "QCB_x" || command = "QCB_y" || command = "QCB_z"  
trigger1                = Anim = 1252 && AnimElemtime(4) > 0 &&  EnemyNear, HitShakeOver = 0 && movehit
value                   = 1253
ctrl                    = 0



[State 0, ]
type                    = ChangeState
trigger1                = Anim = 1255 && !AnimTime
value                   = 0
ctrl                    = 1
;-------------------------------------------------------------------------------------------------------------
; ;Bakuhatsuha Buster -(Dash Back)
[Statedef 1253]
type 		= S
movetype		= A
physics		= S
juggle	    	= 1
anim    		= 1242
velset		= 0,0
ctrl		= 0
poweradd		= 0
facep2		= 0
hitdefpersist	= 0
movehitpersist	= 0
hitcountpersist	= 0
sprpriority	= 2

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



[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
x                       = -8


[State 0, ]
type                    = PlaySnd
trigger1                = animelemtime(3) = 1
value                   = 210, 9


[State 0, Helper]
type =  Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Aura Up"
ID = 8000
stateno = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State 0:     PlaySND]
type                    = null;PlaySnd
trigger1                = AnimElemtime(1) = 1
value                   = 700, 0
channel	                = -1


[State 0, ]
type                    = ChangeState
trigger1                = AnimElemtime(5)> 1 && P2bodydist Y > -40
value                   = 1254
ctrl                    = 0

;---------------------------------------------------------------------------
;Bakuhatsuha Buster - Fire
[Statedef 1254]
type 			        = S
movetype		        = A
physics		            = S
juggle	    	        = 1
anim    			    = 1243
velset		            = 0,0
ctrl			        = 0
poweradd		        = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 2

[State 0:     PlaySND]
type                    = null;PlaySnd
trigger1                = AnimElemtime(1) = 2
value                   = 900, 0
channel	                = -1

[State 0:     PlaySND]
type                    = PlaySnd
trigger1                = AnimElemtime(1) = 1
value                   = 210, 6
volume                  = 255

[State 191:		Ki]
type		= helper
trigger1		= animelemtime(1) = 1
stateno 		= 9312
ID 		= 9312
pos 		= 0,0
postype		= p2
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1
size.xscale     = .15
size.yscale     = .15

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

[State 0:     PlaySND]
type                    = null; PlaySnd
trigger1                = AnimElem = 3
value                   = 700, 0
volume                  = 255




[State 0, ]
type                    = null; ChangeState
triggerall              = command = "QCB_x" || command = "QCB_y" || command = "QCB_z" 
trigger1                = AnimElemtime(1)> 5 || AnimElemtime(3)< 5
value                   = 1255
ctrl                    = 0

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

;---------------------------------------------------------------------------
[Statedef 1255,idleness]
type    = S
movetype= I
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
anim = 1256
poweradd = 0
sprpriority = 1

;----------------
; air mechanics
;----------------

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

[State 0, ]
type                    = ChangeState
trigger1              = command = "QCB_x" || command = "QCB_y" || command = "QCB_z"  
value                   = 1253
ctrl                    = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Burn - Ki Lance - Fire
[Statedef 1256]
type 			        = S
movetype		        = A
physics		            = S
juggle	    	        = 1
anim    			    = 1243
velset		            = 0,0
ctrl			        = 0
poweradd		        = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 2

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

[State 0:     PlaySND]
type                    = PlaySnd
trigger1                = AnimElem = 1
value                   = 210, 12
volume                  = 255

[State 191:		Ki]
type		= helper
trigger1		= animelemtime(1) = 1
stateno 		= 9313
ID 		= 9313
pos 		= 0,0
postype		= p2
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1
size.xscale     = .15
size.yscale     = .15

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


[State 0:     PlaySND]
type                    = PlaySnd
trigger1                = AnimElem = 3
value                   = 700, 0
volume                  = 255

[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = AnimElem = 3
ID                      = 7011


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

;---------------------------------------------------------------------------
; SB - Ki Lance
[Statedef 1257]
type 			        = S
movetype		        = A
physics		            = S
juggle	    	        = 1
anim    			    = 1240
velset		            = 0,0
ctrl			        = 0
poweradd		        = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 2

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

[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = !Time
ID                      = 7031

[State 0: VelSet]
type                    = VelSet
trigger1                = !Time
x                       = -5

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

[State 0, ]
type                    = PlaySnd
trigger1                = AnimElem = 7
value                   = 101, 0

[State 0: Pause]
type                    = Pause
triggerall              = AnimElem = 7,<  0
trigger1                = gametime%2 = 0
time                    = 1
movetime                = 1



[State 0, Helper]
type =  Helper
triggerall = prevstateno !=1256
trigger1 = time = 0
helpertype = normal ;player
name = "Aura Up"
ID = 8000
stateno = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999



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



[State 0, ]
type                    = ChangeState
trigger1                = AnimElemtime(6)> 6 && P2bodydist Y > -70
value                   = 1258
ctrl                    = 0

;---------------------------------------------------------------------------
; Burn - Ki Lance - Fire
[Statedef 1258]
type 			        = S
movetype		        = A
physics		            = S
juggle	    	        = 1
anim    			    = 1241
velset		            = 0,0
ctrl			        = 0
poweradd		        = 0
facep2		            = 0
hitdefpersist	        = 0
movehitpersist	        = 0
hitcountpersist	        = 0
sprpriority		        = 2

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

[State 0:     PlaySND]
type                    = PlaySnd
trigger1                = AnimElem = 1
value                   = 210, 12
volume                  = 255

[State 191:		Ki]
type		= helper
trigger1		= animelemtime(1) = 1
stateno 		= 9313
ID 		= 9313
pos 		= 0,0
postype		= p2
ownpal 		= 1
keyctrl		= 0
pausemovetime 	= 99
ignorehitpause	= 1
size.xscale     = .15
size.yscale     = .15

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



[State 0:     PlaySND]
type                    = PlaySnd
trigger1                = AnimElem = 3
value                   = 700, 0
volume                  = 255

[State 0: RemoveExplod]
type                    = RemoveExplod
trigger1                = AnimElem = 3
ID                      = 7011

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

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

;Air Raid - Jump
[Statedef 1260]
type		= S
movetype		= A
physics		= S
anim		= 1260
ctrl		= 0
poweradd		= 0
juggle		= 2
facep2		= 1
hitdefpersist	= 1
movehitpersist	= 1
hitcountpersist	= 1
sprpriority		= 2

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

[State 40, PlaySnd]
type = PlaySnd
trigger1 = Time = 1 && prevstateno!= 54
value = S20, 1

[State 40, ]
type = Explod
trigger1 = time=0 && (prevstateno!= 54) && (prevstateno!= 40)
anim = 8110
ID = 8110
pos = 0,0
postype = p1
facing = -1
bindtime = 1
;vel = 2,0
;scale=.7,.7
removetime = -2
sprpriority = 10
ownpal = 1


[State 1050:	Posadd Too Close to Wall]
type			= Posadd
trigger1		= time = 0 && backedgebodydist < 10
x			= 4

[State 1050:	Velset Enemy Close]
type			= Velset
trigger1		= time = 0 && p2bodydist x <= 20
x			= 2
y			= -10.888

[State 1050:	Velset Enemy CloseMid]
type			= Velset
trigger1		= time = 0 && (p2bodydist x > 20) && (p2bodydist x <= 60)
x			= 4
y			= -10.888

[State 1050:	Velset Enemy Mid]
type			= Velset
trigger1		= time = 0 && (p2bodydist x > 60) && (p2bodydist x <= 100)
x			= 6
y			= -10.888

[State 1050:	Velset Enemy MidFar]
type			= Velset
trigger1		= time = 0 && (p2bodydist x > 100) && (p2bodydist x <= 140)
x			= 8
y			= -10.8888

[State 1050:	Velset Enemy Far]
type			= Velset
trigger1		= time = 0 && (p2bodydist x > 140) && (p2bodydist x <= 180)
x			= 10
y			= -10.888

[State 1050:	Velset Enemy FarL]
type			= Velset
trigger1		= time = 0 && (p2bodydist x > 180) && (p2bodydist x <= 220)
x			= 12
y			= -10.8888

[State 1050:	Velset Enemy FarXL]
type			= Velset
trigger1		= time = 0 && (p2bodydist x > 220) && (p2bodydist x <= 260)
x			= 14
y			= -10.8888

[State 1050:	Changetoair]
type			= Statetypeset
trigger1		= time = 1
physics		= A

[State 1050:	End]
type			= Changestate
trigger1		= p2dist x < 10.777
value			= 1261

;------------------------------------------------------------------------------------------
;Air Raid - Shoot
[Statedef 1261]
type		= A
movetype		= A
physics		= N
anim		= 1261
ctrl		= 0
poweradd		= 0
juggle		= 2
facep2		= 0
hitdefpersist	= 1
movehitpersist	= 1
hitcountpersist	= 1
sprpriority	= 3

[State 1051:	Velset]
type			= Velset
trigger1		= time = 0
x			= 0
y			= 0

[State 1051:	Voice]
type			= PlaySND
trigger1		= Animelem = 2
value			= S210,4

[State 1051:	Shot1]
type			= PlaySND
trigger1		= Animelem = 2
value			= S1610,0
volume		= 100


;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
triggerall = Anim = 1261
trigger1 = (time%5)=0
time = 5
add = 50,50,150
mul = 300,300,300
sinadd = 50,50,150,10
invertall = 0
color = 256
;ignorehitpause = 0
;persistent = 1

[State 1051:	Ball charge ]
type		= Helper
trigger1		= Animelem = 1
helpertype 	= Normal
pos		= -2,-8
facing 		= 1
stateno 		= 1400
ID 		= 6051
keyctrl 		= 0
ownpal 		= 1
supermovetime 	= 200
pausemovetime 	= 200



[State 1051:	Ball]
type		= Helper
trigger1		= Animelem = 2
helpertype 	= Normal
pos		= -2,-8
facing 		= 1
stateno 		= 9050
ID 		= 6051
keyctrl 		= 0
ownpal 		= 1
supermovetime 	= 200
pausemovetime 	= 200
size.xscale         = .5      
size.yscale         = .5


[State 40, ]
type = Explod
trigger1 = animelem = 1
anim = 8520
ID = 8520
pos = 3,-45
postype = p1
facing = 1
bindtime = 1
;vel = 2,0
scale=.9,.8
removetime = -2
sprpriority = 1
ownpal = 1



[State 1051:	End]
type			= Changestate
trigger1		= !animtime
value			= 1262

;------------------------------------------------------------------------------------------
;Air Raid - Fall
[Statedef 1262]
type			= A
movetype		= I
physics		= A
anim			= 1262
ctrl			= 0
poweradd		= 0
juggle		= 4
velset		= 0,0
facep2		= 0
hitdefpersist	= 1
movehitpersist	= 1
hitcountpersist	= 1
sprpriority		= 2

[State 1052:	Turn]
type			= Turn
trigger1		= time = 2 && p2dist x < 0

[State 1052:	Move]
type			= velset
trigger1		= time = 0
x			= 4

[State 1052:	Reset]
type			= Varset
trigger1		= time = 0
v			= 18
value			= 0

[State 1052:	Reset]
type			= Varset
trigger1		= time = 1
v			= 19
value			= 0

[State 1052:	End]
type			= Changestate
trigger1		= !animtime
value			= 50
ctrl			= 1
;-------------------------------------------------------------------------
;Kneel! 
[StateDef 1500]
type = A
movetype= A
physics = N
juggle = 0
velset = 0,0
ctrl = 0
anim = 1500
poweradd = 30
sprpriority = 2

[State 0, Helper]
type =null;  Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Aura Up"
ID = 8000
stateno = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State 0, PalFX]
type = PalFX
trigger1 = AnimElemtime(2) = 1
time = 10
add = 128,128,128
mul = 356,356,356
sinadd = -128,-128,-128,40




[State 0, PosAdd]
type = velset
trigger1 = AnimElemTime(1) > 0 && AnimElemtime(2)< 0
y = 0
X = 0
;ignorehitpause = 
;persistent = 


[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(2) < 0
value = 1

[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(2) > 0
value = 0


[State 0, VelSet]
type = VelSet
trigger1 = AnimElemtime(2) = 0
y = -.4

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

[State 0, ]
type = PlaySnd
trigger1 = animelemtime(2) && random < 500
value = 210,12
volume = 255
channel = -1
persistent = 0

[State 1051:	Shot1]
type			= PlaySND
trigger1		= Animelemtime(2) = 1
value			= S3003,1
volume		= 100


[State 1051:	Ball charge ]
type		= Helper
trigger1		= Animelemtime(1) = 0
helpertype 	= Normal
pos		= -2,-8
facing 		= 1
stateno 		= 1400
ID 		= 6051
keyctrl 		= 0
ownpal 		= 1
supermovetime 	= 200
pausemovetime 	= 200



[State 1051:	Ball]
type		= Helper
trigger1		= Animelemtime(2) = 0
helpertype 	= Normal
pos		= 0,-8
facing 		= 1
stateno 		= 9050
ID 		= 9050
keyctrl 		= 0
ownpal 		= 1
supermovetime 	= 200
pausemovetime 	= 200
size.xscale         = .6    
size.yscale         = .5


[State 40, ]
type = null; Explod
trigger1 = animelemtime(1) = 0
anim = 8520
ID = 8520
pos = -5,-45
postype = p1
facing = 1
bindtime = 1
;vel = 2,0
scale=.9,.8
removetime = 12
sprpriority = 1
ownpal = 1




[State 1500, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 50
ctrl = 0
;--------------------------------------------------------------------------
;Bow 
[StateDef 1501]
type = A
movetype= A
physics = N
juggle = 0
velset = 0,0
ctrl = 0
anim = 1501
poweradd = 30
sprpriority = 2

[State 0, PalFX]
type = PalFX
trigger1 = AnimElemtime(2) = 1
time = 10
add = 128,128,128
mul = 356,356,356
sinadd = -128,-128,-128,40

[State 0, Helper]
type = null;  Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Aura Up"
ID = 8000
stateno = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999




[State 0, PosAdd]
type = velset
trigger1 = AnimElemTime(1) > 0 && AnimElemtime(3)< 5
y = 0
X = 0
;ignorehitpause = 
;persistent = 


[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(3) < 5
value = 1

[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(3) > 5
value = 0


[State 0, VelSet]
type = VelSet
trigger1 = AnimElemtime(3) = 5
y = -.4

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemtime(3)>= 12
y = 2.9

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

[State 0, ]
type = PlaySnd
trigger1 = animelemtime(3) && random < 500
value = 210,4
volume = 255
channel = -1
persistent = 0

[State 1051:	Shot1]
type			= PlaySND
trigger1		= Animelemtime(3) = 1
value			= S3003,1
volume		= 100


[State 1051:	Ball charge ]
type		= Helper
trigger1		= Animelemtime(1) = 0
helpertype 	= Normal
pos		= -2,-18
facing 		= 1
stateno 		= 1400
ID 		= 6051
keyctrl 		= 0
ownpal 		= 1
supermovetime 	= 200
pausemovetime 	= 200



[State 1051:	Ball]
type		= Helper
trigger1		= Animelemtime(3) = 0
helpertype 	= Normal
pos		= 20,-62
facing 		= 1
stateno 		= 9052
ID 		= 9052
keyctrl 		= 0
ownpal 		= 1
supermovetime 	= 200
pausemovetime 	= 200
size.xscale         = .6    
size.yscale         = .5


[State 40, ]
type = null; Explod
trigger1 = animelemtime(1) = 0
anim = 8520
ID = 8520
pos = -5,-45
postype = p1
facing = 1
bindtime = 1
;vel = 2,0
scale=.7,.9
removetime = 8
sprpriority = 1
ownpal = 1

[State 1500, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 50
ctrl = 1
;--------------------------------------------------------------------------
;Submit!
[StateDef 1502]
type = A
movetype= A
physics = N
juggle = 0
velset = 0,0
ctrl = 0
anim = 1502
poweradd = 30
sprpriority = 2

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


[State 0, Helper]
type = null;  Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Aura Up"
ID = 8000
stateno = 8000
pos = ifelse(random>500,3,ifelse(random>500,-5,15)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999



[State 0, PosAdd]
type = velset
trigger1 = AnimElemTime(1) > 0 && AnimElemtime(4)< 0
y = 0
X = 0
;ignorehitpause = 
;persistent = 


[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(4) < 0
value = 1

[State 1500, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(4) > 0
value = 0




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

[State 0, ]
type = PlaySnd
trigger1 = animelemtime(4) && random < 500
value = 210,5
volume = 255
channel = -1
persistent = 0

[State 1051:	Shot1]
type			= PlaySND
trigger1		= Animelemtime(4) = 1
value			= S3003,1
volume		= 100






[State 1051:	Ball]
type		= Helper
trigger1		= Animelemtime(4) = 0
helpertype 	= Normal
pos		= 45,-71
facing 		= 1
stateno 		= 9053
ID 		= 9053
keyctrl 		= 0
ownpal 		= 1
supermovetime 	= 200
pausemovetime 	= 200
size.xscale         = .6    
size.yscale         = .5







[State 1500, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 50
ctrl = 1
;--------------------------------------------------------------------------
;Sayajin Dive Heavy - multi hits
[StateDef 1504]
type = A
movetype= A
physics = N
juggle = 2
velset = 0,0
ctrl = 0
anim = 1504
poweradd = 0;30
sprpriority = 2


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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2 || animelem = 4 || animelem = 6
value = S200,3





[State 0, ]
type = AfterImage
trigger1 = AnimElem = 1
time = 35
length = 6
palbright = 10,10,10
palcontrast = 120,120,120
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 2
trans = Add

[State 0, ]
type = HitDef
trigger1 = AnimElem = 2  || AnimElem = 4
attr = A, NA
damage = 15, 8
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2, 16
sparkno = S8030+(random%5)
guard.sparkno = S8022+(random%2)
sparkxy = -10, 0
hitsound = S300, 4
guardsound = S400,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 35
ground.velocity = 0
air.type = Low
air.hittime = 35
air.velocity = 0,0
airguard.velocity = -4,0
getpower = 0;30

[State 0, ]
type = HitDef
trigger1 = AnimElem = 6
attr = A, NA
damage = 35, 9
animtype = Hard
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 10, 16
sparkno = S7034
guard.sparkno = S8022+(random%2)
sparkxy = -14, -17
hitsound = S1010, 0
guardsound = S400,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 35
ground.velocity = -9,12
air.type = Low
air.hittime = 35
p1stateno = 1506
air.velocity = -9,5
Fall = 1
airguard.velocity = -4,0
getpower = 0;30

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

[State 0, ]
type = ChangeState
trigger1 = AnimElem = 6,>=4 
value = 1506
ctrl = 0
;------------------------------------------------------------------------
;Sayajin Dive 2 Leap 
[StateDef 1505]
type = A
movetype= A
physics = A
juggle = 0
velset = 5,-8
ctrl = 0
anim = 42
poweradd = 0;00
sprpriority = 2


[State 0, CtrlSet]
type = CtrlSet
trigger1 = time = 30
value = 1
persistent = 0

[State 0, Turn]
type = Turn
trigger1 = P2BodyDist X < 10
persistent = 0

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -5
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 0, ]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y >= 0)
value = 52
ctrl = 0
;--------------------------------------------------------------------------
;Sayajin Dive Launch leap back
[StateDef 1506]
type = A
movetype= A
physics = A
juggle = 0
velset = -3,-5
ctrl = 0
anim = 43
poweradd = 0;0
sprpriority = 2

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -5
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 0, ]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y >= 0)
value = 52
ctrl = 0
;-------------------------------------------------------------------------
;ki blast weak
[StateDef 1300]
type = S
movetype= A
physics = N
juggle = 6
velset = 0,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 = 70,-65
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 = 59,-63
postype = p1
facing = 1
ownpal = 1
size.xscale = .15
size.yscale = .15





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

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Power > 0 && command = "b" && var(13) < 7
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)

;--------------------------------------------------------------------------
;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 = 8112
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 = 2002
poweradd = 0;0
sprpriority = 2




;[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 = 8110
ID =   8110
pos = 0,0
facing = -1
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 = [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, Explod]
type = null;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 = 15

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

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

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



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

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

[State 1701, RumbleSND]
type = null; PlaySnd
triggerall = power>=4000
trigger1 = TimeMod = 24,0
value = 1701,0

[state 1701, ColorFX]
type = PalFX
trigger1 = Time > 0
trigger1 = TimeMod = 9,0
time = 2
add = 64,64,64

[State 800,3]
type		=null; EnvShake
triggerall      = power >= 4000
trigger1        = (TimeMod = 10, 0)
time 	        = 10
freq 	        = 70
ampl 	        = 7

[State 0:		Helper]
type			        =null; 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			        =null; 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			        = null; 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: Helper]
type                    = null; Helper
Triggerall              = Power >= 4000 
trigger1                = ((GameTime%90) = 0)
helpertype              = normal
ID                      = 8008
;pos                     = 0,0
postype                 = Front
facing                  = IfElse (Random <500, -1, 1)
stateno                 = 8008
ownpal                  = 1
pausemovetime           = 9999




[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "gauge"
ID =  901
stateno = 901
pos = 0,0
postype = p1   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =0.55*const(size.xscale)
size.yscale =.34*const(size.yscale)



[State 0, Helper]
type =  Helper
trigger1 = !time
helpertype = normal ;player
name = "gauge"
ID =  902
stateno = 902
pos = 0,0
postype = p1   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =0.24*const(size.xscale)
size.yscale =.10*const(size.yscale)

[State 0, Helper]
type =  Helper
trigger1 = !time
helpertype = normal ;player
name = "gauge"
ID =  903
stateno = 903
pos = 0,0
postype = p1   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =.32*const(size.xscale)
size.yscale =.42*const(size.yscale)





[State 0, ChangeState]
type = ChangeState
triggerall = time > 20
trigger1 = (command != "holdx") ||  (command != "holdy")
Value = 0
ctrl = 1

;--------------------------------------------------------------------------
;Zanzoken - Start
[StateDef 2100]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 100
poweradd = -250
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, Pause]
type = Pause
trigger1 = Prevstateno = [130,151]
time = 25
movetime = 25

[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 = 2100,1
volume = 255
channel = 1

[State 0, ]
type = PlaySnd
trigger1 = animelem = 2
value = 200,3
volume = 255
channel = 1

[State 0, ]
type = PlaySnd
trigger1 = !time && random < 800
value = 4,16
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 = MAFD
priority = 3, Hit
pausetime = 15, 15
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = 20 + 0*(var(35):=75), var(36):=-48 
guard.sparkno = S8020+(random%2)
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 = 2100,3
volume = 255
channel = 1

[State 0, ]
type = PlaySnd
trigger1 = animelem = 2
value = 200,4
volume = 255
channel = 1


[State 0, ]
type = PlaySnd
trigger1 = !time && random < 800
value = 4,16
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 = MAFD
priority = 3, Hit
pausetime = 15, 15
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = 20 + 0*(var(35):=75), var(36):=-48 
guard.sparkno = S8020+(random%2)
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 = 2100,2
volume = 255
channel = 1

[State 0, ]
type = PlaySnd
trigger1 = !time && random < 800
value = 4,16
volume = 255
channel = 2

[State 0, ]
type = PlaySnd
trigger1 = animelem = 2
value = 200,5
volume = 255
channel = 1


[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 = MAFD
priority = 3, Hit
pausetime = 8, 15
sparkno                 = -1+0*(var(33):=8033)**0
sparkxy                 = 20 + 0*(var(35):=75), var(36):=-48 
guard.sparkno = S8020+(random%2)
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 = 120
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 = 0
velset = 0,-3
ctrl = 1
anim = 2105
poweradd = 0;0
sprpriority = 2

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

[State 0, ChangeState]
type = ChangeState
trigger1 = movetype = H 
value = 50
ctrl = 1


[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
