;thinnen's CMD ver 1.29
;--| CPU Motions |------------------------------------------------------
[command]
name = "AI1"
command = B,D,a+c,z,c+b,s
time = 1
[command]
name = "AI2"
command = B,F,c+b,z,c+z,x,s
time = 1
[command]
name = "AI3"
command = B,U,a+b,y,c+y,s,z,D
time = 1
[command]
name = "AI4"
command = B,B,a+y,c,z+x,s
time = 1
[command]
name = "AI5"
command = B,B,a+b,z,c+b,s
time = 1
[command]
name = "AI6"
command = D,B,z+b,z,c+x,s
time = 1
[command]
name = "AI7"
command = B,U,a+b,z,c+x,s
time = 1
[command]
name = "AI8"
command = B,F,a+b,c,c+x,s
time = 1
[Command]
name = "AI9"
command = U,D,F,F,B,B,s
time = 1
[Command]
name = "AI10"
command = U,D,F,F,B,F,s
time = 1
[Command]
name = "AI11"
command = U,D,F,F,B,D,s
time = 1
[Command]
name = "AI12"
command = U,D,F,F,B,U,s
time = 1
[Command]
name = "AI13"
command = U,D,F,F,U,B,s
time = 1
[Command]
name = "AI14"
command = U,D,F,F,D,B,s
time = 1
[Command]
name = "AI15"
command = U,D,F,F,F,B,s
time = 1
[Command]
name = "AI16"
command = U,D,U,F,B,B,s
time = 1
[Command]
name = "AI17"
command = U,D,D,F,B,B,s
time = 1
[Command]
name = "AI18"
command = D,D,F,F,B,B,s
time = 1
[Command]
name = "AI19"
command = U,U,F,F,B,B,s
time = 1
[Command]
name = "AI20"
command = U,B,F,F,B,B,s
time = 1
[Command]
name = "AI21"
command = UB, U, F, a+b,s
time = 1
[Command]
name = "AI22"
command = UB, U, F, b+c,s
time = 1
[Command]
name = "AI23"
command = UB, U, F, a+c,s
time = 1
[Command]
name = "AI24"
command = UF, U, B, x+y,s
time = 1
[Command]
name = "AI25"
command = UF, U, B, y+z,s
time = 1
[Command]
name = "AI26"
command = UF, U, B, x+z,s
time = 1
[Command]
name = "AI27"
command = UB, U, F, x+y,s
time = 1
[Command]
name = "AI28"
command = UB, U, F, y+z,s
time = 1
[Command]
name = "AI29"
command = UB, U, F, x+z,s
time = 1
[Command]
name = "AI30"
command = UF, U, B, a+b,s
time = 1
[Command]
name = "AI31"
command = UF, U, B, b+c,s
time = 1
[Command]
name = "AI32"
command = UF, U, B, a+c,s
time = 1
[Command]
name = "AI33"
command = UF, DB, UB,DF ,x,s
time = 1
[Command]
name = "AI34"
command = UF, DB, UB,DF ,y,s
time = 1
[Command]
name = "AI35"
command = UF, DB, UB,DF , z,s
time = 1

;-| special attack |------------------------
[command]
name = "yun_x"
command = ~D, DF, F, x
time = 15

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

[command]
name = "jubak_x"
command = ~D, DB, B, x
time = 15

[Command]
name = "jubak_y"
command = ~D, DB, B, y
time = 15

[Command]
name = "rekkoken_x"
command = ~B, F, B, x
time = 15
[Command]
name = "rekkoken_x"
command = ~F, B, F, x
time = 15

[Command]
name = "rekkoken_y"
command = ~B, F, B, y
time = 15
[Command]
name = "rekkoken_y"
command = ~F, B, F, y
time = 15

[Command]
name = "rekkoken_a"
command = ~B, F, B, a
time = 15
[Command]
name = "rekkoken_a"
command = ~F, B, F, a
time = 15

[Command]
name = "rekkoken_b"
command = ~B, F, B, b
time = 15
[Command]
name = "rekkoken_b"
command = ~F, B, F, b
time = 15

[command]
name = "yul_a"
command = ~D, DB, B, a
time = 15

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

[command]
name = "yul_a1"
command = ~D, DF, F, a
time = 15

[Command]
name = "yul_b1"
command = ~D, DF, F, b
time = 15

;[command]
;name = "yul_a2"
;command = ~F, D, DF, a
;time = 15
[Command]
name = "yul_a2"
command = ~D, DF, F, UF, a
time = 15
[Command]
name = "yul_a2"
command = ~D, F, UF, a
time = 15
[Command]
name = "yul_a2"
command = ~DF, F, UF, a
time = 15

;[Command]
;name = "yul_b2"
;command = ~F, D, DF, b
;time = 15
[Command]
name = "yul_b2"
command = ~D, DF, F, UF, b
time = 15
[Command]
name = "yul_b2"
command = ~D, F, UF, b
time = 15
[Command]
name = "yul_b2"
command = ~DF, F, UF, b
time = 15

;[command]
;name = "yul_a3"
;command = ~B, D, DB, a
;time = 15
[Command]
name = "yul_a3"
command = ~D, DB, B, UB, a
time = 15
[Command]
name = "yul_a3"
command = ~D, B, UB, a
time = 15
[Command]
name = "yul_a3"
command = ~DF, B, UB, a
time = 15

;[Command]
;name = "yul_b3"
;command = ~B, D, DB, b
;time = 15
[Command]
name = "yul_b3"
command = ~D, DB, B, UB, b
time = 15
[Command]
name = "yul_b3"
command = ~D, B, UB, b
time = 15
[Command]
name = "yul_b3"
command = ~DF, B, UB, b
time = 15

[Command]
name = "sshoot"
command = x+a+y
time = 1
[Command]
name = "sshoot"
command = x+y+b
time = 1
[Command]
name = "sshoot"
command = a+y+b
time = 1
[Command]
name = "sshoot"
command = x+a+b
time = 1
[Command]
name = "sshoot"
command = z
time = 1

;-| Double Tap |------------------------
[Command]
name = "FF"
command = F,F
time = 15

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

[Command]
name = "struggle"
command = B,F
time = 10

[Command]
name = "FB"
command = F,B
time = 10
;-| 2/3 Button Combination |-----------------
[Command]
name = "recovery";Required (do not remove)
command = x+a
time = 1
[Command]
name = "recovery";Extra recovery commands (optional)
command = c
time = 1

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

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

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

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

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

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

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

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

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

[Command]
name = "s"
command = s
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"
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

;--------------------------------------
; Commands
[Statedef -1]

;--------------------------------
[State -1];stop moving
type = ChangeState
value = 0
trigger1 = win = 1 && roundstate < 4 && ctrl && statetype != A
trigger2 = roundstate > 2 && var(55) = 1 && ctrl && statetype != A
;--------------------------------
;Stress shoot
[State -1]
type = ChangeState
value = 3000
triggerall = movetype != H && numhelper(3000) = 0 && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0
triggerall = ((statetype !=A&&ctrl)||(stateno = [200,530])||(stateno = [100,105]))&&(helper(1234),command="sshoot"||var(22)=17||command="sshoot"||(var(30)=3&&var(38) !=3))
trigger1 = power >= 3000 || var(53) = 1
;--------------------------------
;Yeon oc yung pa
[State -1]
type = ChangeState
value = 1000
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = command != "holdback" && numhelper(1234) > 0
triggerall = ((statetype !=A&&ctrl)||(stateno = [200,530])||(stateno = [100,105]))&&(((helper(1234),command="yun_y"||var(22)=2)&&facing=1)||((helper(1234),command="jubak_y"||var(22)=4)&&facing=-1)||command="yun_y"||(var(30)=8&&var(38) !=3))
trigger1 = (numhelper(1000) = 0 && numhelper(1100) = 0) || var(32) = 1
;--------------------------------
;Yeon oc yung pa1
[State -1]
type = ChangeState
value = 1100
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = command != "holdback" && numhelper(1234) > 0
triggerall = ((statetype !=A&&ctrl)||(stateno = [200,530])||(stateno = [100,105]))&&(((helper(1234),command="yun_x"||var(22)=1)&&facing=1)||((helper(1234),command="jubak_x"||var(22)=3)&&facing=-1)||command="yun_x"||(var(30)=7&&var(38) !=3))
trigger1 = (numhelper(1000) = 0 && numhelper(1100) = 0) || var(32) = 1
;--------------------------------
;Air yeon oc yung pa
[State -1]
type = ChangeState
value = 1200
triggerall = movetype != H && stateno != 51
triggerall = numhelper(1200) = 0 || var(33) = 1
triggerall = var(55) = 0
triggerall = command != "holdback" && numhelper(1234) > 0
triggerall = (statetype = A && ctrl) || (stateno = 50 || stateno = 54 || (stateno = [600,670]) || stateno = [700,730])
trigger1 = (facing=1&&(helper(1234),command="yun_x"||helper(1234),command="yun_y"||var(22)=1||var(22)=2))||(facing=-1&&(helper(1234),command="jubak_x"||helper(1234),command="jubak_y"||var(22)=[3,4]))||command="yun_x"||command="yun_y"
trigger2 = var(30) = [7,8]
trigger2 = var(38) !=3
;--------------------------------
;Ju bak bu
[State -1]
type = ChangeState
value = 1400
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = command != "holdfwd" && numhelper(1234) > 0
triggerall = ((statetype !=A&&ctrl)||(stateno = [200,530])||(stateno = [100,105]))&&(((helper(1234),command="jubak_y"||var(22)=4)&&facing=1)||((helper(1234),command="yun_y"||var(22)=2)&&facing=-1)||command="jubak_y"||(var(30)=10&&var(38) !=3))
trigger1 = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
;--------------------------------
;Ju bak bu1
[State -1]
type = ChangeState
value = 1500
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = command != "holdfwd" && numhelper(1234) > 0
triggerall = ((statetype !=A&&ctrl)||(stateno = [200,530])||(stateno = [100,105]))&&(((helper(1234),command="jubak_x"||var(22)=3)&&facing=1)||((helper(1234),command="yun_x"||var(22)=1)&&facing=-1)||command="jubak_x"||(var(30)=9&&var(38) !=3))
trigger1 = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
;--------------------------------
;Yul gyang gyun y
[State -1]
type = ChangeState
value = 1600
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0
triggerall = helper(1234),command = "rekkoken_y" || command = "rekkoken_y" || var(22) = 6||(var(30)=12&&var(38) !=3)
trigger1 = (statetype != A && ctrl) || (stateno = [200,530]) || (stateno = [100,105])
;--------------------------------
;Yul gyang gyun x
[State -1]
type = ChangeState
value = 1620
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0
triggerall = helper(1234),command = "rekkoken_x" || command = "rekkoken_x" || var(22) = 5||(var(30)=11&&var(38) !=3)
trigger1 = (statetype != A && ctrl) || (stateno = [200,530]) || (stateno = [100,105])
;--------------------------------
;Yul gyang gyun b
[State -1]
type = ChangeState
value = 1700
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0 && stateno != 300
triggerall = helper(1234),command = "rekkoken_b" || command = "rekkoken_b" || var(22) = 8||(var(30)=14&&var(38) !=3)
trigger1 = (statetype != A && ctrl) || (stateno = [200,530]) || (stateno = [100,105])
;--------------------------------
;Yul gyang gyun a
[State -1]
type = ChangeState
value = 1710
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0 && stateno != 300
triggerall = helper(1234),command = "rekkoken_a" || command = "rekkoken_a" || var(22) = 7||(var(30)=13&&var(38) !=3)
trigger1 = (statetype != A && ctrl) || (stateno = [200,530]) || (stateno = [100,105])
;--------------------------------
;Sum gyang yul gak b
[State -1]
type = ChangeState
value = 1800
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0
triggerall = (statetype !=A&&ctrl)||stateno = 40||(stateno = 50&&time<3)||(stateno = [200,530])||(stateno = [100,105])
trigger1 = ((helper(1234),command="yul_b2"||helper(1234),command="yul_b"||var(22)=10||var(22)=14)&&facing=1)||((helper(1234),command="yul_b3"||helper(1234),command="yul_b1"||var(22)=12||var(22)=16)&&facing=-1)||command="yul_b"||command="yul_b2"
trigger2 = var(30)=16&&var(38) !=3
;--------------------------------
;Sum gyang yul gak a
[State -1]
type = ChangeState
value = 1810
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0
triggerall = (statetype !=A&&ctrl)||stateno = 40||(stateno = 50&&time<3)||(stateno = [200,530])||(stateno = [100,105])
trigger1 = ((helper(1234),command="yul_a2"||helper(1234),command="yul_a"||var(22)=9||var(22)=13)&&facing=1)||((helper(1234),command="yul_a3"||helper(1234),command="yul_a1"||var(22)=11||var(22)=15)&&facing=-1)||command="yul_a"||command="yul_a2"
trigger2 = var(30)=15&&var(38) !=3
;--------------------------------
;Sum gyang yul gak b1
[State -1]
type = ChangeState
value = 1900
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0
trigger1 = (statetype !=A&&ctrl)||(stateno = [200,530])||(stateno = [100,105])
trigger1 = ((helper(1234),command="yul_b1"||var(22)=12)&&facing=1)||((helper(1234),command="yul_b"||var(22)=10)&&facing=-1)||command="yul_b1"||(var(30)=18&&var(38) !=3)
;--------------------------------
;Sum gyang yul gak a1
[State -1]
type = ChangeState
value = 1910
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0
triggerall = numhelper(1234) > 0
trigger1 = (statetype !=A&&ctrl)||(stateno = [200,530])||(stateno = [100,105])
trigger1 = ((helper(1234),command="yul_a1"||var(22)=11)&&facing=1)||((helper(1234),command="yul_a"||var(22)=9)&&facing=-1)||command="yul_a1"||(var(30)=17&&var(38) !=3)
;------------------------------------
;fwd step
[State -1]
type = ChangeState
value = 100
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0 && ctrl && statetype = S && stateno != 52
triggerall = numhelper(1234) > 0
trigger1 = helper(1234),command = "FF" && facing = 1 && var(2) > 0
trigger2 = helper(1234),command = "BB" && facing = -1 && var(2) < 0
trigger3 = (command = "FF" || (var(30)=19&&var(38) !=3)) && (numhelper(1400) > 0 || numhelper(1500) > 0)
trigger3 = (facing = 1 && var(2) > 1) || (facing = -1 && var(2) < -1)
;------------------------------------
;back step
[State -1]
type = ChangeState
value = 105
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0 && ctrl && statetype = S && stateno != 52
triggerall = numhelper(1234) > 0
trigger1 = helper(1234),command = "BB" && facing = 1 && var(2) < 0
trigger2 = helper(1234),command = "FF" && facing = -1 && var(2) > 0
trigger3 = (command = "BB" || (var(30)=20&&var(38) !=3)) && (numhelper(1400) > 0 || numhelper(1500) > 0)
trigger3 = (facing = 1 && var(2) < -1) || (facing = -1 && var(2) > 1)
;--------------------------------
; turn
[State -1]
type = ChangeState
value = 249
trigger1 = movetype != H && stateno != 51
trigger1 = var(55) = 0 && ctrl
trigger1 = command = "turn"
trigger1 = statetype != A
;--------------------------------
; roll fwd
[State -1]
type = ChangeState
value = 1300
trigger1 = movetype != H && stateno != 51
trigger1 = var(55) = 0 && ctrl
trigger1 = (command = "recovery"||(var(30)=6&&var(38) !=3)) && statetype != A && command != "holdback"
;--------------------------------
; roll back
[State -1]
type = ChangeState
value = 1310
trigger1 = movetype != H && stateno != 51
trigger1 = var(55) = 0 && ctrl
trigger1 = (command = "recovery"||(var(30)=6&&var(38) !=3)) && statetype != A && command = "holdback"
;-------------------------------------
;Stand_x Close
[State -1]
type = ChangeState
value = 210
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3))
triggerall = p2bodydist X <= 20 && P2dist X >= 0
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_x
[State -1]
type = ChangeState
value = 220
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3))
triggerall = p2bodydist X > 20
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_a Close
[State -1]
type = ChangeState
value = 230
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3))
triggerall = p2bodydist X <= 20 && P2dist X >= 0
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_a
[State -1]
type = ChangeState
value = 240
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3))
triggerall = p2bodydist X > 20
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_y Close
[State -1]
type = ChangeState
value = 200
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3)) && command != "hold_s"
triggerall = p2bodydist X <= 25 && P2dist X >= 0
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_y
[State -1]
type = ChangeState
value = 260
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3))
triggerall = p2bodydist X > 25
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_b close
[State -1]
type = ChangeState
value = 270
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3))
triggerall = p2bodydist X <= 25 && P2dist X >= 0
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_b
[State -1]
type = ChangeState
value = 280
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3))
triggerall = p2bodydist X > 25
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Stand_x Close1
[State -1]
type = ChangeState
value = 310
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3))
triggerall = p2bodydist X <= 20 && P2dist X >= 0; && p2dist y >= -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Stand_x1
[State -1]
type = ChangeState
value = 320
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3))
triggerall = p2bodydist X > 20; || p2dist y < -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Stand_a Close1
[State -1]
type = ChangeState
value = 330
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3))
triggerall = p2bodydist X <= 20 && P2dist X >= 0 && p2dist y >= -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Stand_a1
[State -1]
type = ChangeState
value = 340
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3))
triggerall = p2bodydist X > 20 || p2dist y < -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Stand_y Close1
[State -1]
type = ChangeState
value = 350
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd" || command = "hold_s"
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3))
triggerall = p2bodydist X <= 25 && P2dist X >= 0; && p2dist y >= -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Stand_y1
[State -1]
type = ChangeState
value = 360
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3))
triggerall = p2bodydist X > 25; || p2dist y < -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Stand_b close1
[State -1]
type = ChangeState
value = 370
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3))
triggerall = p2bodydist X <= 18 && P2dist X >= 0; && p2dist y >= -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Stand_b1
[State -1]
type = ChangeState
value = 380
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3))
triggerall = p2bodydist X > 18; || p2dist y < -50
triggerall = command != "holddown" && command != "holdup"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
;-------------------------------------
;Crouch_x
[State -1]
type = ChangeState
value = 400
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Crouch_a
[State -1]
type = ChangeState
value = 410
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Crouch_y
[State -1]
type = ChangeState
value = 420
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Crouch_b
[State -1]
type = ChangeState
value = 430
triggerall = movetype != H && stateno != 51
triggerall = command != "holdfwd"
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 || stateno = 220 || stateno = 400
trigger2 = time > 3
;-------------------------------------
;Crouch_x1
[State -1]
type = ChangeState
value = 500
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
trigger3 = stateno = 510
trigger3 = time > 7
;-------------------------------------
;Crouch_a1
[State -1]
type = ChangeState
value = 510
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
trigger3 = stateno = 510
trigger3 = time > 7
;-------------------------------------
;Crouch_y1
[State -1]
type = ChangeState
value = 520
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
trigger3 = stateno = 510
trigger3 = time > 7
;-------------------------------------
;Crouch_b1
[State -1]
type = ChangeState
value = 530
triggerall = movetype != H && stateno != 51
triggerall = command = "holdfwd"
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3)) && command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 310 || stateno = 320 || stateno = 500
trigger2 = time > 3
trigger3 = stateno = 510
trigger3 = time > 7
;-------------------------------------
;jump_xf
[State -1]
type = ChangeState
value = 600
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3)) && vel x != 0
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_af
[State -1]
type = ChangeState
value = 610
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3)) && vel x != 0
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_yf
[State -1]
type = ChangeState
value = 620
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3)) && vel x != 0 && command != "hold_s"
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_bf
[State -1]
type = ChangeState
value = 630
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3)) && vel x != 0
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_xn
[State -1]
type = ChangeState
value = 640
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3)) && vel x = 0
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_an
[State -1]
type = ChangeState
value = 650
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3)) && vel x = 0
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_yn
[State -1]
type = ChangeState
value = 660
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3)) && vel x = 0 && command != "hold_s"
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_bn
[State -1]
type = ChangeState
value = 670
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3)) && vel x = 0
triggerall = command != "holdfwd" || command = "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_x1
[State -1]
type = ChangeState
value = 700
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3))
triggerall = command = "holdfwd" && command != "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_a1
[State -1]
type = ChangeState
value = 710
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3))
triggerall = command = "holdfwd" && command != "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_y1
[State -1]
type = ChangeState
value = 720
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3))
triggerall = (command = "holdfwd" && command != "holdup") || command = "hold_s"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;jump_b1
[State -1]
type = ChangeState
value = 730
triggerall = movetype != H
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3))
triggerall = command = "holdfwd" && command != "holdup"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 50 || stateno = 54 || stateno = 51
;-------------------------------------
;dash_y
[State -1]
type = ChangeState
value = 300
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0 && (command = "y"||(var(30) = 2&&var(38) !=3))
trigger1 = stateno = 100
;-------------------------------------
;dash_b
[State -1]
type = ChangeState
value = 390
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0 && (command = "b"||(var(30) = 5&&var(38) !=3))
trigger1 = stateno = 100
;-------------------------------------
;dash_x
[State -1]
type = ChangeState
value = 302
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0 && (command = "x"||(var(30) = 1&&var(38) !=3))
trigger1 = stateno = 100
;-------------------------------------
;dash_a
[State -1]
type = ChangeState
value = 312
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 0 && (command = "a"||(var(30) = 4&&var(38) !=3))
trigger1 = stateno = 100

;--------------------------------------------------------------------------
;   AI action
;--------------------------------------------------------------------------
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI1"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI2"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI3"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI4"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI5"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI6"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI7"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI8"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI9"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI10"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI11"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI12"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI13"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI14"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI15"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI16"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI17"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI18"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI19"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI20"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI21"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI22"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI23"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI24"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI25"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI26"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI27"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI28"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI29"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI30"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI31"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI32"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI33"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI34"
var(55) = 1
[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
trigger1 = command = "AI35"
var(55) = 1
;--------------------------------------
; Air recover
[State -2]
type = ChangeState
value = 5210
triggerall = var(55) = 1
triggerall = Vel Y > 0
triggerall = Pos Y < -20
triggerall = Pos Y >= -110
triggerall = p2movetype = A
triggerall = stateno = 5050
triggerall = var(31) < 2
trigger1 = random <= 300
trigger1 = alive
trigger1 = canrecover
;-------------------------------------
;Ground recover
[State -2]
type = ChangeState
value = 5201
triggerall = var(55) = 1
triggerall = Vel Y > 0
triggerall = p2movetype = A
triggerall = alive
triggerall = random <= 900
trigger1 = Pos Y >= -20
trigger1 = stateno = 5050
trigger1 = canrecover

[state -2];CROUCH GUARD
type = ChangeState
value = 131
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = var(55) = 1
triggerall = p2dist X > 0
triggerall = p2bodydist Y >= -80
triggerall = ctrl
trigger1 = enemynear,name = "iori yagami" && enemynear,authorname = "[yagami+ihoo1836]"
trigger1 = enemynear,numhelper(7602) > 0 || (enemynear,stateno = [7599,7601]) || enemynear,stateno = [7700,7701]
trigger1 = enemynear,facing != facing && random < 500
[state -2];STAND GUARD
type = ChangeState
value = 130
triggerall = statetype != A
triggerall = p2statetype != L   
triggerall = var(55) = 1
triggerall = p2dist X > 0
triggerall = p2bodydist Y >= -80
triggerall = ctrl
trigger1 = enemynear,name = "iori yagami" && enemynear,authorname = "[yagami+ihoo1836]"
trigger1 = enemynear,numhelper(7602) > 0 || (enemynear,stateno = [7599,7601]) || enemynear,stateno = [7700,7701]
trigger1 = enemynear,facing != facing

;RunFwd
[state -2]
type = ChangeState
value = 100
triggerall = var(55) = 1 && stateno != 51 && stateno != 52
triggerall = statetype != A && ctrl
triggerall = p2movetype != A && p2statetype != L
triggerall = enemynear,numproj = 0 || enemynear,name = "D'raven" || enemynear,name = "FF1 Cody Travers"
triggerall = frontedgedist > 50 && p2dist y > -100
trigger1 = p2dist X > 150
trigger1 = random <= 200
trigger2 = p2movetype = H && (numhelper(1400) > 0 || numhelper(1500) > 0)
trigger2 = p2stateno = 1406 || p2stateno = 1506
trigger2 = random < 900
trigger3 = p2dist X < 110
trigger3 = p2movetype != A && enemynear,vel x <= 0
trigger3 = random <= 50
trigger4 = p2movetype != A && p2stateno = [5300,5308]
trigger4 = random < 900

;Back step
[state -2]
type = ChangeState
value = 105
triggerall = var(55) = 1 && stateno != 51 && stateno != 52
triggerall = statetype != A
triggerall = ctrl
trigger1 = p2stateno = 5120
trigger1 = p2bodydist X <= 20
trigger1 = random <= 200
trigger2 = p2dist x < 200 && p2dist x > 150 && random < 50
trigger3 = p2dist x > 0
trigger3 = p2dist x < 100 && p2dist y < -70 && p2movetype = A && random < 50

; Do Jumping
[state -2]
type = ChangeState
value = 40
triggerall = var(55) = 1
triggerall = ctrl
triggerall = statetype = S
trigger1 = p2statetype != L
trigger1 = random <= 20
trigger1 = p2statetype != A
trigger1 = p2bodydist X <= 20
trigger2 = p2statetype != L
trigger2 = p2statetype != A
trigger2 = p2bodydist X > 100
trigger2 = p2bodydist X <= 225
trigger2 = random <= 25
trigger3 = p2statetype != L
trigger3 = p2statetype != A
trigger3 = p2bodydist X > 225
trigger3 = random <= 70
trigger4 = p2stateno = 5120
trigger4 = p2bodydist X <= 25
trigger4 = p2movetype != H
trigger4 = random <= 200
trigger5 = p2bodydist Y < -80 && p2bodydist Y > -125 && p2bodydist X <= 15 && p2bodydist X >= -30
trigger5 = random < 20

;Roll forward
[state -2]
type = ChangeState
value = 1300
triggerall = statetype != A
triggerall = p2statetype != L   
triggerall = var(55) = 1
triggerall = ctrl
triggerall = p2movetype = A && facing != enemynear,facing
triggerall = frontedgedist > 80
trigger1 = p2bodydist X <= 30
trigger1 = random <= 10
trigger2 = p2bodydist X <= 10
trigger2 = p2bodydist Y <= -330
trigger2 = p2movetype = A
trigger2 = backedgedist <= 10
trigger2 = random <= 300
trigger3 = p2dist x < 20 && p2dist x > -20 && p2dist y < -100
trigger3 = random < 200
; Roll backward
[state -2]
type = ChangeState
value = 1310
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = statetype = S
triggerall = ctrl
triggerall = p2dist X > 20
trigger1 = p2bodydist X <= 40
trigger1 = p2bodydist Y <= -330
trigger1 = p2movetype = A
trigger1 = random <= 990
trigger2 = p2dist x < 20 && p2dist x > -20 && p2dist y < -100
trigger2 = random < 200
;--------------------------------
;Advent
[State -1]
type = ChangeState
value = 3000
triggerall = movetype != H && numhelper(3000) = 0 && stateno != 51
triggerall = var(55) = 1 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = statetype !=A && ctrl
triggerall = power >= 3000 || var(53) = 1
trigger1 = p2dist x > 200 && random < 35
trigger2 = p2dist x < 50 && random < 35 && p2dist y > -120
trigger2 = p2movetype != A || facing = enemynear,facing
trigger3 = p2dist x > 150 && p2dist x < 200 && random < 35
trigger4 = p2dist x > 50 && p2dist x < 150 && p2dist y > -150
trigger4 = (p2movetype = A && random < 20)||(p2movetype != A && random < 25)
;-------------------------------------
;Crouch_a
[State -1]
type = ChangeState
value = 410
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 77 && p2dist x > 0 && p2dist y > -1
triggerall = statetype != A && ctrl
trigger1 = stateno = 52 && p2movetype = H && time = 1 && random < 125
trigger2 = random < 25
;-------------------------------------
;Crouch_a1
[State -1]
type = ChangeState
value = 510
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 92 && p2dist x > 0 && p2dist y > -1
triggerall = statetype != A && ctrl
trigger1 = stateno = 52 && p2movetype = H && time = 1 && random < 167
trigger2 = random < 25
;-------------------------------------
;Crouch_y1
[State -1]
type = ChangeState
value = 520
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 130 && p2dist x > 100
triggerall = statetype != A && ctrl && p2dist y < -100 && p2dist y > -120
trigger1 = enemynear,vel y > 0 && enemynear,vel x > 0 && random < 25
;-------------------------------------
;Crouch_y
[State -1]
type = ChangeState
value = 420
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 48 && p2dist x > 0 && p2dist y > -1
triggerall = statetype != A && ctrl
trigger1 = p2movetype != H && p2movetype != A && random < 25
;-------------------------------------
;Crouch_b
[State -1]
type = ChangeState
value = 430
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 119 && p2dist x > 80 && p2dist y > -1
triggerall = statetype != A && ctrl
trigger1 = random < 13
;-------------------------------------
;Crouch_b1
[State -1]
type = ChangeState
value = 530
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 129 && p2dist x > 80 && p2dist y > -1
triggerall = statetype != A && ctrl
trigger1 = random < 13
;-------------------------------------
;Stand_y Close1
[State -1]
type = ChangeState
value = 350-ifelse(random<500,150,0)
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1
triggerall = p2bodydist X <= 25 && P2dist X > 0 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = (random < 100 && p2movetype != A) || (random < 10 && p2movetype = A)
trigger1 = p2dist y > -1
trigger2 = facing = enemynear,facing && random < 500 && p2dist y > -100
trigger3 = p2name != "BigWomen" && p2name != "CADILLACS"
trigger3 = p2name != "Madgear" && p2name != "DARK WARRIOR2"
trigger3 = p2name != "Onslaught" && p2name != "Apocalypse"
trigger3 = p2bodydist x < 5 && p2dist y > -1
trigger3 = (random < 200 && p2movetype != A) || (random < 100 && p2movetype = A)
;-------------------------------------
;Stand_a Close
[State -1]
type = ChangeState
value = 230+ifelse(random<500,100,0)
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1
triggerall = p2bodydist X <= 25 && P2dist X > 0 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = random < 25 && p2dist y > -1
trigger1 = p2movetype != A || facing = enemynear,facing
;-------------------------------------
;Stand_x Close
[State -1]
type = ChangeState
value = 210+ifelse(random<500,100,0)
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1
triggerall = p2bodydist X <= 20 && P2dist X > 0 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = random < 25 && p2dist y > -40
trigger1 = p2movetype != A || facing = enemynear,facing
;-------------------------------------
;Stand_a1
[State -1]
type = ChangeState
value = 340-ifelse(P2dist X<100&&random<500,100,0)
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x > 91
triggerall = p2bodydist X > 25 && P2dist X < 105 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = random < 25 && p2dist y > -1
trigger1 = p2movetype != A || facing = enemynear,facing
;-------------------------------------
;Stand_x1
[State -1]
type = ChangeState
value = 320
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x > 91
triggerall = p2bodydist X > 25 && P2dist X < 103 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = random < 25 && p2dist y > -1
trigger1 = p2movetype != A || facing = enemynear,facing
;-------------------------------------
;Stand_y1
[State -1]
type = ChangeState
value = 360
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1
triggerall = p2dist X < 101 && P2bodydist X > 25 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = random < 25 && p2dist y > -1
trigger1 = p2movetype != A || facing = enemynear,facing
trigger2 = (p2stateno = 1406 || p2stateno = 1506) && (numhelper(1400)>0 || numhelper(1500)>0)
trigger2 = p2movetype = H && random < 200
;-------------------------------------
;Stand_y
[State -1]
type = ChangeState
value = 260
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1
triggerall = p2dist X < 93 && P2bodydist X > 25 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = random < 25 && p2dist y > -1
trigger1 = p2movetype != A || facing = enemynear,facing
trigger2 = (p2stateno = 1406 || p2stateno = 1506) && (numhelper(1400)>0 || numhelper(1500)>0)
trigger2 = p2movetype = H && random < 200
;-------------------------------------
;Stand_b1
[State -1]
type = ChangeState
value = 380
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist y > -60
triggerall = p2dist X < 149 && P2dist X > 130 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = p2movetype != A || facing = enemynear,facing
trigger1 = random < 25
;-------------------------------------
;Stand_b1
[State -1]
type = ChangeState
value = 280
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist y > -1
triggerall = p2dist X < 95 && P2dist X > 84 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = p2movetype != A || facing = enemynear,facing
trigger1 = random < 25
trigger2 = (p2stateno = 1406 || p2stateno = 1506) && (numhelper(1400)>0 || numhelper(1500)>0)
trigger2 = p2movetype = H && random < 200
;-------------------------------------
;Stand_b close
[State -1]
type = ChangeState
value = 270
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist y < -65
triggerall = p2bodydist X < 25 && P2dist X > 0 && stateno != 52
triggerall = statetype != A && ctrl
trigger1 = random < 40

;air guard
[state -2]
type = ChangeState
value = 132
trigger1 = statetype = A
trigger1 = var(55) = 1
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist X > 75
ctrl = 1
;-------------------------------------
;jump_af
[State -1]
type = ChangeState
value = 610+ifelse(random<50,-10,ifelse(random<100,10,ifelse(random<200,20,0)))
triggerall = movetype != H && p2dist x > 0 && p2dist x < 80 && p2dist y > 10
triggerall = var(55) = 1 && vel x != 0 && random < 300
triggerall = (statetype = A && ctrl) || stateno = 50 || stateno = 54 || stateno = 51
trigger1 = p2dist y < 150 && vel y >= 0
trigger2 = p2dist y < 30 && vel y < 0
;-------------------------------------
;jump_an
[State -1]
type = ChangeState
value = 650+ifelse(random<100,-10,ifelse(random<200,20,0))
triggerall = movetype != H && p2dist x > 0 && p2dist x < 90
triggerall = var(55) = 1 && vel x = 0 && random < 300
triggerall = (statetype = A && ctrl) || stateno = 50 || stateno = 54 || stateno = 51
triggerall = p2dist y < 110 && vel y >= 0
trigger1 = p2dist y > -40 && enemynear,vel y < 0
trigger2 = p2dist y > -80 && enemynear,vel y >= 0
;-------------------------------------
;jump_bf1
[State -1]
type = ChangeState
value = 730
triggerall = movetype != H && p2dist x > 0 && p2dist x < 110
triggerall = var(55) = 1 && random < 300
triggerall = (statetype = A && ctrl) || stateno = 50 || stateno = 54 || stateno = 51
triggerall = p2dist y < 110
trigger1 = (p2dist y > -50 && enemynear,vel y <= 0) || (p2dist y > -90 && enemynear,vel y > 0)
trigger1 = (vel y >= 0 && enemynear,vel y <= 0) || (vel y < 0 && enemynear,vel y > 0)
;-------------------------------------
;jump_af1
[State -1]
type = ChangeState
value = 710
triggerall = movetype != H && p2dist x > 0 && p2dist x < 110
triggerall = var(55) = 1 && random < 300
triggerall = (statetype = A && ctrl) || stateno = 50 || stateno = 54 || stateno = 51
triggerall = p2dist y < 110
trigger1 = (p2dist y > -50 && enemynear,vel y <= 0) || (p2dist y > -90 && enemynear,vel y > 0)
trigger1 = (vel y >= 0 && enemynear,vel y <= 0) || (vel y < 0 && enemynear,vel y > 0)
;-------------------------------------
;jump_yn
[State -1]
type = ChangeState
value = 660
triggerall = movetype != H && p2dist x > 0 && p2dist x < 80
triggerall = var(55) = 1 && vel x = 0 && random < 300
triggerall = (statetype = A && ctrl) || stateno = 50 || stateno = 54 || stateno = 51
triggerall = (p2dist y < 50 && vel y >= 0) || (p2dist y < 10 && vel y < 0)
trigger1 = p2dist y > -90 && enemynear,vel y < 0
trigger2 = p2dist y > -130 && enemynear,vel y >= 0
;-------------------------------------
;jump_y1
[State -1]
type = ChangeState
value = 720
triggerall = movetype != H && p2dist x > 0 && p2dist x < 80
triggerall = var(55) = 1 && random < 300
triggerall = (statetype = A && ctrl) || stateno = 50 || stateno = 54 || stateno = 51
triggerall = (p2dist y < 50 && vel y >= 0) || (p2dist y < 10 && vel y < 0)
trigger1 = p2dist y > -90 && enemynear,vel y < 0
trigger2 = p2dist y > -130 && enemynear,vel y >= 0
trigger3 = p2bodydist x < 5 && p2dist y > -50
trigger3 = (random < 200 && p2movetype != A) || (random < 100 && p2movetype = A)
;--------------------------------
;Air Purgatory
[State -1]
type = ChangeState
value = 1200
triggerall = movetype != H
triggerall = var(55) = 1 && p2dist x < 150
triggerall = (statetype = A && ctrl) || stateno = 50 || stateno = 54 || stateno = 51
triggerall = numhelper(1200) = 0 || var(33) = 1
trigger1 = pos y < -50 && pos y > -100 && random < 10
trigger2 = p2dist x < 70 && p2dist x > -70 && p2dist y < 33 && random < 100
;--------------------------------
;Yul gyang gyun y
[State -1]
type = ChangeState
value = 1600
triggerall = movetype != H && stateno != 51 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 84 && p2dist x > 0 && p2stateno != 5050
triggerall = (statetype != A && ctrl) || stateno = 100
triggerall = (p2dist y > -120 && p2dist y < -110 && enemynear,vel x <=0) || p2dist y > -20
trigger1 = p2movetype = H && random < 250
trigger2 = p2movetype != H && random < 25
;trigger3 = (p2stateno = 1406 || p2stateno = 1506) && (numhelper(1400)>0 || numhelper(1500)>0)
trigger3 = p2stateno = 1406 && numhelper(1400) > 0
trigger3 = p2movetype = H && random < 500
trigger4 = stateno = 52 && p2movetype = H && time = 1 && random < 250
;--------------------------------
;Yul gyang gyun b
[State -1]
type = ChangeState
value = 1700
triggerall = p2stateno != 1406 || p2movetype != H
triggerall = movetype != H && stateno != 51 && stateno != 300 && p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = var(55) = 1 && p2dist x < 101 && p2dist x > 0 && p2stateno != 5050
triggerall = (statetype != A && ctrl) || stateno = 100
triggerall = (p2dist y > -120 && p2dist y < -110 && enemynear,vel x <=0) || p2dist y > -20
trigger1 = p2movetype = H && random < 250
trigger2 = p2movetype != H && random < 25
;trigger3 = (p2stateno = 1406 || p2stateno = 1506) && (numhelper(1400)>0 || numhelper(1500)>0)
trigger3 = p2stateno = 1506 && numhelper(1500) > 0
trigger3 = p2movetype = H && random < 500
trigger4 = stateno = 52 && p2movetype = H && time = 1 && random < 500
;--------------------------------
;Flash_a
[State -1]
type = ChangeState
value = 1810
triggerall = movetype != H && stateno != 51 && p2stateno != 5050
triggerall = var(55) = 1 && p2statetype != L && p2statetype = S
triggerall = p2statetype != A || p2movetype != H
triggerall = statetype !=A && ctrl && p2dist y > -100
trigger1 = p2bodydist x <= 30 && p2movetype != A && p2dist x > 0
trigger1 = random < 25
trigger2 = backedgedist >= 23 && random < 50 && p2movetype = A
trigger2 = p2dist x < 73 && p2dist x > -72
;--------------------------------
;Flash_b
[State 10, 2]
type = ChangeState
triggerall = movetype != H && stateno != 51 && p2stateno != 5050
triggerall = var(55) = 1 && p2statetype != L && p2statetype = S && p2dist y > -100
triggerall = p2statetype != A || p2movetype != H
triggerall = statetype !=A && ctrl && p2movetype = A && p2dist x < 73 && p2dist x > -72
trigger1 = p2life <= 44 && random < 500
trigger2 = (backedgedist < 23 && random < 100) || (backedgedist >= 23 && random < 50)
trigger3 = p2dist x > 100 && p2dist x < 200 && p2dist y < -70 && p2statetype = A
trigger3 = random < 100
value = 1800
;--------------------------------
;Flash_b1
[State 10, 2]
type = ChangeState
triggerall = movetype != H && stateno != 51 && p2stateno != 5050
triggerall = var(55) = 1 && p2statetype != L && p2statetype = S
triggerall = p2statetype != A || p2movetype != H
triggerall = statetype !=A && ctrl && p2movetype = A
trigger1 = random < 50 && p2dist y > -1 && p2dist x < 191 && p2dist x > 164
trigger2 = p2dist x > 100 && p2dist x < 200 && p2dist y < -70 && p2statetype = A
trigger2 = random < 100
value = 1900
;--------------------------------
;Purgatory
[State -1]
type = ChangeState
value = 1000
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 1
triggerall = statetype !=A && ctrl
triggerall = (numhelper(1000) = 0 && numhelper(1100) = 0) || var(32) = 1
triggerall = p2dist x > 130 || facing = enemynear,facing
triggerall = enemynear,name != "iori yagami" || enemynear,authorname != "[yagami+ihoo1836]" || enemynear,numhelper(7602) = 0 || enemynear,facing = facing
trigger1 = p2dist x > 150 && random < 10
trigger2 = p2dist x <= 150 && p2dist x > 100 && p2movetype = A
trigger2 = p2dist y > -70 && enemynear,vel y >= 0 && random < 5
trigger3 = p2dist x <= 100 && p2movetype != A
trigger3 = p2dist y > -70 && random < 10
;--------------------------------
;Purgatory1
[State -1]
type = ChangeState
value = 1100
triggerall = movetype != H && stateno != 51
triggerall = var(55) = 1
triggerall = statetype !=A && ctrl
triggerall = (numhelper(1000) = 0 && numhelper(1100) = 0) || var(32) = 1
triggerall = enemynear,name != "iori yagami" || enemynear,authorname != "[yagami+ihoo1836]" || enemynear,numhelper(7602) = 0 || enemynear,facing = facing
trigger1 = p2dist x > 150 && random < 10
trigger2 = p2dist x <= 150 && p2dist x > 100 && p2movetype = A
trigger2 = p2dist y > -70 && enemynear,vel y >= 0 && random < 5
trigger3 = p2dist x <= 100 && p2movetype != A
trigger3 = p2dist y > -70 && random < 10
;--------------------------------
;Binding
[State -1]
type = ChangeState
value = 1400
triggerall = movetype != H && stateno != 51 && p2stateno != 5050
triggerall = var(55) = 1 && p2statetype != L && p2dist x > 50
triggerall = p2statetype != A || p2movetype != H
triggerall = statetype !=A && ctrl && p2dist y > -130 && enemynear,vel y >= 0
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
trigger1 = random < 10 && p2dist x > 102
trigger2 = p2dist x < 103 && p2movetype != A && random < 10
trigger2 = p2dist x < 103 && p2movetype = A && random < 5
;--------------------------------
;Binding1
[State -1]
type = ChangeState
value = 1500
triggerall = movetype != H && stateno != 51 && p2stateno != 5050
triggerall = var(55) = 1 && p2statetype != L && p2dist x > 50
triggerall = p2statetype != A || p2movetype != H
triggerall = statetype !=A && ctrl && p2dist y > -130 && enemynear,vel y >= 0
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
trigger1 = random < 10 && p2dist x > 102
trigger2 = p2dist x < 103 && p2movetype != A && random < 10
trigger2 = p2dist x < 103 && p2movetype = A && random < 5

[state -2];STAND GUARD
type = ChangeState
value = 130
triggerall = statetype != A
triggerall = p2statetype != L   
triggerall = var(55) = 1
triggerall = p2dist X >= -20
triggerall = p2bodydist Y >= -100
triggerall = ctrl
trigger1 = p2movetype = A && p2bodydist X <= 250
trigger1 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
trigger2 = p2movetype != A
trigger2 = enemynear,numproj > 0 && enemynear,name != "D'raven" && enemynear,name != "FF1 Cody Travers" && enemynear,authorname != "ihoo1836"
[state -2];CROUCH GUARD
type = ChangeState
value = 131
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = var(55) = 1
triggerall = p2dist X >= -20
triggerall = p2bodydist Y >= -100
triggerall = ctrl
trigger1 = p2movetype = A && p2bodydist X <= 250
trigger1 = (p2statetype = C && random < 900) || gametime%30 < 25
trigger2 = enemynear,numproj > 0 && enemynear,name != "D'raven" && enemynear,name != "FF1 Cody Travers" && enemynear,authorname != "ihoo1836"