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

[Size]
xscale = 1
yscale = 1
ground.back = 15
ground.front = 16
air.back = 12
air.front = 12
height = 60
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = -5, -90
mid.pos = -5, -60
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.4
walk.back = -1.8
run.fwd  = 4.8, 0
run.back = -5.3,0
jump.neu = 0,-8.4
jump.back = -2.55
jump.fwd = 2.5
runjump.back = -2.55,-8.1
runjump.fwd = 4,-8.1
airjump.neu = 0,-8.1
airjump.back = -2.55
airjump.fwd = 2.5

[Movement]
yaccel = .44
stand.friction = .85
crouch.friction = .82

; Win state decider
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = !time
value = 181

; Win pose 1 - Bow
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

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

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3]
type = ChangeState
trigger1 = !animtime
value = 0

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

[State 195, 1]
type = CtrlSet
trigger1 = time = 40
value = 1

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

; Standing light punch
[Statedef 200]
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 200
poweradd = 10
sprpriority = 2

[State 200, 1]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage = 23, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno = s8000+random%4
guard.sparkno = s8032
sparkxy = -10, -76
hitsound = s1,0
guardsound = s3,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 11
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 15

[State 200, 2]
type = PlaySnd
trigger1 = time = 1
value = 0, 0

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

; Standing strong punch
[Statedef 210]
type = S
movetype = A
physics = S
juggle  = 4
poweradd= 30
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

[State 210, Width]
type = Width
trigger1 = (animelemtime (2) >= 0) && (animelemtime (7) < 0)
value = 15,0

[State 210, 1]
type = PlaySnd
trigger1 = time = 2
value = 0, 4

[State 210, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
animtype  = Medium
damage    = 57
guardflag = MA
pausetime = 12,12
sparkno = s8004+random%4
guard.sparkno = s8033
sparkxy = -10,-70
hitsound = s1,1
guardsound = s3,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5.5
air.velocity = -2.5,-4
forcenofall = 1

[State 210, 3]
type = ChangeAnim
trigger1 = animelemtime(5) > 0 && animelemtime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

[State 210, 4]
type = SprPriority
trigger1 = animelem = 5
value = 2

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

; Standing light kick
[Statedef 230]
type = S
movetype = A
physics = S
juggle  = 4
poweradd= 11
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = time = 2
value = 0, 1

[State 230, 2]
type = HitDef
trigger1 = !time
attr = S, NA
animtype  = Medium
damage    = 26
guardflag = MA
pausetime = 12,12
sparkno = s8000+random%4
guard.sparkno = s8032
sparkxy = -10,-37
hitsound = s1,3
guardsound = s3,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 14
ground.velocity = -5
air.velocity = -2.5,-3.5

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

; Standing strong kick
[Statedef 240]
type = S
movetype = A
physics = S
juggle  = 5
poweradd= 30
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = time = 2
value = 0, 3

[State 240, 2]
type = HitDef
trigger1 = !time
attr = S, NA
animtype  = Medium
damage    = 63
guardflag = MA
pausetime = 12,12
sparkno = s8004+random%4
guard.sparkno = s8033
sparkxy = -10,-60
hitsound = s1,2
guardsound = s3,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 17
ground.velocity = -6
air.velocity = -2.2,-3.2

[State 240, 3]
type = PosAdd
trigger1 = animelem = 7
x = 12

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

;Crouching light punch
[Statedef 400]
type = C
movetype = A
physics = C
juggle  = 5
poweradd= 8
ctrl = 0
anim = 400
sprpriority = 2

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

[State 400, 2]
type = HitDef
trigger1 = !time
attr = C, NA
damage    = 23
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = s8000+random%4
guard.sparkno = s8032
hitsound = s1,0
guardsound = s3,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.5,-3

[State 400, 3]
type = CtrlSet
trigger1 = time = 6
value = 1

[State 400, 4]
type = ChangeState
trigger1 = !animtime
value = 11

;Crouching strong punch
[Statedef 410]
type = C
movetype = A
physics = C
juggle  = 6
poweradd= 25
ctrl = 0
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = time = 1
value = 0, 4

[State 410, 2]
type = HitDef
trigger1 = !time
attr = C, NA
damage    = 37
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = s8004+random%4
guard.sparkno = s8033
sparkxy = -10,-55
hitsound = s1,4
guardsound = s3,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 17
ground.velocity = -4
air.velocity = -3,-4

[State 410, 3]
type = ChangeState
trigger1 = !animtime
value = 11
ctrl = 1

;Crouching light kick
[Statedef 430]
type = C
movetype = A
physics = C
juggle  = 5
poweradd= 11
ctrl = 0
anim = 430
sprpriority = 2

[State 430, 1]
type = PlaySnd
trigger1 = time = 1
value = 0, 0

[State 430, 2]
type = HitDef
trigger1 = !time
attr = C, NA
damage    = 28
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = s8000+random%4
guard.sparkno = s8032
sparkxy = -10,-8
hitsound = s1,3
guardsound = s3,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 22

[State 430, 3]
type = ChangeState
trigger1 = !animtime
value = 11
ctrl = 1

;Crouch Strong Kick
[Statedef 440]
type = C
movetype = A
physics = C
juggle  = 7
poweradd= 35
ctrl = 0
anim = 440
sprpriority = 2

[State 440, 2]
type = PlaySnd
trigger1 = time = 2
value = 0, 3

[State 440, 3]
type = HitDef
trigger1 = !time
attr = C, NA
damage    = 72
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = s8004+random%4
guard.sparkno = s8033
sparkxy = -5,-10
hitsound = s1,5
guardsound = s3,0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 17
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1

[State 440, 4]
type = ChangeState
trigger1 = !animtime
value = 11
ctrl = 1

;Jump Light Punch
[Statedef 600]
type = A
movetype = A
physics = A
juggle  = 2
poweradd= 5
ctrl = 0
anim = 600
sprpriority = 2

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

[State 600, 2]
type = HitDef
trigger1 = !time
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = s8000+random%4
guard.sparkno = s8032
sparkxy = -10,-58
hitsound = s1,0
guardsound = s3,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 8
ground.velocity = -4
air.velocity = -1.3,-3
air.hittime = 14

[State 600, 3]
type = CtrlSet
trigger1 = time = 17
value = 1

;Jump Strong Punch
[Statedef 610]
type = A
movetype = A
physics = A
juggle  = 4
poweradd= 30
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 2]
type = PlaySnd
trigger1 = time = 2
value = 0, 3

[State 610, 3]
type = HitDef
trigger1 = !time
attr = A, NA
damage = 72
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = s8004+random%4
guard.sparkno = s8033
sparkxy = -10,-55
hitsound = s1,8
guardsound = s3,0
animtype = Med
ground.type = High
ground.slidetime = 12
ground.hittime  = 14
ground.velocity = -6
air.velocity = -3,-4

;Jump Light Kick
[Statedef 630]
type = A
movetype = A
physics = A
juggle  = 3
poweradd= 10
ctrl = 0
anim = 630
sprpriority = 2

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

[State 630, 2]
type = HitDef
trigger1 = !time
attr = A, NA
damage = 26
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = s8000+random%4
guard.sparkno = s8032
sparkxy = -5,-35
hitsound   = s1,5
guardsound = s3,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -4
air.velocity = -2,-3
air.hittime = 14

;Jump Strong Kick
[Statedef 640]
type = A
movetype = A
physics = A
juggle  = 4
poweradd= 30
ctrl = 0
anim = 640
sprpriority = 2

[State 640, 2]
type = PlaySnd
trigger1 = time = 2
value = 0, 4

[State 640, 3]
type = HitDef
trigger1 = !time
attr = A, NA
damage    = 70
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = s8004+random%4
guard.sparkno = s8033
sparkxy = -10,-40
hitsound = s1,2
guardsound = s3,0
animtype = Med
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -3,-4

;Kung Fu Throw - Attempt
[Statedef 800]
type = S
movetype = A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
trigger1 = !time
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 810
p2stateno = 820
guard.dist = 0
fall = 1

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

;Kung Fu Throw - Throwing the opponent
[Statedef 810]
type = S
movetype = A
physics = N
anim = 810
poweradd = 0

[State 810, Holding fwd?]
type = VarSet
trigger1 = !time
var(2) = command = "holdfwd"

[State 810, Grab Sound]
type = PlaySnd
trigger1 = animelem = 2
value = s1, 11

[State 810, Throw Sound]
type = PlaySnd
trigger1 = animelem = 7
value = 800, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = animelemtime(2) < 0
pos = 28, 0

[State 810, Width 2-11]
type = Width
trigger1 = animelemtime(2) >= 0 && animelemtime(12) < 0
edge = 60,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(5) < 0
pos = 58, 0

[State 810, Bind 5]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
pos = 47, 0

[State 810, holdfwd - Turn 6]
type = Turn
trigger1 = var(2)
trigger1 = animelem = 6

[State 810, holdfwd - Pos 6]
type = PosAdd
trigger1 = var(2)
trigger1 = animelem = 6
x = -37

[State 810, holdfwd - Turn Target 6]
type = TargetFacing
trigger1 = var(2)
trigger1 = animelem = 6
value = -1

[State 810, Bind 6]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
pos = 41, -60

[State 810, Bind 7]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
pos = 25, -75

[State 810, Bind 8]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
pos = 15, -90

[State 810, Bind 9]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
pos = -5, -96

[State 810, Bind 10]
type = TargetBind
trigger1 = animelemtime(10) >= 0 && animelemtime(11) < 0
pos = -14, -90

[State 810, Bind 11]
type = TargetBind
trigger1 = animelem = 11
pos = -50, -50

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = animelem = 11
value = -78

[State 810, Throw 11]
type = TargetState
trigger1 = animelem = 11
value = 821

[State 810, Turn 12]
type = Turn
trigger1 = animelem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = animelem = 15
x = -10

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

[Statedef 820]
type = A
movetype = H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
trigger1 = !time
value = 820

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

[Statedef 821]
type = A
movetype = H
physics = N
velset = 2.8,-7
poweradd = 40

[State 821, 1]
type = VelAdd
trigger1 = 1
y = .4

[State 821, 2]
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

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

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

[Statedef -2]

[State -2, Parry, Don't walk!]
type = AssertSpecial
trigger1 = time <= 8
trigger1 = prevstateno = [160,162]
flag = nowalk

[State -2, Parry Stuff]
type = HitOverride
trigger1 = command = "fwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Statetype = S
trigger1 = ctrl
attr = SA,AA,AP
stateno = 160
time = 8

[State -2, Parry Stuff]
type = HitOverride
trigger1 = command = "down"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = Statetype = C
trigger1 = ctrl
attr = C,AA,AP
stateno = 161
time = 8

[State -2, Parry Stuff]
type = HitOverride
trigger1 = command = "fwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Statetype = A
trigger1 = ctrl
attr = SA,AA,AP
stateno = 162
time = 8

[State -2, Parry Stuff]
Type = AssertSpecial
trigger1 = stateno = [160,162]
flag = TimerFreeze

[Statedef -3]

[State -3, Parry Sound]
type = PlaySnd
triggerall = !time
triggerall = alive
trigger1 = stateno = [160,162]
value = s3,2

[State -3, Jump Sound]
type = PlaySnd
triggerall = !time
triggerall = alive
trigger1 = stateno = [40,45]
value = s4,0

[State -3, Super Jump Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
trigger1 = stateno = 58
value = s4,1

[State -3, Hop Back Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
trigger1 = stateno = 105
value = s4,2

[State -3, Air Dash Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
trigger1 = stateno = [60,61]
value = s4,3

[State -3, Landing Sound]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 52
trigger2 = stateno = 106
value = s4,4

[State -3, Running Sound]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 100
trigger1 = Alive
value = s4,5

[State -3, Running Sound]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 100
trigger1 = Alive
loop = 1
value = s4,6
channel = 6

[State -3, Charging Sound]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 165
trigger1 = Alive
value = s4,7
channel = 5

[State -3, Stop Running Sound]
type = StopSnd
trigger1 = command != "holdfwd"
trigger2 = anim != 100
channel = 6

[State -3, Stop Charging Sound]
type = StopSnd
trigger1 = command != "charge"
trigger2 = anim != 165
channel = 5

[State -3, Remove Charging Explod]
type = RemoveExplod
trigger1 = command != "charge"
trigger2 = anim != 165
id = 165