;-| Default Values |-------------------------------------------------------
[Defaults]
command.time = 20
command.buffer.time = 1

;-| AI moves |-------------------------------------------------------------
[Command]
name = "AI0"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI1"
command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time = 0
[Command]
name = "AI2"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI3"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI4"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI5"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI6"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI7"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time = 0
[Command]
name = "AI8"
command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time = 0
[Command]
name = "AI9"
command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time = 0
[Command]
name = "AI10"
command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time = 0
[Command]
name = "AI11"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI12"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI13"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI14"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI15"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI16"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI17"
command = a,B,c,x,y,z,s,B,D,F,U,a,b,c,x,y,z,s,s
time = 0
[Command]
name = "AI18"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI19"
command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time = 0
[Command]
name = "AI20"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI21"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI22"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI23"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI24"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI25"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time = 0
[Command]
name = "AI26"
command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time = 0
[Command]
name = "AI27"
command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time = 0
[Command]
name = "AI28"
command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time = 0
[Command]
name = "AI29"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI30"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI31"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI32"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI33"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI34"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI35"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI36"
command = z,z,z,z,z,z,a,a,a,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI37"
command = z,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,z,z,z
time = 0
[Command]
name = "AI38"
command = z,z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z
time = 0
[Command]
name = "AI39"
command = z,z,z,z,z,a,a,a,z,z,z,z,z,z,a,a,z,z,z
time = 0
[Command]
name = "AI40"
command = z,z,z,z,a,a,a,z,z,z,z,a,z,z,a,a,z,z,z
time = 0
[Command]
name = "AI41"
command = z,z,z,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z,z
time = 0
[Command]
name = "AI42"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI43"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,a,a,z
time = 0
[Command]
name = "AI44"
command = z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,a,a,a,z
time = 0
[Command]
name = "AI45"
command = z,z,z,z,z,z,a,a,z,z,z,z,z,a,a,a,a,z,z
time = 0
[Command]
name = "AI46"
command = z,z,z,z,z,z,z,z,a,a,a,a,a,a,z,z,z,z,z
time = 0
[Command]
name = "AI47"
command = z,z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI48"
command = z,z,z,z,z,a,a,a,z,z,z,a,a,a,z,z,a,z,a
time = 0
[Command]
name = "AI49"
command = z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z,z
time = 0
[Command]
name = "AI50"
command = z,z,z,a,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z
time = 0

;-| Super Motions (3 Gauges or more)|------------------------------------------;
[Command]
name = "Nukes"
command = ~D, DF, F, D, DF, F, D, DF, F, s
time = 70

[Command]
name = "ShunGoku"
command = ~x, x, F, a, b
time = 50

[Command]
name = "DRAVE"
command = ~D ,DB, B, D, DB, B, a+b
time = 30

[Command]
name = "Diamond"
command = ~D, DB, B, D, DB, B, c
time = 30

[Command]
name = "Ambush"
command = ~D, DF, F, D, DF, F, c
time = 30

[Command]
name = "BFG500K"
command = ~D, DB, B, DB, D, DF, F, c
time = 45

[Command]
name = "KSK"
command = ~y, a, B, x, x
time = 45

[Command]
name = "BAM"
command = ~D, DB, B, c
;-| Super Motions (2 Gauge)|--------------------------------------------------------;
[Command]
name = "GGun"
command = ~D, DB, B, DB, D, DF, F, x+y
time = 45

[Command]
name = "5xKFPalm"
command = ~D, DF, F, D, DF, F, x+y
time = 30

[Command]
name = "SmashKFUpper2"
command = ~D, DB, B, D, DB, B, x+y
time = 30

[Command]
name = "Napalm"
command = ~D, DF, F, D, DF, F, a+b
time = 30

;-| Super Motions (1 Gauge)|--------------------------------------------------------;
[Command]
name = "Gun"
command = ~D, DB, B, DB, D, DF, F, x
time = 45

[Command]
name = "Gun"
command = ~D, DB, B, DB, D, DF, F, y
time = 45

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

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

[Command]
name = "SmashKFUpper"
command = ~D, DB, B, D, DB ,B, x
time = 30

[Command]
name = "SmashKFUpper"
command = ~D, DB, B, D, DB, B, y
time = 30

[Command]
name = "Fire"
command = ~D, DF, F, D, DF, F, a
time = 30

[Command]
name = "Fire"
command = ~D, DF, F, D, DF, F, b
time = 30

;-| Special Motions |------------------------------------------------------
[Command]
name = "upper_x"
command = ~F, D, DF, x
time = 20

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

[Command]
name = "upper_xy"
command = ~F, D, DF, x+y
time = 20

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

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

[Command]
name = "rocketpunch_xy"
command = ~D, DF, F, a+b

[Command]
name = "excusion"
command = ~D, DB, B, a   ;;;~F, DF, D, DB, B, a
time = 25

[Command]
name = "excusion2"
command = ~D, DB, B, b   ;;;~F, DF, D, DB, B, b
time = 25

[Command]
name = "revers_x"
command = ~B, D, DB, x
time = 20

[Command]
name = "revers_y"
command = ~B, D, DB, y
time = 20

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

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

[Command]
name = "QCF_xy"
command = ~D, DF, F, x+y

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

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

[Command]
name = "QCB_xy"
command = ~D, DB, B, x+y

[Command]
name = "FF_ab"
command = ~F, F, a+b

[Command]
name = "FF_a"
command = ~F, F, a

[Command]
name = "FF_b"
command = ~F, F, b

[Command]
name = "FDF_ab"
command = ~F, D, DF, a+b
time = 24

[Command]
name = "FDF_a"
command = ~F, D, DF, a
time = 24

[Command]
name = "FDF_b"
command = ~F, D, DF, b
time = 24

[Command]
name = "DD_a"
command = D, D, a
time = 20

[Command]
name = "DD_b"
command = ~D, D, b
time = 20

[Command]
name = "DD_ab"
command = ~D, D, a+b
time = 20

[Command]
name = "CBF_x"
command = ~20$B, F, x
time = 20

[Command]
name = "CBF_y"
command = ~20$B, F, y
time = 20

[Command]
name = "CBF_xy"
command = ~20$B, F, x+y
time = 20

[Command]
name = "CBF_ab"
command = ~20$B, F, a+b
time = 25

[Command]
name = "CBF_b"
command = ~20$B, F, b
time = 25

[Command]
name = "CBF_a"
command = ~20$B, F, a
time = 25

;-| 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 = "start"
command = s
time = 1

;-| Hold Dir |--------------------------------------------------------------
[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

;-| Hold Button |----------------------------------------------------------

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

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

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

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

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

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

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

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

;-| 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 = "C_R_Guard"
command = DB
time = 1

[command]
name = "fwd"
command = F
time=1

[command]
name = "back"
command = B
time = 1

[command]
name = "up"
command = U
time = 1

[command]
name = "down"
command = D
time = 1
;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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

[Statedef -1]

[State -1, AI Helper Check]
type = ChangeState
trigger1 = IsHelper(9741)
trigger1 = stateno != 9741
value = 9741
;===========================================================================
;;-------------------------------------------------
;; FINAL ==========================================
;;-------------------------------------------------
[State -1, KFMeltdown]
type = ChangeState
value = 4520
triggerall = var(58) = 0
triggerall = palno = 12 || var(57) = 2
triggerall = command = "Nukes"
triggerall = statetype != A
triggerall = numhelper(6600) = 0
triggerall = var(31) = 0 && power >= 9000
trigger1 = ctrl

[State -1, Death Fist]
type = ChangeState
value = 4200
triggerall = var(58) = 0
triggerall = command = "KSK"
triggerall = statetype != A
triggerall = power >= 8000
triggerall = var(31) = 0 && power >= 8000
trigger1 = ctrl
trigger1 = statetype = S
trigger2 = stateno != 4200

[State -1, Ambush]
type = ChangeState
value = 4300
triggerall = var(57) = 2
triggerall = var(58) = 0
triggerall = command = "Ambush"
triggerall = statetype != A
triggerall = var(31) = 0 && power >= 6000
trigger1 = stateno = [3500,3599]

[State -1, Ambush]
type = ChangeState
value = ifelse(var(57)=1,4300,4000)
triggerall = var(58) = 0
triggerall = command = "Ambush"
triggerall = statetype != A
triggerall = var(31) = 0 && power >= 7000
trigger1 = ctrl
trigger2 = stateno = 160 || stateno = 161
trigger3 = (stateno != 4000 && stateno != 4300)
;;-------------------------------------------------
;; Level 3 or more ================================
;;-------------------------------------------------
;BFG500K
[State -1, BFG500K]
type = ChangeState
value = 3700
triggerall = var(58) = 0
triggerall = command = "BFG500K"
triggerall = power >= 5000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 3000 || stateno = 3010
trigger2 = movecontact
trigger3 = stateno = 3110 || stateno = 3100
trigger3 = movecontact
trigger4 = stateno = 3150 || stateno = 3160
trigger4 = movecontact

;Dragon Cannon
[State -1, Hellfire]
type = ChangeState
value = ifelse(var(57) = 1,3600,3250)
triggerall = var(58) = 0
triggerall = command = "Diamond"
triggerall = power >= 4000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 3000 || stateno = 3010
trigger2 = movecontact
trigger3 = stateno = 3110 || stateno = 3100
trigger3 = movecontact
trigger4 = stateno = 3150 || stateno = 3160
trigger4 = movecontact
trigger5 = stateno = [1250,1270]
trigger5 = movecontact
trigger6 = stateno = 3051 || stateno = 3061
trigger6 = movehit
trigger7 = var(1) = 1

;Shun goku satsu
[State -1, Shun Goku Satsu]
type = ChangeState
value = 3900
triggerall = var(57) = 0 || var(57) = 2
triggerall = var(58) = 0
triggerall = command = "ShunGoku"
triggerall = power >= 3000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 3000 || stateno = 3010
trigger2 = movecontact
trigger3 = stateno = 3110 || stateno = 3100
trigger3 = movecontact
trigger4 = stateno = [200,499]
trigger5 = var(1) = 1

;Deadly Rave
[State -1, Shun Goku Satsu]
type = ChangeState
value = 3500
triggerall = var(57) = 1 || var(57) = 2
triggerall = var(58) = 0
triggerall = command = "DRAVE"
triggerall = power >= 3000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 3000 || stateno = 3010
trigger2 = movecontact
trigger3 = stateno = 3110 || stateno = 3100
trigger3 = movecontact
trigger4 = stateno = [200,499]
trigger5 = var(1) = 1
;;-------------------------------------------------
;; Level 2 ========================================
;;-------------------------------------------------
;Napalm Vietnam
[State -1, Napalm]
type = ChangeState
value = 3160
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = command = "Napalm"
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [3000,3010]
trigger2 = movecontact
trigger3 = stateno = [3100,3110]
trigger3 = movecontact
trigger4 = var(1) = 1

[State -1, Napalm]
type = ChangeState
value = 3172
triggerall = var(57) >= 1
triggerall = var(58) = 0
triggerall = command = "Napalm"
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [3000,3010]
trigger2 = movecontact
trigger3 = stateno = [3100,3110]
trigger3 = movecontact
trigger4 = var(1) = 1
trigger5 = stateno = 2000
trigger5 = projcontact1500 = 1

;Smash Kung Fu Upper
[State -1, HRK]
type = ChangeState
value = 3275
triggerall = var(57) = 1
triggerall = var(58) = 0
triggerall = command = "GGun"
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1020]
trigger2 = movecontact
trigger3 = stateno = 3000 || stateno = 3010
trigger3 = movecontact
trigger4 = var(1) = 1

;Smash Kung Fu Upper
[State -1, DTremor/DRocket Kick]
type = ChangeState
value = 3110
triggerall = var(57) = 0 || var(57) = 2
triggerall = var(58) = 0
triggerall = command = "GGun"
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1020]
trigger2 = movecontact
trigger3 = stateno = [3000,3010]
trigger3 = movecontact
trigger4 = var(1) = 1

;Smash Kung Fu Upper (uses two super bar)
[State -1, Smash Kung Fu Upper]
type = ChangeState
value = 3060
triggerall = var(58) = 0
triggerall = command = "SmashKFUpper2"
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1020]
trigger2 = movecontact
trigger3 = stateno = [3000,3010]
trigger3 = movecontact
trigger4 = stateno = [3100,3110]
trigger4 = movecontact
trigger5 = var(1) = 1
trigger6 = stateno = 160 || stateno = 161
trigger7 = stateno = 2000
trigger7 = projcontact1500 = 1

;Triple Kung Fu Palm (uses two super bars)
[State -1, Triple Kung Fu Palm]
type = ChangeState
value = 3010
triggerall = var(58) = 0
triggerall = command = "5xKFPalm"
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1010]
trigger2 = movecontact
trigger3 = stateno = [1100,1120]
trigger3 = movecontact
trigger4 = stateno = [3050,3060]
trigger4 = movecontact
trigger5 = stateno = [3110,3100]
trigger5 = movecontact
trigger6 = var(1) = 1
trigger7 = stateno = 2000
trigger7 = projcontact1500 = 1

;;-------------------------------------------------
;; Level 1 ========================================
;;-------------------------------------------------
;Smash Kung Fu Upper
[State -1, SRK]
type = ChangeState
value = 3270
triggerall = var(57) = 1
triggerall = var(58) = 0
triggerall = command = "Gun"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1020]
trigger2 = movecontact
trigger3 = stateno = [3000,3010]
trigger3 = movecontact
trigger4 = var(1) = 1

;Smash Kung Fu Upper
[State -1, Tremor/Rocket Kick]
type = ChangeState
value = 3100
triggerall = var(57) != 1
triggerall = var(58) = 0
triggerall = command = "Gun"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1020]
trigger2 = movecontact
trigger3 = stateno = [3000,3010]
trigger3 = movecontact
trigger4 = var(1) = 1

;Smash Kung Fu Upper (uses one super bar)
[State -1, Fire]
type = ChangeState
value = 3150
triggerall = var(57) != 1
triggerall = var(58) = 0
triggerall = command = "Fire"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [3000,3010]
trigger2 = movecontact
trigger3 = stateno = [3110,3100]
trigger3 = movecontact
trigger4 = stateno = 3250
trigger4 = movecontact
trigger5 = var(1) = 1

;Smash Kung Fu Upper (uses one super bar)
[State -1, Fire]
type = ChangeState
value = 3170
triggerall = var(57) = 1
triggerall = var(58) = 0
triggerall = command = "Fire"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [3000,3010]
trigger2 = movecontact
trigger3 = stateno = [3100,3100]
trigger3 = movecontact
trigger4 = stateno = 3250
trigger4 = movecontact
trigger5 = var(1) = 1
trigger6 = stateno = 2000
trigger6 = projcontact1500 = 1

;Smash Kung Fu Upper (uses one super bar)
[State -1, Smash Kung Fu Upper]
type = ChangeState
value = 3050
triggerall = var(58) = 0
triggerall = command = "SmashKFUpper"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1020]
trigger2 = movecontact
trigger3 = stateno = [3000,3010]
trigger3 = movecontact
trigger4 = stateno = [3100,3110]
trigger4 = movecontact
trigger5 = var(1) = 1
trigger6 = stateno = 160 || stateno = 161
trigger7 = stateno = 2000
trigger7 = projcontact1500 = 1

;Triple Kung Fu Palm (uses one super bar)
[State -1, Triple Kung Fu Palm]
type = ChangeState
value = 3000
triggerall = var(58) = 0
triggerall = command = "TripleKFPalm"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = [1000,1010]
trigger2 = movecontact
trigger3 = stateno = [1100,1120]
trigger3 = movecontact
trigger4 = stateno = [3050,3060]
trigger4 = movecontact
trigger5 = stateno = [3100,3110]
trigger5 = movecontact
trigger6 = var(1) = 1
trigger7 = stateno = 2000
trigger7 = projcontact1500 = 1
;===========================================================================
;This is not a move, but it sets up var(1) to be 1 if conditions are right
;for a combo into a special move (used below).
;Since a lot of special moves rely on the same conditions, this reduces
;redundant logic.
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0

[State -1, Combo condition Check]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
var(1) = 1
;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = ifelse(var(57) = 1,1667,1450)
triggerall = var(58) = 0
triggerall = command = "excusion"
trigger1 = var(1)
trigger2 = stateno = 160 || stateno = 161
;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = ifelse(var(57) = 1,1655,1650)
triggerall = var(58) = 0
triggerall = command = "excusion2"
trigger1 = var(1)
trigger2 = stateno = 160 || stateno = 161
;---------------------------------------------------------------------------
;Fast Rising Kick (1/3 super bar)
[State -1, Fast Rising Kick]
type = ChangeState
value = 1342
triggerall = var(58) = 0
triggerall = command = "FDF_ab"
triggerall = power >= 500
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;Strong Rising Kick
[State -1, Heavy Rising Kick]
type = ChangeState
value = 1341
triggerall = var(58) = 0
triggerall = command = "FDF_b"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;Rising Kick
[State -1, Light Rising Kick]
type = ChangeState
value = 1340
triggerall = var(58) = 0
triggerall = command = "FDF_a"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;---------------------------------------------------------------------------
;Fast Hakikyaku
[State -1, Fast Hakikyaku]
type = ChangeState
value = 1535
triggerall = var(57) >= 1
triggerall = var(58) = 0
triggerall = statetype = A
triggerall = command = "rocketpunch_xy"
triggerall = power >= 500
trigger1 = ctrl
trigger2 = stateno = [600,699]
trigger2 = movecontact = 1
trigger3 = stateno = 1055
trigger3 = movecontact
;---------------------------------------------------------------------------
;Light Hakikyaku
[State -1, Light Hakikyaku]
type = ChangeState
value = 1532
triggerall = var(57) >= 1
triggerall = var(58) = 0
triggerall = statetype = A
triggerall = command = "rocketpunch_y"
trigger1 = ctrl
trigger2 = stateno = [600,699]
trigger2 = movecontact = 1
trigger3 = stateno = 1055
trigger3 = movecontact
;---------------------------------------------------------------------------
;Light Hakikyaku
[State -1, Light Hakikyaku]
type = ChangeState
value = 1530
triggerall = var(57) >= 1
triggerall = var(58) = 0
triggerall = statetype = A
triggerall = command = "rocketpunch_x"
trigger1 = ctrl
trigger2 = stateno = [600,699]
trigger2 = movecontact = 1
trigger3 = stateno = 1055
trigger3 = movecontact
;---------------------------------------------------------------------------
;Strong Rocket-Punch
;カンフー蹴り（弱）
[State -1, Strong Rocket-Punch]
type = ChangeState
value = 1420
triggerall = var(57) != 1
triggerall = var(58) = 0
triggerall = power >= 500
triggerall = command = "rocketpunch_xy"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;Strong Rocket-Punch
;カンフー蹴り（弱）
[State -1, Strong Rocket-Punch]
type = ChangeState
value = 1410
triggerall = var(57) != 1
triggerall = var(58) = 0
triggerall = command = "rocketpunch_y"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;Strong Rocket-Punch
;カンフー蹴り（弱）
[State -1, Strong Rocket-Punch]
type = ChangeState
value = 1400
triggerall = var(57) != 1
triggerall = var(58) = 0
triggerall = command = "rocketpunch_x"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;Strong Rocket-Punch
;カンフー蹴り（弱）
[State -1, Strong Rocket-Punch]
type = ChangeState
value = 2020
triggerall = var(57) = 1
triggerall = var(58) = 0
triggerall = power >= 500
triggerall = command = "rocketpunch_xy"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;Strong Rocket-Punch
;カンフー蹴り（弱）
[State -1, Strong Rocket-Punch]
type = ChangeState
value = 2000
triggerall = var(57) = 1
triggerall = var(58) = 0
triggerall = command = "rocketpunch_y"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]

;Strong Rocket-Punch
;カンフー蹴り（弱）
[State -1, Strong Rocket-Punch]
type = ChangeState
value = 2000
triggerall = var(57) = 1
triggerall = var(58) = 0
triggerall = command = "rocketpunch_x"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [200,220]
trigger3 = movecontact = 1
trigger4 = stateno = [160,161]
;---------------------------------------------------------------------------
;Fast Hakikyaku
[State -1, Fast Hakikyaku]
type = ChangeState
value = ifelse(var(57) = 1,1545,1320)
triggerall = var(58) = 0
triggerall = command = "DD_ab"
triggerall = power >= 500
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Light Hakikyaku
[State -1, Light Hakikyaku]
type = ChangeState
value = ifelse(var(57) = 1,1540,1300)
triggerall = var(58) = 0
triggerall = command = "DD_a"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Strong Hakikyaku
;カンフー蹴り（弱）
[State -1, Strong Hakikyaku]
type = ChangeState
value = ifelse(var(57) = 1,1542,1310)
triggerall = var(58) = 0
triggerall = command = "DD_b"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Fast Kung Fu Upper (1/3 super bar)
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1120
triggerall = var(58) = 0
triggerall = command = "upper_xy"
triggerall = power >= 500
trigger1 = var(1)
trigger2 = stateno = [1000,1020]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Light Kung Fu Upper
[State -1, Light Kung Fu Upper]
type = ChangeState
value = 1100
triggerall = var(58) = 0
triggerall = command = "upper_x"
trigger1 = var(1)
trigger2 = stateno = [1000,1020]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Strong Kung Fu Upper
[State -1, Strong Kung Fu Upper]
type = ChangeState
value = 1110
triggerall = var(58) = 0
triggerall = command = "upper_y"
trigger1 = var(1)
trigger2 = stateno = [1000,1020]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Fast Kung Fu Knee (1/3 super bar)
[State -1, Fast Kung Fu Knee]
type = ChangeState
value = 1070
triggerall = var(58) = 0
triggerall = command = "FF_ab"
triggerall = power >= 500
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [1500,1502]
trigger3 = time >= 40
trigger3 = movecontact = 1
;---------------------------------------------------------------------------
;Light Kung Fu Knee
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1050
triggerall = var(58) = 0
triggerall = command = "FF_a"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [1500,1502]
trigger3 = time >= 40
trigger3 = movecontact = 1
;---------------------------------------------------------------------------
;Strong Kung Fu Knee
[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1060
triggerall = var(58) = 0
triggerall = command = "FF_b"
trigger1 = var(1)
trigger2 = stateno = [1200,1220]
trigger2 = movecontact = 1
trigger3 = stateno = [1500,1502]
trigger3 = time >= 40
trigger3 = movecontact = 1
;---------------------------------------------------------------------------
;Fast Kung Fu Palm (1/3 super bar)
[State -1, Fast Kung Fu Palm]
type = ChangeState
value = 1020
triggerall = var(58) = 0
triggerall = command = "QCF_xy"
triggerall = power >= 500
trigger1 = var(1)
trigger2 = stateno = [1300,1320]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Light Kung Fu Palm
;カンフー突き手（弱）
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1000
triggerall = var(58) = 0
triggerall = command = "QCF_x"
trigger1 = var(1)
trigger2 = stateno = [1300,1320]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Strong Kung Fu Palm
;カンフー突き手（強）
[State -1, Strong Kung Fu Palm]
type = ChangeState
value = 1010
triggerall = var(58) = 0
triggerall = command = "QCF_y"
trigger1 = var(1)
trigger2 = stateno = [1300,1320]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = ifelse(var(57)=1,2100,1350)
triggerall = var(58) = 0
triggerall = var(57) < 2
triggerall = command = "revers_x" ||  command = "revers_y"
trigger1 = var(1)

;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = 2100
triggerall = var(58) = 0
triggerall = var(57) >= 2
triggerall = command = "revers_x"
trigger1 = var(1)

;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = 1350
triggerall = var(58) = 0
triggerall = var(57) >= 2
triggerall = command = "revers_y"
trigger1 = var(1)

;---------------------------------------------------------------------------
;Fast Kung Fu Blow (1/3 super bar)
[State -1, Fast Kung Fu Blow]
type = ChangeState
value = 1220
triggerall = var(58) = 0
triggerall = command = "QCB_xy"
triggerall = power >= 500
trigger1 = var(1)

;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = 1200
triggerall = var(58) = 0
triggerall = command = "QCB_x"
trigger1 = var(1)

;---------------------------------------------------------------------------
;Strong Kung Fu Blow
[State -1, Strong Kung Fu Blow]
type = ChangeState
value = 1210
triggerall = var(58) = 0
triggerall = command = "QCB_y"
trigger1 = var(1)

;---------------------------------------------------------------------------
;Fast Kung Fu Blow (1/3 super bar)
[State -1, Fast Kung Fu Blow]
type = ChangeState
value = 1270
triggerall = var(58) = 0
triggerall = var(57) != 1
triggerall = command = "CBF_xy"
triggerall = power >= 500
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Fast Kung Fu Blow (1/3 super bar)
[State -1, Fast Kung Fu Blow]
type = ChangeState
value = 1250
triggerall = var(58) = 0
triggerall = var(57) != 1
triggerall = command = "CBF_x"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Fast Kung Fu Blow (1/3 super bar)
[State -1, Fast Kung Fu Blow]
type = ChangeState
value = 1260
triggerall = var(58) = 0
triggerall = var(57) != 1
triggerall = command = "CBF_y"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = 1502
triggerall = var(57) != 1
triggerall = var(58) = 0
triggerall = power >= 500
triggerall = command = "CBF_ab"
trigger1 = var(1)
trigger2 = stateno = [1000,1020]
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = 1500
triggerall = var(57) != 1
triggerall = var(58) = 0
triggerall = command = "CBF_a" ||  command = "CBF_b"
trigger1 = var(1)
trigger2 = stateno = [1000,1020]
trigger2 = movecontact = 1

;===========================================================================
;---------------------------------------------------------------------------
;Run Fwd
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 19666
triggerall = var(58) = 0
trigger1 = var(31) = 0
trigger1 = var(38) = 0
trigger1 = palno < 12
trigger1 = command = "z" && command = "c"
trigger1 = statetype = S
trigger1 = ctrl

;===========================================================================
;---------------------------------------------------------------------------
;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
triggerall = var(58) = 0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Kung Fu Throw
;投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall = var(58) = 0
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
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 5
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H


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

;---------------------------------------------------------------------------
;Stand CD
[State -1, Stand Strong Punch]
type = ChangeState
value = 220
triggerall = var(58) = 0
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 229
trigger2 = screenpos x = [0,320]
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = [120,169]
trigger4 = power >= 1000
trigger4 = statetype != A

;Block then Knock
[State -1, Standing Strong Kick]
type = ChangeState
value = 242
triggerall = var(58) = 0
triggerall = command = "c"
triggerall = power >= 1000 && life > 0
triggerall = statetype != A
trigger1 = stateno = [150,153]
;---------------------------------------------------------------------------
; Back Evasion
[State -1, Stand Strong Punch]
type = ChangeState
value = 255
triggerall = var(58) = 0
triggerall = command = "z"
triggerall = command = "holdback"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 229
trigger2 = screenpos x = [0,320]
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = [120,169]
trigger4 = power >= 500
trigger4 = statetype != A

;---------------------------------------------------------------------------
;Evasion
[State -1, Stand Strong Punch]
type = ChangeState
value = 250
triggerall = var(58) = 0
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 229
trigger2 = screenpos x = [0,320]
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = [120,169]
trigger4 = power >= 500
trigger4 = statetype != A

;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(58) = 0
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = movecontact
;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = var(58) = 0
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 230) && movecontact

;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(58) = 0
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 230) && movecontact

;---------------------------------------------------------------------------
;Standing Strong Kick
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(58) = 0
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 230) && movecontact
trigger4 = (stateno = 21) && movecontact
;---------------------------------------------------------------------------
;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 = var(58) = 0
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 400
trigger2 = movecontact

;---------------------------------------------------------------------------
;Crouching Strong Punch
;しゃがみ強パンチ
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = var(58) = 0
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = movecontact

;---------------------------------------------------------------------------
;Crouching Light Kick
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(58) = 0
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = movecontact

;---------------------------------------------------------------------------
;Crouching Strong Kick
;しゃがみ強キック
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = var(58) = 0
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = movecontact

;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(58) = 0
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = statetime >= 7

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = var(58) = 0
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact

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

;---------------------------------------------------------------------------
;Jump Strong Kick
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = var(58) = 0
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact

[State -1, Jump Strong Kick]
type = ChangeState
value = 650
triggerall = var(58) = 0
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630
trigger2 = movecontact

[State -1, Taunt]
type = ChangeState
value = 705
triggerall = var(58) = 0
triggerall = command = "z"
trigger1 = stateno = 5050
trigger1 = pos y >=-40
