;Common constants file

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 180]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 180, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type = S
ctrl = 0
velset = 0,0

[State 175, 1] ; If no anim, use go to lose state.
type = ChangeState
trigger1 = Time = 0
trigger1 = !animexist(175)
value = 170

[State 175, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 175

[State 175, 3]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 1]
type = ChangeAnim
trigger1 = Time >= 0
value = 190

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1]
type = ChangeState
trigger1 = HitShakeOver = 1
trigger1 = HitVel Y = 0
trigger1 = Time != 0
value = 5001 ;HITG_SLIDE

[State 5000, 2]
type = ChangeState
trigger1 = HitShakeOver = 1
trigger1 = Time != 0
value = 5030

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

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

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

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

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

[State 5001, 2]
type = VelSet
trigger1 = HitOver = 1
x = 0

[State 5001, 3]
type = DefenceMulSet
trigger1 = HitOver = 1
value = 1

[State 5001, 4]
type = ChangeState
trigger1 = HitOver = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 5010, 1]
type = ChangeState
trigger1 = HitShakeOver = 1
trigger1 = HitVel Y = 0
trigger1 = Time != 0
value = 5011 ;HITC_SLIDE

[State 5010, 2]
type = ChangeState
trigger1 = HitShakeOver = 1
trigger1 = Time != 0
value = 5030

[State 5010, 3]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, 4]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, 5]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= H
physics = C

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

[State 5011, 2]
type = VelSet
trigger1 = HitOver = 1
x = 0

[State 5011, 3]
type = DefenceMulSet
trigger1 = HitOver = 1
value = 1

[State 5011, 4]
type = ChangeState
trigger1 = HitOver = 1
value = 11
ctrl = 1


;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, 1]
type = ChangeState
trigger1 = HitShakeOver = 1
trigger1 = Time != 0 ; Program will handle if time is 0
value = 5030

[State 5020, 2]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

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

[State 5020, 4]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = 5060
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

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

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = Time >= 0
y = .35

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

[State 5030, 3]
type = ChangeState
triggerall = HitFall = 0
trigger1 = HitOver = 1
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall = 1
trigger1 = HitOver = 1
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

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

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N
anim = 5035

[State 5035, 1]
type = VelAdd;Gravity
trigger1 = Time >= 0
y = 0

[State 5035, 2]
type = ChangeState
triggerall = HitFall = 0
trigger1 = HitOver = 1  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 3]
type = ChangeState
triggerall = HitFall = 1
trigger1 = HitOver = 1  ;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 = 5050 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = Alive = 0
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver = 1
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver = 1
movetype = I

[State 5040, 5]
type = VelAdd;Gravity
trigger1 = Time >= 0
y = 0

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

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

[State 5050, 1] ;Change anim when done with last
type = ChangeAnim
triggerall = anim != 5060 ;Not if in hit up anim
trigger1 = AnimTime = 0
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
value = 5050

[State 5050, 2] ;Coming down anim (normal fall type)
type = ChangeAnim
triggerall = anim != 5060 ;Not if in hit up anim
trigger1 = Vel Y >= 1
trigger1 = animexist(5051)
value = 5051
persistent = 0

[State 5050, 2] ;Coming down anim (hit up type)
type = ChangeAnim
triggerall = anim = 5060 ;Not if in hit up anim
trigger1 = Vel Y >= -2
trigger1 = animexist(5061)
value = 5061
persistent = 0

[State 5050, 3]
type = VelAdd;Gravity
trigger1 = Time >= 0
y = 0

[State 5050, 4] ; Recover near ground
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive = 1
triggerall = CanRecover = 1
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5] ; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1
triggerall = Vel Y < 40 ;4
triggerall = alive = 1
triggerall = CanRecover = 1
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 25
value = 5100 ;HIT_BOUNCE

[State 5050, 6] ;If in hit up animation
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= 0
trigger1 = anim = 5060
trigger2 = anim = 5061
value = 5100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HITA_UP (shaking)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1]
type = ChangeAnim
trigger1 = HitFall = 0
value = 5050

[State 5050, 2]
type = ChangeAnim
trigger1 = HitFall = 1
value = 5051

[State 5050, 3]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 5050, 4]
type = ChangeState
trigger1 = HitShakeOver = 1
trigger1 = HitFall = 0
value = 5052 ;HITA_UP2

[State 5050, 5]
type = ChangeState
trigger1 = HitShakeOver = 1
trigger1 = HitFall = 1
value = 5040 ;HIT_FALL


;---------------------------------------------------------------------------
; HIT_TRIP (shaking)
[Statedef 5070]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5070, 1]
type = ChangeAnim 
trigger1 = Time >= 0 ;"Freeze" anim
value = 5070

[State 5070, 7]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 5071

[State 5070, 8]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

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

[State 5071, 2] ;Acceleration
type = VelAdd;Gravity
trigger1 = Time >= 0
y = 0

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5080, 1a] ;"Freeze"
type = ChangeAnim
triggerall = anim != 5081
trigger1 = anim = 5080
trigger2 = anim != 5111
trigger3 = !animexist(5081)
value = 5080

[State 5080, 1b]
type = ChangeAnim
triggerall = anim != 5080
trigger1 = anim = 5081
trigger2 = anim = 5111
trigger2 = animexist(5081)
value = 5081

[State 5080, 2]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 5081 ;HITL_SLIDE

;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 5081]
type    = L
movetype= H
physics = C

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

[State 5081, 2]
type = VelSet
trigger1 = HitOver = 1
x = 0

[State 5081, 3] ;Don't show hit ground frame
type = VarSet
trigger1 = Time = 0
v = 9
value = 1

[State 5081, 4]
type = ChangeState
trigger1 = HitOver = 1
value = 5110 ;HIT_LIEDOWN

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N
;anim = 5100

[State 5100, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != 5060
trigger1 = anim != 5061
trigger2 = !animexist(5101)
value = 5100

[State 5100, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = animexist(5101)
trigger1 = anim = 5060
trigger2 = anim = 5061
value = 5101

[State 5100, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 3] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0

[State 5100, 4]
type = GameMakeAnim
trigger1 = Time = 1
value = 15
pos = 0, 0
under = 1

[State 5100, 5]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 5]
type = PlaySnd
trigger1 = Time = 1
value = F7, 0 ;Hit ground

[State 5100, 6]
type = PosFreeze
trigger1 = Time >= 0

[State 5100, 7]
type = ChangeState
trigger1 = Time = 3
value = 5101

[State 5100, 8]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
;ampl = 255,-3,-.2,.005
time = 20

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

[State 5101, 0]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5101, 3] ;Acceleration
type = VelAdd
trigger1 = Time >= 0
y = 0

[State 5101, 4] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N
;anim = 5105

[State 5110, 5] ;For hit up type (from state 5081)
type = ChangeAnim
persistent = 0
triggerall = animexist(5111)
trigger1 = anim = 5081
value = 5111

[State 5110, 1] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != 5110
triggerall = anim != 5111
trigger1 = anim != 5101
trigger2 = !animexist(5106)
value = 5105

[State 5110, 2] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != 5110
triggerall = anim != 5111
trigger1 = animexist(5106)
trigger1 = anim = 5101
value = 5106

[State 5110, 0]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 3]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Var(9) = 0
value = F7, 0 ;Hit ground

[State 5110, 4]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = Var(9) = 0
value = 15
pos = 0, 0
under = 1

[State 5110, 5] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = animexist(5111)
triggerall = anim = 5106
trigger1 = AnimTime = 0
trigger2 = Var(9) = 1 ;Var9 = 1 avoids hit ground anim
value = 5111

[State 5110, 5] ;For normal
;type = ChangeAnim
;trigger1 = AnimTime = 0
;trigger2 = Var(9) = 1 ;Var9 = 1 avoids hit ground frame
;value = 5110
type = ChangeAnim
persistent = 0
triggerall = Anim != 5111
trigger1 = AnimTime = 0
trigger2 = Var(9) = 1 ;Var9 = 1 avoids hit ground frame
value = 5110

[State 5110, 5] ;If just died
type = ChangeState
triggerall = alive = 0
trigger1 = AnimTime = 0
trigger2 = Var(9) = 1 ;Var9 = 1 avoids hit ground frame
trigger3 = Anim = 5110
trigger4 = Anim = 5111
value = 5150

[State 5110, 6]
type = VarSet
trigger1 = Var(9) = 1
trigger1 = Time = 0
v = 9
value = 0

[State 5110, 7] ;Friction
type = VelMul
trigger1 = Time >= 0
x = 0

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

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

;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != 5111
trigger2 = !animexist(5121)
value = 5120

[State 5120, 1b] ;Get up anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = 5111
trigger1 = animexist(5121)
value = 5121

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

[State 5120, 3]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 5120, 4]
type = CtrlSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 6] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State 5120, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
trigger1 = Anim != 5111
trigger1 = Anim != 5106
trigger2 = !animexist(5151)
value = 5150

[State 5150, 1] ;Hit up type anim
type = ChangeAnim
triggerall = Time = 0
trigger1 = Anim = 5111
trigger1 = animexist(5151)
trigger2 = Anim = 5106
trigger2 = animexist(5151)
value = 5151

[State 5150, 1] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != 5151
trigger1 = Anim != 5150
value = 5110

[State 5150, 2]
type = SprPriority
trigger1 = Time = 0
value = -3

[State 5150, 3] ;Friction
type = VelMul
trigger1 = Time >= 0
x = 0

[State 5150, 3] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 4]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
[Statedef 5200]
type    = A
movetype= H
physics = N

[State 5200, 1] ;Change anim if done with transition
type = ChangeAnim
trigger1 = Anim = 5035
trigger1 = AnimTime = 0
value = 5050

[State 5200, 2]
type = VelAdd;Gravity
trigger1 = Time >= 0
y = 0

[State 5200, 3]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = 5201

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = A
movetype= H
physics = A
anim = 5200

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

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

[State 5201, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5201, 4]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 5201, 5] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5201, 6]
type = GameMakeAnim
trigger1 = Time = 1
value = 15
pos = 0, 0
under = 1

;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
x = 0
y = 0

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
y = 0

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
trigger1 = Vel Y > 0
y = 0

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -3
y = 0

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -2
y = 0

[State 5210, 2] ;Go up
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdup"
y = 0

[State 5210, 2] ;Go down
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holddown"
y = 0

[State 5210, 2] ;Go fwd
type = VelMul
trigger1 = Time = 4
trigger1 = Command = "holdfwd"
x = 0

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 0

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = 0

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1

;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N

[State 150, 1]
type = ChangeAnim
trigger1 = Time >= 0
value = 150

[State 150, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 150, 3]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 151

[State 150, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S

[State 151, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 150

[State 151, 2]
type = HitVelSet
trigger1 = Time = 0
x = 0

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N

[State 152, 1]
type = ChangeAnim
trigger1 = Time >= 0
value = 151

[State 152, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 153

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C

[State 153, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 151

[State 153, 2]
type = HitVelSet
trigger1 = Time = 0
x = 0

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N

[State 154, 1]
type = ChangeAnim
trigger1 = Time >= 0
value = 152

[State 154, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 154, 3]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 155 ;AGUARDHIT2

[State 154, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N

[State 155, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 152

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

;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]
type = S
ctrl = 0
anim = 5500
velset = 0,0

[State 5500, 1]
type = ChangeAnim
trigger1 = time = 0
trigger1 = !animexist(5500)
trigger1 = animexist(5300)
value = 5300
