;-------------------------------------------------------------
;CNS file for Gohan HD (from SNES,"Dragon Ball Z HD") 
;Made by MugenGuy & Redspider for Mugen 04.14.01
;-------------------------------------------------------------

;Constant file for Gohan HD:
;Contains all the states needed for the character.
;-------------------------------------------------------------

[Data]
life 			= 1000          ;Amount of life to start with
attack 		= 100         ;100% attack power (more is stronger)
defence 		= 120        ;100% defensive power (more is stronger)
power 		= 6000
fall.defence_up 	= 50 ;Def goes up by 50% everytime player is hit on ground
liedown.time 	= 60    ;Time player takes before getting up from HIT_LIEDOWN
airjuggle 		= 15       ;Can do 15 points of juggling
sparkno 		= 2        ;Default spark number
guard.sparkno 	= 40 ;Default guard spark number
KO.echo 		= 1          ;1 to enable echo on KO
volume 		= 255          ;Volume offset (negative for softer)

[Size]
xscale 		= 1.2           ;Horizontal scaling factor.
yscale 		= 1.4           ;Vertical scaling factor.
ground.back 	= 15     ;Player width (back, ground)
ground.front 	= 15    ;Player width (front, ground)
air.back 		= 12        ;Player width (back, air)
air.front 		= 12       ;Player width (front, air)
z.width 		= 3          ;Player width (into and out)
height 		= 60	     ;Height of player (for opponent to jump over)
attack.width 	= 4,4   ;Default attack width: back, front
attack.dist 	= 160    ;Default attack distance
proj.attack.dist 	= 90 ;Default attack distance for projectiles
proj.doscale 	= 0     ;Set to 1 to scale projectiles too   

[Velocity]
walk.fwd 		= 2.3      ;Walk forward
walk.back 		= -2.2     ;Walk backward
run.fwd  		= 4.6, 0    ;Run forward (x, y)  - if y<0, player will hop
run.back 		= -4.5, 0 ;Run backward (x, y) - if y=0, player will run
jump.neu 		= 0,-8.1    ;Neutral jumping velocity (x, y)
jump.back 		= -2.55    ;Jump back Speed (x, y)
jump.fwd 		= 2.5       ;Jump forward Speed (x, y)
runjump.back 	= -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd		= 4,-8.1      ;.
airjump.neu 	= 0,-8.1      ;.
airjump.back	= -2.55,-8.1 ;Air jump speeds (opt)
airjump.fwd 	= 2.5,-8.1    ;.

[Movement]
airjump.num 	= 1      ;Number of air jumps allowed (opt)
airjump.height 	= 35  ;Minimum distance from ground before you can air jump (opt)
yaccel 		= .41        ;Vertical acceleration
stand.friction 	= .85  ;Friction coefficient when standing
crouch.friction 	= .82 ;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 5300
velset = 0,0,0

[State 170: 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 170: 2]
type = playsnd
trigger1 = time = 0
value = 170, 0

;---------------------------------------------------------------------------
; INTRO
;[Statedef 191]
;type = S
;ctrl = 0
;anim = 190
;velset = 0,0,0

;[State 191: 1] ;Freeze animation until PreIntro is over
;type = ChangeAnim
;trigger1 = RoundState = 0
;value = 190

;[State 191: 2] ;Assert this until you want "round 1, fight" to begin
;type = AssertSpecial
;trigger1 = time = [0, 200]
;flag = Intro

;[State 191: 3]
;type = powerset
;trigger1 = time = 0
;value = 500

;[State 190: 1] ;If opponent is Gohan
;type = ChangeState
;trigger1 = time = 0
;value = 192

;INTRO
;[Statedef 192]
;type = S
;ctrl = 0
;anim = 190
;velset = 0,0,0

;[State 192: 1] ;Freeze animation until PreIntro is over
;type = ChangeAnim
;trigger1 = RoundState = 0
;value = 190

;[State 192: 2] ;Assert this until you want "round 1, fight" to begin
;type = AssertSpecial
;trigger1 = time = [0, 600]
;flag = Intro

;[State 192: 4]
;type = explod
;trigger1 = time = 345
;anim = 191
;ID = 191
;postype = left
;pos = 0,50
;sprpriority = 3
;removetime = -2
;ownpal = 1
;facing = 1

;[State 192, 3]
;type = changestate
;trigger1 = time = 10
;value = 0
;ctrl = 0

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

;====================
;====Basic Attack====
;====================

;---------------------------------------------------------------------------
; STAND_A
[Statedef 200]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)

[State 200: 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 200

[State 200: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3200

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200, After Image]
type 			= AfterImage
trigger1 		= Time = 0
time 			= 13
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 200: 2]
type = playsnd
trigger1 = time = 0
value = 200,0

[State 200: Normal Hit]
type = HitDef
trigger1 = (Var(1) = 0) && (AnimElem = 2)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Light
;air.animtype = Light
damage = 4,1
pausetime = 3,6
sparkno = -1
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -2,0
air.velocity = -2,0
airguard.velocity = -2,-1
fall = 0
air.fall = 0
envshake.time = 10
envshake.freq = 60
envshake.ampl = -2

[State 200: SSj Hit]
type = HitDef
trigger1 = (Var(1) = 1) && (AnimElem = 2)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Light
air.animtype = Light
damage = 5,2
pausetime = 4,7
sparkno = 1
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -2,0
air.velocity = -2,-1
airguard.velocity = -3,-1
fall = 0
air.fall = 0
envshake.time = 13
envshake.freq = 60
envshake.ampl = -5

[State 200: SSj2 Hit]
type = HitDef
trigger1 = (Var(1) = 2) && (Animelem = 2)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Light
air.animtype = Light
damage = 6,3
pausetime = 5,8
sparkno = 3
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -3,0
air.velocity = -3,-1
airguard.velocity = -4,-1
fall = 0
air.fall = 0
envshake.time = 17
envshake.freq = 60
envshake.ampl = -6

[State 200: 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; STAND_B
[Statedef 201]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0,0

[State 201: 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 201

[State 201: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3201

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200: After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 14
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 210: 2]
type = playsnd
trigger1 = time = 0
value = 200,0

[State 201: Normal Hit]
type = HitDef
trigger1 = (Var(1) = 0) && (AnimElem = 3)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Medium
air.animtype = Medium
damage = 5,2
pausetime = 4,7
sparkno = S900
guard.sparkno = 1
sparkxy = 27,-68
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -3,0
air.velocity = -3,-1
airguard.velocity = -4,-1
fall = 0
air.fall = 0
envshake.time = 7
envshake.freq = 60
envshake.ampl = -4

[State 201: SSj Hit]
type = HitDef
trigger1 = (Var(1) = 1) && (AnimElem = 3)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Medium
air.animtype = Medium
damage = 6,3
pausetime = 5,8
sparkno =  S900
guard.sparkno = 2
sparkxy = 27,-68
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -3,0
air.velocity = -3,-1
airguard.velocity = -4,-1
fall = 0
air.fall = 0
envshake.time = 15
envshake.freq = 60
envshake.ampl = -5

[State 201: SSj2 Hit]
type = HitDef
trigger1 = (Var(1) = 2) && (AnimElem = 3)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Medium
air.animtype = Medium
damage = 7,4
pausetime = 6,10
sparkno =  S900
guard.sparkno = 3
sparkxy = 27,-68
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -4,0
air.velocity = -4,-1
airguard.velocity = -5,-1
fall = 0
air.fall = 0
envshake.time = 19
envshake.freq = 60
envshake.ampl = -6

[State 210: 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; STAND_C
[Statedef 202]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0,0

[State 202: 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 202

[State 202: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3202

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200, After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 14
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 210: 2]
type = playsnd
trigger1 = time = 0
value = 200,0

[State 202: Normal Hit]
type = HitDef
trigger1 = (Var(1) = 0) && ((AnimElem = 2) || (AnimElem = 3))
attr = S, NA
animtype  = Hard
damage    = 3, 1
guardflag = MA
hitflag   = MAF
pausetime = 6,11
sparkno = 3
guard.sparkno = 2
sparkxy = 0,-55
hitsound   = S210,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4
air.velocity = -4,0
fall = 0
air.fall = 0
envshake.time = 15
envshake.freq = 55
envshake.ampl = -6

[State 202: SSj Hit]
type = HitDef
trigger1 = (Var(1) = 1) && ((AnimElem = 2) || (AnimElem = 3))
attr = S, NA
animtype  = Hard
damage    = 4, 3
guardflag = MA
hitflag   = MAF
pausetime = 6,12
sparkno = 3
guard.sparkno = 2
sparkxy = 0,-55
hitsound   = S210,1
guardsound = S6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
ground.velocity = -4
air.velocity = -4,0
fall = 0
air.fall = 0
envshake.time = 20
envshake.freq = 65
envshake.ampl = -8

[State 202: SSj2 Hit]
type = HitDef
trigger1 = (Var(1) = 2) && ((AnimElem = 2) || (AnimElem = 3))
attr = S, NA
animtype  = Hard
damage    = 5, 3
guardflag = MA
hitflag   = MAF
pausetime = 6,12
sparkno = S900
guard.sparkno = 3
sparkxy = 0,-55
hitsound   = S210,1
guardsound = S6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
ground.velocity = -4
air.velocity = -4,0
fall = 0
air.fall = 0
envshake.time = 20
envshake.freq = 65
envshake.ampl = -8

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

;---------------------------------------------------------------------------
; STAND_X
[Statedef 210]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)

[State 210, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (time = 0)
value = 210

[State 210, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3210

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200, After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 15
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 210: 2]
type = playsnd
trigger1 = time = 0
value = 210,0

[State 210: Normal Hit]
type = HitDef
trigger1 = (Var(1) = 0) && (AnimElem = 3)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Light
air.animtype = Light
damage = 5,2
pausetime = 5,10
sparkno = 3
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S210, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -3,0
air.velocity = -3,0
airguard.velocity = -5,0
fall = 0
air.fall = 0
envshake.time = 0
envshake.freq = 0
envshake.ampl = 0
              
[State 210: Normal Hit]
type = HitDef
trigger1 = (Var(1) = 1) && (AnimElem = 3)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Light
air.animtype = Light
damage = 6,3
pausetime = 6,14
sparkno = 3
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S210, 1 
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -3,0
air.velocity = -3,0
airguard.velocity = -5,0
fall = 0
air.fall = 0
envshake.time = 10
envshake.freq = 60
envshake.ampl = -2

[State 210: Normal Hit]
type = HitDef
trigger1 = (Var(1) = 2) && (AnimElem = 3)
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Light
air.animtype = Light
damage = 7,3
pausetime = 5,10
sparkno = 3
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S210, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -3,0
air.velocity = -3,0
airguard.velocity = -5,0
fall = 0
air.fall = 0
envshake.time = 11
envshake.freq = 60
envshake.ampl = -3

[State 210: End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 210: Rapid Fire Kick]
type = changestate
trigger1 = time = [6,16]
trigger1 = command = "x"
value = 3214
;---------------------------------------------------------------------------
; STAND_Y
[Statedef 211]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0,0

[State 211, 1]
type = changeanim
trigger1 = (Var(1) = 0)&& (Time = 0)
value = 211

[State 215, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3211

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200, After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 23
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 210, 2]
type = playsnd
trigger1 = time = 0
value = 210,0

[State 215, 2]
type = HitDef
trigger1 = (Var(1) = 0) && (AnimElem = 3)
attr = S, NA
animtype  = Medium
damage    = 6, 3
guardflag = MA
hitflag	= MAF
pausetime = 6, 11
sparkno = S950
guard.sparkno = S2
sparkxy = 58,-76
hitsound   = S210,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5,3
envshake.time = 11
envshake.freq = 55
envshake.ampl = -3

[State 215, 2]
type = HitDef
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (AnimElem = 3)
attr = S, NA
animtype  = Medium
damage    = 6, 4
guardflag = MA
hitflag   = MAF
pausetime = 2,5
sparkno = S950
guard.sparkno = S2
sparkxy = 58,-76
hitsound   = S210,1
guardsound = S6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
ground.velocity = -5
air.velocity = -5,3
envshake.time = 14
envshake.freq = 61
envshake.ampl = -5

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

[State 211, quad kick]
type = changestate
trigger1 = time = [8,20]
trigger1 = command = "y"
value = 3214
;---------------------------------------------------------------------------
; Quad Kick
[Statedef 	3214]
type    	= S
movetype	= A
physics 	= S
ctrl 		= 0
velset 	    = 0,0,0
anim        = 214

[State 		3214, 1]
type 			= changeanim
trigger1 		= ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value 		= 3214

[State 		3214, After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 23
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 	3214: 2]
type 		= playsnd
trigger1 	= time = 0
value 	= 210,0

[State 3214: Kicks]
type = HitDef
trigger1 = ((AnimElem = 1) || (AnimElem = 2))
trigger2 = ((AnimElem = 3) || (AnimElem = 4))
attr = S, NA
animtype  = Medium
damage    = 3, 1
guardflag = MA
hitflag   = MAF
pausetime = 2,5
sparkno = 2
guard.sparkno = 2
sparkxy = 0,-55
hitsound   = S210,1
guardsound = S6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
ground.velocity = -5
air.velocity = -5,3
envshake.time = 14
envshake.freq = 61
envshake.ampl = -5

[State 3214: 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;CROUCH_B
[Statedef 410]
type    = C
movetype= A
physics = C
ctrl = 1

[State 410, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 410

[State 410, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3410

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200, After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 15
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 410: 2]
type = playsnd
trigger1 = time = 0
value = 210,0

[State 410: Normal Kick]
type = HitDef
trigger1 = (Var(1) = 0) && (AnimElem = 2)
attr = C, NA
damage    = 5, 2
animtype  = Light
gaurdflag = MA
hitflag = MAF
guardflag = L
pausetime = 5,7
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-43
hitsound   = S200,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -3,-6
air.velocity = -3,-6

[State 410: SSj Kick]
type = HitDef
trigger1 = (Var(1) = 1) && (AnimElem = 2)
attr = C, NA
damage    = 6, 2
animtype  = Light
gaurdflag = MA
hitflag = MAF
guardflag = L
pausetime = 5,7
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-43
hitsound   = S200,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -3,-6
air.velocity = -3,-6

[State 410: SSj2 Kick]
type = HitDef
trigger1 = (Var(1) = 2) && (AnimElem = 2)
attr = C, NA
damage    = 7, 3
animtype  = Light
gaurdflag = MA
hitflag = MAF
guardflag = L
pausetime = 5,7
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-43
hitsound   = S200,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -3,-6
air.velocity = -3,-6

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

;---------------------------------------------------------------------------
;JUMP_A
[Statedef 600]
type    = A
movetype= A
physics = A
ctrl = 0

[State 600, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 600

[State 600, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3600

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200, After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 10
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 200: 2]
type = playsnd
trigger1 = time = 0
value = 200,0

[State 600, 2]
type = HitDef
trigger1 = (Var(1) = 0) && (AnimElem = 2)
attr = A, NA
damage    = 6, 5
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = S900
guard.sparkno = S900
sparkxy = 45,-76
hitsound   = S200,1
guardsound = S6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4, 0
air.velocity = -4,5

[State 600, 2]
type = HitDef
trigger1 = (Var(1) = 1) && (AnimElem = 2)
attr = A, NA
damage    = 6, 4
guardflag = HA
priority = 3
pausetime = 9,10
sparkno = S900
guard.sparkno = S900
sparkxy = 45,-76
hitsound   = S200,1
guardsound = S6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4, 0
air.velocity = -4, 5

[State 600, 2]
type = HitDef
trigger1 = (Var(1) = 2) && (AnimElem = 2)
attr = A, NA
damage    = 7, 4
guardflag = HA
priority = 3
pausetime = 9,10
sparkno = S900
guard.sparkno = S900
sparkxy = 45,-76
hitsound   = S200,1
guardsound = S6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4, 0
air.velocity = -4, 5

[State 600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------
;JUMP_B
[Statedef 610]
type    = A
movetype= A
physics = A
ctrl = 0

[State 610, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 610

[State 610, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3610

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 		200, After Image]
type 			= AfterImage
trigger1 		= time = 0
time 			= 15
trans 		= add1
TimeGap  		= 2
FrameGap 		= 1
length 		= 6
PalBright 		= 0,  0,  0
PalContrast 	= 128,128,128
PalAdd 		= 0,  0,  0
PalMul 		= 1,  1,  1

[State 210, 2]
type = playsnd
trigger1 = time = 0
value = 210,0

[State 600, 2]
type = HitDef
trigger1 = (Var(1) = 0) && (AnimElem = 2)
attr = A, NA
damage    = 6, 5
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = S900
guard.sparkno = S900
sparkxy = 45,-76
hitsound   = S200,1
guardsound = S6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4, 0
air.velocity = -4,5

[State 600, 2]
type = HitDef
trigger1 = (Var(1) = 1) && (AnimElem = 2)
attr = A, NA
damage    = 6, 4
guardflag = HA
priority = 3
pausetime = 9,10
sparkno = S900
guard.sparkno = S900
sparkxy = 45,-76
hitsound   = S200,1
guardsound = S6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4, 0
air.velocity = -4, 5

[State 600, 2]
type = HitDef
trigger1 = (Var(1) = 2) && (AnimElem = 2)
attr = A, NA
damage    = 7, 4
guardflag = HA
priority = 3
pausetime = 9,10
sparkno = S900
guard.sparkno = S900
sparkxy = 45,-76
hitsound   = S200,1
guardsound = S6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -4, 0
air.velocity = -4, 5

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

[State 610, rapid kick]
type = changestate
triggerall = Var(1) != 0
trigger1 = (time = [8,20]) && ((command = "x") || (command = "y"))
value = 3611
;---------------------------------------------------------
;Rapid Fire Jump Kick
[Statedef 3611]
type = A
movetype = A
physics = A
ctrl = 0
velset = 0,0,0
anim = 3611

[State 	32611: 2]
type 		= playsnd
trigger1 	= time = 0
value 	= 210,0

[State 3611: Kicks]
type = HitDef
trigger1 = ((AnimElem = 1) || (AnimElem = 2))
trigger2 = ((AnimElem = 3) || (AnimElem = 4))
attr = A, NA
animtype  = Medium
damage    = 3, 1
guardflag = MA
hitflag   = MAF
pausetime = 2,5
sparkno = 2
guard.sparkno = 2
sparkxy = 0,-55
hitsound   = S210,1
guardsound = S6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
ground.velocity = -5
air.velocity = -5,3
envshake.time = 14
envshake.freq = 61
envshake.ampl = -5

[State 3611: no move]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 3611: End]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------
;      ======| END Basic Attacks|======
;---------------------------------------------

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

;Projectile Barrier
[Statedef 2600]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0

[State 730, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 2600

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 32600

[State 2600, 2]
type = HitOverride
trigger1 = time >= 0
slot = 0
attr = SCA, NP, NA, HP, HA SP
stateno = 2601
time = 1

[State 820,poweradd]
type = PowerAdd
trigger1 = time > 0
value = -1

[State 8220: ChangeState]
type = ChangeState
trigger1 = (Command != "barriera") || (Command != "barrierb")
value	= 0
ctrl = 1

;-------------------------------------------------------------------------
;Projectile Barrier
[Statedef 2601]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0
anim = 2600

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 32600

[State 2601, Energy Gathering]
type = Explod
trigger1 = Time > 0
anim = 1202
ID = 1202
pos = 5,-55
postype = p1
sprpriority = 1000 
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 2601, 2]
type = HitOverride
trigger1 = time >= 0
slot = 0
attr = SCA, NP, NA, HP, HA, SP
stateno = 2601
time = 1

[State 820,poweradd]
type = PowerAdd
trigger1 = time > 5
value = -1

[State 2601, Remove Energy]
type = RemoveExplod
trigger1 = hitover = 1
trigger2 = command != "barriera" || command != "barrierb" 
id = 1202

[State 8220: ChangeState]
type = ChangeState
trigger1 = (Command != "barriera") || (Command != "barrierb")
value = 0
ctrl = 1

[State 8220, Projectile]
type = changestate
trigger1 = hitover = 1
value = 2610

;-----------------------------------------------------------------------------------------------
;Projectile Barrier - END - Shoot out
[Statedef 2610]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0,0
anim = 2600

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 32600

[State 1210, End]
type = Projectile
trigger1 = time = 0
ProjID = 1202
projanim = 1202
projhitanim = 1003
projscale = 1.25,1.25
velocity = 8,0
projsprpriority = 5
offset = 45,-57
attr = S, SP
damage = 15,5
hitflag = MAF
guardflag = MA
animtype = Hard
pausetime = 10,15
ground.type = High
ground.velocity = -2
air.velocity = -2

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

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

;Tired
[Statedef 5300]
type = S
physics = S
ctrl = 0
velset = 0,0,0

[State 5300, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 5300

[State 5300, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 4300

[State 	5300, remove effects]
type 		= RemoveExplod
ID 		= 732
trigger1 	= Time = 0

[State 	5300, remove effects]
type 		= RemoveExplod
ID 		= 734
trigger1 	= Time = 0

[State 5300, 3]
type = changestate
trigger1 = time = 150
value = 0
ctrl = 1

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

; Bukuu Jutsu - Start
[Statedef 1510]
type = A
movetype = A
physics = A
velset = 0,-7.7
ctrl = 0

[State 730, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 1510

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31510

[State 1510, Ha!]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 100

[State 1510, 1]
type = AfterImage
trigger1 = Time = 0
time = 10
trans = add1
TimeGap  = 2
FrameGap = 2
length = 6
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =   1,  1,  1

[State 1510, 2]
type = AfterImage
trigger1 = Time = 0
time = 10
trans = add1
TimeGap  = 2
FrameGap = 2
length = 6
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =   1,  1,  1

[State 1510, 3]
type = changestate
trigger1 = animtime = 0
value = 1500
ctrl = 1
;------------------------------------------------
;Bukuu Jutsu
[Statedef 1500]
type = S
ctrl = 0
velset = 0,0,0

[State 730, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 1500

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31500

[State 1500, VarSet]
type = VarSet
Trigger1 = Time = 0
var(3) = 1

[State 1500, MakeDust1]
type = MakeDust
triggerall = Pos Y >= -80 && Pos Y <= -70
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
pos = -5, 75
spacing = 3

[State 1500, MakeDust2]
type = MakeDust
triggerall = Pos Y >= -70 && Pos Y <= -60
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
pos = -5, 60
spacing = 3

[State 1500, MakeDust3]
type = MakeDust
triggerall = Pos Y >= -60 && Pos Y <= -50
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
pos = -5, 50
spacing = 3

[State 1500, MakeDust4]
type = MakeDust
triggerall = Pos Y >= -50 && Pos Y <= -40
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
pos = -5, 40
spacing = 3

[State 1500, MakeDust5]
type = MakeDust
triggerall = Pos Y >= -40 
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
pos = -5, 30
spacing = 3

[State 1500, Guard]
type = ChangeState
triggerall = P2MoveType = A
triggerall = P2BodyDist X <= 120
trigger1 = Command = "holdback"
value = 130

[State 1500,Para]
type = VelSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Var(2) = 0
x = 0
y = 0

[State 1500, Para2]
type = ChangeAnim
triggerall = (Var(1) = 0)
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Anim != 1500
value = 1500

[State 1500, Para2]
type = ChangeAnim
triggerall = ((Var(1) = 1) || (Var(1) = 2))
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Anim != 1500
value = 31500

[State 1500,Var(1)]
type = VarSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Var(2) != 2
trigger2 = Var(2) = 2
trigger2 = Vel Y >= 1.5
v = 2
value = 1

[State 1500,Var(2)]
type = VarSet
trigger1 = Var(2) = 1
trigger1 = Vel Y <= -1.5
v = 2
value = 2

[State 1500,Up]
type = VelAdd
trigger1 = Var(2) = 1
y = -0.2

[State 1500,Down]
type = VelAdd
trigger1 = Var(2) = 2
y = 0.2

[State 1500,End]
type = VelSet
triggerall = Var(2) != 0
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
trigger3 = command = "holdup"
trigger4 = command = "holddown"
y = 0

[State 1500,EndVar]
type = VarSet
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
trigger3 = command = "holdup"
trigger4 = command = "holddown"
v = 2
value = 0


[State 1500, GoUp1]
type = VelAdd
trigger1 = command = "holdup"
y = -0.3

[State 1500,GoUp2]
type = VelSet
trigger1 = command = "holdup"
trigger1 = Vel Y > 0 
y = 0

[State 1500, GoUpAnim]
type = ChangeAnim
triggerall = (Var(1) = 0)
trigger1 = Anim != 1503
trigger1 = command = "holdup"
value = 1503

[State 1500, GoUpAnim]
type = ChangeAnim
triggerall = ((Var(1) = 1) || (Var(1) = 2))
trigger1 = Anim != 11503
trigger1 = command = "holdup"
value = 31503

[State 1500, GoDown1]
type = VelAdd
trigger1 = command = "holddown"
y = 0.3

[State 1500,GoDown2]
type = VelSet
trigger1 = command = "holddown"
trigger1 = Vel Y < 0 
y = 0

[State 1500, GoDownAnim]
type = ChangeAnim
triggerall = (Var(1) = 0)
trigger1 = Anim != 1504
trigger1 = command = "holddown"
value = 1504

[State 1500, GoDownAnim]
type = ChangeAnim
triggerall = ((Var(1) = 1) || (Var(1) = 2))
trigger1 = Anim != 11504
trigger1 = command = "holddown"
value = 31504

[State 1500, GoBack1]
type = VelAdd
trigger1 = command = "holdback"
x = -0.3

[State 1500,GoBack2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = Vel X > 0 
x = 0

[State 1500, GoBackAnim]
type = ChangeAnim
triggerall = (Var(1) = 0)
triggerall = Anim != 1501
trigger1 = command = "holdback"
value = 1502

[State 1500, GoBackAnim]
type = ChangeAnim
triggerall = ((Var(1) = 1) || (Var(1) = 2))
triggerall = Anim != 11501
trigger1 = command = "holdback"
value = 31502

[State 1500, GoFwd1]
type = VelAdd
trigger1 = command = "holdfwd"
x = 0.3

[State 1500, GoFwd2]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = Vel X < 0 
x = 0

[State 1500, GoFwdAnim]
type = ChangeAnim
triggerall = Var(1) = 0
trigger1 = Anim != 1502
trigger1 = command = "holdfwd"
value = 1501

[State 1500, GoFwdAnim]
type = ChangeAnim
triggerall = ((Var(1) = 1) || (Var(1) = 2))
trigger1 = Anim != 11502
trigger1 = command = "holdfwd"
value = 31501

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

;[State 1500,Border]
;type = PosSet
;trigger1 = Pos Y < -150
;y = -150

[State 1500,Land]
type = ChangeState
trigger1 = Pos Y >= 0
value = 50
ctrl = 1

[State 1500,End]
type = ChangeState
trigger1 = Time > 2
trigger1 = command = "fly"
value = 50
ctrl = 1

[State 1500,Win-Lose]
type = ChangeState
trigger1 = Win = 1
trigger2 = Lose = 1
value = 50

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

;Zanzoken - Spider style :)
[Statedef 1600]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0,0
ctrl = 0
facep2 = 1
anim = 1600

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31600

[State 1600, NotHitBy]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 20

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 2,0
time = 1
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holdfwd"
value = 1601 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holdback"
value = 1603 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holdup"
value = 1604 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holddown"
value = 1605 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holdfwd" && command = "holdup"
value = 1606 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holdfwd" && command = "holddown"
value = 1607 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holdback" && command = "holdup"
value = 1608 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = command = "holdback" && command = "holddown"
value = 1609 ;<--So it goes to direction states
ctrl = 1

[State 1600, 4]
type = ChangeState
Trigger1 = AnimTime = 0
value = 1601 ;<--So it goes to direction states
ctrl = 1
;---------------------------------------------------------
;Appear Forward
[Statedef 1601]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1601
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, Fwd]
type = PosAdd
trigger1 = time = 0
x = 320 ;<--So you move forward
y = 0

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1
;-----------------------------------------------------------------
;Forward Up
[Statedef 1606]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1601
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, FwdUp]
type = PosAdd
trigger1 = time = 0
x = 320
y = -55

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1
;----------------------------------------------------------------
;Forward Down
[Statedef 1607]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1601
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, Fwddown]
type = PosAdd
trigger1 = time = 0
x = 320
y = (pos y)*-1

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1
;----------------------------------------------------------------------
;Back
[Statedef 1603]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1600
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, Back]
type = PosAdd
trigger1 = time = 0
x = -320
y = 0

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = Animtime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1
;--------------------------------------------------------------
;Back Up
[Statedef 1608]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1601
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, BackUp]
type = PosAdd
trigger1 = time = 0
x = -320
y = -55

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1
;------------------------------------------------------
;Up
[Statedef 1604]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1601
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, Up]
type = PosAdd
trigger1 = time = 0
x = 0
y = -55

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1
;--------------------------------------------------------------
;Down
[Statedef 1605]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1601
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, down]
type = PosAdd
trigger1 = time = 0
x = 0
y = (pos y)*-1 ;<--This stops you from going down if your on the ground

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1
;--------------------------------------------------------------------
;Back Down
[Statedef 1609]
type    = S ;<--Standing
movetype= I ;<--Idle becuz its not an attack
physics = S ;<--Standing
velset = 0,0 
anim = 1601
ctrl = 0
facep2 = 1

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31601

[State 1600, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, AfterImage] 
type = AfterImage
trigger1 = TimeMod = 5,0
time = 2
trans = add
PalContrast =  255, 200, 255
PalBright = 0,0,0

[State 1600, Backdown]
type = PosAdd
trigger1 = time = 0
x = -320
y = (pos y)*-1

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;<--So it goes back to the state
ctrl = 1

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

;Energyball
[Statedef 1000]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0,0

[State 730, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 1000

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31000

;Flash Battle feature
[State 200:		ReversalDef]
type			= ReversalDef
trigger1		= ((AnimElem = 1) || (AnimElem = 3)) && (Random <= 499) && (Var(31) != 2)
reversal.attr	= SCA, AA, AP, AT
p1stateno		= 8250
p2stateno		= 8255

[State 1000, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1000,0

[State 1000, release]
type = Projectile
triggerall = Var(1) = 0
trigger1 = Animelem = 2
projanim = 1001
projhitanim = 1003
projpriority = 3
offset = 45, -57
velocity = 7
attr = S, SP
damage = 15,3
animtype = Light
pausetime = 0,10
sparkno = -1
sparkxy = 10, 0
guardflag = MA
hitsound = S1000,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 9
ground.hittime = 9
ground.velocity = -10
air.velocity = -10
envshake.time = 20
envshake.freq = 65
envshake.ampl = -8

[State 1000, release]
type = Projectile
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = Animelem = 2
projanim = 1002
projhitanim = 1003
projpriority = 5
offset = 45, -57
velocity = 7
attr = S, SP
damage = 20,7
animtype = Medium
pausetime = 4,12
sparkno = -1
sparkxy = 10, 0
guardflag = MA
hitsound = S1000,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 9
ground.hittime = 9
ground.velocity = -10
air.velocity = -10
envshake.time = 20
envshake.freq = 75
envshake.ampl = -10

[State 1000, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Pos Y < 0
value = 1500

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

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

;Ki Thrust
[Statedef 3700]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0,0

[State 730, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 3700

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 33700

[State 3600, Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3600,0

[State 3600, ScreenShake]
type = EnvShake
trigger1 = TimeMod = 12,0
time = 12
freq = 160
ampl = -8
phase = 90

[State 3600, release]
type = Projectile
trigger1 = Animelem = 1
projanim = 3601
projhitanim = -1
projsprpriority = -5
projremovetime = 100
offset = 0, 0
velocity = 0
attr = S, SP
damage = 25,3
animtype = Hard
pausetime = 0,10
sparkno = -1
sparkxy = 10, 0
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 9
ground.hittime = 9
ground.velocity = -16, -8
fall = 1
fall.recover = 0

[State 3600, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------------------------------------------------------------

;Ki Dart
[Statedef 1200]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0,0

[State 730, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 1200

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 31200

[State 1200: Charge]
type = Explod
trigger1 = AnimElem = 1
anim = 1201
ID = 1201
postype = p1
pos = -17,-55
sprpriority = 5
removetime = 20
removeongethit = 1
bindtime = 20

[State 1200: Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1200,0

;[State 1200: RandomTrajectories]
;type = VarRandom
;trigger1 = AnimElem = 3
;v = 30
;range = 9

[State 730, Seeking]
type = Helper
trigger1 = AnimElem = 3
helpertype = Normal
name = "ki dart"
id = 0024
pos = 45,-55
postype	= p1
facing	= 1
stateno	= 1202
keyctrl	= 0
ownpal	= 1

;[State 2001, Ball forward1]
;type = Projectile
;trigger1 = Time = 25
;projanim = 1202
;projid = 9000
;projhitanim = 1003
;projsprpriority = 3
;projremovetime = 9999999999999
;offset = 45, -55
;velocity = 6,0
;getpower = 150
;attr = S, SP
;damage = 37,15
;animtype = Medium
;pausetime = 0,10
;sparkno = S1005
;gaurd.sparkno = S1005
;sparkxy = 0,75
;guardflag = MA
;guardsound = 6,0
;ground.type = Low
;ground.slidetime = 9
;ground.hittime = 9
;ground.velocity = -35,-5
;air.velocity = -35,5
;fall = 1
;fall.recover = 0

[State 1200: 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------------------------------------------------------------

;Semi Kamehame ha
[Statedef 3750]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0,0

[State 730, 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 3750

[State 730, 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 33750

[State 3750, Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3750,0

[State 3750, ScreenShake]
type = EnvShake
trigger1 = Animelem = 2
time = 55
freq = 160
ampl = -5
phase = 90

[State 3750, release]
type = Projectile
trigger1 = Animelem = 2
projanim = 3751
projhitanim = -1
projsprpriority = 5
projremovetime = 55
projhits = 15
offset = 30, -40
velocity = 0
attr = S, SP
damage = 1,0
animtype = Hard
pausetime = 0,10
sparkno = -1
sparkxy = 10, 0
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 9
ground.hittime = 9
ground.velocity = -16, -2
air.velocity = -16, -2
fall = 1
fall.recover = 0

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

;-------------------------------------------------------------
;                 =======| Power UP |========
;-------------------------------------------------------------

;Charge Power
[Statedef 730]
type    = S
movetype= I
physics = S
ctrl = 0
velset = 0,0,0

[State 730: 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 730

[State 730: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3730

[State 	730,end]
type 		= RemoveExplod
ID 		= 734
trigger1 	= time = 0

[State 	730,end]
type 		= RemoveExplod
ID 		= 732
trigger1 	= Time = 0

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 0
trigger1 = Time = 0
value = 732,0
volume = 255

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = Time = 0
value = 732,0
volume = 100
freqmul = 1.2

[State 730, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 730,0
volume = 255

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 0
trigger1 = TimeMod = 20,0
value = 732,1
volume = 155

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = timemod = 80,0
value = 0,10
volume = 100
channel = 5

[State 1900, GoUpAnim]
type = ChangeState
triggerall = (Time = 0)
trigger1 = Anim != 760
trigger1 = pos Y < 0
value = 760

;---------------EFFECTS-----------------

;[State 730, Push Effect]
;type = Helper
;trigger1 = TimeMod = 30,0
;helpertype = Normal
;name = "pusheffect"
;id = 733
;pos = 0,0
;postype	= p1
;facing	= 1
;stateno	= 733
;keyctrl	= 0
;ownpal	= 1

[State 730, Dirt Left]
type = Explod
triggerall = Var(1) = 0
trigger1 = Time = 0 && Pos Y = 0
anim = 741
ID = 741
pos = -25,5
sprpriority = -3 
bindtime = 52
removetime = 52
removeongethit = 1
ownpal = 1

[State 730, Dirt Right]
type = Explod
triggerall = Var(1) = 0
trigger1 = Time = 0 && Pos Y = 0
anim = 742
ID = 742
pos = 30,5
sprpriority = -3 
bindtime = 52
removetime = 52
removeongethit = 1
ownpal = 1

[State 730, Dirt Left]
type = Explod
triggerall = Var(1) = 1
trigger1 = Time = 0 && Pos Y = 0
anim = 753
ID = 753
pos = -25,5
sprpriority = -3 
bindtime = 52
removetime = 52
removeongethit = 1
ownpal = 1

[State 730, Dirt Right]
type = Explod
triggerall = Var(1) = 1
trigger1 = Time = 0 && Pos Y = 0
anim = 752
ID = 752
pos = 20,5
sprpriority = -3 
bindtime = 52
removetime = 52
removeongethit = 1
ownpal = 1

[State 730, Ground Energy]
type = Explod
trigger1 = Time = 0 && Pos Y = 0
anim = 737
ID = 737
sprpriority = -5 
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 2
trigger1 = Time = 1
anim = 756
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 1
trigger1 = Time = 1
anim = 734
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 0
trigger1 = Time = 1
anim = 732
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

;-------------END EFFECTS---------

[State 310, 2]
type = poweradd
trigger1 = Time >= 0
value = 5

[State 730, Stop Sound]
type 	= StopSnd
trigger1 = stateno != 730
channel = 5

[State 730,end]
type = RemoveExplod
ID = 732
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 737
trigger1 = command != "charge"

[State 730, 3]
type = ChangeState
trigger1 = command != "charge"
value = 0
ctrl = 1

[State 730, 3]
type = ChangeState
trigger1 = Var(1) = 1 || power >= 2000
value = 735
ctrl = 1

[State 730, Aura]
type = Explod
triggerall = Var(10)
trigger1 = command != "charge"
anim = 734
ID = 734
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(9)
trigger1 = command != "charge"
anim = 732
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, 3]
type = ChangeState
trigger1 = power >= 2000
value = 735
ctrl = 1

[State 	730, 3]
type 		= ChangeState
trigger1 	= Var(1) = 1 || Var(1) = 2
value 	= 735
ctrl 		= 1

[State 730, 3]
type = ChangeState
trigger1 = power >= 6000
value = 740
ctrl = 1
;----------------------------------------------------------

;Level 2 and Up --- Power up
[Statedef 735]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0,0

[State 200: 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 735

[State 200: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3735

[State 200: 1]
type = changeanim
trigger1 = (Var(1) = 0) && ((Time = 0) && (Pos Y > 0))
value = 760

[State 200: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && ((Time = 0) && (Pos Y > 0))
value = 3760

[State 	730,end]
type 		= RemoveExplod
ID 		= 734
trigger1 	= time = 0

[State 	730,end]
type 		= RemoveExplod
ID 		= 732
trigger1 	= Time = 0

[State 730, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 730, 1
volume = 255

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 0
trigger1 = timemod = 20,0
value = 732,1
volume = 155

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = timemod = 80,0
value = 0,10
volume = 122
channel = 3

[State 730,end]
type = RemoveExplod
ID = 737
trigger1 = time = 0

[State 730,end]
type = RemoveExplod
ID = 732
trigger1 = time = 0

[State 730, GoUpAnim]
type = ChangeState
triggerall = time = 0
trigger1 = Anim != 760
trigger1 = pos Y < 0
value = 760

[State 730, energy]
type = Explod
trigger1 = (Var(1) = 2) && Time = 0
anim = 757
ID = 737
pos = 0, 0
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, energy]
type = Explod
trigger1 = Time = 0 && Pos Y = 0
anim = 737
ID = 737
pos = 0, 0
sprpriority = -5 
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Swirling Dirt]
type = Explod
trigger1 = Time = 0 && Pos Y = 0
anim = 739
ID = 739
pos = 0,5
sprpriority = 2
bindtime = 48
removetime = 48
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 2
trigger1 = Time = 1
anim = 756
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 1
trigger1 = Time = 1
anim = 734
ID = 732
pos = 0,-10
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 0
trigger1 = Time = 1
anim = 732
ID = 732
pos = 0,-10
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

;[State 730, Push Effect]
;type = Helper
;trigger1 = TimeMod = 30,0
;helpertype = Normal
;name = "pusheffect"
;id = 733
;pos = 0,0
;postype	= p1
;facing	= 1
;stateno	= 733
;keyctrl	= 0
;ownpal	= 1

[State 730, Lighning]
type = Helper
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = TimeMod = 50,0
helpertype = normal
name = "Lightning Bolts"
ID = 0050
pos = 0,0
postype = p1
facing = 1
stateno = 754
keyctrl = 0
ownpal = 0

[State 730, screendarken]
type = Explod
trigger1 = Var(1) = 1 && Time = 0
anim = 9979
ID = 751
pos = 0, 0
sprpriority = -1
removetime = -1
bindtime = -1
ownpal = 1

[State 2999: Screen Dark]
type = explod
trigger1 = Var(1) = 2 && Time = 0
anim = 9989
id = 9989
postype = p1
sprpriority = -5
removetime = -1
bindtime = -1
ownpal = 1

[State 730,end]
type = RemoveExplod
ID = 9989
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 751
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 737
trigger1 = command != "charge"

[State 730, 2]
type = poweradd
trigger1 = Time >= 0
value = 5

[State 730, 1]
type = EnvShake
trigger1 = TimeMod = 4,0
triggerall = power >= 3000 
ampl = -1
time = 4
freq = 40

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 0
trigger1 = TimeMod = 4,0
triggerall = power >= 4000
ampl = -2
time = 4

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = TimeMod = 4,0
triggerall = power <= 4000 
ampl = -2
time = 4
freq = 150

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 0
trigger1 = TimeMod = 4,0
triggerall = power >= 4000
ampl = -3
time = 4

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = TimeMod = 4,0
triggerall = power >= 4000
ampl = -6
time = 4

[State 730,end]
type = RemoveExplod
ID = 9989
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 732
trigger1 = command != "charge"

[State 730, 3]
type = ChangeState
trigger1 = command != "charge"
value = 0
ctrl = 1

[State 730, 3]
type = ChangeState
trigger1 = power >= 6000
value = 740
ctrl = 1

;---------------------------------------------------------------------
;Level 6 Power Up
[Statedef 740]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0,0

[State 200: 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 740

[State 200: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3740

[State 	730,end]
type 		= RemoveExplod
ID 		= 734
trigger1 	= time = 0

[State 	730,end]
type 		= RemoveExplod
ID 		= 732
trigger1 	= Time = 0

[State 730,end]
type = RemoveExplod
ID = 738
trigger1 = time = 0

[State 730,end]
type = RemoveExplod
ID = 737
trigger1 = time = 0

[State 730,end]
type = RemoveExplod
ID = 732
trigger1 = time = 0

[State 730, GoUpAnim]
type = ChangeAnim
triggerall = (Var(1) = 0) && (Time = 0)
trigger1 = Anim != 760
trigger1 = pos Y < 0
value = 760

[State 730, GoUpAnim]
type = ChangeAnim
triggerall = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
trigger1 = Anim != 760
trigger1 = pos Y < 0
value = 3760

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 0
trigger1 = timemod = 20,0
value = 732,1
volume = 155

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = timemod = 80,0
value = 0,10
volume = 100
channel = 2

[State 730, Ground Energy]
type = Explod
trigger1 = Time = 0 && Pos Y = 0
anim = 737
ID = 737
sprpriority = -5 
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Swirling Dirt]
type = Explod
trigger1 = Time = 0 && Pos Y = 0
anim = 739
ID = 739
pos = 0,5
sprpriority = 2
bindtime = 48
removetime = 48
removeongethit = 1
ownpal = 1

[State 730, energy]
type = Explod
trigger1 = (Var(1) = 2) && Time = 0
anim = 757
ID = 737
pos = 0, 0
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 2
trigger1 = Time = 1
anim = 756
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 1
trigger1 = Time = 1
anim = 734
ID = 732
pos = 0,-10
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 0
trigger1 = Time = 1
anim = 732
ID = 732
pos = 0,-10
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Electricity]
type = Explod
trigger1 = ((Var(1) = 1) || (Var(1) = 0)) && Time = 1
anim = 738
ID = 738
pos = 0,-10
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

;[State 730, Push Effect]
;type = Helper
;trigger1 = TimeMod = 30,0
;helpertype = Normal
;name = "pusheffect"
;id = 733
;pos = 0,0
;postype	= p1
;facing	= 1
;stateno	= 733
;keyctrl	= 0
;ownpal	= 1

[State 730, Lighning]
type = Helper
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = TimeMod = 50,0
helpertype = normal
name = "Lightning Bolts"
ID = 0050
pos = 0,0
postype = p1
facing = 1
stateno = 754
keyctrl = 0
ownpal = 0

[State 730, Electricity]
type = Explod
trigger1 = ((Var(1) = 1) || (Var(1) = 0)) && (Time = 0)
anim = 755
ID = 755
sprpriority = 8
removetime = -1
bindtime = -1
supermovetime = -1
ownpal = 1

[State 730,end]
type = RemoveExplod
ID = 755
trigger1 = command != "charge"

[State 730, screendarken]
type = Explod
trigger1 = Time = 0
anim = 751
ID = 751
pos = 0, 0
sprpriority = -1
removetime = -1
bindtime = -1
ownpal = 1

[State 730,end]
type = RemoveExplod
ID = 751
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 737
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 738
trigger1 = command != "charge"

[State 730, 2]
type = poweradd
trigger1 = Time >= 0
value = 5

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 0
trigger1 = TimeMod = 4,0
ampl = -4
time = 4
freq = 50

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = TimeMod = 4,0
ampl = -8
time = 4
freq = 150

[State 730,end]
type = RemoveExplod
ID = 9989
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 732
trigger1 = command != "charge"

[State 730, 3]
type = ChangeState
trigger1 = command != "charge"
value = 1500
ctrl = 1
;---------------------------------------------------------------------
;Air Power Up
[Statedef 760]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0,0

[State 200: 1]
type = changeanim
trigger1 = (Var(1) = 0) && (Time = 0)
value = 760

[State 200: 1]
type = changeanim
trigger1 = ((Var(1) = 1) || (Var(1) = 2)) && (Time = 0)
value = 3760

[State 	730,end]
type 		= RemoveExplod
ID 		= 734
trigger1 	= time = 0

[State 	730,end]
type 		= RemoveExplod
ID 		= 732
trigger1 	= Time = 0

[State 730,end]
type = RemoveExplod
ID = 738
trigger1 = time = 0

[State 730,end]
type = RemoveExplod
ID = 737
trigger1 = time = 0

[State 730,end]
type = RemoveExplod
ID = 732
trigger1 = time = 0

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = Time = 0
value = 732,0
volume = 100
freqmul = 1.2

[State 730, PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 730,0
volume = 255

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 0
trigger1 = TimeMod = 20,0
value = 732,1
volume = 155

[State 730, PlaySND]
type = PlaySnd
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = timemod = 80,0
value = 0,10
volume = 100
channel = 4

[State 730, Electricity]
type = Explod
triggerall = Var(1) = 2
trigger1 = Time = 1
anim = 757
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 2
trigger1 = Time = 1
anim = 756
ID = 732
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 1
trigger1 = Time = 1
anim = 734
ID = 732
pos = 0,-10
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Aura]
type = Explod
triggerall = Var(1) = 0
trigger1 = Time = 1
anim = 732
ID = 732
pos = 0,-10
sprpriority = 5
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

[State 730, Electricity]
type = Explod
trigger1 = Time = 1
anim = 738
ID = 738
pos = 0,-10
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1
ownpal = 1

;[State 730, Push Effect]
;type = Helper
;trigger1 = TimeMod = 30,0
;helpertype = Normal
;name = "pusheffect"
;id = 733
;pos = 0,0
;postype	= p1
;facing	= 1
;stateno	= 733
;keyctrl	= 0
;ownpal	= 1

[State 730, Lighning]
type = Helper
triggerall = Var(1) = 1
trigger1 = TimeMod = 50,0
helpertype = normal
name = "Lightning Bolts"
ID = 0050
pos = 0,0
postype = p1
facing = 1
stateno = 754
keyctrl = 0
ownpal = 0

[State 730, Electricity]
type = Explod
trigger1 = Time = 0
anim = 755
ID = 755
sprpriority = 8
removetime = -1
bindtime = -1
supermovetime = -1
ownpal = 1

[State 730,end]
type = RemoveExplod
ID = 755
trigger1 = command != "charge"

[State 730, screendarken]
type = Explod
trigger1 = Time = 0
anim = 751
ID = 751
pos = 0, 0
sprpriority = -1
removetime = -1
bindtime = -1
ownpal = 1

[State 730,end]
type = RemoveExplod
ID = 751
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 738
trigger1 = command != "charge"

[State 730, 2]
type = poweradd
trigger1 = Time >= 0
value = 5

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 0
trigger1 = TimeMod = 4,0
ampl = -4
time = 4
freq = 50

[State 730, 1]
type = EnvShake
triggerall = Var(1) = 1 || Var(1) = 2
trigger1 = TimeMod = 4,0
ampl = -8
time = 4
freq = 150

[State 730,end]
type = RemoveExplod
ID = 9989
trigger1 = command != "charge"

[State 730,end]
type = RemoveExplod
ID = 732
trigger1 = command != "charge"

[State 730, 3]
type = ChangeState
trigger1 = command != "charge"
value = 0
ctrl = 1

;-------------------------------------------------------------
;              =======| End Power UP |========
;-------------------------------------------------------------

;-------------------------------------------------------------
;        =======| DBZ Legends Attack System |========
;-------------------------------------------------------------

;Hit Across
[Statedef 2400]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0
anim = 2400

[State 760, 1]
type = changeanim
triggerall = var(1) = 1 || var(1) = 2
trigger1 = time = 0
value = 32400

[State 2400, ScreenBound]
type = ScreenBound
trigger1 = Time >= 0
value = 0
movecamera = 0,0

[State 2400, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 200, 0

[State 2401, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 55
guardflag = MA
hitflag   = MAF
pausetime = 0,0
sparkno = S900
guard.sparkno = -1  
sparkxy = -10,-65
hitsound   = S14,0
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -35,-5
air.velocity = -20,-1
;down.velocity = -20,-1
;down.hittime = 30
;down.bounce = 1
fall = 1
fall.recover = 0

;[State 2400, 3]
;type = HitDef
;trigger1 = AnimElem = 3
;animtype  = light
;attr = S, NT
;hitflag = M
;guardflag = A   
;hitsound = S14,0
;P1facing = 1
;p2facing = 1
;p1stateno = 2390
;p2stateno = 2389
;p2getp1state = 1

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

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

;Hit UP
[Statedef 2401]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0,0
anim = 2401

[State 760, 1]
type = changeanim
triggerall = var(1) = 1 || var(1) = 2
trigger1 = time = 0
value = 32401

[State 2401, Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 210,0

[State 2401, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 55
guardflag = MA
pausetime = 0,20
sparkno = S950
guard.sparkno = 3  
sparkxy = 58,-76
hitsound   = S14,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 0,-10
air.velocity = 0,-12
down.velocity = 0,-12
down.hittime = 30
down.bounce = 1
fall = 1
fall.recover = 1

[State 2401, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Pos Y < 0
value = 1500

[State 2401, 5]
type = ChangeState
trigger1 = MoveContact = 1
value = 2391
ctrl = 1

[State 2401, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------------------------------------------------------------

;Hit Down
[Statedef 2402]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0,0
anim = 2402

[State 760, 1]
type = changeanim
triggerall = var(1) = 1 || var(1) = 2
trigger1 = time = 0
value = 32402

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

[State 2402, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 55
guardflag = MA
pausetime = 0,26
sparkno = S950
guard.sparkno = 3
sparkxy = 58,-76
hitsound   = S14,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 0,10
air.velocity = 0,12
down.velocity = 0,12
down.hittime = 30
down.bounce = 1
fall = 1
fall.recover = 1

[State 2402, 4]
type = ChangeState
trigger1 = MoveContact = 1
trigger1 = Pos Y < 0
value = 2392

[State 2402, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Pos Y < 0
value = 0

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

;-----------------------------------------------------
;      ==========| Moving After Hit |===========
;-----------------------------------------------------

;Opponent Custom State
[Statedef 2389]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0

[State 2389, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 2389

[State 2389, VelSetX]
type = VelSet
trigger1 = Time >= 0
x = -7
y = -2

[State 2389, VelSetX]
type = PosSet
trigger1 = Pos Y < 0
y = 0

[State 2389, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = -25

[State 2389, Next]
type = ChangeState
trigger1 = AnimElem = 3
value = 3002

;-------------------------------------------------------------------------
;(a custom gethit state)
[Statedef 3001]
type    = A
movetype= H
physics = N
velset = 0,0

[State 3001, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = Time >= 0
value = 1012

[State 3001, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 3002

;---------------------------------------------------------------------------
[Statedef 3002]
type    = A
movetype= A
physics = N
velset = -20,0

[State 3002, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = Time >= 0
value = 1012

[State 3002, HitDef]
type = HitDef
trigger1 = Time >= 0
attr = S, HA
AanimType  = Hard
affectteam = F
damage    = 50,30
priority  = 6
pausetime = 10,0
sparkxy = -10,-60
getpower = 0
ground.Type = Trip
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -500, -5
air.velocity = -500,-5
airguard.velocity = -9,-3
fall.AnimType = Hard
p2stateno = 3001
fall = 1
fall.recover = 0

[State 3002, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 3002, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------------------------
;Move Across
[Statedef 2390]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 100
ctrl = 0
facep2 = 1

[State 760, 1]
type = changeanim
triggerall = var(1) = 1 || var(1) = 2
trigger1 = time = 0
value = 3100

;[State 2402, Sound]
;type = PlaySnd
;trigger1 = Time = 0
;value = 1600,0

[State 1084, ScreenBound]
type = ScreenBound
trigger1 = Time >= 0
movecamera = 0,0
value = 0

[State 1600, Fwd]
type = VelAdd
Trigger1 = Time > 0
x = 5
y = 0

[State 1600, 4]
type = ChangeState
Trigger1 = Time = 0
value = 0
ctrl = 1
;-----------------------------------------------------------------------------------------------

;Zanzoken UP
[Statedef 2391]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 1600
ctrl = 0
facep2 = 1

[State 760, 1]
type = changeanim
triggerall = var(1) = 1 || var(1) = 2
trigger1 = time = 0
value = 31600

[State 2402, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, invisible]
type = AssertSpecial
trigger1 = 1
flag = Invisible
flag2	= NoWalk

[State 1600, NotHitBy]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 30

[State 1600, Fwd]
type = PosAdd
Trigger1 = Time = 0
x = 0
y = -100

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
Trigger1 = Time = 0
value = 0
ctrl = 1
;-----------------------------------------------------------------------------------------------

;Zanzoken Down
[Statedef 2392]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 1600
ctrl = 0
facep2 = 1

[State 760, 1]
type = changeanim
triggerall = var(1) = 1 || var(1) = 2
trigger1 = time = 0
value = 31600

[State 2402, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 1600,0

[State 1600, invisible]
type = AssertSpecial
trigger1 = 1
flag = Invisible
flag2	= NoWalk

[State 1600, NotHitBy]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 30

[State 1600, Fwd]
type = PosAdd
Trigger1 = Time = 0
x = 0
y = (pos y)*-1

[State 1600, Turn]
type = Turn
Trigger1 = P2Dist X < 0

[State 1600, 4]
type = ChangeState
Trigger1 = Time = 0
value = 0
ctrl = 1

;-------------------------------------------------------------
;              =======| Helper States |=======
;-------------------------------------------------------------

;Charge (Push Effect)
[Statedef 733]
type = S
movetype = I
physics	= N
anim = 733
velset = 0,0
ctrl = 0
poweradd = 0
facep2 = 0

[State 733: NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 733: PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 733: VelSet]
type = VelSet
trigger1 = Time = 0
x = 10

[State 733: DestroySelf]
type = DestroySelf
trigger1 = Time = 40
;---------------------------------------------------------------------------
;Lightning Bolts
[Statedef 	754]
type 		= S
movetype 	= I
physics 	= N
anim 		= 754
velset 	= 0,0
ctrl 		= 0
poweradd 	= 0
juggle 	= 0
sprpriority	= 8

[State 	754, VarRandom]
type 		= VarRandom
trigger1 	= Time = 0
v 		= 0
range 	= -200,200

[State 	754,	PosSet]
type 		= PosSet
trigger1 	= Time = 0
x 		= var(0)
y 		= 0

[State 	754, VelSet]
type 		= VelSet
trigger1 	= Time = 1
x 		= (IfElse(Random <= 499,-1,-2))

[State 	754,	VelAdd]
type 		= VelAdd
trigger1 	= (Parent, StateNo != 735)
trigger2	= (Parent, StateNo != 740)
x 		= 0.05

[State 	754, DestroySelf]
type 		= DestroySelf
trigger1 	= Time = 32
;-------------------------------------------------------------

;Push Effect 2
[Statedef 734]
type = S
movetype = I
physics	= N
anim = 15733
velset = 0,0
ctrl = 0
poweradd = 0
facep2 = 0

[State 733: NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 733: VelSet]
type = VelAdd
trigger1 = Time >= 0
x = 10

[State 733: DestroySelf]
type = DestroySelf
trigger1 = Time = 40
;---------------------------------------------------------------------------
; Seeking Energy ball
[Statedef 	1202]
type    	= S
movetype	= A
anim 		= 1202
velset 	= 3.5,0

[State 	1202, NotHitBy]
type 		= NotHitBy
trigger1 	= Time >= 0
value 	= SCA
time 		= -1

[State 	1202, Movement]
type 		= VelAdd
trigger1 	= P2BodyDist X > -20 
trigger1 	= Vel X < 0 
x 		= 0

[State 	1202, Movement]
type 		= VelAdd
trigger1 	= P2BodyDist X < -20 
trigger1 	= Vel X > -0 
x 		= -0

[State 	1202, Movement]
type 		= VelAdd
trigger1 	= P2BodyDist Y > 50
trigger1 	= Vel Y < 0 
Y 		= 0

[State 	1202, Movement]
type 		= VelAdd
trigger1 	= P2BodyDist Y < 50 
trigger1 	= Vel Y > -0 
Y 		= -0

[State 	1202, Hitdef] 
type 		= HitDef
trigger1 	= Time = 0
attr 		= S, SP
damage    	= 54,10
animtype  	= Hard
hitflag 	= MAFD
guardflag 	= MA
pausetime 	= 0,12
sparkno 	= S1005
sparkxy	= 0,35
guard.sparkno = S1005
sparkxy 	= 500,500
hitsound 	= 5,3
guardsound 	= 6,0
ground.type = High
ground.slidetime 	= 9
ground.hittime  	= 9
ground.velocity 	= -6,-1
air.velocity 	= -2,-3

[State 	1202, GoFwd]
type 		= VelAdd
trigger1 	= P2BodyDist X > -20
trigger1 	= Vel X < 3 
x 		= 0.6

[State 	1202, GoBack]
type 		= VelAdd
trigger1 	= P2BodyDist X < -20
trigger1 	= Vel X > -3 
x 		= -0.6

[State 	1202, GoDown]
type 		= VelAdd
trigger1 	= P2BodyDist Y > 50 
trigger1 	= Vel Y < 3 
Y 		= 0.6

[State 	1202, GoUp]
type 		= VelAdd
trigger1 	= P2BodyDist Y < 50
trigger1 	= Vel Y > -3 
Y 		= -0.6

[State 	1202, No Hit]
type 		= NotHitBy
trigger1 	= Time > 0
value 	= ,NA,SA,HA,NT,ST,HT 

[State 	1202, Finish]
type 		= DestroySelf
trigger1 	= MoveContact = 1
;-------------------------------------------------------------------
;Goku Helper
[Statedef 31803]
type = S
movetype = A
physics	= S
anim = 31803
velset = 0,0
ctrl = 0

;PalFX
[State 		31800,blink]
type 		= PalFX
trigger1 	= (TimeMod = 60,0) && (Var(8) < 165)
time 		= 3
add 		= 255,255,255

[State 		31800, Aura]
type 		= Explod
trigger1	= (Time = 0)
anim 		= 736
ID 		    = 004
postype 	= p1
sprpriority 	= 5
removetime 	= -1
removeongethit 	= 1
bindtime 	= -1

[State 		31800, Ka...Me...Ha...Me....]
type 		= PlaySnd
trigger1 	= Time = 0
value 		= 2000, 0
volume 		= 255
channel 	= 6

[State 		31800, Energy]
type 		= Explod
trigger1 	= AnimElem = 2
anim 		= 749
ID 		    = 004
postype 	= p1
pos 		= -3,-20
sprpriority 	= 5
removetime 	= -1
removeongethit 	= 1
bindtime = -1

[State 	31800, Stop Sound]
type 		= StopSnd
trigger1 	= Stateno != 31803
channel 	= 6

[State 	31800, remove effects]
type 		= RemoveExplod
ID 		    = 004
trigger1 	= (Time = 165)

[State 	31800, 6]
type 		= DestroySelf
trigger1	= (Time = 165)
;-----------------------------------------------------------------
;Goku Helper 2
[Statedef 	31804]
type    	= S
movetype	= A
physics 	= S
juggle  	= 0
velset 		= 0,0
anim 		= 31804
ctrl 		= 0

[State 		31801, HAA!!!]
type 		= PlaySnd
trigger1 	= Time = 0
value 		= 2000, 1
volume 		= 255
channel 	= 8

[State 		        31801, Ball Front]
type 		        = Projectile
Trigger1 	        = time = 0
ProjAnim 	        = 31805
ProjHitAnim 	    = 1003
projhits			= 3
projpriority 	    = 9999999999999999999999999
offset 		        = 5, -20
velocity 	        = -6, -1
attr 		        = S, SP
damage    	        = 45,15
animtype  	        = Hard
givepower 	        = 35
guardflag 	        = MA
hitflag             = MAF
pausetime 	        = 0, 30
sparkno 	        = S1005
sparkxy             = 0, 40
guard.sparkno 	    = S1005
guardsound 	        = 6, 0
ground.type 	    = High
ground.slidetime 	= 1
guard.slidetime 	= 1
ground.hittime  	= 1
ground.velocity 	= -35,-5
airguard.velocity 	= -35,-5
air.velocity 	    = -35,-5
fall                = 1
fall.recover        = 0

[State      31801, change mode]
type        = DestroySelf
trigger1    = AnimTime = 0
;-------------------------------------------------------------
;            =======| END Helper States |=======
;-------------------------------------------------------------

;----------------------------------------------------------------------
;Renzoku Energy Fire
[Statedef 1900]
type    = S
movetype= A
physics = S
velset = 0,0,0
ctrl = 0

[State 730: 1]
type = changeanim
triggerall = var(1) = 0 || var(1) = 3
trigger1 = time = 0
value = 1900

[State 730: 1]
type = changeanim
triggerall = var(1) = 1 || var(1) = 2
trigger1 = time = 0
value = 31900

[State 	2001, Power Loss]
type 		= PowerAdd
triggerall	= Var(1) = 0
trigger1	= Time >= 0
value 	= -3

[State 	2001, Power Loss]
type 		= PowerAdd
triggerall	= Var(1) = 1
trigger1	= Time >= 0
value 	= -4

[State 1000: Sound]
type = PlaySnd
trigger1 = AnimElem = 2 || AnimElem = 4
value = 1000,0

[State 	2000, Aura]
type 		= Explod
triggerall 	= Var(1) = 0
trigger1	= Time = 50
anim 		= 732
ID 		= 732
postype 	= p1
sprpriority = 5
removetime 	= -1
removeongethit = 1
bindtime 	= -1

[State 	2000, Aura]
type 		= Explod
triggerall 	= Var(1) = 1
trigger1	= Time = 50
anim 		= 734
ID 		    = 734
postype 	= p1
sprpriority = 5
removetime 	= -1
removeongethit = 1
bindtime 	= -1

[State 	2000, Aura]
type 		= Explod
triggerall 	= Var(1) = 2
trigger1	= Time = 50
anim 		= 756
ID 		    = 734
postype 	= p1
sprpriority = 5
removetime 	= -1
removeongethit = 1
bindtime 	= -1

[State 1055, VarRandom y vel]
type = VarRandom
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
v = 30
range = -450, 450

[State 1055,conversion] 
type = VarSet 
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
fv = 0  
value = var(30)

[State 1055,reconversion] 
type = VarSet 
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
fv = 1  
value = FVar(0)/100

[State 1055, VarRandom x vel]
type = VarRandom
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
v = 31
range = 500, 650

[State 1055,conversion] 
type = VarSet 
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
fv = 2  
value = var(31)

[State 1055,reconversion] 
type = VarSet
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
fv = 3  
value = FVar(2)/100

[State 1055, Drain]
type = Poweradd
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
value = -75

[State 1055, Projectile]
type = Projectile
triggerall  = Var(1) = 0
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
velocity = FVar(3), FVar(1)
accel = 0, IfElse(FVar(1) >= 1.5,-0.1,IfElse(FVar(1) <= -1.5,0.1, 0))
attr = S, SP                    
damage    = 10, 6                 
animtype = Light 
Projanim = 1001
projhitanim = 1003
ProjID	= 1001
ProjHeightBound = -540,100
getpower = 0
Postype = p1
Offset = 45,-57              
guardflag = MA                   
hitflag = MAFP
projpriority = 1                                           
pausetime = 7,8                  
numhits = 1                      
sparkno = -1                               
hitsound = S5,0                  
guardsound = 6,0                
ground.type = Low                 
ground.slidetime = 5             
ground.hittime  = 20             
ground.velocity = 0,0
airguard.velocity = -1.9         
air.velocity = -1.3,0
envshake.time = 20
envshake.freq = 65
envshake.ampl = -5

[State 1055, Projectile]
type = Projectile
triggerall  = Var(1) = 1 || Var(1) = 2
triggerall	= Command = "holdz"
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
velocity = FVar(3), FVar(1)
accel = 0, IfElse(FVar(1) >= 1.5,-0.1,IfElse(FVar(1) <= -1.5,0.1, 0))
attr = S, SP                    
damage    = 10, 6                 
animtype = Light 
Projanim = 1002
projhitanim = 1003
ProjID	= 1001
ProjHeightBound = -540,100
getpower = 0
Postype = p1
Offset = 45,-57              
guardflag = MA                   
hitflag = MAFP
projpriority = 1                                           
pausetime = 7,8                  
numhits = 1                      
sparkno = -1                               
hitsound = S5,0                  
guardsound = 6,0                
ground.type = Low                 
ground.slidetime = 5             
ground.hittime  = 20             
ground.velocity = 0,0
airguard.velocity = -1.9         
air.velocity = -1.3,0
envshake.time = 20
envshake.freq = 65
envshake.ampl = -5

[State 	1900, remove effects]
type 		= RemoveExplod
ID 		= 732
trigger1 	= Command != "holdz"

[State 	1900, remove effects]
type 		= RemoveExplod
ID 		= 734
trigger1 	= Command != "holdz"

[State 	1900, Big Explosion]
type 		= Explod
trigger1 	= ProjContact1001 = 1
anim 		= 1005
ID 		= 1005
postype 	= p2
pos 		= 0,0
sprpriority = 5

[State 1055, stop (air)]
type = ChangeState
trigger1 = command != "holdz"
trigger2 = P2life <= 10
triggerall = Pos Y < 0
value = 1500
ctrl = 1

[State 1055, stop (ground)]
type = ChangeState
trigger1 = command != "holdz"
trigger2 = P2life <= 10
value = 0
ctrl = 1

[State 1055, stop (ground)]
type = ChangeState
trigger1 = Power <= 100
value = 5300
ctrl = 0

;-------------------------------------------------------------------------
;Back2Normal
[Statedef 9999]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 9999

[State 730: PlaySND]
type = PlaySnd
trigger1 = Time = 0
value = 0,10
volume = 255

[State 2999: 3]
type = Varset
trigger1 = Animtime = 0
v = 1
value = 0

[State 730: Push Effect]
type = Helper
trigger1 = time > 0
helpertype = Normal
name = "pusheffect"
id = 733
pos = 0,0
postype	= p1
facing	= 1
stateno	= 733
keyctrl	= 0
ownpal	= 1

[State 9999, Wind Effect]
type = Explod
trigger1 = time = 0
anim = 748
postype = p1
facing = 1
vfacing = 1
pos = 0,5
;vel = 0,0
;random = 0,0
removetime = 80
;supermove = 0
;pausemovetime = 0
scale = 1, 1
bindtime = 80
sprpriority = -1
ontop = 1
;shadow = 0,0,0
ownpal = 1
;removeongethit = 0
;ignorehitpause = 0
;persistent = 1

[State 9999, Aura]
type = Explod
trigger1 = (Time = 0)
anim = 732
;pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 80
;vel = 0,0
;random = 0,0
removetime = 80
;supermove = 0
;pausemovetime = 0
scale = 1, 1
sprpriority = 5
;ontop = 0
;shadow = 0,0,0
;ownpal = 0
;removeongethit = 0
;ignorehitpause = 0
;persistent = 1

[State 9999: Remove Electricity]
type = RemoveExplod
trigger1 = Time = 0
ID = 789

[State 9999, State]
type = ChangeState
trigger1 = Time = 60
value = 0
ctrl = 1

;------------------------------------------------------------------
;SSj Punching Combo
[Statedef 1590]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0,0
anim = 1590

[State 1590: After Image]
type = AfterImage
trigger1 = (Time = 0)
time = 23
trans = add1
TimeGap = 2
FrameGap = 1
length = 6
PalBright = 0,  0,  0
PalContrast = 128,128,128
PalAdd = 0,  0,  0
PalMul = 1,  1,  1

[State 1590: Move After Hitting]
type = VelSet
trigger1 = (Time > 0)
x = 3

[State 1590: Move After Hitting]
type = VelSet
trigger1 = (MoveContact = 1)
x = 3

[State 1590: Turn]
type = Turn
trigger1 = P2BodyDist X < 0

[State 1590: Punches]
type = HitDef
trigger1 = (AnimElem = 3) || (AnimElem = 6) || (AnimElem = 9) || (AnimElem = 12)
trigger2 = (AnimElem = 13) || (AnimElem = 16) || (AnimElem = 19)
attr = S, HA
hitflag = MAF
guardflag = MA
animtype = Light
damage = 5,2
pausetime = 0,12
sparkno = 2
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -3,0
air.velocity = -3,0
airguard.velocity = -3,0
fall = 0
air.fall = 0

[State 1590: Last Hard Punch]
type = HitDef
trigger1 = (AnimElem = 21)
attr = S, HA
hitflag = MAF
guardflag = MA
animtype = Hard
air.animtype = Hard
damage = 6,2
pausetime = 0,15
sparkno = 2
guard.sparkno = 2
sparkxy = 0,-55
hitsound = S200, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -18,0
air.velocity = -18,0
airguard.velocity = -18,0
fall = 1
air.fall = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = -4

[State 1590: End]
type = ChangeState
trigger1 = (AnimTime = 0)
value = 0
ctrl = 1
;------------------------------------------------------------------
;SSj Energy Field
[Statedef 8500]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0,0
anim = 8500

[State 8500: Ah...........]
type = PlaySnd
trigger1 = (Time = 0)
value = 730,1
volume = 255

[State 8500: Power Drain]
type = PowerAdd
trigger1 = (command = "holdx") && (Time >= 0)
value = -10

[State 8500: Energy Field]
type = Projectile
trigger1 = (command = "holdx")
ProjID = 0851
projanim = 8501
projhitanim = -1
velocity = 0,0
projhits = 1
projremovetime = 4
projpriority = 99999999999999999999999999999999999
projsprpriority = -7
postype = p1
offset = 0,-10
attr = S, HP
hitflag = MAF
guardflag = MA
animtype = Light
damage = 5,2
pausetime = 0,0
;sparkno =  ,
;guard.sparkno = 2
sparkxy = 0,-55
hitsound = S1000, 1
guardsound = 6,0
ground.type = High
air.type = High
ground.velocity = -15,0
air.velocity = -15,0
airguard.velocity = -15,0
fall = 1
air.fall = 1

[State 8500: Tired]
type = ChangeState
trigger1 = (power <= 100)
value = 5300
ctrl = 1

[State 8500: Standing]
type = ChangeState
trigger1 = (command != "holdx")
value = 0
ctrl = 1
