;Programming by Goten88

[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1.3           
yscale = 1.3           
ground.back = 13     
ground.front = 13    
air.back = 12        
air.front = 12      
height = 42    
attack.dist = 160 
proj.attack.dist = 90 
proj.doscale = 0   
head.pos = 1, -29
mid.pos = -2, -17   
shadowoffset = 0   
draw.offset = 0,0 

[Velocity]
walk.fwd  = 2.4      
walk.back = -2.2     
run.fwd  = 4.6, 0    
run.back = -4.5,-3.8 
jump.neu = 0,-7.5    
jump.back = -2.55    
jump.fwd = 2.5       
runjump.back = -2.55,-9.1 
runjump.fwd = 4,-9.1      
airjump.neu = 0,-6.5      
airjump.back = -2.55      
airjump.fwd = 2.5         

[Movement]
airjump.num = 0      
airjump.height = 35  
yaccel = .44         
stand.friction = .85 
crouch.friction = .82 
;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170]
type = Playsnd
trigger1 = time =  5
value = 170, 0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = ifelse(life > 300,181,182)

;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 180]
type = Playsnd
trigger1 = time =  5
value = 180, 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

; Win pose 2 - Tired
; CNS difficulty: basic
[Statedef 182]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 180]
type = Playsnd
trigger1 = time =  5
value = 180, 1

[State 182, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

[State 191]
type = Varset
trigger1 = time = 0
v = 3
value = 1

[STate 191]
type = helper
trigger1 = time = 7
helpertype = normal
name = "Goku"
ID = 192
pos = -100,-90
postype = p1
facing = 1
stateno = 192
ownpal = 1

[STate 191]
type = helper
trigger1 = time = 7
helpertype = normal
name = "Nimbus"
ID = 191
pos = -101,-80
postype = p1
facing = 1
stateno = 193
ownpal = 1

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

[State 191]
type = Playsnd
trigger1 = time = 77
value = 190, 0

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = Time = 77
value = 0

[Statedef 192]
type = S
ctrl = 0
anim = 0
velset = 5,0
sprpriority = 2

[STate 192]
type = velset
trigger1 = ParentDist X <= 0
x = 0

[state 192]
type = changestate
trigger1 = ParentDist X <= 0
value = 40

[Statedef 193]
type = S
ctrl = 0
anim = 191
velset = 5,0
sprpriority = -1

[State 193]
type = angleset
trigger1 = time = 30
value = 0

[State 193]
type = angleadd
trigger1 = time >= 30
trigger1 = time <= 38
value = 1.5

[State 193]
type = angledraw
trigger1 = time >= 30

[STate 193]
type = velset
trigger1 = time = 30
x = 8
y = -3

[state 193]
type = destroyself
trigger1 = time = 100

;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 180 ;195
velset = 0,0
movetype = I
physics = S
poweradd = 200
sprpriority = 2

[State 195, 1]
type = CtrlSet
trigger1 = Time = 30
value = 1

[State 195, 2]
type = ChangeState
trigger1 = Time = 40
value = 0
ctrl = 1

; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 4
value = 333, 1

[state 100]
type = explod
trigger1 = time = 0
anim = 1902
pos = -99,-13
postype = p1
bindtime = 1
removetime = -2
scale = 1,1
ownpal = 1
sprpriority=999

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

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

;[STate 100]
;type = Playsnd
;trigger1 = time = 1
;value = 26, 4
;volume = 500
;channel = 2

[State 100]
type = Ctrlset
trigger1 = Var(1) = 1
trigger1 = time = 0
value = 0

[State 100, 4]
type = ChangeState
trigger1 = Var(1) != 1
trigger1 = command != "holdfwd"
value = 0

[State 100, 4]
type = ChangeState
triggerall = Var(1) = 1
trigger1 = P2BodyDist X < 10
trigger2 = time >= 30
value = 0
ctrl = 1

; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 1
anim = 105
sprpriority = 1

[State 105]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Nostandguard

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Noairguard

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = -2.5
y = -5

[state 105]
type = ChangeAnim
trigger1 = Time = 18
value = 106

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 107

[Statedef 107]
type    = A
ctrl = 0
anim = 106
sprpriority = 1

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Nostandguard

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Noairguard

[State 105]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 107]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 108, 1]
type = VelSet
trigger1 = Time = 5
x = -2
y = -4.5

[State 107]
type = PlaySnd
trigger1 = Time = 1
value = 7, 0

[State 107]
type = PlaySnd
trigger1 = Time = 1
value = 26, 3
volume = 500

[State 107, 3]
type = ChangeState
trigger1 = time = 6
value = 108

[Statedef 108]
type    = A
physics = A
ctrl = 0
anim = 107
sprpriority = 1

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Nostandguard

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Noairguard

[State 105]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 108, 1]
type = VelSet
trigger1 = Time = 4
x = -2
y = -4.5

[State 105, 2]
type = CtrlSet
trigger1 = Time = 4
value = 1

[State 108, 3]
type = ChangeState
trigger1 = time > 5
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106
;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 47

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Nostandguard

[State 105]
type = AssertSpecial
trigger1 = 1
flag = Noairguard

[State 105]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 106, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 106, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, 3]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 106, 4]
type = ChangeState
trigger1 = Time = 7
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Stand Strong Punch
[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
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
poweradd = 10                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set layering priority to 2 (in front)
hitcountpersist = 1

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 33                      ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 12, 12                 ;Time attacker pauses, time opponent shakes
sparkno = S1905                      ;Spark anim no (Def: set above)
guard.sparkno = S1906
sparkxy = 0, -30               ;X-offset for the "hit spark" rel. to p2,
hitsound = S3, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -3             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
air.hittime = 12                 ;Time before opponent regains control in air

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9, 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 26, 7
volume = 500

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

;---------------------------------------------------------------------------
; Standing Light punch
; CNS difficulty: easy
[Statedef 201]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 10
ctrl = 0
velset = 0,0
anim = 201
sprpriority = -1
hitcountpersist = 1

[State 201, 1]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 201, 1]
type = PlaySnd
trigger1 = Time = 2
value = 26, 6
volume = 500

[State 201, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 23
guardflag = MA
pausetime = 8,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-32
hitsound   = S3,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -2,0
air.velocity = -2.5,-4

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

[Statedef 202]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 10
ctrl = 0
velset = 0,0
anim = 202
sprpriority = -1
hitcountpersist = 1

[State 201, 1]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 201, 1]
type = PlaySnd
trigger1 = Time = 2
value = 26, 8
volume = 500

[State 201, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 35
guardflag = MA
pausetime = 5,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 5,-53
hitsound   = S1,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -.5,-3.5
air.velocity = -2.5,-4

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

[Statedef 203]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 10
ctrl = 0
velset = 0,0
anim = 202
sprpriority = -1
hitcountpersist = 1

[State 203, 2]
type = Veladd
trigger1 = AnimElem = 2
x = 3

[State 203, 1]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 203, 1]
type = PlaySnd
trigger1 = Time = 2
value = 26, 8
volume = 500

[State 203, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 35
guardflag = MA
pausetime = 0,0
sparkno = S1905
guard.sparkno = S1906
sparkxy = 5,-53
hitsound   = S1,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -.5,-8.5
air.velocity = -.5,-8.5

[State 203]
type = varset
trigger1 = Movehit
v = 15
value = 1

[State 203]
type = ChangeState
trigger1 = Movehit
value = 10040

[State 203, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 10
ctrl = 0
velset = 0,0
anim = 212
sprpriority = 2
hitcountpersist = 1

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 26, 5
volume = 500

[State 210, 2]
type = HitDef
trigger1 = Animelem = 2
attr = S, NA
animtype  = Medium
damage    = 26
guardflag = MA
pausetime = 8,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 8,-25
hitsound   = S2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -2
air.velocity = -2.5,-3.5

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

;---------------------------------------------------------------------------
; Standing strong kick
; CNS difficulty: easy
[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd = 10
ctrl = 0
velset = 0,0
anim = 211
sprpriority = 2
hitcountpersist = 1

[State 240, 2]
type = Veladd
trigger1 = AnimElem = 2
trigger1 = Var(1) = 1
x = 3

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 33
guardflag = MA
pausetime = 8,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 8,-22
hitsound   = S2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3.5
air.velocity = -2.2,-3.2

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

[Statedef 212]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 10
ctrl = 0
velset = 0,0
anim = 210	
sprpriority = 2
hitcountpersist = 1

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 40
guardflag = MA
pausetime = 8,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 8,-30
hitsound   = S2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4
air.velocity = -2.2,-3.2

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 10
ctrl = 0
anim = 400
sprpriority = 2
hitcountpersist = 1

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9, 0

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 23
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 11,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-24
hitsound   = S3,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.5,-3

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

;Crouching Power Pole
[Statedef 401]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 10
ctrl = 0
anim = 402
sprpriority = 2
hitcountpersist = 1

[State 401, 1]
type = PlaySnd
trigger1 = Time = 13
value = 9, 0

[STate 401]
type = ChangeAnim
trigger1 = time = 9
value = 401

[State 401, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = Anim = 401
attr = C, NA
damage    = 35
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-34
hitsound   = S1,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 14
ground.velocity = -5,-1.2
air.velocity = -1.5,-4
air.fall = 1

[State 401]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 401
value = 403

[State 401, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 403
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Crouching Kick
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 10
ctrl = 0
anim = 410
sprpriority = 2
hitcountpersist = 1

[State 410, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9, 0

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 35
animtype  = Medium
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-2
hitsound   = S2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3
air.velocity = -3,-3

[State 410, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Crouching Kick
[Statedef 411]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 10
ctrl = 0
anim = 411
sprpriority = 2
hitcountpersist = 1

[State 411, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9, 0

[State 411, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 37
animtype  = Medium
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-12
hitsound   = S2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3
air.velocity = -1,-4

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

;Crouching Kick
[Statedef 412]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 10
ctrl = 0
anim = 410
sprpriority = 2
hitcountpersist = 1

[State 412]
type = Veladd
trigger1 = time = 5
x = 8

[State 412, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9, 0

[State 412, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 40
animtype  = Medium
hitflag = MAF
guardflag = L
pausetime = 10,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-2
hitsound   = S2,0
guardsound = 6,0
ground.type = trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1,-4.8
air.velocity = -3,-4

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

;Jump Punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 10
ctrl = 0
anim = 600
sprpriority = 2
hitcountpersist = 1

[State 600]
type = Varadd
trigger1 = time = 0
v = 8
value = 1

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9, 0

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 10,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 8,-18
hitsound   = S3,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,ifelse(p2bodydist y <= 5,-1, -3) 

[State 600, 3]
type = CtrlSet
trigger1 = Time = 13
value = 1

;----------------------------------------------------------------------
;Jump Kick
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 10
ctrl = 0
anim = 613
sprpriority = 2
hitcountpersist = 1

[State 610]
type = Varadd
trigger1 = time = 0
v = 8
value = 1

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 26
guardflag = HA
priority = 4
pausetime = 10,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 5,5
hitsound   = S2,0
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -1.3,ifelse(p2bodydist y <= 5,-1, -3)

[State 610, 3]
type = CtrlSet
trigger1 = Time = 15
value = 1

;Super Jump Kick
[Statedef 612]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 10
ctrl = 0
anim = 610
sprpriority = 2
hitcountpersist = 1

[State 612, 2]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 612, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 30
guardflag = HA
priority = 4
pausetime = 14,16
sparkno = S1905
guard.sparkno = S1906
sparkxy = 5,-27
hitsound   = S2,0
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -4.3,-4
fall = ifelse(enemynear,pos y < 0,1,0)

[State 612, 3]
type = CtrlSet
trigger1 = Time = 15
value = 1

;Jump Kick
[Statedef 611]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 6
ctrl = 0
anim = 612
sprpriority = 2
hitcountpersist = 1

[State 611]
type = Varadd
trigger1 = time = 0
v = 8
value = 1

[State 611, 2]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 611, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 23
guardflag = HA
priority = 4
pausetime = 10,12
sparkno = S1905
guard.sparkno = S1906
sparkxy = 5,-20
hitsound   = S2,0
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -1.3,ifelse(p2bodydist y <= 5,-1, -3)

[State 611, 3]
type = CtrlSet
trigger1 = Time = 15
value = 1
;---------------------------------------------------------------------
;Jump Power Pole 1
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
ctrl = 0
anim = 611
sprpriority = 2
hitcountpersist = 1

[State 630]
type = Varset
trigger1 = AnimElem = 3
v = 7
value = 1

[State 630, 1]
type = PlaySnd
trigger1 = Time = 1
value = 25, 0

[State 630, 1]
type = PlaySnd
trigger1 = Time = 0
value = 26, 2
volume = 500

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 35
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = -5,0
hitsound   = S1,0
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -4,0
air.fall = 1

;---------------------------------------------------------------------------
;Jump Power Pole 2
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 601
sprpriority = 2
hitcountpersist = 1

[State 640]
type = Varset
trigger1 = Animelem = 4
v = 7
value = 1

[State 640, 2]
type = PlaySnd
trigger1 = Time = 2
value = 25, 0

[State 640, 2]
type = PlaySnd
trigger1 = Time = 0
value = 26, 0
volume = 500

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 40
guardflag = HA
priority = 4
pausetime = 6,0
sparkno = S1905
guard.sparkno = S1906
sparkxy = -5,15
hitsound   = S1,0
guardsound = 6,0
animtype = Med
ground.type = High
air.type = trip
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6.5
air.velocity = -3,3

;---------------------------------------------------------------------------
; Throw Start
[Statedef 800]
type = S
movetype = A
physics = S
anim = 800
velset = 0,0
ctrl = 0

[State 800, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
priority = 2, miss
sparkno = -1
snap = 32,0,0,1
p1stateno = 810
p2stateno = 820
palfx.time = 1
palfx.mul = 256,256,256
palfx.add = 0,0,0
p2facing = 1

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

; Throw Continue
[Statedef 810]
type = S
movetype = A
physics = S
anim = 810
velset = 0,0

[State 810, Invincibility]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

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

[State 810, Damage]
type = TargetLifeAdd
trigger1 = animtime = 0
value = -50

[State 810, Bind1]
type = TargetBind
trigger1 = AnimElem = 1, >= 0
trigger1 = AnimElem = 2, < 0
pos = 10,0

[State 810, Bind2]
type = TargetBind
trigger1 = AnimElem = 2, >= 0
trigger1 = AnimElem = 3, < 0
pos = 10,0

[State 810, Bind2]
type = TargetBind
trigger1 = AnimElem = 3, >= 0
trigger1 = AnimElem = 4, < 0
pos = 10,0

[State 810, 12]
type = TargetState
trigger1 = AnimElem = 4
value = 821

[State 810, Turn]
type = Turn
trigger1 = AnimElem = 5

[State 810, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 9, 0

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

;---------------------------------------------------------------------------
; Throw
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 930, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

[State 930, 2]
type = HitBy
Trigger1 = Time >= 0
value = SCA
time = 1

;-------------------------------------------------------------------------
; Player 2 State
[Statedef 821]
type    = A
movetype= H ;Get hit
physics = N
velset = 5,-5.5
ctrl = 0

[State 821, 1]
type = Changeanim2
trigger1 = Time = 0
value = 821

[State 821, 1]
type = PosAdd
Trigger1 = Time = 0
x =  10
y = -20

[State 821, 2] ;Gravity
type = VelAdd
Trigger1 = Time > 0
y = .4

[State 821, 3]
type = LifeAdd
Trigger1 = Time = 0
value = -60

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = 5100 ;Hit ground

[State 821, 9]
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 821, 10]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = time >= 41
value = 5100
ctrl = 1

;Kamehameha
[Statedef 2000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 2000
ctrl = 0

[State 2000]
type = turn
trigger1 = prevstateno = 810
trigger1 = time = 0

[State 2000]
type = Varset
trigger1 = Time = 0
trigger1 = Var(1) = 1
v = 23
value = 0

[State 2000]
type = Varset
trigger1 = Time = 0
trigger1 = Var(1) = 1
v = 5
value = 0

[State 2000]
type = SuperPause
trigger1 = Time = 2
pos = 0, -60
anim = 30
movetime = 30
time = 30
darken = 0

[State 2000]
type = ScreenBound
Trigger1 = Time >= 0
value = 1
movecamera = 1,1

[State 2000] 
type = Playsnd
trigger1 = animelem = 1
value = 2000,0
channel = 1
volume = 500

[State 2000]
type = PowerAdd
trigger1 = Time = 5
value = -2000

[State 2000]
type = ChangeAnim
trigger1 = Time = 30
value = 2003

[State 2000]
type = helper
trigger1 = Time = 36
helpertype = normal
name = "kamehameha"
ID = 2000
pos = 5,-64
postype = p1
stateno = 2001
ownpal = 1

[State 2000]
type = ChangeState
trigger1 = Time = 75
value = 0
ctrl = 1

[Statedef 2001]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 2001
ctrl = 0
sprpriority = 3

[state 2001]
type = Assertspecial
trigger1 = time >= 0
flag = noshadow

[State 2001] 
type = Playsnd
trigger1 = time = 0
value = 8,1

[State 2001]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 300,20
guardflag = MA
numhits = 1
pausetime = 0, 20
sparkno = S1900
sparkxy = 50,-10
hitsound   = -1
guardsound = 6,0
ground.type = trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -10, -4
ground.cornerpush.veloff =0
air.cornerpush.veloff = 0
air.velocity = -10,0

[State 2001]
type = ChangeAnim
triggerall = anim != 2002
trigger1 = time = 25
trigger2 = (Parent, Movetype = H)
value = 2002

[State 2001]
type = Destroyself
trigger1 = animtime = 0
trigger1 = anim = 2002

;Power Pole 1
[Statedef 1100]
type    = S                      
movetype= A                     
physics = S                     
juggle  = 1                      
velset = 0,0             
ctrl = 0                         
anim = 1100
Poweradd = -1000                       
sprpriority = 2 

[State 1100]
type = turn
trigger1 = prevstateno = 810
trigger1 = time = 0

[State 1100]
type = Varadd
trigger1 = Time = 0
trigger1 = Var(1) = 1
v = 5
value = 1                 

[State 1100]
type = PlaySnd
trigger1 = Time = 0
value = 1100, 2
volume = 500

;[state 1100]
;type = explod
;trigger1 = time = 35
;anim = 1103
;pos = 150,245
;postype = left
;bindtime = -1
;removetime = 83
;scale = 1,1
;ownpal = 1
;facing = 1
;ontop = 1
;removeongethit = 1
;sprpriority=999
;supermovetime = 9999

[State 1100]
type = SuperPause
trigger1 = Time = 0
anim = -1
darken = 0
movetime = 99
time = 99

[State 1100]
type = VarSet
trigger1 = time=0
fvar(2)=1

[State 1100]
type = VarSet
trigger1 = time=0
fvar(3) = 22

[State 1100]
type = VarSet
trigger1 = time=0
trigger1 = facing = -1
fvar(4) = 22

[State 1100]
type = VarAdd
trigger1 = (time = [100,140])
fvar(3) = 3.6

[State 1100]
type = VarAdd
trigger1 = (time = [100,140])
trigger1 = facing = -1
fvar(4) = 4.9

[State 1100]
type = VarAdd
trigger1 = (time = [100,140])
fvar(2)= 1.2

[state 1100, ex2]
type = explod
trigger1 = (time = [100,140])
trigger1 = facing = 1
anim = 1101
pos = floor(fvar(3)),0
bindtime = -1
removetime = 10
postype = p1
scale = floor(fvar(2)),1
ownpal = 1
ontop = 1
removeongethit = 1
sprpriority=999
supermovetime = 9999

[state 1100, ex2]
type = explod
trigger1 = (time = [100,140])
trigger1 = facing = -1
anim = 1101
pos = floor(fvar(4)),0
bindtime = -1
removetime = 10
postype = p1
scale = floor(fvar(2)),1
ownpal = 1
ontop = 1
removeongethit = 1
sprpriority=999
supermovetime = 9999

[STate 1100]
type = helper
trigger1 = time = 100
helpertype = normal
name = "Dust"
ID = 1102
pos = 11,0
postype = p1
facing = 1
stateno = 1102
ownpal = 1

[State 1100, Proj]
type = Projectile
trigger1 = time = 100
;trigger1 = ProjContact1100 = 0
ProjID = 1100
ProjAnim = 1102
ProjRemoveTime = 40
ProjSprPriority = 2
Offset = 11,0
PosType = p1
Velocity = 8.5, 0
Accel = 0, 0
pausetime = 0, 4
Attr = S,SP
Hitflag = MAF
Guardflag = M
AnimType = medium
Damage = 143
sparkno = S1905
guard.sparkno = S1906
Sparkxy = 30, -20
hitsound   = S1,0
guardsound = 6,0
Ground.type = Trip
Ground.velocity = -20,-5 
Air.velocity = -20, -5

[State 1100]
type = VarSet
trigger1 = ProjContact1100 = 1
var(4) = 1

[State 1100]
type = ScreenBound
trigger1 = Var(4) = 1
value = 0

[State 1100]
type = VarAdd
trigger1 = (time = [150,190])
fvar(3) = -3.6

[State 1100]
type = VarAdd
trigger1 = (time = [150,190])
trigger1 = facing = -1
fvar(4) = -4.9

[State 1100]
type = VarAdd
trigger1 = (time = [150,190])
fvar(2)= -1.2

[state 1100, ex1]
type = explod
trigger1 = (time = [150,190])
trigger1 = facing = 1
anim = 1101
pos = floor(fvar(3)),0
postype = p1
bindtime = -1
removetime = 1
scale = floor(fvar(2)),1
ownpal = 1
facing = 1
ontop = 1
removeongethit = 1
sprpriority=999
supermovetime = 9999

[state 1100, ex1]
type = explod
trigger1 = (time = [150,190])
trigger1 = facing = -1
anim = 1101
pos = floor(fvar(4)),0
postype = p1
bindtime = -1
removetime = 1
scale = floor(fvar(2)),1
ownpal = 1
facing = 1
ontop = 1
removeongethit = 1
sprpriority=999
supermovetime = 9999

[State 1100]
type = VarSet
trigger1 = AnimTime = 0
var(4) = 0

[State 1100]
type = ChangeState
trigger1 = AnimTime = 0
value = 1101
ctrl = 0

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

[Statedef 1101]
type    = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 1101]
type = ScreenBound
trigger1 = 1
value = 0

[State 1101]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 4
value = 333, 1

[State 1101]
type = VelSet
trigger1 = 1
trigger1 = BackEdgeBodyDist <= 40
x = const(velocity.run.fwd.x)

[State 1101]
type = ChangeState
trigger1 = BackEdgeBodyDist > 40
value = 0
ctrl = 1

[Statedef 1102]
type    = S
anim = 1102
sprpriority = 1
ctrl = 0
velset = 8.5

[State 1101]
type = makedust
trigger1 = time >= 0

[State 1101]
type = destroyself
trigger1 = parent, stateno = 1100
trigger1 = parent, time = 140
trigger2 = parent, stateno != 1100

[Statedef 1200]
type    = S           
movetype= I            
physics = S                    
velset = 0,0           
ctrl = 0                     
anim = 1200                     
sprpriority = 2  

[State 1200]
type = Varset
trigger1 = time = 0
v = 7
value = 0

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

; Super Jump Start
[Statedef 1040]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 1040]
type = PLaysnd
trigger1 = time= 0
value = 8,2

[State 1040]
type = PLaysnd
trigger1 = Animtime= 0
value = 10,0

[State 1040, 4]
type = VelSet
trigger1 = AnimTime = 0
x = 0
y = -14

[State 1040, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

; Super Jump Start fwd
[Statedef 1041]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 1041]
type = PLaysnd
trigger1 = time= 0
value = 8,2

[State 1041]
type = PLaysnd
trigger1 = Animtime= 0
value = 10,0

[State 1041, 4]
type = VelSet
trigger1 = AnimTime = 0
x = 6
y = -7

[State 1041, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

; Super Jump Start back
[Statedef 1042]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 1042]
type = PLaysnd
trigger1 = time= 0
value = 8,2

[State 1042]
type = PLaysnd
trigger1 = Animtime= 0
value = 10,0

[State 1042, 4]
type = VelSet
trigger1 = AnimTime = 0
x = -4.55
y = -7

[State 1042, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

[Statedef 2200]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 2200
sprpriority = -1
hitcountpersist = 1

[State 2200]
type = Statetypeset
trigger1 = time = 0
trigger1 = Pos Y < 0
physics = A

[State 2200]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 2200]
type = PlaySnd
trigger1 = Time = 2
value = 26, 6
volume = 500

[State 2200]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 21,5
guardflag = MA
pausetime = 10,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-32
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1,-2
air.velocity = -2.5,-2

[State 2200]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Pos Y < 0
value = 50

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

; Jump Start
[Statedef 10040]
type    = S
physics = S
anim = 10040
ctrl = 0
sprpriority = 1

[State 10040, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 10040, 2]
type = VarSet
trigger1 = time = 0
sysvar(1) = 1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = var(15) = 1
x = const(velocity.jump.fwd.x)
y = -11

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = var(15) != 1
x = const(velocity.jump.fwd.x)
y = -7.5

[State 10040, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 203]
type = varset
trigger1 = AnimTime = 0
trigger1 = var(15) = 1
v = 15
value = 0

[State 10040, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 10050
ctrl = 1

; Jump Up
[Statedef 10050]
type    = A
physics = A

[State 10050, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 10050, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 10042, 43))

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

; Jump Down (empty state for compatibility)
[Statedef 10051]
type    = A
physics = A

[State 51, 1]
type = Null
trigger1 = 1

;---------------------------------------------------------------------------
; Jump Land
[Statedef 10052]
type    = S
physics = S
ctrl = 0
anim = 47

[State 10052, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 10052, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 10052, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

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

[Statedef 1300]
type    = A
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 1300
sprpriority = -1
hitcountpersist = 1

[State 1300]
type = Varset
trigger1 = time = 0
v = 8
value = 0

[state 1300]
type = explod
trigger1 = time = 3
trigger1 = pos y = 0
anim = 1902
pos = -99,-10
postype = p1
bindtime = 1
removetime = -2
scale = 1,1
ownpal = 1
sprpriority=999

[State 1300]
type = velset
trigger1 = time = 3
x = 6

[State 1300]
type = veladd
trigger1 = time = 3
y = ifelse(pos y < 0, 0, -4.5)

[State 1300]
type = Statetypeset
trigger1 = time = 3
physics = A

[State 1300]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 1300]
type = PlaySnd
trigger1 = Time = 2
value = 26, 6
volume = 500

[State 1300]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 39,6
guardflag = MA
pausetime = 10,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-12
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5,-2
air.velocity = -9,-1
fall = 1

[State 1300]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Pos Y < 0
value = 50

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

[Statedef 1400]
type    = A
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 1300
sprpriority = -1

[state 1400]
type = explod
trigger1 = time = 3
trigger1 = pos y = 0
anim = 1902
pos = -99,-10
postype = p1
bindtime = 1
removetime = -2
scale = 1,1
ownpal = 1
sprpriority=999

[State 1400]
type = velset
trigger1 = time = 3
x = 4

[State 1400]
type = veladd
trigger1 = time = 3
y = ifelse(pos y < 0, 0, -4.5)

[State 1400]
type = Statetypeset
trigger1 = time = 3
physics = A

[State 1400]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 1400]
type = PlaySnd
trigger1 = Time = 2
value = 26, 6
volume = 500

[State 1400]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 24,5
guardflag = MA
pausetime = 10,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-12
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5,-2
air.velocity = -9,-1
fall = 1

[State 1400]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Pos Y < 0
value = 50

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

;Kamehameha Blast
[Statedef 2100]
type    = S
movetype= A
physics = S
velset = 0,0,0
anim = 2000
ctrl = 0

[State 2100]
type = Statetypeset
trigger1 = time = 0
trigger1 = Pos Y < 0
physics = A

[State 2100] 
type = Playsnd
trigger1 = animelem = 1
value = 2000,1
channel = 1
volume = 500

[State 2100]
type = ChangeAnim
trigger1 = Time = 20
value = 2003

[State 2100]
type = Projectile
trigger1 = Time = 21
projanim = 2100
projhitanim = 1900
projid = 2100
projremovetime = 80
velocity = 6
offset = -38,-62
attr = S, SP
projhits = 2
projscale = .8,.8
projmisstime = 5
damage = 15,4
animtype = Hard
pausetime = 2,10
sprpriority = 3
sparkno = -1
sparkxy = 0, 30
guard.sparkno = -1
hitsound   = S19,0
guardsound = 6, 0
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -3
air.velocity = -1.5
air.fall = 1

[State 2100]
type = Statetypeset
trigger1 = Pos Y > -6
physics = S

[State 2100]
type = velset
trigger1 = Pos Y > -6
x=0
y=0

[State 2100]
type = ChangeState
trigger1 = Time = 40
value = 0
ctrl = 1

;Kamehameha Blast- Hard
[Statedef 2300]
type    = S
movetype= A
physics = S
velset = 0,0,0
anim = 2000
ctrl = 0

[State 2300]
type = Statetypeset
trigger1 = time = 0
trigger1 = Pos Y < 0
physics = A

[State 2300] 
type = Playsnd
trigger1 = animelem = 1
value = 2000,1
channel = 1
volume = 500

[State 2300]
type = ChangeAnim
trigger1 = Time = 20
value = 2003

[State 2300]
type = Projectile
trigger1 = Time = 21
projanim = 2100
projhitanim = 1900
projremovetime = 80
projid = 2100
velocity = 6
offset = -38,-62
attr = S, SP
projhits = 3
projscale = .8,.8
projmisstime = 5
damage = 15,4
animtype = Hard
pausetime = 2,10
sprpriority = 3
sparkno = -1
sparkxy = 0, 30
guard.sparkno = -1
hitsound   = S19,0
guardsound = 6, 0
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -3
air.velocity = -1.5
air.fall = 1

[State 2100]
type = Statetypeset
trigger1 = Pos Y > -6
physics = S

[State 2100]
type = velset
trigger1 = Pos Y > -6
x=0
y=0

[State 2300]
type = ChangeState
trigger1 = Time = 40
value = 0
ctrl = 1

[Statedef 2400]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 2200
sprpriority = -1

[State 2400]
type = Varset
trigger1 = time = 0
trigger1 = var(8) = 3
v = 8
value = 6

[State 2400]
type = Statetypeset
trigger1 = time = 0
trigger1 = Pos Y < 0
physics = A

[State 2400]
type = PlaySnd
trigger1 = Time = 2
value = 9, 0

[State 2400]
type = PlaySnd
trigger1 = Time = 2
value = 26, 6
volume = 500

[State 2400]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 36,8
guardflag = MA
pausetime = 10,8
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-32
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1,-2
air.velocity = -2.5,-2

[State 2400]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Pos Y < 0
value = 50

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

;Standing Power Pole
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 10
ctrl = 0
anim = 241
sprpriority = 2

[State 630, 1]
type = PlaySnd
trigger1 = Time = 2
value = 25, 0

[STate 240]
type = ChangeAnim
trigger1 = time = 4
value = 240

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = Anim = 240
attr = S, NA
damage    = 40
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = S1905
guard.sparkno = S1906
sparkxy = 0,-5
hitsound   = S1,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 14
ground.velocity = -5,0
air.velocity = -3.5

[State 240]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 240
value = 242

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 242
value = 0
ctrl = 1

; Tornado
[Statedef 250]
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
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 250                     
sprpriority = 2
poweradd = -1000 

[State 250]
type = Varadd
trigger1 = Time = 0
trigger1 = Var(1) = 1
v = 23
value = 1 

[State 250]
type = velset
trigger1 = command = "holdfwd"
trigger1 = command != "holdback"
trigger1 = Var(1) != 1
trigger1 = time > 60
trigger1 = time < 300
x = 6   

[State 250]
type = velset
trigger1 = command = "holdback"
trigger1 = command != "holdfwd"
trigger1 = Var(1) != 1
trigger1 = time > 60
trigger1= time < 300
x = -6 

[State 250]
type = velset
trigger1 = command = "holdback"
trigger1 = command = "holdfwd"
trigger1 = Var(1) != 1
trigger1 = time > 60
trigger2 = time =300
x = 0

[State 250]
type = velset
trigger1 = time > 60
trigger1 = time < 300
trigger1 = Var(1) = 1
trigger1 = p2bodydist x >= -30
x = 6   

[State 250]
type = velset
trigger1 = p2bodydist x < -30
trigger1 = Var(1) = 1
trigger1 = time > 60
trigger1 = time < 300
x = -6

[State 250]
type = velset
trigger1 = time =300
trigger1 = Var(1) = 1
x = 0
    
[state 250]
type = explod
trigger1 = time = 73
anim = 1903
id = 1903
pos = -23,0
postype = p1
bindtime = -1
removetime = 227
scale = 1.2,.5
ownpal = 1
sprpriority=999

[state 250]
type = explod
trigger1 = time = 300
anim = 1904
id = 1904
pos = -23,0
postype = p1
bindtime = -1
removetime = -2
scale = 1.2,.5
ownpal = 1
sprpriority=999

[State 250, 1]
type = HitDef
triggerall = time <= 288
trigger1 = AnimElem = 9
trigger2 = AnimElem = 11
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 9                     ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0, 0                 ;Time attacker pauses, time opponent shakes
sparkno =  S1905                  ;Spark anim no (Def: set above)
guard.sparkno = S1906
sparkxy = 0, -32               
hitsound = S3, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -13             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
air.hittime = 12                 ;Time before opponent regains control in air

[State 250, 1]
type = HitDef
triggerall = time > 288
trigger1 = AnimElem = 9
trigger2 = AnimElem = 11
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 9                     ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0, 0                 ;Time attacker pauses, time opponent shakes
sparkno =  S1905                   ;Spark anim no (Def: set above)
guard.sparkno = S1906
sparkxy = 0, -32               
hitsound = 5, 3                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = trip               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -7,-3             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = trip                 ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
air.hittime = 12 

[State 250, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9, 0

[State 250, 1]
type = PlaySnd
trigger1 = Time = 2
value = 26, 6
volume = 500

[state 250]
type = changeanim
trigger1 = time = 300
value = 251

[State 250, 7]
type = ChangeState
trigger1 = Time = 324
value = 251
ctrl = 1

[Statedef 251]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 5300                   
sprpriority = 2

[State 251, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 250, 7]
type = ChangeState
trigger1 = Time = 250
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52
trigger2 = stateno = 106
value = 7, 0
