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

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

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

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

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

[State 910, 8]
type = PowerAdd
Trigger1 = AnimElem = 4
value = 50




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

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

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

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

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

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

[State 815, ChangeState]
type = ChangeState
trigger1 = AnimElem = 6
value = 816

;---------------------------------------------------------------------------
; Land from being grabbed
[Statedef 816]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

[State 815, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = F7, 2

[State 815, GameMakeAnim]
type = GameMakeAnim
trigger1 = Time = 0
value = 62
pos = 0, 0

[State 805, LifeAdd]
type = LifeAdd
Trigger1 = AnimElem = 6
value = -100


[State 910, 8]
type = PowerAdd
Trigger1 = AnimElem = 6
value = 60

[State 815, HitVelSet]
type = HitVelSet
trigger1 = Time = 20
x = 1
y = 1

[State 815, 3]
type = VelAdd
trigger1 = Time > 20
y = .4

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

;---------------------------------------------------------------------------
; Air Thrown
[Statedef 825]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

[State 825, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimTime = 0
y = 50

[State 825, HitVelSet]
type = HitVelSet
trigger1 = AnimElem = 4
trigger2 = AnimTime = 0
x = 1
y = 1

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

[State 910, 8]
type = TargetPowerAdd
Trigger1 = AnimElem = 4
value = 50

[State 910, 8]
type = PowerAdd
Trigger1 = AnimElem = 4
value = 60

[State 825, 3]
type = VelAdd
trigger1 = Time >= 20
y = .4

[State 825, 4]
type = SelfState
trigger1 = Time > 10
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 5100 ;Hit ground

[State 825, SelfState]
type = SelfState
trigger1 = AnimElem = 4
trigger2 = AnimTime = 0
value = 5050

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

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

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

;---------------------------------------------------------------------------
; Land  from being air grabbed
[Statedef 836]
type    = A
movetype= H
physics = N
velset = 0,0

[State 836, Anim2]
type = ChangeAnim2
trigger1 = Anim = 835
value = 835
elem = 4

[State 836, 2]
type = PlaySnd
trigger1 = Time = 0
value = F7, 0

[State 836, GameMakeAnim]
type = GameMakeAnim
trigger1 = Time = 0
value = 2
pos = 0, 0

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

[State 805, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = -100


[State 910, 8]
type = PowerAdd
trigger1 = Time = 0
value = 50

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

[State 836, PosAdd]
type = PosAdd
trigger1 = Time = 20
y = 50

[State 836, HitVelSet]
type = HitVelSet
trigger1 = Time = 20
x = 1
y = 1

[State 836, SelfState]
type = SelfState
trigger1 = Time = 20
value = 5050

;---------------------------------------------------------------------------
; Grabbed by Spinning Pile Driver
[Statedef 855]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

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

;---------------------------------------------------------------------------
; Land from Spinning Pile Driver
[Statedef 856]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 5110

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

[State 856, 2]
type = PlaySnd
trigger1 = Time = 0
value = F7, 2

[State 856, GameMakeAnim]
type = GameMakeAnim
trigger1 = Time = 0
value = 62
pos = 0, 0

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

[State 856, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = -50

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

[State 856, PosAdd]
type = null ;PosAdd
trigger1 = Time = 20
y = 20

[State 856, HitVelSet]
type = HitVelSet
trigger1 = Time = 20
x = 1
y = 1

[State 856, 3]
type = VelAdd
trigger1 = Time > 20
y = .4

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

[State 856, SelfState]
type = null ;SelfState
trigger1 = Time = 20
value = 5050

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

[State 910, 0]
type = ChangeAnim2
trigger1 = 1
value = 930

[State 910, 1]
type = PosAdd
trigger1 = Time = 0
y = -40

[State 910, SelfState]
type = ChangeState
trigger1 = HitShakeOver
value = 911

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

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

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

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

;---------------------------------------------------------------------------
; Opponent Hit
[Statedef 950]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 5010

[State 950, Anim]
type = ChangeAnim
trigger1 = Time < 15
value = 5010

[State 950, Anim2]
type = ChangeAnim2
trigger1 = Time = 15
value = 950

[State 950, HitVelSet]
type = HitVelSet
trigger1 = Time = 15
x = 1
y = 1

[State 950, 0]
type = AngleSet
trigger1 = Time = 0
value = 0

[State 950, 1]
type = AngleAdd
trigger1 = Time > 15
value = 22.5

[State 950, 2]
type = AngleDraw
trigger1 = Time >= 15
trigger1 = Pos Y < 10

[State 950, 4]
type = VelAdd
trigger1 = Time >= 15
y = .4

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

;---------------------------------------------------------------------------
; Opponent Hit
[Statedef 4010]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 5030

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

[State 4010, No Scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 4010, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(5051)
trigger1 = Time <= 8
value = 5051

[State 4010, AfterImage]
type = AfterImage
trigger1 = AnimElem = 1
time = 1

[State 4010, AfterImageTime]
type = AfterImageTime
trigger1 = 1
time = 2

[State 4010, HitVelSet]
type = HitVelSet
trigger1 = Time = 8
x = 1
y = 1

[State 4010, VelSet]
type = VelSet
trigger1 = Time = 30
x = 0
y = 0

[State 4010, AssertSpecial]
type = AssertSpecial
trigger1 = Time >= 40
trigger1 = Time <= 140
flag = NoShadow

[State 4010, Turn]
type = Turn
trigger1 = Time = 100

[State 4010, VelSet]
type = PosAdd
trigger1 = Time = 100
x = -150

[State 4010, Anim]
type = ChangeAnim
triggerall = !SelfAnimExist(5061)
trigger1 = Time = 130
value = 5050

[State 4010, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(5061)
trigger1 = Time = 130
value = 5061

[State 4010, VelSet]
type = VelSet
trigger1 = Time = 140
x = -2
y = 20

[State 4010, LifeAdd]
type = LifeAdd
trigger1 = Time = 100
value = -500
;kill = 0

[State 4010, 5]
type = SelfState
trigger1 = Time > 100
trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
value = 5100 ;Hit ground

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