; Custom states
;---------------------------------------------------------------------------
; Thorwn by Overhead Throw
[Statedef 805]
type    = A
movetype= H
physics = N
velset = 0,0

[State 805, Anim2]
type = ChangeAnim2
trigger1 = Anim != 805
value = 805

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

[State 805, LifeAdd]
type = LifeAdd
trigger1 = AnimTime = 0
value = -200

[State 805, HitVelSet]
type = HitVelSet
trigger1 = AnimTime = 0
x = 1
y = 1

[State 805, SelfState]
type = SelfState
trigger1 = AnimTime = 0
value = 5050

;---------------------------------------------------------------------------
; Thorwn by Kick Throw
[Statedef 806]
type    = A
movetype= H
physics = N
velset = 0,0

[State 806, Anim2]
type = ChangeAnim2
trigger1 = Anim != 806
value = 806

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

[State 806, LifeAdd]
type = LifeAdd
trigger1 = AnimTime = 0
value = -200

[State 806, HitVelSet]
type = HitVelSet
trigger1 = AnimTime = 0
x = 1
y = 1

[State 806, SelfState]
type = SelfState
trigger1 = AnimTime = 0
value = 5050

;---------------------------------------------------------------------------
; Hit by Super Sobat Kick
[Statedef 840]
type    = A
movetype= H
physics = N
velset = 0,0

[State 840, Anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 5250

[State 840, 0]
type = AngleSet
trigger1 = Time = 0
trigger2 = BackEdgeBodyDist <= 20
trigger3 = FrontEdgeBodyDist <= 20
value = -90

[State 840, 2]
type = AngleDraw
trigger1 = 1

[State 840, 3]
type = VelSet
trigger1 = Time = 4
x = -20

[State 840, 4]
type = null ;ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 840, 5]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 841

; Hit Wall
[Statedef 841]
type    = A
movetype= H
physics = N

[State 841, Anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 5251

[State 841, AngleSet]
type = AngleSet
trigger1 = Time = 0
value = -90

[State 841, AngleDraw]
type = AngleDraw
trigger1 = Time < 10

[State 841, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 841, Pos]
type = PosAdd
trigger1 = Time = 0
x = 10 - BackEdgeBodyDist

[State 841, Stop moving]
type = PosFreeze
trigger1 = Time < 10
x = 1
y = 1

[State 841, SlowMotion]
type = null ;Pause
triggerall = P2BodyDist X > 100
triggerall = Time > 10
trigger1 = TimeMod = 1,0
time = 3
movetime = 0

[State 841, PlayerPush]
type = null ;PlayerPush
trigger1 = Time > 10
value = 0

[State 841, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 841, EnvShake]
type = EnvShake
trigger1 = Time = 0
persistent = 0
time = 10
ampl = -5
freq = 100
phase = 10

[State 841, Spark]
type = Explod
trigger1 = time = 0
anim = F72
pos = -30,-50
postype = p1
facing = 1
sprpriority = 3
bindtime = 2
supermove = 1

[State 841, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,1

[State 841, VelSet]
type = VelSet
trigger1 = Time = 10
x = 8
y = -6.5

[State 841, Gravity]
type = VelAdd
trigger1 = Time > 10
y = .4

[State 841, Turn]
type = Turn
trigger1 = Vel Y > 0
trigger1 = Pos Y > 20

[State 841, LifeAdd]
type = LifeAdd
trigger1 = Vel Y > 0
trigger1 = Pos Y > 20
value = -10

[State 841, SelfState]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y > 20
value = 5110 ;Hit ground

; Hit Again - Fly
[Statedef 842]
type    = A
movetype= H
physics = N
velset = 0,0

[State 842, Anim2]
type = ChangeAnim2
trigger1 = Time = 5
value = 5280

[State 842, 0]
type = AngleSet
trigger1 = Time = 5
value = -90 ;-180

[State 842, 1]
type = AngleAdd
trigger1 = Time > 5
value = 22.5

[State 842, 2]
type = AngleDraw
trigger1 = Time >= 5
trigger1 = Pos Y < 10

[State 842, 3]
type = HitVelSet
trigger1 = Time = 5
x = 1
y = 1

[State 842, 4]
type = VelAdd
trigger1 = Time > 5
y = .4

[State 842, 5]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y > 10
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
; Hit by Sunrise Theme
[Statedef 850]
type    = A
movetype= H
physics = N
velset = 0,0

[State 850, Anim2]
type = ChangeAnim2
trigger1 = Anim != 5260
value = 5260

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

[State 850, 1]
type = HitBy
trigger1 = 1
value = S, HA
time = 1

[State 850, 1]
type = NotHitBy
trigger1 = 1
value = CA, NA AP
time = 1

[State 850, 2]
type = HitVelSet
trigger1 = Time = 10
x = 1
y = 1

[State 850, 2]
type = PosAdd
trigger1 = AnimElem = 3
x = 10

[State 850, 2]
type = VelAdd
trigger1 = Time > 10
y = .25

[State 850, 2]
type = VelSet
triggerall = Vel Y > 0
triggerall = Pos Y > -50
trigger1 = P2StateNo = 3000
trigger2 = P2StateNo = 3010
trigger3 = P2StateNo = 3020
y = 0

[State 850, LifeAdd]
type = LifeAdd
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
value = -10

[State 850, 3]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
value = 5110 ;Hit ground

;---------------------------------------------------------------------------
; Hit Again by Sunrise Theme
[Statedef 855]
type    = A
movetype= H
physics = N
velset = 0,0

[State 855, Anim2]
type = ChangeAnim2
trigger1 = Anim != 5270
value = 5270

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

[State 855, 1]
type = HitBy
trigger1 = 1
value = SA, HA
time = 1

[State 855, 1]
type = NotHitBy
trigger1 = 1
value = C, NA AP
time = 1

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

[State 855, 2]
type = VelAdd
trigger1 = 1
y = 2

[State 855, LifeAdd]
type = LifeAdd
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
value = -10

[State 855, 3]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
value = 5110 ;Hit ground

;---------------------------------------------------------------------------
; Hit by Sunrise Theme - Fly
[Statedef 860]
type    = A
movetype= H
physics = N
velset = 0,0

[State 860, Anim2]
type = ChangeAnim2
trigger1 = Time = 5
value = 5290

[State 860, 1]
type = HitVelSet
trigger1 = Time = 5
x = 1
y = 1

[State 860, 2]
type = VelAdd
trigger1 = Time > 5
y = .4

[State 860, 3]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y > 10
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
; Hit by Counter
[Statedef 970]
type    = A
movetype= H
physics = N
velset = 0,0

[State 970, 0]
type = ChangeState
trigger1 = HitShakeOver
value = 971

;---------------------------------------------------------------------------
; Spun by Counter
[Statedef 971]
type    = A
movetype= H
physics = N
velset = 0,0

[State 970, 0]
type = ChangeAnim2
trigger1 = Time = 0
value = 980

[State 970, 1]
type = PosAdd
trigger1 = Time = 0
y = -10

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

[State 970, 3]
type = VelAdd
trigger1 = 1
y = .4

[State 970, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
