;======================================================================
;======================================================================
; Damage states file for "Mai Kawasumi"
;======================================================================
;======================================================================

;----------------------------------------------------------------------
; Throw
;----------------------------------------------------------------------

;----------------------------------------------------------------------
; Standing Throw

[Statedef 40501]
type = A
movetype = H
physics = N
poweradd = 20

[State 40501, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 40501

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

[Statedef 40502]
type = A
movetype = H
physics = N

[State 40502, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 40502

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

[Statedef 40503]
type = A
movetype = H
physics = N

[State 40503, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 40503

[State 40503, Turn]
type = Turn
trigger1 = Time = 0
persistent = 0

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

[Statedef 40504]
type = L
movetype = H
physics = N

[State 40504, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = 5170

[State 40504, ChangeAnim]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5110

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

[State 40504, SelfState]
type = SelfState
trigger1 = Time > 30
value = ifelse(Alive = 1,5120,5150)

;----------------------------------------------------------------------
; Ariel Throw - Wait

[Statedef 40505]
type = A
movetype = H
physics = N
poweradd = 20

[State 40505, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 40505

;----------------------------------------------------------------------
; Ariel Throw - Fall

[Statedef 40506]
type = A
movetype = H
physics = N

[State 40506, Turn]
type = Turn
trigger1 = Time = 0

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

[State 40506, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5160

[State 40506, VelSet]
type = VelSet
trigger1 = Time = 1
x = -10
y = 12

[State 40506, VelAdd]
type = VelAdd
trigger1 = Time > 1
y = 0.45

[State 40506, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; Ariel Throw - Fall

[Statedef 40507]
type = A
movetype = H
physics = N

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

[State 40507, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5160

[State 40507, VelSet]
type = VelSet
trigger1 = Time = 1
x = -10
y = 12

[State 40507, VelAdd]
type = VelAdd
trigger1 = Time > 1
y = 0.45

[State 40507, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; Wire Damage
;
;40670		- Initialize velocity and change animation
;40671		- Scatter to wall
;40672		- Crash into wall
;40673		- Turn to opposite
;40674		- Fall in down

[Statedef 40670]
type = A
movetype = H
physics = N

[State 40670, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 40670

[State 40670, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 40670, NotHitBy]
type = Null;NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 40670, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 40670, ChangeState]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 40671

[Statedef 40671]
type = A
movetype = H
physics = N

[State 40671, Gravity]
type = Gravity
trigger1 = 1

[State 40671, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 40671, ScreenBound]
type = Null;ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 40671, VelSet]
type = VelSet
trigger1 = Time = 0
x = -6
y = -6

[State 40671, ChangeAnim] 
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5050

[State 40671, ChangeState]
type = ChangeState
trigger1 = BackEdgeBodyDist < 15
value = 40672

[State 40671, SelfState]
type = SelfState
trigger1 = Time > 3
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

[Statedef 40672]
type = A
movetype = H
phisics = N

[State 40672, ScreenBound]
type = Null;ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 40672, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40672

[State 40672, EnvShake]
type = EnvShake
trigger1 = Time = 0
time = 15
ampl = -10

[State 40672, ChangeState]
type = ChangeState
trigger1 = Time = 1
value = 40673

[Statedef 40673]
type = A
movetype = H
phisics = N
velset = 0,0

[State 40673, ScreenBound]
type = Null;ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 40673, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40672

[State 40673, VelSet]
type = VelSet
trigger1 = Time = 15
x = 2
y = -3.5

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

[State 40673, Turn]
type = Turn
trigger1 = Time = 15

[State 40673, ChangeState]
type = ChangeState
trigger1 = Time > 15
value = 40674

[Statedef 40674]
type = A
movetype = H
phisics = N

[State 40674, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 40674, ScreenBound]
type = Null;ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 40674, VelSet]
type = VelSet
trigger1 = Time = 0
x = -1.6

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

[State 40674, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 40674, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 40674, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; 63214 + Z

[Statedef 40695]
type = A
movetype = H
phisics = N

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

[State 40695, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 40695, VelSet]
type = VelSet
trigger1 = Time = 0
x = -0.6
y = -10

[State 40695, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = -80
kill = 1
absolute = 1

[State 40695, DestroySelf]
type = DestroySelf
trigger1 = 1

[State 40695, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.35

[State 40695, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 40695, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 40695, SelfState]
type = SelfState
trigger1 = Time > 5
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

[Statedef 40697]
type = A
movetype = H
phisics = N

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

[State 40697, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 40697, VelSet]
type = VelSet
trigger1 = Time = 0
x = -0.6
y = -10

[State 40697, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.35

[State 40697, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 40697, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 40697, SelfState]
type = SelfState
trigger1 = Time > 5
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; 41236 + A(Lv.3) <!- Helper State -!> 

[Statedef 41012]
type = S
movetype = H
physics = S

[State 41012, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 41012

[State 41012, VelSet]
type = VelSet
trigger1 = Time = 0
x = Facing*GetHitVar(XVel)
y = 0

[State 41012, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 41012, HitFallSet]
type = HitFallSet
trigger1 = Time = 0
value = 0

[State 41012, ChangeState]
type = ChangeState
trigger1 = Time > GetHitVar(HitTime)
trigger1 = Alive = 1
value = 41013

[State 41012, SelfState]
type = SelfState
trigger1 = Alive = 0
value = 5150

;----------------------------------------------------------------------
; 41236 + A(Lv.3) <!- Helper State -!> 

[Statedef 41013]
type = S
movetype = H
physics = S

[State 41013, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = 5007

[State 41013, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 41013, HitFallSet]
type = HitFallSet
trigger1 = Time = 0
value = 0

[State 41013, SelfState]
type = SelfState
trigger1 = Time > 10
trigger1 = Alive = 1
value = 0
ctrl = 1

[State 41012, SelfState]
type = SelfState
trigger1 = Alive = 0
value = 5150

;----------------------------------------------------------------------
; 214 + BC

[Statedef 46020]
type = A
movetype = H
physics = N
poweradd = 20

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

[State 46020, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 46020

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

[Statedef 46021]
type = A
movetype = H
physics = N

[State 46021, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 46021, VelSet]
type = VelSet
trigger1 = Time = 0
x = -1.8
y = -10

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

[State 46021, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 46021, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 46021, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; 236236 + B

[Statedef 46510]
type = A
movetype = H
physics = N
velset = 0,0
poweradd = 20

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

[State 46510, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 46020

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

[Statedef 46511]
type = A
movetype = H
physics = N

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

[State 46511, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 46511, VelSet]
type = VelSet
trigger1 = Time = 0
y = -10

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

[State 46511, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 46511, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 46511, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; 236236 + C

[Statedef 46520]
type = A
movetype = H
phisics = N

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

[State 46520, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 46520

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

[State 46520, VelSet]
type = VelSet
trigger1 = Time = 0
x = 0
y = -20

[Statedef 46521]
type = A
movetype = H
phisics = N

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

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

[State 46521, PosSet]
type = PosSet
trigger1 = 1
x = 0

[State 46521, VelAdd]
type = VelAdd
trigger1 = Pos Y < -70
y = 0.7

[State 46521, VelSet]
type = VelSet
trigger1 = Pos Y > -70
y = 0

[State 46521, ChangeState]
type = ChangeState
trigger1 = Pos Y > -70
value = 46522

[Statedef 46522]
type = A
movetype = H
phisics = N

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

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

[State 46521, PosSet]
type = PosSet
trigger1 = 1
x = 0
y = -70

[State 46522, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[Statedef 46523]
type = A
movetype = H
phisics = N

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

[State 46523, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 46520

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

[State 46523, VelSet]
type = VelSet
trigger1 = Time = 0
x = 0
y = -20

[State 46523, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.5

[State 46523, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; Wire Damage - Wall
;
;47010		- Initialize velocity and change animation
;47011		- Scatter to wall
;47012		- Crash into wall
;47013		- Turn to opposite
;47014		- Fall in down

[Statedef 47010]
type = A
movetype = H
physics = N

[State 47010, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 40670

[State 47010, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

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

[State 47010, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 47010, ChangeState]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 47011

[Statedef 47011]
type = A
movetype = H
physics = N

[State 47011, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

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

[State 47011, VelSet]
type = VelSet
trigger1 = Time = 0
x = -14

[State 47011, ChangeAnim] 
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5050

[State 47011, ChangeState]
type = ChangeState
trigger1 = BackEdgeBodyDist < 15
value = 47012

[State 47011, SelfState]
type = SelfState
trigger1 = Time > 3
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

[Statedef 47012]
type = A
movetype = H
phisics = N

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

[State 47012, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40672

[State 47012, EnvShake]
type = EnvShake
trigger1 = Time = 0
time = 15
ampl = -10

[State 47012, ChangeState]
type = ChangeState
trigger1 = Time = 1
value = 47013

[Statedef 47013]
type = A
movetype = H
phisics = N
velset = 0,0

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

[State 47013, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40672

[State 47013, VelSet]
type = VelSet
trigger1 = Time = 5
x = 2
y = -3.5

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

[State 47013, Turn]
type = Turn
trigger1 = Time = 5

[State 47013, ChangeState]
type = ChangeState
trigger1 = Time > 5
value = 47014

[Statedef 47014]
type = A
movetype = H
phisics = N

[State 47014, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

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

[State 47014, VelSet]
type = VelSet
trigger1 = Time = 0
x = -1.6

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

[State 47014, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 47014, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 47014, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;----------------------------------------------------------------------
; 2141236 + A

[Statedef 47020]
type = S
movetype = H
physics = N
velset = 0,0

[State 47020, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 47020, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 47020

[Statedef 47021]
type = S
movetype = H
physics = N
velset = 0,0

[State 47021, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 47021, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 47021

[Statedef 47022]
type = A
movetype = H
physics = N

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

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

[State 47022, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 47022, VelSet]
type = VelSet
trigger1 = Time = 0
y = -9

[State 47022, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.25

[State 47022, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 47022, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 47022, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

[Statedef 47023]
type = A
movetype = H
physics = N

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

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

[State 47023, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 47023, VelSet]
type = VelSet
trigger1 = Time = 0
y = -7.5

[State 47023, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.2

[State 47023, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 47023, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 47023, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

[Statedef 47024]
type = A
movetype = H
physics = N

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

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

[State 47024, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 40674

[State 47024, VelSet]
type = VelSet
trigger1 = Time = 3
x = -6
y = 5

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

[State 47024, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 40674
trigger1 = AnimTime = 0
value = 5050

[State 47024, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 5050
trigger1 = AnimTime = 1
trigger1 = SelfAnimExist(5060)
value = 5060

[State 47024, SelfState]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100
