; _________________________________________
;| B.B. Hood by Jmorphman                  |
; ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;==============================================================================================
;========================================<NORMAL MOVES>========================================
;==============================================================================================

;===========<STANDING FAR LIGHT PUNCH>==========
[StateDef 200]
type = S
physics = N
moveType = A
anim = 200
ctrl = 0
velSet = ifElse((PrevStateNo = [100,105]), vel x, 0), 0
sprPriority = 1
powerAdd = 0
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 200, Woosh]
type = PlaySnd
trigger1 = !Time
value = 1,0
channel = 1

[State 200, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animType = Light
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = ifElse(var(13) > 3, 9, 12 + 2 * var(9) - var(13)) ;hittime deteriorates with each hit to avoid the instant dash infinite aka Sako infinite
ground.slideTime = ifElse(var(13) > 3, 9, 12 + 2 * var(9) - var(13))
guard.hitTime = ifElse(var(13) > 3, 9, 12 + 2 * var(9) - var(13))
air.hitTime = 120
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -4.31, -7.36
air.cornerPush.velOff = 0
yAccel = 0.4
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 0)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 73), var(36):= -75
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd = -255,-255,-255,48

[State 200, ChangeAnimElem 2]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 6
value = 200
elem = 4
ignoreHitPause = 1

[State 200, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 6
value = 200
elem = 3
ignoreHitPause = 1

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

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



;===========<STANDING CLOSE LIGHT PUNCH>==========
[StateDef 205]
type = S
physics = S
moveType = A
anim = 205
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 205, Woosh]
type = PlaySnd
trigger1 = !Time
value = 1,0
channel = 1

[State 205, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animType = Light
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 12 + 2 * var(9)
ground.slideTime = 12 + 2 * var(9)
guard.hitTime = 12
air.hitTime = 120
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -4.31, -7.36
air.cornerPush.velOff = 0
yAccel = 0.4
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 0)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 49), var(36):= -75
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd = -255,-255,-255,48

[State 205, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 6
value = 205
elem = 3
ignoreHitPause = 1

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

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



;===========<STANDING FAR MEDIUM PUNCH>==========
[StateDef 210]
type = S
physics = N
moveType = A
anim = 210
ctrl = 0
velSet = ifElse((PrevStateNo = [100,105]), vel x, 0), 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 210, Woosh]
type = PlaySnd
trigger1 = !Time
value = 1,1
channel = 1

[State 210, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15 + 3 * var(9)
ground.slideTime = 15 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
ground.velocity = -7.41 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -3.24, -7.73
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 1)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 78), var(36) := -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 210, ChangeAnimElem 2]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 1
value = 210
elem = 4
ignoreHitPause = 1

[State 210, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 8
value = 210
elem = 3
ignoreHitPause = 1

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

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



;===========<STANDING CLOSE MEDIUM PUNCH>==========
[StateDef 215]
type = S
physics = S
moveType = A
anim = 215
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 215, Woosh]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1,1
channel = 1

[State 215, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 5
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 15 + 3 * var(9)
ground.slideTime = 15 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
ground.velocity = -7.41 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -3.24, -7.73
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 1)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 68), var(36) := -91
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 215, ChangeAnimElem 2]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) <= 0
trigger1 = HitPauseTime <= 1
value = 215
elem = 7
ignoreHitPause = 1

[State 215, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) <= 0
trigger1 = HitPauseTime <= 8
value = 215
elem = 6
ignoreHitPause = 1

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

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



;===========<TRICKY BASKET>==========
[StateDef 217]
type = S
physics = S
moveType = A
anim = 217
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 217, Direction: Forward]
type = VarSet
trigger1 = !Time && !AILevel
trigger1 = (ifElse(P2dist x < 0, Facing = -1, Facing = 1) && NumExplod(90000006)) || (ifElse(P2dist x < 0, Facing = 1, Facing = -1) && NumExplod(90000004))
var(10) = 1

[State 217, Direction: Backward]
type = VarSet
trigger1 = !Time && !AILevel
trigger1 = (ifElse(P2dist x < 0, Facing = -1, Facing = 1) && NumExplod(90000004)) || (ifElse(P2dist x < 0, Facing = 1, Facing = -1) && NumExplod(90000006))
var(10) = -1

[State 217, Direction (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse(P2BodyDist x <= 108, 1, -1)

[State 217, Jump Sound]
type = PlaySnd
trigger1 = Anim = 217
trigger1 = AnimElemTime(2) = 1
value = 40,0
channel = 1

[State 217, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = Anim = 217
trigger1 = AnimElemTime(2) = 1
stateType = A
physics = N

[State 217, Dust Helper]
type = Helper
trigger1 = Anim = 217
trigger1 = AnimElemTime(2) = 1
helperType = Normal
stateNo = 8100
ID = 8100
name = "Tricky Basket Dust"
posType = P1
ownPal = 1

[State 217, VelSet]
type = VelSet
trigger1 = Anim = 217
trigger1 = AnimElemTime(2) = 1
x = 6.25 * var(10) * const(size.xScale)
y = -3.75

[State 217, VelAdd]
type = VelAdd
trigger1 = Anim = 217
trigger1 = AnimElemTime(2) > 1
x = -0.146484375 * var(10) * const(size.xScale)
y = 0.390625

[State 217, Woosh]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1,1
channel = 3

[State 217, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 6
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18 + 4 * var(9)
ground.slideTime = 18 + 4 * var(9)
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -7.41 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -3.24, -7.73
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 1)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 85), var(36) := -51
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

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

[State 217, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 217
trigger1 = !AnimTime
value = 218

[State 217, StateTypeSet: Stand, Physics: Stand]
type = StateTypeSet
trigger1 = Anim = 218
trigger1 = AnimElem = 1
stateType = S
physics = S

[State 217, VelSet]
type = VelSet
trigger1 = Anim = 218
trigger1 = AnimElem = 1
x = 0
y = 0

[State 217, PosSet]
type = PosSet
trigger1 = Anim = 218
trigger1 = AnimElem = 1
y = 0

[State 217, Landing Dust Explod]
type = Explod
trigger1 = Anim = 218
trigger1 = AnimElem = 1
anim = 8102
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 217, Landing Sound]
type = PlaySnd
trigger1 = Anim = 218
trigger1 = AnimElem = 1
value = 52,0
channel = 4

[State 217, End]
type = ChangeState
trigger1 = Anim = 218
trigger1 = !AnimTime
value = 0
ctrl = 1



;===========<STUMBLE & BLADE>==========
[StateDef 219]
type = A
physics = N
moveType = A
anim = 219
ctrl = 0
velset = ifElse((PrevStateNo = [100,105]), vel x, 0), 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

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

[State 219, Woosh]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1,1
channel = 1

[State 219, Woosh]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1,10
channel = 4

[State 219, Spark XY]
type = Null
trigger1 = AnimElem = 5
trigger1 = var(35) := 69 || var(36) := -66
trigger2 = AnimElem = 6
trigger2 = var(35) := 58 || var(36) := -4

[State 219, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 5
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = H
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18 + 4 * var(9)
ground.slideTime = 18 + 4 * var(9)
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -7.41 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -3.24, -7.73
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 11)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10, -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 219, Blood]
type = Explod
trigger1 = MoveHit = 1 && NumTarget
trigger1 = !(Target, HitShakeOver)
anim = ifElse(AnimElemTime(6) >= 0, 8051, 8050)
sprPriority = 3
posType = P1
pos = ceil(ifElse(P2Dist x < 0, 0, ifElse(P2Dist x < var(35), ceil(P2Dist x), var(35))) * const(size.xScale)), ceil(var(36) * const(size.yScale))
scale = const(size.xScale), 1
ownPal = 1
ignoreHitPause = 1
persistent = 0

[State 219, ChangeAnimElem 2]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) <= 0
trigger1 = HitPauseTime <= 6
value = 219
elem = 7
ignoreHitPause = 1

[State 219, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) <= 0
trigger1 = HitPauseTime <= 8
value = 219
elem = 6
ignoreHitPause = 1

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

[State 219, StateTypeSet: Stand, Physics: None]
type = StateTypeSet
trigger1 = AnimElem = 6
stateType = S
physics = N
ignoreHitPause = 1
persistent = 0

[State 219, Landing Dust Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 8102
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1
ignoreHitPause = 1
persistent = 0

[State 219, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 6
value = 219,1
channel = 3
ignoreHitPause = 1
persistent = 0

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



;===========<STANDING HEAVY PUNCH>==========
[StateDef 220]
type = S
physics = N
moveType = A
anim = 220
ctrl = 0
velset = ifElse((PrevStateNo = [100,105]), vel x, 0), 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 220, Gunfire sound player]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 10220
ID = 10220
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 220, Gunfire]
type = Explod
trigger1 = AnimElem = 5
anim = 225
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 59), -66
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 220, Gunfire (Bottom layer)]
type = Explod
trigger1 = AnimElem = 5
anim = 10225
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 59), -66
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 220, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 5 || AnimElem = 17
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 59), -66
ignoreHitPause = 0

[State 220, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 7 || AnimElem = 15
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 60), -60
ignoreHitPause = 0

[State 220, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 9 || AnimElem = 13
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 60), -55
ignoreHitPause = 0

[State 220, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 11
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 55), -48
ignoreHitPause = 0

[State 220, Spark XY]
type = Null
trigger1 = AnimElem = 5 || AnimElem = 17
trigger1 = var(35) := 107 || var(36) := -66
trigger2 = AnimElem = 7 || AnimElem = 15
trigger2 = var(35) := 109 || var(36) := -57
trigger3 = AnimElem = 9 || AnimElem = 13
trigger3 = var(35) := 107 || var(36) := -55
trigger4 = AnimElem = 11
trigger4 = var(35) := 102 || var(36) := -47

[State 220, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount))
trigger1 = AnimElem = 5 || AnimElem = 7 || AnimElem = 9 || AnimElem = 11 || AnimElem = 13 || AnimElem = 15 || AnimElem = 17
ID = 220
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
getPower = ifElse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 0,2
guard.pauseTime = 0,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
;dynamic "extra" hitstun; adds a maximum of 21 extra ticks of hitstun, but this decreases as the animation goes on so that, at best, BBH is -1 on hit/block
ground.hitTime = 18 + 4 * var(9) + ifElse(21 < -AnimTime - 22, 21, -AnimTime - 22)
ground.slideTime = 18 + 4 * var(9) + ifElse(21 < -AnimTime - 22, 21, -AnimTime - 22)
guard.hitTime = 18 + ifElse(21 < -AnimTime - 22, 21, -AnimTime - 22)
air.hitTime = 120
ground.velocity = -8.11, 0
ground.cornerPush.velOff = 0
guard.velocity = -5.49
guard.cornerPush.velOff = 0
air.velocity = -5.39, -5.65
air.cornerPush.velOff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10, -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

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

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



;===========<STANDING FAR LIGHT KICK>==========
[StateDef 230]
type = S
physics = N
moveType = A
anim = 230
ctrl = 0
velSet = ifElse((PrevStateNo = [100,105]), vel x, 0), 0
sprPriority = 1
powerAdd = 0
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 230, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,3
channel = 1

[State 230, Sneeze]
type = Explod
trigger1 = AnimElem = 3
anim = 10230
ID = 10230
sprPriority = 2
posType = P1
pos = ceil(const(size.xScale) * 33), -66
scale = const(size.xScale), 1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 230, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getPower = 72 * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animtype = Light
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 12 + 2 * var(9)
ground.slideTime = 12 + 2 * var(9)
guard.hitTime = 12
air.hitTime = 120
ground.velocity = -4.79 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 3)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 54), var(36) := -44
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

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

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



;===========<STANDING CLOSE LIGHT KICK>==========
[StateDef 235]
type = S
physics = S
moveType = A
anim = 235
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
facep2 = 1

[State 235, Woosh Sound]
type = PlaySnd
trigger1 = !Time
value = 1,3
channel = 1

[State 235, Sneeze]
type = Explod
trigger1 = AnimElem = 2
anim = 10230
ID = 10230
sprPriority = 2
posType = P1
pos = ceil(const(size.xScale) * 33), -66
scale = const(size.xScale), 1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 235, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getPower = 72 * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animtype = Light
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 12 + 2 * var(9)
ground.slideTime = 12 + 2 * var(9)
guard.hitTime = 12
air.hitTime = 120
ground.velocity = -4.79 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 3)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -31
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

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

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



;===========<STANDING MEDIUM KICK>==========
[StateDef 240]
type = S
physics = N
moveType = A
anim = 240
ctrl = 0
velSet = ifElse((PrevStateNo = [100,105]), vel x, 0), 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 240, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,4
channel = 1

[State 240, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15 + 3 * var(9)
ground.slideTime = 15 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
ground.velocity = ifElse(PrevStateNo = 700, -6.46, -7.41 * const(size.xScale)), ifElse(PrevStateNo = 700, -5.25, 0)
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = ifElse(PrevStateNo = 700, 1, 0)
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 4)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

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

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



;===========<SUPRISE & HOP>==========
[StateDef 248]
type = A
physics = N
moveType = A
anim = 248
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 248, Mole]
type = Explod
trigger1 = !Time
anim = 10248
ID = 10248
sprPriority = 3
posType = P1
scale = const(size.xScale), 1
shadow = -1,0,0
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 248, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1200,0
channel = 0

[State 248, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1,4
channel = 1

[State 248, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) = 1
x = 10 * const(size.xScale)

[State 248, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(2) > 1
x = -0.732421875 * const(size.xScale)

[State 248, VelSet]
type = VelSet
trigger1 = AnimElem = 4
y = -5

[State 248, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
y = 0.78125

[State 248, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 18 + 4 * var(9)
ground.slideTime = 18 + 4 * var(9)
guard.hitTime = 15
air.hitTime = 120
ground.velocity = -7.41 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 4)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 248, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 8
value = 248
elem = 4
ignoreHitPause = 1

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

[State 248, ChangeState]
type = ChangeState
trigger1 = vel y > 0
trigger1 = pos y + 5 > -vel y
value = 249


;Landing
[StateDef 249]
type = S
anim = 249
physics = N
moveType = I
velSet = 0,0

[State 249, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 249, 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 249, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0
channel = 4

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



;===========<STANDING HEAVY KICK>==========
[StateDef 250]
type = S
physics = S
moveType = A
anim = 250
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 250, Overlay]
type = Explod
trigger1 = !Time
anim = 251
ID = 251
sprPriority = 3
posType = P1
scale = const(size.xScale), 1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 250, Mine]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 10250
ID = 10250
name = "Standing Mine"
posType = P1
pos = 0, -32
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 250, Voice]
type = PlaySnd
trigger1 = AnimElem = 4
value = 250,0
channel = 0

[State 250, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1,5
channel = 3

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

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



;===========<CROUCHING LIGHT PUNCH>==========
[StateDef 400]
type = C
physics = C
moveType = A
anim = 400
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 400, Woosh Sound]
type = PlaySnd
trigger1 = !Time
value = 1,0
channel = 1

[State 400, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = C, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getPower = 72 * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animType = Light
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 12 + 2 * var(9)
ground.slideTime = 12 + 2 * var(9)
guard.hitTime = 12
air.hitTime = 120
ground.velocity = -4.79 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 0)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -37
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 400, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 6
value = 400
elem = 3
ignoreHitPause = 1

[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>==========
[StateDef 410]
type = C
physics = C
moveType = A
anim = 410
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 410, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,1
channel = 1

[State 410, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = C, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15 + 3 * var(9)
ground.slideTime = 15 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
ground.velocity = -7.41 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 1)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 102), var(36) := -18
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 410, ChangeAnimElem 2]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 1
value = 410
elem = 4
ignoreHitPause = 1

[State 410, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 8
value = 410
elem = 3
ignoreHitPause = 1

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

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



;===========<CROUCHING HEAVY PUNCH>==========
[StateDef 420]
type = C
physics = C
moveType = A
anim = 420
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 420, Gunfire sound player]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 10220
ID = 10420
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 420, Gunfire]
type = Explod
trigger1 = AnimElem = 5
anim = 225
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 59), -66
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 420, Gunfire (Bottom layer)]
type = Explod
trigger1 = AnimElem = 5
anim = 10225
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 67), -39
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 420, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 5 || AnimElem = 17
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 67), -39
ignoreHitPause = 0

[State 420, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 7 || AnimElem = 15
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 67), -33
ignoreHitPause = 0

[State 420, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 9 || AnimElem = 13
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 67), -28
ignoreHitPause = 0

[State 420, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 11
ID = 225
posType = P1
pos = ceil(const(size.xScale) * 62), -20
ignoreHitPause = 0

[State 420, Spark XY]
type = Null
trigger1 = AnimElem = 5 || AnimElem = 17
trigger1 = var(35) := 115 || var(36) := -39
trigger2 = AnimElem = 7 || AnimElem = 15
trigger2 = var(35) := 117 || var(36) := -30
trigger3 = AnimElem = 9 || AnimElem = 13
trigger3 = var(35) := 115 || var(36) := -28
trigger4 = AnimElem = 11
trigger4 = var(35) := 110 || var(36) := -20

[State 420, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount))
trigger1 = AnimElem = 5 || AnimElem = 7 || AnimElem = 9 || AnimElem = 11 || AnimElem = 13 || AnimElem = 15 || AnimElem = 17
ID = 220
forceNoFall = 0
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
getPower = ifElse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 0,2
guard.pauseTime = 0,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
;dynamic "extra" hitstun; adds a maximum of 21 extra ticks of hitstun, but this decreases as the animation goes on so that, at best, BBH is -1 on hit/block
ground.hitTime = 18 + 4 * var(9) + ifElse(21 < -AnimTime - 22, 21, -AnimTime - 22)
ground.slideTime = 18 + 4 * var(9) + ifElse(21 < -AnimTime - 22, 21, -AnimTime - 22)
guard.hitTime = 18 + ifElse(21 < -AnimTime - 22, 21, -AnimTime - 22)
air.hitTime = 120
ground.velocity = -8.11, 0
ground.cornerPush.velOff = 0
guard.velocity = -8.11
guard.cornerPush.velOff = 0
air.velocity = -5.39, -5.65
air.cornerPush.velOff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10, -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

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

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



;===========<CROUCHING LIGHT KICK>==========
[StateDef 430]
type = C
physics = C
moveType = A
anim = 430
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 430, Woosh Sound]
type = PlaySnd
trigger1 = !Time
value = 1,3
channel = 1

[State 430, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = C, NA
hitFlag = MAF
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getPower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animType = Light
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 12 + 2 * var(9)
ground.slideTime = 12 + 2 * var(9)
guard.hitTime = 12
air.hitTime = 120
ground.velocity = -4.79 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 3)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -9
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 430, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 6
value = 430
elem = 3
ignoreHitPause = 1

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

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



;===========<TELL ME WHY>==========
[StateDef 439]
type = C
physics = N
moveType = I
anim = 439
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 439, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0
value = SCA, AT
time = 1
ignoreHitPause = 1

[State 439, PlayerPush]
type = PlayerPush
trigger1 = AnimElemTime(2) >= 0
value = 0
ignoreHitPause = 1

[State 439, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 6.25 * const(size.xScale)

[State 439, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(2) > 1
x = -0.1953125 * const(size.xScale)

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



;===========<CROUCHING MEDIUM KICK>==========
[StateDef 440]
type = C
physics = C
moveType = A
anim = 440
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 440, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,4
channel = 1

[State 440, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = C, NA
hitFlag = MAF
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 0
getPower = ifElse(!var(13),144,72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15 + 3 * var(9)
ground.slideTime = 15 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
ground.velocity = -7.41 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -7.41 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 4)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 78), var(36) := -6
palFX.time = 12*var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 440, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 8
value = 440
elem = 4
ignoreHitPause = 1

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

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



;===========<CROUCHING HEAVY KICK>==========
[StateDef 450]
type = C
physics = C
moveType = A
anim = 450
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

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

[State 450, Woosh Sound]
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
hitFlag = MAF
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 0
getpower = ifElse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pauseTime = 12,12
guard.pauseTime = 12,12
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Trip
air.type = Trip
ground.hitTime = 15 + 4 * var(9)
ground.slideTime = 15 + 4 * var(9)
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -1, -6.25
ground.cornerPush.velOff = 0
guard.velocity = -12.52
guard.cornerPush.velOff = 0
air.velocity = -1, -8.24
air.cornerPush.velOff = 0
yAccel = 0.677
fall = 1
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 81), var(36) := -8
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 450, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 10
value = 450
elem = 4
ignoreHitPause = 1

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

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



;===========<MALICE & MINE>==========
[StateDef 459]
type = C
physics = C
moveType = A
anim = 459
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 459, Mine]
type = Helper
trigger1 = AnimElem = 2
helperType = Normal
stateNo = 10458
ID = 10458
name = "Crouching Mine"
posType = P1
pos = ceil(51 * const(size.xScale)), -37
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 459, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1,5
channel = 3

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

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



;===========<JUMPING LIGHT PUNCH>==========
[StateDef 600]
type = A
physics = N
moveType = A
anim = 600
ctrl = 0
sprPriority = 1
powerAdd = 0
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 600, Woosh Sound]
type = PlaySnd
trigger1 = !Time
value = 1,0
channel = 1

[State 600, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
getPower = 72 * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animType = Light
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 12 + 2 * var(9)
ground.slideTime = 12 + 2 * var(9)
guard.hitTime = 12
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79 * const(size.xScale)
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -4.31, -7.36
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 0)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 36), var(36) := -41
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 600, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 6
value = 600
elem = 3
ignoreHitPause = 1

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

[State 600, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 600, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING NEUTRAL MEDIUM PUNCH>==========
[StateDef 610]
type = A
physics = N
moveType = A
anim = 610
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 610, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,1
channel = 1

[State 610, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = High
ground.hitTime = 12 + 3 * var(9)
ground.slideTime = 12 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 1)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 87), var(36) := -67
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 610, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 8
value = 610
elem = 4
ignoreHitPause = 1

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

[State 610, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 610, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING ANGLED MEDIUM PUNCH>==========
[StateDef 611]
type = A
physics = N
moveType = A
anim = 611
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 611, Woosh Sound]
type = PlaySnd
trigger1 = !Time
value = 1,1
channel = 1

[State 611, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = High
ground.hitTime = 12 + 3 * var(9)
ground.slideTime = 12 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 1)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 82), var(36) := -20
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 611, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 8
value = 611
elem = 3
ignoreHitPause = 1

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

[State 611, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 611, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING NEUTRAL HEAVY PUNCH>==========
[StateDef 620]
type = A
physics = N
moveType = A
anim = 620
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 620, Gunfire sound player]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 10220
ID = 10620
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 620, Gunfire]
type = Explod
trigger1 = AnimElem = 4
anim = 625
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 74), -72
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 620, Gunfire (Bottom layer)]
type = Explod
trigger1 = AnimElem = 4
anim = 10625
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 74), -72
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 620, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount))
trigger1 = AnimElem = 4 || AnimElem = 6 || AnimElem = 8
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getPower = ifElse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 1,2
guard.pauseTime = 1,2
animtype = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 12 + 4 * var(9)
ground.slideTime = 12 + 4 * var(9)
guard.hitTime = 18
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 122), var(36) := -72
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48

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

[State 620, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 620, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING ANGLED HEAVY PUNCH>==========
[StateDef 621]
type = A
physics = N
moveType = A
anim = 621
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 621, Gunfire sound player]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 10220
ID = 10620
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 621, Gunfire]
type = Explod
trigger1 = AnimElem = 4
anim = 626
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 70), -54
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 621, Gunfire (Bottom layer)]
type = Explod
trigger1 = AnimElem = 4
anim = 10626
ID = 225
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 70), -54
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 621, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount))
trigger1 = AnimElem = 4 || AnimElem = 6 || AnimElem = 8
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
getPower = ifElse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 1,2
guard.pauseTime = 1,2
animtype = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 12 + 4 * var(9)
ground.slideTime = 12 + 4 * var(9)
guard.hitTime = 18
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -6.46, -5.25
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 117), var(36) := -53
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

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

[State 621, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 621, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING LIGHT KICK>==========
[StateDef 630]
type = A
physics = N
moveType = A
anim = 630
ctrl = 0
sprPriority = 1
powerAdd = 0
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 630, Woosh Sound]
type = PlaySnd
trigger1 = !Time
value = 1,3
channel = 1

[State 630, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 2
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
getPower = 72 * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animType = Light
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 12 + 2 * var(9)
ground.slideTime = 12 + 2 * var(9)
guard.hitTime = 12
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.79 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -3.23 * const(size.xScale), -7.73
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 3)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8010)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 59), var(36) := -28
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 630, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 0
trigger1 = HitPauseTime <= 6
value = 630
elem = 3
ignoreHitPause = 1

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

[State 630, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 630, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING NEUTRAL MEDIUM KICK>==========
[StateDef 640]
type = A
physics = N
moveType = A
anim = 640
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 640, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,4
channel = 1

[State 640, Sneeze]
type = Explod
trigger1 = AnimElem = 3
anim = 10230
ID = 10230
sprPriority = 2
posType = P1
pos = ceil(const(size.xScale) * 41), -61
scale = const(size.xScale), 1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 640, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 12 + 3 * var(9)
ground.slideTime = 12 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79 * const(size.xScale), 0
ground.cornerPush.velOff = 0
guard.velocity = -4.49 * const(size.xScale)
guard.cornerPush.velOff = 0
air.velocity = -3.23 * const(size.xScale), -7.73
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 4)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -46
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 640, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 8
value = 640
elem = 4
ignoreHitPause = 1

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

[State 640, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 640, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING ANGLED MEDIUM KICK>==========
[StateDef 641]
type = A
physics = N
moveType = A
anim = 641
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 641, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,4
channel = 1

[State 641, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
forceNoFall = 0
attr = A, NA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 0
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Medium
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 12 + 3 * var(9)
ground.slideTime = 12 + 3 * var(9)
guard.hitTime = 15
air.hitTime = 120
airguard.ctrlTime = 16
ground.velocity = -4.79, 0
ground.cornerPush.velOff = 0
guard.velocity = -4.49
guard.cornerPush.velOff = 0
air.velocity = -3.23, -7.73
air.cornerPush.velOff = 0
airguard.velocity = -5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 4)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8011)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 71), var(36) := -49
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48

[State 641, ChangeAnimElem]
type = ChangeAnim
trigger1 = MoveContact = 1 && HitPauseTime
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = HitPauseTime <= 8
value = 641
elem = 4
ignoreHitPause = 1

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

[State 641, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 641, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<JUMPING HEAVY KICK>==========
[StateDef 650]
type = A
physics = N
moveType = A
anim = 650
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = ifElse(PrevStateNo = 55, 1, 0)

[State 650, Mine]
type = Helper
trigger1 = Time = 1
helperType = Normal
stateNo = 10650
ID = 10650
name = "Jumping Mine"
posType = P1
pos = ceil(const(size.xScale) * 18), -38
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 650, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 10
value = 650,0
channel = 0

[State 650, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1,5
channel = 1

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

[State 650, Gravity]
type = Gravity
;only apply gravity on 0th tick when haven't chain canceled (otherwise gravity will be applied twice)
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time

[State 650, VelAdd]
type = VelAdd
triggerAll = vel x
;same principle here as above
trigger1 = !Time && PrevStateNo != [600, 699]
trigger2 = Time
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

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



;===========<THROW ATTEMPT>==========
[StateDef 800]
type = S
physics = S
movetype = A
anim = 800
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 800, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
var(10) = (ifElse(NumExplod(90000230), 1, 0) + ifElse(NumExplod(90000240), 1, 0) + ifElse(NumExplod(90000250), 1, 0) >= 2)

[State 800, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = (Random < 500)

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

[State 800, Tech Hit]
type = VarSet
trigger1 = NumEnemy
trigger1 = EnemyNear, StateType != A
trigger1 = (EnemyNear, StateNo = [0,999]) && (EnemyNear, StateNo != [100,119]) && (EnemyNear, StateNo != [200,799])
var(19) = 7

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

[State 800, HitDef: PP Throw]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = P2BodyDist x < 55
trigger1 = !var(38)
attr = S, NT
hitFlag = M-
priority = 1, Miss
getPower = 0,0
givePower = 0,0
sparkNo = -1 +0 * (var(33) := 0)
guard.sparkNo = -1 +0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 40), var(36) := -50
hitSound = -1 +0 * (var(31) := 800)
guardSound = -1 +0 * (var(32) := 0)
fall = 1
fall.recover = 1
numHits = 0
p1StateNo = ifElse(ifElse(!NumExplod(92828282) && !NumExplod(92468246), command = "holdback", command = "holdfwd"), 810, 805)

[State 800, HitDef: KK Throw]
type = HitDef
trigger1 = AnimElem = 2 && var(10)
trigger1 = !var(38)
trigger1 = P2BodyDist x < 55
attr = S, NT
hitFlag = M-
priority = 1, Miss
getPower = 0,0
givePower = 0,0
sparkNo = -1 + 0 * (var(33) := 0)
guard.sparkNo = -1 +0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 40), var(36) := -50
hitSound = -1 +0 * (var(31) := 800)
guardSound = -1 +0 * (var(32) := 0)
fall = 1
fall.recover = 1
numhits = 0
p1StateNo = ifElse(ifElse(!NumExplod(92828282) && !NumExplod(92468246), command = "holdback", command = "holdfwd"), 805, 820)

[State 800, Voice (Missed)]
type = PlaySnd
trigger1 = AnimElem = 5
value = 800,0
channel = 0

[State 800, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1,0
channel = 1

[State 800, Snap Sound]
type = PlaySnd
trigger1 = AnimElem = 6
value = 800,1
channel = 3

[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
ignoreHitPause = 1

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

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

[State 805, Tech Hit]
type = ChangeState
trigger1 = NumTarget && var(19)
trigger1 = (Target, command = "holdfwd" || Target, command = "holdback") && Target, command != "holdup" && Target, command != "holddown"
trigger1 = (Target, command = "b" || Target, command = "c" || Target, command = "y" || Target, command = "z")
value = 890

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

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

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

[State 805, TargetBind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = 0,0

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

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

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

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



;===========<THROW SWITCHING SIDES (TARGET)>==========
[StateDef 806]
type = S
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, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

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

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



;===========<HOLD & CUT>==========
[Statedef 810]
type = S
physics = N
moveType = A
anim = 810
ctrl = 0
velSet = 0,0
sprPriority = 1

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

[State 810, Tech Hit]
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, Throw]
type = TargetState
trigger1 = !Time && NumTarget
value = 815

[State 810, BindToTarget 1]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(4) < 0
pos = ceil(const(size.xScale) * 76),0, Foot

[State 810, BindToTarget 2]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = ceil(const(size.xScale) * 38),81, Head

[State 810, BindToTarget 3]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = ceil(const(size.xScale) * 30),85, Head

[State 810, BindToTarget 4]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = ceil(const(size.xScale) * -16),88, Head

[State 810, BindToTarget 5]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = ceil(const(size.xScale) * -23),87, Head

[State 810, BindToTarget 6]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = ceil(const(size.xScale) * -26),85, Head

[State 810, BindToTarget 7]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = ceil(const(size.xScale) * -10),82, Head

[State 810, BindToTarget 8]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = ceil(const(size.xScale) * -5),85, Head

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem = 9
value = -1

[State 810, Overlay]
type = Explod
trigger1 = AnimElem = 9
anim = 814
ID = 814
sprPriority = 2
posType = P1
scale = const(size.xScale), 1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 810, Voice]
type = PlaySnd
trigger1 = AnimElemTime(9) = 22
value = 810,0
channel = 0

[State 810, Blood]
type = Explod
trigger1 = AnimElemTime(9) = 24
anim = 8052
sprPriority = 3
posType = P1
scale = const(size.xScale), 1
ownPal = 1
ignoreHitPause = 1
persistent = 0

[State 810, Hit Sound]
type = PlaySnd
trigger1 = NumTarget && AnimElemTime(9) = 24
value = 2,10
channel = 2

[State 810, PosAdd]
type = PosAdd
trigger1 = AnimElem = 11
x = 16
y = -32

[State 810, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElemTime(11) = 1
stateType = A
physics = N

[State 810, VelSet]
type = VelSet
trigger1 = AnimElemTime(11) = 1
x = 2.1875 * const(size.xScale)
y = -5.859375

[State 810, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(11) > 1
y = 0.48828125

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

[State 810, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 11
value = 36

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

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

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

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

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

[State 810, Throw]
type = TargetState
trigger1 = NumTarget && AnimElem = 11
value = 816

[State 810, End]
type = ChangeState
trigger1 = AnimElemTime(12) > 0
trigger1 = pos y > -vel y
value = 811


;Landing
[StateDef 811]
type = S
anim = 811
physics = N
moveType = I
velSet = 0,0

[State 811, Turn]
type = Turn
trigger1 = !Time

[State 811, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 811, 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 811, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0
channel = 1

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



;===========<HOLD & CUT (TARGET)>==========
;Being Thrown
[StateDef 815]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

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

[State 815, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

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


;Fake HitPause state
[StateDef 816]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

[State 816, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5070

[State 816, PosAdd]
type = PosAdd
trigger1 = !Time
x = 28 * 0.8333333

[State 816, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

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

[State 816, PosAdd]
type = PosAdd
trigger1 = 1
x = ceil((14 - Time) / 4) * ifElse(Time % 2 = 1, -1, 1)

[State 816, ChangeState]
type = ChangeState
trigger1 = Time = 12
value = 817


;After Throw
[StateDef 817]
type = A
physics = N
movetype = H
ctrl = 0
velSet = 3.75 * 0.8333333, -10
sprPriority = 1

[State 817, VelAdd]
type = VelAdd
trigger1 = 1
x = -0.048828125 * 0.8333333
y = 0.732421875

[State 817, Recover]
type = SelfState
trigger1 = Alive
trigger1 = command = "recovery"
trigger1 = vel y > 0 && pos y >= const(movement.air.getHit.groundRecover.ground.threshold)
value = 5200

[State 817, End]
type = ChangeState
trigger1 = vel y > 0
trigger1 = pos y >= const(movement.down.bounce.groundlevel)
value = 818


;Hit ground from fall (delayed get up)
[StateDef 818]
type = L
moveType = H
physics = N

[State 818, FallEnvShake]
type = FallEnvShake
trigger1 = !Time

[State 818, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(5110 + (Anim % 10))
trigger1 = Anim = [5081, 5089]
value = 5110 + (Anim % 10)
persistent = 0

[State 818, ChangeAnim]
type = ChangeAnim
triggerAll = !Time
triggerAll = Anim != [5110, 5119]
trigger1 = Anim != [5161, 5169]
trigger2 = !SelfAnimExist(5170 + (Anim % 10))
value = 5170

[State 818, ChangeAnim]
type = ChangeAnim
triggerAll = Anim != [5110, 5119]
trigger1 = !Time
trigger1 = Anim = [5161, 5169]
trigger1 = SelfAnimExist(5170 + (Anim % 10))
value = 5170 + (Anim % 10)

[State 818, HitFallDamage]
type = HitFallDamage
trigger1 = !Time

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

[State 818, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = GetHitVar(fall.yVel) != 0
sysvar(1) = floor(vel y)

[State 818, PlaySnd]
type = PlaySnd
trigger1 = !Time
trigger1 = !sysvar(0)
value = F7, (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56))

[State 818, Explod]
type = Explod
trigger1 = !Time
trigger1 = !sysvar(0)
anim = F(60 + (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56)))
pos = 0, 0
sprPriority = ifelse (sysvar(1) <= Const720p(56), -10, 10)

[State 818, VelSet]
type = VelSet
trigger1 = !Time
y = 0

[State 818, ChangeAnim]
type = ChangeAnim
triggerAll = Anim = [5171, 5179]
triggerAll = SelfAnimExist(5110 + (Anim % 10))
trigger1 = !AnimTime
trigger2 = sysvar(0)
value = 5110 + (Anim % 10)
persistent = 0

[State 818, ChangeAnim]
type = ChangeAnim
triggerAll = Anim != [5111, 5119]
trigger1 = !AnimTime
trigger2 = sysvar(0)
value = 5110
persistent = 0

[State 818, Dead]
type = SelfState
triggerAll = !Alive
trigger1 = !AnimTime
trigger2 = sysvar(0)
trigger3 = Anim = [5110, 5119]
value = 5150

[State 818, VarSet]
type = VarSet
trigger1 = sysvar(0)
trigger1 = !Time
sysvar(0) = 0

[State 818, VelMul]
type = VelMul
trigger1 = 1
x = 0.85

[State 818, VelSet]
type = VelSet
trigger1 = abs(vel x) < const(movement.down.friction.threshold)
x = 0
persistent = 0

[State 818, Get up]
type = SelfState
trigger1 = Time >= 40
value = 5120



;===========<DOLL & BOMB>==========
[StateDef 820]
type = S
physics = N
moveType = A
anim = 820
ctrl = 0
velSet = 0,0
sprPriority = 1

[State 820, Lost Target]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

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

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

[State 820, Width]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
edge = 84,32
ignoreHitPause = 1

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

[State 820, TargetBind 2]
type = TargetBind
trigger1 = NumTarget
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = ceil(const(size.xScale) * 64),0

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

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

[State 820, Overlay]
type = Explod
trigger1 = AnimElem = 6
anim = 821
ID = 821
sprPriority = 3
posType = P1
scale = const(size.xScale), 1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 820, Doll Bomb]
type = Helper
trigger1 = AnimElem = 6
helperType = Normal
stateNo = 10820
ID = 10820
name = "Doll Bomb"
posType = P1
pos = 0, -46
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

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

[State 820, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1,5
channel = 1

[State 820, Turn]
type = Turn
trigger1 = AnimElem = 13

[State 820, Turn]
type = PosAdd
trigger1 = AnimElem = 15
x = 16

[State 820, Landing Dust Explod]
type = Explod
trigger1 = AnimElem = 15
anim = 8102
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 820, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 15
value = 52,0
channel = 4

[State 820, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElemTime(15) = 19
value = floor(ifElse(140 * fvar(11) < 7, -7, -140 * fvar(11)))

[State 820, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElemTime(15) = 19
value = 36

[State 820, Power]
type = PowerAdd
trigger1 = NumTarget && AnimElemTime(15) = 19 && !var(20)
value = 72

[State 820, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElemTime(15) = 19
value = 1

[State 820, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElemTime(15) = 19
var(13) = 1

[State 820, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElemTime(15) = 19
var(15) = 1
ignoreHitPause = 1

[State 820, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElemTime(15) = 19
var(16) = 1
ignoreHitPause = 1

[State 820, Throw]
type = TargetState
trigger1 = NumTarget && AnimElemTime(15) = 19
value = 826

[State 10256, Flames]
type = Helper
trigger1 = NumTarget && AnimElemTime(15) = 19
trigger1 = var(43) := (Target, ID)
helperType = Normal
stateNo = 8150
ID = ifElse(Target, SelfAnimExist(7697), 8150, 8155)
name = "Flames"
posType = P2
size.xScale = const(size.xScale) * 0.5
size.yScale = 0.5
ownPal = 1
ignoreHitPause = 1

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



;===========<DOLL & BOMB (TARGET)>==========
;Being Thrown
[StateDef 825]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

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

[State 825, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

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


;Fake HitPause state
[StateDef 826]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

[State 826, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 5030

[State 826, ChangeAnim]
type = ChangeAnim
trigger1 = Time > 0
value = Anim

[State 826, PalFX]
type = PalFX
trigger1 = !Time && !SelfAnimExist(7697)
time = 34
mul = 128,128,128
sinadd = 96, 96, 96, 4
invertall = 0
color = 256
ignoreHitPause = 1

[State 826, PosAdd]
type = PosAdd
trigger1 = 1
x = ceil((14 - Time) / 4) * ifElse(Time % 2 = 1, -1, 1)

[State 826, ChangeState]
type = ChangeState
trigger1 = Time = 12
value = 50257



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

[State 850, Tech Hit Reset]
type = VarSet
trigger1 = 1
var(19) = 0

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

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

[State 850, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 1
trigger1 = !var(38)
attr = A,NT
hitFlag = AF
priority = 1,Miss
getPower = 0,0
givePower = 0,0
sparkNo = -1 + 0 * (var(33) := 0)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 40), var(36) := -50
hitSound = -1 + 0 * (var(31) := 800)
guardSound = -1 + 0 * (var(32) := 0)
fall = 1
fall.recover = 1
numHits = 0
p1StateNo = 860

[State 800, Voice (Missed)]
type = PlaySnd
trigger1 = AnimElem = 5
value = 800,0
channel = 0

[State 800, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1,0
channel = 1

[State 800, Snap Sound]
type = PlaySnd
trigger1 = AnimElem = 6
value = 800,1
channel = 3

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

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

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



;===========<CATCH & CUT>==========
[Statedef 860]
type = A
physics = N
moveType = A
anim = 860
ctrl = 0
velSet = 0,0
sprPriority = 1

[State 860, Lost Target]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 51
ctrl = 1

[State 860, Tech Hit]
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 = 892

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

[State 860, Turn]
type = Turn
triggerAll = !Time
trigger1 = !NumExplod(94646464) && !NumExplod(92468246)
trigger1 = command = "holdfwd"
trigger2 = NumExplod(94646464) || NumExplod(92468246)
trigger2 = command = "holdback"

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

[State 860, BindToTarget 1]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(5) < 0
pos = ceil(const(size.xScale) * 76),0, Foot

[State 860, BindToTarget 2]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = ceil(const(size.xScale) * 38),81, Head

[State 860, BindToTarget 3]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = ceil(const(size.xScale) * 30),85, Head

[State 860, BindToTarget 4]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = ceil(const(size.xScale) * -16),88, Head

[State 860, BindToTarget 5]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = ceil(const(size.xScale) * -23),87, Head

[State 860, BindToTarget 6]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = ceil(const(size.xScale) * -26),85, Head

[State 860, BindToTarget 7]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = ceil(const(size.xScale) * -10),82, Head

[State 860, BindToTarget 8]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(11) >= 0 && AnimElemTime(12) < 0
pos = ceil(const(size.xScale) * -5),85, Head

[State 860, SprPriority]
type = SprPriority
trigger1 = AnimElem = 10
value = -1

[State 860, Overlay]
type = Explod
trigger1 = AnimElem = 10
anim = 814
ID = 814
sprPriority = 2
posType = P1
scale = const(size.xScale), 1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 860, Voice]
type = PlaySnd
trigger1 = AnimElemTime(10) = 22
value = 810,0
channel = 0

[State 860, Blood]
type = Explod
trigger1 = AnimElemTime(10) = 24
anim = 8052
sprPriority = 3
posType = P1
scale = const(size.xScale), 1
ownPal = 1
ignoreHitPause = 1
persistent = 0

[State 860, Hit Sound ]
type = PlaySnd
trigger1 = NumTarget && AnimElemTime(10) = 24
value = 2,10
channel = 2

[State 860, PosAdd]
type = PosAdd
trigger1 = AnimElem = 12
x = 16
y = -32

[State 860, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElemTime(12) = 1
stateType = A
physics = N

[State 860, VelSet]
type = VelSet
trigger1 = AnimElemTime(12) = 1
x = 2.1875 * const(size.xScale)
y = -5.859375

[State 860, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(12) > 1
y = 0.48828125

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

[State 860, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 12
value = 36

[State 860, Power]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 12 && !var(20)
value = 72

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

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

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

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

[State 860, Throw]
type = TargetState
trigger1 = NumTarget && AnimElem = 12
value = 816

[State 860, End]
type = ChangeState
trigger1 = AnimElemTime(13) > 0
trigger1 = pos y > -vel y
value = 811



;===========<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
ignoreHitPause = 1

[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 = 5000,0
channel = 0

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

[State 890, Throw Escape FX]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 8000
ID = 8000
name = "Spark"
PosType = P1
pos = 0, -68
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(5945), 5945, 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
ignoreHitPause = 1

[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



;===========<THROW ESCAPE MIDAIR>==========
[StateDef 892]
type = A
physics = N
moveType = I
anim = 892
ctrl = 0
velSet = 0, 0
sprPriority = 1

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

[State 892, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 897

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

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

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

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

[State 892, PosFreeze]
type = PosFreeze
trigger1 = Time < 18
value = 1

[State 892, VelSet]
type = VelSet
trigger1 = Time = 18
x = -2
y = -4

[State 892, VelAdd]
type = VelAdd
trigger1 = Time > 18
y = 0.5

[State 892, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5000,0
channel = 0

[State 892, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 760,0

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

[State 892, ChangeState]
type = ChangeState
trigger1 = vel y > 0
trigger1 = pos y > -vel y
value = 52


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

[State 897, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 152

[State 897, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 18
value = 142

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

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

[State 897, PosFreeze]
type = PosFreeze
trigger1 = Time < 18
value = 1

[State 897, VelSet]
type = VelSet
trigger1 = Time = 18
x = -2
y = -4

[State 897, VelAdd]
type = VelAdd
trigger1 = Time >= 18
y = 0.5

[State 897, SelfState]
type = SelfState
trigger1 = vel y > 0
trigger1 = pos y > -vel y
value = 52
