;-| Super Motions |------------------------------------------------
[Command]
name = "AI"
command = ~x+y+z+a+b+c+s,x+y+z+a+b+c+s
time = 0

[command]
name = "Phoenix Force"
command = ~D, DF, F, D, DF, F, z
time = 25

[Command];シャイニングクリスタルビット
name = "2hcb_x"
command = ~F, D, B, F, D, B, x
time = 40
[Command]
name = "2hcb_y"
command = ~F, D, B, F, D, B, y
time = 40
[Command]
name = "2hcb_z"
command = ~F, D, B, F, D, B, z
time = 40

[Command]
name = "2hcb_x"
command = ~F, $D, B, F, $D, B, x
time = 40
[Command]
name = "2hcb_y"
command = ~F, $D, B, F, $D, B, y
time = 40
[Command]
name = "2hcb_z"
command = ~F, $D, B, F, $D, B, z
time = 40

[Command]
name = "bhcb_x"
command = ~B, F, D, B, x
time = 30
[Command]
name = "bhcb_y"
command = ~B, F, D, B, y
time = 30
[Command]
name = "bhcb_z"
command = ~B, F, D, B, z
time = 30

[Command]
name = "bhcb_x"
command = ~B, F, $D, B, x
time = 30
[Command]
name = "bhcb_y"
command = ~B, F, $D, B, y
time = 30
[Command]
name = "bhcb_z"
command = ~B, F, $D, B, z
time = 30

[Command];フェニックスファングアロー
name = "2qcf_x"
command = ~D, F, D, F, x
time = 25
[Command]
name = "2qcf_y"
command = ~D, F, D, F, y
time = 25
[Command]
name = "2qcf_z"
command = ~D, F, D, F, z
time = 25
[Command]
name = "2qcf_a"
command = ~D, F, D, F, a
time = 25
[Command]
name = "2qcf_b"
command = ~D, F, D, F, b
time = 25

[Command]
name = "2qcb_start"
command = ~D, B, D, B, s
time = 25

;-| Special Motions |----------------------------------------------
[Command];サイコソード
name = "upper_x"
command = ~F, D, DF, x
[Command]
name = "upper_y"
command = ~F, D, DF, y

[Command];スーパーサイキックスルー
name = "hcf_x"
command = ~B, D, F, x
time = 20
[Command]
name = "hcf_y"
command = ~B, D, F, y
time = 20

[Command];サイコリフレクター
name = "hcb_a"
command = ~F, D, B, a
time = 20
[Command]
name = "hcb_b"
command = ~F, D, B, b
time = 20

[Command];サイキックテレポート
name = "qcf_a"
command = ~D, DF, F, a
[Command]
name = "qcf_b"
command = ~D, DF, F, b

[Command];サイコボールアタック
name = "qcb_x"
command = ~D, DB, B, x
[Command]
name = "qcb_y"
command = ~D, DB, B, y
[Command]
name = "qcb_z"
command = ~D, DB, B, z
[Command];フェニックスアロー
name = "qcb_a"
command = ~D, DB, B, a
[Command]
name = "qcb_b"
command = ~D, DB, B, b

[command]
name = "superjump"
command = $D,$U

;-| Double Tap |---------------------------------------------------
[Command]
name = "UU"
command = U, U
time = 10
[Command]
name = "DD"
command = D, D
time = 10
[Command]
name = "FF"
command = F, F
time = 10
[Command]
name = "BB"
command = B, B
time = 10

;-| 2/3 Button Combination |---------------------------------------
[Command]
name = "recovery"
command = x+a
time = 1

;-| Single Button |------------------------------------------------
[Command]
name = "x"
command = x
time = 1
[Command]
name = "y"
command = y
time = 1
[Command]
name = "z"
command = z
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 = "start"
command = s
time = 1

[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_start"
command = /s
time = 1

;-| Hold Dir |-----------------------------------------------------
[Command]
name = "holdfwd"
command = /$F
time = 1
[Command]
name = "holdback"
command = /$B
time = 1
[Command]
name = "holdup"
command = /$U
time = 1
[Command]
name = "holddown"
command = /$D
time = 1

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

;KoF XI LDM
[state -1]
type = ChangeState
triggerall = power >= 2000
triggerall = command = "Phoenix Force"
trigger1 = ctrl | stateno = 105
trigger2 =((stateno = [200,799])| stateno = 910)& movecontact
trigger3 = (stateno = 1100 || stateno = 1202) && movecontact;fvar(0) = 0 & var(11) = 1 &(stateno = 1100 | stateno = 3101)& movehit
trigger4 = stateno = 3000 && var(2) = 0
trigger5 = stateno = [3100,3101]
trigger5 = movecontact
trigger5 = var(2) = 0
trigger6 = stateno = 1321
value = 2200

;------------------------------------------------------------------
[State ストライカー呼び出し]
type = null;ChangeState
triggerall = fvar(14)>= 1 & roundstate = 2
triggerall = statetype!= A & ctrl
trigger1 = numhelper(7000) = 0
trigger1 = command = "2qcb_start"
value = 2950

[State 肉まん]
type = null;Helper
trigger1 = numhelper(7000) = 0
trigger1 = fvar(14)>= 1 & roundstate = 2
trigger1 = command = "2qcb_start"
trigger1 =(stateno!= [4000,4999])& movetype!= H
name = "kensou"
stateno = 7100
ID = 7000
pos = -160,-20
postype = back
ownpal = 1
ignorehitpause = 1

;------------------------------------------------------------------
[State シャイニングクリスタルビット]
type = ChangeState
triggerall = numhelper(3040) = 0
triggerall =(var(10)!= 1 & power>= 1000 | var(10)!= 0 & var(11) = 1)& roundstate = 2
triggerall = fvar(0) = 0 &(command = "bhcb_x" | command = "bhcb_y" | command = "bhcb_z")| fvar(0)>= 1 &(command = "2hcb_x" | command = "2hcb_y")
trigger1 = ctrl | stateno = 105 | stateno = 102 & statetype = A | stateno = 904 & time>= 30
trigger2 =((stateno = [200,799])| stateno = 910)& movecontact
trigger3 = (stateno = 1100 | stateno = 1202) && movecontact;fvar(0) = 0 & var(11) = 1 &(stateno = 1100 | stateno = 3101)& movehit
trigger4 = stateno = 1321
value = 3000

[State フェニックスファングアロー]
type = ChangeState
triggerall =(var(10)!= 1 & power>= 1000 | var(10)!= 0 & var(11) = 1)& roundstate = 2
triggerall = fvar(0) = 0 &(command = "2qcf_x" | command = "2qcf_y")| fvar(0)>= 1 &(command = "2qcf_a" | command = "2qcf_b")
trigger1 = statetype = A &(ctrl | stateno = 102 | stateno = 105)
trigger2 =(stateno = 320 |(stateno = [600,799]))& movecontact
trigger3 =(fvar(0) = [1,2])& var(11) = 1 & stateno = 1100 & statetype = A & movehit
trigger4 = var(11) = 1 & stateno = 1201 & movehit
trigger4 = stateno = 1321
value = 3100

;------------------------------------------------------------------
[State サイコソード]
type = ChangeState
triggerall = command = "upper_x" | command = "upper_y"
trigger1 = ctrl | stateno = 105 | stateno = 102 & statetype = A | stateno = 904 & time>= 30
trigger2 =((stateno = [200,699])| stateno = 910)& movecontact
trigger3 = stateno = 1252 & time>= 5
value = 1100

[State サイコシュート]
type = ChangeState
triggerall = numhelper(1090) = 0
triggerall = fvar(0) = 2 &(command = "hcf_x" | command = "hcf_y")
trigger1 = statetype!= A & ctrl | stateno = 904 & time>= 30
trigger2 =((stateno = [200,599])& stateno!= 320 | stateno = 910)& movecontact
value = 1050

[State スーパーサイキックスルー]
type = ChangeState
triggerall = fvar(0) = 1 &(command = "hcf_x" | command = "hcf_y")
trigger1 = statetype!= A & ctrl | stateno = 904 & time>= 30
value = 1400

[State サイコリフレクター]
type = ChangeState
triggerall = command = "hcb_a" | command = "hcb_b"
trigger1 = statetype!= A & ctrl | stateno = 904 & time>= 30
trigger2 =((stateno = [200,599])& stateno!= 320 | stateno = 910)& movecontact
value = 1300

[State サイキックテレポート]
type = ChangeState
triggerall = command = "qcf_a" | command = "qcf_b"
trigger1 = statetype!= A & ctrl | stateno = 904 & time>= 30
trigger2 =((stateno = [200,599])& stateno!= 320 | stateno = 910)& movecontact
value = 1250

[State サイコボールアタック]
type = ChangeState
triggerall = numhelper(1040) = 0
triggerall = command = "qcb_x" | command = "qcb_y"
trigger1 = statetype!= A & ctrl | stateno = 904 & time>= 30
trigger2 =((stateno = [200,599])& stateno!= 320 | stateno = 910)& movecontact
value = 1000

[State フェニックスアロー]
type = ChangeState
triggerall = fvar(0) = 0 &(command = "qcb_x" | command = "qcb_y")| fvar(0)>= 1 &(command = "qcb_a" | command = "qcb_b")
trigger1 = statetype = A &(ctrl | stateno = 102 | stateno = 105)
trigger2 =(stateno = 320 |(stateno = [600,799]))& movecontact
value = 1200

;------------------------------------------------------------------
[State パワーMAX発動orパワーため]
type = null;ChangeState
triggerall = var(11) = 0 &(var(10) = 0 & power>= 1000 | var(10) = 1 & power < powermax | var(10) = 2 & power = powermax)
triggerall =(command = "a" & command = "y")| command = "c"
trigger1 = statetype!= A & ctrl |(stateno = 52 | stateno = 101)& time < 5
trigger2 = var(10) = 0 & power>= 2000 &((stateno = [200,599])& stateno!= 320)& movecontact
value = 990

[State 攻撃避けor緊急回避]
type = ChangeState
triggerall = (command = "x" & command = "a") || command = "c"
trigger1 = statetype!= A & ctrl |(stateno = 52 | stateno = 101)& time < 5
trigger2 = var(10) = 0 & power>= 1000 &(stateno = 150 | stateno = 152)
value = ifelse(var(10)=1,900,901)

[State ビットスルーorサイキックスルー]
type = ChangeState
trigger1 =(command = "y" | command = "b")&(command = "holdfwd" | command = "holdback")
trigger1 =(stateno!= [100,101])& statetype = S & ctrl
trigger1 = p2statetype = S & p2movetype!= H & p2bodydist x = [-9,9]
value = ifelse(command="y",800,810)

[State サイキックシュート]
type = ChangeState
trigger1 =(command = "y" | command = "b")&(command = "holdfwd" | command = "holdback")
trigger1 = statetype = A &(ctrl | stateno = 102)
trigger1 = p2statetype = A & p2movetype!= H & p2bodydist x = [-9,9]
value = 820

;------------------------------------------------------------------
[State 吹っ飛ばし攻撃]
type = ChangeState
triggerall = command = "y" & command = "b" | command = "z"
trigger1 = statetype!= A & ctrl
trigger2 = power>= 1000 & command = "holdfwd" &(stateno = 150 | stateno = 152)
value = 280

[State 空中吹っ飛ばし攻撃]
type = ChangeState
trigger1 = command = "y" & command = "b" | command = "z"
trigger1 = statetype = A & ctrl
value = 680

[State 連環腿]
type = ChangeState
triggerall = command = "a" & command = "holdfwd" & command!= "holddown"
trigger1 = statetype!= A & ctrl | stateno = 101 & time < 10
trigger2 =(stateno = [240,279])& movecontact
trigger3 =(stateno = [440,459])& movecontact
value = 320

[State フェニックスボム]
type = ChangeState
triggerall = command = "a" & command = "holddown"
trigger1 = statetype = A &(ctrl | stateno = 102 | stateno = 105)
trigger2 =(stateno = [640,679])& movecontact
value = 720

;------------------------------------------------------------------
[State stand light punch (near)]
type = ChangeState
triggerall = command = "x" & command!= "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
trigger2 = stateno = 200 & movetype = I
trigger3 = stateno = 400 & movetype = I
value = 200

[State stand light punch (not near)]
type = ChangeState
triggerall = command = "x" & command!= "holddown"
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
trigger2 =(stateno = [200,219])& movetype = I
trigger3 = stateno = 400 & movetype = I
value = 210

[State stand light kick (near)]
type = ChangeState
triggerall = command = "a" & command!= "holddown"
triggerall = p2bodydist x < 30
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
trigger2 = stateno = 200 & movetype = I
trigger3 = stateno = 400 & movetype = I
value = 220

[State stand light kick (not near)]
type = ChangeState
triggerall = command = "a" & command!= "holddown"
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
trigger2 =(stateno = [200,219])& movetype = I
trigger3 = stateno = 400 & movetype = I
value = 230

[State stand strong punch (near)]
type = ChangeState
triggerall = command = "y" & command!= "holddown"
triggerall = p2bodydist x < 20
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
;trigger2 =((stateno = [200,209])|(stateno = [220,229]))& movehit
;trigger3 =(stateno = [400,439])& movehit
value = 240

[State stand strong punch (not near)]
type = ChangeState
triggerall = command = "y" & command!= "holddown"
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
;trigger2 =(stateno = [200,239])& movehit
;trigger3 =(stateno = [400,439])& movehit
value = 250

[State stand strong kick (near)]
type = ChangeState
triggerall = command = "b" & command!= "holddown"
triggerall = p2bodydist x < 20
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
;trigger2 =((stateno = [200,209])|(stateno = [220,229]))& movehit
;trigger3 =(stateno = [400,439])& movehit
value = 260

[State stand strong kick (not near)]
type = ChangeState
triggerall = command = "b" & command!= "holddown"
trigger1 = statetype = S & ctrl |(stateno = 52 | stateno = 101)& time < 5
;trigger2 =(stateno = [200,239])& movehit
;trigger3 =(stateno = [400,439])& movehit
value = 270

;------------------------------------------------------------------
[State crouch light punch]
type = ChangeState
triggerall = command = "x" & command = "holddown"
trigger1 = statetype = C & ctrl
trigger2 = stateno = 200 & movetype = I
trigger3 = stateno = 400 & movetype = I
trigger4 = stateno = 420 && movecontact
value = 400

[State crouch light kick]
type = ChangeState
triggerall = command = "a" & command = "holddown"
trigger1 = statetype = C & ctrl
trigger2 = stateno = 200 & movetype = I
trigger3 = stateno = 400 & movetype = I
value = 420

[State crouch strong punch]
type = ChangeState
triggerall = command = "y" & command = "holddown"
trigger1 = statetype = C & ctrl
;trigger2 =(stateno = [200,239])& movehit
;trigger3 =(stateno = [400,439])& movehit
value = 440

[State crouch strong kick]
type = ChangeState
triggerall = command = "b" & command = "holddown"
trigger1 = statetype = C & ctrl
;trigger2 =(stateno = [200,239])& movehit
;trigger3 =(stateno = [400,439])& movehit
value = 460

;------------------------------------------------------------------
[State air light punch]
type = ChangeState
triggerall = command = "x"
trigger1 = statetype = A & ctrl
value = ifelse(vel x=0,600,610)

[State air light kick]
type = ChangeState
triggerall = command = "a"
trigger1 = statetype = A & ctrl
value = ifelse(vel x=0,620,630)

[State air strong punch]
type = ChangeState
triggerall = command = "y"
trigger1 = statetype = A & ctrl
;trigger2 =(stateno = [600,639])& movehit
value = ifelse(vel x=0,640,650)

[State air strong kick]
type = ChangeState
triggerall = command = "b"
trigger1 = statetype = A & ctrl
;trigger2 =(stateno = [600,639])& movehit
value = ifelse(vel x=0,660,670)

;------------------------------------------------------------------
[State 三角飛び]
type = ChangeState
triggerall = command = "holdup"
triggerall =(command = "holdfwd" & backedgebodydist < 5)| command = "holdback" & frontedgebodydist < 5
triggerall = pos y < -25
trigger1 = stateno = 50 & prevstateno!= 90
value = 90

[State state]
type = ChangeState
trigger1 = command = "holdup"
trigger1 = stateno = 10 | stateno = [100,101]
value = 41

[State state]
type = ChangeState
trigger1 = command = "FF" & command!= "holddown"
trigger1 =(stateno!= [100,101])& statetype = S & ctrl
value = ifelse(var(10)!=1,100,102)
[State state]
type = ChangeState
trigger1 = command = "BB" & command!= "holddown"
trigger1 = statetype = S & ctrl
value = 105

[State state]
type = ChangeState
trigger1 = command = "start"
trigger1 = stateno!= 195 & statetype!= A & ctrl
value = 195

[State state]
type = ChangeState
trigger1 = var(6) < 500 & alive & command = "recovery"
trigger1 = stateno = 5050 & canrecover
value = 5200

[state -1]
type = changestate
trigger1 = statetype != A
trigger1 = command = "superjump"
value = 44
