; 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, 6, 7)
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 = 3
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) := 90), var(36):=-65
hitsound = S2, 0
guardsound = s130, 0
animType = Light
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.slidetime = 12 + 2 * var(9)
ground.hittime  = 12 + 2 * var(9)
guard.hittime = 12
ground.velocity = -4
guard.velocity = -4
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.velocity = -2.6,-7
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(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = MoveContact =1 && Hitpausetime
value = Anim
elem = 4
ignorehitpause = 1
persistent = 0

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

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

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

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

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

[State 201, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2
attr = S, NA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 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) := 90), var(36):=-45
hitsound = S2, 0
guardsound = s130, 0
animType = Light
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.slidetime = 12 + 2* var(9)
ground.hittime  = 12 + 2* var(9)
guard.hittime = 12
ground.velocity = -4
guard.velocity = -4
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.velocity = -2.6,-7
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 201, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 3
ignorehitpause = 1
persistent = 0

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

[State 201, 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, 6, 7)
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 = 4
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) * 49 < 7, 7, fvar(11) * 49)), 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) := 65), var(36) := -50
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 = -2, -7.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 210, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) <= 0
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 5

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

[State 210, 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 = 1 && Random < 500
value = 0, ifelse(random<500, 7, 8)
channel = 0

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

[State 220, 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) * 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) := 118), var(36) := -90
hitsound = s2,2
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 = -10
guard.velocity = -10
air.velocity = -5.2,-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, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

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

; Standing 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 = 1 && random < 500
value = 0, ifelse(random<500, 7, 8)
channel = 0

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

[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) * 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) := 110), var(36) := -76
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,-7.4
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, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact=1 && hitpausetime
ignorehitpause = 1
persistent = 0
value = anim
elem = 5

[State 221, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 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, 6, 7)
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) := 75), var(36):=-101
hitsound = s2,3
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;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.25,-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 230, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 3
ignorehitpause = 1
persistent = 0

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

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

; Standing 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, 6, 7)
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 = 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) * 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) := 90), var(36):=-35
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 = -4.15
guard.velocity = -4.15
air.velocity = -5.25,-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 231, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 4
ignorehitpause = 1
persistent = 0

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

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

;Benitsuru no Mai
[Statedef 232]
type    = S
movetype= A
physics = S
poweradd= 10 * !var(20)
ctrl = 0
velset = 0,0
anim = 232
sprpriority = 2
facep2 = 1

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

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

[State 232, StateTypeSet: Air, no phys]
type = StateTypeSet
trigger1 = Time = 15;17
statetype = A
physics = N

[State 232, Velocity]
type = VelSet
trigger1 = Time = 15
x = 4
y = -3.25 ;3

[State 232, Gravity]
type = VelAdd
trigger1 = Time > 15
y = 0.375 

[State 232, VelMul]
type = VelMul
trigger1 = Time > 15
x = 1

[State 232, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 8
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = Light          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 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) := 100), var(36):=-44
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
airguard.ctrlTime = 16
air.hittime = 120
ground.velocity = -4.5
guard.velocity = -4.5
air.velocity = -5.25,-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 232, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = MoveContact
moveType = I

[State 232, End]
type = ChangeState
trigger1 = pos y > -vel y
trigger1 = Time > 16
value = 233

;Landing
[Statedef 233]
type = S
movetype = I
physics = S
ctrl = 0
anim = 233
velset = 0, 0

[State 233, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 233, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 233, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;Benitsuru no Mai(command link)
[Statedef 234]
type    = S
movetype= A
physics = S
poweradd= 10 * !var(20)
ctrl = 0
velset = 0,0
anim = 232
sprpriority = 2
facep2 = 1

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

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

[State 234, StateTypeSet: Air, no phys]
type = StateTypeSet
trigger1 = Time = 15;17
statetype = A
physics = N

[State 234, Velocity]
type = VelSet
trigger1 = Time = 15
x = 4
y = -3.25 ;3

[State 234, Gravity]
type = VelAdd
trigger1 = Time > 15
y = 0.375 

[State 234, VelMul]
type = VelMul
trigger1 = Time > 15
x = 1

[State 234, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 8
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;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 = 30 * !var(20), 30 * !var(20)
givepower = 15, 15
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) := 100), var(36):=-44
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
airguard.ctrlTime = 16
air.hittime = 120
ground.velocity = -4.5
guard.velocity = -4.5
air.velocity = -5.25,-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 234, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = MoveContact
moveType = I

[State 234, End]
type = ChangeState
trigger1 = pos y > -vel y
trigger1 = Time > 16
value = 233

;---------------------------------------------------------------------------
; 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, 6, 7)
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 = 6
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) * 56 < 7, 7, fvar(11) * 56)), 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) := -78
hitsound = s2,4
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;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 = -7
guard.velocity = -7
air.velocity = -3, -7.2
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, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(8) >= 0
moveType = I

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

;-------------------------------------------------------------------------------
;Dancing of Tensui
;Unique Attack
[Statedef 241]
type    = S
movetype= A
physics = S
poweradd= 20 * !var(20)
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2
facep2 = 1

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

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

[State 241, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 6
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) * 56 < 7, 7, fvar(11) * 56)), 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) := -78
hitsound = s2,4
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;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 = -7
guard.velocity = -7
air.velocity = -3, -7.2
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 241, Velocity]
type = VelSet
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
trigger5 = AnimElem = 6
trigger6 = AnimElem = 7
trigger7 = AnimElem = 8
trigger8 = AnimElem = 9
x = 2.5

[State 241, Stop]
type = VelSet
trigger1 = AnimElem = 10
x = 0

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

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

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

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

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

[State 242, 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) := 85), var(36) := -78
hitsound = s2,4
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 15 + 3*var(9)
ground.hittime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -6.75
guard.velocity = -6.75
air.velocity = -3.25, -7.2
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 242, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 5
ignorehitpause = 1
persistent = 0

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

[State 242, 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=1 && random<500
value= 0, ifelse(random<500, 7, 8)
channel=0

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

[State 250, Width]
type = Width
trigger1 = AnimElemTime(6) < 0
player = 8,0

[State 250, 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) * 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) := 68), var(36) := -93
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.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 250, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
moveType = I

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

;-----------------------
;Fierce Blossom (norm)
;Unique Attack
[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, 7, 8)
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 = 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) * 84 < 7, 7, fvar(11) * 84)), 0
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) := 100), var(36) := -72
hitsound = s2,5
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 = -8,-3
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
air.fall = 1
fall.recover = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 251, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 6
ignorehitpause = 1
persistent = 0

[State 251, Fwd Momentum]
type = PosAdd
trigger1 = AnimElem = 2
x = 4

[State 251, Fwd Momentum]
type = PosAdd
trigger1 = AnimElem = 3 || AnimElem = 4 || AnimElem = 5
x = 7

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

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

;-----------------------
;Fierce Blossom (during dodge)
;Unique Attack
[Statedef 252]
type    = S
movetype= A
physics = S
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 252
sprpriority = 2
facep2=1

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

[State 252, Swing Snd]
type=playsnd
trigger1= animelem=2
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) * 84 < 7, 7, fvar(11) * 84)), 0
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) := 100), var(36) := -72
hitsound = s2,5
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
ground.velocity = -8.75,-1.35
guard.velocity = -8.75
air.velocity = -8.75,-3.25
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
y.accel = .58
air.fall = 1
fall = 1
fall.recover = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 252, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 6
ignorehitpause = 1
persistent = 0

[State 252, Fwd Momentum]
type = PosAdd
trigger1 = AnimElem = 2
x = 4

[State 252, Fwd Momentum]
type = PosAdd
trigger1 = AnimElem = 3 || AnimElem = 4 || AnimElem = 5
x = 7

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

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

;-----------------------
;Fierce Blossom (command link)
;Unique Attack
[Statedef 253]
type    = S
movetype= A
physics = S
poweradd= 30 * !var(20)
ctrl = 0
velset = 0,0
anim = 251
sprpriority = 2
facep2=1

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

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

[State 253, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 2
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) * 28 < 7, 7, fvar(11) * 28)), 0
getpower = ifElse(!var(13), 100, 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) := 100), var(36) := -72
hitsound = s2,5
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 = -7
guard.velocity = -7
air.velocity = -8,-2.25
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 0
air.fall = 1
fall.recover = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 253, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 6
ignorehitpause = 1
persistent = 0

[State 253, Fwd Momentum]
type = PosAdd
trigger1 = AnimElem = 2
x = 4

[State 253, Fwd Momentum]
type = PosAdd
trigger1 = AnimElem = 3 || AnimElem = 4 || AnimElem = 5
x = 7

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

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

;---------------------------------------------------------------------------
; Crouching Light Punch
[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, 6, 7)
channel=0

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

[State 400, 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
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) := 90), var(36):=-32
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 = -4.05
guard.velocity = -4.05
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(4) >= 0
moveType = I

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

;---------------------------------------------------------------------------
; Crouching Medium Punch
[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, 6, 7)
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) * 49 < 7, 7, fvar(11) * 49)), 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) := -35
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
guard.velocity = -6
air.velocity = -3, -7.2
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
[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, 7, 8)
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) * 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) := 85), var(36) := -35
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.5
guard.velocity = -9.5
air.velocity = -2.35,-7.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 420, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 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, 6, 7)
channel=0

[State 430, Swing Snd]
type=playsnd
trigger1= animelem=2
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) := 86), 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 = -4.05
guard.velocity = -4.05
air.velocity = -5,-6.2
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, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

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

;---------------------------------------------------------------------------
; Crouching Medium Kick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = N;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<400
value= 0, ifelse(random<500, 6, 7)
channel=0

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

[State 440, Slide Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 110,1
channel = 2

[State 440, Dust Helper]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8103
ID = 8100
pos = -5,0
name = "Dash Dust"
posType = P1
pauseMoveTime = 255
superMoveTime = 255
ownPal = 1

[State 440, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 4

[State 440, Friction]
type = VelAdd
triggerall = vel x > 0
trigger1 = AnimElemTime(3)>0
x = -0.01

[State 440, Stop]
type = VelSet
trigger1 = AnimElem = 5
x = 0

[State 440, 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 = L         ;HLA
animtype = Medium          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 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) := 78), var(36) := -6
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 = -5, -6.25
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, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I
physics = C

[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=1 && random<500
value= 0, ifelse(random<500, 7, 8)
channel=0

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

[State 450, 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 = L         ;HLA
animtype = Hard          ;light,medium,hard,back,up,diagup
priority = 4,Hit   ;Hit,Miss,Dodge
damage = ceil(ifElse(fvar(11) * 84 < 7, 7, fvar(11) * 84)), 0
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) := 75), 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 = 1
fall.recovertime = 120
yaccel = .58
ground.velocity = -1.5, -6
guard.velocity = -6
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, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

; Alpha Counter Trip
; 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=1 && random<500
value= 0, ifelse(random<500, 7, 8)
channel=0

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

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

[State 451, HitDef: Counter]
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 = 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) * 84 < 7, 7, fvar(11) * 84)), 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) := 75), 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 = -5.5, -5.35
guard.velocity = -6
air.velocity = -5.5, -5.35
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, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

[State 451, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; 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, ifelse(random<500, 6, 7)
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) := 81), var(36):=-40
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.75, 0
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(8) >= 0
moveType = I

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

[State 600, 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 = 605
sprpriority = 2

[State 610, Voice]
type=playsnd
trigger1= animelem=1
value= 0, ifelse(random<500, 6, 7)
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) := 60), var(36) := -30;85,-32
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.25, 0
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(4) >= 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, ifelse(random<500, 7, 8)
channel=0

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

[State 620, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
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) := 85), var(36) := -32
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
airguard.ctrlTime = 16
air.velocity = -5,-6
airguard.velocity = -5.5, 0
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 620, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

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

; Dairin Fuusha Otoshi
; CNS difficulty: easy
[Statedef 621]
type    = A
movetype= A
physics = N
poweradd= 30 * !var(20)
ctrl = 0
anim = 621
sprpriority = 2

[State 621, Voice]
type=playsnd
trigger1= animelem=1
value= 0, ifelse(random<500, 7, 8)
channel=0

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

[State 621, 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) := 85), var(36) := -32
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
airguard.ctrlTime = 16
air.velocity = -2.5,10
airguard.velocity = -6.5, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
yaccel = .58
fall = 0
air.fall = 1
fall.recover = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

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

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

[State 621, 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, ifelse(random<500, 6, 7)
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 = 4
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) := 84), 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.5
airguard.velocity = -5, 0
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, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(9) >= 0
moveType = I

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

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

;-----------------------------------
;Ukihane
[Statedef 631]
type    = A
movetype= A
physics = N
poweradd= 10 * !var(20)
velset = 2,-2
ctrl = 0
anim = 631
sprpriority = 2

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

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

[State 631, VelAdd]
type = VelAdd
trigger1 = Time > 24
y = .25

[State 631, VelMul]
type = VelMul
trigger1 = Time > 0
x = 1

[State 631, VelSet]
type = VelSet
trigger1 = Time = 24
y = 4.5

[State 631, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 6
attr = A, NA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 0
animtype = Hard
guardflag = HA
hitflag = MAF
ID = 635
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) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 84), var(36):=-40
hitsound = S2, 5
guardsound = s130, 0
air.animType = Back
fall.animType = Back
ground.type = High
ground.slidetime = 12 + 4*var(9)
ground.hittime  = 12 + 4*var(9)
guard.hittime = 15
ground.velocity = -5.40, 0
guard.velocity = -8
air.type = High
airguard.ctrlTime = 16
down.hitTime = 20
air.velocity = -5.4, 6.55
airguard.velocity = -8, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
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 631, TargetState];slams target into ground
type = TargetState
trigger1 = MoveHit && NumTarget(635)
trigger1 = !(Target(635), Time)
trigger1 = (Target(635), StateNo = 5000) || (Target(635), StateNo = 5010)
value = 635
ID = 635
ignoreHitPause = 1

[State 631, StateTypeSet: Idle After Contact]
type = StateTypeSet
trigger1 = MoveContact
movetype = I

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

;Landing
[Statedef 632]
type = S
movetype = I
physics = S
ctrl = 0
anim = 632
velset = 0, 0

[State 632, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 632, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 632, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;Being Slammed
[StateDef 635]
type = A
moveType = H
physics = N
velset = 0,0

[State 635, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = ifElse(SelfAnimExist(5980) && enemyNear, AuthorName != "Warusaki3", 5980, 5002)

[State 635, End]
type = SelfState
trigger1 = HitShakeOver && pos y < 0
value = 5030

[State 635, End]
type = ChangeState
trigger1 = HitShakeOver && pos y >= 0
value = 636


;Hitting the Ground
[StateDef 636]
type = L
moveType = H
physics = N
velSet = 0,0

[State 636, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 5100

[State 636, Pos]
type = PosSet
trigger1 = 1
y = 0

[State 636, EnvShake]
type = EnvShake
trigger1 = !Time
time = 14
ampl = -4

[State 636, Impact Sound]
type = PlaySnd
trigger1 = !Time
value = F7,1

[State 636, End]
type = ChangeState
trigger1 = !AnimTime
value = 637


;Bouncing Off Ground
[StateDef 637]
type = L
moveType = H
physics = N

[State 637, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 5160

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

[State 637, VelSet]
type = VelSet
trigger1 = !Time
y = -2.4

[State 637, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.6

[State 637, End]
type = SelfState
trigger1 = vel y > 0
trigger1 = pos y >= 12
value = 5110

;---------------------------------------------------------------------------
; 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, ifelse(random<500, 6, 7)
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 = 3
attr = A, NA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 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) := 93), 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,0
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(6) >= 0
moveType = I

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

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

;------------------------------------------------
; Yusura Ume
[Statedef 641]
type    = A
movetype= A
physics = N
poweradd= 20 * !var(20)
ctrl = 0
anim = 641
sprpriority = 2

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

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

[State 641, VelAdd]
type = VelAdd
trigger1 = Time > 0
Y = .25

[State 641, VelSet]
type = VelSet
trigger1 = Time > 0
x = 5.5

[State 641, VelMul]
type = VelMul
trigger1 = 1
x = 1

[State 641, VelSet]
type = VelSet
trigger1 = Time = 25
y = 4.5

[State 641, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 0
animtype = Hard
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) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 22), var(36) := -32
hitsound = S2, 5
guardsound = s130, 0
ground.type = High
ground.slidetime = 12 + 4*var(9)
ground.hittime  = 12 + 4*var(9)
guard.hittime = 15
ground.velocity = -5, -6
guard.velocity = -6
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 = 1
fall.recover = 0
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48

[State 641, StateTypeSet: Idle After Contact]
type = StateTypeSet
trigger1 = MoveContact
movetype = I

[State 641, Rebound Flip]
type = ChangeState
trigger1 = MoveGuarded
value = 642

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

;Rebound on Guard
[Statedef 642]
type    = A                      
movetype= I                    
physics = N                     
velset = -2,-2.75                  
ctrl = 0                       
anim = 642 
poweradd= 0                               
sprpriority = 2
facep2 = 1

[State 642, Gravity]
type = VelAdd
trigger1 = Time > 0 
y = 0.35

[State 642, VelMul]
type = VelMul
trigger1 = Time > 0 
x = 1 

[State 642, 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 = 1
value = 0, ifelse(random<500, 7, 8)
channel = 0

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

[State 650, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3
attr = A, NA
damage = ceil(ifElse(fvar(11) * 84 < 7, 7, fvar(11) * 84)), 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) := 65), var(36) := -9
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, 0
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(3) >= 0 && AnimElemTime(4)< 0
trigger1 = movecontact=1 && hitpausetime
value = anim
elem = 4
ignorehitpause = 1
persistent = 0

[State 650, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 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, 7, 8)
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 = 3
attr = A, NA
damage = ceil(ifElse(fvar(11) * 84 < 7, 7, fvar(11) * 84)), 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) := -26
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, 0
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(4) >= 0
moveType = I

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

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

;---------------------
; Throw Attempt
[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) = (helper(10371), var(3)) && (helper(10371), var(4)) || (helper(10371), var(4)) && (helper(10371), var(5)) || (helper(10371), var(3)) && (helper(10371), var(5))

[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 = 35,35
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 = 35,35
hitflag = M-
numhits = 0
sparkno = -1
p1stateno = ifelse (command = "holdfwd",805,860)
hitsound = s800, 0
fall = 1
fall.recover = 0

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

[State 800, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 2
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 || AnimElemTime(4) >= 0
pos = ceil(32 * const(size.xScale)), 0

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

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

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

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

[State 805, End]
type = ChangeState
trigger1 = AnimElemTime(4) >= 0
value = ifElse(var(10), 860, 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

;------------------------
;Throw 1 - Success
[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, Width]
type = Width
triggerall = !Time
trigger1 = PrevStateNo = 805
edge = 90,0

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

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

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

[State 810, TargetBind 2-5 Head]
type = BindtoTarget
trigger1 = AnimElemTime(2) >=0 && AnimElemTime(6) < 0
trigger1 = numtarget = 1
pos = 0,0,Head

[State 810, TargetBind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >=0 && AnimElemTime(7) < 0
trigger1 = numtarget
pos = ceil(-35 * const(size.xScale)), ceil(-93 * const(size.yScale))

[State 810, TargetBind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >=0 && AnimElemTime(8) < 0
trigger1 = numtarget
pos = ceil(-20 * const(size.xScale)), ceil(-103 * const(size.yScale))

[State 810, TargetBind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(8) < 1
trigger1 = numtarget
pos = ceil(-15 * const(size.xScale)), ceil(-103 * const(size.yScale))

[State 810, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 41,0

[State 810, Width]
type = Width
triggerall = AnimElem = 5
trigger1 = FrontEdgeDist < 55
edge = 55,0

[State 810, Width]
type = Width
triggerall = AnimElem = 8
trigger1 = FrontEdgeDist < 60
edge = 60,0

[State 810, Step Snd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 100,0

[State 810, On Ground]
type = PosSet
trigger1 = AnimElem = 6
y = 0

[State 810, PosAdd]
type = PosAdd
trigger1 = AnimElem = 6
x = 65

[State 810, Voice]
type = PlaySnd
trigger1 = AnimElem = 8
value = 0,9
channel = 0

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

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

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

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

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

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

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

[State 810, Throw 8]
type = TargetState
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(8) < 1
trigger1 = numtarget
value = 821

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

;--------------------------
;Throw 1 - foe being thrown
[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

;------------------------
;Throw 1 - foe thrown away
[Statedef 821]
type = A
movetype = H
physics = N
velset = -7,-5
sprpriority = 1

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

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

[State 821, VelAdd]
type = VelSet
trigger1 = Vel Y > 0 && Pos Y >= 0
x = -3

[State 821, Recover]
type = SelfState
trigger1 = command = "recovery"
trigger1 = Alive && CanRecover
trigger1 = vel y>-1 && pos y>=-24
value = 5200

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

;--------------------
;Throw 2 - Success
[Statedef 860]
type = S
movetype = A
physics = S
anim = 860
velset = 0, 0
poweradd = 0
sprpriority = 2

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

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

[State 860, 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 860, Throw Escape]
type = VarAdd
trigger1 = var(19) > 0
var(19) = -1

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

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

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

[State 860, Width]
type = Width
trigger1 = AnimElemTime(4) < 0 
edge = 65,50

[State 860, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(12) < 0
edge = 70,0

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

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

[State 860, TargetBind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >=0 && AnimElemTime(3) < 0
trigger1 = numtarget
pos = ceil(39 * const(size.xScale)), ceil(-90 * const(size.yScale))

[State 860, TargetBind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger1 = numtarget
pos = ceil(15 * const(size.xScale)), ceil(-100 * const(size.yScale))

[State 860, TargetBind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger1 = numtarget
pos = ceil(-26 * const(size.xScale)), ceil(-78 * const(size.yScale))

[State 860, TargetBind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger1 = numtarget
pos = ceil(-57 * const(size.xScale)), ceil(-5 * const(size.yScale))

[State 860, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = -7

[State 860, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3
x = -18

[State 860, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4
x = -26

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

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

[State 860, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 2,7

[State 860, Hit Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 2,5
channel = 3

[State 860, Turn]
type = Turn
trigger1 = AnimElem = 16

[State 860, Throw 6]
type = TargetState
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(6) < 1
trigger1 = NumTarget
value = 871

[State 860, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 6
value = floor(ifElse(105 * fvar(11) < 7, -7, -105 * fvar(11)))

[State 860, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 6
value = 35

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

[State 860, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 6
value = 1

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

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

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

[State 860, Impact Dust]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 8110
ID = 8110
name = "Impact Dust"
posType = P1
facing = -1
pos = -57,0
ownPal = 1

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

;---------------------------
;Throw 2 - foe being slammed
[Statedef 870]
type = A
movetype = H
physics = N
velset = 0, 0
ctrl = 0

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

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

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

[State 870, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
trigger1 = PrevStateNo = 806
value = 870
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 870, Safety]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;---------------------------
;Throw 2 - bounce from slam
[Statedef 871]
type = A
physics = N
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

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

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

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

[State 871, Velocity]
type = VelSet
trigger1 = !Time
x = 5.3
y = -5.5

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

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

;===========<Throw Escaped>==========
[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 = 0,13
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

;===========<AIR THROW ATTEMPT>==========
[StateDef 900]
type = A
physics = N
moveType = A
anim = 900
ctrl = 0
sprPriority = 1
powerAdd = 30 * !var(20)

[State 900, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = (helper(10371), var(3)) && (helper(10371), var(4)) || (helper(10371), var(4)) && (helper(10371), var(5)) || (helper(10371), var(3)) && (helper(10371), var(5))

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

[State 900, Throw 1]
type = HitDef
trigger1 = AnimElem = 2
attr = A,NT
hitFlag = AF
priority = 3,Miss
getPower = 35 * !var(20)
givePower = 35,35
numhits = 0
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 910
p2stateno = 920
p2getp1state = 1
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 900, Throw 2]
type = HitDef
trigger1 = AnimElem = 2 && var(10)
attr = A,NT
hitFlag = AF
priority = 3,Miss
getPower = 35 * !var(20)
givePower = 35,35
numhits = 0
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 930
p2stateno = 940
p2getp1state = 1
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 900, Miss Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,10
channel = 0

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

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

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

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

;-------------------------
; Air Throw - Success
[Statedef 910]
type = A
movetype = A
physics = N
anim = 910
ctrl = 0
velset = 0,0

[State 910, Safety]
type = ChangeState
trigger1 = !Time && !Numtarget
value = 51
ctrl = 1

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

[State 910, TargetState]
type = TargetState
trigger1 = !Time
value = 920

[State 910, TargetBind 1]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
trigger1 = NumTarget
pos = ceil(35 * const(size.xScale)), ceil(-35 * const(size.yScale))

[State 910, TargetBind 2]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
trigger1 = NumTarget
pos = ceil(15 * const(size.xScale)), ceil(-35 * const(size.yScale))

[State 910, TargetBind 3]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
trigger1 = NumTarget
pos = ceil(0 * const(size.xScale)), ceil(-15 * const(size.yScale))

[State 910, TargetBind 4+]
type = TargetBind
trigger1 = AnimElemNo(0) > 3
trigger1 = NumTarget
pos = 0,0

[State 910, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0,8
channel = 0

[State 910, Gravity]
type = VelAdd
trigger1 = AnimElem = 6 > 0
y = .67

[State 910, End]
type = ChangeState
trigger1 = AnimElem = 6 > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 911

;------------------------
;Air Throw - Success 2nd
[Statedef 911]
type = S
movetype = A
physics = S
anim = 911
ctrl = 0
velset = 0,0

[State 911, On Ground]
type = PosSet
trigger1 = !Time
Y = 0

[State 911, Impact Shake]
type = EnvShake
trigger1 = !Time
time = 14
freq = 120
ampl = 4

[State 911, Slam Snd]
type = PlaySnd
trigger1 = !Time
value = 2,7

[State 911, Hit Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2,5
channel = 3

[State 911, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 1
value = floor(ifElse(112 * fvar(11) < 7, -7, -112 * fvar(11)))

[State 911, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 1
value = 35

[State 911, Power]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 1 && !var(20)
value = 70

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

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

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

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

[State 911, Throw]
type = TargetState
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(1) < 1
trigger1 = NumTarget
value = 921

[State 911, Impact Dust]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 8110
ID = 8110
name = "Impact Dust"
posType = P1
facing = -1
pos = 0,0
ownPal = 1

[State 911, StateTypeSet];Air, no physics
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A
physics = N

[State 911, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = -1.5
y = -11

[State 911, Gravity]
type = VelAdd
trigger1 = AnimElem = 2 > 1
y = .67

[State 911, End]
type = ChangeState
trigger1 = AnimElem = 2 > 1
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 912

;------------------------
;Air Throw - Success 3rd
[Statedef 912]
type = S
movetype = I
physics = S
anim = 912
ctrl = 0
velset = 0,0

[State 912, On Ground]
type = PosSet
trigger1 = !Time
Y = 0

[State 912, Land Snd]
type = PlaySnd
trigger1 = !Time
value = 52,0

[State 912, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;-----------------------
;Air Throw - Foe State
[Statedef 920]
type = A
movetype = H
physics = N
velset = 0, 0
ctrl = 0

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

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

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

;------------------------
;Air Throw - Foe Finish
[Statedef 921]
type = A
movetype = H
physics = N
velset = -4,-6
anim = 5160

[State 921, VelAdd]
type = VelAdd
trigger1 = 1
y = .45

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

[State 921, Velocity]
type = VelSet
trigger1 = Vel Y > 0 && Pos Y >= 0
x = -3

[State 921, SelfState]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

;================<TOKI TSUBUTE>==============
[Statedef 930]
type = A
movetype = A
physics = N
anim = 930
ctrl = 0
velset = 0,0

[State 930, Safety]
type = ChangeState
trigger1 = !Time && !Numtarget
value = 51
ctrl = 1

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

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

[State 930, TargetState]
type = TargetState
trigger1 = !Time
value = 940

[State 930, TargetBind 1-3]
type = BindtoTarget
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
trigger1 = NumTarget
pos = 5,5,Head

[State 930, TargetBind 4+]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 
trigger1 = NumTarget
pos = 10,-7

[State 930, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,8
channel = 0

[State 930, Gravity]
type = VelAdd
trigger1 = AnimElemTime(5) > 0
y = .45

[State 930, End]
type = ChangeState
trigger1 = AnimElemTime(5) > 0
trigger1 = pos y > -vel y;Vel Y > 0 && Pos Y >= 0
value = 931

;Toki Tsubute 2nd
[Statedef 931]
type = S
movetype = A
physics = S
anim = 931
ctrl = 0
velset = 0,0

[State 931, On Ground]
type = PosSet
trigger1 = !Time
Y = 0

[State 931, Impact Shake]
type = EnvShake
trigger1 = !Time
time = 14
freq = 120
ampl = 4

[State 931, Slam Snd]
type = PlaySnd
trigger1 = !Time
value = 2,7

[State 931, Hit Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2,5
channel = 3

[State 931, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 1
value = floor(ifElse(112 * fvar(11) < 7, -7, -112 * fvar(11)))

[State 931, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 1
value = 35

[State 931, Power]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 1 && !var(20)
value = 70 

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

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

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

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

[State 931, Throw]
type = TargetState
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
trigger1 = NumTarget
value = 941

[State 931, Impact Dust]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 8110
ID = 8110
name = "Impact Dust"
posType = P1
facing = -1
pos = 0,0
ownPal = 1

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

;================<TOKI TSUBUTE (TARGET)>==============
[Statedef 940]
type = A
movetype = H
physics = N
velset = 0, 0
ctrl = 0

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

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

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

;Target Finish
[Statedef 941]
type = A
physics = N
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

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

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

[State 941, Gravity]
type = VelAdd
trigger1 = 1
y = .5

[State 941, Velocity]
type = VelSet
trigger1 = !Time
x = -5.3
y = -6

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

[State 941, Turn]
type = Turn
trigger1 = vel y>0
trigger1 = pos y>-vel y

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