;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]


[State -2, State]
type = ChangeState
triggerall = StateNo != 100
triggerall = P2MoveType = H
triggerall = P2StateNo = 981
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 100

[State -2, ScreenBound]
type = ScreenBound
trigger1 = P2StateNo = 980
trigger2 = P2StateNo = 981
value = 0


[State -2, Remove Sonic]
type = RemoveExplod
trigger1 = StateNo != 221
trigger1 = StateNo != 222
trigger1 = StateNo != 1000
trigger1 = StateNo != 3010
id = 1010

[State -2, Remove Sonic]
type = RemoveExplod
trigger1 = StateNo != 3010
id = 1030

[State -2, Remove Flash 1]
type = RemoveExplod
trigger1 = StateNo != 1100
trigger1 = StateNo != 3100
trigger1 = StateNo != 3101
id = 1110

[State -2, Remove Flash 2]
type = RemoveExplod
trigger1 = StateNo != 1100
trigger1 = StateNo != 3100
trigger1 = StateNo != 3101
id = 1111

[State -2, Remove Flash 3]
type = RemoveExplod
trigger1 = StateNo != 1100
trigger1 = StateNo != 3100
trigger1 = StateNo != 3101
id = 1112

[State -2, Remove Flash 4]
type = RemoveExplod
trigger1 = StateNo != 1100
trigger1 = StateNo != 3100
trigger1 = StateNo != 3101
id = 1113

[State -2, Remove Flash 5]
type = RemoveExplod
trigger1 = StateNo != 1100
trigger1 = StateNo != 3100
trigger1 = StateNo != 3101
id = 1114

[State -2, Remove Flash 6]
type = RemoveExplod
trigger1 = StateNo != 1100
trigger1 = StateNo != 3100
trigger1 = StateNo != 3101
id = 1115



;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------
[State -3, Hit1]
type = PlaySnd
triggerall = random < 300
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [0,50]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 0
channel = 1
lowpriority = 1

[State -3, Hit2]
type = PlaySnd
triggerall = random < 300
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [50,100]
trigger1 = stateno = 5020
trigger2 = stateno = 5030
trigger3 = stateno = 5050
trigger4 = stateno = 5070
trigger5 = stateno = 5080
value = 5000, 1
channel = 1
lowpriority = 1
;-------------------

;This controller plays a sound everytime the player lands from a jump, or
;from a back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 101 ;Run-forward land
trigger3 = stateno = 106 ;Run-back land
trigger4 = stateno = 236 ;Knee Bazooka land
trigger5 = stateno = 1105 ;Somersault land
value = 0, 0
