;-| AI |------------------------------------------------------
[Command]
name = "CPU1"
command = U, D, F
time = 1

[Command]
name = "CPU2"
command = U, B, F
time = 1

[Command]
name = "CPU3"
command = U, D, D
time = 1

[Command]
name = "CPU4"
command = F, B, U
time = 1

[Command]
name = "CPU5"
command = U, F, U, B
time = 1

[Command]
name = "CPU6"
command = U, D, B
time = 1

[Command]
name = "CPU7"
command = F, F, B
time = 1

[Command]
name = "CPU8"
command = U, D, U
time = 1

[Command]
name = "CPU9"
command = F, B, B
time = 1

[Command]
name = "CPU10"
command = F, F, B, B
time = 1

[Command]
name = "CPU11"
command = U, U, F
time = 1

[Command]
name = "CPU12"
command = U, B, B
time = 1

[Command]
name = "CPU13"
command = U, B, F, F
time = 1

[Command]
name = "CPU14"
command = U, F, B, U
time = 1

[Command]
name = "CPU15"
command = U, B, F, U
time = 1

[Command]
name = "CPU16"
command = U, B, B, B
time = 1

[Command]
name = "CPU17"
command = U, D, B, F
time = 1

[Command]
name = "CPU18"
command = U, D, B, D
time = 1

[Command]
name = "CPU19"
command = U, D, F, U
time = 1

[Command]
name = "CPU20"
command = U, D, U, B
time = 1

[Command]
name = "CPU21"
command = U, D, F, F
time = 1

[Command]
name = "CPU22"
command = F, F, F, F
time = 1

[Command]
name = "CPU23"
command = U, U, U, D
time = 1

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

[Command]
name = "CPU25"
command = D, D, D, D
time = 1

[Command]
name = "CPU26"
command = D, D, D
time = 1

[Command]
name = "CPU27"
command = F, F, F
time = 1

[Command]
name = "CPU28"
command = U, U, U
time = 1

[Command]
name = "CPU29"
command = U, U, B, B
time = 1

[Command]
name = "CPU30"
command = D, D, F, F
time = 1

[Command]
name = "CPU31"
command = U, D, F, U, D
time = 1

[Command]
name = "CPU32"
command = U, B, F, U, D
time = 1

[Command]
name = "CPU33"
command = U, D, D, U, D
time = 1

[Command]
name = "CPU34"
command = F, B, U, U, D
time = 1

[Command]
name = "CPU35"
command = U, F, U, B, U, D
time = 1

[Command]
name = "CPU36"
command = U, D, B, U, D
time = 1

[Command]
name = "CPU37"
command = F, F, B, U, D
time = 1

[Command]
name = "CPU38"
command = U, D, U, U, D
time = 1

[Command]
name = "CPU39"
command = F, B, B, U, D
time = 1

[Command]
name = "CPU40"
command = F, F, B, B, U, D
time = 1

[Command]
name = "CPU41"
command = U, U, F, U, D
time = 1

[Command]
name = "CPU42"
command = U, B, B, U, D
time = 1

[Command]
name = "CPU43"
command = U, B, F, F, U, D
time = 1

[Command]
name = "CPU44"
command = U, F, B, U, U, D
time = 1

[Command]
name = "CPU45"
command = U, B, F, U, U, D
time = 1

[Command]
name = "CPU46"
command = U, B, B, B, U, D
time = 1

[Command]
name = "CPU47"
command = U, D, B, F, U, D
time = 1

[Command]
name = "CPU48"
command = U, D, B, D, U, D
time = 1

[Command]
name = "CPU49"
command = U, D, F, U, U, D
time = 1

[Command]
name = "CPU50"
command = U, D, U, B, U, D
time = 1

;-| ボタン配置 |-----------------------------------------------------
;各ボタンの配置を簡単に変更できます。
;このキャラクターのボタン配置を変えたいときなどに使います。
;x = x を x = a に変えれば、xがaに変わります。

[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| 標準化 |-------------------------------------------------------
[Defaults]
; timeを記述しなかった場合、以下の値が参照されます。最小値は1です。
command.time = 15

; buffer.timeの値です。1〜30まで設定できます。
; 普通は1です。
command.buffer.time = 1

;------------------------------------------------------------------------------
;-| 強化 |--------------------------------------------------------------

[Command]
name = "シリンダーハート"
command = ~D,DB,B,D,DB,B,z
time = 30

;------------------------------------------------------------------------------
;-| カウンター |--------------------------------------------------------------

[Command]
name = "オメガサーキット"
command = ~D, D, D, z
time = 30


;------------------------------------------------------------------------------
;-| チェーンドライブ |--------------------------------------------------------------

[Command]
name = "チェーンドライブ"
command = ~D, DF, F, DF, D, DB, B, x
time = 30

[Command]
name = "チェーンドライブ"
command = ~D, DF, F, DF, D, DB, B, y
time = 30

;------------------------------------------------------------------------------
;-| 超必殺技 |-----------------------------------------------------------------

[Command]
name = "弱ピアシングレイブ"
command = ~D, DB, B ,D, DB, B ,a
time = 30

[Command]
name = "強ピアシングレイブ"
command = ~D, DB, B ,D, DB, B ,b
time = 30


[Command]
name = "弱ヒートドライブ type-β"
command = ~D, DF, F, D, DF, F, x
time = 25

[Command]
name = "強ヒートドライブ type-β"
command = ~D, DF, F, D, DF, F, y
time = 25

;------------------------------------------------------------------------------
;-| 必殺技 |-------------------------------------------------------------------


[Command]
name = "ハングドマン"
command = ~F, DF, D,DB,B, x


[Command]
name = "ハングドマン"
command = ~F, DF, D,DB,B, y


[Command]
name = "カーネイジブレイド"
command = ~F, D, DF, z


[Command]
name = "デフレクションビースト"
command = ~D, DF, F, z
time = 25

[Command]
name = "ジグ・ソー"
command = ~D, DF, F, z

[Command]
name = "デス・ロジック"
command = ~D, D, z
time = 25

[Command]
name = "ダメージプラン"
command = ~D, D, x+y
time = 25

[Command]
name = "弱クロウバイツ"
command = ~F, D, DF, x

[Command]
name = "強クロウバイツ"
command = ~F, D, DF, y

[Command]
name = "弱ミニッツスパイク"
command = ~D, DB, B, a

[Command]
name = "強ミニッツスパイク"
command = ~D, DB, B, b

[Command]
name = "弱ブラックアウト"
command = ~D, DF, F, a

[Command]
name = "強ブラックアウト"
command = ~D, DF, F, b


[Command]
name = "弱アイントリガー"
command = ~D, DF, F, x

[Command]
name = "強アイントリガー"
command = ~D, DF, F, y

[Command]
name = "jump"    
command = D, $U
time = 12

;------------------------------------------------------------------------------
;-| キー２回連続入力 |---------------------------------------------------------
[Command]
name = "FF"     ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = F, F
time = 10

[Command]
name = "BB"     ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = B, B
time = 10

;------------------------------------------------------------------------------
;-| 同時押し |-----------------------------------------------------------------
[Command]
name = "recovery"   ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = x+a
time = 1

[Command]
name = "non"   ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = z
time = 1

[Command]
name = "ふっとばし"
command = y+b
time = 1

[Command]
name = "ふっとばし"
command = c
time = 1

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

;------------------------------------------------------------------------------
;-| 方向キー＋ボタン |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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

;------------------------------------------------------------------------------
;-| ボタン単発 |---------------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

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

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

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

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

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

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

;------------------------------------------------------------------------------
;-| 方向キー押しっぱなし |-----------------------------------------------------
[Command]
name = "holdfwd"   ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = /$F
time = 1

[Command]
name = "holdback"  ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = /$B
time = 1

[Command]
name = "holdup"    ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = /$U
time = 1

[Command]
name = "holddown"  ;要求済み (キーの変更は可能ですが名前を変えたり無効にしてはいけません)
command = /$D
time = 1

;------------------------------------------------------------------------------
;==============================================================================
; 技を実行するための条件の設定（ステートエントリーパート）
;==============================================================================
;------------------------------------------------------------------------------
; ここから下は「どのコマンドでどの番号のステートをどういう条件で出せるか」を設定する場所です。
;（ステートに関してはCNSファイルを参照）
; 
;■設定は基本的にこの形になります。
;
; [State -1, Label]                  ;「Label」の部分はただのラベルです。何でも良いです。それ以外は変更不可。
; type = ChangeState                 ;「別のステートに変更する」という意味のステートコントローラ
; value = new_state_number           ;出したい技のステート番号を入れます
; trigger1 = command = command_name  ;入力キー設定パートで登録したコマンドの名前をどれか入れます
; . . .  (any additional triggers)   ;trigger（条件を指定するトリガー）を追加出来ます
;
;■triggerに使える基本的な条件（通常は「トリガー」と呼ばれています）
;
;   - StateType    - キャラクターがどの状態の時にそのステートを出せるかどうかを決められます。
;                    S=立った状態・C=座った状態・A=空中にいる状態・L=横に倒れた状態、の４つが決まり事です。
;                    CNSのStatedefの下にある「Type = *」の項目が状態の意味なので、これをこのトリガーで判断します。
;
;   - Ctrl         - コントロールが可能か不可能かどちらかの時にそのステートを出せるかどうかを決められます。
;                    0=コントロール不可能状態・1=コントロール可能状態、ですが通常は Ctrl = 1 ( = 1 省略可能)が基本。
;
;   - StateNo      - 別の番号のステートから出せる事が可能になります。
;                    これを応用してスーパーキャンセルも可能です。
;
;   - MoveContact  - 物理攻撃が相手に当たった時（攻撃がヒットした時、もしくはガードされた時）に、
;                    そのステートを出せるかどうかを決められます。２種類４パターンあります。
;                    MoveContact or MoveContact = 1  （攻撃が当たった時）
;                    !MoveContact or MoveContact = 0 （攻撃が当たってない時）
;                    これを応用してスーパーキャンセルも可能です。
;
;　※上の４つ以外にもありますが、他のトリガーはM.U.G.E.N本体docsフォルダの中の
;　　CNSドキュメンテーションを参照してください。
;
;■ステートエントリーの順序
;
; ChangeStateの登録の順番は重要です。上に来れば来るほどコマンド入力の優先度が高くなります。
;
; 引用になりますが、例えば「波動拳コマンドのChangeState（↓＼→＋パンチ）」を
;「昇龍拳コマンドのChangeState（→↓＼＋パンチ）」よりも上に登録した場合、
; ゲーム中では昇龍拳を出そうとしても波動拳が誤って暴発しやすくなってしまいます。
; 防止するためには、「波動拳のChangeState」を「昇龍拳のChangeState」よりも下に登録しなくてはなりません。
;「レバーを前に入れて出す特殊技」と「投げ技」の関係なども同様です。
;
; 順番をよく考えて登録しましょう。
;
;■AI(CPU)はどう動くのか
;MUGENの標準CPUは相手に近づき適当に攻撃を繰り出すだけなので、AIスイッチによる制御が必要なこともあります。
;
;■[Statedef -1]とは？
;
; この部分はCNSプログラミングの拡張部分の、常時監視ステートになります。
; どのいかなる状態でも設定した記述が常に有効になるステートです（CNSの[Statedef -2]と似たような部分）。
;
; 必要な記述と行なので、絶対に消さないでください。
;
;==============================================================================
;------------------------------------------------------------------------------

[Statedef -1];←この行は絶対に消さないでください。必須の項目です。

;===========================================================================
;AI用

;AI
[State -1, AI]
type = VarSet
triggerall = var(59) != 1
triggerall = RoundState != 3
trigger1  = command = "CPU1"
trigger2  = command = "CPU2"
trigger3  = command = "CPU3"
trigger4  = command = "CPU4"
trigger5  = command = "CPU5"
trigger6  = command = "CPU6"
trigger7  = command = "CPU7"
trigger8  = command = "CPU8"
trigger9  = command = "CPU9"
trigger10  = command = "CPU10"
trigger11  = command = "CPU11"
trigger12  = command = "CPU12"
trigger13  = command = "CPU13"
trigger14  = command = "CPU14"
trigger15  = command = "CPU15"
trigger16  = command = "CPU16"
trigger17  = command = "CPU17"
trigger18  = command = "CPU18"
trigger19  = command = "CPU19"
trigger20  = command = "CPU20"
trigger21  = command = "CPU21"
trigger22  = command = "CPU22"
trigger23  = command = "CPU23"
trigger24  = command = "CPU24"
trigger25  = command = "CPU25"
trigger26  = command = "CPU26"
trigger27  = command = "CPU27"
trigger28  = command = "CPU28"
trigger29  = command = "CPU29"
trigger30  = command = "CPU30"
trigger31  = command = "CPU31"
trigger32  = command = "CPU32"
trigger33  = command = "CPU33"
trigger34  = command = "CPU34"
trigger35  = command = "CPU35"
trigger36  = command = "CPU36"
trigger37  = command = "CPU37"
trigger38  = command = "CPU38"
trigger39  = command = "CPU39"
trigger40  = command = "CPU40"
trigger41  = command = "CPU41"
trigger42  = command = "CPU42"
trigger43  = command = "CPU43"
trigger44  = command = "CPU44"
trigger45  = command = "CPU45"
trigger46  = command = "CPU46"
trigger47  = command = "CPU47"
trigger48  = command = "CPU48"
trigger49  = command = "CPU49"
trigger50  = command = "CPU50"
var(59) = 1

;==============================================================================
;シリンダーハート
[State -1, 3singi]
type = ChangeState
value = 3600
triggerall= var(59)<=0
triggerall = command = "シリンダーハート"
triggerall = power >= 1000
triggerall = var(45) = 0
trigger1 = statetype != A
trigger1 = ctrl

;==============================================================================
;オメガサーキット
[State -1, 3singi]
type = ChangeState
value = 3500
triggerall= var(59)<=0
triggerall = command = "オメガサーキット"
triggerall = power >= 1000
triggerall = var(45) = 5
trigger1 = statetype != A
trigger1 = ctrl

;==============================================================================
;チェーンドライブ -code blood-
[State -1, 3singi]
type = ChangeState
value = 3100
triggerall= var(59)<=0
triggerall = command = "チェーンドライブ"
triggerall = power >= 1000
triggerall = var(45) = 5
;triggerall = (100*life/const(data.life)) <= 30
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 = stateno = 1150 && AnimElemtime(4) >= 0 && AnimElemtime(6) < 0 && movecontact
trigger11 =stateno = 200 && movecontact
trigger12 =stateno = 210 && movecontact
;==============================================================================
;チェーンドライブ改
[State -1, CD]
type = ChangeState
value = 3000
triggerall= var(59)<=0
triggerall = command = "チェーンドライブ"
triggerall = power >= 1000
triggerall = var(45) >= 3
;triggerall = (100*life/const(data.life)) <= 80
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 = stateno = 1150 && AnimElemtime(4) >= 0 && AnimElemtime(6) < 0 && movecontact
trigger11 = stateno = 2510 && AnimElemtime(2) >= 0 && AnimElemtime(38) < 0 && movecontact
trigger12 =stateno = 200 && movecontact
trigger13 =stateno = 210 && movecontact
;==============================================================================
;チェーンドライブ
[State -1, CD]
type = ChangeState
value = 2950
triggerall= var(59)<=0
triggerall = command = "チェーンドライブ"
triggerall = power >= 1000
triggerall = var(45) < 3
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 = stateno = 1150 && AnimElemtime(4) >= 0 && AnimElemtime(6) < 0 && movecontact
trigger11 = stateno = 2510 && AnimElemtime(2) >= 0 && AnimElemtime(38) < 0 && movecontact
trigger12 =stateno = 200 && movecontact
trigger13 =stateno = 210 && movecontact
;------------------------------------------------------------------------------
;ピアシングレイブ
[State -1, SD]
type = ChangeState
value = 2500
triggerall= var(59)<=0
triggerall = command = "弱ピアシングレイブ"
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 = stateno = 1150 && AnimElemtime(4) >= 0 && AnimElemtime(6) < 0 && movecontact
trigger11 =stateno = 200 && movecontact
trigger12 =stateno = 210 && movecontact

;ピアシングレイブ
[State -1, SD]
type = ChangeState
value = 2505
triggerall= var(59)<=0
triggerall = command = "強ピアシングレイブ"
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 = stateno = 1150 && AnimElemtime(4) >= 0 && AnimElemtime(6) < 0 && movecontact
trigger11 =stateno = 200 && movecontact
trigger12 =stateno = 210 && movecontact
;------------------------------------------------------------------------------
;弱ヒートドライブ type-β
[State -1, L HD]
type = ChangeState
value = 2000
triggerall= var(59)<=0
triggerall = command = "弱ヒートドライブ type-β"
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 = stateno = 1150 && AnimElemtime(4) >= 0 && AnimElemtime(6) < 0 && movecontact
trigger11 =stateno = 200 && movecontact
trigger12 =stateno = 210 && movecontact
;------------------------------------------------------------------------------
;強ヒートドライブ type-β
[State -1, S HD]
type = ChangeState
value = 2050
triggerall= var(59)<=0
triggerall = command = "強ヒートドライブ type-β"
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 = stateno = 1150 && AnimElemtime(4) >= 0 && AnimElemtime(6) < 0 && movecontact
trigger11 =stateno = 200 && movecontact
trigger12 =stateno = 210 && movecontact



;------------------------------------------------------------------------------
;ハングドマン
[State -1, L CB]
type = ChangeState
value = 1700
triggerall= var(59)<=0
triggerall = command = "ハングドマン"
triggerall = statetype != A
trigger1 = ctrl


;------------------------------------------------------------------------------
;カーネイジブレイド
[State -1, L CB]
type = ChangeState
value = 2700
triggerall= var(59)<=0
triggerall = command = "カーネイジブレイド"
triggerall = var(45) >= 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact

;------------------------------------------------------------------------------
;デフレクションビースト
[State -1, MD]
type = ChangeState
value = 2100
triggerall= var(59)<=0
triggerall = command = "デフレクションビースト"
triggerall = var(45) >= 2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
trigger3 = stateno=1400&& time>5 &&prevstateno=[600,650]
trigger4 = stateno=1450&& time>5 &&prevstateno=[600,650]
;デス・ロジック
[State -1, L CB]
type = ChangeState
value = 2800
triggerall= var(59)<=0
triggerall = command = "デス・ロジック"
triggerall = statetype != A
triggerall = var(45) < 5
triggerall = power >= 1000
trigger1 = ctrl

;ダメージプラン
[State -1, L CB]
type = ChangeState
value = 2850
triggerall= var(59)<=0
triggerall = command = "ダメージプラン"
triggerall = statetype != A
triggerall = var(45) > 2
triggerall =!var(47)
trigger1 = ctrl

;ジグ・ソー
[State -1, L AT]
type = ChangeState
value = 2600
triggerall= var(59)<=0
triggerall = command = "ジグ・ソー"
triggerall = statetype != A
triggerall = var(45) >= 2
triggerall = numhelper(2600)=0
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact

;------------------------------------------------------------------------------
;弱クロウバイツ
[State -1, L CB]
type = ChangeState
value = 1100
triggerall= var(59)<=0
triggerall = command = "弱クロウバイツ"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact
;強クロウバイツ
[State -1, S CB]
type = ChangeState
value = 1150
triggerall= var(59)<=0
triggerall = command = "強クロウバイツ"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact
;------------------------------------------------------------------------------
;弱ミニッツスパイク
[State -1, L MS]
type = ChangeState
value = 1200
triggerall= var(59)<=0
triggerall = command = "弱ミニッツスパイク"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact
;空中弱ミニッツスパイク
[State -1, A L MS]
type = ChangeState
value = 1206
triggerall= var(59)<=0
triggerall = command ="弱ミニッツスパイク"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 630 && movecontact
trigger5 = stateno = 640 && movecontact
trigger6 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
trigger7 = stateno = 320 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
;強ミニッツスパイク
[State -1, S MS]
type = ChangeState
value = 1250
triggerall= var(59)<=0
triggerall = command = "強ミニッツスパイク"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact
;空中強ミニッツスパイク
[State -1, A S MS]
type = ChangeState
value = 1256
triggerall= var(59)<=0
triggerall = command = "強ミニッツスパイク"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 630 && movecontact
trigger5 = stateno = 640 && movecontact
trigger6 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
trigger7 = stateno = 320 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
;------------------------------------------------------------------------------
;弱ブラックアウト
[State -1, L BO]
type = ChangeState
value = 1300
triggerall= var(59)<=0
triggerall = command = "弱ブラックアウト"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 630 && movecontact
trigger5 = stateno = 640 && movecontact
trigger6 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
trigger7 = stateno = 320 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact

;強ブラックアウト
[State -1, S BO]
type = ChangeState
value = 1350
triggerall= var(59)<=0
triggerall = command = "強ブラックアウト"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 630 && movecontact
trigger5 = stateno = 640 && movecontact
trigger6 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
trigger7 = stateno = 320 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
;------------------------------------------------------------------------------
;弱エアトリガー
[State -1, L AirT]
type = ChangeState
value = 1400
triggerall= var(59)<=0
triggerall = command =  "弱アイントリガー"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 650 && movecontact
trigger3 = stateno = 600 && movecontact
trigger4 = stateno = 610 && movecontact
trigger5 = stateno = 630 && movecontact
trigger6 = stateno = 640 && movecontact


;------------------------------------------------------------------------------
;弱エアトリガー特殊
[State -1, L AirT]
type = ChangeState
value = 1405
triggerall= var(59)<=0
triggerall = command =  "弱アイントリガー"
triggerall = statetype = A
trigger1 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
trigger2 = stateno = 320 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact

;強エアトリガー
[State -1, S AirT]
type = ChangeState
value = 1450
triggerall= var(59)<=0
triggerall = command = "強アイントリガー"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
trigger3 = stateno = 600 && movecontact
trigger4 = stateno = 610 && movecontact
trigger5 = stateno = 630 && movecontact
trigger6 = stateno = 640 && movecontact
trigger7 = stateno = 650 && movecontact
trigger8 = stateno = 320 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movecontact
;------------------------------------------------------------------------------
;弱アイントリガー
[State -1, L AT]
type = ChangeState
value = 1000
triggerall= var(59)<=0
triggerall = command = "弱アイントリガー"
triggerall = statetype != A
triggerall = numprojID(1000) = 0
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact
trigger12 =stateno = 230 && movecontact
;強アイントリガー
[State -1, S AT]
type = ChangeState
value = 1050
triggerall= var(59)<=0
triggerall = command = "強アイントリガー"
triggerall = statetype != A
triggerall = numprojID(1000) = 0
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact
trigger12 =stateno = 230 && movecontact
;---------------------------------------------------------------------------
;後緊急回避
[State -1, T S]
type = ChangeState
value = 710
triggerall= var(59)<=0
triggerall = command = "recovery" && command = "holdback"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = power >= 1000
trigger2 = stateno = [150,151]

;---------------------------------------------------------------------------
;前緊急回避
[State -1, T S]
type = ChangeState
value = 700
triggerall= var(59)<=0
triggerall = command = "recovery"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = power >= 1000
trigger2 = stateno = [150,151]
trigger3 = stateno = 100

;---------------------------------------------------------------------------
;受身
[State -1, UKEMI]
type = ChangeState
value = 52000
triggerall= var(59)<=0
triggerall = command = "recovery"
triggerall = alive = 1
trigger1 = stateno = 5050
trigger1 = pos y > -30
trigger1 = vel y > 0 && vel y < 9

;------------------------------------------------------------------------------
;ふっとばし
[State -1, Throw]
type = ChangeState
value = 300
triggerall= var(59)<=0
triggerall = command = "ふっとばし"
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = ctrl
trigger2 = power >= 1000
trigger2 = stateno = [150,151]

;------------------------------------------------------------------------------
;空中ふっとばし
[State -1, CD]
type = ChangeState
value = 650
triggerall= var(59)<=0
triggerall = command = "ふっとばし"
triggerall = statetype = A
trigger1 = ctrl

;------------------------------------------------------------------------------
;P投げ
[State -1, Throw]
type = ChangeState
value = 800
triggerall= var(59)<=0
triggerall = command = "y"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = p2bodydist X < 15
trigger1 = p2statetype != A && p2movetype != H
trigger1 = ctrl

;------------------------------------------------------------------------------
;K投げ
[State -1, Throw]
type = ChangeState
value = 830
triggerall= var(59)<=0
triggerall = command = "b"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = p2bodydist X < 15
trigger1 = p2statetype != A && p2movetype != H
trigger1 = ctrl

;------------------------------------------------------------------------------
;シュートミドル
[State -1, SM]
type = ChangeState
value = 310
triggerall= var(59)<=0
triggerall = command = "a"
triggerall = command = "holdfwd"
triggerall = statetype != A
triggerall = command != "holddown"
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact

;ニーアサルト
[State -1, NA]
type = ChangeState
value = 320
triggerall= var(59)<=0
triggerall = command = "b"
triggerall = command = "holdfwd"
triggerall = statetype != A
triggerall = command != "holddown"
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact

;------------------------------------------------------------------------------
;ダッシュ
[State -1, Dash]
type = ChangeState
value = 100
triggerall= var(59)<=0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;バックステップ
[State -1, Back Step]
type = ChangeState
value = 105
triggerall= var(59)<=0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;==============================================================================
;近距離立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 205
triggerall= var(59)<=0
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = p2bodydist X < 18
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact

;遠距離立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall= var(59)<=0
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype = S
trigger2 =stateno=200 &&time>4
trigger3 = statetype = S
trigger3 =stateno=205 &&time>4&&p2bodydist X >=18
trigger4 = statetype = S
trigger4 =stateno=230 &&time>6
trigger5 =stateno=400 &&time>4

;近距離立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 215
triggerall= var(59)<=0
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = p2bodydist X < 20
trigger1 = ctrl

;遠距離立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall= var(59)<=0
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl

;------------------------------------------------------------------------------
;近距離立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 235
triggerall= var(59)<=0
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = p2bodydist X < 20
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype = S
trigger2 = stateno = 235 && movecontact
trigger3 =stateno=400 &&movecontact

;遠距離立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall= var(59)<=0
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype = S
trigger2 =stateno=230 &&time>10
trigger3 = statetype = S
trigger3 =stateno=235 &&time>6&&p2bodydist X >=20
trigger4 = statetype = S
trigger4 =stateno=200 &&time>4
trigger5 =stateno=400 &&movecontact

;近距離立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 245
triggerall= var(59)<=0
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = p2bodydist X < 20
trigger1 = ctrl

;遠距離立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall= var(59)<=0
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl

;------------------------------------------------------------------------------
;挑発
[State -1, Taunt]
type = ChangeState
value = 195
triggerall= var(59)<=0
triggerall = command = "start"
triggerall = command != "holddown"
triggerall = var(20) = 0
trigger1 = statetype != A
trigger1 = ctrl
;------------------------------------------------------------------------------

;しゃがみ弱パンチ
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall= var(59)<=0
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 430 && time >= 4 && movecontact
trigger3 = stateno = 400 && time >= 8

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

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

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

;------------------------------------------------------------------------------
;ジャンプ弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall= var(59)<=0
triggerall = command = "x"
triggerall = stateno != 105  ;バックステップ中は禁止
trigger1 = statetype = A
trigger1 = ctrl

;ジャンプ強パンチ
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall= var(59)<=0
triggerall = command = "y"
triggerall = stateno != 105
trigger1 = statetype = A
trigger1 = ctrl

;------------------------------------------------------------------------------
;ジャンプ弱キック
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall= var(59)<=0
triggerall = command = "a"
triggerall = stateno != 105
trigger1 = statetype = A
trigger1 = ctrl

;ジャンプ強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall= var(59)<=0
triggerall = command = "b"
triggerall = stateno != 105
trigger1 = statetype = A
trigger1 = ctrl
;==============================================================================
;==============================================================================
;==============================================================================
;==============================================================================
;=====================================AI=======================================
;==============================================================================
;==============================================================================
;==============================================================================
;==============================================================================

;レブナント追撃用ジャンプ
[State -1, S CB]
type = ChangeState
value = 40000
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = prevstateno !=40000||stateno !=40000
trigger1 = ctrl  
trigger1 = enemynear,vel y> 0
trigger1 = p2stateno = 2485 && p2dist y < -150
trigger1 = p2bodydist x + enemy,vel x*10<= 55 

;追撃用ジャンプ強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
triggerall = p2stateno = 2485
trigger1 = p2bodydist x  <= 55
trigger1 = ctrl
trigger1 = pos y <= -30 

;強クロー追撃用
[State -1, S CB]
type = ChangeState
value = 1150
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = power < 1000
trigger1 = ctrl  
trigger1 = enemynear,vel y> 0
trigger1 = p2stateno = 1706 && p2dist y < -90
trigger2 = (FrontEdgeBodyDist < 90)&&prevstateno = 1261
trigger2 = ctrl 

;シリンダーハート
[State -1, 3singi]
type = ChangeState
value = 3600
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = var(45) = 0
triggerall = p2movetype!= A&&p2life > 0
triggerall = life<200
triggerall = p2life<300
triggerall = var(46) < 150
triggerall = statetype != A
trigger1 = ctrl&&!var(47)



;オメガサーキット
[State -1, 3singi]
type = ChangeState
value = 3500
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = var(45) = 5
triggerall = statetype != A
triggerall = ctrl
triggerall= roundstate=2 
triggerall= (p2bodydist x=[-10,72]) && (p2dist y=[-124,-48+(enemynear,hitdefattr=SA,SA,HA)*48])
triggerall= inguarddist && enemynear,vel x>=0 && (enemynear,vel y=[-2,8])
triggerall= (enemynear,hitdefattr=SA,NA,SA,HA) || (enemynear,hitdefattr=SA,NA,SA,HA && enemynear,time >= 20 )
triggerall= p2statetype!=A || enemynear,vel y>=0
trigger1=  random<150*(1+(life<666||life<p2life)+(life<333))


;==============================================================================
;チェーンドライブ -code blood-
[State -1, 3singi]
type = ChangeState
value = 3100
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = var(45) = 5
triggerall = p2life > 0
triggerall = statetype != A
trigger1= (ctrl || stateno=99 || (stateno=[120,131]))
trigger1 = p2stateno != 1706
trigger1 = enemy,vel x> 0 &&inguarddist&&p2movetype = A
trigger1 = enemynear,hitdefattr =SAC,SA,HA&&life<=150&&random < 500
trigger1 = ctrl&&p2dist y <= -50&&p2bodydist x +EnemyNear,vel x*5= [10,70]
trigger2 = ctrl&&p2stateno != 1706
trigger2 = p2dist y +EnemyNear,vel y*5>= -70
trigger2 = p2dist y +EnemyNear,vel y*5<= -40
trigger2 = p2stateno = 5050  
trigger2 = p2bodydist x +EnemyNear,vel x*5<= 120
trigger3 = ctrl&&p2stateno = 1706
trigger3 = p2dist y >= -50&& p2movetype = H
trigger3 = p2bodydist x +EnemyNear,vel x*5<= 150
;対ブロッキング
trigger4 = stateno=[200,600]
trigger4 = movehit&&facing=1
trigger4 = p2stateno !=[5000,5210]
trigger4 =p2movetype = A
trigger4 =p2bodydist x+EnemyNear,vel x*5< 100
trigger5 = p2stateno = 1706 && p2dist y > -60  && ctrl
trigger6 = p2stateno = 2402 && ctrl
;==============================================================================
;チェーンドライブ改
[State -1, CD]
type = ChangeState
value = 3000
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = p2life > 0
triggerall = var(45) >= 3
triggerall = var(45) != 5
triggerall = var(49)=0
triggerall = prevstateno != 1150
triggerall = statetype != A
trigger1 = p2stateno != 1706
trigger1 =stateno = 400&&movehit&&random < 100
trigger2 = ctrl&&p2stateno != 1706
trigger2 = p2dist y = [-20,-80]
trigger2 = p2stateno = 5050 
trigger2 = (p2bodydist x +EnemyNear,vel x*5= [20,90])|| (FrontEdgeBodyDist < 80)
trigger3 = ctrl&&p2stateno = 1706
trigger3 = p2dist y >= -80&& p2movetype = H
trigger3 = (p2bodydist x +EnemyNear,vel x*5<= 90)|| (FrontEdgeBodyDist < 80)
;対ブロッキング
trigger4 = stateno=[200,600]
trigger4 = movehit&&facing=1;&EnemyNear,p2movetype = H
trigger4 = p2stateno !=[5000,5210]
trigger4 =p2movetype = A
trigger4 =p2bodydist x+EnemyNear,vel x*5< 100


;==============================================================================
;チェーンドライブ-アーキタイプ
[State -1, CD]
type = ChangeState
value = 2950
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = var(45) < 3
triggerall = p2life > 0
triggerall = var(49)=0
triggerall = statetype != A
triggerall = prevstateno != 1150
trigger1 = p2stateno != 1706
trigger1 =stateno = 40&&movehit&&random < 100
trigger2 = ctrl&&p2stateno != 1706
trigger2 = p2dist y = [-40,-80]
trigger2 = p2stateno = 5050 
trigger2 = (p2bodydist x -EnemyNear,vel x*5= [20,90])|| (FrontEdgeBodyDist < 80)
trigger3 = ctrl&&p2stateno = 1706
trigger3 = p2dist y >= -80&& p2movetype = H
trigger3 = (p2bodydist x +EnemyNear,vel x*5<= 90)|| (FrontEdgeBodyDist < 80)
;対ブロッキング
trigger4 = stateno=[200,600]
trigger4 = movehit&&facing=1
trigger4 = p2stateno !=[5000,5210]
trigger4 =p2movetype = A
trigger4 =p2bodydist x+EnemyNear,vel x*5< 70

;------------------------------------------------------------------------------
;強カンニバルコープス
[State -1, S HD]
type = ChangeState
value = 2050
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall= p2stateno != 1706
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = statetype != A
triggerall = p2stateno != [120,152]
trigger1 = enemynear,hitdefattr=SAC,SA,HA,SP,HP,ST,HT,SP,HP
trigger1 = p2movetype = A 
trigger1 = random<100*(1+(p2statetype !=A)*3+((enemynear,hitdefattr=SC,HP,HA,HT)*2)+((var(45)=5)*4))
trigger1 = inguarddist
trigger1 = var(45)>2
trigger1 = (p2bodydist x = [-70,90])||(backEdgeBodyDist < 40)
trigger1= (ctrl || stateno=99 || (stateno=[120,131]))
;ブロッキング対策
trigger2= (stateno=[200,499]) && movehit&&p2movetype = A 
trigger2 = p2stateno !=[5000,5210]
trigger2 = enemynear,hitdefattr=SAC,SA,HA,SP,HP,ST,HT
;------------------------------------------------------------------------------
;弱カンニバルコープス追撃用
[State -1, L HD]
type = ChangeState
value = 2000
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = var(49)=0
triggerall = statetype != A
trigger1 = (ctrl || stateno=52 || (stateno=99))
trigger1 = (p2bodydist x+EnemyNear,vel x*5 = [0,30+var(45)*50] )|| (FrontEdgeBodyDist < 120)
trigger1 = p2stateno = 5050&&p2stateno != 1706
trigger1 = p2dist y =[-75,-55]
trigger2 = p2stateno = 2402 && ctrl


;ピアシングレイブ
[State -1, SD]
type = ChangeState
value = 2500
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = statetype != A
triggerall = p2statetype != A
trigger1 = random < 100*var(45)
trigger1 =hitdefattr = SC,NA && moveguarded
trigger1 =p2bodydist x = [20,60]
trigger2 = p2stateno = [130,160]
trigger2 = p2bodydist x =[10, 60] 
trigger2 = ctrl
trigger2 = random < 150*var(45)
trigger2 = numhelper(2600)!=0
;ピアシングレイブ強
[State -1, SD]
type = ChangeState
value = 2505
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = statetype != A
triggerall = p2statetype != A
trigger1 = random < 100*var(45)
trigger1 =p2bodydist x = [60,140]
trigger1 =hitdefattr = SC,NA && moveguarded
trigger2 = p2stateno = [130,160]
trigger2 = p2bodydist x =[70,130] 
trigger2 = ctrl
trigger2 = random < 150*var(45)
trigger2 = numhelper(2600)!=0

;ダメージプラン
[State -1, L CB]
type = ChangeState
value = 2850
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = var(45) > 2
triggerall = ctrl && !inguarddist
triggerall = var(46)>200
triggerall = life< 500
triggerall =!var(47)
triggerall = p2life > 0  
triggerall = life<(p2life+300)
trigger1 = p2stateno =[5100,5200]
trigger1 = p2bodydist x >= 70 
trigger1 = p2movetype = H
trigger2 = enemy,numhelper = 0
trigger2 = p2bodydist x >= 220
trigger3 = p2bodydist x >= 70 


;デス・ロジック
[State -1, L CB]
type = ChangeState
value = 2800
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = var(45) < 4 && !inguarddist
triggerall = power >= 1000
triggerall = ctrl
triggerall =p2stateno!=5050
triggerall =p2stateno!=5020
triggerall = var(46) <= 200 || ((var(45)<3)&&life>300) ||((var(46) >= 200)&&life>250)
triggerall = p2life > 0
trigger1 =life>250
trigger1 = p2stateno =[5100,5200]
trigger1 = p2bodydist x >= 70 
trigger1 = var(45) <= 3
trigger1 = p2movetype = H
trigger2 =life>250
trigger2 = !inguarddist
trigger2 = var(45)= 0
trigger2 = life >= 600
trigger2 = p2bodydist x >= 70
trigger3 =life>250 
trigger3 = p2bodydist x >= 70 
trigger3 = var(45) <= 3
trigger4 = RoundsExisted = 0
trigger4 = TeamMode != Turns
trigger4 = RoundNo > 0

;ダッシュ
[State -3,dash]
Type = ChangeState
value = 99
Triggerall = var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=S
triggerall= ctrl && (stateno!=[100,105])
triggerall= p2statetype!=L || p2bodydist x>130
trigger1= (enemynear,movetype!=A) && !inguarddist && p2bodydist x>=160 && random<50
trigger2= (enemynear,movetype!=A) && !inguarddist && p2bodydist x>130 && random<125*(1+(enemynear,ctrl))
trigger3= p2statetype!=A && (p2movetype=H || (p2stateno=[120,155]) || facing=enemynear,facing) && !inguarddist && p2bodydist x>50 && random<125*(1+(numhelper)+(facing=enemynear,facing))
trigger4= p2statetype=A && p2movetype=H && enemynear,hitfall && p2bodydist y<-60 && p2bodydist x>28
trigger5= p2statetype!=A && !enemy,numproj && p2bodydist x>=160 && enemynear,time>=30 && random<500
trigger6= p2stateno = 2402 && ctrl&& p2bodydist x>=30

[State -3,dash]
Type = ChangeState
value = 19
Triggerall = var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=S
triggerall= ctrl && (stateno!=[100,105])
trigger1= (enemynear,movetype!=A) && !inguarddist && random<50
;---------------------------------------------------------------------------
;前緊急回避
[State -1, T S]
type = ChangeState
value=700
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && p2movetype!=H
triggerall= (ctrl || stateno=99 || (stateno=[120,131]))
;飛び道具ガード準備状態から回避
trigger1= enemy,numproj && inguarddist && p2bodydist x=[230,300]
trigger1= enemynear,time>=5 || enemynear,hitdefattr=SCA,AP || enemy,numproj || enemy,numhelper
trigger1= random<100*((1+(p2bodydist x>=160)*4)+((enemynear,vel x>0)*2)+((enemynear,hitdefattr=SCA,AP)*3)) ||(life<10)
;回避で後に回る
trigger2= (stateno=[99,101])&& inguarddist && random<400&&p2bodydist x =[20,(40+(var(45)*20))] 
trigger2= enemy,numproj || enemy,numhelper||enemynear,time>=5 || enemynear,hitdefattr=SCA,AP,AA
;攻撃をかわす
trigger3= enemynear,movetype=A  && inguarddist && p2bodydist x=[-10,(60+(var(45)*20))]
trigger3= random<100&&var(45)>=3&&(enemynear,time<=5)
;相手の空中(飛び込み)攻撃に反応
trigger4= enemynear,movetype=A  && inguarddist && p2bodydist x=[30,(120+(var(45)*20))]
trigger4= enemynear,vel x > 0
trigger4= (enemynear,hitdefattr=SCA,AA)&&p2statetype=A
trigger4= enemynear,time<=5 || enemynear,hitdefattr=SCA,SA,HA 
trigger4= random<100*(1+((enemynear,hitdefattr=SCA,SA,HA)*4)+(enemynear,time<=5)+((backEdgeBodyDist < 20)*4))
;とりあえず前
trigger5=!enemy,numproj || !enemy,numhelper
trigger5= enemynear,movetype=A  && inguarddist && (p2bodydist x+EnemyNear,vel x*10=[70,150])&&enemynear,facing=1
trigger5= enemynear,time>=5 || enemynear,hitdefattr=SCA,SA,HA 
trigger5= random<100*(1+((p2statetype= A)*4)+((enemynear,hitdefattr=SCA,HA)*2)+((enemynear,hitdefattr=SCA,SA)*1))

;---------------------------------------------------------------------------
;後緊急回避
[State -1, T S]
type = ChangeState
value=710
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A && p2movetype!=H
triggerall= (ctrl || stateno=99 || (stateno=[120,131]))
;とりあえずバック
trigger1=!enemy,numproj || !enemy,numhelper
trigger1= enemynear,movetype=A  && inguarddist && (p2bodydist x+EnemyNear,vel x*10=[20,70])&&enemynear,facing=1
trigger1= enemynear,time>=5 || enemynear,hitdefattr=SCA,SA,HA 
trigger1= backEdgeBodyDist > 60
trigger1= random<100*(1+((p2statetype= A)*4)+((enemynear,hitdefattr=SCA,HA)*2)+((enemynear,hitdefattr=SCA,SA)*1))
;背後を取られたとき
trigger2= p2statetype=A && p2movetype!=A 
trigger2= (p2bodydist x=[(-60-var(45)*20),10]) && (p2bodydist y=[-140,-75])
trigger2= enemynear,vel x>=0 && facing!=enemynear,facing && random<200
;とりあえずバック２
trigger3= enemynear,movetype=A && !enemy,numproj && inguarddist && p2bodydist x=[-10,60]
trigger3= random<100&&backEdgeBodyDist > 60&&var(45)>=2
;低速の飛び道具とともに攻めてきた場合下がる
trigger4= (stateno=[99,101]) && inguarddist && enemy,numproj && random<400&&p2bodydist x =[40,70+((enemynear,vel x>2)*120)] 
;相手の空中(飛び込み)攻撃に反応
trigger5= enemynear,movetype=A  && inguarddist && p2bodydist x=[30,(120+(var(45)*20))]
trigger5= enemynear,vel x > 0
trigger5= (enemynear,hitdefattr=SCA,AA)&&p2statetype=A
trigger5= enemynear,time>=5 || enemynear,hitdefattr=SCA,SA,HA 
trigger5= random<100*(1+((enemynear,hitdefattr=SCA,SA,HA)*4)+(enemynear,time>=10)+((backEdgeBodyDist > 60)*4))


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

[State 215, 5]
type = ChangeState
value = 98
triggerall = var(59)>=1 && numenemy
triggerall = p2life != 0
triggerall = statetype != A
triggerall = random <= 800
triggerall = p2movetype != H 
triggerall = p2statetype = C 
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno != 1706
triggerall = p2bodydist X <= 40 && p2bodydist X > 0
trigger1 = ctrl


[State test];投げ対策
Type = ChangeState
Value = 98
TriggerAll = var(59)>=1 && numenemy
TriggerAll = StateType != A
TriggerAll = EnemyNear,HitDefAttr = SCA,NT,ST,HT 
TriggerAll = Random <= 700
Trigger1 = Ctrl



;対投げ用バックステップ
[State test]
Type = ChangeState
Value = 105 
TriggerAll = var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2 && (ctrl || (stateno=99))
TriggerAll = EnemyNear,HitDefAttr = SCA,NT,ST,HT 
triggerall= p2stateno != 1706
TriggerAll = backEdgeBodyDist > 50
Trigger1 = Random <= 700
trigger2= (enemynear,movetype=A) && backedgedist>=40 && (p2bodydist x=[70,120]) && (enemynear,vel x) && p2statetype!=A
trigger2= random<200

[State test]
Type = ChangeState
value=105
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2 && (ctrl || (stateno=99))
triggerall= facing!=enemynear,facing&&p2movetype !=I 
triggerall= enemynear,vel x<=0
triggerall= p2stateno != 1706
trigger1= (enemynear,movetype=A) && backedgedist>=80 && (p2bodydist x=[80,120]) && (enemynear,vel x) && p2statetype!=A
trigger1= random<150
trigger2= (p2bodydist x=[-10-var(45)*5,120]) && backedgebodydist>=60 
trigger2= p2statetype=L 
trigger2= !inguarddist && !enemy,numproj && p2movetype!=A && (p2movetype!=H || p2statetype=L)
trigger2= random<50+600*(!enemynear,ctrl)
;リバサ用
trigger3= p2bodydist x<=40 && (p2stateno=[5200,5210]) && random<500
trigger4= (p2bodydist x=[-10,80]) && backedgebodydist>=80
trigger4= enemynear,stateno=5120 && enemynear,animtime=-3 && random<500


;------------------------------------------------------------------------------
;弱ﾅｷﾞｯ
[State -1, L BO]
type = ChangeState
value = 1300
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
triggerall =var(45)>=3
triggerall =pos y < (-20-((p2statetype != A)*50))
;相手の空中攻撃に対して
trigger1 =ctrl&&p2bodydist x =[-20,90]
trigger1= p2statetype= A&&p2movetype= A&&enemynear,time >=7
trigger1= inguarddist
trigger1= random<200*(1+((enemynear,hitdefattr=SCA,HA,HP,HT)*5)+((enemynear,hitdefattr=SCA,SA,SP,ST)*3)+((frontEdgeBodyDist > 180)*2))
;飛び道具回避
trigger2 =ctrl&&p2bodydist x =[-20,90]
trigger2= p2movetype= A&&enemynear,time <=7
trigger2= inguarddist&&pos y <= -70 
trigger2= random<100*(1+((enemynear,hitdefattr=SCA,HA,HP,HT)*5)+((enemynear,hitdefattr=SCA,SA,SP,ST)*3)+((frontEdgeBodyDist > 180)*2))
trigger2= !enemy,numproj || !enemy,numhelper
;空中攻撃キャンセル
trigger3 = movecontact&&random <=200*var(45)
trigger3 = p2statetype = A&&p2dist Y >= -50&&frontEdgeBodyDist > 50
trigger3 = hitdefattr=A,NA
;強ﾅｷﾞｯ
[State -1, S BO]
type = ChangeState
value = 1350
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
triggerall =var(45)>=3
triggerall =pos y < (-20-((p2statetype != A)*50))
;相手の空中攻撃に対して
trigger1 =ctrl&&p2bodydist x =[-20,130]
trigger1= p2statetype= A&&p2movetype= A&&enemynear,time >=7
trigger1= inguarddist
trigger1= random<100*(1+((enemynear,hitdefattr=SCA,HA,HP,HT)*5)+((enemynear,hitdefattr=SCA,SA,SP,ST)*3)+((frontEdgeBodyDist > 180)*2))
;飛び道具回避
trigger2 =ctrl&&p2bodydist x =[-20,120]
trigger2= p2movetype= A&&enemynear,time <=7
trigger2= inguarddist&&pos y <= -70 
trigger2= random<200*(1+((enemynear,hitdefattr=SCA,HA,HP,HT)*5)+((enemynear,hitdefattr=SCA,SA,SP,ST)*3)+((frontEdgeBodyDist > 180)*2))
trigger2= !enemy,numproj || !enemy,numhelper
;攻撃回避
trigger3 =ctrl&&p2bodydist x =[-20,50]
trigger3= p2movetype= A&&enemynear,time >=7
trigger3= inguarddist
trigger3= random<100*(1+((enemynear,hitdefattr=SCA,HA,HP,HT)*5)+((enemynear,hitdefattr=SCA,SA,SP,ST)*3)+((frontEdgeBodyDist > 180)*2))
;接近されたとき
trigger3 =ctrl&&p2bodydist x =[-30,30]
trigger3= inguarddist
trigger3= pos y < -80&&frontEdgeBodyDist > 150
trigger3= random<400
;超必回避
trigger4 =ctrl&&(p2bodydist x =[-20,60])&&facing = 1
trigger4= p2movetype= A&&enemynear,vel x > 0
trigger4= random<800&&(enemynear,hitdefattr=SCA,HA,HP,HT)

[state -3]
type = ChangeState
value = 130
triggerall = var(59)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl
triggerall = statetype != A
trigger1 = enemynear,numproj
trigger2 = enemynear,HitDefAttr = SA, NA,SA,HA
trigger3 = prevstateno = 5120 && p2movetype = A
trigger3 = enemynear,HitDefAttr = SA, NA,SA,HA
[state -3]
type = ChangeState
value = 131
triggerall = var(59)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl
triggerall = statetype != A
trigger1 = enemynear,numproj
trigger2 = enemynear,HitDefAttr = C, NA,SA,HA
trigger3 = prevstateno = 5120 && p2movetype = A
trigger3 = enemynear,HitDefAttr = C, NA,SA,HA

;------------------------------------------------------------------------------
;ハングドマン
[State -1, L CB]
type = ChangeState
value = 1700
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = ctrl
triggerall = !InGuardDist
triggerall = p2bodydist x+enemynear,vel x*5= [0,35]
trigger1 = random > 300||var(45)<3
trigger1 = p2movetype != H&&p2statetype != L
trigger1 = p2statetype = S||p2statetype = C
trigger1 = enemynear,prevstateno!=5120
;------------------------------------------------------------------------------
;カーネイジブレイド
[State -1, L CB]
type = ChangeState
value = 2700
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = p2life > 0
triggerall = ctrl
triggerall = var(45) >= 2
;シリンダーハート準備兼割り込み用
trigger1 = p2bodydist x+EnemyNear,vel x*5 <= 40 && p2movetype =A&& p2statetype !=A
trigger1 = EnemyNear,hitdefattr=SC,HA,SA&&enemynear,time = [5,30]
trigger1 = enemynear,vel y < 0&&p2life<400
trigger1 = var(45) <= 3
trigger1 = life<250
;割り込み用
trigger2 = p2bodydist x+EnemyNear,vel x*5 <= 40 && p2movetype =A&& p2statetype !=A
trigger2 = EnemyNear,hitdefattr=SC,HA,SA&&enemynear,time = [5,30]
trigger2 = enemynear,vel y < 0
trigger2 = var(45) >= 3
trigger2 = random>300
;ブロッキング対策
trigger3 = var(45) >= 2
trigger3= (stateno=[200,499]) && movehit 
trigger3 = p2stateno !=[5000,5210]
trigger3 =p2movetype = A &&p2bodydist x+EnemyNear,vel x*5 <= 40
trigger3 = enemynear,hitdefattr=SAC,HA,HP,HT
;主にめくり対策
trigger4 = var(45) >= 4&&random>300
trigger4 = p2bodydist x+EnemyNear,vel x*5 <= 40 && p2movetype =A&& p2statetype =A
trigger4 = enemynear,hitdefattr = SCA,HA,SA

;------------------------------------------------------------------------------
;デフレクションビースト
[State -1, MD]
type = ChangeState
value = 2100
triggerall= var(59)>=1 && numenemy
triggerall = var(45) >= 2&& frontedgebodydist>=120
triggerall = (life -p2life > 200)||(var(47))
triggerall = p2stateno!=[120,160]
trigger1 = stateno = 325 && AnimElemtime(5) >= 2 && AnimElemtime(7) < 0 && movehit
trigger2 = stateno=1400&& time>10 &&prevstateno=[600,650] 
trigger2 = p2movetype = H
trigger3 = stateno=1450&& time>10 &&prevstateno=[600,650] 
trigger3 = p2movetype = H
trigger4 = var(47)&&statetype = A && pos y <= -80 
trigger4 = p2bodydist x+EnemyNear,vel x*5 =[70,150]
trigger4 = ctrl
;シリンダーハート準備兼割り込み用
trigger5 = var(47)&&statetype = A && pos y <= -80 
trigger5 = p2bodydist x+EnemyNear,vel x*5 =[70,150]
trigger5 = ctrl&&p2life<400
trigger5 = var(45) <= 3
trigger5 = life<250

;ジグ・ソー
[State -1, L AT]
type = ChangeState
value = 2600
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = numhelper(2600)=0
triggerall = p2life > 0
triggerall = Enemy,NumHelper = 0 || Enemy,NumProj = 0
triggerall = var(45) >= 2
;優勢時
trigger1 = enemynear,vel x <= 0
trigger1 = var(45) >= 3
trigger1 =var(46) <= 150||life>500
trigger1 =p2life>150
trigger1 = ctrl 
trigger1 = p2bodydist x>= 160
trigger1 = !inguarddist
trigger1 = random < 50*(1+((p2statetype != A)*2)+((enemynear,hitdefattr!=SCA,AP)*2)+((p2bodydist x>= 200)*3))
;シリンダーハート時
trigger2 = ctrl 
trigger2 = p2bodydist x>= 140
trigger2 = var(47)
trigger2 = !inguarddist
trigger2 = random < 100*(1+((p2statetype != A)*2)+((enemynear,hitdefattr!=SCA,AP)*2)+((p2bodydist x>= 200)*2))
;シリンダーハート準備
trigger4 = ctrl 
trigger4 = !var(47)
trigger4 = var(45) <= 3
trigger4 = p2bodydist x>= 140
trigger4 = !inguarddist&&life<250&&var(45)<4&&p2life<400
;------------------------------------------------------------------------------
;弱クロー
[State -1, L CB]
type = ChangeState
value = 1100
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno != 5101
trigger1 = stateno = 230&& p2bodydist x <= 50 
trigger1 = movecontact&& random <= 200
trigger1 = p2statetype =A&&p2dist y < -30
trigger2 = ctrl&& p2bodydist x +enemynear,vel x*5= [50+(p2movetype = A)*30,90]
trigger2 = random <= 100 &&p2statetype =A&&p2dist y <-40&&p2movetype != A
;------------------------------------------------------------------------------
;強クロー
[State -1, S CB]
type = ChangeState
value = 1150
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno != 5101
triggerall = prevstateno != [1100,1150]
triggerall = p2statetype != C
trigger1 = p2bodydist x <= 40 
trigger1 = random <= 700 && FrontEdgeBodyDist > 40
trigger1 = movehit 
trigger1 = stateno = 410||stateno = 440||stateno = 240||stateno = 210
trigger2 = p2bodydist x +enemynear,vel x*5<= 70
trigger2 = random <= 100 && p2statetype = A&& p2dist y = [-20,-100]
trigger2 = enemynear,vel y > -6
trigger2 = movehit 
trigger2 = stateno = 410||stateno = 440||stateno = 240||stateno = 210
;割り込み用
trigger3 =var(45)>=3
trigger3 = ctrl&& p2bodydist x = [0,60]
trigger3 = enemynear,time>9&&ctrl
trigger3 = random <= 100*(1+(life<200)*2+(life<500)*2+(var(45)=5)*3) &&p2dist y >-50&&p2movetype = A
;主にめくり対策
trigger4 = var(45) >= 3&&random>300&&ctrl
trigger4 = p2bodydist x+EnemyNear,vel x*5 <= 40 && p2movetype =A&& p2statetype =A
trigger4 = enemynear,hitdefattr = SCA,NA

;対ブロッキング
[State -1, kurok]
type = ChangeState
value = 1150
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = stateno != 1150
trigger1 = var(45) >= 2
trigger1= (stateno=[200,499]) && movehit 
trigger1 = p2stateno !=[5000,5210]
trigger1 =p2movetype = A &&p2bodydist x+EnemyNear,vel x*5 <= 40
;------------------------------------------------------------------------------
;弱ブラッドメア
[State -1, L AT]
type = ChangeState
value = 1000
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = numprojID(1000) = 0
triggerall = p2stateno != 1706
;牽制 
trigger1 = stateno = 230&&var(45) <=2
trigger1 = movehit&& p2bodydist x = [0,50]
;牽制 
trigger2 = var(45) <=2&&ctrl&&random < 200&&p2statetype != A
trigger2 = p2bodydist x = [20+((p2statetype=A)*40),80] 
;牽制 
trigger3 = var(45) <=4&&var(45) >=3&&ctrl&&random < 300&&p2statetype != A
trigger3 = p2bodydist x = [60+((p2statetype=A)*60),120]
;牽制  
trigger4 = var(45) =5&&ctrl&&random < 400&&p2statetype != A
trigger4 = p2bodydist x = [90+((p2statetype=A)*90),160]
;連携各種  
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 215 && movehit && hitcount = 2
trigger7 = stateno = 215 && moveguarded 
;追撃クローではまった場合
trigger8 = backEdgeBodyDist < 30 
trigger8 =(p2bodydist x = [-30,30])
trigger8 = ctrl&&p2movetype = H&&enemynear,ctrl=0
;
trigger9 = var(45) <=1&&ctrl&&random < 100&&p2statetype != A
trigger9 = p2bodydist x >= 160&&p2movetype =I&&power<1000
trigger9 = Enemy,NumHelper = 0 || Enemy,NumProj = 0
;牽制 
trigger10 = stateno = 230&&var(45) =[3,4]
trigger10 = movehit&& p2bodydist x = [0,100]
;牽制 
trigger11 = stateno = 230&&var(45) =5
trigger11 = movehit&& p2bodydist x = [0,150]
;強ブラッドメア
[State -1, S AT]
type = null;ChangeState
value = 1050
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
triggerall = numprojID(1000) = 0
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact
trigger8 = stateno = 440 && movecontact
trigger9 = stateno = 315 && movecontact
trigger10 =stateno = 200 && movecontact
trigger11 =stateno = 210 && movecontact

;------------------------------------------------------------------------------
;弱ミニッツスパイク
[State -1, L MS]
type = ChangeState
value = 1200
triggerall= var(59)>=1 && numenemy
triggerall = p2stateno != 5101
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist y>= -30
trigger1 = random <= 50&&p2bodydist x+enemy,vel x*5<= 110&&p2bodydist x+enemy,vel x*5>= 90
trigger1 = p2movetype != A
trigger1 = random < 100*var(45)
trigger2 = stateno = 320 && movehit

;空中弱ミニッツスパイク
[State -1, A L MS]
type = ChangeState
value = 1206
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
triggerall = p2stateno != 5101
trigger1 = movehit && stateno = [600,640]
trigger1 =p2statetype = A
trigger2 = movehit && stateno = 320
trigger3 = ctrl
trigger3 = random < 50*var(45)
trigger3 = p2statetype = A&&p2dist y= [-30,10]
trigger3 = p2bodydist x-enemy,vel x*5= [60,110]

;強ミニッツスパイク
[State -1, S MS]
type = ChangeState
value = 1250
triggerall= var(59)>=1 && numenemy
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = random < 50*var(45)
trigger1 = p2bodydist y>= -30
trigger1 = p2stateno != 5101
trigger1 = random <= 250&&p2bodydist x-enemy,vel x*5= [120,230]
trigger1 = p2movetype != A

;空中強ミニッツスパイク
[State -1, A S MS]
type = ChangeState
value = 1256
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
trigger1 = ctrl
trigger1 = p2stateno != 5101
trigger1 = movecontact && stateno = 610
trigger1 = p2bodydist y > 80&&p2bodydist x <= 5 && FrontEdgeBodyDist > 150
trigger2 = ctrl
trigger2 = random < 50*var(45)
trigger2 = p2statetype = A&&p2bodydist y<= 30&&p2bodydist y>= 5
trigger2 = random <= 50&&p2bodydist x-enemy,vel x*5<= 110&&p2bodydist x-enemy,vel x*5>= 90
------------------------------------------------------------------
;弱ハリアー
[State -1, L AirT]
type = ChangeState
value = 1400
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
trigger1 = ctrl
trigger1 = random < 200
trigger1 = p2bodydist x >= 50&&p2bodydist x <= 100
trigger1 = p2dist y  >= -50
trigger1 =backEdgeBodyDist > 50
trigger1 = ctrl
trigger2 = stateno = [600,640]
trigger2 = movecontact&&random <=200*var(45)
trigger2 =backEdgeBodyDist > 50
trigger2 = p2statetype != A

;強ハリアー
[State -1, S AirT]
type = ChangeState
value = 1450
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
triggerall =var(45)>=3
trigger1 = random < 200
trigger1 = p2bodydist x >= 50&&p2bodydist x <= 100
trigger1 = p2dist y >= -50
trigger1 =backEdgeBodyDist > 50
trigger1 = ctrl
trigger2 = hitdefattr=A,NA && movecontact&&random <=200*var(45)
trigger2 = p2statetype != A

[State 215, 5]
type = ChangeState
value = 610
triggerall = var(59)>=1 && numenemy
triggerall = statetype = A
triggerall = p2life != 0
triggerall =p2stateno != 2485
triggerall =Vel y >= 2 
trigger1 = p2bodydist X +EnemyNear,vel x*5= [0,-20] 
trigger1 = p2dist y = [-20,50]
trigger1 = ctrl  && p2bodydist X < 0
trigger2 = random <= 50 
trigger2 = p2bodydist X +EnemyNear,vel x*5<= 20 && p2bodydist X > 15
trigger2 = ctrl
trigger3 = p2bodydist X +Enemynear,vel x*10<= 80 
trigger3 = vel x >=3
trigger3 = Enemynear,vel Y >= -5 
trigger3 = ctrl

[State 215, 5]
type = ChangeState
triggerall = var(59)>=1 && numenemy
triggerall = statetype = A
triggerall = p2life != 0
trigger1 = random <= 50 
trigger1 = p2bodydist X +EnemyNear,vel x*5<= 20 && p2bodydist X > 15
trigger1 = ctrl
trigger2 = p2bodydist X +Enemynear,vel x*10<= 70 &&p2dist y = [30,10]
trigger2 = vel x >=3
trigger2 = Enemynear,vel Y >= -5 
trigger2 = ctrl
value = 640
;---------------------------------------------------------------------------
;受身
[State -1]
type = ChangeState
value = 52000
triggerall= var(59)>=1 && numenemy
triggerall = alive = 1
triggerall = canrecover=1
trigger1 = stateno = 5050
trigger1 = pos y > -30

;------------------------------------------------------------------------------
;ふっとばし
[State -1, Throw]
type = null;ChangeState
value = 300
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = ctrl
trigger2 = power >= 1000
trigger2 = stateno = [150,151]

;------------------------------------------------------------------------------
;空中ふっとばし
[State -1, CD]
type = null;ChangeState
value = 650
triggerall= var(59)>=1 && numenemy
triggerall = statetype = A
trigger1 = ctrl

;------------------------------------------------------------------------------
;P投げ
[State -1, Throw]
type = null;ChangeState
value = 800
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = stateno != 99
trigger1 = p2bodydist X < 15
trigger1 = p2statetype != A && p2movetype != H
trigger1 = ctrl

;------------------------------------------------------------------------------
;K投げ
[State -1, Throw]
type = null;ChangeState
value = 830
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = stateno != 99
trigger1 = p2bodydist X < 15
trigger1 = p2statetype != A && p2movetype != H
trigger1 = ctrl

;------------------------------------------------------------------------------
;シュートミドル
[State -1, SM]
type = null;ChangeState
value = 310
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 245 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 410 && movecontact
trigger7 = stateno = 430 && movecontact

;ニーアサルト
[State -1, NA]
type = ChangeState
value = 320
triggerall= var(59)>=1 && numenemy
triggerall = statetype != A
trigger1 = p2statetype = C && p2bodydist x<= 40 
trigger1 = random < 100 &&p2movetype != A
trigger1 = ctrl && prevstateno = 235 && moveguarded
;------------------------------------------------------------------------------

;==============================================================================
;近距離立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 205
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = p2bodydist X < 18
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno = 5050
triggerall = p2stateno != 1706
trigger1 = ctrl&& !InGuardDist
trigger1 = random > 700
trigger2 = movecontact && stateno = 205

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

;しゃがみ弱パンチ
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall= var(59)>=1 && numenemy
triggerall= p2bodydist x = [0,30]
trigger1 = stateno = 430 && time >= 4 && movecontact
trigger2 = stateno = 400 && time >= 8 

;しゃがみ強パンチ
[State -1, Crouching Strong Punch]
type = null;ChangeState
value = 410
triggerall= var(59)>=1 && numenemy
trigger1 = statetype = C
trigger1 = ctrl

;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(59)>=1 && numenemy
triggerall = p2life != 0
triggerall = statetype != A
triggerall = p2stateno != 5050
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120
triggerall = p2stateno != 5110 
triggerall = p2stateno != 5101
triggerall = p2statetype != A 
trigger1 = ctrl &&p2bodydist X+EnemyNear,vel x*5<= 65
trigger1 = prevstateno != 430&&random >=600
trigger2 = var(45) <=1&&ctrl&&random < 200&&p2statetype != A
trigger2 = p2bodydist x >= 160&&power<1000
trigger2 = !inguarddist
trigger2 = ctrl

;しゃがみ強キック
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall= var(59)>=1 && numenemy
triggerall = power >= 1000
triggerall = movehit && stateno = 430
trigger1 = var(45) <= 3 &&p2bodydist x <= 70&&p2bodydist x >= 20



;遠距離立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = p2bodydist X = [40,60]
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno != 1706
triggerall = p2statetype = A
trigger1 = ctrl
trigger1 = enemynear,time<=7
trigger1 = random > 800
trigger1 =p2dist y =[-10,-80]

;近距離立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 215
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = p2bodydist X = [0,20]
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno != 1706
triggerall = p2statetype = S
triggerall = p2statetype != A && p2movetype != A
trigger1 = ctrl
trigger1 = random > 400


;遠距離立ち強パンチ
[State -1, Stand Strong Punch]
type = null;ChangeState
value = 210
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
trigger1 = ctrl

;------------------------------------------------------------------------------
;近距離立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 235
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = p2bodydist X < 20
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno = 5050
triggerall = p2stateno != 1706
trigger1 = ctrl
trigger1 = p2statetype = S
trigger1 = random > 700
trigger1 = p2bodydist X+enemynear,vel x * 5< 20

;遠距離立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = p2bodydist X+enemynear,vel x * 5< 60
triggerall = p2bodydist X+enemynear,vel x * 5 > 30
triggerall = p2stateno != 5050 
triggerall = p2stateno != 5060 
triggerall = p2stateno != 5120 
triggerall = p2stateno != 5110 
triggerall = p2stateno != 1706
triggerall = p2dist y > -50
trigger1 = ctrl
trigger1 = random > 800
trigger2 = movecontact && stateno = 230
trigger3 = movecontact && stateno = 235  

;近距離立ち強キック
[State -1, Standing Strong Kick]
type = null;ChangeState
value = 245
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
triggerall = p2statetype = S
triggerall = p2bodydist X < 20
trigger1 = ctrl

;遠距離立ち強キック
[State -1, Standing Strong Kick]
type = null;ChangeState
value = 240
triggerall= var(59)>=1 && numenemy
triggerall = statetype = S
trigger1 = ctrl

;------------------------------------------------------------------------------
;挑発
[State -1, Taunt]
type = null;ChangeState
value = 195
triggerall= var(59)>=1 && numenemy
triggerall = var(20) = 0
trigger1 = statetype != A
trigger1 = ctrl

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



;ジャンプ弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall= var(59)>=1 && numenemy
triggerall = stateno != 105
trigger1 = p2stateno != 2485
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = p2statetype = A && vel y <= 0
trigger1 = p2bodydist x +EnemyNear,vel x*2<= 20 
;------------------------------------------------------------------------------
;ジャンプ弱キック
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall= var(59)>=1 && numenemy
triggerall = stateno != 105
trigger1 = p2stateno != 2485
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = p2statetype = A 
trigger1 = p2bodydist x -EnemyNear,vel x*2<= 30 
trigger1 = p2dist y = [50,-20] 

