;-| ボタンリマップ（ボタンコンフィグ）|---------------------------------------- 第１部

[Remap]
x = x      ;Ｘボタンの入力判定を実際に押すボタンに割り当てる。
y = y      ;Ｙボタン　　　　　　　　　〃
z = z      ;Ｚボタン　　　　　　　　　〃
a = a      ;Ａボタン　　　　　　　　　〃
b = b      ;Ｂボタン　　　　　　　　　〃
c = c      ;Ｃボタン　　　　　　　　　〃
s = s      ;スタートボタン　　　　　　〃

;------------------------------------------------------------------------------
; 例えば「本来Ｘボタンで出す弱パンチをＢボタンに変えたい場合」なら、
;
; x = b
;
; で簡単に出来る。使わないボタンを使っているボタンに割り当てる事も可能。

;==========================================================================
;コマンド関連ファイル
;0805現在　AI以外のコマンド数約40
;==========================================================================
[Command]
name = "AI0"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI1"
command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time = 0
[Command]
name = "AI2"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI3"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI4"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI5"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI6"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI7"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time = 0
[Command]
name = "AI8"
command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time = 0
[Command]
name = "AI9"
command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time = 0
[Command]
name = "AI10"
command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time = 0
[Command]
name = "AI11"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI12"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI13"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI14"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI15"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI16"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI17"
command = a,B,c,x,y,z,s,B,D,F,U,a,b,c,x,y,z,s,s
time = 0
[Command]
name = "AI18"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI19"
command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time = 0
[command]
name = "fwd"
command = F
time = 1
[command]
name = "back"
command = B
time = 1
[command]
name= "up"
command  =U
time = 1
[command]
name = "start"
command = s
time = 1
[command]
name = "down"
command = D
time = 1
[Command]
name = "AI20"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI21"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI22"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI23"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI24"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI25"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time = 0
[Command]
name = "AI26"
command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time = 0
[Command]
name = "AI27"
command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time = 0
[Command]
name = "AI28"
command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time = 0
[Command]
name = "AI29"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 0
[Command]
name = "AI30"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 0
[Command]
name = "AI31"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0
[Command]
name = "AI32"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0
[Command]
name = "AI33"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI34"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 0
[Command]
name = "AI35"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI36"
command = z,z,z,z,z,z,a,a,a,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI37"
command = z,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,z,z,z
time = 0
[Command]
name = "AI38"
command = z,z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z
time = 0
[Command]
name = "AI39"
command = z,z,z,z,z,a,a,a,z,z,z,z,z,z,a,a,z,z,z
time = 0
[Command]
name = "AI40"
command = z,z,z,z,a,a,a,z,z,z,z,a,z,z,a,a,z,z,z
time = 0
[Command]
name = "AI41"
command = z,z,z,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z,z
time = 0
[Command]
name = "AI42"
command = z,z,z,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z,z
time = 0
[Command]
name = "AI43"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,a,a,z
time = 0
[Command]
name = "AI44"
command = z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,a,a,a,z
time = 0
[Command]
name = "AI45"
command = z,z,z,z,z,z,a,a,z,z,z,z,z,a,a,a,a,z,z
time = 0
[Command]
name = "AI46"
command = z,z,z,z,z,z,z,z,a,a,a,a,a,a,z,z,z,z,z
time = 0
[Command]
name = "AI47"
command = z,z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,z,z,z
time = 0
[Command]
name = "AI48"
command = z,z,z,z,z,a,a,a,z,z,z,a,a,a,z,z,a,z,a
time = 0
[Command]
name = "AI49"
command = z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z,z
time = 0
[Command]
name = "AI50"
command = z,z,z,a,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z
time = 0
[Command]
name = "AI51"
command = z,z,z,a,a,z,z,z,z,a,z,z,z,z,a,a,z,z,z
time = 0
;-----超必殺-----------------------------------------------------------------
[Command]
name = "狂いの落葉"
;command = z
command = D, F,D, F, a
time = 35

[Command]
name = "狂いの落葉L"
;command = z
command = D, F,D, F, a+c
time = 35

[Command]
name = "嵐といふらむ"
command = D, F,D, F, b
time = 35

[Command]
name = "フォーリンブラスト"
command = D, B,D, B, b
time = 35

[Command]
name = "ロストウインドロウ"
command = D, F,D, F, c
time = 35

[Command]
name = "神のまにまにa"
command = F, D, B, F, a
;command = y
time = 35

;[Command]
;name = "神のまにまにb"
;command = F, D, B, F, b
;;command = y
;time = 35

[Command]
name = "からくれなゐ"
command = a+b+c
time = 10
;------------------------------------------------------------
[Command]
name = "雁行"
command = D, DF, F, a
time = 30

[Command]
name = "雁行b"
command = D, DF, F, b
time = 30

[Command]
name = "千秋楽"
command = a+b
;command = y
time = 30

[Command]
name = "晴鶴"
command = F, D, DF, a
;command = y
time = 30

[Command]
name = "晴鶴b"
command = F, D, DF, b
time = 30

[Command]
name = "群燕"
command = D, DB, B, a
time = 30

[Command]
name = "群燕b"
command = D, DB, B, b
;command = y
time = 30

[Command]
name = "白楊"
command = B, D, DB, b
;command = y
time = 30

[Command]
name = "秋光"
command = D, DB, B, c
;command = y
time = 30

[Command]
name = "散り紅葉・弧"
command = F, D, DF, c
time = 30

[Command]
name = "散り紅葉・直"
command = D, DF, F, c
time = 30

[Command]
name = "コマンドダッシュ前"
command = /z,F
time = 1

[Command]
name = "コマンドダッシュ後ろ"
command = /z,B
time = 1

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF";Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB2"
command = /x, B, B
time = 10

[Command]
name = "BB";Required (do not remove)
command = B, B
time = 10

[Command]
name = "high jump"
command = D, U
time = 30

[Command]
name = "紅葉陣"
command = D, D, b
time = 40

[Command]
name = "白秋"
command = D, D, a
time = 40

[Command]
name = "枯れ薄、弾幕Ⅱ"
command = D, D, c
time = 40

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "巴投げ"
command = b+x
time = 30

[Command]
name = "平手紅葉"
command = a+x
time = 30

[Command]
name = "recovery";Required (do not remove)
command = a+b

[Command]
Name    = "recovery"
Command = a+c
Time    = 1

[Command]
Name    = "recovery"
Command = a+x
Time    = 1

[Command]
Name    = "recovery"
Command = b+c
Time    = 1

[Command]
Name    = "recovery"
Command = b+x
Time    = 1

[Command]
Name    = "recovery"
Command = c+x
Time    = 1
time = 1

[Command]
Name    = "recovery"
Command = x+z
Time    = 1

[Command]
Name    = "recovery"
Command = y+z
Time    = 1

;-| Dir + Button |---------------------------------------------------------
;前＋ボタン
[Command]
name = "fwd_a"
command = /F,a
time = 1

[Command]
name = "fwd_b"
command = /F,b
time = 1

[Command]
name = "fwd_c"
command = /F,c
time = 1

[Command]
name = "back_a"
command = /$B,a
time = 1

;しゃがみ攻撃
[Command]
name = "down_a"
command = /$D,a
time = 1

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

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

[Command]
name = "down_c"
command = /$D,c
time = 1

[Command]
name = "back_x"
command = /$B,x
time = 1

[Command]
name = "up_b"
command = /$U,b
time = 1

;-| 攻撃ボタン押しっぱなし |-----------------------------------------------
[Command]
name = "/x"
command = /x
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 = "+b"
;command = ~30b
;time = 1
;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

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

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

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

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


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


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

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

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup";Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]


;===========================================================================
;コマンド実行部分（優先順位が高いものを先に表記）
;===========================================================================
;===================================================================
超必殺技
;===================================================================
;紅葉踏み分け　　　　現在出来に不満な部分が多いので未搭載。
[State -1]
type = null;ChangeState
value = 4000
TriggerAll	= Var(59) = 0
triggerall = power >= 1000
triggerall = command = "狂いの落葉"
triggerall = statetype = A
trigger1 = ctrl = 1
Trigger2 = Stateno = 790
Trigger2 = (AnimElem = 4) || (movecontact)
Trigger3 = Stateno = 933
Trigger3 = movehit
;-------------------------------------------------------------------
;狂いの落葉ルナティック
[State -1]
type = ChangeState
value = 20007
TriggerAll	= Var(59) = 0
triggerall = power >= 2000
triggerall = command = "狂いの落葉L"
Triggerall = life <= 250
trigger1 = statetype = S
trigger1 = ctrl = 1
Trigger2 = Stateno = 790
Trigger2 = (AnimElem = 4) || (movecontact)
Trigger3 = (Stateno = 760) &&(movehit)
;-------------------------------------------------------------------
;狂いの落葉
[State -1]
type = ChangeState
value = 2000
TriggerAll	= Var(59) = 0
triggerall = power >= 1000
triggerall = command = "狂いの落葉"
trigger1 = statetype = S
trigger1 = ctrl = 1
Trigger2 = Stateno = 790
Trigger2 = (AnimElem = 4) || (movecontact)
Trigger3 = Stateno = 933
Trigger3 = movehit
Trigger4 = (Stateno = 760) &&(movehit)
;-------------------------------------------------------------------

;フォーリンブラスト
[State -1]
type = ChangeState
value = 2700
TriggerAll	= Var(59) = 0
triggerall = power >= 2000
trigger1 = command = "フォーリンブラスト"
trigger1 = statetype = S
trigger1 = ctrl = 1
Trigger2 = (Stateno = 760) &&(movehit)
Trigger2 = (command = "フォーリンブラスト") || (command = "群燕b") || (command = "白楊")
Trigger3 = (Stateno = 1411)
Trigger3 = (command = "フォーリンブラスト") || (command = "群燕b") || (command = "白楊")
;-------------------------------------------------------------------
;嵐といふらむ
[State -1]
type = ChangeState
value = 2600
TriggerAll	= Var(59) = 0
triggerall = power >= 1000
triggerall = command = "嵐といふらむ"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 970
trigger2 = Time >= 32
;-------------------------------------------------------------------
;ロストウインドロウ
[State -1]
type = ChangeState
value = 3600
TriggerAll	= Var(59) = 0
triggerall = NumHelper(2100) = 0
triggerall = power >= 1000
triggerall = command = "ロストウインドロウ"
Triggerall = Vel Y >= -1
trigger1 = (ctrl = 1) && (statetype = S)
Trigger2 = (movehit >= 1) && (Pos Y >= -10)
trigger3 = (stateno = 970) && (Time >= 32)
Trigger4 = (Stateno = 840) && (Time >= 24)
Trigger5 = (Stateno = 846) && (Time >= 30)
trigger6 = (ctrl = 1) && (statetype = A)
;---------------------------------------------------------------------------
;神のまにまにa
[State -1]
type = ChangeState
value = 2099
TriggerAll	= Var(59) = 0
triggerall = power >= 1000
triggerall = NumHelper(2100) = 0
triggerall = command = "神のまにまにa"
trigger1 = statetype = S
trigger1 = ctrl = 1
;----------------------------------------------------------------
;神のまにまにb
;[State -1]
;type = ChangeState
;value = 2098
;TriggerAll	= Var(59) = 0
;triggerall = power >= 1000
;triggerall = NumHelper(2100) = 0
;triggerall = command = "神のまにまにb"
;trigger1 = statetype = S
;trigger1 = ctrl = 1
;-----------------------------------------------------------------
;からくれなゐ
[State -1]
type = ChangeState
value = 2200
TriggerAll	= Var(59) = 0
triggerall = power >= 1000
triggerall = NumHelper(2100) = 0
triggerall = command = "からくれなゐ"
triggerall = statetype != A
triggerall = var(50) >= 116
trigger1 = ctrl = 1
;-----------------------------------------------------------------
;===========================================================================
;　必殺技
;===========================================================================
;晴鶴　対空
[State -1]
type = ChangeState
value = 840
TriggerAll	= Var(59) = 0
triggerall = command = "晴鶴"
Triggerall = var(7) <= 3
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 201
trigger3 = movecontact
Trigger4 = stateno = 880
Trigger4 = Time = [24,44]
Trigger5 = stateno = 820
Trigger5 = Time >= 21
Trigger6 = stateno = 970
Trigger6 = Time >= 32
;----------------------------------------------------------------
;晴鶴ｂ　対空
[State -1]
type = ChangeState
value = 846
TriggerAll	= Var(59) = 0
triggerall = command = "晴鶴b"
Triggerall = var(7) <= 3
triggerall = var(50) >= 36
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 201
trigger3 = movecontact
Trigger4 = stateno = 880
Trigger4 = Time = [24,44]
Trigger5 = stateno = 823
Trigger5 = Time >= 28
Trigger6 = stateno = 1056            ;しゃがみ→ｃ発弾
Trigger6 = AnimElem = 3 ||AnimElem = 4 ||AnimElem =5
Trigger7 = stateno = 876
;----------------------------------------------------------------
;雁行a
[State -1]
type = ChangeState
value = 820
TriggerAll	= Var(59) = 0
triggerall = command = "雁行"
triggerall = NumHelper(10820) = 0
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200 ;a
trigger2 = movecontact
;----------------------------------------------------------------
;雁行b 
[State -1]
type = ChangeState
value = 823
TriggerAll	= Var(59) = 0
triggerall = command = "雁行b"
triggerall = NumHelper(10820) = 0
triggerall = var(50) >= 36
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
;----------------------------------------------------------------
;白楊
[State -1]
type = ChangeState
value = 880
TriggerAll	= Var(59) = 0
triggerall = command = "白楊"
Triggerall = var(7) <= 3
triggerall = var(50) >= 36
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 201
trigger3 = movecontact
trigger4 = stateno = 204
trigger4 = movecontact
trigger5 = (stateno = 823) && (Time >= 30)
;----------------------------------------------------------------
;随嵐
[State -1]
type = ChangeState
value = 870
TriggerAll	= Var(59) = 0
triggerall = command = "晴鶴"
Triggerall = var(7) <= 3
Triggerall = Stateno != 870
trigger1 = command = "晴鶴"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger1 = Vel X  >= 0
trigger2 = (stateno = 600) || (stateno = 810) || (stateno = 640)
trigger2 = movecontact
trigger3 = stateno = 842
trigger3 = movecontact
Trigger3 = Time >= 17
trigger4 = stateno = 1403
Trigger4 = Time >= 20
;----------------------------------------------------------------
;飛泉
[State -1]
type = ChangeState
value = 875
TriggerAll	= Var(59) = 0
triggerall = command = "晴鶴b"
triggerall = var(50) >= 36
Triggerall = var(7) <= 3
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger1 = Vel X  >= 0
trigger2 = (stateno = 600) || (stateno = 810) 
trigger2 = movecontact
trigger3 = stateno = 842
trigger3 = movecontact
Trigger3 = Time >= 17
trigger4 = stateno = 1403     ;秋光
Trigger4 = Time >= 20
Trigger5 = (Stateno = 870) && (Time >= 14)
Trigger6 = Stateno = 671
;-----------------------------------------------------------------
;秋光
[State -1]
type = ChangeState
value = 1400
TriggerAll	= Var(59) = 0
triggerall = command = "秋光"
triggerall = var(50) >= 36
Triggerall = Pos Y <= -20
triggerall = NumHelper(11401) = 0
trigger1 = ctrl = 1
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 842
trigger3 = movecontact
Trigger3 = Time >= 17
trigger4 = stateno = 870
Trigger4 = Time >= 20
;-----------------------------------------------------------------
;散紅葉・弧
[State -1]
type = ChangeState
value = 1415
TriggerAll	= Var(59) = 0
triggerall = command = "散り紅葉・弧"
triggerall = var(50) >= 36
trigger1 = ctrl = 1
Trigger2 = stateno = 880
Trigger2 = Time = [24,44]
Trigger3 = (Stateno = 820) && (Time >= 21)
Trigger4 = (Stateno = 823) && (Time >= 28)
;-----------------------------------------------------------------
;散紅葉・直　地上
[State -1]
type = ChangeState
value = 1410
TriggerAll	= Var(59) = 0
triggerall = command = "散り紅葉・直"
triggerall = var(50) >= 36
;Triggerall = Statetype != A
trigger1 = ctrl = 1
Trigger2 = stateno = 880
Trigger2 = Time = [24,44]
Trigger3 = (Stateno = 820) && (Time >= 32)
Trigger4 = (Stateno = 823) && (Time >= 40)
;-----------------------------------------------------------------
;群燕
[State -1]
type = ChangeState
value = 810
Triggerall = var(7) <= 3
TriggerAll	= Var(59) = 0
triggerall = var(1) < 2
triggerall = command = "群燕"
trigger1 = ctrl = 1
trigger2 = (stateno = 600) && (movecontact)
trigger3 = stateno = 842
trigger3 = movecontact
Trigger3 = Time >= 17
trigger4 = stateno = 870
Trigger4 = Time >= 20
trigger5 = (stateno = 201) && (Time >= 17)
Trigger6 = (stateno = 1200) && (Time >= 17)
;----------------------------------------------------------------
;群燕b
[State -1]
type = ChangeState
value = 811
Triggerall = var(7) <= 3
TriggerAll	= Var(59) = 0
triggerall = var(1) < 2
triggerall = command = "群燕b"
triggerall = var(50) >= 36
trigger1 = ctrl = 1
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 870
Trigger3 = Time >= 20
trigger4 = (stateno = 201) && (Time >= 17)
Trigger5 = (stateno = 1200) && (Time >= 17)
;-----------------------------------------------------------------
;巴投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 910
TriggerAll	= Var(59) = 0
triggerall = command = "巴投げ"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = p2bodydist X < 30
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;移動巴投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 909
TriggerAll	= Var(59) = 0
triggerall = command = "巴投げ"
triggerall = statetype = S
trigger1 = ctrl
trigger1 = stateno != 100

;平手紅葉　近
[State -1, Kung Fu Throw]
type = ChangeState
value = 930
TriggerAll	= Var(59) = 0
triggerall = command = "平手紅葉"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = p2bodydist X < 20
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;平手紅葉　遠
[State -1, Kung Fu Throw]
type = ChangeState
value = 933
TriggerAll	= Var(59) = 0
triggerall = command = "平手紅葉"
triggerall = statetype = S
trigger1 = ctrl
trigger1 = stateno != 100
trigger2 = stateno = 760
Trigger2 = Movehit
trigger3 = stateno = 203
Trigger3 = Movecontact
trigger4 = stateno = 1006
Trigger4 = AnimElem = 3
trigger5 = stateno = 1010
Trigger5 = Time >= 20
;----------------------------------------------------------------
;白秋
[State -1]
type = ChangeState
value = 790
TriggerAll	= Var(59) = 0
Triggerall = var(7) <= 3
triggerall = statetype != A
triggerall = command = "白秋"
trigger1 = ctrl
trigger2 = (stateno = 201) ||(stateno = 203) ||(stateno = 204)
trigger2 = movecontact
Trigger3 = stateno = 880
Trigger3 = Movecontact
Trigger3 = Time = [24,44]
;-------------------------------------------------------------
;ダッキングからの突き上げ
[State -1]
type = ChangeState
value = 752
TriggerAll	= Var(59) = 0
Trigger1 = command = "recovery"
trigger1 = stateno = 751
;-------------------------------------------------------------
;千秋楽
[State -1]
type = ChangeState
value = 720
TriggerAll	= Var(59) = 0
triggerall = statetype != A
Triggerall = fvar(1) >= 0.7
trigger1 = command = "fwd_a"
trigger1 = command != "holddown"
Trigger1 = fvar(1) < 1
trigger1 = ctrl = 1
Trigger2 = command = "千秋楽"
trigger2 = (ctrl = 1) || (stateno = 200) || (StateNo = 100) || (stateno = 240)
;----------------------------------------------------------------
;紅葉陣
[State -1]
type = ChangeState
value = 1100
TriggerAll	= Var(59) = 0
triggerall = command = "紅葉陣"
triggerall = NumHelper(11100) = 0
triggerall = var(50) >= 36
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200
trigger3 = (stateno = 103) || (Stateno = 104)
Trigger3 = AnimElem = 6
;-----------------------------------------------------------------
;弾幕Ⅱ
[State -1]
type = ChangeState
value = 1300
TriggerAll	= Var(59) = 0
triggerall = command = "枯れ薄、弾幕Ⅱ"
triggerall = NumHelper(11300) = 0
triggerall = var(50) >= 36
triggerall = statetype = A
trigger1 = ctrl
Trigger2 = (stateno = 1200) && (Time >= 17)
;-------------------------------------------------------------
;枯れ薄
[State -1]
type = ChangeState
value = 970
TriggerAll	= Var(59) = 0
triggerall = command = "枯れ薄、弾幕Ⅱ"
triggerall = var(50) >= 36
triggerall = statetype != A
triggerall = NumHelper(2490) = 0
trigger1 = ctrl
Trigger2 = (stateno = 1006) || (Stateno = 1007)
Trigger2 = Time >= 15
Trigger3 = (stateno = 1015) && (Time >= 15)
Trigger4 = stateno = 1056
Trigger4 = AnimElem =3 ||AnimElem = 4 || AnimElem = 5

;===========================================================================
;　通常技：左右キー入力
;===========================================================================
;しゃがみ後ろｂ
[State -1]
type = ChangeState
value = 470
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = command = "holdback"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = (stateno = 200) || (Stateno = 440)
trigger2 = movecontact
;-------------------------------------------------------------
;横+パンチ　ストレート
[State -1]
type = ChangeState
value = 210
TriggerAll	= Var(59) = 0
triggerall = command = "fwd_a"
triggerall = statetype = S
trigger1 = ctrl = 1
trigger2 = (stateno = 200) || (StateNo = 100) || (stateno = 240)
trigger2 = movecontact
Trigger3 = (StateNo = 100) || (Stateno = 102)
;-------------------------------------------------------------
;横＋キック（近）　踵落とし
[State -1]
type = ChangeState
value = 250
TriggerAll	= Var(59) = 0
triggerall = command = "fwd_b"
triggerall = command != "holddown"
triggerall = p2bodydist X < 50
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 201
trigger2 = movecontact
trigger3 = stateno = 200
trigger3 = movecontact
;-------------------------------------------------------------
;横＋キック（遠）ニールキック　
[State -1]
type = ChangeState
value = 700
TriggerAll	= Var(59) = 0
triggerall = command = "fwd_b"
triggerall = command != "holddown"
Triggerall = Stateno != 700
Triggerall = PrevStateno != 700 
trigger1 = ctrl = 1
trigger2 = stateno = 203 && Time = [7,14]
trigger3 = stateno = 240 && Time >= 12
Trigger4 = Stateno = 640 && Movecontact
trigger5 = Stateno = 1010 && Time >= 19
;-------------------------------------------------------------
;横＋ｃ　紅葉胡蝶弾
[State -1]
type = ChangeState
value = 1010
TriggerAll	= Var(59) = 0
triggerall = command = "fwd_c"
triggerall = command != "holddown"
triggerall = NumHelper(22461) = 0
triggerall = NumHelper(21011) = 0
triggerall = var(50) >= 27
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 203 && movecontact
;-------------------------------------------------------------
;屈→c
[State -1]
type = ChangeState
value = 1050
TriggerAll	= Var(59) = 0
triggerall = command = "c"
triggerall = command = "holdfwd"
triggerall = command = "holddown"
triggerall = NumHelper(11050) = 0
triggerall = var(50) >= 27
triggerall = NumHelper(22461) = 0
trigger1 = statetype = C
trigger1 = ctrl
Trigger2 = Stateno = 201 || Stateno = 202 || Stateno = 203 || Stateno = 440
Trigger2 = Movecontact
;===========================================================================
;　通常技：上下キー入力
;===========================================================================
;-------------------------------------------------------------
;キック　チェーン」1-②スライディング/ダッシュ↓キック
[State -1]
type = ChangeState
value = 206
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = stateno = 204
trigger1 = movecontact
trigger2 =stateno =100
;-------------------------------------------------------------
;空中↓ｂ
[State -1]
type = ChangeState
value = 670
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = statetype = A
trigger1 = ctrl
Trigger2 = Stateno = 600 && Time >= 10
Trigger3 = Stateno = 1200 && Time >= 22
;-------------------------------------------------------------
;ジャンプ↓c
[State -1]
type = ChangeState
value = 1205
TriggerAll	= Var(59) = 0
triggerall = command = "c"
triggerall = command = "holddown"
triggerall = statetype = A
triggerall = NumHelper(2463) = 0
triggerall = var(50) >= 27
trigger1 = ctrl
Trigger2 = Stateno = 640
Trigger2 = (Time >= 13) && Movecontact
;===========================================================================
;基本動作
;===========================================================================
;飛翔　前・上
[State -1]
type = changestate
value = 80
TriggerAll	= Var(59) = 0
Triggerall = command = "holdfwd"
Triggerall = command = "holdup"
Triggerall = command = "/x"
Triggerall = statetype = A
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
;---------------------------------------------------------------------------
;飛翔　前・下
[State -1]
type = changestate
value = 81
TriggerAll	= Var(59) = 0
Triggerall = command = "holdfwd"
Triggerall = command = "holddown"
Triggerall = command = "/x"
Triggerall = statetype = A
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
;---------------------------------------------------------------------------
;飛翔　後・上
[State -1]
type = changestate
value = 82
TriggerAll	= Var(59) = 0
Triggerall = command = "holdback"
Triggerall = command = "holdup"
Triggerall = command = "/x"
Triggerall = statetype = A
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
Trigger2 = Stateno = 846
Trigger2 = Time = [20,29]
;---------------------------------------------------------------------------
;飛翔　後・下
[State -1]
type = changestate
value = 83
TriggerAll	= Var(59) = 0
Triggerall = command = "holdback"
Triggerall = command = "holddown"
Triggerall = command = "/x"
Triggerall = statetype = A
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
Trigger2 = Stateno = 846
Trigger2 = Time = [20,29]
;---------------------------------------------------------------------------
;飛翔　前
[State -1]
type = changestate
value = 76
TriggerAll	= Var(59) = 0
Triggerall = statetype = A
Triggerall = command = "holdfwd"
Triggerall = command = "/x"
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
;---------------------------------------------------------------------------
;飛翔　後
[State -1]
type = changestate
value = 77
TriggerAll	= Var(59) = 0
Triggerall = command = "holdback"
Triggerall = command = "/x"
Triggerall = statetype = A
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
Trigger2 = Stateno = 846
Trigger2 = Time = [20,29]
;---------------------------------------------------------------------------
;飛翔　上
[State -1]
type = changestate
value = 78
TriggerAll	= Var(59) = 0
Triggerall = command = "holdup"
Triggerall = command = "/x"
Triggerall = statetype = A
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
;---------------------------------------------------------------------------
;飛翔　下
[State -1]
type = changestate
value = 79
TriggerAll	= Var(59) = 0
Triggerall = command = "holddown"
Triggerall = command = "/x"
Triggerall = statetype = A
triggerall = var(50) >= 18
triggerall = var(1) < 3
Triggerall = PrevStateno != [105,109]
triggerall = stateno != [105,109]
Trigger1 = ctrl = 1
;---------------------------------------------------------------------------
;ダッキング
[State -1]
type = ChangeState
value = 103
trigger1 = command = "FF"
triggerall = statetype = S
trigger1 = command = "/x"
trigger1 = command = "FF"
trigger1 = ctrl 
Trigger2 = (Stateno = 200) && (Time >= 13) && command = "/x"
Trigger3 = (Stateno = 201) && (Time >= 22) && command = "/x"
Trigger4 = (Stateno = 203) && (Time >= 15) && command = "/x"
Trigger5 = (Stateno = 210) && (Time >= 25) && command = "/x"
;---------------------------------------------------------------------------
;ダッキング:その場
[State -1]
type = ChangeState
value = 102
TriggerAll	= Var(59) = 0
triggerall = command = "holddown"
triggerall = command = "/x"
triggerall = statetype = S
trigger1 = ctrl
Trigger2 = (Stateno = 200) && (Time >= 13)
Trigger3 = (Stateno = 201) && (Time >= 22)
Trigger4 = (Stateno = 203) && (Time >= 15)
Trigger5 = (Stateno = 210) && (Time >= 25)
;---------------------------------------------------------------------------
;前方ダッシュ
[State -1]
type = ChangeState
value = 100
TriggerAll	= Var(59) = 0
triggerall = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl = 1
Trigger2 = (stateno = 1006) || (Stateno = 1007)
Trigger2 = Time >= 15
;---------------------------------------------------------------------------
;大バックステップ
[State -1]
type = ChangeState
value = 107
TriggerAll	= Var(59) = 0
triggerall = command = "BB"
triggerall = command = "/x"
triggerall = statetype = S
trigger1 = ctrl 
Trigger2 = (stateno = 1006) || (Stateno = 1007)
Trigger2 = Time >= 15
;---------------------------------------------------------------------------
;バックステップ
[State -1]
type = ChangeState
value = 105
TriggerAll	= Var(59) = 0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = command = "狂いの落葉"
Trigger2 = Stateno = 790
Trigger2 = (AnimElem = 4) || (movecontact)
Trigger2 = power <= 1000
Trigger3 = (command = "BB") || (command = "b")
Trigger3 = (Stateno = 765) && (PrevStateno != 756) && (movecontact = 0) && (Time >= 17)
trigger4 = command = "BB"
Trigger4 = (stateno = 1006) || (Stateno = 1007)
Trigger4 = Time >= 15
;---------------------------------------------------------------------------
;空中ダッシュ(air)
[State -1, Dash]
type = ChangeState
value = 110
TriggerAll	= Var(59) = 0
triggerall = var(1) < 2
triggerall = Pos Y <= -30
trigger1 = command = "FF"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = stateno != 110
trigger1 = stateno != 115
;---------------------------------------------------------------------------
;空中バックダッシュ(air)
[State -1, Dash]
type = ChangeState
value = 115
TriggerAll	= Var(59) = 0
triggerall = var(1) < 2
triggerall = Pos Y <= -30
trigger1 = command = "BB"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = stateno != 110
trigger1 = stateno != 115
;---------------------------------------------------------------------------
;ガード反撃
[State -1]
type = ChangeState
value = 8000
TriggerAll	= Var(59) = 0
TriggerAll = command = "x"
TriggerAll = Statetype = S
Trigger1 = (StateNo = 151) || (StateNo = 153)
triggerall = power >= 500
;----------------------------------------------------------------------------
;===========================================================================
;　通常技：単発ボタン
;===========================================================================
;----------------------------------------------------------------
;ダッキング→下段避け攻撃→水面蹴り
[State -1]
type = ChangeState
value = 765
;TriggerAll	= Var(59) = 0
triggerall = command = "b" 
Triggerall = var(7) <= 3
trigger1 = stateno = 756
;----------------------------------------------------------------
;晴鶴ｂ追撃蹴り
[State -1]
type = ChangeState
value = 953
;TriggerAll	= Var(59) = 0
triggerall = command = "b" ||var(59)&&p2statetype=A&&P2movetype=H
Triggerall = var(7) <= 3
triggerall = var(50) >= 36
trigger1 = stateno = 846
Trigger1 = Time >= 29
;---------------------------------------------
;キック　チェーン」2-②吹き飛ばし前蹴り
[State -1]
type = ChangeState
value = 205
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = stateno = 204
trigger1 = movecontact
;---------------------------------------------
;キック　チェーン2-①蹴込み
[State -1]
type = ChangeState
value = 204
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = stateno = 201
trigger1 = movecontact
;---------------------------------------------
;パンチ　チェーン1-③　
[State -1]
type = ChangeState
value = 202
TriggerAll	= Var(59) = 0
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = stateno = 203
trigger1 = movecontact
;---------------------------------------------
;パンチ　チェーン1-③　
[State -1]
type = ChangeState
value = 203
TriggerAll	= Var(59) = 0
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = stateno = 201
trigger1 = movecontact
;---------------------------------------------
;パンチ　チェーン1-①　
[State -1]
type = ChangeState
value = 201
TriggerAll	= Var(59) = 0
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = stateno = 200
trigger1 = movecontact
;---------------------------------------------
;パンチ　ジャブ
[State -1]
type = ChangeState
value = 200
TriggerAll	= Var(59) = 0
triggerall = command = "a"
trigger1 = statetype = S
trigger1 = command != "holddown"
trigger1 = ctrl = 1
trigger2 = stateno = 102  ;その場ダッキング
trigger2 = Time >= 4
;-------------------------------------------------------------
;キック　蹴込み
[State -1]
type = ChangeState
value = 240
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = (stateno = 200) 
trigger2 = movecontact
Trigger3 = (StateNo = 100) || (StateNo = 101)
Trigger4 = (stateno = 1006) || (Stateno = 1007)
Trigger4 = Time >= 15
;-----------------------------------------------------------------
;ｃ　紅葉蝶弾
[State -1]
type = ChangeState
value = 1005
TriggerAll	= Var(59) = 0
triggerall = command = "c"
triggerall = command != "holddown"
triggerall = NumHelper(21005) = 0
triggerall = var(50) >= 18
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
;-------------------------------------------------------------------
;しゃがみパンチ
[State -1]
type = ChangeState
value = 400
TriggerAll	= Var(59) = 0
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
Trigger3 = StateNo = 400
trigger3 = Time >= 9
;---------------------------------------------------------------------
;しゃがみキック
[State -1]
type = ChangeState
value = 440
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = (stateno = 200) || (stateno = 400)
trigger2 = movecontact
Trigger3 = stateno = 210
Trigger3 = Movecontact
;-------------------------------------------------------------
;屈c
[State -1]
type = ChangeState
value = 1015
TriggerAll	= Var(59) = 0
triggerall = command = "c"
triggerall = statetype = C
triggerall = NumHelper(22459) = 0
triggerall = NumHelper(21200) = 0
triggerall = var(50) >= 18
trigger1 = ctrl
Trigger2 = Stateno = 400
Trigger2 = movecontact
Trigger3 = stateno = 440 && Time >= 17
;---------------------------------------------------------------------------
;ジャンプa
[State -1]
type = ChangeState
value = 600
TriggerAll	= Var(59) = 0
triggerall = command = "a"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
Trigger2 = Time >= 7
;-----------------------------------------------------------------
;ジャンプc
[State -1]
type = ChangeState
value = 1200
TriggerAll	= Var(59) = 0
triggerall = command = "c"
triggerall = statetype = A
triggerall = NumHelper(22459) = 0
triggerall = NumHelper(11200) = 0
triggerall = var(50) >= 18
trigger1 = ctrl
Trigger2 = Stateno = 600
Trigger2 = Movecontact
;-----------------------------------------------------------------
;ジャンプキック
[State -1]
type = ChangeState
value = 640
TriggerAll	= Var(59) = 0
triggerall = command = "b"
triggerall = statetype = A
trigger1 = ctrl
Trigger2 = Stateno = 600
Trigger2 = Movecontact
;----------------------------------------------------------------
挑発
[State -1]
type = ChangeState
value = 195
TriggerAll	= Var(59) = 0
triggerall = command = "s"
triggerall = statetype = S
trigger1 = ctrl
;------------------------------------------------------------------
;ジャンプキャンセル
[State -2]
type = Changestate
triggerall = command = "holdup"
Trigger1 = StateNo = 240 && movecontact
Trigger2 = StateNo = 970 && Time >= 32
Trigger3 = Stateno = 1006 && Time >= 12
Trigger4 = Stateno = 1007 && Time >= 12
Trigger5 = Stateno = 1010 && Time >= 20
Trigger6 = stateno = 1056            ;しゃがみ→ｃ発弾
Trigger6 = AnimElem = 3 ||AnimElem = 4 ||AnimElem =5
Trigger7 = StateNo = 203 && Time >= 19
value = 40

;---------------------------------------------------------------------------
[State -3, AI起動]
type = VarSet
triggerall =!ishelper
triggerall = stateno!=0&&RoundState = 2||ctrl&&roundstate!=3
trigger1 = Command = "AI0" || Command = "AI1" || Command = "AI2" || Command = "AI3"
trigger2 = Command = "AI4" || Command = "AI5" || Command = "AI6" || Command = "AI7"
trigger3 = Command = "AI8" || Command = "AI9" || Command = "AI10"|| Command = "AI11"
trigger4 = Command = "AI12"|| Command = "AI13"|| Command = "AI14"|| Command = "AI15"
trigger5 = Command = "AI16"|| Command = "AI17"|| Command = "AI18"|| Command = "AI19"
trigger6 = Command = "AI20"|| Command = "AI21"|| Command = "AI22"|| Command = "AI23"
trigger7 = Command = "AI24"|| Command = "AI25"|| Command = "AI26"|| Command = "AI27"
trigger8 = Command = "AI28"|| Command = "AI29"|| Command = "AI30"|| Command = "AI31"
trigger9 = Command = "AI32"|| Command = "AI33"|| Command = "AI34"|| Command = "AI35"
trigger10= Command = "AI36"|| Command = "AI37"|| Command = "AI38"|| Command = "AI39"
trigger11= Command = "AI40"|| Command = "AI41"|| Command = "AI42"|| Command = "AI43"
trigger12= Command = "AI44"|| Command = "AI45"|| Command = "AI46"|| Command = "AI47"
trigger13= Command = "AI48"|| Command = "AI49"|| Command = "AI50"|| Command = "AI51"
trigger14= var(59)
trigger15= numhelper(35)
trigger15= helper(35),var(59)>=1
var(59)  = 1
[State 100000]
type=varset
triggerall=var(59)
trigger1 = stateno !=[120,155]
trigger1 = roundstate!=2
var(59)=-1

[State -3,常駐ヘルパー]
type = helper
trigger1 = roundstate = 2
trigger1 = !NumHelper(35)
helpertype=normal
name="hourai"
stateno=35
ID=35
pos=0,0
keyctrl=1
pausemovetime=99999999
supermovetime=99999999
persistent = 0
[State -3]
type = helper
trigger1=!NumHelper(36)
trigger1=(inguarddist=0)*(enemynear,movetype=I)*(enemynear,stateno=[40,119])
helpertype=normal
name="danmaku"
stateno=36
ID=36
pos=0,0
keyctrl=1
pausemovetime=99999999
supermovetime=99999999
persistent = 0


;---------------------------------------------------------------------------




;ガード
[State 100000]
type=varset
triggerall=!ishelper
triggerall=var(59)=1
Triggerall=NumHelper(35)
trigger1=inguarddist
trigger2=p2bodydist X=[-80,60]
trigger2=p2movetype=A
trigger2=p2stateno>=200
trigger2=p2statetype=A
trigger3=p2stateno=helper(35),var(45)||p2stateno=helper(35),var(46)
trigger3=p2stateno=[200,4999]
trigger4=Helper(35),var(49)&&Helper(35),var(56)>=Helper(35),var(49)
trigger5=Helper(35),var(50)
trigger6=Helper(35),var(51)
var(59)=2
ignorehitpause = 1
[State -3,crouch]
type = VarSet
triggerall=!ishelper
triggerall = var(59) = [2,4]
triggerall = statetype!=A
trigger1 = p2statetype=C
trigger2 = p2statetype=S
trigger2 = enemynear,time < 15
var(59) = 4
ignorehitpause = 1
[State -3,stand]
type = VarSet
triggerall=!ishelper
triggerall = var(59)
triggerall = var(59) = [2,4]
triggerall = statetype!=A
trigger1 = p2statetype =A
trigger2 = p2statetype=S
trigger2 = stateno=[120,155]
trigger2 = enemynear,time >= 15;発生の遅い攻撃に対して切り替える
trigger2 = enemynear,moveguarded=0
trigger2 = enemynear,movetype=A
var(59) = 3
ignorehitpause = 1


[State 100000]
type=varset
triggerall=!ishelper
triggerall=var(59)=[3,4]
Triggerall = NumHelper(35)
triggerall = p2stateno!=0
trigger1 = p2stateno=Helper(35),var(41)
trigger2 = p2stateno=Helper(35),var(42)
trigger3 = p2stateno=Helper(35),var(43)
trigger4 = p2stateno=Helper(35),var(44)
var(59)=ifelse(var(40)=3,4,3)


[State -3,COUNTER]
type = VarSet
triggerall=!ishelper
triggerall = var(59)=[2,4]
Triggerall = NumHelper(35)
triggerall = statetype!=A
triggerall=helper(35),var(50)=0
triggerall=helper(35),var(51)=0
trigger1 = EnemyNear,HitDefAttr = SCA, NT, ST, HT
trigger2 = p2stateno=Helper(35),var(47)||p2stateno=Helper(35),var(48)
var(59) = 9
ignorehitpause = 1


;p2nameでの対応
[State -3,crouch]
type = VarSet
triggerall=!ishelper
triggerall = var(59)=[2,4]
trigger1=enemynear,authorname = "mikage_th105"&&p2name="Komachi Onoduka"
trigger1=(p2stateno = [220,221])||p2stateno =701||p2stateno=1100
trigger2=enemynear,authorname = "mikage_th105"&&p2name="Remilia Scarlet"
trigger2=p2stateno=204||p2stateno=401
trigger3=enemynear,authorname = "mikage_th105"&&p2name="Youmu Konpaku"
trigger3=p2stateno=202||p2stateno=702||(p2stateno=[860,861])
trigger4=enemynear,authorname = "mikage_th105"&&p2name="Aya Syameimaru"
trigger4=(p2stateno=[401,403])
trigger5=enemynear,authorname = "mikage_th105"&&p2name="Meiling Hong"
trigger5=p2stateno=701
trigger6=enemynear,authorname = "mikage_th105"&&p2name="Alice Margatroid"
trigger6=p2stateno=702
trigger7=p2name ="Mashiro Mito"
trigger7=p2stateno = 240
trigger8=enemynear,authorname = "mikage_th105"&&p2name="Reisen Udongein Inaba"
trigger8=p2stateno=701||p2stateno=402
trigger9 = p2name = "Rugal.B"
trigger9 = p2stateno = 230||p2stateno = 3100&&time >= 60
var(59) = 4
ignorehitpause = 1

[State -3,stand]
type = VarSet
triggerall=!ishelper
triggerall = var(59)=[2,4]
trigger1=enemynear,authorname = "mikage_th105"&&p2name="Komachi Onoduka"
trigger1= (p2stateno =[401,402])||(p2stateno = [201,204])||p2stateno=1101||p2stateno=1400||p2stateno=1450||p2stateno=700||p2stateno=702
trigger2=enemynear,authorname = "mikage_th105"&&p2name="Remilia Scarlet"
trigger2=(p2stateno=[201,203])||(p2stateno=[220,221])
trigger3=enemynear,authorname = "mikage_th105"&&p2name="Youmu Konpaku"
trigger3=p2stateno=201||(p2stateno=[203,204])||(p2stateno=[220,221])||(p2stateno=[700,701])||p2stateno=703||p2stateno=1150
trigger4=enemynear,authorname = "mikage_th105"&&p2name="Aya Syameimaru"
trigger4=(p2stateno=[201,203])||(p2stateno=[707,708])||(p2stateno=[700,701])
trigger5=enemynear,authorname = "mikage_th105"&&p2name="Meiling Hong"
trigger5=(p2stateno=[201,205])||(p2stateno=[220,221])||p2stateno=700||(p2stateno=[810,811])||p2stateno=1200||p2stateno=1350
trigger6=enemynear,authorname = "mikage_th105"&&p2name="Alice Margatroid"
trigger6=(p2stateno=[201,206])||p2stateno=401||p2stateno=250||(p2stateno=[700,701])
trigger7 = p2name ="Mashiro Mito"
trigger7 = p2stateno = 230
trigger8=enemynear,authorname = "mikage_th105"&&p2name="Reisen Udongein Inaba"
trigger8=(p2stateno=[201,204])||(p2stateno=[220,221])||p2stateno=700
trigger9 = p2name = "Rugal.B"
trigger9 = p2stateno = 2100||p2stateno = 3100&&time < 60
var(59) = 3
ignorehitpause = 1
[State -3,stand]
type = VarSet
triggerall=!ishelper
triggerall = var(59)=[2,4]
trigger1 = p2name ="Hikaru Shidou"
trigger1 = p2stateno = 1102||p2stateno=1112
trigger2 = p2Name = "Kotiya_Sanae"
trigger2 = p2stateno=1155||p2stateno=410||p2stateno=[210,211]
trigger3=enemynear,authorname = "mikage_th105"&&p2name="Marisa Kirisame"
trigger3=(p2stateno=[201,204])||(p2stateno=[220,221])
trigger4 = p2name = "Rock"
trigger4 = p2stateno = 320
trigger5 = p2name = "KUSANAGI"
trigger5 = p2stateno = [310,315]
trigger6 = p2name="Syuren_Kano" 
trigger6 = p2stateno=400
trigger7 = p2name = "Shen"
trigger7 = p2stateno = 1100||p2stateno = 310
trigger8 = p2name = "Yagami-AKOF"
trigger8 = p2stateno = 1410||stateno=1460||p2stateno = 310
trigger9 = p2name = "MAIN"
trigger9 = p2stateno=215||p2stateno=[1000,1005]
trigger10=p2name="Byakuren"
trigger10=(p2stateno=[210,211])||p2stateno=202
var(59) = 3
ignorehitpause = 1


;ガードしないフラグ（6以降はあくまでおまけのつもり）
;5 設置等で固まる不具合の対処枠
;6 バクステで対処可能
;7 バクステで対処できない
;8 ガード硬直中や終わり1Fを投げる問題児対策（ガーキャンぐらいしか無理だが）
[State -3,COUNTER]
type = VarSet
triggerall=!ishelper
triggerall = var(50)=[2,4]
trigger1 = EnemyNear,HitDefAttr = SCA, NT, ST, HT
trigger2 = p2name = "cvsmika" &&p2stateno = 1200
trigger3 = p2name="Yagami-AKOF"
trigger3 = p2stateno=3000||(p2stateno=[2100,2150])
var(59) = 6
ignorehitpause = 1


[State -3,COUNTER]
type = VarSet
triggerall=!ishelper
triggerall = var(59)=[2,4]
trigger1 = p2name = "cvsg_rugal"&&p2stateno = 1700
trigger2 = p2Name = "Misaki Kawana"
trigger2 = p2stateno = 6200 ||p2stateno = 6210 ||p2stateno = 6220
trugger3 = p2name = "saya"&&p2stateno = 2200
trigger4=p2name="RIMLE"
trigger4=p2stateno=7002
var(59) = 7+((stateno=[120,155])&&!ctrl)
ignorehitpause = 1

;ガード解除
[State 100000]
type=varset
triggerall=!ishelper
triggerall=numhelper(35)
triggerall=var(59)=[2,4]
triggerall=helper(35),var(50)=0
triggerall=helper(35),var(51)=0
triggerall=helper(35),var(49)<=0||helper(35),var(49)&&(helper(35),var(56)<helper(35),var(49))
trigger1=!inguarddist
trigger1=p2dist X>0
trigger1=p2statetype!=A
trigger2=p2movetype!=A&&p2dist X !=[-100,60]
trigger2=p2statetype=A
var(59)=1
ignorehitpause = 1

;解除阻止
[State 100000]
type=varset
triggerall=!ishelper
triggerall=var(59)
trigger1=enemynear,authorname = "mikage_th105"&&p2name="Meiling Hong"
trigger1=p2stateno=701
trigger2=p2name="RIMLE" 
trigger2=p2stateno=60010||p2stateno=7000
trigger3 = p2name = "Kyle Dunamis"
trigger3 = p2stateno=70010||p2stateno=[7000,7002]
trigger4 = p2name = "CLESS ALVEIN"
trigger4 = enemynear,numhelper(8028)
trigger5=enemynear,authorname = "mikage_th"&&p2name="Suwako Moriya"
trigger5=p2stateno=630
trigger6=p2name="Nanaly Fletch"
trigger6=p2stateno=211
var(59)=4
ignorehitpause = 1
;解除阻止
[State 100000]
type=varset
triggerall=!ishelper
triggerall=var(59)
trigger1 = p2name="Syuren_Kano" 
trigger1 = enemynear,numhelper(8013)
trigger2 = enemynear,authorname = "mikage_th105"&&p2name="Komachi Onoduka"
trigger2 = p2stateno=204||p2stateno=401
trigger2 = p2bodydist X < 170
trigger3=enemynear,authorname = "mikage_th"&&p2name="Suwako Moriya"
trigger3=p2stateno=210||p2stateno=420||p2stateno=660||p2stateno=727
var(59)=3
ignorehitpause = 1

;強制解除
[State 100000]
type=varset
triggerall=!ishelper
triggerall=var(59)
trigger1=enemynear,authorname="Warusaki3"
trigger1=p2stateno=850&&!inguarddist
trigger2=enemynear,authorname = "mikage_th105"
trigger2=(p2stateno=[40,119])&&!inguarddist
trigger3=p2name="Collet Brunel" 
trigger3= p2stateno=2000||p2stateno=2100||p2stateno=2200||stateno=2400
var(59)=1
ignorehitpause = 1


;------------------------------------------------------------------------------
;飛泉
[State -1]
type = ChangeState
value = 875
TriggerAll	= Var(59) 
triggerall = var(50) >= 36
Triggerall = var(7) <= 3
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger1 = Vel X  >= 0
trigger1 = pos Y <-100&&random<=100

;ロストウインドロウ
[State -1]
type = ChangeState
value = 3600
TriggerAll	= Var(59) 
triggerall = NumHelper(2100) = 0
triggerall = power >= 1000
Triggerall = Vel Y >= -1
triggerall = (ctrl = 1) && (statetype != A)||(ctrl = 1) && (statetype = A)
trigger1 = p2movetype!=H&&random<=400
Trigger1 =p2life>life+500&&random<=100||(p2bodydist Y+(enemyNear,vel Y* 35 +enemyNear,gethitvar(yaccel)* 666)*(P2StateType=A&&EnemyNear,Vel Y!=0))<-50
;trigger2 = p2stateno=[120,155]
;trigger2 = p2statetype=A
;trigger2 = NumHelper(2100)
;trigger2 = frontedgedist <= 70
;trigger2 = p2bodydist X <= 60

;フォーリンブラスト
[State -1]
type = ChangeState
value = 2700
TriggerAll= Var(59) 
triggerall = power >= 2000
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = p2statetype!=A&&enemynear,animtime<-5||(p2bodydist Y+(enemyNear,vel Y* 5 +enemyNear,gethitvar(yaccel)* 15)*(P2StateType=A&&EnemyNear,Vel Y!=0))=[-44, -3]
trigger1 = p2bodydist X = [0,60]
trigger1 = random<=(200+life-life)||(life<=250||p2life>life)&&random<=200
Trigger2 = (Stateno = 760) &&(movehit)&&p2movetype=H



;------------------------------------------------------------------------------
;嵐といふらむ
[State -1]
type = ChangeState
value = 2600
triggerall = roundstate = 2
TriggerAll	= Var(59) &&frontedgedist >=70
triggerall = power >= 1000
triggerall = statetype != A
triggerall = ctrl = 1
triggerall = random<=100||random>life
trigger1 = p2statetype=A&&(p2bodydist X-(enemynear,vel X* 35)) = [25, 75]
Trigger1 =(p2bodydist Y+(enemyNear,vel Y* 35 +enemyNear,gethitvar(yaccel)* 666)*(P2StateType=A&&EnemyNear,Vel Y!=0))=[-80, -2]
trigger2 = p2statetype=A&&(p2bodydist X-(enemynear,vel X* 35)) = [60, 100]
Trigger2 =(p2bodydist Y+(enemyNear,vel Y* 35 +enemyNear,gethitvar(yaccel)* 666)*(P2StateType=A&&EnemyNear,Vel Y!=0))=[-120, -50]


;からくれなゐ
[State -1]
type = ChangeState
value = 2200
triggerall = roundstate = 2
TriggerAll	= Var(59) 
triggerall = power >= 1000
triggerall = NumHelper(2100) = 0
triggerall = statetype != A
triggerall = var(50) >= 116
triggerall = life<=500
trigger1 = statetype != A
trigger1 = ctrl = 1&&p2bodydist X >=40
trigger1 = random<=100&&p2statetype!=A&&enemynear,time<=5&&inguarddist&&p2movetype=A


;パンチ　ジャブ
[State -1]
type = ChangeState
value = 200
trigger1 = statetype != A
TriggerAll= Var(59) 
triggerall = p2bodydist X <=30
trigger1 = ctrl = 1||stateno = 102&&Time >= 4
trigger1 = p2statetype!=A&&p2statetype!=L
trigger1 = p2movetype=A&&enemynear,animtime=-6
[State -1]
type = ChangeState
value = 720
TriggerAll= Var(59) 
triggerall = statetype != A
Triggerall = fvar(1) >= 0.7
trigger1 = p2statetype!=L&&p2movetype!=H&&p2bodydist X =[30,60]
trigger1 = ctrl = 1
trigger1 = p2movetype=A&&enemynear,animtime=-7


;---------------------------------------------------------------------------
;ダッキング
[State -1]
type = null;ChangeState
value = 103
TriggerAll= Var(59) 
triggerall = statetype != A
triggerall = ctrl 
trigger1 = p2movetype=A&&enemynear,animtime<-21
trigger1 = random<=250
trigger1 = p2bodydist X <=120
trigger2 = p2bodydist X >=90&&inguarddist&&random<=100
trigger3 = random <=20&&p2bodydist X >=100

;---------------------------------------------------------------------------
;ダッキング:その場
[State -1]
type = null;ChangeState
value = 102
TriggerAll= Var(59) 
trigger1 = statetype != A
trigger1 = ctrl 
trigger1 = p2movetype=A&&enemynear,animtime<-21
trigger1 = random<=150
trigger1 = p2bodydist X <=30


;巴投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 910
TriggerAll	= Var(59) 
triggerall = numhelper(35)
triggerall = helper(35),var(56)>=0
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = p2bodydist X < 30
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger1 = p2statetype!=A&&p2statetype!=L
trigger1 = p2movetype=A&&enemynear,animtime=-3


;紅葉陣
[State -1]
type = ChangeState
value = 1100
TriggerAll	= Var(59) 
triggerall = p2dist X = [-70,70]
triggerall = NumProjID(2490) = 0
triggerall = var(50) >= 36
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2movetype=A
trigger1 = enemynear,animtime<-19||p2statetype=A
trigger1 = random <= 160&&p2bodydist Y > -70



;キック　蹴込み
[State -1]
type = ChangeState
value = 240
TriggerAll	= Var(59) 
trigger1 = stateno=200&&movehit=1

;晴鶴ｂ　対空
[State -1]
type = ChangeState
value = 846
TriggerAll	= Var(59)
Triggerall = var(7) <= 3
triggerall = var(50) >= 36
triggerall = statetype != A
triggerall = ctrl = 1&&random<=150
trigger1 = p2statetype=A&&(p2bodydist X-(enemynear,vel X* 6)) = [0, 40]
Trigger1 =(p2bodydist Y+(enemyNear,vel Y* 6 +enemyNear,gethitvar(yaccel)* 21)*(P2StateType=A&&EnemyNear,Vel Y!=0))=[-65, -20]
trigger1 = p2movetype!=H||p2stateno=[120,155]


;ダッキング
[State -1]
type = ChangeState
value = 103
trigger1 = random<=500
triggerall = var(59)
triggerall = statetype = S
Trigger1 = (Stateno = 203) && (Time = 15)
Trigger2 = (Stateno = 210) && (Time >= 25)

;---------------------------------------------------------------------------
[State -1,]
type = ChangeState
value = 120
triggerall = roundstate = 2
triggerall = var(59) = [2,4]
trigger1 = ctrl
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = var(59)
trigger1 = statetype != A
trigger1 = backedgedist > 50
trigger1 = var(59)=6
trigger1 = ctrl
;------------------------------------------------------------------------------
;狂いの落葉ルナティック
[State -1]
type = ChangeState
value = 20007
triggerall = roundstate = 2
TriggerAll	= Var(59) 
triggerall = power >= 2000&&life<=250
Trigger1 = Stateno = 790
Trigger1 = movehit&&p2movetype=H
;-------------------------------------------------------------------
;狂いの落葉
[State -1]
type = ChangeState
value = 2000
triggerall = roundstate = 2
TriggerAll	= Var(59) 
triggerall = power >= 1000
Trigger1 = Stateno = 790
Trigger1 = movehit&&p2movetype=H

;---------------------------------------------------------------------------
;神のまにまにa
[State -1]
type = ChangeState
value = 2099
TriggerAll	= Var(59) &&roundstate = 2
triggerall = power >= 1000
triggerall = NumHelper(2100) = 0
triggerall = p2statetype=L&&p2bodydist X<=25||(life<=250||p2life<=200)&&p2bodydist X<=60&&random<=100&&p2bodydist Y > -40
trigger1 = statetype = S
trigger1 = ctrl = 1


;横＋キック（近）　踵落とし
[State -1]
type = ChangeState
value = ifelse(p2bodydist X <=45&&p2statetype!=A&&p2statetype!=L&&random<=300&&!var(50),790,250)
TriggerAll	= Var(59)
triggerall = p2bodydist X < 50
trigger1 = statetype != A
trigger1 = ctrl = 1&&p2bodydist X <=45
trigger1 = p2stateno=5120&&(enemynear,animtime =[-27,-18])||p2stateno=[120,155]
trigger1 = random<=100
trigger2 = stateno = 201
trigger2 = moveguarded = 1&&random<=250



;移動巴投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 909
triggerall = var(50)
TriggerAll	= Var(59) 
triggerall = statetype = S
trigger1 = stateno = 203&&animtime=0&&random<=200


;パンチ　ジャブ
[State -1]
type = ChangeState
value = 200
TriggerAll	= Var(59) 
triggerall = p2bodydist X <=30
trigger1 = statetype != A
trigger1 = ctrl = 1||stateno = 102&&Time >= 4
trigger1 = p2statetype!=A&&p2statetype!=L
trigger1 = random <= 400||p2stateno=[5000,5100]

;キック　蹴込み
[State -1]
type = ChangeState
value = 240
TriggerAll	= Var(59)&&var(50)
trigger1 = statetype != A
triggerall = p2bodydist X <=45
trigger1 = ctrl = 1||stateno = 102&&Time >= 4
trigger1 = p2statetype!=A&&p2statetype!=L
trigger1 = random <= 100||p2stateno=[5000,5100]


;千秋楽
[State -1]
type = ChangeState
value = 720
triggerall = roundstate = 2
TriggerAll	= Var(59) 
triggerall = statetype != A
Triggerall = fvar(1) >= 0.7
Trigger1 = movehit&&enemynear,gethitvar(hitcount) <=ifelse(life<=500,36,10)
trigger1 =(stateno = 200) ||(stateno = 240)

;白秋
[State -1]
type = ChangeState
value = 790
TriggerAll	= Var(59)
Triggerall = var(7) <= 3
triggerall = statetype != A
trigger1 = power>=1960 || p2life<=150&&power>=1000
trigger1 = movehit
Trigger1 = stateno = 880
Trigger1 = Time = [24,44]


;白秋
[State -1]
type = ChangeState
value = 790
triggerall = roundstate = 2
TriggerAll	= Var(59)
Triggerall = var(7) <= 3
triggerall = statetype != A
trigger1 = power>=1960 || p2life<=150&&power>=1000||moveguarded
trigger1 = movehit||moveguarded=1&&(!var(50)&&random<=400||p2statetype=S&&power>=1000&&random<=200)
trigger1 = stateno = 203 && Time = [7,14]

;巴投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 910
TriggerAll	= Var(59) 
triggerall = numhelper(35)
triggerall = helper(35),var(56)>=0
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = p2bodydist X < 30
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger1 = p2statetype!=A&&p2statetype!=L
trigger1 = random <= 300


;-------------------------------------------------------------
;横＋キック（遠）ニールキック　
[State -1]
type = ChangeState
value = 700
TriggerAll	= Var(59) 
Triggerall = Stateno != 700
Triggerall = PrevStateno != 700 
;trigger1 = statetype = S
trigger1 = movehit
trigger1 = stateno = 203 && Time = [7,14]

[State -1]
type = ChangeState
value = 210
TriggerAll	= Var(59)
trigger1 = stateno = 240
trigger1 = movecontact
[State -1]
type = ChangeState
value = 400
TriggerAll	= Var(59)
trigger1 = stateno = 210
trigger1 = movecontact=1&&random<=700

;---------------------------------------------
;パンチ　チェーン1-③　
[State -1]
type = ChangeState
value = 203
TriggerAll	= Var(59)
trigger1 = stateno = 201
trigger1 = movecontact
;---------------------------------------------
;パンチ　チェーン1-①　
[State -1]
type = ChangeState
value = 201
TriggerAll	= Var(59)
trigger1 = stateno = 200
trigger1 = movecontact
;---------------------------------------------




;千秋楽
[State -1]
type = ChangeState
value = 720
triggerall = roundstate = 2
TriggerAll	= Var(59) 
triggerall = statetype != A
Triggerall = fvar(1) >= 0.7
trigger1 = p2statetype!=L&&p2movetype!=H&&p2bodydist X >= 45&&(!var(50)||random<=100)
trigger1 = ctrl = 1
Trigger2 = movehit&&enemynear,gethitvar(hitcount) <=ifelse(life<=500,36,10)
trigger2 =(stateno = 200) ||(stateno = 240)


;横＋ｃ　紅葉胡蝶弾
[State -1]
type = ChangeState
value = 1010
triggerall = roundstate = 2
TriggerAll	= Var(59) 
triggerall = random<=200
triggerall = NumHelper(22461) = 0
triggerall = NumProjID(2490) = 0
triggerall = var(50) >= 27
trigger1 = statetype = S
trigger1 = ctrl = 1&&p2movetype!=H
trigger1 = p2bodydist X =[10,90]
trigger1 = p2bodydist Y < -40



;散紅葉・直　地上
[State -1]
type = ChangeState
value = 1410
TriggerAll	= Var(59) 
triggerall = var(50) >= 36
;Triggerall = Statetype != A
trigger1 = stateno=823&&animtime=0

;雁行b 
[State -1]
type = ChangeState
value = 823
TriggerAll	= Var(59) 
triggerall = NumProjID(2490) = 0
triggerall = var(50) >= 36
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = p2bodydist X <=220&&p2bodydist X >=110
trigger1 = random<=150

;ジャンプキック
[State -1]
type = ChangeState
value = 640
TriggerAll	= Var(59) 
triggerall = pos Y > -60&&vel Y > 0
triggerall = statetype = A
trigger1 = ctrl

;群燕b
[State -1]
type = ChangeState
value = 811
triggerall = roundstate = 2
Triggerall = var(7) <= 3
TriggerAll	= Var(59)
triggerall = var(1) < 2
triggerall = p2bodydist X>=80
triggerall = var(50) >= 36
trigger1 = ctrl = 1
trigger1 = p2statetype!=L&&random<=90

;バックステップ
[State -1]
type = ChangeState
value = 105
TriggerAll	= Var(59) &&roundstate=2
triggerall = var(50)
trigger1 = statetype = S
trigger1 = ctrl = 1&&p2movetype!=H&&p2stateno!=[120,155]
trigger1 = p2bodydist X <=80
trigger1 = random<=240
trigger1 = backedgedist >=50
trigger1 = p2statetype!=L

[State -1]
type = ChangeState
value = 22
triggerall = roundstate = 2
triggerall = var(59)&&var(50)
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = random<250&&p2statetype=L
trigger1 = p2bodydist X <70
trigger1 = stateno=21&&time>10||stateno !=[21,22]
trigger1 = stateno!=100

[State -1]
type = ChangeState
value = 21
triggerall = roundstate = 2
triggerall = var(59)
triggerall = statetype != A
trigger1 = stateno=22&&time>10||stateno !=[21,22]
trigger1 = ctrl
trigger1 = p2bodydist X > 10
trigger1 = random < 200||!var(50)
trigger1 = stateno!=100


;------------------------------------------------------------------------------
[State -1,]
type = ChangeState
value = 0
triggerall = roundstate = 2
triggerall = var(59)
trigger1 = stateno = 40
ctrl = 1
[State 5050, 4] ;Recover near ground
type = ChangeState
triggerall = var(59)
triggerall = stateno = 5050
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
trigger1 = CanRecover
value = 5200 ;HITFALL_RECOVER
[State 5050, 5]; Recover in mid air
type = selfstate
triggerall = var(59)
triggerall = stateno = 5050
triggerall = vel y > -1
triggerall = alive
trigger1 = CanRecover
value = 5210
[State -1,]
type = ChangeState
value = prevstateno
triggerall = prevstateno !=[150,155]
triggerall = roundstate = 2
triggerall = var(59)
trigger1 = stateno= 10
trigger1 = prevstateno = 100||prevstateno = [20,23]
ctrl = 1
;---------------------------------------------------------------------------
;AI待機ステート（立ち、しゃがみ、前進）
[Statedef 9]
type = S
physics = S
sprpriority = 0
ctrl=0
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0
[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0
[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0
[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[Statedef 15]
type    = C
physics = C
anim = 11
sprpriority = 0
ctrl = 0
[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11
[Statedef 23]
type    = S
physics = S
sprpriority = 0
ctrl=0
[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)
[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20
[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

;---------------------------------------------------------------------------
;AI用基本ステート（歩き、ジャンプ、ガード）
[Statedef 21]
type    = S
physics = S
sprpriority = 0
ctrl=1
[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)
[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21
[Statedef 22]
type    = S
physics = S
sprpriority = 0
ctrl=1
[State 20, 2]
type = VelSet
trigger1 = 1
x = const(velocity.walk.back.x)
[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20
[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21


[Statedef 120]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged
[State 120, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 120 + (statetype = C) + (statetype = A)*2
[State 120, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A
[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
trigger2 = var(59) = 0
trigger2 = statetype = S && command = "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 4
statetype = C
physics = C
[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
trigger2 = var(59) = 0
trigger2 = statetype = C && command != "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 3
statetype = S
physics = S
[State 120, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 130 + (statetype = C) + (statetype = A)*2
[State 120, Stop Guarding]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holdback" || !inguarddist
trigger2 = var(59)
trigger2 = var(59) !=[2,4]
value = 140
[Statedef 130]
type    = S
physics = S
[State 130, 1]
type = ChangeAnim
trigger1 = Anim != 130
value = 130
[State 130, Hi to Lo]
type = ChangeState
trigger1 = command = "holddown"
trigger1 = var(59) = 0
trigger2 = var(59) = 4
value = 131
[State 130, Stop Guarding]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holdback" || !inguarddist
trigger2 = var(59)
trigger2 = var(59) !=[2,4]
value = 140
[Statedef 131]
type    = C
physics = C
[State 131, 1]
type = ChangeAnim
trigger1 = Anim != 131
value = 131
[State 131, Lo to Hi]
type = ChangeState
trigger1 = command != "holddown"
trigger1 = var(59) = 0
trigger2 = var(59) = 3
value = 130
[State 131, Stop Guarding]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holdback" || !inguarddist
trigger2 = var(59)
trigger2 = var(59) !=[2,4]
value = 140
[Statedef 140]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged
ctrl = 1
[State 140, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 140 + (statetype = C) + (statetype = A)*2
[State 140, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A
[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
trigger2 = var(59) = 0
trigger2 = statetype = S && command = "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 4
statetype = C
physics = C
[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
trigger2 = var(59) = 0
trigger2 = statetype = C && command != "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 3
statetype = S
physics = S
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0
[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150
[State 152, 3]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")
[State 152, 3]
type = ChangeState
trigger1 = var(59)
trigger1 = HitShakeOver
value = 151+(statetype=C)*2
[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
trigger2 = var(59) = 0
trigger2 = statetype = S && command = "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 4
statetype = C
physics = C
[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
trigger2 = var(59) = 0
trigger2 = statetype = C && command != "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 3
statetype = S
physics = S
[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150
[State 151, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1
[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
trigger2 = var(59) = 0
trigger2 = statetype = S && command = "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 4
statetype = C
physics = C
[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
trigger2 = var(59) = 0
trigger2 = statetype = C && command != "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 3
statetype = S
physics = S
[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0
[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151
[State 152, 3]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")
[State 152, 3]
type = ChangeState
trigger1 = var(59)
trigger1 = HitShakeOver
value = 151+(statetype=C)*2
[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
trigger2 = var(59) = 0
trigger2 = statetype = S && command = "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 4
statetype = C
physics = C
[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
trigger2 = var(59) = 0
trigger2 = statetype = C && command != "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 3
statetype = S
physics = S
[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151
[State 153, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0
[State 153, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1
[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
trigger2 = var(59) = 0
trigger2 = statetype = S && command = "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 4
statetype = C
physics = C
[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
trigger2 = var(59) = 0
trigger2 = statetype = C && command != "holddown"
trigger3 = statetype !=A
trigger3 = var(59) = 3
statetype = S
physics = S
[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1




;---------------------------------------------------------------------------
[StateDef 35]
physics=N
ctrl=0

;---------------------------------------------------------------------------

[State 100000]
type=varset
trigger1=root,name="KUSANAGI"
trigger1=root,stateno=1250
trigger1=root,prevstateno=400
var(0) = 2
[State 100000]
type=varset
trigger1=root,name="KUSANAGI"
trigger1=root,stateno=1255
trigger1=root,movehit=1
trigger1=var(0)=0
var(0) = 1
[State 100000]
type=varset
triggerall=var(0)=1
trigger1=root,name="KUSANAGI"
trigger1=enemynear,movetype!=H||root,movetype=A&&root,stateno!=1255
var(0) = 0

;中距離けん制抑止
[State 100000]
type=varset
trigger1=!var(1)
trigger1=root,name="KUSANAGI"
trigger1=root,stateno=230&&root,time=1
var(1) = ceil(random/10)
[State 100000]
type=varadd
trigger1=root,name="KUSANAGI"
trigger1=root,ctrl
trigger1=var(1)
var(1) = -1
[State 100000]
type=varadd
trigger1=root,name="KUSANAGI"
trigger1=movereversed
var(1) = 200
ignorehitpause=1
[State 100000]
type=varset
trigger1=root,name="KUSANAGI"
trigger1=root,stateno=230&&root,movehit
trigger1=enemynear,movetype=H
var(1) = 0

[State 100000]
type=varset
trigger1=!var(2)
trigger1=root,name="KUSANAGI"
trigger1=root,stateno=1250&&root,time=1
var(2) = ceil(random/10)
[State 100000]
type=varadd
trigger1=root,name="KUSANAGI"
trigger1=root,ctrl
trigger1=var(2)
var(2) = -1
[State 100000]
type=varset
trigger1=root,name="KUSANAGI"
trigger1=root,stateno=1121
trigger1=p2movetype=H
var(3) = 1
[State 100000]
type=varset
trigger1=root,name="KUSANAGI"
trigger1=enemynear,movetype!=H
var(3) = 0

;---------------------------------------------------------------------------
;214Pの初段が地上ヒットか空中ヒットか
[State 100000]
type=varset
trigger1= root,name="shen"
trigger1=!var(11)
trigger1=root,stateno=1100
trigger1=enemynear,statetype!=A
trigger1=(enemynear,stateno!=[120,155])&&enemynear,movetype=H
trigger1=root,movehit
var(11) = 1
[State 100000]
type=varset
trigger1= root,name="shen"
trigger1=!var(11)
trigger1=root,stateno=1100
trigger1=enemynear,statetype=A
trigger1=(enemynear,stateno!=[120,155])&&enemynear,movetype=H
trigger1=root,movehit
var(11) = 2
[State 100000]
type=varset
trigger1= root,name="shen"
trigger1=!var(11)
trigger1=root,stateno=2000 || root,stateno = 2510
trigger1=enemynear,statetype=A
trigger1=(enemynear,stateno!=[120,155])&&enemynear,movetype=H
trigger1=root,movehit
var(11) = 3
[State 100000]
type=null;varset
trigger1= root,name="shen"
trigger1=var(11)=1
trigger1=root,stateno = 2510
trigger1=enemynear,statetype=A
trigger1=(enemynear,stateno!=[120,155])&&enemynear,movetype=H
trigger1=root,movehit
var(11) = 4
[State 100000]
type=varset
triggerall=var(11)
trigger1= root,name="shen"
trigger1=enemynear,movetype!=H
var(11) = 0

;撃拳が立ち回りから出したものであるか
[State 100000]
type=varset
trigger1= root,name="shen"
trigger1=!var(11)
trigger1=root,stateno=1000
trigger1=root,prevstateno < 105
var(12) = 1
[State 100000]
type=varset
trigger1=root,name="shen"
trigger1=root,ctrl
var(12) = 0
;ぶっぱ撃拳を回避されていないか(特に緊急回避でループする危険性）
[State 100000]
type=varset
trigger1=var(12)
trigger1=root,name="shen"
trigger1=root,stateno=1000&&root,time=1
var(13) = 50+var(57)
[State 100000]
type=varadd
trigger1=root,name="shen"
trigger1=root,ctrl
trigger1=var(13)
var(13) = -1
[State 100000]
type=varadd
trigger1=root,name="shen"
trigger1=movereversed
var(13) = 200
ignorehitpause=1
[State 100000]
type=varset
trigger1=root,name="shen"
trigger1=root,stateno=1010&&root,movecontact
var(13) = 0
;前Bを最低ガードさせられているか
[State 100000]
type=varset
trigger1=root,name="shen"
trigger1=root,stateno=310&&root,time=1
var(14) = var(57)
[State 100000]
type=varadd
trigger1=root,name="shen"
trigger1=root,ctrl
trigger1=var(14)
var(14) = -1
[State 100000]
type=varadd
trigger1=root,name="shen"
trigger1=movereversed
var(14) = 200
ignorehitpause=1
[State 100000]
type=varset
trigger1=root,name="shen"
trigger1=root,stateno=310&&root,movecontact
var(14) = 0



;---------------------------------------------------------------------------

[State 100000]
type=varset
trigger1 = root,name ="Hikaru Shidou"
trigger2 = root,name = "Kung Fu Man"
trigger3 = root,name = "Hibiki Takane"
trigger4 = root,name = "RIMLE"
trigger5 = root,name = "Kyle Dunamis"
trigger6 = root,name = "Tubaki"
trigger7 = root,name = "senel" 
var(10)=1

[State 100000]
type=varset
trigger1= root,name ="Mashiro Mito"
trigger2 = root,name = "KUSANAGI"
trigger3 = root,name = "Rock"
trigger4 = root,name = "Serena" 
var(10) = 5


[State 100000]
type=varset
trigger1= root,name="shen"
trigger2= root,name="Rugal.B"
var(10) = 10



;===========================================================================
;var(10)=1~9 当身用、処理が1F遅れるため
;実際はenemynear,time=enemynear,stateno=var(22)-(発生＋1)

[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = root,p2dist X=[0,160]
trigger1 = enemynear,movetype=A
trigger1 = enemynear,prevstateno <= 115
trigger1 = enemynear,HitDefAttr = SCA,NA,SA
var(20)=1

[State 100000]
type=varset
triggerall = var(10)=[1,4]
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall=enemynear,stateno!=var(21)
triggerall=enemynear,stateno!=var(23)
triggerall=enemynear,stateno!=var(25)
triggerall=enemynear,stateno!=var(27)
triggerall=enemynear,stateno!=var(29)
triggerall=enemynear,stateno!=var(31)
triggerall=enemynear,stateno!=var(33)
triggerall=enemynear,stateno!=var(35)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = var(24)
trigger1 = var(26)
trigger1 = var(28)
trigger1 = var(30)
trigger1 = var(32)
trigger1 = var(34)
trigger1 = var(36)
trigger1 = !var(37)
trigger1 = root,movetype=H
var(37)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,4]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = var(25)
trigger1 = var(27)
trigger1 = var(29)
trigger1 = var(31)
trigger1 = var(33)
trigger1 = var(35)
trigger1 = var(37)
trigger1 = !var(38)
var(38)=(enemynear,time)

[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,4]
triggerall=enemynear,stateno!=var(21)
triggerall=enemynear,stateno!=var(23)
triggerall=enemynear,stateno!=var(25)
triggerall=enemynear,stateno!=var(27)
triggerall=enemynear,stateno!=var(29)
triggerall=enemynear,stateno!=var(31)
triggerall=enemynear,stateno!=var(33)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = var(24)
trigger1 = var(26)
trigger1 = var(28)
trigger1 = var(30)
trigger1 = var(32)
trigger1 = var(34)
trigger1 = !var(35)
trigger1 = root,movetype=H
var(35)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,4]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = var(25)
trigger1 = var(27)
trigger1 = var(29)
trigger1 = var(31)
trigger1 = var(33)
trigger1 = var(35)
trigger1 = !var(36)
var(36)=(enemynear,time)
[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,9]
triggerall=enemynear,stateno!=var(21)
triggerall=enemynear,stateno!=var(23)
triggerall=enemynear,stateno!=var(25)
triggerall=enemynear,stateno!=var(27)
triggerall=enemynear,stateno!=var(29)
triggerall=enemynear,stateno!=var(31)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = var(24)
trigger1 = var(26)
trigger1 = var(28)
trigger1 = var(30)
trigger1 = var(32)
trigger1 = !var(33)
trigger1 = root,movetype=H
var(33)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = var(25)
trigger1 = var(27)
trigger1 = var(29)
trigger1 = var(31)
trigger1 = var(33)
trigger1 = !var(34)
var(34)=(enemynear,time)
[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,9]
triggerall=enemynear,stateno!=var(21)
triggerall=enemynear,stateno!=var(23)
triggerall=enemynear,stateno!=var(25)
triggerall=enemynear,stateno!=var(27)
triggerall=enemynear,stateno!=var(29)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = var(24)
trigger1 = var(26)
trigger1 = var(28)
trigger1 = var(30)
trigger1 = !var(31)
trigger1 = root,movetype=H
var(31)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = var(25)
trigger1 = var(27)
trigger1 = var(29)
trigger1 = var(31)
trigger1 = !var(32)
var(32)=(enemynear,time)


[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,9]
triggerall=enemynear,stateno!=var(21)
triggerall=enemynear,stateno!=var(23)
triggerall=enemynear,stateno!=var(25)
triggerall=enemynear,stateno!=var(27)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = var(24)
trigger1 = var(26)
trigger1 = var(28)
trigger1 = !var(29)
trigger1 = root,movetype=H
var(29)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = var(25)
trigger1 = var(27)
trigger1 = var(29)
trigger1 = !var(30)
var(30)=(enemynear,time)


[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,9]
triggerall=enemynear,stateno!=var(21)
triggerall=enemynear,stateno!=var(23)
triggerall=enemynear,stateno!=var(25)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = var(24)
trigger1 = var(26)
trigger1 = !var(27)
trigger1 = root,movetype=H
var(27)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = var(25)
trigger1 = var(27)
trigger1 = !var(28)
var(28)=(enemynear,time)


[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,9]
triggerall=enemynear,stateno!=var(21)
triggerall=enemynear,stateno!=var(23)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = var(24)
trigger1 = !var(25)
trigger1 = root,movetype=H
var(25)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = var(25)
trigger1 = !var(26)
var(26)=(enemynear,time)


[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,9]
triggerall=enemynear,stateno!=var(21)
trigger1 = var(20)
trigger1 = var(22)
trigger1 = !var(23)
trigger1 = root,movetype=H
var(23)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(21)
trigger1 = var(23)
trigger1 = !var(24)
var(24)=(enemynear,time)

[State 100000]
type=varset
triggerall = enemynear,prevstateno <= 115
triggerall = enemynear,HitDefAttr = SCA,NA,SA
triggerall=enemynear,stateno>=200&&p2movetype=A
triggerall = var(10)=[1,9]
trigger1 = var(20)
trigger1 = !var(21)
trigger1 = root,movetype=H
;trigger1 = root,stateno!=[120,155]
var(21)=enemynear,stateno
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(21)
trigger1 = var(22) = 0
;trigger2 = var(20)
;trigger2 = enemynear,stateno=var(21)
;trigger2 = enemynear,time < var(22)
;trigger2 = root,movetype=H
;trigger2 = enemynear,prevstateno <= 115
var(22)=(enemynear,time)



;1F技は無効
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = !var(28)
var(27)=0
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(28) = 1
var(28)=0
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = !var(26)
var(25)=0
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(26) = 1
var(26)=0
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = !var(24)
var(23)=0
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(24) = 1
var(24)=0
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = !var(22)
var(21)=0
[State 100000]
type=varset
triggerall = var(10)=[1,9]
trigger1 = var(22) = 1
var(22)=0

;===========================================================================
;var(10)=5~9 ステージ端記憶（変数36-39)

[State -3,画面端前]
type = helper
triggerall = var(10)=[5,9]
trigger1 = roundstate = 2
trigger1 = !NumHelper(110000)
trigger1 = !var(36)
helpertype=normal
name="mae"
stateno=110000
ID=110000
keyctrl=0
pausemovetime=99999999
supermovetime=99999999
persistent = 0
[State -3,画面端後ろ]
type = helper
triggerall = var(10)=[5,9]
trigger1 = roundstate = 2
trigger1 = !NumHelper(120000)
trigger1 = !var(37)
helpertype=normal
name="usiro"
stateno=120000
ID=120000
keyctrl=0
pausemovetime=99999999
supermovetime=99999999
persistent = 0
[State 100000]
type = turn
triggerall = var(10)=[5,9]
trigger1=facing=root,facing=0
trigger1=!var(36)&&!var(37)
[State 100000]
type=varset
triggerall = var(10)=[5,9]
trigger1= numhelper(110000)
var(38) = ceil(helper(110000),rootdist X)
[State 100000]
type=varset
triggerall = var(10)=[5,9]
trigger1=numhelper(120000)
var(39) = ceil(helper(120000),rootdist X)
[State 100000]
type=varset
trigger1 = var(10)=[5,9]
var(36)=ifelse((rootdist X < p2dist X),ceil(var(38)+(rootdist X))*(ifelse(root,facing=0,1,-1)),ceil(var(39)+(rootdist X))*(ifelse(root,facing=0,-1,1)))
[State 100000]
type=varset
trigger1 = var(10)=[5,9]
var(37)=ifelse((rootdist X < p2dist X),ceil(var(39)+(rootdist X))*(ifelse(root,facing=0,-1,1)),ceil(var(38)+(rootdist X))*(ifelse(root,facing=0,1,-1)))
;===========================================================================
;var(10)=10

[State -3]
type = helper
trigger1=var(10)=10
trigger1= roundstate = 2
trigger1= !NumHelper(150000)
helpertype=normal
name="hourai"
stateno=150000
ID=150000
pos=0,0
keyctrl=1
pausemovetime=99999999
supermovetime=99999999
persistent = 0
[State -3]
type = helper
trigger1=var(10)=10
trigger1= roundstate = 2
trigger1= !NumHelper(150001)
helpertype=normal
name="hourai"
stateno=150001
ID=150001
pos=0,0
keyctrl=1
pausemovetime=99999999
supermovetime=99999999
persistent = 0

[State 100000]
type=varset
trigger1=var(10)=10
trigger1=var(22)=0
trigger1=var(23)=0
trigger1=enemynear,ctrl
var(20)=enemynear,numproj
[State 100000]
type=varset
trigger1=var(10)=10
trigger1=var(22)=0
trigger1=var(23)=0
trigger1=enemynear,ctrl
var(21)=enemynear,numhelper


;ダークバリア用フラグ
[State 100000]
type=varset
triggerall=var(10)=10
trigger1=NumHelper(150001)
trigger1=NumHelper(150000)
trigger1=helper(150001),var(1)!=0
trigger1=helper(150000),var(1)=0
var(26)=1
[State 100000]
type=varset
triggerall=var(10)=10
trigger1=NumHelper(150001)
trigger1=NumHelper(150000)
trigger1=helper(150001),var(1)!=0
trigger1=helper(150000),var(1)!=0
var(26)=0
[State 100000]
type=varset
triggerall=var(10)=10
trigger1=NumHelper(150001)
trigger1=NumHelper(150000)
trigger1=helper(150001),var(1)=0
trigger1=helper(150000),var(1)=0
var(26)=0
;弾拳成功or失敗
[State 100000]
type=varset
triggerall=var(10)=10
trigger1=NumHelper(1300)
trigger1=helper(1300),stateno=1310
trigger1=helper(1300),time=1
trigger2=root,movetype=H
trigger2=root,time=1
var(22)=0
[State 100000]
type=varset
triggerall=var(10)=10
trigger1=NumHelper(1300)
trigger1=helper(1300),stateno=1310
trigger1=helper(1300),time=1
trigger2=root,movetype=H
trigger2=root,time=1
var(23)=0
[State 100000]
type=varset
triggerall=var(10)=10
trigger1=NumHelper(1300)
trigger1=helper(1300),stateno=1310
trigger1=helper(1300),time=1
trigger2=root,movetype=H
trigger2=root,time=1
var(24)=0
;;;;;;;;;;;;;;;;;;;;

[State 100000]
type=varset
trigger1=var(10)=10
trigger1=NumHelper(150001)
trigger1=NumHelper(150000)
trigger1=helper(150001),var(1)!=0
trigger1=helper(150000),var(1)!=0
trigger1=!root,inguarddist
trigger1=var(22)<0
trigger1=root,ctrl
var(22)=0
[State 100000]
type=varset
trigger1=var(10)=10
trigger1=NumHelper(150001)
trigger1=NumHelper(150000)
trigger1=!var(22)
trigger1=helper(150000),var(1)!=0
trigger1=!root,inguarddist
trigger1=var(23)<0
var(23)=0
[State 100000]
type=varset
trigger1=var(10)=10
trigger1=NumHelper(150001)
trigger1=NumHelper(150000)
trigger1=!var(22)
trigger1=helper(150000),var(1)!=0
trigger1=!root,inguarddist
var(24)=0

[State 100000]
type=varset
trigger1=var(10)=10
trigger1=var(22)>0
trigger1=NumHelper(150000)
trigger1=NumHelper(150001)
trigger1=!helper(150001),var(1)
var(22)=-1*var(22)
[State 100000]
type=varadd
trigger1=var(10)=10
trigger1=enemynear,numhelper>var(21)||enemynear,numproj>var(20)
trigger1=NumHelper(150000)
trigger1=NumHelper(150001)
trigger1=!root,inguarddist
trigger1=!helper(150000),var(1)
trigger1=helper(150001),var(1)
var(22)=1
[State 100000]
type=varset
trigger1=var(10)=10
trigger1=var(22)<0
trigger1=var(23)>0
trigger1=NumHelper(150000)
trigger1=NumHelper(150001)
trigger1=!helper(150000),var(1)
var(23)=-1*var(23)
[State 100000]
type=varadd
trigger1=var(10)=10
trigger1=var(22)!=0
trigger1=NumHelper(150000)
trigger1=helper(150000),var(1)
var(23)=1
[State 100000]
type=varadd
trigger1=var(10)=10
trigger1=enemynear,numhelper>var(21)||enemynear,numproj>var(20)
trigger1=root,inguarddist
var(24)=1


;不具合防止
[State 100000]
type=varadd
trigger1=var(10)=10
trigger1=var(22)!=0
var(25)=1
[State 100000]
type=varset
trigger1=var(10)=10
trigger1=var(25)>50
trigger1=var(22)<0
trigger1=var(23)=0
var(22)=0
[State 100000]
type=varset
trigger1=var(10)=10
trigger1=var(25)>50
trigger1=var(23)<0
trigger1=var(24)=0||var(25)>70
var(23)=0
[State 100000]
type=varset
trigger1=var(10)=10
trigger1=var(22)=0
var(25)=0





;===========================================================================
;var40-48 中下段、ガード不能記憶

[State 100000]
type=varset
trigger1=root,var(59)=4
var(40)=1
[State 100000]
type=varset
trigger1=root,var(59)=3
var(40)=2
[State 100000]
type=varset
triggerall=root,var(59)
triggerall = p2stateno!=0
trigger1 = p2stateno=var(41)
trigger2 = p2stateno=var(42)
trigger3 = p2stateno=var(43)
trigger4 = p2stateno=var(44)
var(40)=ifelse(var(40)=1,4,3)
[State 100000]
type=varset
triggerall=root,var(59)
trigger1 = enemynear,stateno >= 200
trigger1 = enemynear,stateno!=var(41)&&enemynear,prevstateno!=var(41)
trigger1 = enemynear,stateno!=var(42)&&enemynear,prevstateno!=var(42)
trigger1 = enemynear,stateno!=var(43)&&enemynear,prevstateno!=var(43)
trigger1 = var(41)&&var(42)&&var(43)&&!var(44)
trigger1 = root,movetype=H  || root,statetype=L
trigger1 = root,stateno!=[120,155]
trigger1 = root,prevstateno=[120,155]
var(44)=enemynear,stateno
[State 100000]
type=varset
triggerall=root,var(59)
trigger1 = enemynear,stateno >= 200
trigger1 = enemynear,stateno!=var(41)&&enemynear,prevstateno!=var(41)
trigger1 = enemynear,stateno!=var(42)&&enemynear,prevstateno!=var(42)
trigger1 = var(41)&&var(42)&&!var(43)
trigger1 = root,movetype=H  || root,statetype=L
trigger1 = root,stateno!=[120,155]
trigger1 = root,prevstateno=[120,155]
var(43)=enemynear,stateno
[State 100000]
type=varset
triggerall=root,var(59)
trigger1 = enemynear,stateno >= 200
trigger1 = enemynear,stateno!=var(41)
trigger1 = enemynear,prevstateno!=var(41)
trigger1 = var(41)&&!var(42)
trigger1 = root,movetype=H &&(root,stateno!=[120,155])
trigger1 = root,prevstateno=[120,155]
var(42)=enemynear,stateno
[State 100000]
type=varset
triggerall=root,var(59)
trigger1 = !var(41)
trigger1 = root,movetype=H &&(root,stateno!=[120,155])
trigger1 = root,prevstateno=[120,155]
var(41)=enemynear,stateno
[State 100000]
type=varset
triggerall=root,var(59)
trigger1=var(45)&&!var(46)
trigger1=enemynear,stateno!=var(45)
trigger1=p2stateno=[200,4999]
trigger1=!inguarddist
trigger1=root,movetype=H
trigger1=root,stateno=[5000,5100]
var(46)=enemynear,stateno
[State 100000]
type=varset
triggerall=root,var(59)
trugger1=!var(45)
trigger1=p2stateno=[200,4999]
trigger1=!inguarddist
trigger1=root,movetype=H
trigger1=root,stateno=[5000,5100]
var(45)=enemynear,stateno
[State 100000]
type=varset
triggerall=root,var(59)
triggerall = var(47)
triggerall = p2stateno!=var(47)
triggerall = enemynear,stateno >= 200
triggerall = enemynear,stateno!=var(47)
triggerall = enemynear,prevstateno!=var(47)
triggerall = var(40)=[3,4]
triggerall = root,movetype=H &&(root,stateno!=[120,155])
triggerall = root,prevstateno=[120,155]
triggerall = root,time = 1
trigger1 = p2stateno=var(41)
trigger2 = p2stateno=var(42)
trigger3 = p2stateno=var(43)
trigger4 = p2stateno=var(44)
var(48)=enemynear,stateno
[State 100000]
type=varset
triggerall=root,var(59)
triggerall = var(40)=[3,4]
triggerall = root,movetype=H &&(root,stateno!=[120,155])
triggerall = root,prevstateno=[120,155]
triggerall = root,time = 1
trigger1 = p2stateno=var(41)
trigger2 = p2stateno=var(42)
trigger3 = p2stateno=var(43)
trigger4 = p2stateno=var(44)
var(47)=enemynear,stateno
[State -3]
type = VarSet
triggerall=root,var(59)
triggerall=enemynear,movetype!=I
trigger1 = var(40)=3
var(40) = 1
[State -3]
type = VarSet
triggerall=root,var(59)
triggerall=var(1)>=4
triggerall=enemynear,movetype!=I
trigger1 = var(40)=4
var(40) = 2


;===========================================================================
;var(49)リバーサルガード

[State -3]
type = VarSet
triggerall=root,var(59)
trigger1 = var(56)>=1
Trigger1 = root,time=1
trigger1 = root,movetype=H &&(root,stateno!=[120,155])
var(49) = var(56)


;===========================================================================
;var(50～53)いちおー飛び道具対策


;ラウンド開始直後
[State 100000]
type=varset
trigger1=var(55)=0
var(52)=enemynear,numhelper
[State 100000]
type=varset
trigger1 = var(55)=0
var(53)=enemynear,numproj
[State 100000]
type=varset
trigger1=var(54)>=0&&var(55)=0
;trigger1=roundstate=1||roundstate=2&&time<5
trigger1=root,ctrl
var(55)=-60

[State 100000]
type=varadd
trigger1=roundstate=2
trigger1=var(55)<-1
var(55)=1

[State 100000]
type=varset
trigger1=roundstate=2
trigger1=var(55)>=1
trigger1=enemynear,numhelper=var(52)
trigger2 = var(55)=[-2,-1]
var(55)=1


;初期変数セット
[State 100000]
type=varset
trigger1=!var(50)
trigger1=!var(52)
trigger1=root,prevstateno=[190,194]
var(52)=enemynear,numhelper
[State 100000]
type=varset
trigger1 = !var(51)
trigger1 = !var(53)
trigger1=root,prevstateno=[190,194]
var(53)=enemynear,numproj

;フラグ消去（東方のキャンセル対策に確認ヘルパー）
[State -3]
type = null;helper
trigger1=!NumHelper(36)
trigger1=(root,inguarddist=0)*(enemynear,movetype=I)*(enemynear,stateno=[40,119])
helpertype=normal
name="danmaku"
stateno=36
ID=36
pos=0,0
keyctrl=1
pausemovetime=99999999
supermovetime=99999999
persistent = 0

[State 100000]
type=varset
trigger1=numhelper(36)
trigger1=helper(36),var(0)=0
trigger1=(root,inguarddist=0)*(enemynear,movetype=I)*(enemynear,stateno=[40,119])
var(52)=enemynear,numhelper



;パワー溜め感知
[State 100000]
type=varset
trigger1=roundstate=2
trigger1=var(55)>0
trigger1=enemynear,numhelper>var(52)
var(54)=enemynear,stateno

[State 100000]
type=varadd
trigger1=roundstate=2
trigger1=var(54)>0
trigger1=var(55)>0
trigger1=enemynear,numhelper>var(52)
trigger1=enemynear,stateno=var(54)
trigger1=enemynear,power>var(57)
var(55)=1


;現在のヘルパー数参照
[State 100000]
type=varadd
trigger1=var(55)>0
triggerall=roundstate = 2
trigger1=enemynear,numhelper>var(52)
var(50)=1
[State 100000]
type=varset
trigger1=enemynear,numhelper=var(52)
trigger2=root,stateno=[150,155]
trigger3=var(50) > 60
trigger4=enemynear,movetype=H||root,statetype=A;不具合防止
trigger5=var(55)!=[1,5]
var(50)=0
[State 100000]
type=varadd
trigger1=enemynear,numproj>var(53)
var(51)=1
[State 100000]
type=varset
triggerall=roundstate = 2
trigger1=enemynear,numproj=var(53)
trigger2=root,stateno=[150,155]
trigger3=var(51) > 60
var(51)=0
[State 100000]
type=varset
trigger1 = !var(50)
trigger1=enemynear,ctrl||root,stateno=[150,155]
var(52)=enemynear,numhelper
[State 100000]
type=varset
trigger1 = !var(51)
trigger1=enemynear,ctrl||root,stateno=[150,155]
var(53)=enemynear,numproj


;===========================================================================
;var(56)起き上がり投げ無敵F(一応リバサ暴れ防止も兼ねる）

[State -3]
type = VarSet
trigger1 = var(56)>=0
trigger1 = root,stateno=5120
Trigger1 = root,animtime=-1
var(56) = 12
[State -3]
type = VarSet
trigger1 = enemynear,stateno=5120
Trigger1 = enemynear,animtime=-1
var(56) = -12
[State -3]
type = Varadd
trigger1 = var(56)!=0
var(56) = ifelse(var(56)>0,-1,1)

;===========================================================================
;var(57) 相手パワー参照

[State 100000]
type=varset
trigger1=roundstate=2
trigger1=enemynear,stateno!=var(54)
trigger2 =p2movetype=H
var(58)=0

;使い回せるvarはできるだけ節約
[State 100000]
type=varset
trigger1=roundstate=2
trigger1=var(55)>0
trigger1=enemynear,power>var(57)
var(54)=enemynear,stateno

[State 100000]
type=varadd
trigger1=roundstate=2
trigger1=enemynear,stateno=var(54)
trigger1=enemynear,power>var(57)
var(58)=1


;1F前のpowerを記憶することで判定する
[State 100000]
type=varset
trigger1=1
var(57)=enemynear,power


;===========================================================================
;var(59) ヘルパー式起動法

[State 100000]
type=varset
trigger1=(command="a"&&root,command="a")+(command="b"&&root,command="b")+(command="c"&&root,command="c")+(command="x"&&root,command="x")+(command="y"&&root,command="y")+(command="z"&&root,command="z")+(command="start"&&root,command="start")
trigger2=(command="up"&&root,command="up")+(command="down"&&root,command="down")+(command="fwd"&&root,command="fwd")+(command="back"&&root,command="back")
trigger3=root,var(59)
trigger4=(root,power=root,powermax)*(enemynear,power=enemynear,powermax)*(root,life=root,lifemax)*(enemynear,life=enemynear,lifemax)
var(59)=-1

[State 100000]
type=varset
triggerall=var(59)=0
;trigger1=root,movetype!=H
;trigger1=(root,movetype=A)-(HitPauseTime=0)
trigger1=(command!="a"&&root,command="a")+(command!="b"&&root,command="b")+(command!="c"&&root,command="c")+(command!="x"&&root,command="x")+(command!="y"&&root,command="y")+(command!="z"&&root,command="z")+(command!="start"&&root,command="start")
trigger2=(command!="up"&&root,command="up")+(command!="down"&&root,command="down")+(command!="fwd"&&root,command="fwd")+(command!="back"&&root,command="back")
;trigger2=root,stateno<105
;trigger2=root,prevstateno!=[120,155]
;trigger2=root,p2dist X >0;コマンド逆になるから防止（facingが機能してないっぽい？）
;trigger2=root,stateno!=52&&root,prevstateno!=52&&root,prevstateno!=20;飛び越えた後の着地あたりが怪しい
;Trigger2=facing= root,facing
;trigger2=(command!="up"&&root,command="up")+(!root,inguarddist&&command!="down"&&root,command="down")+(command!="fwd"&&root,command="fwd")+(!root,inguarddist&&command!="back"&&root,command="back")
;trigger2=(command!="up"+root,command="up")+(command!="down"+root,command="down")+(command!="fwd"+root,command="fwd")+(command!="back"+root,command="back")!=4
;trigger2=(command!="up"+root,command="up")+(command!="down"+root,command="down")+(command!="fwd"+root,command="fwd")+(command!="back"+root,command="back")!=2
;Trigger3=facing!=root,facing
;trigger3=(command!="up"&&root,command="up")+(command!="down"&&root,command="down")+(command!="fwd"&&root,command="back")+(command!="back"&&root,command="fwd")
var(59)=1



;===========================================================================
;不具合防止
[State 100000]
type = SelfState
trigger1 = !IsHelper
Value = 0
[State 100000]
type = NotHitBy
trigger1 = IsHelper
value = SCA
[State 100000]
type = assertspecial
trigger1 = 1
flag = invisible
;flag2 = noautoturn


[Statedef 36]
Type = A
Ctrl = 0
Movetype = I
Physics = N

[State 36]
type = SelfState
trigger1 = !IsHelper
Value = 0
[State 36]
type = NotHitBy
trigger1 = IsHelper
value = SCA
[State 100000]
type = assertspecial
trigger1 = 1
flag = invisible
;flag2 = noautoturn

[State -1, PosAdd] 
type = PosAdd 
trigger1 = 1 
x = ceil(rootDist X) +ceil(root,p2dist X/2)

[state 36]
type = varset
Trigger1 = time=0
var(0)=0

[state 36]
type = varset
Trigger1 = inguarddist
var(0)=1

[state 36]
type = destroyself
trigger1 = enemynear,stateno!=[40,119]





[Statedef 110000]
Type = A
Ctrl = 0
Movetype = I
Physics = N
[state 120000]
type = varset
Trigger1 = time=0
var(0)=0
[state 110000]
type = velset
Trigger1 = 1;root,numprojID(110000) > 0
x = 10
[State 100000]
type = SelfState
trigger1 = !IsHelper
Value = 0
[State 1825]
type = assertspecial
trigger1 = 1
flag = invisible
[State 10000]
type = NotHitBy
value = SCA
trigger1 = 1
[state 110000]
type=Projectile
trigger1 = time = 0
trigger1 = numprojID(110000) < 1
velocity = 10,0
projID = 110000
projanim = 0;110000;万が一被ったら変更
projhits = 9999
projpriority = 9999
offset = 0,9999
projstagebound = const(size.ground.front)
projedgebound = 100000
projremovetime = -1
supermovetime = 9999
pausemovetime = 9999
[state 110000]
type = velset
trigger1 = vel X > 0
Trigger1 = root,numprojID(110000) = 0
x = 0
[state 110000]
type=null;Projectile;そもそも確認用に出す必要が無かった
trigger1 = time > 0
trigger1 = vel X = 0
trigger1 = numprojID(110000) =0
trigger1 = numprojID(110001) <0
velocity = 0,0
projID = 110001
projanim = 0;110001;万が一被ったら変更
projhits = 9999
projpriority = 9999
offset = 0,9999
projremovetime = -1
supermovetime = 9999
pausemovetime = 9999
[state 110000]
type = varset
trigger1 = vel X = 0
Trigger1 = root,numprojID(110000) = 0
trigger1 = NumHelper(110000)
trigger1 = vel X= 0
var(0) = ceil(rootdist X)
[state 110000]
type = destroyself
trigger1 = time > 0
trigger1 = var(0)
trigger1 = NumHelper(35)
trigger1 = helper(35),var(36)

[Statedef 120000]
Type = A
Ctrl = 0
Movetype = I
Physics = N
Sprpriority = 1
[state 120000]
type = varset
Trigger1 = time=0
var(0)=0
;逆向きに飛んで貰う
[State 100000]
type = null;turn
trigger1 = NumHelper(35)
trigger1=facing=helper(35),facing
;不具合防止
[State 100000]
type = SelfState
trigger1 = !IsHelper
Value = 0
[State 1825]
type = assertspecial
trigger1 = 1
flag = invisible
[State 10000]
type = NotHitBy
value = SCA
trigger1 = 1
[state 110000]
type = velset
;trigger1 = helper(110000),facing
Trigger1 = 1;root,numprojID(120000) > 0
x = -10
[state 110000]
type=Projectile
;trigger1 = helper(110000),facing
trigger1 = time=0;numprojID(120000) < 1
velocity = -10,0
projID = 120000
projanim = 0;110000;万が一被ったら変更
projhits = 9999
projpriority = 9999
offset = 0,9999
projstagebound = const(size.ground.front);front
projedgebound = 100000
projremovetime = -1
supermovetime = 9999
pausemovetime = 9999
[state 110000]
type = velset
trigger1 = vel X < 0
Trigger1 = root,numprojID(120000) = 0
x = 0
[state 110000]
type = varset
trigger1 = time>0
trigger1 = vel X= 0
Trigger1 = root,numprojID(120000) = 0
trigger1 = NumHelper(120000)
var(0) = ceil(rootdist X)
[state 110000]
type = destroyself
trigger1 = time > 0
trigger1 = var(0)
trigger1 = NumHelper(35)
trigger1 = helper(35),var(37)
;===========================================================================
[StateDef 150000]
physics=N
ctrl=0
[State 100000]
type=nothitby
value = SCA
trigger1 = 1
[State 100000]
type=varset
trigger1=inguarddist
var(1)=1
[State 100000]
type=varset
trigger1=!inguarddist
var(1)=0
[State 100000]
type = turn
trigger1 = p2dist X < 0
[State -1, PosAdd] 
type = PosAdd 
trigger1 = 1
x = ceil(rootDist X)+ceil(root,p2dist X/3)
[State 100000]
type = SelfState
trigger1 = !IsHelper
Value = 0
[State 100000]
type = NotHitBy
trigger1 = IsHelper
value = SCA
[State 100000]
type = assertspecial
trigger1 = 1
flag = invisible
;flag2 = noautoturn
[StateDef 150001]
physics=N
ctrl=0
[State 100000]
type=nothitby
value = SCA
trigger1 = 1
[State 100000]
type=varset
trigger1=inguarddist
var(1)=1
[State 100000]
type=varset
trigger1=!inguarddist
var(1)=0
[State 100000]
type = turn
trigger1 = p2dist X < 0
[State -1, PosAdd] 
type = PosAdd 
trigger1 = 1 
x = ceil(rootDist X) +ceil(root,p2dist X*2/3)
[State 100000]
type = SelfState
trigger1 = !IsHelper
Value = 0
[State 100000]
type = NotHitBy
trigger1 = IsHelper
value = SCA
[State 100000]
type = assertspecial
trigger1 = 1
flag = invisible
;flag2 = noautoturn
;===========================================================================

; Jump Start
[Statedef 39]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = 1
sysvar(1) = 1


[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------

;------------------------------
[State 2462]
type = DestroySelf
trigger1 = ctrl = 1