; Neo Sonic's CMD file without defined AI.

;-| HYPERS |--------------------------------------------------------
;Atomic Shield
[Command]
name = "Atomic_Shield"
command = ~D, DB, B, a+b+c

;Final Force
[Command]
name = "FForce"
command = ~30$B, F, x+y+z
time = 15

;Mega Spin Thunder Attack
[Command]
name = "Megaspin"
command = ~D, DF, F, a+b+c
time = 20

;Spin Dash
[Command]
name = "SpinDash"
command = ~D, DF, F, x+y+z
time = 30

;-| SPECIALS |------------------------------------------------------
[Command]
name = "Thunder_Uppx"
command =~F, D, DF, F, x

[Command]
name = "Thunder_Uppy"
command =~F, D, DF, F, y

[Command]
name = "Thunder_Uppz"
command =~F, D, DF, F, z

[Command]
name = "Thunder_Ballx"
command = ~D, DF, F, x

[Command]
name = "Thunder_Bally"
command = ~D, DF, F, y

[Command]
name = "Thunder_Ballz"
command = ~D, DF, F, z

[Command]
name = "Summon_Miles"
command = ~D, DB, B, a

[Command]
name = "Summon_Knuckles"
command = ~D, DB, B, b

[Command]
name = "Summon_Amy"
command = ~D, DB, B, c

[Command]
name = "SpinThunder_c"
command = ~D, DF, F, c
time = 7

[Command]
name = "SpinThunder_a"
command = ~D, DF, F, a

[Command]
name = "SpinThunder_b"
command = ~D, DF, F, b

[Command]
name = "FF"
command = F, F
time = 10

[Command]
name = "BB"
command = B, B
time = 10

[Command]
name = "recovery"
command = a+b
time = 1

[Command]
name = "ab"
command = a+b
time = 1

[Command]
name = "fwd_a"
command = /F,a
time = 1

[Command]
name = "fwd_b"
command = /F,b
time = 1

[Command]
name = "fwd_c"
command = /F,c
time = 1

[Command]
name = "downfwd_a"
command = /DF,a
time = 1

[Command]
name = "downfwd_b"
command = /DF,b
time = 1

[Command]
name = "back_a"
command = /B,a
time = 1

[Command]
name = "back_b"
command = /B,b
time = 1

[Command]
name = "back_c"
command = /B,c
time = 1

[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

[Command]
name = "down_c"
command = /$D,c
time = 1

[Command]
name = "fwd_ab"
command = /F, a+b
time = 1

[Command]
name = "back_ab"
command = /B, a+b
time = 1

[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1

;-| Double Button |---------------------------------------------------------

[Command]
name = "down_up"
command = $D, $U

;-| Triple Button |---------------------------------------------------------

[Command]
name = "3kicks"
command = a+b+c
time = 1

[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup";Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

[Command]
name = "hold_yb"
command = /y+b
time = 30

[Command]
name = "hold_yb"
command = /x+a
time = 30

[Command]
name = "hold_a"
command = /a
time = 1

[Command]
name = "hold_b"
command = /b
time = 30

[Command]
name = "hold_c"
command = /c
time = 1

[Command]
name = "hold_x"
command = /x
time = 1

[Command]
name = "hold_y"
command = /y
time = 30

[Command]
name = "hold_z"
command = /z
time = 1

[Statedef -1]

;Spin Dash
[State -1]
type = ChangeState
value = 3400
triggerall = command = "SpinDash"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact = 1

;Atomic Shield
[State -1]
type = ChangeState
value = 3100
triggerall = command = "Atomic_Shield"
triggerall = power >= 3000
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = numhelper(3101) = 0
;trigger2 = statetype != A
;trigger2 = hitdefattr = SC, NA, SA
;trigger2 = movecontact = 1

;Final Force
[State -1]
type= changestate
value= 3800
triggerall=command="FForce"
triggerall= power >= 2000
trigger1 = ctrl = 1
trigger1 = statetype = S
trigger2 = movecontact =1
trigger2 = statetype !=A
trigger2 = stateno <= 3000

;Mega Spin Thunder Attack 
[State -1]
type = ChangeState
value = 2040
triggerall = command = "Megaspin"
triggerall = power >= 1000 ;Level 1
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200        ;stand_a
trigger3 = statetype != A
trigger3 = hitdefattr = SC, NA, SA
trigger3 = movecontact = 1
trigger4 = stateno = 101

;Weak Thunder Uppercut
[State -1]
type = ChangeState
value = 1100
triggerall = command = "Thunder_Uppx"
trigger1 = statetype != A
trigger1 = ctrl = 1

;Medium Thunder Uppercut
[State -1]
type = ChangeState
value = 1101
triggerall = command = "Thunder_Uppy"
trigger1 = statetype != A
trigger1 = ctrl = 1

;Strong Thunder Uppercut
[State -1]
type = ChangeState
value = 1102
triggerall = command = "Thunder_Uppz"
trigger1 = statetype != A
trigger1 = ctrl = 1

;Weak Thunder Ball
[State -1]
type = ChangeState
value = 1000
triggerall = command = "Thunder_Ballx"
triggerall = numproj = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 210) && movecontact
trigger4 = (stateno = 220) && movecontact
trigger5 = (stateno = 221) && movecontact
trigger6 = (stateno = 230) && movecontact
trigger7 = (stateno = 240) && movecontact
trigger8 = (stateno = 241) && movecontact
trigger8 = Pos Y >= 0
trigger9 = (stateno = 250) && movecontact
trigger10 = (stateno = 251) && movecontact
trigger11 = (stateno = 231) && movecontact
trigger12 = (stateno = 211) && movecontact

;Medium Thunder Ball
[State -1]
type = ChangeState
value = 1001
triggerall = command = "Thunder_Bally"
triggerall = numproj = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 210) && movecontact
trigger4 = (stateno = 220) && movecontact
trigger5 = (stateno = 221) && movecontact
trigger6 = (stateno = 230) && movecontact
trigger7 = (stateno = 240) && movecontact
trigger8 = (stateno = 241) && movecontact
trigger8 = Pos Y >= 0
trigger9 = (stateno = 250) && movecontact
trigger10 = (stateno = 251) && movecontact
trigger11 = (stateno = 231) && movecontact
trigger12 = (stateno = 211) && movecontact

;Strong Thunder Ball
[State -1]
type = ChangeState
value = 1002
triggerall = command = "Thunder_Ballz"
triggerall = numproj = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 210) && movecontact
trigger4 = (stateno = 220) && movecontact
trigger5 = (stateno = 221) && movecontact
trigger6 = (stateno = 230) && movecontact
trigger7 = (stateno = 240) && movecontact
trigger8 = (stateno = 241) && movecontact
trigger8 = Pos Y >= 0
trigger9 = (stateno = 250) && movecontact
trigger10 = (stateno = 251) && movecontact
trigger11 = (stateno = 231) && movecontact
trigger12 = (stateno = 211) && movecontact

;Air Weak Thunder Ball
[State -1]
type = changestate
value = 1003
triggerall = command = "Thunder_Ballx"
triggerall = numproj = 0
trigger1 = statetype = A
trigger1 = ctrl = 1

;Air Medium Thunder Ball
[State -1]
type = changestate
value = 1004
triggerall = command = "Thunder_Bally"
triggerall = numproj = 0
trigger1 = statetype = A
trigger1 = ctrl = 1

;Air Strong Thunder Ball
[State -1]
type = changestate
value = 1005
triggerall = command = "Thunder_Ballz"
triggerall = numproj = 0
trigger1 = statetype = A
trigger1 = ctrl = 1

;Summon Amy Rose
[State -1]
type = ChangeState
value = 1202
triggerall = command = "Summon_Amy"
triggerall = power >= 1000
trigger1 = numhelper(1230) = 0
trigger1 = numhelper(1210) = 0
trigger1 = statetype != A
trigger1 = ctrl = 1

;Summon Knuckles
[State -1]
type = ChangeState
value = 1201
triggerall = command = "Summon_Knuckles"
trigger1 = numhelper(1230) = 0
trigger1 = numhelper(1220) = 0
trigger1 = statetype != A
trigger1 = ctrl = 1

;Summon "Tails"
[State -1]
type = ChangeState
value = 1200
triggerall = command = "Summon_Miles"
trigger1 = numhelper(1210) = 0
trigger1 = numhelper(1220) = 0
trigger1 = statetype != A
trigger1 = ctrl = 1

;Spin Thunder Attack
[State -1]
type = ChangeState
value = 1055
triggerall = (command = "SpinThunder_a") || (command = "SpinThunder_b") || (command = "SpinThunder_c") 
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 200        ;Stand_a
trigger3 = time >= 3
trigger4 = stateno = 400        ;Crouch_a
trigger4 = time >= 3
trigger5 = stateno = 310        ;Stand_fwd_b
trigger5 = movecontact = 1
trigger6 = stateno = 210        ;Stand_b
trigger6 = movecontact = 1
trigger7 = stateno = 101

;---------------------------------------------------------------------------
;Bouncing Attack
[State -1]
type = ChangeState
value = 1500
triggerall = (command = "SpinThunder_a") || (command = "SpinThunder_b") || (command = "SpinThunder_c") 
trigger1 = statetype = A
trigger1 = ctrl = 1

;RunFwd
[State -1]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl = 1

;RunBack
[State -1]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl = 1

; SuperJump 
[State -1]
type = ChangeState
value = 900
trigger1 = command = "down_up"
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = command = "3kicks"
trigger2 = statetype != A
trigger2 = ctrl = 1

;Stand_X
[State -1]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = time > 7

;Stand_Y
[State -1]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact = 1

;Stand_Z 
[State -1]
type = ChangeState
value = 220
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 210) && movecontact
trigger4 = (stateno = 230) && movecontact
trigger5 = (stateno = 240) && movecontact
trigger5 = Pos Y >= 0
trigger6 = (stateno = 250) && movecontact
trigger7 = (stateno = 420) && movecontact

;Stand_A
[State -1]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = time > 7

;Stand_B
[State -1]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 230
trigger2 = time > 7

;Stand_C
[State -1]
type = ChangeState
value = 250
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = (stateno = 230) && (movecontact)
trigger2 = (stateno = 240) && (movecontact)
trigger2 = time > 7

;Crouch_X
[State -1]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = (stateno = 410) && movecontact
trigger3 = (stateno = 440) && movecontact
trigger4 = (stateno = 450) && movecontact

;Crouch_Y
[State -1]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = (stateno = 400) && movecontact

;Crouch_Z
[State -1]
type = ChangeState
value = 420
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = (stateno = 400) && movecontact
trigger3 = (stateno = 410) && movecontact
trigger4 = (stateno = 430) && movecontact
trigger5 = (stateno = 440) && movecontact

;Crouch_A
[State -1]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1

;Crouch_B
[State -1]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 400 ;crouch_a
trigger2 = movecontact = 1
trigger3 = stateno = 500 ;crouch_fwd_a
trigger3 = movecontact = 1

;Crouch_C
[State -1]
type = ChangeState
value = 450
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = (stateno = 410) && movecontact
trigger3 = (stateno = 430) && movecontact
trigger4 = (stateno = 440) && movecontact
trigger5 = (stateno = 200) && movecontact

;Jump_X
[State -1]
type = ChangeState
value = 600
trigger1 = command = "x"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = command = "x";-------
trigger2 = stateno = 600 ;jump_a
trigger2 = movecontact = 1

;Jump_Y
[State -1]
type = ChangeState
value = 610
trigger1 = command = "y"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = command = "y";-------
trigger2 = stateno = 600 ;jump_a
trigger2 = movecontact = 1

;Jump_Z
[State -1]
type = ChangeState
value = 620
trigger1 = command = "z"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = command = "z";-------
trigger2 = (stateno = 600) && (movecontact);jump_a
trigger2 = (stateno = 610) && (movecontact)

;Jump_A
[State -1]
type = ChangeState
value = 630
trigger1 = command = "a"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = command = "a";-------
trigger2 = stateno = 600
trigger2 = statetime >= 6

;Jump_B
[State -1]
type = ChangeState
value = 640
trigger1 = command = "b"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = command = "b";-------
trigger2 = stateno = 610
trigger2 = movecontact = 1

;Jump_C
[State -1]
type = ChangeState
value = 650
trigger1 = command = "c"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = command = "c";-------
trigger2 = (stateno = 610) && (movecontact)
trigger2 = (stateno = 640) && (movecontact)

;Taunt
[State -1]
type = ChangeState
value = 194
triggerall = command = "start"
trigger1 = ctrl = 1
trigger1 = statetype = S