;==========================================================================
;AI
;==========================================================================

[command]
name="fwd"
command=F
time=1
[command]
name="back"
command=B
time=1
[command]
name="up"
command=U
time=1
[command]
name="down"
command=D
time=1
;AI
[Command]
name = "AI_1"
command = ~F, UF, U, F, UF, U, x
time = 1

[Command]
name = "AI_2"
command = ~F, UF, U, F, UF, U, y
time = 1

[Command]
name = "AI_3"
command = ~F, UF, U, F, UF, U, z
time = 1

[Command]
name = "AI_4"
command = ~F, UF, U, F, UF, U, a
time = 1

[Command]
name = "AI_5"
command = ~F, UF, U, F, UF, U, b
time = 1

[Command]
name = "AI_6"
command = ~F, UF, U, F, UF, U, c
time = 1

[Command]
name = "AI_7"
command = ~F, UF, U, F, UF, U, start
time = 1

[Command]
name = "AI_8"
command = ~F, UF, U, F, UF, U, x, x
time = 1

[Command]
name = "AI_9"
command = ~F, UF, U, F, UF, U, x, y
time = 1

[Command]
name = "AI_10"
command = ~F, UF, U, F, UF, U, x, z
time = 1

[Command]
name = "AI_11"
command = ~F, UF, U, F, UF, U, x, a
time = 1

[Command]
name = "AI_12"
command = ~F, UF, U, F, UF, U, x, b
time = 1

[Command]
name = "AI_13"
command = ~F, UF, U, F, UF, U, x, c
time = 1

[Command]
name = "AI_14"
command = ~F, UF, U, F, UF, U, x, start
time = 1

[Command]
name = "AI_15"
command = ~F, UF, U, F, UF, U, y, x
time = 1

[Command]
name = "AI_16"
command = ~F, UF, U, F, UF, U, y, y
time = 1

[Command]
name = "AI_17"
command = ~F, UF, U, F, UF, U, y, z
time = 1

[Command]
name = "AI_18"
command = ~F, UF, U, F, UF, U, y, a
time = 1

[Command]
name = "AI_19"
command = ~F, UF, U, F, UF, U, y, b
time = 1

[Command]
name = "AI_20"
command = ~F, UF, U, F, UF, U, y, c
time = 1

[Command]
name = "AI_21"
command = ~F, UF, U, F, UF, U, y, start
time = 1

[Command]
name = "AI_22"
command = ~F, UF, U, F, UF, U, z, x
time = 1

[Command]
name = "AI_23"
command = ~F, UF, U, F, UF, U, z, y
time = 1

[Command]
name = "AI_24"
command = ~F, UF, U, F, UF, U, z, z
time = 1

[Command]
name = "AI_25"
command = ~F, UF, U, F, UF, U, z, a
time = 1

[Command]
name = "AI_26"
command = ~F, UF, U, F, UF, U, z, b
time = 1

[Command]
name = "AI_27"
command = ~F, UF, U, F, UF, U, z, c
time = 1

[Command]
name = "AI_28"
command = ~F, UF, U, F, UF, U, z, start
time = 1

[Command]
name = "AI_29"
command = ~F, UF, U, F, UF, U, a, x
time = 1

[Command]
name = "AI_30"
command = ~F, UF, U, F, UF, U, a, y
time = 1

[Command]
name = "AI_31"
command = ~F, UF, U, F, UF, U, a, z
time = 1

[Command]
name = "AI_32"
command = ~F, UF, U, F, UF, U, a, a
time = 1

[Command]
name = "AI_33"
command = ~F, UF, U, F, UF, U, a, b
time = 1

[Command]
name = "AI_34"
command = ~F, UF, U, F, UF, U, a, c
time = 1

[Command]
name = "AI_35"
command = ~F, UF, U, F, UF, U, a, start
time = 1

[Command]
name = "AI_36"
command = ~F, UF, U, F, UF, U, a, a, a
time = 0

[Command]
name = "AI_37"
command = ~F, UF, U, F, UF, U, a, a, b
time = 0

[Command]
name = "AI_38"
command = ~F, UF, U, F, UF, U, a, a, c
time = 1

[Command]
name = "AI_39"
command = ~F, UF, U, F, UF, U, a, a, x
time = 1

[Command]
name = "AI_40"
command = ~F, UF, U, F, UF, U, a, a, y
time = 1

[Command]
name = "AI_41"
command = ~F, UF, U, F, UF, U, a, a, z
time = 1

[Command]
name = "AI_42"
command = ~F, UF, U, F, UF, U, a, b, a
time = 1

[Command]
name = "AI_43"
command = ~F, UF, U, F, UF, U, a, b, b
time = 1

[Command]
name = "AI_44"
command = ~F, UF, U, F, UF, U, a, b, c
time = 1

[Command]
name = "AI_45"
command = ~F, UF, U, F, UF, U, a, b, x
time = 1

[Command]
name = "AI_46"
command = ~F, UF, U, F, UF, U, a, b, y
time = 1

[Command]
name = "AI_47"
command = ~F, UF, U, F, UF, U, a, b, z
time = 1

[Command]
name = "AI_48"
command = ~F, UF, U, F, UF, U, a, c, a
time = 1

[Command]
name = "AI_49"
command = ~F, UF, U, F, UF, U, a, c, b
time = 1

[Command]
name = "AI_50"
command = ~F, UF, U, F, UF, U, a, c, c
time = 1

;==========================================================================
;コマンド関連ファイル
;==========================================================================
----------------------------------------
[Command]
name = "ナノマシン"
command = B, DB, D, DF, F, a
time = 45

[Command]
name = "5秒前"
command = B, DB, D, DF, F, b
time = 45

[Command]
name = "射手座の日"
command = B, DB, D, DF, F, c
time = 45

[Command]
name = "花火"
command = D, DF, F, a
time = 30

[Command]
name = "トナカイアタック"
command = D, DF, F, b
time = 30

[Command]
name = "椅子投げ"
command = D, DF, F, c
time = 30

[Command]
name = "ミステリアスボール（命名私）超スロー"
command = D, DB, B, a
time = 30

[Command]
name = "ミステリアスボール（命名私）ホップ"
command = D, DB, B, b
time = 30

[Command]
name = "ミステリアスボール（命名私）対空"
command = D, DB, B, c
time = 30

[Command]
name = "カウンター"
command = D, DB, B, x
time = 30

[Command]
name = "古泉"
command = D, D, a
time = 45

[Command]
name = "朝比奈先輩"
command = D, D, b
time = 45

[Command]
name = "長門"
command = D, D, x
time = 45

[Command]
name = "ハルヒコ"
command = D, D, c
time = 45

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

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

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = a+b
time = 1

[Command]
name = "ab"
command = a+b
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 = "fwd_x"
command = /F,x
time = 1

[Command]
name = "fwd_y"
command = /F,y
time = 1

[Command]
name = "downfwd_a"
command = /DF,a
time = 1

[Command]
name = "downfwd_b"
command = /DF,b
time = 1

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

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

[Command]
name = "back_b"
command = /B,b
time = 1

[Command]
name = "back_c"
command = /B,c
time = 1

[Command]
name = "down_a"
command = /$D,a
time = 1

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

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

[Command]
name = "down_z"
command = /$D,z
time = 1

[Command]
name = "fwd_ab"
command = /F, a+b
time = 1

[Command]
name = "back_ab"
command = /B, a+b
time = 1

;-| 攻撃ボタン押しっぱなし |-----------------------------------------------

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

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

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

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

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

[Command]
name = "hold_x"
command = /y
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


[Command]
name = "f_a"
command = F, a
time = 15

[Command]
name = "f_b"
command = F, b
time = 15

[Command]
name = "f_c"
command = F, c
time = 15

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


[State -3]
type = Varset
TriggerAll = Var(59) != 1
TriggerAll = RoundState = [1,2]
Trigger1 = Command = "AI_1"
Trigger2 = Command = "AI_2"
Trigger3 = Command = "AI_3"
Trigger4 = Command = "AI_4"
Trigger5 = Command = "AI_5"
Trigger6 = Command = "AI_6"
Trigger7 = Command = "AI_7"
Trigger8 = Command = "AI_8"
Trigger9 = Command = "AI_9"
Trigger10 = Command = "AI_10"
Trigger11 = Command = "AI_11"
Trigger12 = Command = "AI_12"
Trigger13 = Command = "AI_13"
Trigger14 = Command = "AI_14"
Trigger15 = Command = "AI_15"
Trigger16 = Command = "AI_16"
Trigger17 = Command = "AI_17"
Trigger18 = Command = "AI_18"
Trigger19 = Command = "AI_19"
Trigger20 = Command = "AI_20"
Trigger21 = Command = "AI_21"
Trigger22 = Command = "AI_22"
Trigger23 = Command = "AI_23"
Trigger24 = Command = "AI_24"
Trigger25 = Command = "AI_25"
Trigger26 = Command = "AI_26"
Trigger27 = Command = "AI_27"
Trigger28 = Command = "AI_28"
Trigger29 = Command = "AI_29"
Trigger30 = Command = "AI_30"
Trigger31 = Command = "AI_31"
Trigger32 = Command = "AI_32"
Trigger33 = Command = "AI_33"
Trigger34 = Command = "AI_34"
Trigger35 = Command = "AI_35"
Trigger36 = Command = "AI_36"
Trigger37 = Command = "AI_37"
Trigger38 = Command = "AI_38"
Trigger39 = Command = "AI_39"
Trigger40 = Command = "AI_40"
Trigger41 = Command = "AI_41"
Trigger42 = Command = "AI_42"
Trigger43 = Command = "AI_43"
Trigger44 = Command = "AI_44"
Trigger45 = Command = "AI_45"
Trigger46 = Command = "AI_46"
Trigger47 = Command = "AI_47"
Trigger48 = Command = "AI_48"
Trigger49 = Command = "AI_49"
Trigger50 = Command = "AI_50"
Trigger51 = Helper(10000),var(59)
;Trigger52 = 1;常時AIスイッチオン､AI観戦するにはこの行の先頭のセミコロンを消去
V = 59
Value = 1



[state -3,ガード] 
Type = ChangeState 
Value = 120
TriggerAll = Var(59) = 1
TriggerAll = Ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 21 || stateno = 105
;triggerall =  random >= 700
triggerall = StateNo != [120,155]
triggerall = enemynear,HitDefAttr != SC, NT,ST,HT
Trigger1 = InGuardDist || P2BodyDist X = [-40,28]
Trigger1 = EnemyNear,HitDefAttr = ,AA,AP
Trigger2 = Enemy,NumProj > 0
;Trigger3 = !InGuardDist
Trigger3 = InGuardDist 
Trigger3 = EnemyNear,HitDefAttr != ,NT,ST,HT 
Trigger3 = P2BodyDist X < 0
;Trigger4 = !InGuardDist 
Trigger4 = InGuardDist || EnemyNear,MoveType = A
Trigger4 = EnemyNear,Vel X > 0
Trigger4 = EnemyNear,HitDefAttr = SC,AA
Trigger5 = InGuardDist || (EnemyNear,MoveType = A && (EnemyNear,P2BodyDist X = [-10,120])) 
Trigger5 = Enemy,NumHelper > 0 
Trigger6 = InguardDist || P2MoveType = A
Trigger6 = P2BodyDist X >= 0
Trigger6 = EnemyNear,HitDefAttr = ,AA,AP
Trigger6 = random <= 500
Trigger7 = InGuardDist
Trigger7 = P2BodyDist X <= 60
Trigger7 = EnemyNear,Vel X >= 0
Trigger8 = InguardDist
Trigger8 = EnemyNear,MoveType = A || EnemyNear,MoveType = I
Trigger8 = Enemy,NumHelper > 0 || Enemy,NumProj > 0
Trigger9 = EnemyNear,NumProj > 0
Trigger10 = P2MoveType = A
Trigger10 = P2BodyDist X = [-10,30]
Trigger11 = InGuardDist


;屈みガード
[State -3]
type = ChangeState
value = 131
triggerall = Var(59) = 1
triggerall = stateType != A
;triggerall = stateType = C
;triggerall = inguarddist
triggerall = Pos y = 0
triggerall = p2bodydist x+(EnemyNear,vel X * 10) = [-100,150]
triggerall = random <= 200
triggerall = Ctrl || stateno = 21 ;|| stateno = 105
triggerall = StateNo != [120,155]
;triggerall = enemynear,HitDefAttr != SC, NT,ST,HT
trigger1 = statetype != A
trigger1 = inguarddist
Trigger2 = P2MoveType = A || inguarddist
trigger2 = P2BodyDist X = [-5,20]
Trigger3 = p2bodydist X = [-10,20]
trigger3 = inguarddist
Trigger4 = random <= 500
trigger4 = inguarddist
Trigger5 = random <= 10;PrevStateNo = 310 || PrevStateNo = 340
trigger6 = EnemyNear,HitDefAttr = C,AA,AP
Trigger6 = random <= 500
Trigger7 = EnemyNear,Time < 2
trigger7 = inguarddist
Trigger7 = random <= 500
Trigger8 = EnemyNear,HitDefAttr = C,AA || EnemyNear,HitDefAttr = ,AP
Trigger8 = p2bodydist X = [-10,60]
Trigger8 = random <= 500

[State -3, AI S Guard]
type = changestate
TriggerAll = Var(59) = 1
triggerall = RoundState = 2
triggerall = StateType != A
triggerall = P2StateType != C
triggerall = StateType != A
triggerall = (P2Movetype = A) || (Enemy, NumProj >= 1) || inguarddist
triggerall = Ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 21 || stateno = 105
triggerall = StateNo != [120,155]
triggerall = enemynear,HitDefAttr != SC, NT,ST,HT
trigger1 = P2BodyDist X <= 120+(EnemyNear,vel X	* 10)
trigger1 = random <= 100
Trigger2 = P2MoveType = A
Trigger2 = P2BodyDist X = [-10,30]
trigger2 = random <= 100
value = 130


;立ちガード
[State -3,g]
type = ChangeState
value = 130
triggerall = var(59) = 1
triggerall = stateType != A
triggerall = Ctrl || stateno = 21|| stateno = 20|| stateno = 100 || stateno = 105
triggerall =  P2BodyDist X <= 200
triggerall = StateNo != [120,155]
trigger1 = enemynear,hitdefattr != ,NT,ST,HT
trigger1 = p2Statetype = A 
trigger1 = inguarddist
trigger1 = random <= 100


[state -3, Guard]
type = ChangeState
value = 132
triggerall = var(59) = 1
triggerall = roundstate = 2
;triggerall = InGuardDist
;triggerall = (stateno != [4000,4029]) && (stateno != [4100,4129])
triggerall = ctrl || stateno = 50 || stateno = [40,41]
triggerall = statetype = A
triggerall = p2bodydist x = [-50,150]
triggerall = var(57) >= 4 || random <= (var(57)*100)
triggerall = StateNo != [120,155]
triggerall = pos y < 0
;triggerall = enemynear,HitDefAttr != SC, NT,ST,HT
trigger1 = enemynear,numproj > 0
trigger1 = InGuardDist
trigger2 = enemynear,HitDefAttr = ,AA,AP
trigger2 = p2bodydist x = [-50,50]
trigger3 = inguarddist
trigger3 = (p2bodydist x = [-100,100]) || var(57) >= 4
trigger3 = pos y < -5
trigger4 = enemynear,numproj > 0
trigger4 = p2bodydist x = [-100,150]

;ハルヒコ
[State -1]
type = ChangeState
value = 950
triggerall = power >= 3000
triggerall = var(59)
triggerall = p2statetype!=L
triggerall = p2statetype!=A
triggerall = p2movetype =A
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=2
trigger1 = random < 100


;5秒前
[State -1]
type = ChangeState
value = 450
triggerall = var(59)
triggerall = power >= 1500
triggerall = stateno = 310
triggerall = movehit
trigger1 = statetype != A
trigger2 = p2bodydist X <=10
trigger2 = p2statetype!=L
trigger2 =p2movetype = H
trigger2 = random < 100

;射手座の日
[State -1]
type = ChangeState
value = 900
triggerall = var(59)
triggerall = power >= 2000
triggerall = NumProj = 0
triggerall= p2statetype !=L
trigger1 = statetype != A
trigger1 = p2movetype= H
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=150
trigger1 = random < 100
trigger2 = ctrl = 1
trigger2 = statetype != A
trigger2= p2statetype =S
trigger2= p2statetype =C
trigger2 = P2life <= 400
trigger2 = p2bodydist X >=100
trigger3 = ctrl = 1
trigger3 = random < 100
trigger3 = statetype != A
trigger3 = P2life <= 100
trigger3 = p2bodydist X >=30


;ナノマシン
[State -1]
type = ChangeState
value = 960
triggerall = power >= 1000
triggerall = var(59)
triggerall = statetype != A
triggerall = p2movetype=H
trigger1 = EnemyNear,power >= 2000
trigger1 = P2life >= 500
trigger1 = P2life <= 700
trigger1 = life >= 400
trigger1 = ctrl = 1
trigger1 = p2bodydist X <=40
trigger1 = random < 500
trigger2 = EnemyNear,power >= 4000
trigger2 = P2life >= 200
trigger2 = P2life <= 700
trigger2 = life >= 400
trigger2 = ctrl = 1
trigger2 = p2bodydist X <=40


;カウンター
[State -1]
type = ChangeState
value = 490
triggerall = var(59)
triggerall = movetype!=H
triggerall = p2statetype!=L
triggerall = statetype!=A
triggerall = p2movetype=A
triggerall = movetype!=A
triggerall = EnemyNear,NumProj <=1
triggerall = power >= 1000
trigger1 = ctrl = 1
trigger1 = p2bodydist X <70
trigger1 = p2bodydist Y =0
trigger1 = random < 100
trigger2 = ctrl = 1
trigger2 = BackEdgeBodyDist < 10
trigger2 = p2bodydist X <=70
trigger2 = p2bodydist Y =0


;張り手
[State -1, Seoi Throw]
type = ChangeState
value = 800
triggerall = var(59)
triggerall = p2movetype!= H
triggerall = p2movetype!= A
triggerall = p2bodydist X <=3
triggerall = p2statetype!=A
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2statetype!=L
trigger1 = random < 80


;椅子投げ
[State -1]
type = ChangeState
value = 430
triggerall = var(59)
triggerall = NumProj < 1
trigger1 = NumHelper(930) != 1
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=100
trigger1 = random < 100

;ミステリアスボール（命名私）超スロー
[State -1]
type = ChangeState
value = 500
triggerall = var(59)
triggerall = NumProj < 1
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=50
trigger1 = p2bodydist X <=80
trigger1 = random < 100
trigger2 = statetype != A
trigger2 = ctrl = 1
trigger2 = NumHelper(930) = 1
trigger2 = p2bodydist X >=50
trigger2 = random < 50

;ミステリアスボール（命名私）ホップ
[State -1]
type = ChangeState
value = 510
triggerall = var(59)
triggerall = NumProj < 1
trigger1 = NumHelper(930) != 1
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=80
trigger1 = p2bodydist X <=150
trigger1 = random < 90


;古泉
[State -1]
type = ChangeState
value = 901
triggerall = var(59)
triggerall = NumHelper(910) = 0
triggerall = statetype != A
triggerall = movetype != H
triggerall = movetype != A
trigger1 = statetype = S || statetype = C
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=100
trigger1 = p2statetype!=L
trigger1 = random < 120
trigger2 = ctrl = 1
Trigger2 = Enemy,NumHelper < 1
trigger2 = p2bodydist X >=100
trigger2 = p2bodydist X <=120
trigger2 = random < 100

;長門
[State -1]
type = ChangeState
value = 903
triggerall = var(59)
triggerall = NumHelper(930) = 0
triggerall = movetype!=H
triggerall = statetype!=A
trigger1 = statetype = S || statetype = C
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=100
trigger1 = random < 100
trigger2 = ctrl = 1
trigger2 = p2bodydist X >=80
trigger2 = p2movetype =A
trigger2 = random < 100
trigger2 = statetype!=A
trigger3 = ctrl = 1
trigger3 = p2movetype=A
trigger3 = p2bodydist X >=70
trigger3 = random < 100

;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = Var(59) 
triggerall = movetype != H
triggerall = movetype != A
triggerall = p2statetype != L
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X <=60
trigger1 = p2bodydist X >=20
trigger1 = p2statetype!=L
trigger1 = p2statetype!=A
trigger1 = random < 200


;しゃがみ攻撃
[State -1]
type = ChangeState
value = 210
triggerall = var(59)
triggerall = p2statetype != L
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X <=15
trigger1 = p2statetype!=L
trigger1 = p2statetype!=A
trigger1 = random < 100
trigger2 = stateno = 210
trigger2 = movecontact
trigger2 = random < 10


;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = var(59)
triggerall = stateno = 210
triggerall = animtime = -5
trigger1 = statetype != A
trigger1 =p2movetype = H
trigger1 = p2bodydist X <=30
trigger2 = p2bodydist X <=30
trigger2 = p2statetype!=L
trigger2 = p2statetype!=A
trigger2 = stateno = 310
trigger2 = movecontact


;しゃがみ強攻撃
[State -1]
type = ChangeState
value = 410
triggerall = var(59)
triggerall = stateno = 310
triggerall = animtime = -20
triggerall = p2statetype!=L
trigger1 = statetype != A
trigger1 =p2movetype = H
trigger2 = stateno = 310
trigger2 = movecontact

;ミステリアスボール（命名私）対空
[State -1]
type = ChangeState
value = 520
triggerall = var(59)
triggerall = NumProj < 1
triggerall = p2statetype!=L
triggerall = p2statetype!=C
triggerall = p2statetype!=S
triggerall = p2statetype =A
triggerall = NumHelper(930) != 1
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=200
trigger1 = random < 100
trigger2 = statetype != A
trigger2 = ctrl = 1
trigger2 = p2bodydist X >=30
trigger2 = p2bodydist Y >=20
trigger2 = random < 90



;朝比奈先輩
[State -1]
type = ChangeState
value = 902
triggerall = var(59)
triggerall = NumHelper(920) = 0
trigger1 = statetype = S || statetype = C
trigger1 = ctrl = 1
trigger1 = p2bodydist X >=130
trigger1 = p2statetype =L
trigger1 = p2statetype!=A
trigger1 = random < 200


;弱パンチ
[State -1]
type = ChangeState
value = 200
triggerall = var(59)
triggerall = p2bodydist X <=10
triggerall = movetype != H
triggerall = movetype != A
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = ctrl =1
Trigger1 = NumHelper >= 1
trigger1 = p2statetype!=L
trigger1 = p2statetype!=A
trigger1 = p2movetype != A
trigger1 = random < 200
trigger2 = ctrl =1
trigger2 = stateno =200
trigger2 = animtime = -3
trigger2 = moveguarded
trigger3 = ctrl=1
Trigger3 = NumHelper >= 1
Trigger3 = Enemy,NumHelper < 1
trigger3 = p2statetype!=L
trigger3 = p2statetype!=A
trigger3 = random < 100

;中パンチ
[State -1]
type = ChangeState
value = 300
triggerall = var(59)
triggerall = stateno = 200
triggerall = animtime = -6
trigger1 = statetype != A
trigger1 =p2movetype = H
trigger2 = p2bodydist X <=5
trigger2 = p2statetype!=L
trigger2 = p2statetype!=A
trigger3 = stateno =300
trigger3 = movecontact


;強パンチ
[State -1]
type = ChangeState
value = 400
triggerall = var(59)
triggerall = stateno = 300
triggerall = animtime = -5
trigger1 = statetype != A
trigger1 = statetype = C
trigger1 =p2movetype = H
trigger1 =p2movetype != A
trigger1 = p2bodydist X <=20
trigger2 = statetype != A
trigger2 = statetype != S
trigger2 = statetype = C
trigger2 =p2movetype = H
trigger2 =p2movetype != A


;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = var(59)
triggerall = stateno = 300
triggerall = animtime = -5
trigger1 = p2bodydist X <=10
trigger1 = p2statetype!=L
trigger1 = p2statetype!=A
trigger1 = stateno =300
trigger1 = movehit


;しゃがみ強攻撃
[State -1]
type = ChangeState
value = 410
triggerall = var(59)
triggerall = stateno = 310
triggerall = animtime = -20
triggerall = p2statetype!=L
trigger1 = statetype != A
trigger1 =p2movetype = H
trigger2 = stateno = 310
trigger2 = movecontact

;強パンチ
[State -1]
type = ChangeState
value = 400
triggerall = var(59)
triggerall = stateno = 410
triggerall = animtime = 0
trigger1 = p2statetype!=L
trigger1 = statetype != A
trigger1 =p2movetype = H


;トナカイアタック
[State -1]
type = ChangeState
value = 340
triggerall = var(59)
triggerall = p2movetype != H
triggerall = stateno = 340
triggerall = animtime = 0
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X <=20
trigger1 = p2movetype = A
trigger1 = p2statetype!=L
trigger1 = p2statetype!=A
trigger1 = random < 100


;花火
[State -1]
type = ChangeState
value = 240
triggerall = var(59)
trigger1 = statetype != A
trigger1 = statetype != S
trigger1 = statetype != C
trigger1 = ctrl = 1
trigger1 = p2bodydist X <=10
trigger1 = p2statetype=L
trigger1 = p2movetype != A


;ジャンプ中攻撃
[State -1]
type = ChangeState
value = 320
triggerall = var(59)
triggerall = statetype = A
triggerall = vel Y >3
trigger1 = stateno = 220
trigger1 = statetype != A
trigger1 =p2movetype = H


;ジャンプ強攻撃
[State -1]
type = ChangeState
value = 420
triggerall = var(59)
triggerall = statetype = A
triggerall = vel Y >5
trigger1 = ctrl
trigger1 = p2bodydist X <=200
trigger1 = p2bodydist X >=80
trigger1 = p2statetype!=A
trigger2 = stateno = 320
trigger2 = statetype != A
trigger2 =p2movetype = H

[State -3];ダッシュ
type = ChangeState
value = 100
triggerall = var(59) = 1
triggerall = StateType != A
triggerall = stateno != 100
triggerall = P2statetype != L
triggerall = ctrl ;|| (stateno = 100 && animelemtime(2) >1)
Triggerall = !inguarddist
triggerall = p2stateno != [5099,5121]
triggerall = EnemyNear,NumProj <=1
;triggerall = var(57) >= 4 || Random < (var(57)*100) && time >= 15-(var(57)*5)
trigger1 = NumProj >=1
trigger1 = NumHelper(930) = 1
trigger1 = P2BodyDist X  >=20
trigger1 = Random <= 100
trigger2 = NumHelper(930) = 1
trigger2 = EnemyNear,stateno = [120,153]
trigger2 = P2BodyDist X  >=70
trigger2 = Random <= 50


[State -3];バックステップ
Type     = ChangeState
Triggerall = var(59) = 1
Triggerall = StateType != A
triggerall = backedgebodydist >= 60
Triggerall = Ctrl
Triggerall = PrevStateNo != [110,115]
triggerall = EnemyNear,NumProj <=3
Triggerall = p2movetype != H
;triggerall = Random < 100
Trigger1 = P2BodyDist X = [0,80]
trigger1 = Random >= 300
trigger1 = P2statetype = L
trigger2 = inguarddist
trigger2 = Random <= 10
Trigger3 = EnemyNear,vel X >0
Trigger3 = p2StateType = A
trigger3 = inguarddist
trigger3 = Random <= 10
Trigger4 = P2BodyDist X = [0,80]
trigger4 = Random <= 950
trigger4 = P2statetype = L || P2StateNo = 5120
trigger4 = power < 1500
trigger5 = !inguarddist
trigger5 = Random <= 10
Trigger5 = P2BodyDist X = [20,150]
Value    = 105

[State -3,立ち回り用　空中ダッシュ]
Type     = ChangeState
triggerall = RoundState = 2
Triggerall = var(59) >= 1
Triggerall = StateType = A
Triggerall = p2StateType != L
;Triggerall = P2MoveType != H
triggerall = pos y <= ifelse(vel y < 0,-40,-10)
Triggerall = ctrl
;triggerall = (stateno=[50,59])||(stateno=[5200,5210])||(stateno=241)
triggerall = stateno != 110 && stateno != 115 && PrevStateNo !=110
triggerall = Enemy,NumProj = 0
trigger1 = NumProj >=1
trigger1 = NumHelper(930) = 1
trigger1 = EnemyNear,stateno = [120,153]
trigger1 = P2BodyDist X  >= 60
trigger1 = Random <= 200
trigger2 = NumHelper(930) = 1
trigger2 = EnemyNear,stateno = [120,153]
trigger2 = P2BodyDist X  >= 160
trigger2 = Random <= 300

Value = 110

[State -3,立ち回り用　空中バックダッシュ]
Type     = ChangeState
Triggerall = var(59) = 1
Triggerall = StateType = A
Triggerall = EnemyNear,StateType != L
Triggerall = EnemyNear,MoveType = I
triggerall = backedgebodydist >= 60
Triggerall = Ctrl 
Triggerall = PrevStateNo != [110,115]
Triggerall = p2movetype != H
Triggerall = pos y < -15
triggerall = stateno != 115 && stateno != 110 && PrevStateNo !=115
;triggerall = Random < 300
Trigger1 = P2BodyDist X = [1,150]
trigger1 = Random <= 300
trigger2 = inguarddist
trigger2 = Random <= 300
Value    = 115

;===========================================================================
;コマンド実行部分（優先順位が高いものを先に表記）
;===========================================================================
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;前方ダッシュ
[State -1]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;バックステップ
[State -1]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl = 1
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;空中ダッシュ(air)
[State -1, Dash]
type = ChangeState
value = 110
trigger1 = command = "FF"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = stateno != 110
trigger1 = stateno != 115
;---------------------------------------------------------------------------
;空中バックダッシュ(air)
[State -1, Dash]
type = ChangeState
value = 115
trigger1 = command = "BB"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = stateno != 110
trigger1 = stateno != 115
;===================================================================
超必殺技
;==============================================================================
;---------------------------------------------------------------------
;-------------------------------------------------------------
;ナノマシン
[State -1]
type = ChangeState
value = 960
triggerall = power >= 1000
triggerall = command = "ナノマシン"
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 300
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 330
trigger5 = movecontact
trigger6 = stateno = 230
trigger6 = movecontact
trigger7 = stateno = 240
trigger7 = movecontact
trigger8 = stateno = 310
trigger8 = movecontact

;---------------------------------------------------------------
;-------------------------------------------------------------
;5秒前
[State -1]
type = ChangeState
value = 450
triggerall = power >= 1500
triggerall = command = "5秒前"
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 300
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 330
trigger5 = movecontact
trigger6 = stateno = 230
trigger6 = movecontact
trigger7 = stateno = 240
trigger7 = movecontact
trigger8 = stateno = 310
trigger8 = movecontact
trigger9 = stateno = 210
trigger9 = movecontact

;---------------------------------------------------------------
;-------------------------------------------------------------
;射手座の日
[State -1]
type = ChangeState
value = 900
triggerall = power >= 2000
triggerall = NumProj = 0
triggerall = command = "射手座の日"
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 300
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 330
trigger5 = movecontact
trigger6 = stateno = 230
trigger6 = movecontact
trigger7 = stateno = 240
trigger7 = movecontact

;---------------------------------------------------------------
;-------------------------------------------------------------
;ハルヒコ
[State -1]
type = ChangeState
value = 950
triggerall = power >= 3000
triggerall = command = "ハルヒコ"
triggerall = command != "holddown"
trigger1 = statetype = S || statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 300
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 310
trigger5 = movecontact
trigger6 = stateno = 330
trigger6 = movecontact
trigger7 = stateno = 240
trigger7 = movecontact

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

;===========================================================================
;　必殺技
;===========================================================================
;-------------------------------------------------------------
;花火
[State -1]
type = ChangeState
value = 240
triggerall = command = "花火"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 300
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 310
trigger5 = movecontact
trigger6 = stateno = 210
trigger6 = movecontact

;-----------------------------------------------------------------
;-------------------------------------------------------------
;トナカイアタック
[State -1]
type = ChangeState
value = 340
triggerall = command = "トナカイアタック"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 300
trigger3 = movecontact
trigger4 = stateno = 310
trigger4 = movecontact
trigger5 = stateno = 210
trigger5 = movecontact
trigger6 = stateno = 240
trigger6 = movecontact

;-----------------------------------------------------------------
;-------------------------------------------------------------
;椅子投げ
[State -1]
type = ChangeState
value = 430
triggerall = NumProj < 1
triggerall = command = "椅子投げ"
trigger1 = statetype != A
trigger1 = ctrl = 1

;---------------------------------------------------------------
;-------------------------------------------------------------
;ミステリアスボール（命名私）超スロー
[State -1]
type = ChangeState
value = 500
triggerall = NumProj < 1
triggerall = command = "ミステリアスボール（命名私）超スロー"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1


;-----------------------------------------------------------------
;-------------------------------------------------------------
;ミステリアスボール（命名私）ホップ
[State -1]
type = ChangeState
value = 510
triggerall = NumProj < 1
triggerall = command = "ミステリアスボール（命名私）ホップ"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1


;-----------------------------------------------------------------
;-------------------------------------------------------------
;ホミステリアスボール（命名私）対空
[State -1]
type = ChangeState
value = 520
triggerall = NumProj < 1
triggerall = command = "ミステリアスボール（命名私）対空"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1


;-----------------------------------------------------------------
;-------------------------------------------------------------
;カウンター
[State -1]
type = ChangeState
value = 490
triggerall = command = "カウンター"
triggerall = command != "holddown"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl = 1


;-----------------------------------------------------------------
;-------------------------------------------------------------
;カウンター当り
[State -1]
type = ChangeState
value = 491
triggerall = command = "カウンター"
triggerall = command != "holddown"
trigger1 = Stateno = [150,153]
trigger1 = anim = [120,155]

;-----------------------------------------------------------------
;-------------------------------------------------------------
;古泉
[State -1]
type = ChangeState
value = 901
triggerall = NumHelper(910) = 0
triggerall = command = "古泉"
triggerall = command != "holddown"
trigger1 = statetype = S || statetype = C
trigger1 = ctrl = 1


;----------------------------------------------------------------
;-------------------------------------------------------------
;朝比奈先輩
[State -1]
type = ChangeState
value = 902
triggerall = NumHelper(920) = 0
triggerall = command = "朝比奈先輩"
triggerall = command != "holddown"
trigger1 = statetype = S || statetype = C
trigger1 = ctrl = 1

;----------------------------------------------------------------
;-------------------------------------------------------------
;長門
[State -1]
type = ChangeState
value = 903
triggerall = NumHelper(930) = 0
triggerall = command = "長門"
triggerall = command != "holddown"
trigger1 = statetype = S || statetype = C
trigger1 = ctrl = 1


;----------------------------------------------------------------
;-----------------------------------------------------------------
;===========================================================================
;　通常技
;===========================================================================
;------------------------------------------------------------------------------
;張り手
[State -1, Seoi Throw]
type = ChangeState
value = 800
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S 
trigger1 = ctrl = 1

;-----------------------------------------------------------------
;-------------------------------------------------------------
;体当たり
[State -1]
type = ChangeState
value = 230
triggerall = command = "fwd_b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 310
trigger2 = movecontact
trigger3 = stateno = 330
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact

;-----------------------------------------------------------------
;-------------------------------------------------------------
;弱パンチ
[State -1]
type = ChangeState
value = 200
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact

;-------------------------------------------------------------------------
;-------------------------------------------------------------
;中パンチ
[State -1]
type = ChangeState
value = 300
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact


;-----------------------------------------------------------------
;-------------------------------------------------------------
;強パンチ
[State -1]
type = ChangeState
value = 400
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 300
trigger3 = movecontact
trigger4 = stateno = 330
trigger4 = movecontact
trigger5 = stateno = 310
trigger5 = movecontact

;-----------------------------------------------------------------
;---------------------------------------------------------------------------
;しゃがみ攻撃
[State -1]
type = ChangeState
value = 210
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 210
trigger2 = movecontact

;-----------------------------------------------------------------
;---------------------------------------------------------------------------
;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 210
trigger2 = movecontact
trigger3 = stateno = 240
trigger3 = movecontact
trigger4 = stateno = 300
trigger4 = movecontact


;-----------------------------------------------------------------
;---------------------------------------------------------------------------
;しゃがみ強攻撃
[State -1]
type = ChangeState
value = 410
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 210
trigger2 = movecontact
trigger3 = stateno = 310
trigger3 = movecontact
trigger4 = stateno = 300
trigger4 = movecontact
trigger5 = stateno = 200
trigger5 = movecontact
trigger6 = stateno = 330
trigger6 = movecontact

;-----------------------------------------------------------------
;---------------------------------------------------------------------------
;ジャンプ攻撃
[State -1]
type = ChangeState
value = 220
triggerall = command = "a"
triggerall = statetype = A
trigger1 = ctrl
;-----------------------------------------------------------------
;---------------------------------------------------------------------------
;ジャンプ中攻撃
[State -1]
type = ChangeState
value = 320
triggerall = command = "b"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 220
trigger2 = movecontact

;-----------------------------------------------------------------
;---------------------------------------------------------------------------
;ジャンプ強攻撃
[State -1]
type = ChangeState
value = 420
triggerall = command = "c"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 220
trigger2 = movecontact
trigger3 = stateno = 320
trigger3 = movecontact

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

[State -1, 距離確認デバック]
type = AppendToClipboard
trigger1 = 1
text =  "P2X:%f,P2Y:%f,Vx%f,Vy%f,Px%f \n"
params = p2bodydist x, p2bodydist y,vel x,vel y,Pos x
IgnoreHitPause = 1

;----------------------------------------------------------------
ジャンプキャンセル

[State -2]
type = Changestate
triggerall = command = "holdup"
trigger1 = (stateno = 410) && movecontact
trigger2 = (stateno = 340) && movecontact
value = 40
;----------------------------------------------------------------
