; The CMD file.
;
; Two parts: 1. Command definition and  2. State entry
; (state entry is after the commands def section)
;
; 1. Command definition
; ---------------------
; Note: The commands are CASE-SENSITIVE, and so are the command names.
; The eight directions are:
;   B, DB, D, DF, F, UF, U, UB     (all CAPS)
;   corresponding to back, down-back, down, downforward, etc.
; The six buttons are:
;   a, b, c, x, y, z               (all lower case)
;   In default key config, abc are are the bottom, and xyz are on the
;   top row. For 2 button characters, we recommend you use a and b.
;   For 6 button characters, use abc for kicks and xyz for punches.
;
; Each [Command] section defines a command that you can use for
; state entry, as well as in the CNS file.
; The command section should look like:
;
;   [Command]
;   name = some_name
;   command = the_command
;   time = time (optional -- defaults to 15 if omitted)
;
; - some_name
;   A name to give that command. You'll use this name to refer to
;   that command in the state entry, as well as the CNS. It is case-
;   sensitive (QCB_a is NOT the same as Qcb_a or QCB_A).
;
; - command
;   list of buttons or directions, separated by commas.
;   Directions and buttons can be preceded by special characters:
;   slash (/) - means the key must be held down
;          egs. command = /D       ;hold the down direction
;               command = /DB, a   ;hold down-back while you press a
;   tilde (~) - to detect key releases
;          egs. command = ~a       ;release the a button
;               command = ~D, F, a ;release down, press fwd, then a
;          If you want to detect "charge moves", you can specify
;          the time the key must be held down for (in game-ticks)
;          egs. command = ~30a     ;hold a for at least 30 ticks, then release
;   dollar ($) - Direction-only: detect as 4-way
;          egs. command = $D       ;will detect if D, DB or DF is held
;               command = $B       ;will detect if B, DB or UB is held
;   plus (+) - Buttons only: simultaneous press
;          egs. command = a+b      ;press a and b at the same time
;               command = x+y+z    ;press x, y and z at the same time
;   You can combine them:
;     eg. command = ~30$D, a+b     ;hold D, DB or DF for 30 ticks, release,
;                                  ;then press a and b together
;   It's recommended that for most "motion" commads, eg. quarter-circle-fwd,
;   you start off with a "release direction". This matches the way most
;   popular fighting games implement their command detection.
;
; - time (optional)
;   Time allowed to do the command, given in game-ticks. Defaults to 15
;   if omitted
;
; If you have two or more commands with the same name, all of them will
; work. You can use it to allow multiple motions for the same move.
;
; Some common commands examples are given below.
;
; [Command] ;Quarter circle forward + x
; name = "QCF_x"
; command = ~D, DF, F, x
;
; [Command] ;Half circle back + a
; name = "HCB_a"
; command = ~F, DF, D, DB, B, a
;
; [Command] ;Two quarter circles forward + y
; name = "2QCF_y"
; command = ~D, DF, F, D, DF, F, y
;
; [Command] ;Tap b rapidly
; name = "5b"
; command = b, b, b, b, b
; time = 30
;
; [Command] ;Charge back, then forward + z
; name = "charge_B_F_z"
; command = ~60$B, F, z
; time = 10
; 
; [Command] ;Charge down, then up + c
; name = "charge_D_U_c"
; command = ~60$D, U, c
; time = 10
; 

;-| Button Remapping |-----------------------------------------------------
; This section lets you remap the player's buttons (to easily change the
; button configuration). The format is:
;   old_button = new_button
; If new_button is left blank, the button cannot be pressed.

[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Super Motions |-------------------------------------------------------

[command]
name = "TK"
command = B,DB,D,DF,F,x+y
time = 40

[command]
name = "TK"
command = B,DB,D,DF,F,x+z
time = 40

[command]
name = "TK"
command = B,DB,D,DF,F,y+z
time = 40

[command]
name = "ZKHou"
command = B,DB,D,DF,F,a+b
time = 40

[command]
name = "ZKHou"
command = B,DB,D,DF,F,a+c
time = 40

[command]
name = "ZKHou"
command = B,DB,D,DF,F,b+c
time = 40

[command]
name = "Hou'ouKyaku"
command = D,DF,F,a+b
time = 30

[command]
name = "Hou'ouKyaku"
command = D,DF,F,b+c
time = 30

[command]
name = "Hou'ouKyaku"
command = D,DF,F,a+c
time = 30

[command]
name = "HitenEX"
command = D,DF,F,D,DF,F,a+b
time = 30

[command]
name = "HitenEX"
command = D,DF,F,D,DF,F,a+c
time = 30

[command]
name = "HitenEX"
command = D,DF,F,D,DF,F,b+c
time = 30

[command]
name = "Hiten"
command = F,D,DF,a+b
time = 30

[command]
name = "Hiten"
command = F,D,DF,b+c
time = 30

[command]
name = "Hiten"
command = F,D,DF,a+c
time = 30

[command]
name = "Tenbu"
command = D,DB,B,a+b
time = 30

[command]
name = "Tenbu"
command = D,DB,B,b+c
time = 30

[command]
name = "Tenbu"
command = D,DB,B,a+c
time = 30

;-| Special Motions |------------------------------------------------------
[Command]
name = "HishouWeak"
command = ~D, DF, F, a

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

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

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

[Command]
name = "HishouStrong"
command = ~D, DF, F, c

[Command]
name = "HishouStrong"
command = ~D, DF, F, ~c

[Command]
name = "HienZanWeak"
command = ~10$D, U, a
time = 25

[Command]
name = "HienZanWeak"
command = ~10$D, U+a
time = 25

[Command]
name = "HienZanMed"
command = ~10$D, U, b
time = 25

[Command]
name = "HienZanMed"
command = ~10$D, U+b
time = 25

[Command]
name = "HienZanStrong"
command = ~10$D, U, c
time = 25

[Command]
name = "HienZanStrong"
command = ~10$D, U+c
time = 25

[Command]
name = "RyuuseiWeak"
command = ~10$B, F, a

[Command]
name = "RyuuseiMed"
command = ~10$B, F, b

[Command]
name = "RyuuseiStrong"
command = ~10$B, F, c

[Command]
name = "Neri"
command = F+c

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

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

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

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

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

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

[Command]
name = "HakiKyakuWeak"
command = ~D, D, a
time = 15

[Command]
name = "HakiKyakuWeak"
command = ~D, D, ~a
time = 15

[Command]
name = "HakiKyakuMed"
command = ~D, D, b
time = 15

[Command]
name = "HakiKyakuMed"
command = ~D, D, ~b
time = 15

[Command]
name = "HakiKyakuStrong"
command = ~D, D, c
time = 15

[Command]
name = "HakiKyakuStrong"
command = ~D, D, ~c
time = 15

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

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

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

[Command]
name = "Tsuki"
command = ~D, DF, F, c

[Command]
name = "Tsuki"
command = ~D, DF, F, ~c

[Command]
name = "SanrenWeak"
command = ~D, DB, B, x

[Command]
name = "SanrenWeak"
command = ~D, DB, B, ~x

[Command]
name = "SanrenMed"
command = ~D, DB, B, y

[Command]
name = "SanrenMed"
command = ~D, DB, B, ~y

[Command]
name = "SanrenStrong"
command = ~D, DB, B, z

[Command]
name = "SanrenStrong"
command = ~D, DB, B, ~z

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery" ;Required (do not remove)
command = x+y
time = 1

[Command]
name = "recovery"
command = y+z
time = 1

[Command]
name = "recovery"
command = x+z
time = 1

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

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

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

[Command]
name = "dodge" ;Required (do not remove)
command = x+a
time = 1

[Command]
name = "2p"
command = x+y
time = 1

[Command]
name = "2p"
command = x+z
time = 1

[Command]
name = "2p"
command = z+y
time = 1

[Command]
name = "3p"
command = x+y+z
time = 1

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

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "back_x"
command = /$B,x
time = 1

[Command]
name = "back_y"
command = /$B,y
time = 1

[Command]
name = "back_z"
command = /$B,z
time = 1

[Command]
name = "down_x"
command = /$D,x
time = 1

[Command]
name = "down_y"
command = /$D,y
time = 1

[Command]
name = "down_z"
command = /$D,z
time = 1

[Command]
name = "fwd_x"
command = /$F,x
time = 1

[Command]
name = "fwd_y"
command = /$F,y
time = 1

[Command]
name = "fwd_z"
command = /$F,z
time = 1

[Command]
name = "up_x"
command = /$U,x
time = 1

[Command]
name = "up_y"
command = /$U,y
time = 1

[Command]
name = "up_z"
command = /$U,z
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_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 = "up_a"
command = /$U,a
time = 1

[Command]
name = "up_b"
command = /$U,b
time = 1

[Command]
name = "up_c"
command = /$U,c
time = 1

;-| Single Button |---------------------------------------------------------
[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 = "s"
command = s
time = 1

;-| Single Dir |------------------------------------------------------------
[Command]
name = "fwd" ;Required (do not remove)
command = $F
time = 1

[Command]
name = "downfwd"
command = $DF
time = 1

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

[Command]
name = "downback"
command = $DB
time = 1

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

[Command]
name = "upback"
command = $UB
time = 1

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

[Command]
name = "upfwd"
command = $UF
time = 1

;-| Hold Button |--------------------------------------------------------------
[Command]
name = "hold_x"
command = /x
time = 1

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

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

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

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

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

[Command]
name = "hold_s"
command = /s
time = 1

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

[Command]
name = "holddownfwd"
command = /$DF
time = 1

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

[Command]
name = "holddownback"
command = /$DB
time = 1

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

[Command]
name = "holdupback"
command = /$UB
time = 1

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

[Command]
name = "holdupfwd"
command = /$UF
time = 1

;-| Misc |------------------------------------------------------------------
[Command]
name = "superjump"
command = ~$D, $U
time = 8

;---------------------------------------------------------------------------
; 2. State entry
; --------------
; This is where you define what commands bring you to what states.
;
; Each state entry block looks like:
;   [State -1, Label]           ;Change Label to any name you want to use to
;                               ;identify the state with.
;   type = ChangeState          ;Don't change this
;   value = new_state_number
;   trigger1 = command = command_name
;   . . .  (any additional triggers)
;
; - new_state_number is the number of the state to change to
; - command_name is the name of the command (from the section above)
; - Useful triggers to know:
;   - statetype
;       S, C or A : current state-type of player (stand, crouch, air)
;   - ctrl
;       0 or 1 : 1 if player has control. Unless "interrupting" another
;                move, you'll want ctrl = 1
;   - stateno
;       number of state player is in - useful for "move interrupts"
;   - movecontact
;       0 or 1 : 1 if player's last attack touched the opponent
;                useful for "move interrupts"
;
; Note: The order of state entry is important.
;   State entry with a certain command must come before another state
;   entry with a command that is the subset of the first.  
;   For example, command "fwd_a" must be listed before "a", and
;   "fwd_ab" should come before both of the others.
;
; For reference on triggers, see CNS documentation.
;
; Just for your information (skip if you're not interested):
; This part is an extension of the CNS. "State -1" is a special state
; that is executed once every game-tick, regardless of what other state
; you are in.


; Don't remove the following line. It's required by the CMD standard.

[Statedef -1]

;---------------------------------------------------------------------------
;-|Super Moves|-----------------------------------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;Team Korea Super
[State -1, Team Korea Super]
type = ChangeState
value = 3100
triggerall = command = "TK"
triggerall = power >= 3000
trigger1 = statetype != A
trigger1 = ctrl
persistent = 0

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

;Ho-'oo Hiten Kyaku EX
[State -1, Ho-'oo Hiten Kyaku EX]
type = ChangeState
value = 3000
triggerall = command = "HitenEX"
triggerall = power >= 2000
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit
persistent = 0

;Ho-'oo Hiten Kyaku
[State -1, Ho-'oo Hiten Kyaku]
type = ChangeState
value = 3000
triggerall = command = "Hiten"
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit
persistent = 0

;---------------------------------------------------------------------------
;Hiden Hou'ou Kyaku
[State -1, Hiden Hou'ou Kyaku]
type = ChangeState
value = 3010
triggerall = command = "ZKHou"
triggerall = power >= 2000
triggerall = stateno != 3010
trigger1 = ctrl
trigger2 = (stateno = [200,650]) && movehit && time > 5
trigger3 = stateno = 3002 && movehit && time >= 20
trigger4 = stateno = 1010
trigger4 = anim = 1010
trigger4 = animelemtime(2) >= 0
trigger5 = anim = 1060 || anim = 1061 || anim = 1062
trigger5 = animelemtime(6) >= 0 && animtime < 0
trigger5 = movehit && hitshakeover
trigger6 = stateno = 1034 || stateno = 1035 || stateno = 1036
trigger6 = movehit && hitshakeover
trigger7 = stateno = 1080 && movehit && statetype = S
persistent = 0

;---------------------------------------------------------------------------
;Hou'ou Kyaku
[State -1, Hou'ou Kyaku]
type = ChangeState
value = 3002
triggerall = command = "Hou'ouKyaku"
triggerall = power >= 1000
triggerall = stateno != 3002
trigger1 = ctrl
trigger2 = (stateno = [200,650]) && movehit && time > 5
trigger3 = stateno = 3002 && movehit && time >= 20
trigger4 = stateno = 1010
trigger4 = anim = 1010
trigger4 = animelemtime(2) >= 0
trigger5 = anim = 1060 || anim = 1061 || anim = 1062
trigger5 = animelemtime(6) >= 0 && animtime < 0
trigger5 = movehit && hitshakeover
trigger6 = stateno = 1034 || stateno = 1035 || stateno = 1036
trigger6 = movehit && hitshakeover
trigger7 = stateno = 1080 && movehit && statetype = S
persistent = 0

;---------------------------------------------------------------------------
;Hou'ou Tenbu Kyaku
[State -1, Hou'ou Tenbu Kyaku]
type = ChangeState
value = 3003
triggerall = command = "Tenbu"
triggerall = power >= 1000
triggerall = stateno != 3002
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,650]) && movehit && time > 5
trigger3 = anim = 1060 || anim = 1061 || anim = 1062
trigger3 = animelemtime(6) >= 0 && animtime < 0
trigger3 = movehit && hitshakeover
trigger4 = stateno = 1034 || stateno = 1035 || stateno = 1036
trigger4 = movehit && hitshakeover


;---------------------------------------------------------------------------
;-|Special Moves|-----------------------------------------------------------
;---------------------------------------------------------------------------
;Tsuki Kyaku
[State -1, Tsuki Kyaku]
type = ChangeState
value = 1080
triggerall = command = "Tsuki"
triggerall = statetype != A
triggerall = stateno != 1080
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Hangetsu-Zan Weak
[State -1, Hangetsu-Zan Weak]
type = ChangeState
value = 1040
triggerall = command = "HangetsuWeak"
triggerall = statetype = S
triggerall = statetype != A
trigger1 = pos y = 0
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Hangetsu-Zan Medium
[State -1, Hangetsu-Zan Medium]
type = ChangeState
value = 1041
triggerall = command = "HangetsuMed"
triggerall = stateno != 12
triggerall = statetype != A
trigger1 = pos y = 0
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Hangetsu-Zan Strong
[State -1, Hangetsu-Zan Strong]
type = ChangeState
value = 1042
triggerall = command = "HangetsuStrong"
triggerall = stateno != 12
triggerall = statetype != A
trigger1 = pos y = 0
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Hishou Kyaku Weak
[State -1, Hishou Kyaku Weak]
type = ChangeState
value = 1030
triggerall = command = "HishouWeak"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 600 || stateno = 610 || stateno = 630 || stateno = 640) && movehit

;---------------------------------------------------------------------------
;Hishou Kyaku Medium
[State -1, Hishou Kyaku Medium]
type = ChangeState
value = 1031
triggerall = command = "HishouMed"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 600 || stateno = 610 || stateno = 630 || stateno = 640) && movehit

;---------------------------------------------------------------------------
;Hishou Kyaku Strong
[State -1, Hishou Kyaku Strong]
type = ChangeState
value = 1032
triggerall = command = "HishouStrong"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 600 || stateno = 610 || stateno = 630 || stateno = 640) && movehit

;---------------------------------------------------------------------------
;Ryuusei Raku Weak
[State -1, Ryuusei Raku Weak]
type = ChangeState
value = 1050
triggerall = command = "RyuuseiWeak"
triggerall = statetype = S
triggerall = prevstateno != [1050,1052]
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Ryuusei Raku Medium
[State -1, Ryuusei Raku Medium]
type = ChangeState
value = 1051
triggerall = command = "RyuuseiMed"
triggerall = statetype = S
triggerall = prevstateno != [1050,1052]
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Ryuusei Raku Strong
[State -1, Ryuusei Raku Strong]
type = ChangeState
value = 1052
triggerall = command = "RyuuseiStrong"
triggerall = statetype = S
triggerall = prevstateno != [1050,1052]
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Neri Chagi
[State -1, Neri Chagi]
type = ChangeState
value = 1000
triggerall = command = "holdfwd" && command = "c" || command = "Neri"
triggerall = command != "holddown"
triggerall = p2bodydist X > 5
trigger1 = var(1) = 0
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 1000 && var(1) >= 30
trigger3 = (stateno = [200,250]) && movehit

;---------------------------------------------------------------------------
;Haki Kyaku Weak
[State -1, Haki Kyaku Weak]
type = ChangeState
value = 1010
triggerall = command = "HakiKyakuWeak"
trigger1 = var(1) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 1010 && var(1) >= 20
trigger3 = stateno = 1011 && var(1) >= 35
trigger4 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Haki Kyaku Medium
[State -1, Haki Kyaku Medium]
type = ChangeState
value = 1011
triggerall = command = "HakiKyakuMed"
trigger1 = var(1) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 1010 && var(1) >= 20
trigger3 = stateno = 1011 && var(1) >= 35
trigger4 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Haki Kyaku Strong
[State -1, Haki Kyaku Strong]
type = ChangeState
value = 1012
triggerall = command = "HakiKyakuStrong"
trigger1 = var(1) = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 1010 && var(1) >= 20
trigger3 = stateno = 1011 && var(1) >= 35
trigger4 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Hien Zan Weak
[State -1, Hien Zan Weak]
type = ChangeState
value = 1020
triggerall = command = "HienZanWeak"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit
trigger3 = stateno = 50 && time <= 4

;---------------------------------------------------------------------------
;Hien Zan Medium
[State -1, Hien Zan Medium]
type = ChangeState
value = 1021
triggerall = command = "HienZanMed"
trigger1 = ctrl
trigger1 = statetype != A
trigger2 = (stateno = [200,450]) && movehit
trigger2 = statetype != A
trigger3 = stateno = 50 && time <= 4

;---------------------------------------------------------------------------
;Hien Zan Strong
[State -1, Hien Zan Strong]
type = ChangeState
value = 1022
triggerall = command = "HienZanStrong"
trigger1 = ctrl
trigger1 = statetype != A
trigger2 = (stateno = [200,450]) && movehit
trigger3 = stateno = 50 && time <= 4

;---------------------------------------------------------------------------
;Sanren Geki Weak
[State -1, Sanren Geki Weak]
type = ChangeState
value = 1070
triggerall = command = "SanrenWeak"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Sanren Geki Medium
[State -1, Sanren Geki Medium]
type = ChangeState
value = 1071
triggerall = command = "SanrenMed"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Sanren Geki Strong
[State -1, Sanren Geki Strong]
type = ChangeState
value = 1072
triggerall = command = "SanrenStrong"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,450]) && movehit

;---------------------------------------------------------------------------
;Kuusajin Weak
[State -1, Kuusajin Weak]
type = ChangeState
value = 1060
triggerall = command = "KuusajinWeak"
triggerall = stateno != [1060,1062]
trigger1 = ctrl
trigger2 = (stateno = [200,250]) || (stateno = [600,610]) || (stateno = [630,640])
trigger2 = stateno != 630 && stateno != 650
trigger2 = movehit

;---------------------------------------------------------------------------
;Kuusajin Medium
[State -1, Kuusajin Medium]
type = ChangeState
value = 1061
triggerall = command = "KuusajinMed"
triggerall = stateno != [1060,1062]
trigger1 = ctrl
trigger2 = (stateno = [200,250]) || (stateno = [600,610]) || (stateno = [630,640])
trigger2 = stateno != 630 && stateno != 650
trigger2 = movehit

;---------------------------------------------------------------------------
;Kuusajin Strong
[State -1, Kuusajin Strong]
type = ChangeState
value = 1062
triggerall = command = "KuusajinStrong"
triggerall = stateno != [1060,1062]
trigger1 = ctrl
trigger2 = (stateno = [200,250]) || (stateno = [600,610]) || (stateno = [630,640])
trigger2 = stateno != 630 && stateno != 650
trigger2 = movehit

;===========================================================================
;---------------------------------------------------------------------------
; Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF" || command = "2p"
trigger1 = stateno != 100
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Dodge
[State -1, Dodge]
type = ChangeState
value = 110
triggerall = command = "dodge"
triggerall = vel x <= 0
trigger1 = statetype != A
trigger1 = ctrl

; Roll
[State -1, Roll]
type = ChangeState
value = 115
trigger1 = command = "dodge" && command = "holdfwd"
trigger1 = statetype != A
trigger1 = ctrl

;Recovery - Roll
[State -1, Roll Var 1]
type = VarSet
trigger1 = Var(11) = 0 && MoveType = H && command = "holdback" && command = "recovery"
trigger2 = Var(11) = 0 && MoveType = H && command = "holdfwd" && command = "recovery"
v = 11
value = 1

;Recovery - Roll
[State -1, Roll Var 0]
type = VarSet
trigger1 = Var(11) = 1 && MoveType != H || Lose
v = 11
value = 0

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

;---------------------------------------------------------------------------
; Super Jump
[State -1, Super Jump]
type = ChangeState
value = 55
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjump" || command = "3k"
trigger2 = enemynear, vel y < 1
trigger2 = stateno = 420 && movehit && command = "holdup"

;---------------------------------------------------------------------------
;Guard Push
[State -1, Guard Push Stand]
type = ChangeState
value = 730
triggerall = command = "3k" || command = "3p"
triggerall = statetype = S
trigger1 = stateno = [150,151]
;---------------------------------------------------------------------------
;Guard Push
[State -1, Guard Push Crouch]
type = ChangeState
value = 731
triggerall = command = "3k" || command = "3p"
triggerall = statetype = C
trigger1 = stateno = [152,153]
;---------------------------------------------------------------------------
;Guard Push
[State -1, Guard Push Air]
type = ChangeState
value = 732
triggerall = command = "3k" || command = "3p"
triggerall = statetype = A
trigger1 = stateno = [154,155]

;---------------------------------------------------------------------------
; Overhead Throw
[State -1, Overhead Throw]
type = ChangeState
value = 800
triggerall = command = "y" || command = "z"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = p2movetype != H
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 10
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 10
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

;---------------------------------------------------------------------------
; Kick Throw
[State -1, Kick Throw]
type = ChangeState
value = 830
triggerall = command = "b" || command = "c"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = p2movetype != H
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 5
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H



;===========================================================================

;---------------------------------------------------------------------------
; Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "s"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && movehit
trigger3 = stateno = 230 && movehit
trigger4 = stateno = 235 && movehit
trigger5 = stateno = 430 && movehit

;---------------------------------------------------------------------------
; Stand Strong Punch - Close
[State -1, Stand Strong Punch - Close]
type = ChangeState
value = 220
triggerall = command = "z"
triggerall = command != "holddown"
triggerall = p2bodydist x < 10
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 210 && movehit
trigger3 = stateno = 230 && movehit
trigger4 = stateno = 240 && movehit

; Stand Strong Punch - Far
[State -1, Stand Strong Punch - Far]
type = ChangeState
value = 225
triggerall = command = "z"
triggerall = command != "holddown"
triggerall = p2bodydist x >= 10
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 210 && movehit
trigger3 = stateno = 230 && movehit
trigger4 = stateno = 240 && movehit

;---------------------------------------------------------------------------
; Stand Light Kick - Close
[State -1, Stand Light Kick - Close]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = p2bodydist x < 11
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && movehit

; Stand Light Kick - Far
[State -1, Stand Light Kick - Far]
type = ChangeState
value = 235
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = p2bodydist x >= 11
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && movehit

;---------------------------------------------------------------------------
; Standing Medium Kick
[State -1, Standing Medium Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 210 && movehit
trigger3 = stateno = 230 && movehit
trigger4 = stateno = 235 && movehit
trigger5 = stateno = 410 && movehit

;---------------------------------------------------------------------------
; Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
value = 250
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 240 && movehit

;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
; Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 230 && movehit
trigger3 = stateno = 400 && movehit
trigger4 = stateno = 430 && movehit

;---------------------------------------------------------------------------
; Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 420
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 400 && movehit
trigger3 = stateno = 410 && movehit
trigger4 = stateno = 430 && movehit
trigger5 = stateno = 440 && movehit

;---------------------------------------------------------------------------
; Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 200 && movehit
trigger3 = stateno = 400 && movehit

;---------------------------------------------------------------------------
; Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 210 && movehit
trigger3 = stateno = 430 && movehit
trigger4 = stateno = 410 && movehit

;---------------------------------------------------------------------------
; Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
value = 450
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 440 && movehit

;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 610
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movehit
trigger2 = time >= 6
trigger3 = stateno = 630 && movehit
trigger3 = time >= 6

;---------------------------------------------------------------------------
; Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 620
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 610 && movehit
trigger3 = stateno = 640 && movehit

;---------------------------------------------------------------------------
; Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movehit
trigger2 = time >= 4

;---------------------------------------------------------------------------
; Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movehit && p2statetype = A
trigger3 = stateno = 610 && movehit && p2statetype = A
trigger4 = stateno = 620 && movehit && p2statetype = A
trigger5 = stateno = 630 && movehit && p2statetype = A

;---------------------------------------------------------------------------
; Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
value = 650
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 610 && movehit && p2statetype = A
trigger3 = stateno = 640 && movehit && p2statetype = A

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