; Custom states

;---------------------------------------------------------------------------
; Thrown
[Statedef 81533]
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
;---------------------------------------------------------------------------
; Thrown
[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 thrown
[Statedef 816]
type    = A
movetype= H
physics = N
velset = 0,0

[State 815, Anim2]
type = ChangeAnim2
trigger1 = Anim = 885
trigger2 = Anim = 899
value = 886

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

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

[State 815, EnvShake]
type = EnvShake
triggerall = Anim = 886 || Anim = 899
trigger1 = Time = 0
time = 20
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 815, LifeAdd]
type = LifeAdd
trigger1 = Anim = 815
trigger1 = AnimElem = 6
value = -75


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

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





[State 815, LifeAdd]
type = LifeAdd
trigger1 = Anim = 886
trigger1 = AnimElem = 1
value = -35

[State 815, HitVelSet]
type = HitVelSet
trigger1 = Anim = 815
trigger1 = Time = 20
trigger2 = Anim = 886
trigger2 = Time = 10
x = 1
y = 1

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

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

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

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

[State 825, 1]
type = NotHitBy
trigger1 = 1
value = CA, NA, SA, HA, AP
time = 1

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

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

[State 825, Anim2]
type = ChangeAnim2
trigger1 = Anim != 826
value = 826
elem = animelemno(0)

[State 825, 1]
type = NotHitBy
trigger1 = 1
value = CA, NA, SA, HA, AP
time = 1

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

[State 825, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 825

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

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

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

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

[State 866, Anim2]
type = ChangeAnim2
trigger1 = Anim = 865
value = 865
elem = 4

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

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

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

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




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

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

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

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

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

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

[State 875, 1]
type = NotHitBy
trigger1 = Time <= 10
value = SCA
time = 1

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

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

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

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

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

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

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

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

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

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

[State 895, Anim2]
type = ChangeAnim2
trigger1 = Time < 5
trigger1 = AnimElem = 9
value = 898
elem = 3

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

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

[State 895, EnvShake]
type = EnvShake
trigger1 = AnimElem = 6
time = 10
freq = 100
ampl = -5
phase = 10

[State 895, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = F7, 2

[State 895, GameMakeAnim]
type = GameMakeAnim
trigger1 = AnimElem = 6
value = 62
pos = 0, 0

[State 895, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 6
value = -36
kill = 0

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

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

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

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

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

[State 895, EnvShake]
type = EnvShake
trigger1 = AnimElem = 6
time = 10
freq = 100
ampl = -5
phase = 10

[State 895, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = F7, 2

[State 895, GameMakeAnim]
type = GameMakeAnim
trigger1 = AnimElem = 6
value = 62
pos = 0, 0

[State 895, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 6
value = -36
kill = 0

;---------------------------------------------------------------------------
; Thorwn Final
[Statedef 899]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

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

[State 895, EnvShake]
type = EnvShake
trigger1 = AnimElem = 1
time = 20
freq = 100
ampl = -5
phase = 10

[State 895, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = F7, 2

[State 895, GameMakeAnim]
type = GameMakeAnim
trigger1 = AnimElem = 1
value = 62
pos = 0, 0

[State 895, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 1
value = -120
kill = 0

;---------------------------------------------------------------------------
; 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 980]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 5010

[State 980, ScreenBound]
type = null ;ScreenBound
trigger1 = 1
value = 0

[State 980, SelfState]
type = SelfState
trigger1 = Alive = 0
value = 5000

[State 980, Anim]
type = ChangeAnim
trigger1 = Time < 10
value = 5010

[State 980, AfterImage]
type = AfterImage
trigger1 = Time = 5
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 0

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

[State 980, Anim]
type = ChangeAnim
trigger1 = Time >= 10
value = 5011

[State 980, HitVelSet]
type = HitVelSet
trigger1 = Time = 10
x = 1

[State 980, Hit wall]
type = ChangeState
triggerall = Time >= 10
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 981

[State 980, 5]
type = SelfState
trigger1 = Time = 150
value = 5000

;---------------------------------------------------------------------------
; Hit Wall
[Statedef 981]
type    = A
movetype= H
physics = N
anim = 5010

[State 980, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 30
freq = 100
ampl = -10
phase = 10

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

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

[State 980, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

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

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

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

[State 980, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(5030)
trigger1 = Time = 10
value = 5030

[State 980, VelSet]
type = VelSet
trigger1 = Time = 10
x = 2
y = -4

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

[State 980, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(5035)
trigger1 = Anim = 5030
trigger1 = AnimTime = 0
value = 5035

[State 980, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(5050)
triggerall = AnimTime = 0
trigger1 = Anim = 5030
trigger2 = Anim = 5035
value = 5050

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

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