[Command]
name = "CPU1"
command = D,F,U,B,F
time = 1


[Command]
name = "CPU2"
command = D, D, D, D, D, D
time = 1


[Command]
name = "CPU3"
command = F,F,F,F,F,F,F,F,F
time = 1


[Command]
name = "CPU4"
command = U,U,U,U,U,U,U,U,U,U,U
time = 1


[Command]
name = "CPU5"
command = B,B,B,B,B,B,B
time = 1


[Command]
name = "CPU6"
command = B,F,B,F,B,F,B,F
time = 1


[Command]
name = "CPU7"
command = D,U,D,U,D,U,D,U,D,U
time = 1


[Command]
name = "CPU8"
command = DF,DB,UF,D,D,D
time = 1


[Command]
name = "CPU9"
command = DB,DB,DB,UF,DB
time = 1


[Command]
name = "CPU10"
command = U,UF,F,DF,D,DB,B,UB
time = 1


[Command]
name = "CPU11"
command = D,D,U,U,D,D,F,F,B,F,B,B
time = 1


[Command]
name = "CPU12"
command = F,F,F,B,B,B,B,U,D,D,UF
time = 1


[Command]
name = "CPU13"
command = a,b,c,x,y,z
time = 1


[Command]
name = "CPU14"
command = x,y,U,D,b,c
time = 1


[Command]
name = "CPU15"
command = D,U,x,y.z.B.F
time = 1

[Command]
name = "LDM"
command = D,DF,F,D,DF,F,z
time = 25

[Command]
name = "DM1x"
command = D,DF,F,DF,D,DB,B,x
time = 30

[Command]
name = "DM1y"
command = D,DF,F,DF,D,DB,B,y
time = 30

[Command]
name = "DM2"
command = F,DF,D,DB,B,F,DF,D,DB,B,x
time = 40

[Command]
name = "DM2"
command = F,DF,D,DB,B,F,DF,D,DB,B,y
time = 40

[Command]
name = "DM2"
command = F,D,B,F,D,B,x
time = 40

[Command]
name = "DM2"
command = F,D,B,F,D,B,y
time = 40

[Command]
name = "SM1x"
command = F,D,DF,x
time = 20

[Command]
name = "SM1y"
command = F,D,DF,y
time = 20

[Command]
name = "SM2x"
command = D,DF,F,x
time = 15

[Command]
name = "SM2y"
command = D,DF,F,y
time = 15

[Command]
name = "SM3"
command = D,DB,B,a
time = 15

[Command]
name = "SM3"
command = D,DB,B,b
time = 15

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

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

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "CD"
command = y+b
time = 1

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

[Command]
name = "rolamento"
command = x+a;/F, x+a
time = 1

[Command]
name = "rolamentoTras"
command = /B, x+a
time = 1



[Command]
name = "rolamento2"
command = x+a
time = 20
;-| Dir + Button |---------------------------------------------------------
[Command]
name = "fwd_a"
command = /$F,a
time = 1

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

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


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


[Command]
name = "DU"
command = D, $U
time = 11

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "Hold_a"
command = /$a

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

[Command]
name = "Hold_b"
command = /$b

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

[Command]
name = "Hold_c"
command = /$c

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

[Command]
name = "Hold_x"
command = /$x

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

[Command]
name = "Hold_y"
command = /$y

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

[Command]
name = "Hold_z"
command = /$z

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

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd"
command = /$F
time = 1


[Command]
name = "holdback"
command = /$B
time = 1


[Command]
name = "holdup"
command = /$U
time = 1


[Command]
name = "holddown"
command = /$D
time = 1

[Command]
name = "longjump"
command = D, $U
time = 12

;---------------------------------------------------------------------------
; 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]

;===========================================================================
;---------------------------------------------------------------------------
;Run Fwd
;ダッシュ
[State -1, AI]
type = Null;VarSet
value = 1
trigger1 = command = "CPU1" 
trigger2 = command = "CPU2" 
trigger3 = command = "CPU3" 
trigger4 = command = "CPU4" 
trigger5 = command = "CPU5" 
trigger6 = command = "CPU6" 
trigger7 = command = "CPU7" 
trigger8 = command = "CPU8" 
trigger9 = command = "CPU9" 
trigger10 = command = "CPU10" 
trigger11 = command = "CPU11" 
trigger12 = command = "CPU12" 
trigger13 = command = "CPU13" 
trigger14 = command = "CPU14" 
trigger15 = command = "CPU15" 
v = 20

[State -1, reset pulo]
type=Varset
trigger1=var(3)
trigger1=Stateno!=[40,50]
trigger1=Movetype!=A
var(3)=0

[State -1, Combo1]
type = Varset
trigger1 = ctrl
var(39) = 0

[State -1, Combo1]
type = Varset
trigger1 = ctrl
trigger2 = Stateno = 261
var(38) = 0

[State -1, Combo1]
type = Varset
trigger1 = ctrl
var(37) = 0

[State -1, Combo1]
type = Varset
trigger1 = stateno = 200 && animelemtime(3) > 1 && animelemtime(4) < 1
trigger2 = stateno = 205 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger3 = stateno = 230 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger4 = stateno = 210 && animelemtime(2) > 1 && animelemtime(3) < 1
trigger5 = stateno = 210 && animelemtime(6) > 1 && animelemtime(7) < 1
trigger6 = stateno = 240 && animelemtime(5) > 1 && animelemtime(6) < 1
trigger7 = stateno = 300 && animelemtime(3) > 1 && animelemtime(4) < 1
trigger9 = stateno = 310 && animelemtime(5) > 1 && animelemtime(8) < 1
trigger10 = stateno = 340 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger11 = stateno = 275 && animelemtime(3) > 1 && animelemtime(4) < 1
trigger12 = stateno = 261 && animelemtime(4) > 1 && animelemtime(5) < 1
ignorehitpause = 1
var(39) = 1

[State -1, Combo2]
type = Varset
trigger1 = stateno = 200 && animelemtime(3) > 1 && animelemtime(4) < 1
trigger2 = stateno = 205 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger3 = stateno = 230 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger4 = stateno = 210 && animelemtime(2) > 1 && animelemtime(3) < 1
trigger5 = stateno = 210 && animelemtime(6) > 1 && animelemtime(7) < 1
trigger6 = stateno = 240 && animelemtime(5) > 1 && animelemtime(6) < 1
trigger7 = stateno = 300 && animelemtime(3) > 1 && animelemtime(4) < 1
trigger9 = stateno = 310 && animelemtime(5) > 1 && animelemtime(8) < 1
trigger10 = stateno = 340 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger11 = stateno = 275 && AnimTime = [10,13];animelemtime(3)
ignorehitpause = 1
var(38) = 1

[State -1, Combo3]
type = Varset
trigger1 = stateno = 200 && animelemtime(3) > 1 && animelemtime(4) < 1
trigger2 = stateno = 205 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger3 = stateno = 230 && animelemtime(4) > 1 && animelemtime(5) < 1
trigger4 = stateno = 210 && animelemtime(2) > 1 && animelemtime(3) < 1
trigger5 = stateno = 210 && animelemtime(6) > 1 && animelemtime(7) < 1
trigger6 = stateno = 240 && animelemtime(5) > 1 && animelemtime(6) < 1
trigger7 = stateno = 300 && animelemtime(3) > 1 && animelemtime(4) < 1
trigger9 = stateno = 310 && animelemtime(5) > 1 && animelemtime(8) < 1
trigger10 = stateno = 340 && animelemtime(4) > 1 && animelemtime(5) < 1
ignorehitpause = 1
var(37) = 1

[State -1, LDM]
type = ChangeState
value = 3600
triggerall = power >= 2000
triggerall = command = "LDM"
triggerall = statetype = S
trigger1 = stateno = 3003 && time = [12,23]
trigger2 = stateno = 3110 && time = [20,50]

[State -1, LDM]
type = ChangeState
value = 3500
triggerall = power >= 2000
triggerall = command = "LDM"
triggerall = statetype != A
triggerall = stateno != [3000,3500]
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, DM2]
type = ChangeState
value = 3100
triggerall = power >= 1000
triggerall = command = "DM2"
triggerall = statetype != A
triggerall = stateno != [3000,3499]
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, DM1x]
type = ChangeState
value = 3000
triggerall = power >= 1000
triggerall = command = "DM1x"
triggerall = statetype != A
triggerall = stateno != [3000,3499]
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, DM1y]
type = ChangeState
value = 3050
triggerall = power >= 1000
triggerall = command = "DM1y"
triggerall = statetype != A
triggerall = stateno != [3000,3499]
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]


[State -1, SM1x]
type = ChangeState
value = 1000
triggerall = command = "SM1x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, SM1y]
type = ChangeState
value = 1010
triggerall = command = "SM1y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, SM2x]
type = ChangeState
value = 1100
triggerall = command = "SM2x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, SM2x]
type = ChangeState
value = 1110
triggerall = command = "SM2y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, SM3]
type = ChangeState
value = 1200
triggerall = command = "SM3"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = var(39) = 1
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl


;---------------------------------------------------------------------------
;Run Back
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl


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

;;Kung Fu Throw
[State -1, Kung Fu Throw]
type = ChangeState
value = 850
triggerall = command = "b"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 3
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
;==========================================================================
;---------------------------------------------------------------------------
------------------------------------------------------------------------------
[State -1, esquivatras]
type = ChangeState
value = 701
triggerall = command = "rolamentoTras"
triggerall = stateno != [200,5000]
trigger1 = statetype != A
trigger1 = ctrl

[State -1, esquivatras]
type = ChangeState
value = 751
triggerall = command = "rolamentoTras"
triggerall = power >= 1000
triggerall = statetype != A
;triggerall != Ctrl
trigger1 = stateno = 130
trigger2 = stateno = 131
trigger3 = stateno = 140
trigger4 = stateno = 141
trigger5 = stateno = 150
trigger6 = stateno = 151

[State -1, esquiva]
type = ChangeState
value = 750
triggerall = command = "rolamento"
triggerall = power >= 1000
triggerall = statetype != A
;triggerall != Ctrl
trigger1 = stateno = 130
trigger2 = stateno = 131
trigger3 = stateno = 140
trigger4 = stateno = 141
trigger5 = stateno = 150
trigger6 = stateno = 151

[State -1, esquivahit]
type = ChangeState
value = 730
triggerall = command = "rolamento"
triggerall = power >= 1000
triggerall = statetype != A
triggerall = movecontact
trigger1 = stateno = [200,440]
;-------------------------------------------------------------


[State -1, CD]
type = ChangeState
value = 251
triggerall = command = "z"; && command = "holdback"
triggerall = power >= 1000
triggerall = statetype != A
;triggerall != Ctrl
trigger1 = stateno = 130
trigger2 = stateno = 131
trigger3 = stateno = 140
trigger4 = stateno = 141
trigger5 = stateno = 150
trigger6 = stateno = 151

[State -1, esquiva]
type = ChangeState
value = 700
triggerall = command = "rolamento"
triggerall = stateno != [200,5000]
trigger1 = statetype != A
trigger1 = ctrl

[State -1, CD]
type = ChangeState
value = 250
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

[State -1, CD]
type = ChangeState
value = 650
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = A
trigger1 = ctrl

;Stand Light Punch
;立ち弱パンチ

[State -1, Stand Light Punch]
type = ChangeState
value = 275
triggerall = command = "fwd_a"
triggerall = statetype != A
triggerall = stateno != 275
triggerall = stateno != 261
trigger1 = var(37) = 1
trigger2 = anim = 300 && time = [5,8]
trigger3 = anim = 310 && time = [9,18]
trigger4 = anim = 250 && time = [1,24]

;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 270
triggerall = command = "fwd_a"
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Stand Light Punch]
type = ChangeState
value = 261
triggerall = command = "fwd_x"
triggerall = statetype != A
triggerall = movecontact
trigger1 = var(38) = 1
trigger2 = anim = 300 && time = [5,8]
trigger3 = anim = 275 && time = [9,15]
trigger4 = anim = 310 && time = [9,18]
trigger5 = anim = 250 && time = [1,24]

;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 260
triggerall = command = "fwd_x"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = P2bodydist X <= 8
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = Stateno = 200 && AnimElemtime(3) <= 4

[State -1, Stand Light Punch]
type = ChangeState
value = 205
triggerall = P2bodydist X >8
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = Stateno = 200 && AnimElemtime(3) <= 4

;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = P2BodyDist X <= 23
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl



[State -1, soco forte longe]
type = ChangeState
value = 215
triggerall = command = "y"
triggerall = P2BodyDist X > 23
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl


;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 235
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = P2BodyDist X > 23
trigger1 = statetype = S
trigger1 = ctrl


;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = P2BodyDist X <= 23
trigger1 = statetype = S
trigger1 = ctrl
;---------------------------------------------------------------------------
;Standing Strong Kick
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = P2BodyDist X <= 23
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Standing Strong Kick]
type = ChangeState
value = 245
triggerall = command = "b"
triggerall = P2BodyDist X > 23
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

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


;---------------------------------------------------------------------------
;Crouching Light Punch
;しゃがみ弱パンチ
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 430 && Time = [4,11]


;---------------------------------------------------------------------------
;Crouching Strong Punch
;しゃがみ強パンチ
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl


;---------------------------------------------------------------------------
;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 = 430 && Time = [6,12]


;---------------------------------------------------------------------------
;Crouching Strong Kick
;しゃがみ強キック
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl


;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl


;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = vel x <= 0
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl

[State -1, Jump Strong Punch]
type = ChangeState
value = 615
triggerall = vel x > 0
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl


;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl


;---------------------------------------------------------------------------
;Jump Strong Kick
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl


