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



;-| 超必殺技 |--------------------------------------------------------
;ここには超必殺技を記述してください、同じ名前を「name =」欄に書けますが
;コマンドは絶対に違ったものにしてください。
;カンフーマンは弱パンチと強パンチで技が出せるように同じ名前のコマンドで
;内容が弱と強になっています。
;「time=20」と書くことで「コマンドを20フレーム以内に入力」と設定できます。

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

[Command] 
name = "TripleKFPalm"   ;Same name as above
command = ~D, DF, F, D, DF, F, b
time = 20

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

[Command] 
name = "TripleKFPalm"   ;Same name as above
command = ~D, DF, F, $D, F, b
time = 20

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

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

[Command] 
name = "632146_y"   ;Same name as above
command = ~F, $D, B, F, y
time = 20

[Command] 
name = "214_y"
command = ~D, DB, B, y
time = 10


;-| 必殺技 |------------------------------------------------------
[Command]
name = "41236_y"
command = ~B, $D, F, y
time = 15

[Command]
name = "63214_y"
command = ~F, $D, B, y
time = 15

[Command]
name = "623_x"
command = ~F, D, DF, x
time = 15

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

[Command]
name = "623_a"
command = ~F, D, DF, a
time = 15

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

[Command]
name = "421_a"
command = ~B, D, DB, a
time = 15

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


[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_a"
command = ~D, DF, F, a

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

[Command]
name = "214_a"
command = ~D, DB, B, a

[Command]
name = "214_b"
command = ~D, DB, B, b

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

[Command]
name = "FF_x"
command = F, F, x

[Command]
name = "FF_y"
command = F, F, y

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

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

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

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

[Command]
name = "DD_x"
command = ~D, D, x
time = 15

[Command]
name = "DD_y"
command = ~D, D, y
time = 15

;※※※※※※※※※※※※※※※※※※※※ハイジャンプコマンド
;下をちょっと押して上を押す、と言う意味。
[Command]
name = "jump"    
command = ~D,$U
time = 10


;※※※※※※※※※※※※※※※※※※※※airジャンプコマンド
;上を押す、と言う意味。
[Command]
name = "airjump"    
command = $U
time = 1


;※※※※※※※※※※※※※※※※※※※※前避け
;前を押しながらＡ＋Ｂ、という意味
[Command]
name = "away-f"    
command = /F,a+b
time = 10

;※※※※※※※※※※※※※※※※※※※※前避け
;後を押しながらＡ＋Ｂ、という意味
[Command]
name = "away-b"    
command = /B,a+b
time = 10

;-| ２回押し技 |-----------------------------------------------------------
[Command]
name = "FF"     
command = F, F
time = 10

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

;-| ２・３個の同時押し技 |-----------------------------------------------
[Command]
name = "recovery"
command = x+y
time = 1

[Command]
name = "a+b"
command = a+b
time = 3

;-| 方向とボタンで出す技 |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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

[Command]
name = "down_a+b"
command = /$D,a+b
time = 3


;-| ボタン設定（いじらない）|---------------------------------------------------------
[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

;-| 押しっぱなし設定（いじらない）-------------------------------------------------------
[Command]
name = "holdfwd"
command = /$F
time = 1

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

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

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

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

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

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

--------------------------------------------------------------------
; 下の記述↓は絶対に消さないでください。
[Statedef -1]


;-----------------------------------------------------------------
以下AI------------------------------------------------------------


[State -1, AI起動用ヘルパー]
type = helper
triggerall = !NumHelper(9999)
triggerall = RoundState = 2
trigger1 = var(51) = 0
;trigger1 = ctrl && stateno = 0
helpertype = normal
name = "AI"
stateno = 9999
ID = 9999
keyctrl = 1
persistent = 0




[State -1,2];var(51)=1ならAIオン
type = Varset
triggerall = var(51) != 1
trigger1 = command = "AI1"
trigger2 = command = "AI2"
trigger3 = command = "AI3"
trigger4 = command = "AI4"
trigger5 = command = "AI5"
trigger6 = command = "AI6"
trigger7 = command = "AI7"
trigger8 = command = "AI8"
trigger9 = command = "AI9"
trigger10 = command = "AI10"
trigger11 = command = "AI11"
trigger12 = command = "AI12"
trigger13 = command = "AI13"
trigger14 = command = "AI14"
trigger15 = command = "AI15"
trigger16 = command = "AI16"
trigger17 = command = "AI17"
trigger18 = command = "AI18"
trigger19 = command = "AI19"
trigger20 = command = "AI20"
trigger21 = command = "AI21"
trigger22 = command = "AI22"
trigger23 = command = "AI23"
trigger24 = command = "AI24"
trigger25 = command = "AI25"
trigger26 = command = "AI26"
trigger27 = command = "AI27"
trigger28 = command = "AI28"
trigger29 = command = "AI29"
trigger30 = command = "AI30"
trigger31 = command = "AI31"
trigger32 = command = "AI32"
trigger33 = command = "AI33"
trigger34 = command = "AI34"
trigger35 = command = "AI35"
trigger36 = command = "AI36"
trigger37 = command = "AI37"
trigger38 = command = "AI38"
trigger39 = command = "AI39"
trigger40 = command = "AI40"
trigger41 = command = "AI41"
trigger42 = command = "AI42"
trigger43 = command = "AI43"
trigger44 = command = "AI44"
trigger45 = command = "AI45"
trigger46 = command = "AI46"
trigger47 = command = "AI47"
trigger48 = command = "AI48"
trigger49 = command = "AI49"
trigger50 = command = "AI50"
trigger51 = command = "AI51"
trigger52 = command = "AI52"
trigger53 = command = "AI53"
trigger54 = command = "AI54"
trigger55 = command = "AI55"
trigger56 = command = "AI56"
trigger57 = command = "AI57"
trigger58 = command = "AI58"
trigger59 = command = "AI59"
trigger60 = command = "AI60"
trigger61 = numhelper(9999)
trigger61 = helper(9999),var(51) = 1
v = 51
value = 1
ignorehitpause = 1


[State -1,2];var(51)=-1ならAIオフ
type = Varset
triggerall = var(51) = 0
trigger1 = numhelper(9999)
trigger1 = helper(9999),var(51) = -1
var(51) = -1


[State -1, Random_AIvar] 
type = VarRandom 
trigger1 = stateno != [120,155] 
trigger1 = Time = 1 
v = 53 
range = 0,99 


;---------------------------------------------------------------------------
;ホールド後のコンボ
[State -1, ]
type = ChangeState
value = 930
triggerall  = var(51) = 1
;TriggerAll = Var(52) = 1
triggerall  = RoundState = 2
;triggerall = NumTarget
;triggerall = P2bodydist Y = [-60,0]
;triggerall = p2statetype != L 
trigger1 = statetype != A
trigger1 = ctrl ;&& random = [0,20]
;trigger1 = prevStateNo = 450
trigger1 = p2stateno = 921; && target,animelemtime(11)=30
;trigger1 = BackEdgeBodyDist > 20





;---------------------------------------------------------------------------
;ホールド中段
[State -1, hold]
type = ChangeState
value = 900
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;trigger1 = command = "DD_y"
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = InGuardDist
trigger1 = p2statetype = S
trigger1 = random = [0,20]






;---------------------------------------------------------------------------
;幻夢槍（強）
[State -1, ]
type = ChangeState
value = 1010
TriggerAll = Var(51) = 1
;triggerall = command = "214_a"
triggerall = RoundState = 2
trigger1 = (P2statetype = A)
;trigger1 = (PrevStateNo=205) ;|| (PrevStateNo=210)
trigger1 = (stateno = 215) 
trigger1 = movehit && var(53) = [0,40]
trigger1 = var(49) = 2
trigger1 = power > 1000
trigger1 = animelemtime(10) >= 0

;---------------------------------------------------------------------------
;影月輪（背サマー）（弱）
[State -1, Light サマー]
type = ChangeState
value = 1050
TriggerAll = Var(51) = 1
;triggerall = command = "214_a"
triggerall = RoundState = 2
trigger1 = (P2statetype = A)
;trigger1 = (PrevStateNo=205) ;|| (PrevStateNo=210)
trigger1 = (stateno = 215) 
trigger1 = movehit && var(53) = [30,99]
trigger1 = var(49) = 2
trigger1 = animelemtime(10) >= 0

;---------------------------------------------------------------------------
;立ち背　弱P
[State -1, Stand Light Punch]
type = ChangeState
value = 203
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
trigger1 = P2movetype != A
trigger1 = statetype = S
trigger1 = var(41) = 1
trigger1 = var(53) = [0,60]
trigger1 = p2bodydist X < 40 
trigger1 = p2bodydist Y = [-100 , 0]
trigger1 = var(49) = 1

[State -1]
type = varset
trigger1 = p2movetype != H 
var(49) = 1

;---------------------------------------------------------------------------
;立ち背PP
[State -1, ]
type = varset
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "x"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 203) ;&& (P2stateno = 525)
var(47) = 1


[State -1, ]
type = ChangeState
value = 205
TriggerAll = Var(47) = 1
trigger1 = stateno = 203
trigger1 = AnimelemTime(6) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 203
v = 47
value = 0


;---------------------------------------------------------------------------
;強PP or 背PP強P（派生螺旋刀）
[State -1, ]
type = varset
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "y"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 210) || (stateno = 205) ;&& (P2stateno = 525)
trigger1 = movehit
var(46) = 1


[State -1, ]
type = ChangeState
value = 215
TriggerAll = Var(46) = 1
trigger1 = stateno = 210
trigger1 = AnimelemTime(8) >= 0
trigger2 = stateno = 210
trigger2 = movecontact
trigger3 = stateno = 205
trigger3 = AnimelemTime(6) >= 0


[State -1, ]
type = varset
trigger1 = stateno != 210 && stateno != 205
v = 46
value = 0

;---------------------------------------------------------------------------
;秋月輪（表サマー）（弱）
[State -1,]
type = ChangeState
value = 1100
triggerall = var(51) = 1
triggerall = StateType != A
triggerall = RoundState = 2
;triggerall = var(41) = 0
;triggerall = command = "623_y"
trigger1 = P2movetype = A
;trigger1 = P2statetype = A
trigger1 = ctrl && (random = [ifelse(P2statetype = A,900,930)+(life/20),999] )
trigger1 = p2bodydist X = [-5 , 40]
trigger1 = p2bodydist Y = [-150 , 0]
trigger1 = EnemyNear,vel x >= 0
;trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = movehit && var(53) = [0,5]

;---------------------------------------------------------------------------
;影月輪（背サマー）（弱）
[State -1, Light サマー]
type = ChangeState
value = 1050
TriggerAll = Var(51) = 1
;triggerall = command = "214_a"
triggerall = RoundState = 2
trigger1 = statetype != A
trigger1 = var(41) = 1;ctrl
trigger1 = P2movetype = A
trigger1 = random = [ifelse(P2statetype = A,900,930)+(life/20),999]
trigger1 = p2bodydist X = [-5 , 50]
trigger1 = p2bodydist Y = [-100 , 0]
trigger1 = EnemyNear,vel x >= 0
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movehit && var(53) = [0,10]
;trigger2 = var(41) != 0

;---------------------------------------------------------------------------
;立ち4強P(螺旋刀)
[State -1, Stand Light Punch]
type = ChangeState
value = 215
triggerall = var(51) = 1
triggerall = StateType != A
triggerall = RoundState = 2
triggerall = p2statetype != A && p2statetype != L
;triggerall = command = "y"
;triggerall = command = "holdback"
trigger1 = p2bodydist X = [70, 105] 
trigger1 = P2movetype = A
trigger1 = P2statetype != C
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = var(53) = [0,50]
trigger2 = ctrl
trigger2 = p2stateno = 208 || p2stateno = 1260

;---------------------------------------------------------------------------
;立ち弱パンチ
[State -1, Stand Light Kick]
type = ChangeState
value = 200
triggerall = var(51) = 1
;TriggerAll = Var(52) = 1
triggerall = RoundState = 2
triggerall = P2bodydist X <=60
triggerall = statetype != A
trigger1 = ctrl && random = [0,400]
trigger1 = P2bodydist Y = [-60,10]
trigger1 = (p2statetype = A) 
trigger1 = (p2movetype != H) 
trigger1 = EnemyNear,vel x > 1


[State -1, 立ちパンチ]
type = ChangeState
value = 200
triggerall = var(51) = 1
triggerall = StateType != A
triggerall = RoundState = 2
triggerall = ctrl
triggerall = (p2statetype != L) && (p2statetype != C)
triggerall = P2BodyDist X = [-5,30]
triggerall = EnemyNear,AnimTime <= -7 
triggerall = (PrevStateNo=[5000,5120]) || (PrevStateNo=[120,159])
triggerall = EnemyNear,ctrl = 0
trigger1 = var(53) = [0,30]


;---------------------------------------------------------------------------
;霧惑い
[State -1, Kung Fu Throw]
type = ChangeState
value = 1250
triggerall  = var(51) = 1 
triggerall  = RoundState = 2
triggerall = statetype = S
triggerall = var(53) = [20,30]
triggerall = ctrl
triggerall = stateno != 100
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
trigger1 = p2bodydist X < 20


;---------------------------------------------------------------------------
;投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall  = var(51) = 1 
triggerall  = RoundState = 2
;triggerall = command = "y"
triggerall = statetype = S
triggerall = var(53) = [10,15]
triggerall = ctrl || var(41) = 1
triggerall = stateno != 100
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
trigger1 = p2bodydist X < 12
trigger1 = var(41) = 0
trigger2 = p2bodydist X < 30
trigger2 = var(41) = 1



;---------------------------------------------------------------------------
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall  = var(51) = 1
triggerall  = RoundState = 2
trigger1 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1)  && var(53) = [0,60]
trigger2 = statetype != A
trigger2 = ctrl && random = [100,299]
trigger2 = p2bodydist X < 20 
trigger2 = prevstateno != 430
trigger2 = (p2statetype != L) && (p2statetype != A)
trigger3 = statetype != A
trigger3 = ctrl && var(53) = [0,80]
trigger3 = p2bodydist X < 20 
trigger3 = p2movetype = H
trigger3 = (p2statetype != L) && (p2statetype != A)
;trigger3 = prevstateno = 430


;---------------------------------------------------------------------------
[State -1, 立ちガード]
type            = ChangeState
Value           = 130
triggerall      = var(51) = 1 && random > 300
triggerall      = statetype != A
Triggerall      = ctrl || stateno = 2000 || stateno = 100
triggerall      = p2statetype = A || p2statetype = S
trigger1        = InGuardDist
trigger2        = p2movetype = A
trigger2        = p2bodydist x = [-50,50]


[State -1, 屈みガード]
type            = ChangeState
Value           = 131
triggerall      = var(51) = 1 && random > 300
triggerall      = statetype != A
Triggerall      = ctrl || stateno = 2000 || stateno = 100
triggerall      = p2statetype = C
trigger1        = InGuardDist
trigger2        = p2movetype = A
trigger2        = p2bodydist x = [-50,50]


;---------------------------------------------------------------------------
;前PP
[State -1, ]
type = varset
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "x"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 200) ;&& (P2stateno = 525)
var(42) = 1


[State -1, ]
type = ChangeState
value = 202
TriggerAll = Var(42) = 1
trigger1 = stateno = 200
trigger1 = AnimelemTime(4) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 200
v = 42
value = 0



;---------------------------------------------------------------------------
;立ち6強P
[State -1, Stand Light Punch]
type = ChangeState
value = 204
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "y"
;triggerall = command = "holdfwd"
triggerall = var(53) = [20,50]
trigger1 = statetype = S
trigger1 = ctrl && var(53) = [40,50]
trigger1 = p2bodydist X = [0,50] 
trigger1 = (p2statetype != L) && (p2statetype != A)
trigger2 = (stateno = 230) && movecontact; && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 400) && movecontact; && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 430) && movecontact; && (AnimElemTime(3)  > 1)

;---------------------------------------------------------------------------
;前PP強P
[State -1, ]
type = varset
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "y"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = movehit
trigger1 = (stateno = 202) ;&& (P2stateno = 525)
var(43) = 1


[State -1, ]
type = ChangeState
value = 204
TriggerAll = Var(43) = 1
trigger1 = stateno = 202
trigger1 = AnimelemTime(6) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 202
v = 43
value = 0

;---------------------------------------------------------------------------
;立ち背　強P
[State -1, Stand Light Punch]
type = ChangeState
value = 206
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "y"
;triggerall = command = "holdfwd"
trigger1 = var(53) = [0,30]
trigger1 = p2bodydist X = [0,50] 
trigger1 = statetype = S
trigger1 = var(41) = 1


;---------------------------------------------------------------------------
;前PP強PP
[State -1, ]
type = varset
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "y"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 204) ;&& (P2stateno = 525)
var(44) = 1


[State -1, ]
type = ChangeState
value = 206
TriggerAll = Var(44) = 1
trigger1 = stateno = 204
trigger1 = AnimelemTime(6) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 204
v = 44
value = 0



;---------------------------------------------------------------------------
;立背向け強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 245
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "b"
;triggerall = command != "holddown"
trigger1 = var(53) = [70,80]
trigger1 = p2bodydist X = [0,50] 
trigger1 = statetype = S
trigger1 = var(41) = 1

;---------------------------------------------------------------------------
;立背向け強キック連携
[State -1, ]
type = varset
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "b"
;triggerall = command != "holddown"
trigger1 = var(53) = [90,95]
trigger1 = p2bodydist X = [0,50] 
trigger1 = statetype = S
trigger1 = (stateno = 200) || (stateno = 215)
var(45) = 1


[State -1, ]
type = ChangeState
value = 245
TriggerAll = Var(45) = 1
trigger1 = stateno = 200
trigger1 = AnimelemTime(4) >= 0
trigger2 = stateno = 215 && prevstateno != 210
trigger2 = AnimelemTime(10) >= 3


[State -1, ]
type = varset
trigger1 = stateno != 200 && stateno != 215
v = 45
value = 0



;---------------------------------------------------------------------------
;あやねビーム（ゲージレベル2）
[State -1, ]
type = ChangeState
value = 3100
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "236236_xy"
triggerall = power >= 2000
;trigger1 = statetype = S
;trigger1 = ctrl
;trigger1 = prevstateno = 3000 && random > 500 
trigger1 = statetype != A
trigger1 = hitdefattr = SC, NA, SA
trigger1 = movehit && (var(53) = [92+(life/200),99] )
trigger1 = stateno != 500 && stateno != 570
trigger2 = movehit && (var(53) = [30+(life/50),ifelse((prevStateNo=[200,499]),99,59)] )
trigger2 = stateno = 1000 || stateno = 1010
trigger2 = P2bodydist Y = [-40,0]


;---------------------------------------------------------------------------
;幻夢月輪脚（ゲージレベル１）
[State -1, 幻夢月輪脚]
type = ChangeState
value = 3000
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "TripleKFPalm"
triggerall = power >= 1000
;trigger1 = statetype = S
;trigger1 = ctrl
trigger1 = movehit && var(53) = [30+(life/50),ifelse((prevStateNo=[200,499]),99,59)] 
trigger1 = stateno = 1000 || stateno = 1010
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movehit &&  var(53) = [90,99]
;trigger2 = stateno != 500 && stateno != 570


;---------------------------------------------------------------------------
;超必投げ　朧
[State -1, おぼろ]
type = null
;type = ChangeState
value = 3200
triggerall  = var(51) = 1 
triggerall  = RoundState = 2
;triggerall = command = "632146_y"
triggerall = statetype != A
triggerall = stateno != 100
triggerall = power >= 1000
triggerall = p2bodydist X < 40
triggerall = (p2statetype = S) || (p2statetype = C)
trigger1 = ctrl && random = [150,199]
trigger1 = p2movetype != A
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movehit && var(53) = [70,79]


;---------------------------------------------------------------------------
;幻夢槍（強）
[State -1, ]
type = ChangeState
value = 1010
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "QCB_b"
;trigger1 = statetype != A
;trigger1 = ctrl
trigger1 = (stateno = 210) && movehit && var(53) = [0,39]
trigger2 = (stateno = 240) && movehit && var(53) = [0,29]
trigger3 = (stateno = 410) && movehit && var(53) = [0,39]
trigger4 = (stateno = 440) && movehit && var(53) = [0,39]
trigger5 = statetype != A
trigger5 = ctrl && random > 500
trigger5 = p2movetype = H
trigger5 = P2bodydist Y = [-160,-60]
trigger5 = p2bodydist X = [60,100]
trigger5 = prevstateno != 3000 
trigger6 = statetype != A && !InGuardDist
trigger6 = ctrl && var(53) = [0,4]
trigger6 = p2movetype != A
;trigger6 = P2bodydist Y = [-160,-60]
trigger6 = p2bodydist X = [70,100]
;trigger6 = !InGuardDist



;---------------------------------------------------------------------------
;霞蹴り
[State -1, Crouching Strong Kick]
type = null
;type = ChangeState
value = 500
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;trigger1 = statetype != A
;trigger1 = ctrl
;trigger1 = power >= 1000
;trigger1 = P2bodydist Y = [-80,-40]
;trigger1 = p2bodydist X < 50
;trigger1 = prevstateno = 3000; && random > 500 
trigger1 = (stateno = [200,299]) || (stateno = [400,499])
trigger1 = moveHIT && var(53) = [10,29]
trigger1 = power >= 1000
trigger1 = p2bodydist X < 50


;---------------------------------------------------------------------------
;霞蹴りからのイズナ幸せ投げ
[State -1, ]
type = null
;type = varset
TriggerAll = Var(51) = 1
triggerall = power >= 1000
trigger1 = (stateno = 500) && (P2stateno = 525)
v = 40
value = 1


;[State -1, ]
;type = ChangeState
;value = 3500
;TriggerAll = Var(40) = 1
;trigger1 = stateno = 500
;trigger1 = AnimTime = 0


;---------------------------------------------------------------------------
;烈空牙（肘）
[State -1, ]
type = null
;type = ChangeState
value = 570
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;trigger1 = command = "FF_x"
triggerall = p2bodydist X = [60, 100]
triggerall = P2bodydist Y = [-60,0]
triggerall = p2statetype != L 
triggerall = p2movetype != A && !InGuardDist
trigger1 = statetype != A
trigger1 = ctrl && random > 980
;trigger2 = command = "x" ;&& command = "holdfwd"
trigger2 = stateno = 100
trigger2 = ctrl && random > 980
;trigger3 = command = "FF_x"
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact && var(53) = [80,99]

;---------------------------------------------------------------------------
;天舞蹴（ドロップキック）
[State -1, ]
type = null
;type = ChangeState
value = 590
triggerall  = var(51) = 1
triggerall  = RoundState = 2
triggerall = P2bodydist Y = [-60,0]
triggerall = p2statetype != L 
triggerall = p2movetype != A && !InGuardDist
;trigger1 = command = "FF_b"
trigger1 = statetype != A
trigger1 = ctrl && random = [0,20]
trigger1 = p2bodydist X = [100, 140]
;trigger2 = command = "b" ;&& command = "holdfwd"
trigger2 = stateno = 100
trigger2 = ctrl && random = [0,20]
trigger2 = p2bodydist X = [100, 140]
;trigger3 = command = "FF_b"
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = MoveGuarded && var(53) = [0,30]

;---------------------------------------------------------------------------
;狼牙（ジャンプ足払い）
[State -1, ]
type = null
;type = ChangeState
value = 580
triggerall  = var(51) = 1
triggerall  = RoundState = 2
triggerall = P2bodydist Y = [-60,0]
triggerall = p2statetype != L 
triggerall = p2movetype != A && !InGuardDist
;trigger1 = command = "FF_a"
trigger1 = statetype != A
trigger1 = ctrl && random = [21,40]
trigger1 = p2bodydist X = [130, 160]
;trigger2 = command = "a" ;&& command = "holdfwd"
trigger2 = stateno = 100
trigger2 = ctrl && random = [21,40]
trigger2 = p2bodydist X = [130, 160]
;trigger3 = command = "FF_a"
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = MoveGuarded && var(53) = [21,50]


;---------------------------------------------------------------------------
;幸せ投げ
[State -1, ]
type = ChangeState
value = 1200
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "41236_y"
trigger1 = statetype != A
trigger1 = var(41) = 1 ;ctrl
trigger1 = p2bodydist X < 85
trigger1 = random = [31,40]
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = moveGuarded && var(53) = [60,70]


;---------------------------------------------------------------------------
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall  = var(51) = 1
triggerall  = RoundState = 2
trigger1 = statetype = S
trigger1 = ctrl && var(53) = [40,50]
trigger1 = p2bodydist X < 30 
trigger1 = (p2statetype != L) && (p2statetype != C)
trigger1 = p2movetype != A


;---------------------------------------------------------------------------
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall  = var(51) = 1 && var(53) = [0,6]
triggerall  = RoundState = 2
;triggerall = command = "a"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl || var(41) = 1
trigger1 = p2bodydist X < 30 
trigger1 = (p2statetype != L) && (p2statetype != C)
;trigger1 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
;trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
;trigger2 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
;trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 


;---------------------------------------------------------------------------
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;trigger1 = statetype = S
;trigger1 = ctrl
trigger1 = (stateno = 400) && movecontact && (AnimElemTime(3)  > 1)&& var(53) = [0,59]
trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)&& var(53) = [0,59]
trigger3 = statetype != A
trigger3 = ctrl && var(53) = [70,90]
trigger3 = p2bodydist X = [30,100] 
trigger3 = P2bodydist Y = [-60,0]
trigger3 = (p2statetype != L) 


;---------------------------------------------------------------------------
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall  = var(51) = 1 && var(53) = [40,59]
triggerall  = RoundState = 2
;triggerall = command = "b"
;triggerall = command != "holddown"
;trigger1 = statetype = S
;trigger1 = ctrl
trigger1 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 



;---------------------------------------------------------------------------
;しゃがみ強パンチ
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall  = var(51) = 1 && var(53) = [0,59]
triggerall  = RoundState = 2
;triggerall = command = "y"
;triggerall = command = "holddown"
;trigger1 = statetype = C
;trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
;trigger3 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger1 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 
trigger3 = statetype = C
trigger3 = ctrl || var(41) = 1 
trigger3 = p2bodydist X < 40 
trigger3 = P2bodydist Y = [-10,0]
trigger3 = (p2statetype != L) 

;---------------------------------------------------------------------------
;しゃがみ強キック
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall  = var(51) = 1 && var(53) = [60,79]
triggerall  = RoundState = 2
;triggerall = command = "b"
;triggerall = command = "holddown"
;trigger1 = statetype = C
;trigger1 = ctrl
;trigger1 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
trigger1 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 
trigger4 = (stateno = 410) && movecontact && (AnimElemTime(2)  > 1) 



;---------------------------------------------------------------------------
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall  = var(51) = 1
triggerall  = RoundState = 2
;triggerall = command = "x"
trigger1 = statetype = A && stateno !=105
trigger1 = ctrl && random > 500
trigger1 = p2bodydist X = [0,40] 
trigger1 = P2bodydist Y = [-40,40]
trigger1 = (p2statetype = A) 

;trigger2 = (stateno = 600) && movecontact && (AnimElemTime(2)  > 1)

;---------------------------------------------------------------------------
;空中強パンチ
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall  = var(51) = 1 
triggerall  = RoundState = 2
;triggerall = command = "y"
trigger1 = statetype = A && stateno !=105
trigger1 = random > 500
trigger1 = stateno = 630 ;jump_x or jump_a
trigger1 = movecontact

;---------------------------------------------------------------------------
;空中弱キック
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall  = var(51) = 1 
triggerall  = RoundState = 2
triggerall  = statetype = A && stateno !=105 
;triggerall = command = "a"
trigger1 = ctrl && random > 500
trigger1 = p2bodydist X = [0,40] 
trigger1 = P2bodydist Y = [0,100]
trigger1 = vel Y > 0 
trigger1 = (p2statetype = S || p2statetype = C) 

trigger2 = (stateno = 600) && movecontact && (AnimElemTime(2)  > 1)
trigger2 = random > 500

;---------------------------------------------------------------------------
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall  = var(51) = 1 
triggerall  = RoundState = 2
triggerall  = statetype = A && stateno !=105 
;triggerall = command = "b"
trigger1 = ctrl && random = [501,700]
trigger1 = p2bodydist X = [-10,40] 
trigger1 = P2bodydist Y = [-5,100]
trigger1 = vel Y > 0 
trigger1 = (p2statetype = S || p2statetype = C) 

trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger2 = random = [500,999]


;---------------------------------------------------------------------------
;ホールド中段
[State -1, hold]
type = ChangeState
value = 900
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;trigger1 = command = "DD_y"
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = InGuardDist
trigger1 = p2statetype = S
trigger1 = random = [0,10]
trigger1 = enemy,NumProj = 0
trigger1 = enemy,hitdefattr != s,AP

;---------------------------------------------------------------------------
;ホールド上段
[State -1, hold]
type = ChangeState
value = 905
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;trigger1 = command = "DD_x"
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = InGuardDist
trigger1 = p2statetype = A
trigger1 = random = [0,10]
trigger1 = enemy,NumProj = 0
trigger1 = enemy,hitdefattr != a,AP


;---------------------------------------------------------------------------
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
TriggerAll = Var(51) = 1
triggerall  = RoundState = 2
;trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl && random = [0,40]
trigger1 = p2bodydist X > 180 
trigger1 = stateno !=[120,160]

;---------------------------------------------------------------------------
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
TriggerAll = Var(51) = 1
triggerall = RoundState = 2
;trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl && random = [0,300]
trigger1 = p2bodydist X = [-3,30] 
trigger1 = BackEdgeBodyDist > 20
trigger1 = P2stateType = L
trigger2 = Var(41) = 1 && random = [300,700] 
trigger2 = p2bodydist X = [-3,30] 
trigger2 = BackEdgeBodyDist > 20
trigger2 = P2stateType = L

;---------------------------------------------------------------------------
;振り向き　背向けから前向き
[State -1, turn]
type = ChangeState
value = 3
TriggerAll = Var(51) = 1
triggerall = RoundState = 2
triggerall = var(41) = 1 && stateno != 1
triggerall = statetype != A
trigger1 = random = [800,900] 
trigger1 = p2bodydist X > 40 
;trigger2 = p2bodydist X = [-3,30] 
trigger2 = P2stateType = L
trigger2 = random = [400,900] 
;trigger1 = command = "c"
;trigger2 = command = "c"
;trigger2 = command = "holdfwd" || command = "holdback" 
;trigger1 = ctrl

;AIここまで
;===========================================================================



;---------------------------------------------------------------------------
;あやねビーム（ゲージレベル2）
[State -1, タッグコンボ]
type = ChangeState
value = 3100
TriggerAll = Var(51) != 1
triggerall = command = "236236_xy"
triggerall = power >= 2000
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
trigger3 = movecontact
trigger3 = stateno = 1000 || stateno = 1010


;---------------------------------------------------------------------------
;幻夢月輪脚（ゲージレベル１）
[State -1, 幻夢月輪脚]
type = ChangeState
value = 3000
TriggerAll = Var(51) != 1
triggerall = command = "TripleKFPalm"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
trigger3 = movecontact
trigger3 = stateno = 1000 || stateno = 1010
;===========================================================================

;---------------------------------------------------------------------------
;天神舞（昇竜）（弱）
[State -1,]
type = null  ;ChangeState
value = 1300
TriggerAll = Var(51) != 1
triggerall = command = "623_x"
trigger1 = statetype != A
trigger1 = ctrl
;trigger1 = p2bodydist X < 60
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact

;---------------------------------------------------------------------------
;天神舞（昇竜）（強）
[State -1,]
type = null  ;ChangeState
value = 1310
TriggerAll = Var(51) != 1
triggerall = command = "623_y"
trigger1 = statetype != A
trigger1 = ctrl
;trigger1 = p2bodydist X < 60
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact


;---------------------------------------------------------------------------
;幻夢槍（弱）
[State -1, ]
type = ChangeState
value = 1000
TriggerAll = Var(51) != 1
triggerall = command = "QCB_a"

trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact

;---------------------------------------------------------------------------
;幻夢槍（強）
[State -1, ]
type = ChangeState
value = 1010
TriggerAll = Var(51) != 1
triggerall = command = "QCB_b"

trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact


;---------------------------------------------------------------------------
;秋月輪（前サマー）（弱）
[State -1, Light サマー]
type = ChangeState
value = 1100
TriggerAll = Var(51) != 1
triggerall = command = "214_a"
trigger1 = statetype != A
trigger1 = ctrl
;trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = movecontact
;trigger2 = var(41) = 0

;---------------------------------------------------------------------------
;秋月輪（前サマー）（強）
[State -1, Light サマー]
type = ChangeState
value = 1110
TriggerAll = Var(51) != 1
triggerall = command = "214_b"
trigger1 = statetype != A
trigger1 = ctrl
;trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = movecontact
;trigger2 = var(41) = 0

;---------------------------------------------------------------------------
;影月輪（背サマー）（弱）
[State -1, Light サマー]
type = ChangeState
value = 1050
TriggerAll = Var(51) != 1
triggerall = command = "214_a"
trigger1 = statetype != A
trigger1 = var(41) = 1;ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact
;trigger2 = var(41) != 0

;---------------------------------------------------------------------------
;影月輪（背サマー）（強）
[State -1, Light サマー]
type = ChangeState
value = 1060
TriggerAll = Var(51) != 1
triggerall = command = "214_b"
trigger1 = statetype != A
trigger1 = var(41) = 1;ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact
;trigger2 = var(41) != 0


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

;---------------------------------------------------------------------------
;幸せ投げ
[State -1, ]
type = ChangeState
value = 1200
TriggerAll = Var(51) != 1
triggerall = var(41) = 1
triggerall = command = "41236_y"
trigger1 = statetype != A
;trigger1 = ctrl
;trigger2 = (stateno = [200,299]) || (stateno = [400,499])
;trigger2 = movecontact


;---------------------------------------------------------------------------
;霧惑い
[State -1, Kung Fu Throw]
type = ChangeState
value = 1250
TriggerAll = Var(51) != 1
triggerall = command = "63214_y"
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X < 20
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;---------------------------------------------------------------------------
;投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
TriggerAll = Var(51) != 1
triggerall = command = "y"
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = ctrl
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 12
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = var(41) = 1
trigger2 = command = "holdfwd"
trigger2 = p2bodydist X < 30
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H


;---------------------------------------------------------------------------
;ホールド中段
[State -1, hold]
type = ChangeState
value = 900
TriggerAll = Var(51) != 1
trigger1 = command = "DD_y"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;ホールド上段
[State -1, hold]
type = ChangeState
value = 905
TriggerAll = Var(51) != 1
trigger1 = command = "DD_x"
trigger1 = statetype != A
trigger1 = ctrl


;---------------------------------------------------------------------------
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
TriggerAll = Var(51) != 1
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
TriggerAll = Var(51) != 1
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = command = "BB"
trigger2 = statetype = S
trigger2 = var(41) = 1

;---------------------------------------------------------------------------
;背向けダッシュ
[State -1, ]
type = ChangeState
value = 107
TriggerAll = Var(51) != 1
triggerall = var(41) = 1
trigger1 = command = "FF" 
trigger1 = statetype = S
;trigger1 = ctrl


;---------------------------------------------------------------------------
;２段ジャンプ
[State -1, air jump]
type = ChangeState
value = 45
TriggerAll = Var(51) != 1 ;|| ( Var(51) = 1 && Var(52) = 0 )
trigger1 = command = "airjump"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -Const(movement.airjump.height)
trigger1 = stateno = 50 
trigger1 = var(50) = 2

;---------------------------------------------------------------------------
;空中ダッシュ前
[State -1, Run Fwd]
type = ChangeState
value = 60
TriggerAll = Var(51) != 1 ;|| ( Var(51) = 1 && Var(52) = 0 )
trigger1 = command = "FF"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -Const(movement.airjump.height)
trigger1 = stateno = 50 
trigger1 = var(50) = 2

;---------------------------------------------------------------------------
;空中ダッシュ後
[State -1, Run back]
type = ChangeState
value = 65
TriggerAll = Var(51) != 1 ;|| ( Var(51) = 1 && Var(52) = 0 )
trigger1 = command = "BB"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = pos y <= -Const(movement.airjump.height)
trigger1 = stateno = 50 
trigger1 = var(50) = 2

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

;---------------------------------------------------------------------------
;幻夢槍（ダッシュ中）
[State -1, ]
type = ChangeState
value = 1010
TriggerAll = Var(51) != 1
trigger1 = command = "FF_a"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = command = "a" 
trigger2 = stateno = 100
trigger2 = ctrl


;---------------------------------------------------------------------------
;霞蹴り
[State -1, Crouching Strong Kick]
type = null;ChangeState
value = 500
TriggerAll = Var(51) != 1
triggerall = command = "down_a+b"
;triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact


;---------------------------------------------------------------------------
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
TriggerAll = Var(51) != 1
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
;trigger2 = stateno = 200
;trigger2 = time > 6
;trigger2 =  AnimElemTime(3)  > 1
;trigger3 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)

;---------------------------------------------------------------------------
;前PP
[State -1, ]
type = varset
TriggerAll = Var(51) != 1
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 200) ;&& (P2stateno = 525)
var(42) = 1


[State -1, ]
type = ChangeState
value = 202
TriggerAll = Var(42) = 1
trigger1 = stateno = 200
trigger1 = AnimelemTime(4) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 200
v = 42
value = 0

;---------------------------------------------------------------------------
;立ち背　弱P
[State -1, Stand Light Punch]
type = ChangeState
value = 203
TriggerAll = Var(51) != 1
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = var(41) = 1

;---------------------------------------------------------------------------
;立ち背PP
[State -1, ]
type = varset
TriggerAll = Var(51) != 1
triggerall = command = "x"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 203) ;&& (P2stateno = 525)
var(47) = 1


[State -1, ]
type = ChangeState
value = 205
TriggerAll = Var(47) = 1
trigger1 = stateno = 203
trigger1 = AnimelemTime(6) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 203
v = 47
value = 0


;---------------------------------------------------------------------------
;立ち6強P
[State -1, Stand Light Punch]
type = ChangeState
value = 204
TriggerAll = Var(51) != 1
triggerall = command = "y"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 230) && movecontact; && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 400) && movecontact; && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 430) && movecontact; && (AnimElemTime(3)  > 1)

;---------------------------------------------------------------------------
;前PP強P
[State -1, ]
type = varset
TriggerAll = Var(51) != 1
triggerall = command = "y"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 202) ;&& (P2stateno = 525)
var(43) = 1


[State -1, ]
type = ChangeState
value = 204
TriggerAll = Var(43) = 1
trigger1 = stateno = 202
trigger1 = AnimelemTime(6) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 202
v = 43
value = 0

;---------------------------------------------------------------------------
;立ち背　強P
[State -1, Stand Light Punch]
type = ChangeState
value = 206
TriggerAll = Var(51) != 1
triggerall = command = "y"
;triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = var(41) = 1
;trigger2 = stateno = 202
;trigger2 = time > 6
;trigger2 =  AnimElemTime(3)  > 1
;trigger3 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)


;---------------------------------------------------------------------------
;前PP強PP
[State -1, ]
type = varset
TriggerAll = Var(51) != 1
triggerall = command = "y"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 204) ;&& (P2stateno = 525)
var(44) = 1


[State -1, ]
type = ChangeState
value = 206
TriggerAll = Var(44) = 1
trigger1 = stateno = 204
trigger1 = AnimelemTime(6) >= 0

[State -1, ]
type = varset
trigger1 = stateno != 204
v = 44
value = 0


;---------------------------------------------------------------------------
;立ち4強P(螺旋刀)
[State -1, Stand Light Punch]
type = ChangeState
value = 215
TriggerAll = Var(51) != 1
triggerall = command = "y"
triggerall = command = "holdback"
trigger1 = statetype = S
trigger1 = ctrl
;trigger2 = stateno = 202
;trigger2 = time > 6
;trigger2 =  AnimElemTime(3)  > 1
;trigger3 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)

;---------------------------------------------------------------------------
;強PP or 背PP強P（派生螺旋刀）
[State -1, ]
type = varset
TriggerAll = Var(51) != 1
triggerall = command = "y"
;triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 210) || (stateno = 205) ;&& (P2stateno = 525)
var(46) = 1


[State -1, ]
type = ChangeState
value = 215
TriggerAll = Var(46) = 1
trigger1 = stateno = 210
trigger1 = AnimelemTime(8) >= 0
trigger2 = stateno = 210
trigger2 = movecontact
trigger3 = stateno = 205
trigger3 = AnimelemTime(6) >= 0


[State -1, ]
type = varset
trigger1 = stateno != 210 && stateno != 205
v = 46
value = 0



;---------------------------------------------------------------------------
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
TriggerAll = Var(51) != 1
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 
trigger5 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)





;---------------------------------------------------------------------------
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
TriggerAll = Var(51) != 1
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
;trigger3 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 

;---------------------------------------------------------------------------
;立ち背向け　弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
TriggerAll = Var(51) != 1
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = var(41) = 1


;---------------------------------------------------------------------------
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
TriggerAll = Var(51) != 1
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 

;---------------------------------------------------------------------------
;立背向け強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 245
TriggerAll = Var(51) != 1
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = var(41) = 1
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
;trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
;trigger3 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
;trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 

;---------------------------------------------------------------------------
;立背向け強キック連携
[State -1, ]
type = varset
TriggerAll = Var(51) != 1
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = (stateno = 200) || (stateno = 215)
var(45) = 1


[State -1, ]
type = ChangeState
value = 245
TriggerAll = Var(45) = 1
trigger1 = stateno = 200
trigger1 = AnimelemTime(4) >= 0
trigger2 = stateno = 215 && prevstateno != 210
trigger2 = AnimelemTime(10) >= 3


[State -1, ]
type = varset
trigger1 = stateno != 200 && stateno != 215
v = 45
value = 0


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

;---------------------------------------------------------------------------
;しゃがみ弱パンチ
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
TriggerAll = Var(51) != 1
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1) 
trigger2 = (stateno = 400) && movecontact && (AnimElemTime(2) > 1);|| (stateno = 400) && (AnimElemTime(3) > 1) 
trigger3 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger5 = var(41) = 1


;---------------------------------------------------------------------------
;しゃがみ強パンチ
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
TriggerAll = Var(51) != 1
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 
trigger5 = statetype = C
trigger5 = var(41) = 1

;---------------------------------------------------------------------------
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
TriggerAll = Var(51) != 1
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 
trigger5 = statetype = C
trigger5 = var(41) = 1

;---------------------------------------------------------------------------
;しゃがみ強キック
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
TriggerAll = Var(51) != 1
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
;trigger2 = (stateno = 200) && movecontact && (AnimElemTime(3)  > 1)
;trigger2 = (stateno = 410) && movecontact && (AnimElemTime(3)  > 1)
trigger2 = (stateno = 230) && movecontact && (AnimElemTime(3)  > 1)
trigger3 = (stateno = 430) && movecontact && (AnimElemTime(3)  > 1)
trigger4 = (stateno = 400) && movecontact && (AnimElemTime(2)  > 1) 
trigger5 = statetype = C
trigger5 = var(41) = 1


;---------------------------------------------------------------------------
;しゃがみ強キック連携
[State -1, ]
type = varset
TriggerAll = Var(51) != 1
triggerall = command = "b"
triggerall = command = "holddown"
;trigger1 = statetype = C
trigger1 = (stateno = 410) || (stateno = 215)
var(48) = 1


[State -1, ]
type = ChangeState
value = 440
TriggerAll = Var(48) = 1
trigger1 = stateno = 410
trigger1 = AnimelemTime(9) >= 0 
trigger2 = stateno = 410
trigger2 = AnimelemTime(6) >= 0 && movecontact
trigger3 = stateno = 215 && prevstateno != 210
trigger3 = AnimelemTime(10) >= 3



[State -1, ]
type = varset
trigger1 = stateno != 410 && stateno != 215
v = 48
value = 0


;---------------------------------------------------------------------------
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
TriggerAll = Var(51) != 1
triggerall = command = "x"
trigger1 = statetype = A && stateno !=105
trigger1 = ctrl
trigger2 = (stateno = 600) && movecontact && (AnimElemTime(2)  > 1)

;---------------------------------------------------------------------------
;空中強パンチ
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
TriggerAll = Var(51) != 1
triggerall = command = "y"
trigger1 = statetype = A && stateno !=105
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact

;---------------------------------------------------------------------------
;空中弱キック
[State -1, Jump Light Kick]
type = ChangeState
value = 630
TriggerAll = Var(51) != 1
triggerall = command = "a"
trigger1 = statetype = A && stateno !=105
trigger1 = ctrl
trigger2 = (stateno = 600) && movecontact && (AnimElemTime(2)  > 1)

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

;---------------------------------------------------------------------------
;パワー溜め
;パワーがＭＡＸなのに溜めるのは変なのでトリガーにpower != 3000を付けます。
;詳細はpower.cnsで

[State -1, power]
type = ChangeState
value = 2000
TriggerAll = Var(51) != 1
triggerall = power != 3000
trigger1 = command = "holdz"
;trigger1 = command = "holdy"
trigger1 = statetype = S
trigger1 = ctrl



;---------------------------------------------------------------------------
;振り向き　背向けから前向き
[State -1, turn]
type = ChangeState
value = 3
TriggerAll = Var(51) != 1
triggerall = var(41) = 1 && stateno != 1
triggerall = statetype != A
trigger1 = command = "c"
;trigger2 = command = "c"
;trigger2 = command = "holdfwd" || command = "holdback" 
;trigger1 = ctrl

;---------------------------------------------------------------------------
;振り向き　背向け移行
[State -1, turn]
type = ChangeState
value = 1
TriggerAll = Var(51) != 1
triggerall = var(41) = 0 && stateno != 3
trigger1 = command = "c"
trigger1 = statetype != A
trigger1 = ctrl


;---------------------------------------------------------------------------
;背向け歩き
[State -1, ]
type = ChangeState
value = 22
TriggerAll = Var(51) != 1
triggerall = var(41) = 1
trigger1 = command = "holdfwd" || command = "holdback" 
trigger1 = statetype = S
trigger1 = stateno != 107
;trigger1 = ctrl

;---------------------------------------------------------------------------
;背向けしゃがみ
[State -1, ]
type = ChangeState
value = 13
TriggerAll = Var(51) != 1
triggerall = var(41) = 1
trigger1 = command = "holddown" 
trigger1 = statetype = S
;trigger1 = ctrl




;---------------------------------------------------------------------
;----------------------------------------------------------以下AI用



;-------------------------------------------------------AI用




;---------------------------------------------------------------------------
;パワー溜め

[State -1, power]
type = ChangeState
value = 2000
TriggerAll = Var(51) = 1
triggerall = RoundState = 2
triggerall = power < 3000
trigger1 = statetype = S
trigger1 = (p2bodydist X > 120) || ((p2bodydist X <= 120) && (P2stateType = L))
trigger1 = (random > 900) 
trigger1 = ctrl
trigger1 = !InGuardDist
trigger1 = stateno = 0
;trigger1 = stateno != 2000
;trigger1 = stateno !=[120,160]


;---------------------------------------------------------------------------
[State -1, 地上受身] ;中級レベル、要注意
type = ChangeState
value = 5200
triggerall = stateno = 5050 ;受身を受け付けるステート 必須
triggerall = roundstate = 2
triggerall = var(51) = 1
triggerall = vel Y > 0  ;必須
triggerall = alive      ;必須
triggerall = canrecover ;必須
triggerall = pos Y < ifelse((anim = [5051,5059])||(anim = [5061,5069]), 0, 25) ;必須
triggerall = pos Y >= -20 ;必須
trigger1   = Random < 20
trigger2   = var(53) = [0,GetHitVar(hitcount)*5]
trigger2   = GetHitVar(hitcount) >= 8
trigger2   = enemy,hitdefattr = SC, AA, AT, AP ;相手の地上攻撃に合わせて回避


;---------------------------------------------------------------------------
[State -1, 空中受身] ;中級レベル、要注意
type = ChangeState
value = 5210
triggerall = stateno = 5050
triggerall = roundstate = 2
triggerall = var(51) = 1
triggerall = vel Y > -1 ;必須
triggerall = alive      ;必須
triggerall = canrecover ;必須
triggerall = pos Y = [-120,-20) ;（Pos Y < -20）の範囲内でないと不具合発生
trigger1   = Random < 20
trigger2   = p2bodydist X = [-90,90] ;近めの攻撃にのみ反応
trigger2   = var(53) = [0,GetHitVar(hitcount)*5]
trigger2   = GetHitVar(hitcount) >= 8
trigger2   = enemy,hitdefattr = SA, AA, AT, AP ;高い位置の攻撃にのみ反応



