; Standing Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 200
poweradd = 10 * !var(20)
sprpriority = 2
facep2 = 1

[State 200, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 300
value = 0, ifElse(Random<500, 0, 1)
channel = 0

[State 200, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,0
channel = 1

[State 200, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = S, NA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0
guardflag = M
hitflag = MAF
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 8, 8
guard.pausetime = 8, 8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36):=-75
hitsound = S2, 0
guardsound = s130, 0
animType = Light
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.slidetime = 12 + 2 * var(9)
ground.hittime  = 12 + 2 * var(9)
guard.hittime = 12
ground.velocity = -5
guard.velocity = -5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.velocity = -2.5,-6.5
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recoverTime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

;[State 200, ChangeAnim]
;type = ChangeAnim
;trigger1 = AnimElemTime(2) > 0 && AnimElemTime(3) <= 0
;trigger1 = movecontact=1 && hitpausetime
;ignorehitpause = 1
;persistent = 0
;value = anim
;elem = 3

[State 200, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

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

;---------------------------------------------------------------------------
; Standing Medium Punch
;CNS Difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
poweradd= 20 * !var(20)
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2 
facep2 = 1

[State 210, Voice]
type = Playsnd
trigger1 = Animelem = 1 && Random < 400
value = 0, ifElse(Random<500, 2, 3)
channel = 0

[State 210, Swing Snd]
type = Playsnd
trigger1 = AnimElem = 2
value = 1,1
channel = 1

[State 210, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
priority = 4 ,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 0
ID = 200
getpower = ifElse(!var(13), 100, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
hitsound = s2, 1
guardsound = s130, 0
pausetime = 10,10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 70), var(36) := -56
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.slidetime = 15 + 3*var(9)
ground.hittime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.5
guard.velocity = -6.5
air.velocity = -2, -7
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recoverTime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 210, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(4) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 4

[State 210, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

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

;Kung Fu Chop(unique attack)
;CNS Difficulty: easy
[Statedef 211]
type    = S
movetype= A
physics = S
poweradd= 20 * !var(20)
ctrl = 0
velset = 0,0
anim = 211
sprpriority = 2 
facep2 = 1

[State 211, Voice]
type = Playsnd
trigger1 = Animelem = 2 
value = 0, 4
channel = 0

[State 211, Swing Snd]
type = Playsnd
trigger1 = AnimElem = 3
value = 1,1
channel = 1

[State 211, Width]
type = Width
trigger1 = AnimElemTime(1) >= 0 
player = 8,0

[State 211, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
priority = 4 ,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 0
ID = 200
getpower = ifElse(!var(13), 50, 25)*!var(20), 30 * !var(20)
givepower = 30, 30
hitsound = s2, 1
guardsound = s130, 0
pausetime = 10,10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 70), var(36) := -68
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.slidetime = 15 + 3*var(9)
ground.hittime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.5
guard.velocity = -6.5
air.velocity = -3, -7
airguard.ctrlTime = 16
airguard.velocity = -3, -7
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recoverTime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 211, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
priority = 4 ,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0
ID = 200
getpower = ifElse(!var(13), 50, 25)*!var(20), 30 * !var(20)
givepower = 30, 30
hitsound = s2, 1
guardsound = s130, 0
pausetime = 10,10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 90), var(36) := -20
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.slidetime = 15 + 3*var(9)
ground.hittime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.5
guard.velocity = -6.5
air.velocity = -3, -8
airguard.ctrlTime = 16
airguard.velocity = -3, -8
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recoverTime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 211, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
moveType = I

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

;Kung Fu Chop(comboed)
;CNS Difficulty: easy
[Statedef 212]
type    = S
movetype= A
physics = S
poweradd= 20 * !var(20)
ctrl = 0
velset = 0,0
anim = 212
sprpriority = 2 
facep2 = 1

[State 212, Voice]
type = Playsnd
trigger1 = Animelem = 2 
value = 0, 4
channel = 0

[State 212, Swing Snd]
type = Playsnd
trigger1 = AnimElem = 3
value = 1,1
channel = 1

[State 212, Width]
type = Width
trigger1 = AnimElemTime(1) >= 0 
player = 5,0

[State 212, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
priority = 4 ,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
ID = 200
getpower = ifElse(!var(13), 100, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
hitsound = s2, 1
guardsound = s130, 0
pausetime = 10,10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 90), var(36) := -20
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.slidetime = 15 + 3*var(9)
ground.hittime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.25
guard.velocity = -6.25
air.velocity = -3, -8
airguard.ctrlTime = 16
airguard.velocity = -3, -8
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recoverTime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 212, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
moveType = I

[State 212, End]
type = ChangeState
trigger1 = !AnimTime 
value = 0
ctrl = 1
;------------------------------------------
; Standing Strong Punch
; CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 2
facep2 = 1

[State 220, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random < 500
value = 0, ifElse(Random<500, 3, 4)
channel = 0

[State 220, Swing Snd]
type = playsnd
trigger1 = animelem = 3
value = 1,2
channel = 1

[State 220, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4
x = 10
y = 0

[State 220, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4 
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4, Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12, 12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36) := -70
hitsound = s2,2
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;Low,Trip,None
air.type = Low
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -9
guard.velocity = -9
air.velocity = -5.25,-6
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 220, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(4) > 0 && AnimElemTime(5) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 5

[State 220, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

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

;------------------------------------------
; Strong Punch (close)
; CNS difficulty: easy
[Statedef 221]
type    = S
movetype= A
physics = S
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 221
sprpriority = 2
facep2 = 1

[State 221, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random < 500
value = 0, ifElse(Random<500, 3, 4)
channel = 0

[State 221, Swing Snd]
type = playsnd
trigger1 = animelem = 3
value = 1,2
channel = 1

[State 221, Width]
type = Width
trigger1 = AnimElemTime(11) < 0 
player = 5,0

[State 221, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4, Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 0
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12, 12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -57
hitsound = s2,2
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;Low,Trip,None
air.type = Low
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -9.25
guard.velocity = -9.25
air.velocity = -6,-7
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 221, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

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

;---------------------------------------------------------------------------
; Standing Light Kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
poweradd= 10 * !var(20)
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2
facep2 = 1

[State 230, Voice]
type = playsnd
trigger1 = animelem = 1 && random < 300
value = 0, ifelse(random<500, 2, 3)
channel = 0

[State 230, Swing Snd]
type = playsnd
trigger1 = animelem = 2
value = 1,3
channel = 1

[State 230, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Light          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 8,8
guard.pausetime = 8, 8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 90), var(36):=-24
hitsound = s2,3
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 12 + 2*var(9)
ground.hittime = 12 + 2*var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5
guard.velocity = -5
air.velocity = -5,-5.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 230, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(4) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 4

[State 230, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

; Light Kick (close)
; CNS difficulty: easy
[Statedef 231]
type    = S
movetype= A
physics = S
poweradd= 10 * !var(20)
ctrl = 0
velset = 0,0
anim = 231
sprpriority = 2
facep2 = 1

[State 231, Voice]
type = playsnd
trigger1 = animelem = 1 && random < 300
value = 0, ifelse(random<500, 0, 2)
channel = 0

[State 231, Swing Snd]
type = playsnd
trigger1 = animelem = 2
value = 1,3
channel = 1

[State 231, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Light          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 8,8
guard.pausetime = 8, 8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36):=-10
hitsound = s2,3
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 12 + 2*var(9)
ground.hittime = 12 + 2*var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5
guard.velocity = -5
air.velocity = -5,-6.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 231, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

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

;------------------------------------------------------
; Standing Medium Kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
poweradd= 20 * !var(20)
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2
facep2=1

[State 240, Voice]
type = playsnd
trigger1 = animelem=1 && random < 400
value = 0, ifelse(random<500, 2, 3)
channel = 0

[State 240, Swing Snd]
type = playsnd
trigger1 = animelem = 2
value = 1,4
channel = 1

[State 240, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Medium          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 0
ID = 200
getpower = ifElse(!var(13), 100, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 10,10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 90), var(36) := -61
hitsound = s2,4
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 15 + 3*var(9)
ground.hittime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.5
guard.velocity = -6.5
air.velocity = -3, -6.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 240, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(4) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 4

[State 240, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

;---------------------------------------------------------------------------
; Standing Strong Kick
; CNS difficulty: easy
[Statedef 250]
type    = S
movetype= A
physics = S
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 250
sprpriority = 2
facep2=1

[State 250, Voice]
type=playsnd
trigger1= animelem=2 && random<500
value= 0, ifelse(random<500, 4, 5)
channel=0

[State 250, Swing Snd]
type=playsnd
trigger1= animelem=4
value=1,5
channel=1

[State 250, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 0
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36) := -78
hitsound = s2,5
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -9
guard.velocity = -9
air.velocity = -5.5,-6.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 250, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 6

[State 250, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

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

; Strong Kick (close)
; CNS difficulty: easy
[Statedef 251]
type    = S
movetype= A
physics = S
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 251
sprpriority = 2
facep2=1

[State 251, Voice]
type=playsnd
trigger1= animelem=1 && random<500
value= 0, ifelse(random<500, 4, 5)
channel=0

[State 251, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,5
channel=1

[State 251, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -67
hitsound = s2,5
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -9
guard.velocity = -9
air.velocity = -5.5,-6.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 251, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(4) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 4

[State 251, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

; Strong Kick (during dodge)
; CNS difficulty: easy
[Statedef 252]
type    = S
movetype= A
physics = S
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 250
sprpriority = 2
facep2=1

[State 252, Voice]
type=playsnd
trigger1= animelem=2 && random<500
value= 0, ifelse(random<500, 4, 5)
channel=0

[State 252, Swing Snd]
type=playsnd
trigger1= animelem=4
value=1,5
channel=1

[State 252, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 0
;ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36) := -78
hitsound = s2,5
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -8, -4
guard.velocity = -9
air.velocity = -5.5,-6.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 1
fall.recover = 0
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 252, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 6

[State 252, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

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

;---------------------------------------------------------------------------
; Crouching Light Punch
; CNS difficulty: easy
[Statedef 400]
type    = C
movetype= A
physics = C
poweradd= 10 * !var(20)
ctrl = 0
velset = 0,0
anim = 400
sprpriority = 2
facep2=1

[State 400, Voice]
type=playsnd
trigger1= animelem=1 && random<350
value= 0, ifelse(random<500, 0, 1)
channel=0

[State 400, Swing Snd]
type=playsnd
trigger1= animelem=1
value=1,0
channel=1

[State 400, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30,30
animtype = Light          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0
pausetime = 8,8
guard.pausetime = 8,8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36):=-42
hitsound = s2,0
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 12 + 2*var(9)
ground.hittime = 12 + 2*var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5
guard.velocity = -5
air.velocity = -5.5, -5.8
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 400, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

[State 400, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouching Medium Punch
; CNS difficulty: easy
[Statedef 410]
type    = C
movetype= A
physics = C
poweradd= 20 * !var(20)
ctrl = 0
velset = 0,0
anim = 410
sprpriority = 2
facep2 = 1

[State 410, Voice]
type=playsnd
trigger1= animelem=1 && random<400
value= 0, ifelse(random<500, 1, 2)
channel=0

[State 410, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,1
channel=1

[State 410, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Medium          ;light,medium,hard,back,up,diagup
priority = 4 ,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 0
ID = 200
getpower = ifElse(!var(13), 100, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
hitsound = s2, 1
guardsound = s130, 0
pausetime = 10,10
guard.pausetime = 10,10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -44
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 15 + 3*var(9)
ground.hittime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.5
guard.velocity = -6.5
air.velocity = -3, -7.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 410, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

[State 410, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1
;--------------------------------------------------------------------------
; Crouching Strong Punch
;CNS difficulty: easy
[Statedef 420]
type    = C
movetype= A
physics = C
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 420
sprpriority = 2
facep2 = 1

[State 420, Voice]
type=playsnd
trigger1= animelem=1 && random<500
value= 0, ifElse(Random<500, 3, 4)
channel=0

[State 420, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,2
channel=1

[State 420, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4, Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -50
hitsound = s2,2
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -9
guard.velocity = -9
air.velocity = -4,-7.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 420, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

[State 420, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouching Light Kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
poweradd= 10 * !var(20)
ctrl = 0
velset = 0,0
anim = 430
sprpriority = 2
facep2 = 1

[State 430, Voice]
type=playsnd
trigger1= animelem=1 && random<350
value= 0, ifelse(random<500, 2, 3)
channel=0

[State 430, Swing Snd]
type=playsnd
trigger1= animelem=1
value=1,3
channel=1

[State 430, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = L         ;HLA
animtype = Light          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 8,8
guard.pausetime = 8,8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 85), var(36):=-5
hitsound = s2,3
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 12 + 2*var(9)
ground.hittime = 12 + 2*var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5
guard.velocity = -5
air.velocity = -5,-6.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 430, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(2) > 0 && AnimElemTime(3) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 3

[State 430, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

[State 430, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouch Medium Kick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = C
poweradd= 20 * !var(20)
ctrl = 0
velset = 0,0
anim = 440
sprpriority = 2
facep2 = 1

[State 440, Voice]
type=playsnd
trigger1= animelem=1 && random<350
value= 0, ifelse(random<500, 2, 3)
channel=0

[State 440, Swing Snd]
type=playsnd
trigger1= animelem=1
value=1,4
channel=1

[State 440, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = L         ;HLA
animtype = Medium          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 0
ID = 200
getpower = ifElse(!var(13), 100, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 10,10
guard.pausetime = 10,10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 85), var(36):=-5
hitsound = s2,4
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Low      ;Low,Trip,None
air.type = Low
ground.slidetime = 15 + 2*var(9)
ground.hittime = 15 + 2*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.5
guard.velocity = -6.5
air.velocity = -5.25,-6.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 440, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(2) > 0 && AnimElemTime(3) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 3

[State 440, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

[State 440, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;--------------------------------------------------------------------------
; Crouch Strong Kick
; CNS difficulty: easy
[Statedef 450]
type    = C
movetype= A
physics = C
poweradd = 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 450
sprpriority = 2
facep2 = 1

[State 450, Voice]
type=playsnd
trigger1= animelem=2 && random<500
value= 0, ifelse(random<500, 2, 3)
channel=0

[State 450, Swing Snd]
type=playsnd
trigger1= animelem=3
value=1,5
channel=1

[State 450, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5 
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = L         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 0
ID = 450
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36) := -23
hitsound = s2,5
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = Trip     ;Low,Trip,None
air.type = Trip
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
fall = 1
fall.recover = 0
;fall.recovertime = 120
yaccel = .58
ground.velocity = -1.5, -6
guard.velocity = -7
air.velocity = -1.5, -6
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 450, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 6

[State 450, TargetState: No Recovery]
type = TargetState
trigger1 = MoveHit = 1 && P2StateNo != 490
value = 490
ID = 450

[State 450, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
moveType = I

[State 450, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

; Z-Counter Version
; CNS difficulty: easy
[Statedef 451]
type    = C
movetype= A
physics = C
poweradd = 0
ctrl = 0
velset = 0,0
anim = 450
sprpriority = 2
facep2 = 1

[State 451, Voice]
type=playsnd
trigger1= animelem=2 && random<500
value= 0, ifelse(random<500, 2, 3)
channel=0

[State 451, Swing Snd]
type=playsnd
trigger1= animelem=3
value=1,5
channel=1

[State 451, Muteki]
type = Nothitby
trigger1 = AnimElemTime(7)<0
time = 1
value = SCA

[State 451, HitDef: Z-Counter]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = L         ;HLA
animtype = Diagup          ;light,medium,hard,back,up,diagup
priority = 6,Hit   ;Higher value due to it being a counter
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 0
getpower = 0, 0
givepower = 30, 30
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36) := -23
hitsound = s2,5
guardsound = s130, 0
air.animType = Diagup
fall.animType = Diagup
ground.type = Low     ;Low,Trip,None
air.type = Low
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
fall = 1
fall.recover = 0
yaccel = .58
ground.velocity = -6.5, -5.5
guard.velocity = -7
air.velocity = -6, -5.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 451, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 6

[State 451, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
moveType = I

[State 451, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;--------------------------
;P2 no recovery custom state for trip
;Special thanks to Kamekaze
[Statedef 490]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = -1
velset = -1.5,-6

[State 490, Gravity]
type = VelAdd
trigger1 = 1
y = .58

[State 490, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 5070 && Time = 0
value = 5070
;elem = 1
;ignorehitpause =
;persistent =

[State 490, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1

[State 490, StateTypeSet: Low]
type = StateTypeSet
trigger1 = Anim = 5101 || Anim = 490
statetype = L      ;S,A,C,L

[State 490, ChangeAnim]
type = ChangeAnim
triggerall = SelfAnimExist(5101)
trigger1 = pos y>=0 && Anim = 5070 && AnimElemTime(1)>1
value = 5101

[State 490, ChangeAnim]
type = ChangeAnim2
triggerall = !SelfAnimExist(5101)
trigger1 = pos y>=0 && Anim = 5070 && AnimElemTime(1)>1
value = 490

[State 490, ChangeAnim]
type = ChangeAnim2
triggerall = !SelfAnimExist(5101)
trigger1 = pos y>=0 && Anim = 490 && AnimTime = 0
value = 491

[State 490, ChangeAnim]
type = ChangeAnim2
triggerall = SelfAnimExist(5101)
trigger1 = pos y>=0 && Anim = 5101 && AnimTime = 0
value = 491

[State 490, PosSet: On Ground]
type = PosSet
trigger1 = Anim = 5101 || Anim = 490 || Anim = 491
y = 0

[State 490, VelSet]
type = VelSet
trigger1 = Anim = 5101 || Anim = 490 || Anim = 491
x = 0
y = 0

[State 490, SelfState: End]
type = SelfState
trigger1 = AnimTime = 0 && Anim = 491
value = IfElse(Alive,5120,5150)

;---------------------------------------------------------------------------
; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = N
poweradd= 10 * !var(20)
ctrl = 0
anim = 600 
sprpriority = 2

[State 600, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 0
channel=0

[State 600, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,0
channel=1

[State 600, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = A, NA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0
animtype = Light
guardflag = HA
hitflag = MAF
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 8, 8
guard.pausetime = 8, 8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 70), var(36):=-50
hitsound = S2, 0
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 2*var(9)
ground.hittime  = 12 + 2*var(9)
guard.hittime  = 12
ground.velocity = -4
guard.velocity = -4
airguard.ctrlTime = 16
air.animType = Back
fall.animType = Back
air.type = High
air.velocity = -3,-7
airguard.velocity = -4.5, -0.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 600, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

[State 600, Gravity]
type = Gravity
trigger1 = 1

[State 600, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

; Jump Light Punch(no vel x)
; CNS difficulty: easy
[Statedef 601]
type    = A
movetype= A
physics = N
poweradd= 10 * !var(20)
ctrl = 0
anim = 601 
sprpriority = 2

[State 601, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 0
channel=0

[State 601, Swing Snd]
type=playsnd
trigger1= animelem=1
value=1,0
channel=1

[State 601, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = A, NA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0
animtype = Light
guardflag = HA
hitflag = MAF
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 8, 8
guard.pausetime = 8, 8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 70), var(36):=-68
hitsound = S2, 0
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 2*var(9)
ground.hittime  = 12 + 2*var(9)
guard.hittime  = 12
ground.velocity = -4
guard.velocity = -4
airguard.ctrlTime = 16
air.animType = Back
fall.animType = Back
air.type = High
air.velocity = -3,-7
airguard.velocity = -4.5, -0.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 601, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

[State 601, Gravity]
type = Gravity
trigger1 = 1

[State 601, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
; Jump Medium Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = N
poweradd= 20 * !var(20)
ctrl = 0
anim = 610
sprpriority = 2

[State 610, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 3
channel=0

[State 610, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,1
channel=1

[State 610, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = A, NA
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 0
animtype = Medium
guardflag = HA
hitflag = MAF
ID = 200
getpower = ifElse(!var(13), 100, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 10, 10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 70), var(36) := -50
hitsound = S2, 1
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 3*var(9)
ground.hittime  = 12 + 3*var(9)
guard.hittime  = 15
ground.velocity = -4
guard.velocity = -4
air.animType = Back
fall.animType = Back
air.type = High
air.velocity = -5,-6
airguard.velocity = -5.5, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
airguard.ctrlTime = 16
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 610, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(8) >= 0
moveType = I

[State 610, Gravity]
type = Gravity
trigger1 = 1

[State 610, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
; Jump Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = N
poweradd= 30 * !var(20)
ctrl = 0
anim = 620
sprpriority = 2

[State 620, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 4
channel=0

[State 620, Swing Snd]
type=playsnd
trigger1= animelem=3
value=1,2
channel=1

[State 620, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
animtype = Hard
guardflag = HA
hitflag = MAF
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 10, 10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 85), var(36) := -40
hitsound = S2, 2
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 4*var(9)
ground.hittime  = 12 + 4*var(9)
guard.hittime  = 18
ground.velocity = -5
guard.velocity = -5
air.animType = Back
fall.animType = Back
air.type = High
air.velocity = -5,-6
airguard.velocity = -5.5, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
airguard.ctrlTime = 16
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 620, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 6

[State 620, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(8) >= 0
moveType = I

[State 620, Gravity]
type = Gravity
trigger1 = 1

[State 620, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
; Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = N
poweradd= 10 * !var(20)
ctrl = 0
anim = 630
sprpriority = 2

[State 630, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 2
channel=0

[State 630, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,3
channel=1

[State 630, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = A, NA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
animtype = Light
guardflag = HA
hitflag = MAF
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 8, 8
guard.pausetime = 8, 8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36):=-40
hitsound = S2, 3
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High
ground.slidetime = 12 + 2*var(9)
ground.hittime  = 12 + 2*var(9)
guard.hittime = 12
ground.velocity = -4
guard.velocity = -4
air.type = High
airguard.ctrlTime = 16
air.velocity = -2.5,-7
airguard.velocity = -5, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 630, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(2) > 0 && AnimElemTime(3) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 3

[State 630, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

[State 630, Gravity]
type = Gravity
trigger1 = 1

[State 630, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

; Jump Light Kick(no vel x)
; CNS difficulty: easy
[Statedef 631]
type    = A
movetype= A
physics = N
poweradd= 10 * !var(20)
ctrl = 0
anim = 631
sprpriority = 2

[State 631, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 2
channel=0

[State 631, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,3
channel=1

[State 631, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = A, NA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
animtype = Light
guardflag = HA
hitflag = MAF
ID = 200
getpower = 50 * !var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 8, 8
guard.pausetime = 8, 8
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36):=-47
hitsound = S2, 3
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High
ground.slidetime = 12 + 2*var(9)
ground.hittime  = 12 + 2*var(9)
guard.hittime = 12
ground.velocity = -4
guard.velocity = -4
air.type = High
airguard.ctrlTime = 16
air.velocity = -3,-7
airguard.velocity = -5, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 631, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

[State 631, Gravity]
type = Gravity
trigger1 = 1

[State 631, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
; Jump Medium Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = N
poweradd= 20 * !var(20)
ctrl = 0
anim = 640
sprpriority = 2

[State 640, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 3
channel=0

[State 640, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,4
channel=1

[State 640, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = A, NA
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 0
animtype = Medium
guardflag = HA
hitflag = MAF
ID = 200
getpower = ifElse(!var(13), 100, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 10, 10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 95), var(36) := -28
hitsound = S2, 4
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 3*var(9)
ground.hittime  = 12 + 3*var(9)
guard.hittime = 15
ground.velocity = -5
guard.velocity = -5
air.animType = Back
fall.animType = Back
air.type = High
airguard.ctrlTime = 16
air.velocity = -5,-6
airguard.velocity = -6,-1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 640, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(9) >= 0
moveType = I

[State 640, Gravity]
type = Gravity
trigger1 = 1

[State 640, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
; Jump Strong Kick
; CNS difficulty: easy
[Statedef 650]
type    = A
movetype= A
physics = N
poweradd= 30 * !var(20)
ctrl = 0
anim = 650
sprpriority = 2

[State 650, Voice]
type = playsnd
trigger1 = animelem = 2
value = 0, ifelse(random<500, 4, 5)
channel = 0

[State 650, Swing Snd]
type = playsnd
trigger1 = animelem = 3
value = 1,5
channel = 1

[State 650, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 0
animtype = Hard
guardflag = HA
hitflag = MAF
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 10, 10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 75), var(36) := -38
hitsound = S2, 5
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 4*var(9)
ground.hittime  = 12 + 4*var(9)
guard.hittime = 18
ground.velocity = -5
guard.velocity = -5
air.type = High
airguard.ctrlTime = 16
air.velocity = -5,-6
airguard.velocity = -6.5, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

;[State 650, ChangeAnim]
;type = ChangeAnim
;trigger1 = AnimElemTime(4) > 0 && AnimElemTime(5) <= 0
;trigger1 = movecontact=1 && hitpausetime
;ignorehitpause = 1
;persistent = 0
;value = anim
;elem = 5

[State 650, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

[State 650, Gravity]
type = Gravity
trigger1 = 1

[State 650, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

; Jump Strong Kick(no vel x)
; CNS difficulty: easy
[Statedef 651]
type    = A
movetype= A
physics = N
poweradd= 30 * !var(20)
ctrl = 0
anim = 651
sprpriority = 2

[State 651, Voice]
type = playsnd
trigger1 = animelem = 1
value = 0, ifelse(random<500, 4, 5)
channel = 0

[State 651, Swing Snd]
type = playsnd
trigger1 = animelem = 2
value = 1,5
channel = 1

[State 651, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = A, NA
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 0
animtype = Hard
guardflag = HA
hitflag = MAF
ID = 200
getpower = ifElse(!var(13), 150, 75)*!var(20), 30 * !var(20)
givepower = 30, 30
priority = 4, Hit
pausetime = 10, 10
guard.pausetime = 10, 10
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 80), var(36) := -68
hitsound = S2, 5
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 4*var(9)
ground.hittime  = 12 + 4*var(9)
guard.hittime = 18
ground.velocity = -5
guard.velocity = -5
air.type = High
airguard.ctrlTime = 16
air.velocity = -5.5,-6
airguard.velocity = -6.5, -1.5
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
fall.recover = 1
fall.recovertime = 120
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 651, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

[State 651, Gravity]
type = Gravity
trigger1 = 1

[State 651, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
facep2 = 1

[State 800, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = (command = "kk")

[State 800, Throw Escape Reset]
type = VarSet
trigger1 = 1
var(19) = 0

[State 800, Escape]
type = VarSet
trigger1 = NumEnemy
trigger1 = (EnemyNear, StateNo = [0,899]) && (EnemyNear, StateNo != [100,104]) && (EnemyNear, StateNo != [600,799])
var(19) = 7

[State 800, AttackDist]
type = AttackDist
trigger1 = 1
value = 0

[State 800, Throw 1]
type = Hitdef
trigger1 = AnimElem = 2
trigger1 = !var(38)
attr = S, NT
priority = 3,Miss
getpower = 35 * !var(20)
givepower = 0
hitflag = M-
numhits = 0
sparkno = -1
p1stateno = ifelse (command = "holdfwd", 810,805)
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 800, Throw 2]
type = Hitdef
trigger1 = AnimElem = 2 && var(10)
trigger1 = !var(38)
attr = S, NT
priority = 3,Miss
getpower = 35 * !var(20)
givepower = 0
hitflag = M-
numhits = 0
sparkno = -1
p1stateno = ifelse (command = "holdfwd", 805,850)
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 800, Miss Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 800,1
channel = 0

[State 800, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,0
channel = 1

[State 800, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

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

;===========<THROW SWITCHING SIDES>==========
[StateDef 805]
type = S
moveType = A
physics = S
anim = 805
ctrl = 0
sprPriority = 0

[State 805, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 806

[State 805, TargetFacing]
type = TargetFacing
trigger1 = !Time && NumTarget
value = -1

[State 805, Width]
type = Width
trigger1 = 1
edge = 24,24

[State 805, Turn]
type = Turn
trigger1 = AnimElem = 3

[State 805, Facing]
type = TargetFacing
trigger1 = 1
value = -1

[State 805, Throw Escape]
type = ChangeState
trigger1 = NumTarget && var(19)
trigger1 = (Target, command = "holdfwd" || Target, command = "holdback")
trigger1 = (Target, command = "b" || Target, command = "c" || Target, command = "y" || Target, command = "z")
value = 890

[State 805, Throw Escape Countdown]
type = VarAdd
trigger1 = var(19) > 0
var(19) = -1

[State 805, TargetBind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0 
pos = ceil(57 * const(size.xScale)), 0

[State 805, TargetBind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 
pos = ceil(28 * const(size.xScale)), 0

[State 805, SprPriority -1]
type = SprPriority
trigger1 = AnimElemTime(2) >= 0
value = -1

[State 805, End]
type = ChangeState
trigger1 = !NumTarget
value = 0
ctrl = 1

[State 805, End]
type = ChangeState
trigger1 = AnimElemTime(3) > 0
value = ifElse(var(10), 850, 810)

;===========<THROW SWITCHING SIDES (TARGET)>==========
[StateDef 806]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

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

[State 806, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 806

[State 806, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
moveCamera = 1,1

[State 806, SelfState]
type = SelfState
trigger1 = Time >= 60
value = ifElse(pos y < 0, 5040, 0)
ctrl = 1

;===========<KUNG FU THRUST>================
[Statedef 810]
type = S
movetype = A
physics = S
anim = 810
velset = 0, 0
poweradd = 0
sprpriority = 2

[State 810, Safety]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 810, More Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 810, Throw Escape]
type = ChangeState
trigger1 = NumTarget && var(19)
trigger1 = (Target, command = "holdfwd" || Target, command = "holdback")
trigger1 = (Target, command = "b" || Target, command = "c" || Target, command = "y" || Target, command = "z")
value = 890

[State 810, Throw Escape]
type = VarAdd
trigger1 = var(19) > 0
var(19) = -1

[State 810, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 820

[State 810, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo = 805 && !Time
value = 810
elem = 1

[State 810, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = -1

[State 810, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 810, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,12
channel = 0

[State 810, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1,2
channel = 1

[State 810, Hit Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 2, 2
channel = 2

[State 810, Hit Spark]
type = Helper
trigger1 = NumTarget && AnimElem = 5
helperType = Normal
stateNo = 8012
ID = 8001
name = "Spark"
posType = P1
pos = 63, -48
ownPal = 1
pauseMoveTime = 65535
superMoveTime = 65535
ignoreHitPause = 1

[State 810, EnvShake]
type = EnvShake
trigger1 = AnimElem = 5 
time = 14
freq = 120
ampl = 4

[State 810, Width]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(6) < 0
edge = 55,0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
trigger1 = NumTarget
pos = ceil(57 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(30 * const(size.xScale)), ceil(5 * const(size.yScale))

[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger1 = NumTarget
pos = ceil(20 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 810, Bind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger1 = NumTarget
pos = ceil(10 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger1 = NumTarget
pos = ceil(63 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 810, Damage 5]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 5
value = floor(ifElse(100 * fvar(11) < 7, -7, -100 * fvar(11)))

[State 810, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 5
value = 35

[State 810, PowerAdd]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 5 && !var(20)
value = 70

[State 810, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 5
value = 1

[State 810, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 5
var(13) = 1

[State 810, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 5
var(15) = 1
ignoreHitPause = 1

[State 810, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 5
var(16) = 1
ignoreHitPause = 1

[State 810, Throw]
type = TargetState
trigger1 = NumTarget && AnimElem = 6
value = 821

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

;===========<KUNG FU THRUST (TARGET)>================
[Statedef 820]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 1

[State 820, On Ground]
type = PosSet
trigger1 = !Time
y = 0

[State 820, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,0

[State 820, ChangeAnim2]
type = ChangeAnim2
Trigger1 = !Time && PrevStateNo != 806
value = 820

[State 820, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
trigger1 = PrevStateNo = 806
value = 820
elem = 1

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, Safety]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;===========<KUNG FU THRUST (HIT AWAY)>================
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 0,0

[State 821, Velocity]
type = Velset
trigger1 = !Time 
x = -6
y = -5.75

[State 821, Gravity]
type = Veladd
trigger1 = Time >= 0
y = 0.5

[State 821, ChangeAnim]
type = ChangeAnim
trigger1 = !Time 
value = 5050

[State 821, Muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 821, End]
type = SelfState
trigger1 = vel y>0
trigger1 = pos y>-vel y
value = 5100

;===========<KUNG FU TOSS>================
[Statedef 850]
type = S
movetype = A
physics = S
anim = 850
velset = 0, 0
poweradd = 0
sprpriority = 2

[State 850, Safety]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 850, More Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 850, Throw Escape]
type = ChangeState
trigger1 = NumTarget && var(19)
trigger1 = (Target, command = "holdfwd" || Target, command = "holdback")
trigger1 = (Target, command = "b" || Target, command = "c" || Target, command = "y" || Target, command = "z")
value = 890

[State 850, Throw Escape]
type = VarAdd
trigger1 = var(19) > 0
var(19) = -1

[State 850, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 860

[State 850, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo = 805 && !Time
value = 850
elem = 1

[State 850, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = -1

[State 850, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 850, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,3
channel = 0

[State 850, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1,2
channel = 1

[State 850, Width]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(6) < 0
edge = 65,0

[State 850, SprPriority]
type = SprPriority
trigger1 = AnimElem = 3
value = -1

[State 850, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
trigger1 = NumTarget
pos = ceil(39 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 850, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(20 * const(size.xScale)), ceil(-60 * const(size.yScale))

[State 850, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger1 = NumTarget
pos = ceil(10 * const(size.xScale)), ceil(-90 * const(size.yScale))

[State 850, Bind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger1 = NumTarget
pos = ceil(56 * const(size.xScale)), ceil(-120 * const(size.yScale))

[State 850, Turn 4]
type = Turn
trigger1 = AnimElem = 4

[State 850, Damage 4]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 4
value = floor(ifElse(100 * fvar(11) < 7, -7, -100 * fvar(11)))

[State 850, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 4
value = 35

[State 850, PowerAdd]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 4 && !var(20)
value = 70

[State 850, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 4
value = 1

[State 850, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 4
var(13) = 1

[State 850, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 4
var(15) = 1
ignoreHitPause = 1

[State 850, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 4
var(16) = 1
ignoreHitPause = 1

[State 850, Throw]
type = TargetState
trigger1 = NumTarget && AnimElem = 5
value = 861

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

;===========<KUNG FU TOSS (TARGET)>================
[Statedef 860]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 1

[State 860, On Ground]
type = PosSet
trigger1 = !Time
y = 0

[State 860, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,0

[State 860, ChangeAnim2]
type = ChangeAnim2
Trigger1 = !Time && PrevStateNo != 806
value = 860

[State 860, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
trigger1 = PrevStateNo = 806
value = 860
elem = 1

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 860, Safety]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;===========<KUNG FU TOSS (TOSSED AWAY)>================
[Statedef 861]
type    = A
movetype= H
physics = N
velset = 0,0

[State 861, Velocity]
type = Velset
trigger1 = !Time 
x = 5
y = -6

[State 861, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 1,0

[State 861, Gravity]
type = Veladd
trigger1 = Time >= 0
y = 0.5

[State 861, Recovery] ; 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 861, Recovery] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 861, End]
type = SelfState
trigger1 = vel y>0
trigger1 = pos y>-vel y
value = 5100 ;hit ground anim

;===========<THROW ESC'D>==========
[StateDef 890]
type = S
physics = N
movetype = I
anim = 5945
ctrl = 0
velset = 0,0
sprPriority = 1

[State 890, TargetBind]
type = TargetBind
trigger1 = !Time && NumTarget
pos = 0,0

[State 890, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 895

[State 890, TargetFacing]
type = TargetFacing
trigger1 = !Time && NumTarget
value = -1

[State 890, PosAdd]
type = PosAdd
trigger1 = !Time
x = 24

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

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

[State 890, SprPriority 1]
type = SprPriority
trigger1 = AnimElemTime(6) >= 0
value = 1

[State 890, SprPriority -1]
type = SprPriority
trigger1 = AnimElemTime(2) <= 0
value = -1

[State 890, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 890, VelSet]
type = VelSet
trigger1 = 1
x = -1.425
y = 0

[State 890, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 800,2
channel = 0

[State 890, Escape Sound]
type = PlaySnd
trigger1= !Time
value = 130,0

[State 890, Throw Escape FX]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 8000
ID = 8000
name = "Spark"
PosType = P1
pos = 0, -54
facing = -1
ownPal = 1
size.xScale = 0.5
size.yScale = 0.5
pauseMoveTime = 65535
superMoveTime = 65535

[State 890, End]
type = ChangeState
trigger1 = Time >= 27
value = 0
ctrl = 1

;Target Escape
[StateDef 895]
type = S
physics = N
moveType = I
ctrl = 0
velSet = 0,0
sprPriority = 1

[State 895, ChangeAnim]
type = ChangeAnim
trigger1= !Time
value = ifElse(SelfAnimExist(5940), 5940, 130)

[State 895, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && !SelfAnimExist(5945) && SelfAnimExist(5940)
value = 5940

[State 895, ChangeAnim]
type = ChangeAnim
trigger1= !Time && !SelfAnimExist(5945) && !SelfAnimExist(5940) && SelfAnimExist(5910)
value = 5910

[State 895, ChangeAnim]
type = ChangeAnim
trigger1 = Time >= 20 && Anim = 130
value = 140

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

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

[State 895, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 895, VelSet]
type = VelSet
trigger1 = 1
x = -1.425
y = 0

[State 895, End]
type = SelfState
trigger1 = Time >= 27
value = 0
ctrl = 1

;=================<KUNG FU UPPER Z-COUNTER>=================
;NOTE: This is a special attack that only triggers for KFG's Z-Counter.
;A custom state was implemented to give the opponent a flipping,
;animation when they are hit.
[Statedef 10750]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0
anim = 10750
sprpriority = 2
facep2 = 1

[State 10750, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 
value = 0, 12
channel = 0

[State 10750, Swing Snd]
type = playsnd
trigger1 = Animelem = 3
value = 1,2
channel = 1

[State 10750, Width]
type = Width
trigger1 =  AnimElemTime(6) < 0
player = 5,0

[State 10750, Muteki]
type = Nothitby
trigger1 = AnimElemTime(6) < 0
time = 1
value = SCA

[State 10750, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4 
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
animtype = Up          ;light,medium,hard,back,up,diagup
priority = 6, Hit   ;Higher value for counters
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
ID = 10750
getpower = 0, 0
givepower = 30, 30
pausetime = 10,10
guard.pausetime = 12, 12
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 40), var(36) := -65
hitsound = S1000,0;s2,2
guardsound = s130, 0
air.animType = Up
fall.animType = Up
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 18 + 4*var(9)
ground.hittime = 18 + 4*var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -0.5, -15
guard.velocity = -10.5
air.velocity = -0.5,-15
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

;[State 10750, ChangeAnim]
;type = ChangeAnim
;trigger1 = AnimElemTime(4) > 0 && AnimElemTime(5) <= 0
;trigger1 = movecontact=1 && hitpausetime
;ignorehitpause = 1
;persistent = 0
;value = anim
;elem = 5

[State 10750, TargetState];causes foe to flip through the air
type = TargetState
trigger1= Movehit && NumTarget(10750)
trigger1= (Target(10750),StateNo=5000) || (Target(10750),StateNo=5010) || (Target(10750),StateNo=5020)
value= 1111150
ID= 10750
ignorehitpause= 1

[State 10750, Special Hit Snd]
type= PlaySnd
trigger1= Movehit && NumTarget(10750)
value= 10750,0
ignorehitpause= 1
persistent= 0

[State 10750, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

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

;======================<HIT by Z-COUNTER UPPERCUT>========================
[Statedef 1111150]
type=A
movetype=H
physics=N
velset=0,0
anim=5030

[State 1111150, PosAdd]
type=posadd
trigger1= !time
y=const(size.mid.pos.y)

[State 1111150, Target Anim: Flipping]
type=changeanim2
trigger1= !time
value=1111150

[State 1111150, Velocity]
type=hitvelset
trigger1= !time
x=1
y=1

[State 1111150, Gravity]
type=veladd
trigger1= 1
y=gethitvar(yaccel)

[State 1111150, ScreenBound]
type=screenbound
trigger1= 1
value=1
movecamera=0,0

[State 1111150, End]
type=selfstate
trigger1= vel y>0 && pos y>=-5
value=5100