
;--------------------------------------------------------------
; Grabbed
[Statedef 50241]
type = A
physics = N
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 1

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

[State 50241, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = StateNo - 1
elem = 1

[State 50241, VelSet]
type = VelSet
trigger1 = HitShakeOver = 1
x = -1
y = 5
persistent = 0

[State 50241, VelAdd]
type = VelAdd
trigger1 = HitShakeOver = 1
y = 0.5
persistent = 1

[State 50241, ChangeState]
type = ChangeState
trigger1 = Vel Y > 0 && Vel Y + Pos Y >= 0
value = 50242
ctrl = 0

;---------------------------------------------------------------------------
; Downed get-hit (bounce off ground)
[Statedef 50242]
type = A
movetype= H
physics = N

[State 50242, Explod]
type = Explod
trigger1 = Time = 0
anim = F62
pos = 0,0
sprpriority = ifelse (sysvar(1) <= Const720p(56), -10, 10)

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

[State 50242, 1] ;Coming hit ground anim (normal)
type = ChangeAnim2
trigger1 = !Time
value = 50241

[State 50242, 3]
type = HitFallVel
trigger1 = Time = 0

[State 50242, 1]
type = PosSet
trigger1 = Time = 0
y = Const(movement.down.bounce.offset.y)

[State 50242, 2]
type = PosAdd
trigger1 = Time = 0
x = Const(movement.down.bounce.offset.x)

[State 50242, 3] ;Acceleration
type = VelSet
trigger1 = !Time
y = -10

[State 50242, 3] ;Acceleration
type = VelAdd
trigger1 = Time > 5
y = 0.5

[State 50242, 7] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Vel Y + Pos Y >= 0
type = SelfState
value = 5110

;---------------------------------------------------------------------------
; Standing Repel (P2)
[Statedef 50710]
type = S
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 50710, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 50710

[State 50710, ChangeState]
type = SelfState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Crouching Repel (P2)
[Statedef 50711]
type = C
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 50711, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 50711

[State 50711, ChangeState]
type = SelfState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Aerial Repel (P2)
[Statedef 50712]
type = A
movetype = H
physics = N
velset = -2,-7
ctrl = 0

[State 50712, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(2) >= 0
y = 0.45

[State 50712, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 50712

[State 50712, ChangeState]
type = SelfState
trigger1 = Vel Y > 0 && Vel Y + Pos Y >= 0
value = 5100
ctrl = 0

;--------------------------------------------------------------
; Grabbed
[Statedef 50801]
type = S
physics = N
movetype = H
ctrl = 0
velset = 0,0

[State 50801, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = StateNo
elem = 1

;--------------------------------------------------------------
; Thrown
[Statedef 50802]
type = A
physics = N
movetype = H
ctrl = 0
velset = -2, -9
poweradd = 150

[State 50802, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.4

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

;--------------------------------------------------------------
; Grabbed
[Statedef 50811]
type = A
physics = N
movetype = H
ctrl = 0
velset = 0,0

[State 50801, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = StateNo
elem = 1

;--------------------------------------------------------------
; Thrown
[Statedef 50812]
type = A
physics = N
movetype = H
ctrl = 0
velset = 0,0
poweradd = 150

[State 50801, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = StateNo
elem = 1

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = -5
y = -7
persistent = 0

[State 50812, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(2) >= 0
y = 0.5

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

;--------------------------------------------------------------
; Hit High Custom State
[Statedef 53000]
type = S
physics = N
movetype = H
ctrl = 0
velset = 0,0

[State 53000, HitBy]
type = HitBy
trigger1 = 1
value = SCA,HA

[State 53000, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 53000, PosSet]
type = posset
trigger1 = time = 0
y = 0

[State 53000, 2]
type = Velset
trigger1 = !gethitvar(isbound)
x = 0

[State 53000, ChangeAnim2]
type = ChangeAnim
trigger1 = time = 0
value = 5002

[State 53000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 5002 && !animtime
value = 5007

[State 53000, SelfState]
type = SelfState
trigger1 = time = 150
value = 0
