;---------------------------------------------------------------------------
; Grabbed by Chaos Destiny

[Statedef 3002]
type = A
physics = N
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 1

[State 3002, ChangeAnim2]
type = ChangeAnim2
Trigger1 = time = 0
value = 3002

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

;---------------------------------------------------------------------------
; Transformed Helper

; Helper
[Statedef 39999]
type = A
physics = N
movetype = A
velset = 0,0
ctrl = 0

[State 39999, PlaySnd]
type = PlaySnd
triggerall = numtarget
triggerall = time
trigger1 = !target, hitshakeover
trigger1 = target, stateno != 30500 + 1000*var(0)
trigger2 = target, stateno < 30000 + 1000*var(0)
trigger3 = target, anim < 30000 + 1000*var(0)
trigger4 = target, anim%2
trigger5 = target, statetype != A
value = 30000 + 1000*var(0), 0
channel = 0

[State 39999, TargetState]
type = TargetState
triggerall = numtarget
trigger1 = !target, hitshakeover
trigger1 = target, stateno != 30500 + 1000*var(0)
trigger2 = target, stateno < 30000 + 1000*var(0)
trigger3 = target, anim < 30000 + 1000*var(0)
trigger4 = target, anim%2
trigger5 = target, statetype != A
trigger6 = !target, alive
trigger6 = !var(1)
value = 30500 + 1000*var(0)

[State 39999, VarSet]
type = VarSet
triggerall = numtarget
trigger1 = !target, alive
var(1) = 1

[State 39999, PosSet]
type = PosSet
trigger1 = numtarget
x = target, pos x + target, vel x
y = target, pos y + target, vel y

[State 39999, PosSet]
type = PosSet
triggerall = pos y > 0
trigger1 = var(0) != 2
trigger2 = anim = 32051
y = 0

[State 39999, PosSet]
type = PosSet
trigger1 = pos y > 56
y = 56

[State 39999, Turn]
type = Turn
trigger1 = numtarget
trigger1 = facing != target, facing

[State 39999, ChangeAnim]
type = ChangeAnim
triggerall = numtarget
triggerall = selfanimexist(target, stateno + 1)
trigger1 = anim != target, stateno + 1
trigger2 = target, time = 1
value = target, stateno + 1

[State 39999, TargetVelAdd]
type = TargetVelAdd
trigger1 = numtarget
trigger1 = time = 0
x = -3
y = -3

[State 39999, PlaySnd]
type = PlaySnd
triggerall = numtarget
triggerall = target, stateno = 30500 + 1000*var(0)
triggerall = target, vel y > 2
trigger1 = var(0) != 2
trigger1 = target, pos y >= 0
trigger2 = target, pos y >= 56
value = 39999, 0
channel = 1

[State 39999, TargetState]
type = TargetState
triggerall = numtarget
trigger1 = time = 400
trigger2 = roundstate > 2
trigger2 = target, stateno != 30500 + 1000*var(0)
trigger2 = !var(1)
value = 30998 + 1000*var(0)

[State 39999, Helper]
type = Helper
trigger1 = numtarget
trigger1 = time = 400
trigger2 = !numtarget
trigger2 = var(1)
trigger3 = numtarget
trigger3 = roundstate > 2
trigger3 = target, stateno != 30500 + 1000*var(0)
trigger3 = !var(1)
name = "cloudmaker"
id = 10350
stateno = 10350
ownpal = 1

[State 39999, DestroySelf]
type = DestroySelf
trigger1 = !numtarget
trigger2 = time = 400
trigger3 = roundstate > 2
trigger3 = target, stateno != 30500 + 1000*var(0)
trigger3 = !var(1)

[State 39999, NoGuard]
type = HitDef
trigger1 = time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
guard.dist = 0        ;This prevents p2 from going into a guard state if close

;---------------------------------------------------------------------------
; Transformed (Leo)

; Stand
[Statedef 30000]
type = A
physics = S
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State Chibi HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 30000, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 30000
ignorehitpause = 1
persistent = 0

[State 30000, SelfState]
type = SelfState
triggerall = !alive
trigger1 = pos y = 0
trigger1 = vel y > -0.5
value = 5150
ignorehitpause = 1

[State 30000, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 30000, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 30010
ignorehitpause = 1

[State 30000, ChangeState]
type = ChangeState
trigger1 = command = "holdfwd"
value = 30020
ignorehitpause = 1

[State 30000, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 30050
ignorehitpause = 1

; Crouch
[Statedef 30010]
type = A
physics = C
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 30010, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 30010
ignorehitpause = 1
persistent = 0

[State 30010, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 30010, ChangeState]
type = ChangeState
trigger1 = command != "holddown"
value = 30000
ignorehitpause = 1

; Walk
[Statedef 30020]
type = A
physics = N
movetype = H
ctrl = 0
velset = 2,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 30020, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 30020
ignorehitpause = 1
persistent = 0

[State 30020, VelSet]
type = VelSet
trigger1 = 1
x = 2
ignorehitpause = 1

[State 30020, ChangeState]
type = ChangeState
trigger1 = command != "holdfwd"
value = 30000
ignorehitpause = 1

[State 30020, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 30010
ignorehitpause = 1

[State 30020, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 30050
ignorehitpause = 1

; Jump
[Statedef 30050]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 30050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 30000
ignorehitpause = 1
persistent = 0

[State 30050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 1
value = 30050
ignorehitpause = 1
persistent = 0

[State 30050, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 30050, VelSet]
type = VelSet
trigger1 = time = 1
x = ifelse(command = "holdfwd", 2, ifelse(command = "holdback", -2, 0))
y = -10

[State 30050, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.6
ignorehitpause = 1

[State 30050, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0
ignorehitpause = 1

[State 30050, ChangeState]
type = ChangeState
trigger1 = pos y = 0
trigger1 = vel y > 1
value = 30000
ignorehitpause = 1

; Hit
[Statedef 30500]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 30500, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 30500
ignorehitpause = 1

[State 30500, VelSet]
type = VelSet
trigger1 = time = 0
x = ifelse(p2dist x < 0, 3, -3)
y = -9
ignorehitpause = 1
persistent = 0

[State 30500, VelMul]
type = VelMul
trigger1 = pos y > 0
trigger1 = vel y > 0
x = 0.5
y = -0.6
ignorehitpause = 1

[State 30500, VelAdd]
type = VelAdd
trigger1 = vel y >= 0
y = 0.4
ignorehitpause = 1

[State 30500, VelAdd]
type = VelAdd
trigger1 = vel y < 0
y = 0.9
ignorehitpause = 1

[State 30500, VelSet]
type = VelSet
trigger1 = vel y > 9
y = 9
ignorehitpause = 1

[State 30500, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0
ignorehitpause = 1

[State 30500, ChangeState]
type = ChangeState
trigger1 = pos y = 0
trigger1 = vel y > -0.5
value = 30000
ignorehitpause = 1

; End
[Statedef 30998]
type = U
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State 30998, SelfState]
type = SelfState
trigger1 = prevstateno = 30000
trigger2 = prevstateno = 30010
trigger3 = prevstateno = 30020
value = 0
ctrl = 1

[State 30998, SelfState]
type = SelfState
trigger1 = prevstateno = 30050
value = 50
ctrl = 1

[State 30998, SelfState]
type = SelfState
trigger1 = 1
value = 5050

;---------------------------------------------------------------------------
; Transformed (Tao) (recorded duration 435 ticks, minus time from mashing?)

; Stand
[Statedef 31000]
type = A
physics = S
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State Chibi HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 31000, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 31000
ignorehitpause = 1
persistent = 0

[State 31000, SelfState]
type = SelfState
triggerall = !alive
trigger1 = pos y = 0
trigger1 = vel y > -0.5
value = 5150
ignorehitpause = 1

[State 31000, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 31000, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 31010
ignorehitpause = 1

[State 31000, ChangeState]
type = ChangeState
trigger1 = command = "holdfwd"
value = 31020
ignorehitpause = 1

[State 31000, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 31050
ignorehitpause = 1

; Crouch
[Statedef 31010]
type = A
physics = C
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 31010, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 31010
ignorehitpause = 1
persistent = 0

[State 31010, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 31010, ChangeState]
type = ChangeState
trigger1 = command != "holddown"
value = 31000
ignorehitpause = 1

; Walk
[Statedef 31020]
type = A
physics = N
movetype = H
ctrl = 0
velset = 2,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 31020, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 31020
ignorehitpause = 1
persistent = 0

[State 31020, VelSet]
type = VelSet
trigger1 = 1
x = 2
ignorehitpause = 1

[State 31020, ChangeState]
type = ChangeState
trigger1 = command != "holdfwd"
value = 31000
ignorehitpause = 1

[State 31020, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 31010
ignorehitpause = 1

[State 31020, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 31050
ignorehitpause = 1

; Jump
[Statedef 31050]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 31050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 31000
ignorehitpause = 1
persistent = 0

[State 31050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 1
value = 31050
ignorehitpause = 1
persistent = 0

[State 31050, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 31050, VelSet]
type = VelSet
trigger1 = time = 1
x = ifelse(command = "holdfwd", 2, ifelse(command = "holdback", -2, 0))
y = -10

[State 31050, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.6
ignorehitpause = 1

[State 31050, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0
ignorehitpause = 1

[State 31050, ChangeState]
type = ChangeState
trigger1 = pos y = 0
trigger1 = vel y > 1
value = 31000
ignorehitpause = 1

; Hit
[Statedef 31500]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 31500, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 31500
ignorehitpause = 1

[State 31500, VelSet]
type = VelSet
trigger1 = time = 0
x = ifelse(p2dist x < 0, 3, -3)
y = -9
ignorehitpause = 1
persistent = 0

[State 31500, VelMul]
type = VelMul
trigger1 = pos y > 0
trigger1 = vel y > 0
x = 0.5
y = -0.6
ignorehitpause = 1

[State 31500, VelAdd]
type = VelAdd
trigger1 = vel y >= 0
y = 0.4
ignorehitpause = 1

[State 31500, VelAdd]
type = VelAdd
trigger1 = vel y < 0
y = 0.9
ignorehitpause = 1

[State 31500, VelSet]
type = VelSet
trigger1 = vel y > 9
y = 9
ignorehitpause = 1

[State 31500, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0
ignorehitpause = 1

[State 31500, ChangeState]
type = ChangeState
trigger1 = pos y = 0
trigger1 = vel y > -0.5
value = 31000
ignorehitpause = 1

; End
[Statedef 31998]
type = U
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State 31998, SelfState]
type = SelfState
trigger1 = prevstateno = 31000
trigger2 = prevstateno = 31010
trigger3 = prevstateno = 31020
value = 0
ctrl = 1

[State 31998, SelfState]
type = SelfState
trigger1 = prevstateno = 31050
value = 50
ctrl = 1

[State 31998, SelfState]
type = SelfState
trigger1 = 1
value = 5050

;---------------------------------------------------------------------------
; Transformed (Mukoro)

; Stand
[Statedef 32000]
type = A
physics = S
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State Chibi HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 32000, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 32000
ignorehitpause = 1
persistent = 0

[State 32000, PosSet]
type = PosSet
triggerall = !alive
trigger1 = pos y > 0
trigger1 = vel y > -0.5
y = 0
ignorehitpause = 1

[State 32000, SelfState]
type = SelfState
triggerall = !alive
trigger1 = pos y = 0
trigger1 = vel y > -0.5
value = 5150
ignorehitpause = 1

[State 32000, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 32000, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 32010
ignorehitpause = 1

[State 32000, ChangeState]
type = ChangeState
trigger1 = command = "holdfwd"
value = 32020
ignorehitpause = 1

[State 32000, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 32050
ignorehitpause = 1

[State 32000, PosAdd]
type = PosAdd
triggerall = alive
trigger1 = pos y < 0
y = ifelse(pos y < -4, 4, -pos y)

[State 32000, PosAdd]
type = PosAdd
trigger1 = pos y > 0
y = ifelse(pos y > 4, -4, -pos y)

; Crouch
[Statedef 32010]
type = A
physics = C
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 32010, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 32010
ignorehitpause = 1
persistent = 0

[State 32010, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 32010, ChangeState]
type = ChangeState
trigger1 = command != "holddown"
value = 32000
ignorehitpause = 1

[State 32010, PosAdd]
type = PosAdd
trigger1 = pos y < 32
y = ifelse(pos y < 28, 4, 32 - pos y)

[State 32010, PosAdd]
type = PosAdd
trigger1 = pos y > 32
y = ifelse(pos y > 36, -4, 32 - pos y)

; Walk
[Statedef 32020]
type = A
physics = N
movetype = H
ctrl = 0
velset = 3,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 32020, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 32020
ignorehitpause = 1
persistent = 0

[State 32020, VelSet]
type = VelSet
trigger1 = 1
x = 2
ignorehitpause = 1

[State 32020, ChangeState]
type = ChangeState
trigger1 = command != "holdfwd"
value = 32000
ignorehitpause = 1

[State 32020, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 32010
ignorehitpause = 1

[State 32020, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 32050
ignorehitpause = 1

[State 32020, PosAdd]
type = PosAdd
trigger1 = pos y < 0
y = ifelse(pos y < -4, 4, -pos y)

[State 32020, PosAdd]
type = PosAdd
trigger1 = pos y > 0
y = ifelse(pos y > 4, -4, -pos y)

; Jump
[Statedef 32050]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 32050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 32000
ignorehitpause = 1
persistent = 0

[State 32050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 1
value = 32050
ignorehitpause = 1
persistent = 0

[State 32050, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 32050, VelSet]
type = VelSet
trigger1 = time = 1
x = ifelse(command = "holdfwd", 2, ifelse(command = "holdback", -2, 0))
y = -10

[State 32050, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.6
ignorehitpause = 1

[State 32050, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0
ignorehitpause = 1

[State 32050, ChangeState]
type = ChangeState
trigger1 = pos y = 0
trigger1 = vel y > 1
value = 32000
ignorehitpause = 1

; Hit
[Statedef 32500]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 32500, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 32500
ignorehitpause = 1

[State 32500, VelSet]
type = VelSet
trigger1 = time = 0
x = ifelse(p2dist x < 0, 3, -3)
y = -9
ignorehitpause = 1
persistent = 0

[State 32500, VelMul]
type = VelMul
trigger1 = pos y > 56
trigger1 = vel y > 0
x = 0.5
y = -0.6
ignorehitpause = 1

[State 32500, VelAdd]
type = VelAdd
trigger1 = vel y >= 0
y = 0.4
ignorehitpause = 1

[State 32500, VelAdd]
type = VelAdd
trigger1 = vel y < 0
y = 0.9
ignorehitpause = 1

[State 32500, VelSet]
type = VelSet
trigger1 = vel y > 9
y = 9
ignorehitpause = 1

[State 32500, PosSet]
type = PosSet
trigger1 = pos y > 56
y = 56
ignorehitpause = 1

[State 32500, ChangeState]
type = ChangeState
trigger1 = pos y = 56
trigger1 = vel y > -0.5
value = 32000
ignorehitpause = 1

; End
[Statedef 32998]
type = U
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State 32998, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0

[State 32998, SelfState]
type = SelfState
trigger1 = prevstateno = 32000
trigger2 = prevstateno = 32010
trigger3 = prevstateno = 32020
value = 0
ctrl = 1

[State 32998, SelfState]
type = SelfState
trigger1 = prevstateno = 32050
value = 50
ctrl = 1

[State 32998, SelfState]
type = SelfState
trigger1 = 1
value = 5050

;---------------------------------------------------------------------------
; Transformed (Tabasa)

; Stand
[Statedef 33000]
type = A
physics = S
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State Chibi HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 33000, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 33000
ignorehitpause = 1
persistent = 0

[State 33000, SelfState]
type = SelfState
triggerall = !alive
trigger1 = pos y = 0
trigger1 = vel y > -0.5
value = 5150
ignorehitpause = 1

[State 33000, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 33000, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 33010
ignorehitpause = 1

[State 33000, ChangeState]
type = ChangeState
trigger1 = command = "holdfwd"
value = 33020
ignorehitpause = 1

[State 33000, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 33050
ignorehitpause = 1

; Crouch
[Statedef 33010]
type = A
physics = C
movetype = H
ctrl = 0
velset = 0,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 33010, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 33010
ignorehitpause = 1
persistent = 0

[State 33010, Turn]
type = Turn
trigger1 = command = "holdback"
ignorehitpause = 1

[State 33010, ChangeState]
type = ChangeState
trigger1 = command != "holddown"
value = 33000
ignorehitpause = 1

; Walk
[Statedef 33020]
type = A
physics = N
movetype = H
ctrl = 0
velset = 2,0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 33020, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 33020
ignorehitpause = 1
persistent = 0

[State 33020, VelSet]
type = VelSet
trigger1 = 1
x = 2
ignorehitpause = 1

[State 33020, ChangeState]
type = ChangeState
trigger1 = command != "holdfwd"
value = 33000
ignorehitpause = 1

[State 33020, ChangeState]
type = ChangeState
trigger1 = command = "holddown"
value = 33010
ignorehitpause = 1

[State 33020, ChangeState]
type = ChangeState
trigger1 = command = "holdup"
value = 33050
ignorehitpause = 1

; Jump
[Statedef 33050]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 33050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 33000
ignorehitpause = 1
persistent = 0

[State 33050, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 1
value = 33050
ignorehitpause = 1
persistent = 0

[State 33050, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 33050, VelSet]
type = VelSet
trigger1 = time = 1
x = ifelse(command = "holdfwd", 2, ifelse(command = "holdback", -2, 0))
y = -10

[State 33050, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.6
ignorehitpause = 1

[State 33050, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0
ignorehitpause = 1

[State 33050, ChangeState]
type = ChangeState
trigger1 = pos y = 0
trigger1 = vel y > 1
value = 33000
ignorehitpause = 1

; Hit
[Statedef 33500]
type = A
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State Chibi HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 5000
ignorehitpause = 1

[State Chibi AssertSpecials]
type = AssertSpecial
trigger1 = 1
flag = NoKoSnd
ignorehitpause = 1

[State 33500, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 33500
ignorehitpause = 1

[State 33500, VelSet]
type = VelSet
trigger1 = time = 0
x = ifelse(p2dist x < 0, 3, -3)
y = -9
ignorehitpause = 1
persistent = 0

[State 33500, VelMul]
type = VelMul
trigger1 = pos y > 0
trigger1 = vel y > 0
x = 0.5
y = -0.6
ignorehitpause = 1

[State 33500, VelAdd]
type = VelAdd
trigger1 = vel y >= 0
y = 0.4
ignorehitpause = 1

[State 33500, VelAdd]
type = VelAdd
trigger1 = vel y < 0
y = 0.9
ignorehitpause = 1

[State 33500, VelSet]
type = VelSet
trigger1 = vel y > 9
y = 9
ignorehitpause = 1

[State 33500, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0
ignorehitpause = 1

[State 33500, ChangeState]
type = ChangeState
trigger1 = pos y = 0
trigger1 = vel y > -0.5
value = 33000
ignorehitpause = 1

; End
[Statedef 33998]
type = U
physics = N
movetype = H
ctrl = 0
sprpriority = 0

[State 33998, SelfState]
type = SelfState
trigger1 = prevstateno = 33000
trigger2 = prevstateno = 33010
trigger3 = prevstateno = 33020
value = 0
ctrl = 1

[State 33998, SelfState]
type = SelfState
trigger1 = prevstateno = 33050
value = 50
ctrl = 1

[State 33998, SelfState]
type = SelfState
trigger1 = 1
value = 5050

;---------------------------------------------------------------------------
; Guard Crush

[Statedef 5400]
type = U
physics = N
movetype = H
ctrl = 0

[State 5400, PalFX]
type = PalFX
trigger1 = time = 0
trigger1 = prevstateno != 5400
sinadd = 200, 200, 200, 5
time = gethitvar(hitshaketime)
ignorehitpause = 1

[State 5400, HitAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5002 + 20*statetype = C
ignorehitpause = 1

[State 5400, HitAnim]
type = ChangeState
trigger1 = time
trigger1 = gethitvar(hitshaketime)
value = 5400
ignorehitpause = 1

[State 5400, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5400, RecoveryAnim]
type = ChangeAnim
triggerall = animtime = -1
trigger1 = time < 48
trigger2 = statetype = A
value = anim
elem = animelemno(0)
ignorehitpause = 1

[State 5400, Friction]
type = StateTypeSet
trigger1 = time = 0
trigger1 = statetype = S
physics = S
ignorehitpause = 1

[State 5400, Friction]
type = StateTypeSet
trigger1 = time = 0
trigger1 = statetype = C
physics = C
ignorehitpause = 1

[State 5400, Freeze]
type = PosFreeze
trigger1 = time = 0
ignorehitpause = 1

[State 5400, Fall]
type = VelSet
trigger1 = time <= gethitvar(hitshaketime)
trigger1 = statetype = A
y = -3
x = -0.5
ignorehitpause = 1

[State 5400, Fall]
type = VelAdd
trigger1 = time > gethitvar(hitshaketime)
trigger1 = statetype = A
y = const(movement.yaccel)
ignorehitpause = 1

[State 5400, RecoveryAnim]
type = ChangeAnim
triggerall = anim != 5007 + 20*statetype = C
trigger1 = statetype != A
trigger1 = animtime = 0
trigger2 = time > 55
value = 5007 + 20*statetype = C

[State 5400, End]
type = PosSet
trigger1 = statetype != A
trigger1 = time > 60
trigger2 = statetype = A
trigger2 = pos y + vel y >= 0
y = 0

[State 5400, End]
type = SelfState
trigger1 = statetype != A
trigger1 = time > 60
trigger2 = statetype = A
trigger2 = pos y + vel y >= 0
value = 11*statetype = C
ctrl = 1


;---------------------------------------------------------------------------
; Frozen (Standing)
[Statedef 5706]
type    = U
movetype= H
physics = U
ctrl = 0
sprpriority = 0

[State AntiHelper]
type = DestroySelf
trigger1 = ishelper

[State Safety]
type = SelfState
trigger1 = gethitvar(guarded)
value = ifelse((prevstateno = [5706, 5707]), 150 + 2*(statetype = C) + 4*(statetype = A), prevstateno)

[State 5706, ChangeState]
type = ChangeState
triggerall = !gethitvar(guarded)
trigger1 = statetype = A
trigger2 = pos y < 0
trigger3 = !alive
trigger4 = gethitvar(fall)
value = 5707

[State 5706, StateTypeSet]
type = StateTypeSet
trigger1 = !time
statetype = S
movetype = H
physics = S

[State 5706, PosFreeze]
type = PosFreeze
trigger1 = !hitshakeover
ignorehitpause = 1

[State 5706, 0]
type = VelSet
trigger1 = time > 10
x = -5
persistent = 0

[State 5706, 3] ;Stop sliding back
type = VelMul
trigger1 = time > 20
x = .8

[State 5706, 6]
type = SelfState
trigger1 = time > 55
value = 5001
ctrl = 0
ignorehitpause = 1

[State 5706, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)
elem = ifelse( time && animelemno(0) > 1 && animelem = 1, < 3 && ((anim = [5000, 5002]) || (anim = [5010, 5012])), 2, 1)
ignorehitpause = 1

[State 5706, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030
ignorehitpause = 1

[State 5706, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type
ignorehitpause = 1

[State 5706, 0]
type = PalFX
trigger1 = gametime%30 < 15
color = 0
invertall = 1
mul = 64 + (gametime%30)*2, 96 + (gametime%30)*2, 128 + (gametime%30)*4
add = 384, 384, 384
time = 1
ignorehitpause = 1

[State 5706, 0]
type = PalFX
trigger1 = gametime%30 > 14
color = 0
invertall = 1
mul = 64 + (30 - (gametime%30))*2, 96 + (30 - (gametime%30))*2, 128 + (30 - (gametime%30))*4
add = 384, 384, 384
time = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; Frozen

[Statedef 5707]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 0

[State AntiHelper]
type = DestroySelf
trigger1 = ishelper

[State Safety]
type = SelfState
trigger1 = gethitvar(guarded)
value = ifelse((prevstateno = [5706, 5707]), 150 + 2*(statetype = C) + 4*(statetype = A), prevstateno)

[State 5707, 0]
type = PosFreeze
trigger1 = !hitshakeover
ignorehitpause = 1

[State 5707, 1]
type = VelAdd;Gravity
trigger1 = hitshakeover
y = GetHitVar(yaccel)
ignorehitpause = 1

[State 5707, 2]
type = HitVelSet
trigger1 = !time
x = 1
y = 1
ignorehitpause = 1

[State 5707, 3]
type = SelfState
triggerall = hitshakeover
triggerall = !HitFall
trigger1 = Vel Y > 0    ;Hit ground
trigger1 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV
ignorehitpause = 1

[State 5707, 4]
type = SelfState
triggerall = hitshakeover
triggerall = HitFall
trigger1 = Vel Y > 0    ;Hit ground
trigger1 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL
ignorehitpause = 1

[State 5707, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5012
ignorehitpause = 1

[State 5707, 0]
type = PalFX
trigger1 = gametime%30 < 15
color = 0
invertall = 1
mul = 64 + (gametime%30)*3, 96 + (gametime%30)*2, 128 + (gametime%30)*4
add = 384, 384, 384
time = 1
ignorehitpause = 1

[State 5707, 0]
type = PalFX
trigger1 = gametime%30 > 14
color = 0
invertall = 1
mul = 64 + (30 - (gametime%30))*3, 96 + (30 - (gametime%30))*2, 128 + (30 - (gametime%30))*4
add = 384, 384, 384
time = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 25000]
type    = U
movetype= H
physics = N
velset = 0,0
ctrl = 0

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

[State 25000, Cancel]
type = PosAdd
triggerall = pos y != 0.001
trigger1 = !alive
trigger2 = anim = 5300
y = -0.001

[State 25000, Cancel]
type = SelfState
trigger1 = !alive
trigger2 = anim = 5300
value = 5000

[State 25000, Cancel]
type = SelfState
triggerall = gethitvar(chainid) = 10051 || gethitvar(chainid) = 11051
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
value = 5000

[State 25000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 25000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 25000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 25000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 25000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 25000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 25001 ;HITG_SLIDE

[State 25000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 25030

[State 25000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 25000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 25000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 25001]
type    = S
movetype= H
physics = S

[State 25001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 25001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 25001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 25001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 25001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 25001, 6]
type = ChangeState
trigger1 = HitOver
value = 25301
ctrl = 1

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 25030]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 25030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 25030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 25030, 4]
type = ChangeState
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 25050 ;HITA_FALL

[State 25030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 25035 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 25035]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 25035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 25035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 25035, 4]
type = ChangeState
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 25050 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 25050]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 25050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 25050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 25050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 25050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 25100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 25100]
type    = L
movetype= H
physics = N
ctrl = 0

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

[State 25100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 25100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 25100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 25100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 25100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 25100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 25100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 25100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 25100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 25110 ;HIT_LIEDOWN

[State 25100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 25100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 25100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 25100, 11]
type = PosFreeze
trigger1 = 1

[State 25100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 25101

[State 25100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 25101]
type    = L
movetype= H
physics = N
ctrl = 0

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

[State 25101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 25101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

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

[State 25101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 25101, 5] ;Acceleration
type = VelAdd
trigger1 = 1
y = .4

[State 25101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 25110

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 25110]
type    = L
movetype= H
physics = N
ctrl = 0

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

[State 25110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 25110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 25110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 25110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 25110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 25110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 25110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 25110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 25110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 25110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 25110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 25110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 25110, 11] ;If just died
type = SelfState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 25110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 25110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 25110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 25110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

[State 25110, GetUp]
type = ChangeState
trigger1 = time > 30
value = 25120

;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 25120]
type    = L
movetype= H
physics = N
ctrl = 0

[State 25120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 25120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 25120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 25120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 25120, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 25300
ctrl = 1

;---------------------------------------------------------------------------
; DIZZY (Emnity Malice)
[Statedef 25300]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 5300
ctrl = 0

[State 25300, End]
type = SelfState
trigger1 = time > 120
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; DIZZY (Poison)
[Statedef 25301]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 5300
ctrl = 0

[State 25301, End]
type = SelfState
trigger1 = time = 60
value = 0
ctrl = 1