;Fireball
[Statedef 1000]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1000

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = 4000,3
channel = 1

[State 1000, 2-1]
type = Projectile
trigger1 = AnimElem = 5
trigger1 = Var(9) = 1
projanim = 1001
projhitanim = 1002
offset = -6,-92
velocity = 3,0
remvelocity = 0, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 150,28
animtype = Medium
pausetime = 0,0
;sparkno = 0,1
;sparkxy = 10, 0
hitsound   = S4000,5
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1
kill = 0

[State 1000, 2-2]
type = Projectile
trigger1 = AnimElem = 5
trigger1 = Var(9) = 0
projanim = 1001
projhitanim = 1002
offset = -6,-92
velocity = 3,0
remvelocity = 0, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 150,28
animtype = Medium
pausetime = 0,0
;sparkno = 0,1
;sparkxy = 10, 0
hitsound   = S4000,5
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1

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

[State 1000, 4]
type = PlaySnd
trigger1 = AnimElem = 5
value = 4000,4

;Ducking Fireball
[Statedef 1010]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1010

[State 1010, 1]
type = PlaySnd
trigger1 = Time = 0
value = 4000,3
channel = 1

[State 1010, 2-1]
type = Projectile
trigger1 = AnimElem = 2
trigger1 = Var(9) = 1
projanim = 1001
projhitanim = 1002
offset = 10,-57
velocity = 3,0
remvelocity = 0, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 150,28
animtype = Medium
pausetime = 0,0
;sparkno = 0,1
;sparkxy = 10, 0
hitsound   = S4000,5
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1
kill = 0

[State 1010, 2-2]
type = Projectile
trigger1 = AnimElem = 2
trigger1 = Var(9) = 0
projanim = 1001
projhitanim = 1002
offset = 10,-57
velocity = 3,0
remvelocity = 0, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 150,28
animtype = Medium
pausetime = 0,0
;sparkno = 0,1
;sparkxy = 10, 0
hitsound   = S4000,5
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1

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

[State 1010, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4000,4

;Air Fireball
[Statedef 1020]
type    = A
movetype= A
physics = N
poweradd= 100
velset = 0,0
ctrl = 0
anim = 1020

[State 1020, 1]
type = PlaySnd
trigger1 = Time = 0
value = 4000,3
channel = 1

[State 1020, 2-1]
type = Projectile
trigger1 = AnimElem = 2
trigger1 = Var(9) = 1
projanim = 1001
projhitanim = 1002
offset = -6,-66
velocity = 3,0
remvelocity = 0, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 150,28
animtype = Medium
pausetime = 0,0
;sparkno = 0,1
;sparkxy = 10, 0
hitsound   = S4000,5
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1
kill = 0

[State 1020, 2-2]
type = Projectile
trigger1 = AnimElem = 2
trigger1 = Var(9) = 0
projanim = 1001
projhitanim = 1002
offset = -6,-66
velocity = 3,0
remvelocity = 0, 0
;velmul = 1.01, 1
;accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 150,28
animtype = Medium
pausetime = 0,0
;sparkno = 0,1
;sparkxy = 10, 0
hitsound   = S4000,5
guardflag = MA
guardsound = 6,0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1

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

[State 1020, 4]
type = VelAdd
trigger1 = AnimElem >= 4
y = 8

[State 1020, 5]
type = ChangeState
trigger1 = Pos y >= 0
value = 0
ctrl = 1

[State 1020, 6]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4000,4

; Bike Kick
[Statedef 1030]
type = A
movetype = A
physics = A
anim = 1030
velset = 14,-4
juggle  = 8                      ;Number of air juggle points move takes
ctrl = 0

[State 1030, InAir]
type = PosAdd
trigger1 = time = 0
Y = -45

[State 1030, Voice]
type = PlaySnd
trigger1 = time = 0
value = 4000,6

[State 1030, HitDef1]
type = HitDef
trigger1 = time >= 0
trigger1 = Var(9) = 1
attr = A, SA
damage = 213,53
animtype = Heavy
guardflag = MA  ;hitflag = MAF
priority = 7, Hit
pausetime = 0,0
;sparkno = 1                      ;Spark anim no (Def: set above)
sparkno = -1                     ;Spark anim no (Def: set above)
hitsound = S5,7                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
ground.type = High
air.animtype = Low
ground.slidetime = 0
ground.hittime = 0
ground.velocity = 0,0   ;,-4
air.velocity = 0,0
p1stateno = 1031
p2stateno = 1032
p2facing = 1
fall = 1
kill = 0

[State 1030, HitDef2]
type = HitDef
trigger1 = time >= 0
trigger1 = Var(9) = 0
attr = A, SA
damage = 213,53
animtype = Heavy
guardflag = MA  ;hitflag = MAF
priority = 7, Hit
pausetime = 0,0
;sparkno = 1                      ;Spark anim no (Def: set above)
sparkno = -1                     ;Spark anim no (Def: set above)
hitsound = S5,7                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
ground.type = High
air.animtype = Low
ground.slidetime = 0
ground.hittime = 0
ground.velocity = 0,0   ;,-4
air.velocity = 0,0
fall = 1
p1stateno = 1031
p2stateno = 1032
p2facing = 1

[State 1030, Hit]
type = ChangeState
;trigger1 = movehit = 1
trigger1 = moveguarded = 1
value = 1034

; Bike Kick Hits
[Statedef 1031]
type = A
movetype = A
physics = N
anim = 1031
velset = 0,0
juggle  = 8                      ;Number of air juggle points move takes
ctrl = 0

[State 1031, Move1]
type = PosAdd
trigger1 = p2bodydist X > 3
X = 1

[State 1031, Move2]
type = PosAdd
trigger1 = p2bodydist Y < -45
Y = 1

[State 1031, VelSet]
type = VelSet
trigger1 = time < 48
X = 5

[State 1031, Done]
type = ChangeState
trigger1 = time = 48
value = 1035

[State 1031, Sound]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
value = 5,9

; Bike Kick Victum
[Statedef 1032]
type = A
movetype = H
physics = N
anim = 1032
velset = 0,0
juggle  = 8                      ;Number of air juggle points move takes
ctrl = 0

[State 1032, Anim1]
type = ChangeAnim
trigger1 = time = 0
trigger1 = selfanimexist(29900) = 1
value = 29900 

[State 1032, Anim2]
type = ChangeAnim2
trigger1 = time = 0
trigger1 = selfanimexist(29900) = 0
value = 1032 

[State 1032, VelSet]
type = VelSet
trigger1 = time < 50
X = -5

[State 1032, Done]
type = SelfState
trigger1 = time = 50
value = 5050

; Bike Kick Blocked.
[Statedef 1034]
type = A
movetype = A
physics = A
anim = 1031
velset = 0,0
ctrl = 0

[State 1034, InAir]
type = VelSet
trigger1 = AnimElem = 1
X = -1
Y = -6

; Bike Kick Done.
[Statedef 1035]
type = A
movetype = A
physics = A
anim = 1031
velset = 0,0
ctrl = 0

[State 1035, InAir]
type = VelSet
trigger1 = AnimElem = 1
Y = 0

; Flying Kick
[Statedef 1040]
type = A
movetype = A
physics = A
anim = 610
velset = 13,-4
juggle  = 12                      ;Number of air juggle points move takes
ctrl = 0

[State 1040, InAir]
type = PosAdd
trigger1 = time = 0
Y = -45

[State 1040, Voice]
type = PlaySnd
trigger1 = time = 0
value = 4000,7

[State 1040, HitDef1]
type = HitDef
trigger1 = time >= 0
trigger1 = Var(9) = 1
attr = A, SA
damage = 168,43
animtype = Heavy
guardflag = MA  ;hitflag = MAF
priority = 7, Hit
pausetime = 0,0
;sparkno = 1                      ;Spark anim no (Def: set above)
sparkno = -1                     ;Spark anim no (Def: set above)
hitsound = S5,7                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
ground.type = High
air.animtype = Low
ground.slidetime = 0
ground.hittime = 20
ground.velocity = -5,-3   ;,-4
air.velocity = -5,-4
;p1stateno = 1041
fall = 1
kill = 0

[State 1040, HitDef2]
type = HitDef
trigger1 = time >= 0
trigger1 = Var(9) = 0
attr = A, SA
damage = 168,43
animtype = Heavy
guardflag = MA  ;hitflag = MAF
priority = 7, Hit
pausetime = 0,0
;sparkno = 1                      ;Spark anim no (Def: set above)
sparkno = -1                     ;Spark anim no (Def: set above)
hitsound = S5,7                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
ground.type = High
air.animtype = Low
ground.slidetime = 0
ground.hittime = 20
ground.velocity = -5,-3   ;,-4
air.velocity = -5,-4
fall = 1
;p1stateno = 1041

[State 1040, Hit]
type = ChangeState
trigger1 = movehit = 1
trigger2 = moveguarded = 1
value = 1041

; Flying Kick Hits.
[Statedef 1041]
type = A
movetype = A
physics = A
anim = 1041
velset = 0,0
ctrl = 0

[State 1041, InAir]
type = VelSet
trigger1 = AnimElem = 1
Y = 0

;---------------------------------------------------------------------------
;Flip Kick Super
[statedef 2000]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
anim = 2000 ;1050

[State 2000, Super A]
type = SuperPause
trigger1 = time = 6
pos = 0, -75
anim = 100
sound = 20, 0
poweradd = -1000

[state 2000,1]
type = nothitby
trigger1 = Time = 0
time = 10
value = SA

[state 2000,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2001

;Do the Flip
[statedef 2001]
type    = A
movetype= A
physics = A
juggle = 5
anim = 2001 ;1051
velset = 10, -9

[State 2001, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 9000,7

[State 2001, 2]
type = PlaySnd
trigger1 = time = 0
value = 4000,8

[State 2001, 3]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 5
attr = A, SA
damage = 80
guardflag = MA
priority = 4
pausetime = 12,12
hitsound   = S5,9
guardsound = 6,0
animtype = hard
ground.type = High
ground.slidetime = 0
ground.hittime  = 17
ground.velocity = 0,0
guard.velocity = 5
air.velocity = 0,0
kill = 0
;fall = 1
;fall.recover = 0

[state 2001,1-1]
type = velset
trigger1 = time >= 0
trigger1 = p2bodyDist X > 30
x = 11

[state 2001,1-2]
type = velset
trigger1 = time >= 0
trigger1 = p2bodyDist X <= 30
x = 0

[state 2001,1]
type = veladd
trigger1 = time >= 0
y = .03

[state 2001,1]
type = gravity
trigger1 = time >= 0

[state 2001,2]
type = ChangeState
trigger1 = time >= 5
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 2002

;Land
[statedef 2002]
type    = S
movetype= A
physics = S
anim = 2002 ;1052
velset = 0,0

[State 2002, 1]
type = PosSet
trigger1 = time = 0
y = 0

[state 2002,2]
type = ChangeState
trigger1 = animtime = 0
value = 2003
ctrl = 1

;Uppercut after Flip
[Statedef 2003]
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 = 400                       ;Change animation (Def: no change)
;poweradd = 100                    ;Power to add (Def: 0)

[State 2003, 1-1]
type = HitDef
trigger1 = AnimElem = 4
trigger1 = Var(9) = 1
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 215,43                  ;Damage that move inflicts
animtype = Heavy                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
getpower = 75,150                 ;Power to get on hit, on guard
givepower = 15,8                 ;Power to give opponent on hit, on guard
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 victim shakes
;numhits = 1                      ;Number of hits to count as (Def: 1)
sparkno = -1                     ;Spark image group and no (Def: set above)
sparkxy = -10,-70                ;X-offset for the "hit spark" rel. to p2,
hitsound = S5,7                   ;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 victim slides back
ground.hittime = 11             ;Time victim is in hit state
ground.velocity = -2.5, -9.5     ;Velocity at which victim is pushed
airguard.velocity = -1, -1.3   ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.velocity = -2.5,-9.5           ;X-velocity at which victim is pushed,
fall = 1
air.fall = 1
fall.recover = 0
kill = 0

[State 2003, 1-2]
type = HitDef
trigger1 = AnimElem = 4
trigger1 = Var(9) = 0
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 215,43                  ;Damage that move inflicts
animtype = Heavy                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
getpower = 75,150                 ;Power to get on hit, on guard
givepower = 15,8                 ;Power to give opponent on hit, on guard
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 victim shakes
;numhits = 1                      ;Number of hits to count as (Def: 1)
sparkno = -1                     ;Spark image group and no (Def: set above)
sparkxy = -10,-70                ;X-offset for the "hit spark" rel. to p2,
hitsound = S5,7                   ;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 victim slides back
ground.hittime  = 11             ;Time victim is in hit state
ground.velocity = -2.5, -9.5     ;Velocity at which victim is pushed
airguard.velocity = -1, -1.3   ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.velocity = -2.5, -9.5           ;X-velocity at which victim is pushed,
fall = 1
air.fall = 1
fall.recover = 0

[State 2003, No Cam Move]
type = ScreenBound
trigger1 = 1
value = 1
;MoveCamera= 1, 0

[State 2003, 2]
type = PlaySnd
trigger1 = Time = 1
value = 9000, 7

[State 2003, 3]
type = Helper
trigger1 = Time = 6
trigger1 = movehit = 1
stateno = 6040
id = 6000
name = "UPPERCUT"
pos = 21,-99
postype = P1
helpertype = normal
sprpriority = -1
keyctrl = 1
ownpal = 1
under = 1

[State 2003, 3-2]
type = ChangeAnim
trigger1 = Time = 6
trigger1 = movehit = 1
trigger1 = anim = 400
value = 401

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

[State 2003, 5]
type = VarRandom
trigger1 = movehit = 1
v = 11
range = 1, 200

[State 2003, 6]
type = Varset
trigger1 = moveguarded = 1
v = 11
value = 0

[State 2003, 7]
type = Playsnd
trigger1 = p2movetype = H
trigger1 = Var(11) = [1, 24]
trigger1 = time = 12
value = 9001, 0

[State 2003, 8]
type = Playsnd
trigger1 = p2movetype = H
trigger1 = Var(11) = [25, 49]
trigger1 = time = 12
value = 9001, 1

[State 2003, 9]
type = Playsnd
trigger1 = p2movetype = H
trigger1 = Var(11) = [50, 74]
trigger1 = time = 12
value = 9001,2

[State 2003, 10]
type = Playsnd
trigger1 = p2movetype = H
trigger1 = Var(11) = [75, 99]
trigger1 = time = 12
value = 9001,3

[State 2003, 11]
type = Playsnd
trigger1 = p2movetype = H
trigger1 = Var(11) = [100, 124]
trigger1 = time = 12
value = 9001,4

[State 2003, 12]
type = Playsnd
trigger1 = p2movetype = H
trigger1 = Var(11) = [125, 149]
trigger1 = time = 12
value = 9001,5

[State 2003, 13]
type = Playsnd
trigger1 = p2movetype = H
trigger1 = Var(11) = [150, 174]
trigger1 = time = 12
value = 9001,6

;Flip Kick Super Level 2
[statedef 2004]
type    = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
anim = 2000

[State 2004, Super A]
type = SuperPause
trigger1 = time = 6
pos = 0, -75
anim = 100
sound = 20, 0
poweradd = -2000

[state 2004,1]
type = nothitby
trigger1 = Time = 0
time = 10
value = SA

[state 2004,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2005

;Do the Flip
[statedef 2005]
type    = A
movetype= A
physics = A
juggle = 5
anim = 2001 ;1051
velset = 10, -9

[State 2005, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 9000,7

[State 2005, 2]
type = PlaySnd
trigger1 = time = 0
value = 4000,8

[State 2005, 3]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 5
attr = A, SA
damage = 80
guardflag = MA
priority = 4
pausetime = 12,24
hitsound   = S5,9
guardsound = 6,0
animtype = hard
ground.type = High
ground.slidetime = 0
ground.hittime  = 17
ground.velocity = 0,0
guard.velocity = 5
air.velocity = 0,0
kill = 0
;fall = 1
;fall.recover = 0

[state 2005,1-1]
type = velset
trigger1 = time >= 0
trigger1 = p2bodyDist X > 30
x = 11

[state 2005,1-2]
type = velset
trigger1 = time >= 0
trigger1 = p2bodyDist X <= 30
x = 0

[state 2005,1]
type = veladd
trigger1 = time >= 0
y = .03

[state 2005,1]
type = gravity
trigger1 = time >= 0

[state 2005,2]
type = ChangeState
trigger1 = time >= 5
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 2006

[statedef 2006]
type    = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
anim = 2000

[state 2006,0]
type = PosSet
trigger1 = time >= 0
Y = 0

[state 2006,1]
type = nothitby
trigger1 = Time = 0
time = 10
value = SA

[state 2006,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2007

;Do the Flip
[statedef 2007]
type    = A
movetype= A
physics = A
juggle = 5
anim = 2001 ;1051
velset = 10, -9

[State 2007, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 9000,7

[State 2007, 3]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 5
attr = A, SA
damage = 80
guardflag = MA
priority = 4
pausetime = 12,12
hitsound   = S5,9
guardsound = 6,0
animtype = hard
ground.type = High
ground.slidetime = 0
ground.hittime  = 17
ground.velocity = 0,0
guard.velocity = 5
air.velocity = 0,0
kill = 0
;fall = 1
;fall.recover = 0

[state 2007,1-1]
type = velset
trigger1 = time >= 0
trigger1 = p2bodyDist X > 30
x = 11

[state 2007,1-2]
type = velset
trigger1 = time >= 0
trigger1 = p2bodyDist X <= 30
x = 0

[state 2007,1]
type = veladd
trigger1 = time >= 0
y = .03

[state 2007,1]
type = gravity
trigger1 = time >= 0

[state 2007,2]
type = ChangeState
trigger1 = time >= 5
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 2002

;Flip Kick Super Level 3
[statedef 2008]
type    = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
anim = 2000

[State 2008, Super A]
type = SuperPause
trigger1 = time = 6
pos = 0, -75
anim = 100
sound = 20, 0
poweradd = -3000

[state 2008,1]
type = nothitby
trigger1 = Time = 0
time = 10
value = SA

[state 2008,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2009

;Do the Flip
[statedef 2009]
type    = A
movetype= A
physics = A
juggle = 5
anim = 2001 ;1051
velset = 10, -9

[State 2009, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 9000,7

[State 2009, 2]
type = PlaySnd
trigger1 = time = 0
value = 4000,8

[State 2009, 3]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 5
attr = A, SA
damage = 80
guardflag = MA
priority = 4
pausetime = 12,24
hitsound   = S5,9
guardsound = 6,0
animtype = hard
ground.type = High
ground.slidetime = 0
ground.hittime  = 17
ground.velocity = 0,0
guard.velocity = 5
air.velocity = 0,0
kill = 0
;fall = 1
;fall.recover = 0

[state 2009,1]
type = velset
trigger1 = time >= 0
x = 11

[state 2009,1]
type = veladd
trigger1 = time >= 0
y = .03

[state 2009,1]
type = gravity
trigger1 = time >= 0

[state 2009,2]
type = ChangeState
trigger1 = time >= 5
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 1999

[statedef 1999]
type    = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
anim = 2000

[state 1999,0]
type = PosSet
trigger1 = time >= 0
Y = 0

[state 1999,1]
type = nothitby
trigger1 = Time = 0
time = 10
value = SA

[state 1999,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 1998

;Do the Flip
[statedef 1998]
type    = A
movetype= A
physics = A
juggle = 5
anim = 2001 ;1051
velset = 10, -9

[State 1998, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 9000,7

[State 1998, 3]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 5
attr = A, SA
damage = 80
guardflag = MA
priority = 4
pausetime = 12,24
hitsound   = S5,9
guardsound = 6,0
animtype = hard
ground.type = High
ground.slidetime = 0
ground.hittime  = 17
ground.velocity = 0,0
guard.velocity = 5
air.velocity = 0,0
kill = 0
;fall = 1
;fall.recover = 0

[state 1998,1]
type = velset
trigger1 = time >= 0
x = 11

[state 1998,1]
type = veladd
trigger1 = time >= 0
y = .03

[state 1998,1]
type = gravity
trigger1 = time >= 0

[state 1998,2]
type = ChangeState
trigger1 = time >= 5
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 1997

[statedef 1997]
type    = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
anim = 2000

[state 1997,0]
type = PosSet
trigger1 = time >= 0
Y = 0

[state 1997,1]
type = nothitby
trigger1 = Time = 0
time = 10
value = SA

[state 1997,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 1996

;Do the Flip
[statedef 1996]
type    = A
movetype= A
physics = A
juggle = 5
anim = 2001 ;1051
velset = 10, -9

[State 1996, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 9000,7

[State 1996, 3]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 5
attr = A, SA
damage = 80
guardflag = MA
priority = 4
pausetime = 12,12
hitsound   = S5,9
guardsound = 6,0
animtype = hard
ground.type = High
ground.slidetime = 0
ground.hittime  = 17
ground.velocity = 0,0
guard.velocity = 5
air.velocity = 0,0
kill = 0
;fall = 1
;fall.recover = 0

[state 1996,1]
type = velset
trigger1 = time >= 0
x = 11

[state 1996,1]
type = veladd
trigger1 = time >= 0
y = .03

[state 1996,1]
type = gravity
trigger1 = time >= 0

[state 1996,2]
type = ChangeState
trigger1 = time >= 5
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 2002

; Punchy Super--------------------------------------------------------------------------
[Statedef 2010]
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 = 2010                       ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)

[State 2010, Super A]
type = SuperPause
trigger1 = time = 2
pos = 0, -75
anim = 100
sound = 20, 0
poweradd = -1000

[State 2010, Afterimage]
type = AfterImage
trigger1 = Time = 2
length = 5
TimeGap  = 2
FrameGap = 2
Trans = Add
time = 70
ignorehitpause = 1
persistent = 0

[State 2010, 1-1]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
triggerall = Var(9) = 1
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 43,8                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
getpower = 75,150                 ;Power to get on hit, on guard
givepower = 15,8                 ;Power to give opponent on hit, on guard
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 7, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,8                  ;Time attacker pauses, time victim shakes
;numhits = 0                      ;Number of hits to count as (Def: 1)
sparkno = -1                      ;Spark image group and no (Def: set above)
sparkxy = -10,-70                ;X-offset for the "hit spark" rel. to p2,
hitsound = S5,9                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
ground.type = Low               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 1             ;Time that the victim slides back
ground.hittime  = 11             ;Time victim is in hit state
ground.velocity = -0.5             ;Velocity at which victim is pushed
airguard.velocity = -0.4         ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.velocity = -0.3,-3           ;X-velocity at which victim is pushed,
kill = 0

[State 2010, 1-2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
triggerall = Var(9) = 0
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 43,8                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
getpower = 75,150                 ;Power to get on hit, on guard
givepower = 15,8                 ;Power to give opponent on hit, on guard
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 7, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,8                  ;Time attacker pauses, time victim shakes
;numhits = 0                      ;Number of hits to count as (Def: 1)
sparkno = -1                      ;Spark image group and no (Def: set above)
sparkxy = -10,-70                ;X-offset for the "hit spark" rel. to p2,
hitsound = S5,9                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
ground.type = Low               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 1             ;Time that the victim slides back
ground.hittime  = 11             ;Time victim is in hit state
ground.velocity = -0.5             ;Velocity at which victim is pushed
airguard.velocity = -0.4         ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.velocity = -0.3,-3           ;X-velocity at which victim is pushed,

[State 2010, 2-1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 9000, 1

[State 2010, 2-2]
type = PlaySnd
trigger1 = AnimElem = 5
;trigger1 = time = 10
;trigger2 = time = 28
;trigger3 = time = 45
;trigger4 = time = 63
value = 9000, 1
channel = 1

[State 2010, 3]
type = Helper
;trigger1 = Time = 7
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
triggerall = movehit = 1
stateno = 6015
id = 6000
name = "HP Blood"
pos = 70,-79
postype = P1
helpertype = normal
sprpriority = 0
keyctrl = 1
ownpal = 1

[State 2010, 4]
type = ChangeState
;trigger1 = AnimTime = 0
trigger1 = time = 72
value = 0
ctrl = 1

;=============================================================
;Liu Kang's Throw
;=============================================================
[Statedef 3000]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 801

[State 3000, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 3010
p2stateno = 3020
fall = 1

[State 3000, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
[Statedef 3010]
type = S
movetype= A
physics = N
anim = 800
poweradd = 60

[State 3010, 1]
type = PlaySnd
trigger1 = Time = 1
value = 9000, 2

[State 3010, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 33, -68

[State 3010, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 49, -65

[State 3010, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 28, -91

[State 3010, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = 15, -113

[State 3010, Bind 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = -7, -127

[State 3010, Bind 6]
type = TargetBind
trigger1 = AnimElem = 6
pos = -40, -109

[State 3010, Bind 7]
type = TargetBind
trigger1 = AnimElem = 7
pos = -56, -46

[State 3010, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 7
value = -168

[State 3010, Throw]
type = TargetState
trigger1 = AnimElem = 7
value = 3021

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

;----------------------------------------------------------------------
[Statedef 3020]
type = A
movetype = H
physics = N
velset = 0,0

[State 3020, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3010

;----------------------------------------------------------------------
[Statedef 3021]
type = A
movetype = H
physics = N
velset = 6,-2
poweradd = 40

[State 3021, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 3021, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 3021, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

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

;------------------------------------------------------------------------
;FATALITY #1: Rage of the Dragon
;----------------------------------------------------------
;AI Walks to Dragon Fatality Postion
[Statedef 4099]
type    = S
movetype= A
juggle  = 1
anim = 24
velset = 0,0
ctrl = 0

[State 4099, 1-1]
type = Velset
trigger1 = p2bodyDist X > 66
x = const(velocity.walk.fwd.x)

[State 4099, 1-2]
type = Velset
trigger1 = p2bodyDist X < 66
x = const(velocity.walk.back.x)

[State 4099, 1-3]
type = ChangeAnim
trigger1 = p2bodyDist X < 66
trigger1 = anim = 24
value = 25

[State 4099, 1-4]
type = Velset
trigger1 = p2bodyDist X = 66
x = 0

[State 4099, 4]
type = Changestate
trigger1 = p2bodyDist X = 66
value = 4000

[State 4099, 5] ;Kang's in a corner. Do Nothing.
type = Changestate
trigger1 = time >= 150
value = 0
ctrl = 1

[Statedef 4000]
type    = S
movetype= A
juggle  = 1
anim = 4000
velset = 0, 0
ctrl = 0

[State 4000, Var]
type = Varset
trigger1 = time = 0
V = 4
value = 1

[State 4000, 1]
type = Playsnd
trigger1 = Time = 0
value = 2800,0

[State 4000, 2]
type = SuperPause
trigger1 = Time = 0
anim = -1
movetime = 10
time = 28

[State 4000, 3]
type = BGPalFX
trigger1 = time = 2
time = 9999
add = -130, -130, -130
ignorehitpause

[State 4000, 4]
type = Changestate
trigger1 = time = 64
value = 4001

;------------------------------------------------------------------------
;Dragon Morph and Bite
[Statedef 4001]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4001
ctrl = 0

[State 4001, snd]
type = Playsnd
trigger1 = Time = 0
trigger2 = AnimElem = 19
value = 4000,9

[State 4001, 1]
type = hitdef ;projectile
trigger1 = movecontact = 0 ;animelem = 5
;offset = 57,-87
;velocity = 9
;remvelocity = 0
;accel = 0, 0            ;Acceleration (opt)
damage   = 9999,9999
attr = S, SP
guardflag = MA
ground.type = High
hitsound = S5,7 ;S9002,0
hitspark = -1
p2facing = 1          ;Force p2 to face KFM
p2stateno = 4002

[State 4001, 2-1]
type = Explod ;Helper
trigger1 = p2stateno = 4002
trigger1 = numhelper(6000) = 0
anim = 6041
name = "Blood1"
id = 6000
pos = 0,-55
;pos = 0,0 ;31, -73
postype = p2
helpertype = normal
sprpriority = 6
keyctrl = 0

[State 4001, 2-2]
type = Explod ;Helper
trigger1 = p2stateno = 4002
anim = 6041 ;stateno = 6041
name = "Blood2"
id = 6000
pos = 0,-80;-82
;pos = 0,-67
postype = p2
helpertype = normal
sprpriority = 7
keyctrl = 0

[State 4001, 2-3]
type = Explod ;Helper
trigger1 = p2stateno = 4002
anim = 6041 ;stateno = 6041
name = "Blood2"
id = 6000
pos = 0,-30
;pos = 0,0 ;31, -73
postype = p2
helpertype = normal
sprpriority = 5
keyctrl = 0

[State 4001, 3-1]
type = Helper
trigger1 = p2stateno = 4002
anim = 6041 ;stateno = 6041
stateno = 6040
id = 6000
name = "UPPERCUT"
pos = 0,-70
postype = P2
helpertype = normal
sprpriority = -1
keyctrl = 1
ownpal = 1
under = 1

[State 4001, 3-2]
type = Helper
trigger1 = p2stateno = 4002
anim = 6041 ;stateno = 6041
stateno = 6040
id = 6000
name = "UPPERCUT"
pos = 0,-40
postype = P2
helpertype = normal
sprpriority = -1
keyctrl = 1
ownpal = 1
under = 1

;[State 4001, 3]
;type = Helper
;trigger1 = p2stateno = 4002
;stateno = 9202
;name = "Guts"
;id = 9202
;pos = 0,-55
;;pos = 0,0 ;31, -73
;postype = p2
;helpertype = normal
;sprpriority = 7
;keyctrl = 0

[State 4001, 4]
type = Changestate
trigger1 = animtime = 0
ctrl = 1
value = 0

;------------------------------------------------------------------------
;Enemy Bit by Dragon
[Statedef 4002]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 4002, White]
type = BGPalFX
trigger1 = time = 0
time = 2
add = 255, 255, 255
mul = 255, 255, 255
ignorehitpause

[State 4002, 1]
type = Changestate
trigger1 = time = 0
trigger1 = SelfAnimExist(29995) != 1
value = 4004

[State 4130, 2]
type = Changestate
trigger1 = time = 1
trigger1 = SelfAnimExist(29995) = 1
value = 4003

;No Lower body sorry
[Statedef 4004]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 4004, 1]
type = Changestate
trigger1 = time = 0
value = 4003

;Hide player two
[Statedef 4003]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 1015

[State 4003, 1]
type = Changeanim2
trigger1 = time = 0
value = 1015

[State 4003, 2]
type = Explod
trigger1 = time = 0
trigger1 = SelfAnimExist(29995)
anim = 29995
name = "LowerBody"
id = 29995
pos = 0,0
postype = p1
HelperType = normal
facing = 1
removetime = -1
sprpriority = -1
ownpal = 1
ontop = 1

[State 4003, 3]
type = Posset
trigger1 = time = 1
Y = 900

[State 4003, 4]
type = Selfstate
trigger1 = time = 2
ctrl = 1
value = 5150

