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

;-| Default Values |-------------------------------------------------------
[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.
command.time = 30

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.
command.buffer.time = 1


;-| AI activativators |--------------------------------------------------------

[Command]
name = "AI-000"
command = ~F,a,~D,y,~U,c+x,D,b+y,F,z,z,z+a
time = 1

[Command]
name = "AI-001"
command = ~F,c,~D,y,~U,c+a,D,b+x,B,z,z,z+b
time = 1

[Command]
name = "AI-002"
command = ~F,y,~D,y,~U,c+y,D,b+z,F,z,z,z+c
time = 1

[Command]
name = "AI-003"
command = ~F,b,~D,y,~U,c+b,D,b+a,B,z,z,z+x
time = 1

[Command]
name = "AI-004"
command = ~F,x,~D,x,~U,c+x,D,b+y,F,z,z,z+y
time = 1

[Command]
name = "AI-005"
command = ~F,z,~D,y,~U,c+a,D,b+c,B,z,z,z+a
time = 1

[Command]
name = "AI-006"
command = ~D,U,x+y+z,~F,F,b,c,y,B,~B,a+b+c,U
time = 1

[Command]
name = "AI-007"
command = ~U,D,x+b+z,~F,F,b,b,x,B,~B,a+y+c,F
time = 1

[Command]
name = "AI-008"
command = ~D,U,a+y+c,~F,F,b,a,z,B,~B,x+b+z,D
time = 1

[Command]
name = "AI-009"
command = ~U,D,x+b+c,~F,F,b,c,x,B,~B,a+y+z,B
time = 1

[Command]
name = "AI-010"
command = ~x,~y,~z,~a,~b,~c,~s,a+b+c,x+y+z,~F,B
time = 1

[Command]
name = "AI-011"
command = F,D,F
time = 0

[Command]
name = "AI-012"
command = B,F,B
time = 0

[Command]
name = "AI-013"
command = U,B,U
time = 0

[Command]
name = "AI-014"
command = D,U,D
time = 0

[Command]
name = "AI-015"
command = a,s,a
time = 0

[Command]
name = "AI-016"
command = b,a,b
time = 0

[Command]
name = "AI-017"
command = c,b,c
time = 0

[Command]
name = "AI-018"
command = x,c,x
time = 0

[Command]
name = "AI-019"
command = y,x,y
time = 0

[Command]
name = "AI-020"
command = z,y,z
time = 0

[Command]
name = "AI-021"
command = a,b,x,c
time = 0

[Command]
name = "AI-022"
command = a,b,x,c,a,z,a,z,a,a,a
time = 0

[Command]
name = "AI-023"
command = a,b,x,c,a,z,a,z,a,a
time = 0

[Command]
name = "AI-024"
command = a,b,x,c,a,z,a,z,z
time = 0

[Command]
name = "AI-025"
command = a,b,x,c,a,z,a,z,y
time = 0

[Command]
name = "AI-026"
command = a,b,x,c,a,z,a,z,x
time = 0

[Command]
name = "AI-027"
command = a,b,x,c,a,z,a,z,s
time = 0

[Command]
name = "AI-028"
command = a,b,x,c,a,z,a,z,c
time = 0

[Command]
name = "AI-029"
command = a,b,x,c,a,z,a,z,b
time = 0

[Command]
name = "AI-030"
command = a,b,x,c,a,z,a,z,a
time = 0

[Command]
name = "AI-031"
command = a,b,x,c,a,z,a,z
time = 0

[Command]
name = "AI-032"
command = a,b,x,c,a,z,a,y
time = 0

[Command]
name = "AI-033"
command = a,b,x,c,a,z,a,x
time = 1

[Command]
name = "AI-034"
command = a,b,x,c,a,z,a,c
time = 1

[Command]
name = "AI-035"
command = a,b,x,c,a,z,a,s
time = 1
;-| Super Motions |--------------------------------------------------------
[Command]
name = "SkyUppercut1"
command=~F,D,DF,x
time=20

[Command]
name = "Kickproj1"
command=~F,D,DF,a
time=20

[Command]
name = "Kickproj2"
command=~F,D,DF,b
time=20

[Command]
name = "Fabrication CUTTING"
command = ~D,D,c
time = 30

[Command]
name = "Fabrication PILLAR"
command = ~D,D,z
time = 30

[Command]
name = "Uppercut"
command = z
time = 10

[Command]
name = "FirePunch1"
command = D,B,x
time = 30

[Command]
name = "FirePunch1"
command = D,B,y
time = 30

[Command]
name = "RoundHouseKick"
command = D,F,a
time = 30

[Command]
name = "RoundHouseKick"
command = D,F,b
time = 30

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


[Command]
name = "BlazeKick1"
command = D,B,a
time = 30

[Command]
name = "BlazeKick2"
command = D,B,b
time = 30

[Command]
name = "BlazeKick3"
command = D,B,a
time = 30

[Command]
name = "BlazeKick4"
command = D,B,b
time = 30

;[Command]
;name = "Blastoise"
;command = c+z
;time = 30

;[Command]
;name = "Cumbustkin"
;command = c+z
;time = 30

;[Command]
;name = "Torchik"
;command = c+z
;time = 30

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

[Command]
name = "FlameThrower"
command = D,DF,F,y
time = 20
;-| Special Motions |------------------------------------------------------
[Command]
name = "Fireblast"
command = D,DF,F,x+y
time = 30

[Command]
name = "Shin Sky Uppercut"
command = F,DF,F,x+y
time = 30

[Command]
name = "Combat1"
command = D,DF,F,D,DF,F,x
time = 30

[Command]
name = "Combat2"
command = D,DF,F,D,DF,F,y
time = 30

[Command]
name = "Combat3"
command = D,DF,F,D,DF,F,z
time = 30

[Command]
name = "Fabrication TELEPORT"
command = z
time = 10
;-| 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

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

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

[State -1,]
type = ChangeState
value = 11220
triggerall = palno != 12
triggerall = command = "Fabrication CUTTING"
triggerall = power >= 3000
triggerall = statetype != A
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 3250
triggerall = command = "Fabrication PILLAR"
triggerall = power >= 3000
triggerall = statetype != A
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 3250
triggerall = palno = 12
triggerall = command = "c"
triggerall = statetype != A
triggerall = statetype != C
triggerall = statetype = S
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 11220
triggerall = palno = 12
triggerall = command = "z"
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
triggerall = statetype != A
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 1900
triggerall = palno != 12
triggerall = command = "c"
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
triggerall = statetype != C
triggerall = statetype != A
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 1201
triggerall = palno != 12
triggerall = command = "c"
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
triggerall = statetype != S
triggerall = statetype != A
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 1101
triggerall = command = "c"
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
trigger1 = statetype = A
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 1800
triggerall = palno != 12
triggerall = command = "z"
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
triggerall = statetype != A
trigger1 = ctrl

[State -1,]
type = ChangeState
value = 1800
triggerall = palno = 12
triggerall = command = "c"
triggerall = command = "holddown"
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
triggerall = statetype != A
triggerall = statetype = C
trigger1 = ctrl

[State -1, charge]
type = ChangeState
value = 4005
triggerall = Var(59)!= 1
triggerall = command = "a"&&command="c"
triggerall = power<3000
triggerall = command !="holddown"
triggerall = statetype !=A
triggerall = stateno!= 1000
triggerall = stateno!= 900
triggerall = stateno!= 901
triggerall = stateno!= 902
triggerall = stateno!= 903
triggerall = stateno!= 904
triggerall = stateno!= 905
triggerall = stateno!= 906
triggerall = stateno!= 907
triggerall = stateno!= 908
triggerall = stateno!= 909
triggerall = stateno!= 740
triggerall = stateno!= 745
triggerall = stateno!= 800
trigger1 = statetype = S




;RoundHouseKick
[State -1, RoundHouseKick]
type = ChangeState
value = 785
triggerall = command = "RoundHouseKick"
trigger1 = (statetype = s) && ctrl

;Shin Sky Uppercut
[State -1, Shin Sky Uppercut]
type = ChangeState
value = 1000
triggerall = palno != 12
triggerall = command = "Shin Sky Uppercut"
trigger1 = (statetype = s) && ctrl
triggerall =  power >= 3000
triggerall = stateno != 903
triggerall = stateno != 904
triggerall = stateno != 905
triggerall = stateno != 906
triggerall = stateno != 907
triggerall = stateno != 908
triggerall = stateno != 909
triggerall = stateno != 900
triggerall = stateno != 901
triggerall = stateno != 902
triggerall = stateno != 770
triggerall=stateno!=1000

;Combat1
[State -1, Combat1]
type = ChangeState
value = 900
triggerall = palno != 12
triggerall = command = "Combat1"
triggerall = stateno!=4005
triggerall = stateno != 800
triggerall = stateno != 810
triggerall = stateno != 903
triggerall = stateno != 904
triggerall = stateno != 905
triggerall = stateno != 906
triggerall = stateno != 907
triggerall = stateno != 908
triggerall = stateno != 909
triggerall = stateno != 900
triggerall = stateno != 901
triggerall = stateno != 902
triggerall = stateno != 770
trigger1 = stateno != 1000
trigger1 = (statetype = s)
trigger1 =  power >= 1000

;Combat2
[State -1, Combat2]
type = ChangeState
value = 903
triggerall = palno != 12
triggerall = command = "Combat2"
triggerall = stateno!=4005
triggerall = stateno != 800
triggerall = stateno != 810
triggerall = stateno != 900
triggerall = stateno != 901
triggerall = stateno != 902
triggerall = stateno != 903
triggerall = stateno != 904
triggerall = stateno != 905
triggerall = stateno != 906
triggerall = stateno != 907
triggerall = stateno != 908
triggerall = stateno != 909
triggerall = stateno != 770
trigger1=stateno!=1000
trigger1 = (statetype = s)
trigger1 =  power >= 2000

;Combat3
[State -1, Combat3]
type = ChangeState
value = 906
triggerall = palno != 12
triggerall = command = "Combat3"
triggerall = stateno!=4005
triggerall = stateno != 800
triggerall = stateno != 810
triggerall = stateno != 900
triggerall = stateno != 901
triggerall = stateno != 902
triggerall = stateno != 903
triggerall = stateno != 904
triggerall = stateno != 905
triggerall = stateno != 906
triggerall = stateno != 907
triggerall = stateno != 908
triggerall = stateno != 909
triggerall = stateno != 770
triggerall = stateno!=1000
trigger1   = (statetype = s)
triggerall   =  power >= 3000

;FirePunch1
[State -1, FirePunch1]
type = ChangeState
value = 780
triggerall = command = "FirePunch1"
trigger1 = (statetype = s) && ctrl


;BlazeKick2
[State -1, BlazeKick2]
type = ChangeState
value = 765
triggerall = command = "BlazeKick2"
trigger1 = (statetype = s) && ctrl


;BlazeKick1
[State -1, BlazeKick1]
type = ChangeState
value = 760
triggerall = command = "BlazeKick1"
trigger1 = (statetype = s) && ctrl

;BlazeKick3
[State -1, BlazeKick3]
type = ChangeState
value = 761
triggerall = command = "BlazeKick3"
trigger1 = (statetype = A) && ctrl


;BlazeKick4
[State -1, BlazeKick4]
type = ChangeState
value = 767
triggerall = command = "BlazeKick4"
trigger1 = (statetype = A) && ctrl


;Fireblast
[State -1, Fireblast]
type = ChangeState
value = 770
triggerall = palno != 12
triggerall = command = "Fireblast"
triggerall = stateno!=4005
triggerall = stateno != 800
triggerall = stateno != 810
triggerall = stateno != 903
triggerall = stateno != 904
triggerall = stateno != 905
triggerall = stateno != 906
triggerall = stateno != 907
triggerall = stateno != 908
triggerall = stateno != 909
triggerall = stateno != 900
triggerall = stateno != 901
triggerall = stateno != 902
trigger1 = stateno != 1000
triggerall = power>=1500
trigger1 = (statetype = s) && ctrl



;FlameThrower
[State -1, FlameThrower]
type = ChangeState
value = 750
triggerall = !command = "SkyUppercut1"
triggerall = !command = "SkyUppercut2"
triggerall = (command = "FlameThrower")
trigger1 = (statetype = s) && ctrl


;SkyUppercut1
[State -1, SkyUppercut1]
type = ChangeState
value = 740
triggerall = command = "SkyUppercut1"
trigger1 = (statetype = s) && ctrl
triggerall = stateno != 1000


;SkyUppercut2
[State -1, SkyUppercut2]
type = ChangeState
value = 745
triggerall = command = "SkyUppercut2"
trigger1 = (statetype = s) && ctrl
triggerall = stateno != 1000




;===========================================================================
;---------------------------------------------------------------------------

;===========================================================================
;---------------------------------------------------------------------------
; Run Fwd
[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

;---------------------------------------------------------------------------
; Throw
[State -1, Throw]
type = ChangeState
value = 800
triggerall = command = "y" || command = "z"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = stateno != 900
triggerall = stateno != 903
triggerall = stateno != 906
triggerall = stateno != 1000
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

;===========================================================================
;---------------------------------------------------------------------------
; 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
Trigger2 = MoveContact
Trigger2 = Stateno = 230
Trigger3 = MoveContact
Trigger3 = Stateno = 240





;---------------------------------------------------------------------------
; Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger3 = MoveContact
Trigger3 = Stateno = 230
Trigger4 = MoveContact
Trigger4 = Stateno = 240




;---------------------------------------------------------------------------
; Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 240
Trigger3 = MoveContact
Trigger3 = Stateno = 200

;---------------------------------------------------------------------------
; Standing Medium Kick
[State -1, Standing Medium Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger3 = MoveContact
Trigger3 = Stateno = 230




;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 400
Trigger3 = MoveContact
Trigger3 = Stateno = 410
Trigger4 = MoveContact
Trigger4 = Stateno = 430
Trigger5 = MoveContact
Trigger5 = Stateno = 440

;---------------------------------------------------------------------------
; Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 400
Trigger3 = MoveContact
Trigger3 = Stateno = 410
Trigger4 = MoveContact
Trigger4 = Stateno = 430
Trigger5 = MoveContact
Trigger5 = Stateno = 440



;---------------------------------------------------------------------------
; Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 400
Trigger3 = MoveContact
Trigger3 = Stateno = 410
Trigger4 = MoveContact
Trigger4 = Stateno = 440


;---------------------------------------------------------------------------
; Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 400
Trigger3 = MoveContact
Trigger3 = Stateno = 410
Trigger4 = MoveContact
Trigger4 = Stateno = 430




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


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

;---------------------------------------------------------------------------
; Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
;----------------------------------------------------------------------
;------------------------------------------------------------------------------
[State -1, sparry]
type=hitoverride
triggerall = var(59)!=1&&roundstate=2&&statetype=S
triggerall=command!="back"&&command="fwd"&&command!="up"&&command!="down"
trigger1=ctrl||stateno=700||stateno=701
trigger1=var(21):=1
trigger2=var(21):=-1
attr=SA,AA,AP
stateno=700
slot=0

[State -1, cparry]
type=hitoverride
triggerall = var(59)!=1&&roundstate=2&&statetype!=A
triggerall=(statetype=S&&command="down")||(statetype=C&&command!="back")&&command="fwd"&&command!="up"
trigger1=ctrl||stateno=700||stateno=701
trigger1=var(21):=2
trigger2=var(21):=-2
attr=C,AA,AP
stateno=701
slot=0

[State -1, aparry]
type=hitoverride
triggerall = var(59)!=1&&roundstate=2&&statetype=A
triggerall=command!="back"&&command="fwd"&&command!="up"&&command!="down"
trigger1=ctrl||stateno=702
trigger1=var(21):=3
trigger2=var(21):=-3
attr=SA,AA,AP
stateno=702
forceair=1
slot=0

;===========================================================================
;---------------------------------------------------------------------------
; AI <Stuff>
;---------------------------------------------------------------------------
;------------------------------------
;AI Guardia (stand)
;------------------------------------
[State -1]
type = null;ChangeState
triggerall = Statetype != A
triggerall = Statetype = S
triggerall = (Var(1)) && (Ctrl)
triggerall = p2bodydist X <= 100
trigger1 = (P2statetype != C) && (P2Movetype = A)
value = 130

;------------------------------------
;AI Guardia (par-aga)
;------------------------------------
[State -1]
type = ChangeState
triggerall = 1
triggerall = StateType != A
triggerall = P2statetype = C
triggerall = P2Movetype = A
trigger1 = StateNo = 150
value = 152

;------------------------------------
;AI Guardia (Agachado)
;------------------------------------
[State -1]
type = null;ChangeState
triggerall = StateType != A
triggerall = (Var(1)) && (Ctrl)
triggerall = p2bodydist X <= 100
trigger1 = (P2statetype = C) && (P2Movetype = A)
trigger2 = (P2statetype != C) && (P2Movetype = A)
value = 131

;------------------------------------
;AI Guardia (aga-par)
;------------------------------------
[State -1]
type = ChangeState
triggerall = 1
triggerall = Statetype != A
triggerall = P2statetype != C
triggerall = P2Movetype = A
trigger1 = StateNo = 152
value = 150

;------------------------------------
;AI Guardia (aereo)
;------------------------------------
[State -1]
type = null;ChangeState
triggerall = Statetype = A
triggerall = (Var(1)) && (Ctrl)
triggerall = p2bodydist X <= 100
trigger1 = P2Movetype = A
value = 132

;------------------------------------
;AI Guardia (aer-aga)
;------------------------------------
[State -1]
type = ChangeState
triggerall = Statetype != A
triggerall = Pos Y > -1
triggerall = P2statetype = C
triggerall = P2Movetype = A
trigger1 = stateno = 154
trigger2 = stateno = 155
value = 152

;------------------------------------
;AI Guardia (aer-par)
;------------------------------------
[State -1]
type = ChangeState
triggerall = Statetype != A
triggerall = Pos Y > -1
triggerall = P2statetype != C
trigger1 = stateno = 154
trigger2 = stateno = 155
value = 150


;------------------------------------
;AI Air Recovery
;------------------------------------
[State -1]
type = ChangeState
value = 5210
triggerall = var(59) = 1
triggerall = StateType = A
triggerall = StateType != L
triggerall = Pos Y < -20
triggerall = Alive
trigger1 = CanRecover = 1
trigger1 = StateNo = 5050

;------------------------------------
;AI Air Recovery (suelo)
;------------------------------------
[State -1]
type = ChangeState
value = 5200
triggerall = var(59) = 1
triggerall = StateType = A
triggerall = StateType != L
triggerall = Pos Y >= -20
triggerall = Alive
trigger1 = CanRecover = 1
trigger1 = StateNo = 5050

;- | AI Dashes | ----------------------------------------------------------

[State -1]
type = ChangeState
value = 102
triggerall = var(59)
triggerall = var(8) = [0,1]
triggerall = P2stateno != [5100,5119]
triggerall = (StateType != A) && (MoveType != H)
triggerall = (P2StateType != A) && (P2life != 0)
triggerall = (stateno != 102) && (prevstateno != 102)
trigger1 = P2BodyDist X >= 20
trigger1 = ctrl

[State -1]
type = ChangeState
value = 20
triggerall = var(59)
triggerall = P2stateno = [5100,5119]
triggerall = (StateType != A) && (MoveType != H)
triggerall = (P2StateType != A) && (P2life != 0)
trigger1 = P2BodyDist X <= 9
trigger1 = ctrl

[State -1]
type = ChangeState
value = 200
triggerall = var(59)
triggerall = P2stateno != [5100,5119]
triggerall = (StateType != A) && (MoveType != H)
triggerall = (P2StateType != A) && (P2life != 0)
trigger1 = P2BodyDist X <= 9
trigger1 = ctrl

[State -1]
type = ChangeState
value = 430
triggerall = var(59)
triggerall = P2stateno != [5100,5119]
triggerall = (StateType != A) && (MoveType != H)
triggerall = (P2StateType != A) && (P2life != 0)
trigger1 = P2BodyDist X <= 9
trigger1 = ctrl

[State -1]
type = ChangeState
value = 600
triggerall = var(59)
triggerall = (StateType = A) && (MoveType != H)
triggerall = (P2StateType = A) && (P2life != 0)
trigger1 = P2BodyDist X <= 9
trigger1 = ctrl

[State -1]
type = ChangeState
value = 610
triggerall = var(59)
triggerall = (StateType = A) && (MoveType != H)
triggerall = (P2StateType = A) && (P2life != 0)
trigger1 = P2BodyDist X <= 9
trigger1 = ctrl

[State -1]
type = ChangeState
value = 195
triggerall = var(59)
triggerall = var(8) = 1
triggerall = P2stateno = [5100,5119]
triggerall = (StateType != A) && (MoveType != H)
triggerall = (P2StateType != A)
trigger1 = P2BodyDist X = [100,115]
trigger1 = ctrl

[State -1]
type = ChangeState
value = 11220
triggerall = var(59)
triggerall = power >= 3000
triggerall = (StateType != A) && (MoveType != H)
triggerall = (P2StateType != A) && (P2life != 0)
triggerall = (stateno != 102) && (prevstateno != 102)
trigger1 = P2BodyDist X = [20,220]

;[State -1]
;type = ChangeState
;value = 1010
;triggerall = var(59)
;triggerall = var(8) = [2,3]
;triggerall = (StateType != A) && (MoveType != H)
;triggerall = (P2StateType != A) && (P2life != 0)
;triggerall = (stateno != 102) && (prevstateno != 102)
;trigger1 = P2BodyDist X <= 30
;trigger1 = ctrl

;[State -1]
;type = ChangeState
;value = 1000
;triggerall = var(59)
;triggerall = var(8) = [2,3]
;triggerall = (StateType != A) && (MoveType != H)
;triggerall = (P2StateType != A) && (P2life != 0)
;trigger1 = P2BodyDist X = [20,220]
;trigger1 = ctrl


;[State -1]
;type = ChangeState
;value = 1100
;triggerall = var(59)
;triggerall = var(8) = [2,3]
;triggerall = prevstateno = 1010
;triggerall = (StateType != A) && (MoveType != H)
;triggerall = (P2StateType != A) && (P2life != 0)
;trigger1 = P2BodyDist X = [60,100]
;trigger1 = ctrl
