;-|AI Command |--------------------------------------------------------

[command]
name = "AI1"
command = a, a
time = 1

[command]
name = "AI2"
command = a, a
time = 1

[command]
name = "AI3"
command = a, a
time = 1

[command]
name = "AI4"
command = a, a
time = 1

[command]
name = "AI5"
command = a, a
time = 1

[command]
name = "AI6"
command = a, a
time = 1

[command]
name = "AI7"
command = a, a
time = 1

[command]
name = "AI8"
command = a, a
time = 1

[command]
name = "AI9"
command = a, a
time = 1

[command]
name = "AI10"
command = a, a
time = 1

[command]
name = "AI11"
command = a, a
time = 1

[command]
name = "AI12"
command = a, a
time = 1

[command]
name = "AI13"
command = a, a
time = 1

[command]
name = "AI14"
command = a, a
time = 1

[command]
name = "AI15"
command = a, a
time = 1

[command]
name = "AI16"
command = a, a
time = 1

[command]
name = "AI17"
command = a, a
time = 1

[command]
name = "AI18"
command = a, a
time = 1

[command]
name = "AI19"
command = a, a
time = 1

[command]
name = "AI20"
command = a, a
time = 1

[command]
name = "AI21"
command = a, a
time = 1

[command]
name = "AI22"
command = a, a
time = 1

[command]
name = "AI23"
command = a, a
time = 1

[command]
name = "AI24"
command = a, a
time = 1

[command]
name = "AI25"
command = a, a
time = 1

[command]
name = "AI26"
command = a, a
time = 1

[command]
name = "AI27"
command = a, a
time = 1

[command]
name = "AI28"
command = a, a
time = 1

[command]
name = "AI29"
command = a, a
time = 1

[command]
name = "AI30"
command = a, a
time = 1

[command]
name = "AI31"
command = a, a
time = 1

[command]
name = "AI32"
command = a, a
time = 1

[command]
name = "AI33"
command = a, a
time = 1

[command]
name = "AI34"
command = a, a
time = 1

[command]
name = "AI35"
command = a, a
time = 1

[command]
name = "AI36"
command = a, a
time = 1

[command]
name = "AI37"
command = a, a
time = 1

[command]
name = "AI38"
command = a, a
time = 1

[command]
name = "AI39"
command = a, a
time = 1

[command]
name = "AI40"
command = a, a
time = 1

[command]
name = "AI41"
command = a, a
time = 1

[command]
name = "AI42"
command = a, a
time = 1

[command]
name = "AI43"
command = a, a
time = 1

[command]
name = "AI44"
command = a, a
time = 1

[command]
name = "AI45"
command = a, a
time = 1

[command]
name = "AI46"
command = a, a
time = 1

[command]
name = "AI47"
command = a, a
time = 1

[command]
name = "AI48"
command = a, a
time = 1

[command]
name = "AI49"
command = a, a
time = 1

[command]
name = "AI50"
command = a, a
time = 1

;-| Super Motions |--------------------------------------------------------

[Command]
name = "storm_FFF"
command = ~DB, F, DF, D, DB, B, DF, x+y
time = 80

[Command]
name = "storm_FFF"
command = ~DB, F, DF, D, DB, B, DF, y+z
time = 80

[Command]
name = "storm RB"
command = ~DB, F, DF, D, DB, B, DF, x
time = 80

[Command]
name = "storm RB"
command = ~DB, F, DF, D, DB, B, DF, y
time = 80

[Command]
name = "storm RB"
command = ~DB, F, DF, D, DB, B, DF, z
time = 80

[Command]
name = "storm"
command = ~D, DB, B, x+y
time = 20

[Command]
name = "storm"
command = ~D, DB, B, y+z
time = 20

[Command]
name = "thunder"
command = ~D, DB, B, a+b
time = 20

[Command]
name = "thunder FFF"
command = ~D, DB, B, b+c
time = 20

[command]
name = "deadly"
command = ~D, DF, F, a+b
time = 20

[command]
name = "deadly"
command = ~D, DF, F, b+c
time = 20

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

[Command]
name = "kyokuu"
command = ~D, DF, F, y+z
time = 20

[Command]
name = "ashura"
command = ~D, DB, B, x+y
time = 20

[Command]
name = "ashura"
command = ~D, DB, B, y+z
time = 20

[Command]
name = "rashoumon"
command = ~F, D, B, U, x+y
time = 45

[Command]
name = "rashoumon"
command = ~D, B, U, F, x+y
time = 45

[Command]
name = "rashoumon"
command = ~B, U, F, D, x+y
time = 45

[Command]
name = "rashoumon"
command = ~U, F, D, B, x+y
time = 45

[Command]
name = "rashoumon"
command = ~B, D, F, U, x+y
time = 45

[Command]
name = "rashoumon"
command = ~D, F, U, B, x+y
time = 45

[Command]
name = "rashoumon"
command = ~F, U, B, D, x+y
time = 45

[Command]
name = "rashoumon"
command = ~U, B, D, F, x+y
time = 45


[Command]
name = "rashoumon"
command = ~F, D, B, U, y+z
time = 45

[Command]
name = "rashoumon"
command = ~D, B, U, F, y+z
time = 45

[Command]
name = "rashoumon"
command = ~B, U, F, D, y+z
time = 45

[Command]
name = "rashoumon"
command = ~U, F, D, B, y+z
time = 45

[Command]
name = "rashoumon"
command = ~B, D, F, U, y+z
time = 45

[Command]
name = "rashoumon"
command = ~D, F, U, B, y+z
time = 45

[Command]
name = "rashoumon"
command = ~F, U, B, D, y+z
time = 45

[Command]
name = "rashoumon"
command = ~U, B, D, F, y+z
time = 45


;-| Special Motions |------------------------------------------------------
[Command]
name = "reppuken"
command = ~D, DF, F, x
time = 15

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

[Command]
name = "dblreppuken"
command = ~D, DF, F, z
time = 15

[Command]
name = "shippuken"
command = ~D, DB, B, x
time = 15

[Command]
name = "shippuken_y"
command = ~D, DB, B, y
time = 15

[Command]
name = "dblshippuken"
command = ~D, DB, B, z
time = 15

[Command]
name = "jaeiken_x"
command = ~F, DF, D, DB, B, x
time = 35

[Command]
name = "jaeiken_y"
command = ~F, DF, D, DB, B, y
time = 35

[Command]
name = "jaeiken_z"
command = ~F, DF, D, DB, B, z
time = 35

[Command]
name = "atemi_a"
command = ~B, DB, D, DF, F, a
time = 20

[Command]
name = "atemi_b"
command = ~B, DB, D, DF, F, b
time = 20

[Command]
name = "atemi_c"
command = ~B, DB, D, DF, F, c
time = 20

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

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

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

;-| Dir + Button |-----------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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

[Command]
name = "longjump"
command = ~D, $U
time = 13

;-| 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 = "start"
command = s
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 = "holddownfwd";Required (do not remove)
command = /$DF
time = 1

;-| Hold Dir |-----------------------------------------------
[Command]
name = "holda"
command = /a
time = 1

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

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

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

[State -1]
type = VarSet
trigger1 = stateno != 821
trigger1 = prevstateno = 825
trigger2 = stateno != 3505
trigger2 = prevstateno = 3500
var(10) = 1

[State -1]
type = VarSet
trigger1 = stateno = 1245
var(10) = 0

;--------------------------------------------------------------
;デッドリーレイブ
[State -1]
type = ChangeState
value = 3300
triggerall = var(32) >= 4
triggerall = var(31) = 1
triggerall = power >= 6000
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = p2movetype = H
triggerall = (p2bodydist Y = [-60,0])
trigger1 = ctrl = 1
trigger1 = p2stateno = 1256 || p2stateno = 1516 || p2stateno = 1410
trigger1 = p2bodydist X < 70
trigger2 = stateno = 200 && movehit
trigger3 = stateno = 210 && movehit
trigger4 = stateno = 225 && movehit
trigger4 = p2bodydist X >= 70 || time >= 12
trigger5 = stateno = 230 && movehit
trigger6 = stateno = 420 && movehit
trigger7 = stateno = 430 && movehit
trigger8 = stateno = 431 && movehit
trigger9 = stateno = 3505 && movehit
trigger9 = time >= 72
trigger9 = var(32) >= 5
trigger10 = stateno = 350 && movehit
trigger11 = stateno = 362 && movehit

;ファイナル・レイジングストーム
[State -1]
type = ChangeState
value = 3170
triggerall = var(32) >= 6
triggerall = var(31) = 1
triggerall = power >= 6000
triggerall = Life < LifeMAX*0.15 ;LifeMAX*0.25
triggerall = RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1

;羅生門
[State -1]
type = ChangeState
value = 3500
triggerall = var(32) >= 4
triggerall = !(var(32) >= 5 && power >= 5000)
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = power >= 5000
triggerall = RoundState = 2
triggerall = p2bodydist x <= 30
triggerall = p2statetype = S || p2statetype = C
triggerall = stateno = [200,499]
trigger1 = moveguarded
trigger2 = movehit && power < 6000

;虎殺投げ
[State -1]
type = ChangeState
value = 851
triggerall = var(32) = 2 || var(32) >= 4 && power >= 6000
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = Numtarget = 0
triggerall = p2bodydist x <= 15
triggerall = p2statetype = S || p2statetype = C
triggerall = P2MoveType != H
trigger1 = ctrl

;真空投げ／羅生門
[State -1]
type = ChangeState
value = 825 + 2675 * (power >= 5000 && p2bodydist x <= 30 && var(10) = 0 && var(32) = 4)
triggerall = var(32) >= 3
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = Numtarget = 0
triggerall = p2bodydist x <= 64
triggerall = p2statetype = S || p2statetype = C
trigger1 = P2MoveType != H
trigger1 = ctrl
trigger2 = stateno = 410 && time > 5
trigger2 = P2stateno = [120,155]
trigger2 = movecontact = 0

;当て身投げ
[State -1]
type = ChangeState
value = 1400 + 100 * (p2statetype = S) + 50 * (p2statetype = C)
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2movetype = A
triggerall = (p2bodydist X = [0, 90]) || InGuardDist
triggerall = enemy,numproj = 0
triggerall = stateno != [300,310]
trigger1 = ctrl = 1
trigger2 = stateno = [200,431]
trigger2 = var(32) >= 4
trigger3 = stateno = [130,131]

;避け攻撃
[State -1]
type = null;ChangeState
value = 310
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2movetype = A
triggerall = p2bodydist X < 140
triggerall = stateno != [300,310]
triggerall = prevstateno != 310
triggerall = ctrl = 1
trigger1 = P2movetype = A
trigger2 = enemy,numproj > 0

;立ちガード
[State -1]
value = 130
type = ChangeState
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType != A
triggerall = P2MoveType = A && InGuardDist || enemy,numproj > 0
trigger1 = ctrl = 1

;しゃがみガード
[State -1]
type = ChangeState
value = 131
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType != A
triggerall = P2MoveType = A && InGuardDist || enemy,numproj > 0
triggerall = P2StateType = C || EnemyNear,HitDefAttr = C,AA,AP
trigger1 = ctrl = 1
trigger2 = stateno = 130

;ガードキャンセル
[State -1]
type = ChangeState
value = 300
triggerall = power >= 500
triggerall = statetype != A
triggerall = var(32) >= 3
triggerall = !(var(32) >= 5 && power >= 5000)
triggerall = var(31) = 1
triggerall = RoundState = 2
trigger1 = stateno = [150,155]
trigger1 = time > 1
trigger1 = p2bodydist Y > -30

;バックステップ
[State -1]
type = ChangeState
value = 105
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = ctrl = 1
trigger1 = p2stateno = [5110,5120]
trigger1 = p2bodydist X = [-10,60]
trigger2 = frontedgebodydist < 60
trigger2 = P2statetype = A || P2statetype = L
trigger2 = power < 6000

;対空レイジングストーム（ＲＢ）
[State -1]
type = ChangeState
value = 3150
triggerall = var(32) >= 2
triggerall = !(var(32) >= 5 && power >= 5000)
triggerall = var(31) = 1
triggerall = power >= 2000
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = p2statetype = A
triggerall = p2bodydist X = [50,150]
triggerall = enemy,numproj = 0
triggerall = enemy,vel X > 0
triggerall = enemy,vel Y < 0
triggerall = p2movetype != H
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]

;レイジングストームを起きあがりに重ねる
[State -1]
type = ChangeState
value = 3100
triggerall = var(32) >= 3
triggerall = !(var(32) >= 5 && power >= 5000)
triggerall = var(31) = 1
triggerall = power >= 2000
triggerall = statetype != A
triggerall = RoundState = 2
;triggerall = p2statetype = L
triggerall = p2bodydist X < 110
triggerall = enemy,numproj = 0
trigger1 = ctrl = 1
trigger1 = p2stateno = 5120
;trigger1 = enemy,animtime = [0,3]

;しゃがみ大Ｐ→ダブル烈風拳／レイジングストーム
[State -1]
type = ChangeState
value = 1100 + 2000 * ((power >= 2000 && var(32) >= 2) && !(var(32) >= 5 && power >= 5000))
triggerall = var(31) = 1
triggerall = RoundState = 2
trigger1 = stateno = 431
trigger1 = movecontact
trigger1 = time > 5

;上段当て身投げ・螺旋→レイジングストーム
[State -1]
type = ChangeState
value = 3100
triggerall = var(32) >= 3
triggerall = !(var(32) >= 5 && power >= 5000)
triggerall = var(31) = 1
triggerall = power >= 2000
triggerall = statetype != A
triggerall = RoundState = 2
triggerall =  FrontEdgeBodyDist < 200
triggerall = enemy,numproj = 0
trigger1 = ctrl = 1
trigger1 = numtarget(1405) >= 1

;しゃがみ小Ｋ
[State -1]
type = ChangeState
value = 410
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = P2statetype = S || P2statetype = C
triggerall = p2bodydist X = [0, 50]
trigger1 = ctrl = 1
trigger2 = stateno = 410 && time > 5
trigger3 = stateno = 110
trigger3 = p2bodydist X <= 5

;飛燕失脚　地
[State -1]
type = ChangeState
value = 350
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2statetype = S || P2statetype = C
trigger1 = var(32) >= 3
trigger1 = p2bodydist X = [0,200]
trigger1 = random > 700
trigger1 = p2stateno != [5030,5100]
trigger1 = ctrl = 1
trigger2 = var(32) >= 4
trigger2 = moveguarded
trigger2 = stateno = 205 || stateno = 215 || stateno = 400 || stateno = 410
trigger2 = random > 600


;飛燕失脚　空
[State -1]
type = ChangeState
value = 360
triggerall = var(32) < 5 ;AIレベル5以上になると使用しない
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2statetype = S || P2statetype = C
trigger1 = var(32) >= 2
trigger1 = p2bodydist X = [60,200]
trigger1 = random > 800
trigger1 = p2stateno != [5030,5100]
trigger1 = ctrl = 1
trigger2 = var(32) >= 4
trigger2 = moveguarded
trigger2 = stateno = 205 || stateno = 215 || stateno = 400 || stateno = 410
trigger2 = random > 600

;ジャンプ
[State -1]
type = ChangeState
value = 40
triggerall = var(31) = 1
triggerall = ctrl = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = p2movetype != H
;trigger1 = p2bodydist X <= 220
trigger1 = random > 850

;立ち中Ｐ／中Ｋ
[State -1]
type = ChangeState
value = 200 + 10 * (P2statetype = C)
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2statetype = S || P2statetype = C
triggerall = p2bodydist X = [51, 70]
trigger1 = ctrl = 1

;立ち大Ｐ
[State -1]
type = ChangeState
value = 220
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2statetype = S
triggerall = p2bodydist X = [71, 125]
trigger1 = ctrl = 1

;立ち大Ｋ
[State -1]
type = ChangeState
value = 230
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2statetype = S || P2statetype = C
triggerall = p2bodydist X = [71, 160]
trigger1 = ctrl = 1

;邪影拳
[State -1]
type = ChangeState
value = 1220 + 20 * (random > 300) 
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2statetype = S || P2statetype = C
triggerall = p2bodydist X > 160
triggerall = random > 600
trigger1 = p2stateno != [5030,5100]
trigger1 = ctrl = 1

;烈風拳
[State -1]
type = ChangeState
value = 1000 + 20 * (random > 800) 
triggerall = var(32) >= 2 || numproj = 0
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = P2statetype = S || P2statetype = C
triggerall = p2bodydist X > 160
trigger1 = p2stateno != [5030,5100]
trigger1 = ctrl = 1

;しゃがみ小Ｋ　→　しゃがみ大Ｐ
[State -1]
type = ChangeState
value = 431
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = power >= 2000
triggerall = statetype != A
triggerall = movehit
trigger1 = stateno = 410
trigger1 = p2bodydist X = [0, 15]

;しゃがみ小キック　→　近距離大Ｐ／しゃがみ中Ｋ
[State -1]
type = ChangeState
value = 225 + 195 * (P2statetype = C || p2bodydist X > 30)
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = movecontact
trigger1 = stateno = 410

;しゃがみ中Ｋ　→　しゃがみ大Ｋ
[State -1]
type = ChangeState
value = 430
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = p2bodydist X < 80
trigger1 = stateno = 420
trigger1 = movehit

;近距離大Ｐ／立ち中Ｐ／立ち中Ｋ／しゃがみ中Ｋ／飛燕失脚・地　→　遠距離大Ｐ／大Ｋ
[State -1]
type = ChangeState
value = 220 + 10 * (P2statetype = C && var(32) >= 2)
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = movecontact
trigger1 = stateno = 225
trigger1 = p2bodydist X >= 70 || time >= 12
trigger2 = stateno = 210
trigger3 = stateno = 200
trigger4 = stateno = 420
trigger5 = var(32) >= 5
trigger5 = stateno = 350

;基本技キャンセル邪影拳
[State -1]
type = ChangeState
value = 1200 + 40 * (MoveHit>=1)
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = movecontact
trigger1 = stateno = 220
trigger2 = stateno = 230
trigger3 = stateno = 310
trigger4 = stateno = 430
trigger5 = var(32) >= 4
trigger5 = stateno = 300  && time = [21,25]
trigger5 = p2movetype = H && numproj = 0
trigger6 = var(32) >= 3
trigger6 = stateno = 362
trigger6 = moveguarded
trigger7 = var(32) >= 5 || moveguarded
trigger7 = stateno = 350

;追い打ち超必殺技（虚空烈風斬／サンダーブレイク）
[State -1]
type = ChangeState
value = 3400 - 199 * (var(32) >= 4 && p2bodydist X < 130)
triggerall = var(32) >= 3
triggerall = power>=4500
triggerall = !(var(32) >= 5 && power >= 5000)
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = p2movetype = H
triggerall = ctrl = 1
triggerall = numproj = 0
trigger1 = p2stateno = [5030,5100]
trigger2 = p2stateno = 1256 || p2stateno = 1516 || p2stateno = 1410
trigger3 = stateno = 362 && movehit

;追い打ち烈風拳（近距離：ダブル烈風拳／遠距離：中・烈風拳）
[State -1]
type = ChangeState
value = 1020 + 80 * (p2bodydist X < 120)
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = p2movetype = H
triggerall = ctrl = 1
triggerall = numproj = 0
trigger1 = p2stateno = [5030,5100]
trigger2 = p2stateno = 1256 || p2stateno = 1516 || p2stateno = 1410
trigger3 = stateno = 362 && movehit

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(32) >= 3
triggerall = var(31) = 1
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = p2bodydist X > 160
triggerall = enemy,ctrl = 0
triggerall = p2movetype != A
trigger1 = ctrl = 1

;空中受け身から、弱・疾風拳
[State -1]
type = ChangeState
value = 1600
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = backedgebodydist > 50
triggerall = p2bodydist X = [120,200]
triggerall = p2bodydist Y = [20,100]
triggerall = pos Y = [-80,-30]
trigger1 = ctrl = 1
trigger1 = stateno = 5210 || prevstateno = 5210

;飛燕失脚・地ヒット／空ガード→ダブル疾風拳
[State -1]
type = ChangeState
value = 1650
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
trigger1 = stateno = 351
trigger1 = movecontact
trigger2 = var(32) >= 4
trigger2 = stateno = 361
trigger2 = moveguarded

;疾風拳／ダブル疾風拳
[State -1]
type = ChangeState
value = 1650 - 50 * (random > 500 && vel X > 0)
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = pos Y < -80
triggerall = backedgebodydist > 50
triggerall = (p2bodydist X = [120,200])&&(p2bodydist Y = [100,140]) || (p2bodydist X = [60,120])&&(p2bodydist Y = [50,100]) || (p2bodydist X = [0,60])&&(p2bodydist Y = [0,50])
trigger1 = ctrl = 1
trigger2 = stateno = [600,650]
trigger2 = movecontact
trigger2 = var(32) >= 2

;中・疾風拳
[State -1]
type = ChangeState
value = 1630 + 20 * (random > 300)
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = p2movetype = A
triggerall = backedgebodydist > 50
triggerall = p2bodydist X < 160
trigger1 = pos Y < -50
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact
trigger2 = var(32) >= 2

;阿修羅疾風拳
[State -1]
type = ChangeState
value = 3600
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = (power >= 4500 && var(32) >= 3) && !(power >= 6000 && var(32) >= 4)
triggerall = StateType = A
triggerall = backedgebodydist > 50
triggerall = (p2bodydist X = [120,200])&&(p2bodydist Y = [100,140]) || (p2bodydist X = [60,120])&&(p2bodydist Y = [50,100]) || (p2bodydist X = [0,60])&&(p2bodydist Y = [0,50])
trigger1 = pos Y = [-80,-30]
trigger1 = ctrl = 1
trigger1 = stateno = 5210
trigger2 = stateno = 1650
trigger2 = AnimElem = 7, >= 1
trigger2 = random > 700

;疾風拳２回目(弱)
[State -1]
type = ChangeState
value = 1620
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype = A
trigger1 = stateno = 1600
trigger1 = AnimElem = 4, >= 1

;疾風拳２回目(中)
[State -1]
type = ChangeState
value = 1640
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype = A
trigger1 = stateno = 1630
trigger1 = AnimElem = 2, >= 1

;疾風拳２回目(強)
[State -1]
type = ChangeState
value = 1660
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = statetype = A
trigger1 = stateno = 1650
trigger1 = AnimElem = 7, >= 1
triggerall = (p2bodydist X = [120,200])&&(p2bodydist Y = [100,140]) || (p2bodydist X = [60,120])&&(p2bodydist Y = [50,100]) || (p2bodydist X = [0,60])&&(p2bodydist Y = [0,50])

;ジャンプ小パンチ
[State -1]
type = ChangeState
value = 600
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = P2StateType = A
triggerall = p2bodydist X < 100
triggerall = p2bodydist Y = [-50,30]
triggerall = p2movetype != A
trigger1 = pos Y < -20
trigger1 = ctrl = 1

;ジャンプ小キック
[State -1]
type = ChangeState
value = 610
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = P2StateType = S || P2StateType = C
triggerall = p2bodydist X < 100
triggerall = p2bodydist Y = [0,70]
triggerall = p2movetype != A
triggerall = vel Y > 0
trigger1 = pos Y < -20
trigger1 = ctrl = 1

;ジャンプ中パンチ
[State -1]
type = ChangeState
value = 605
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = P2StateType = A
triggerall = p2bodydist X < 100
triggerall = p2bodydist Y = [-80,20]
triggerall = p2movetype != A
trigger1 = pos Y < -20
trigger1 = ctrl = 1
trigger2 = stateno = 600 && Movecontact
trigger3 = stateno = 610 && Movecontact

;ジャンプ中キック
[State -1]
type = ChangeState
value = 615
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = P2StateType = S || P2StateType = C
triggerall = p2bodydist X < 100
triggerall = p2bodydist Y = [0,70]
triggerall = p2movetype != A
trigger1 = vel Y > 0
trigger1 = pos Y < -20
trigger1 = ctrl = 1
trigger2 = stateno = 600 && Movecontact
trigger3 = stateno = 610 && Movecontact

;ジャンプ大パンチ
[State -1]
type = ChangeState
value = 630
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = P2StateType = S || P2StateType = C
triggerall = p2bodydist X < 60
triggerall = p2bodydist Y = [-20,50]
triggerall = p2movetype != A
triggerall = vel Y > 0
triggerall = vel X > 0
trigger1 = ctrl = 1
trigger2 = stateno = 600 && Movecontact
trigger3 = stateno = 610 && Movecontact
trigger4 = stateno = 605 && Movecontact
trigger5 = stateno = 615 && Movecontact

;ジャンプ大キック
[State -1]
type = ChangeState
value = 620 + 5 * (vel X = 0)
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = p2bodydist X < 70
triggerall = p2bodydist Y = [-40,40]
triggerall = p2movetype != A
trigger1 = pos Y < -80
trigger1 = ctrl = 1
trigger2 = stateno = 600 && Movecontact
trigger3 = stateno = 610 && Movecontact
trigger4 = stateno = 605 && Movecontact
trigger5 = stateno = 615 && Movecontact

;空中ガード
[State -1]
type = ChangeState
value = 132
triggerall = var(32) >= 2
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = P2MoveType = A && InGuardDist || enemy,numproj > 0
trigger1 = ctrl = 1

;地上ダウン回避
[State -1]
type = SelfState
value = 5200
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = stateno = 5050

;空中ダウン回避
[State -1]
type = SelfState
value = 5210
triggerall = var(31) = 1
triggerall = RoundState = 2
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = stateno = 5050

;--------------------------------------------------------------------
;RASHOUMON
[State -1]
type = ChangeState
value = 3500
triggerall = command = "rashoumon"
triggerall = power >= 5000
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact
trigger3 = stateno = 40

;Deadly Rave
[State -1]
type = ChangeState
value = 3300
triggerall = command = "deadly"
triggerall = var(31) = 0 && RoundState = 2
triggerall = power >= 6000
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;Kyokuu Reppuu Zan
[State -1]
type = ChangeState
value = 3400
triggerall = command = "kyokuu"
triggerall = power >= 1000
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;Thunder break FFF
[State -1]
type = ChangeState
value = 3201
triggerall = command = "thunder FFF"
triggerall = var(31) = 0 && RoundState = 2
triggerall = power >= 4000
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;Thunder break
[State -1]
type = ChangeState
value = 3200
triggerall = command = "thunder"
triggerall = var(31) = 0 && RoundState = 2
triggerall = power >= 4000
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;Raising storm FFF
[State -1]
type = ChangeState
value = 3170
triggerall = command = "storm_FFF"
triggerall = var(31) = 0 && RoundState = 2
triggerall = power >= 6000
triggerall = Life < LifeMAX*0.25
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;Raising storm RB
[State -1]
type = ChangeState
value = 3150
triggerall = command = "storm RB"
triggerall = var(31) = 0 && RoundState = 2
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;Raising storm
[State -1]
type = ChangeState
value = 3100
triggerall = command = "storm"
triggerall = var(31) = 0 && RoundState = 2
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;GEDAN ATTEMI NAGE (UP) -FatFur3D style-
[State -1]
type = ChangeState
value = 1400
triggerall = command = "atemi_a"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;SHUDAN ATTEMI NAGE -Middle-
[State -1]
type = ChangeState
value = 1500
triggerall = command = "atemi_b"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;GEDAN ATTEMI NAGE (Down) -RB2-
[State -1]
type = ChangeState
value = 1450
triggerall = command = "atemi_c"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;JA EI KEN RBS
[State -1]
type = ChangeState
value = 1240
triggerall = command = "jaeiken_z"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;JA EI KEN RBS
[State -1]
type = ChangeState
value = 1220
triggerall = command = "jaeiken_y"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;JA EI KEN RBS
[State -1]
type = ChangeState
value = 1200
triggerall = command = "jaeiken_x"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;REPPUKEN
[State -1]
type = ChangeState
value = 1020
triggerall = command = "reppuken_y"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

[State -1]
type = ChangeState
value = 1000
triggerall = command = "reppuken"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;DOUBLE REPPUKEN
[State -1]
type = ChangeState
value = 1100
triggerall = command = "dblreppuken"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;ASHURA SHIPPU KEN
[State -1]
type = ChangeState
value = 3600
triggerall = command = "ashura"
triggerall = var(31) = 0 && RoundState = 2
triggerall = power >= 1000
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact
trigger3 = stateno = 1620
trigger4 = stateno = 1650
trigger5 = stateno = 1670

;SHIPPU KEN
[State -1]
type = ChangeState
value = 1600
triggerall = command = "shippuken"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;SHIPPU KEN follow up
[State -1]
type = ChangeState
value = 1620
triggerall = command = "x" || command = "y" || command = "z"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype = A
trigger1 = stateno = 1600
trigger1 = AnimElem = 2, >= 1

;SHIPPU KEN (Y)
[State -1]
type = ChangeState
value = 1630
triggerall = command = "shippuken_y"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;SHIPPU KEN follow up (Y)
[State -1]
type = ChangeState
value = 1640
triggerall = command = "x" || command = "y" || command = "z"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype = A
trigger1 = stateno = 1630
trigger1 = AnimElem = 2, >= 1

;DOUBLE SHIPPU KEN
[State -1]
type = ChangeState
value = 1650
triggerall = command = "dblshippuken"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = [200,690]
trigger2 = movecontact

;DOUBLE SHIPPU KEN follow up
[State -1]
type = ChangeState
value = 1660
triggerall = command = "x" || command = "y" || command = "z"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype = A
trigger1 = stateno = 1650
trigger1 = AnimElem = 7, >= 1

;--------------------------------------------------------------------------
;Shinkuu Nage
[State -1]
type = ChangeState
value = 820
triggerall = command = "y"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command = "holddown"
triggerall = Numtarget = 0
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
triggerall = p2bodydist x <= 60
triggerall = p2statetype = S || p2statetype = C
triggerall = P2MoveType != H
trigger1 = ctrl

;Shinkuu Nage
[State -1]
type = ChangeState
value = 825
triggerall = command = "z"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command = "holddown"
triggerall = Numtarget = 0
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
triggerall = p2bodydist x <= 64
triggerall = p2statetype = S || p2statetype = C
triggerall = P2MoveType != H
trigger1 = ctrl


;Throw
[State -1]
type = ChangeState
value = 800
triggerall = command = "b"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command != "holddown"
triggerall = Numtarget = 0
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
triggerall = p2bodydist x <= 15
triggerall = p2statetype = S || p2statetype = C
triggerall = P2MoveType != H
trigger1 = ctrl

;Throw
[State -1]
type = ChangeState
value = 801
triggerall = command = "c" 
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command != "holddown"
triggerall = Numtarget = 0
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
triggerall = p2bodydist x <= 15
triggerall = p2statetype = S || p2statetype = C
triggerall = P2MoveType != H
trigger1 = ctrl

;Throw
[State -1]
type = ChangeState
value = 850
triggerall = command = "y"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command != "holddown"
triggerall = Numtarget = 0
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
triggerall = p2bodydist x <= 15
triggerall = p2statetype = S || p2statetype = C
triggerall = P2MoveType != H
trigger1 = ctrl

;Throw
[State -1]
type = ChangeState
value = 851
triggerall = command = "z"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command != "holddown"
triggerall = Numtarget = 0
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
triggerall = p2bodydist x <= 15
triggerall = p2statetype = S || p2statetype = C
triggerall = P2MoveType != H
trigger1 = ctrl

[State -1]
type = ChangeState
value = 310
triggerall = command = "recovery"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl

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

;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = var(31) = 0 && RoundState = 2
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = var(31) = 0 && RoundState = 2
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;===========================================================================
;---------------------------------------------------------------------------
;飛燕失脚・空
[State -1,]
type = ChangeState
value = 360
triggerall = command = "y"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact

;飛燕失脚・地
[State -1,]
type = ChangeState
value = 350
triggerall = command = "y"
triggerall = command = "holdfwd"
triggerall = command = "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact

;===========================================================================
;---------------------------------------------------------------------------
;Standing Light Punch
[State -1,]
type = ChangeState
value = 205
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205
trigger3 = stateno = 215
trigger4 = stateno = 400
trigger5 = stateno = 410

;Standing Middle Punch
[State -1,]
type = ChangeState
value = 200
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact

;---------------------------------------------------------------------------
;Standing Kick
[State -1]
type = ChangeState
value = 210
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact

;Standing Kick (close)
[State -1]
type = ChangeState
value = 215
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205
trigger3 = stateno = 215
trigger4 = stateno = 400
trigger5 = stateno = 410

;---------------------------------------------------------------------------
;Standing hard attack
[State -1]
type = ChangeState
value = 220
triggerall = command = "z"
triggerall = command != "holddown"
triggerall = p2bodydist x > 55 || command = "holdfwd"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
trigger6 = stateno = 200 && movecontact
trigger7 = stateno = 210 && movecontact
trigger8 = stateno = 250 && movecontact
trigger9 = stateno = 420 && movecontact
trigger10 = stateno = 225 && movecontact
trigger11 = stateno = 235 && movecontact
trigger12 = stateno = 350 && movecontact

;Standing hard attack (close)
[State -1]
type = ChangeState
value = 225
triggerall = command = "z"
triggerall = command != "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
trigger6 = stateno = 200 && movecontact
trigger7 = stateno = 210 && movecontact
trigger8 = stateno = 250 && movecontact
trigger9 = stateno = 420 && movecontact
trigger12 = stateno = 350 && movecontact

;Standing hard kick
[State -1]
type = ChangeState
value = 230
triggerall = command = "c"
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = p2bodydist x > 60 || command = "holdfwd"
triggerall = var(31) = 0 && RoundState = 2
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
trigger6 = stateno = 200 && movecontact
trigger7 = stateno = 210 && movecontact
trigger8 = stateno = 250 && movecontact
trigger9 = stateno = 420 && movecontact
trigger10 = stateno = 225 && movecontact
trigger11 = stateno = 235 && movecontact
trigger12 = stateno = 350 && movecontact

;Standing hard kick close
[State -1]
type = ChangeState
value = 235
triggerall = command = "c"
triggerall = command != "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
trigger6 = stateno = 200 && movecontact
trigger7 = stateno = 210 && movecontact
trigger8 = stateno = 250 && movecontact
trigger9 = stateno = 420 && movecontact
trigger12 = stateno = 350 && movecontact

;-------------------------------------------------------
;Crouching Punch
[State -1]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205
trigger3 = stateno = 215
trigger4 = stateno = 400
trigger5 = stateno = 410

;Crouching Kick
[State -1]
type = ChangeState
value = 410
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205
trigger3 = stateno = 215
trigger4 = stateno = 400
trigger5 = stateno = 410

;Crouching hard attack
[State -1]
type = ChangeState
value = 420
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact

;Crouching hard attack
[State -1]
type = ChangeState
value = 430
triggerall = command = "c"
triggerall = command = "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
trigger6 = stateno = 200 && movecontact
trigger7 = stateno = 210 && movecontact
trigger8 = stateno = 250 && movecontact
trigger9 = stateno = 420 && movecontact
trigger10 = stateno = 350 && movecontact

;Crouching hard attack (hold fwd)
[State -1]
type = ChangeState
value = 431
triggerall = command = "z"
triggerall = command = "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
trigger6 = stateno = 200 && movecontact
trigger7 = stateno = 210 && movecontact
trigger8 = stateno = 250 && movecontact
trigger9 = stateno = 420 && movecontact
trigger10 = stateno = 350 && movecontact

;Crouching Hard combo (fwd A, C)
[State -1]
type = ChangeState
value = 250
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && movecontact
trigger3 = stateno = 215 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact

;Guard Cancel
[State -1]
type = ChangeState
value = 300
triggerall = power >= 500
triggerall = command = "recovery"
triggerall = statetype != A
triggerall = var(31) = 0 && RoundState = 2
trigger1 = stateno = [150,155]

;Taunt
[State -1]
type = ChangeState
value = 195
triggerall = command = "start"
triggerall = var(31) = 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl

;-----------------------------------------------------------
;Jumping Punch
[State -1]
type = ChangeState
value = 600
triggerall = command = "x"
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl

;Jumping Punch
[State -1]
type = ChangeState
value = 605
triggerall = command = "y"
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact

;Jumping Kick
[State -1]
type = ChangeState
value = 610
triggerall = command = "a"
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl

;Jumping Kick
[State -1]
type = ChangeState
value = 615
triggerall = command = "b"
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact

;Neutral jumping Super attack
[State -1]
type = ChangeState
value = 625
triggerall = command = "c"
triggerall = vel X = 0
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 605 && movecontact
trigger5 = stateno = 615 && movecontact

;Neutral jumping Super attack
[State -1]
type = ChangeState
value = 620
triggerall = command = "c"
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 605 && movecontact
trigger5 = stateno = 615 && movecontact

;Jumping Super attack
[State -1]
type = ChangeState
value = 650
triggerall = command = "z"
triggerall = vel X = 0
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 605 && movecontact
trigger5 = stateno = 615 && movecontact

;Jumping Super attack
[State -1]
type = ChangeState
value = 630
triggerall = command = "z"
triggerall = var(31) = 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 610 && movecontact
trigger4 = stateno = 605 && movecontact
trigger5 = stateno = 615 && movecontact

[State -1, AI_Set]
type = Varset
var(31) = 1
triggerall = var(31) != 1
trigger1 = command = "AI1"
trigger2 = command = "AI2"
trigger3 = command = "AI3"
trigger4 = command = "AI4"
trigger5 = command = "AI5"
trigger6 = command = "AI6"
trigger7 = command = "AI7"
trigger8 = command = "AI8"
trigger9 = command = "AI9"
trigger10 = command = "AI10"
trigger11 = command = "AI11"
trigger12 = command = "AI12"
trigger13 = command = "AI13"
trigger14 = command = "AI14"
trigger15 = command = "AI15"
trigger16 = command = "AI16"
trigger17 = command = "AI17"
trigger18 = command = "AI18"
trigger19 = command = "AI19"
trigger20 = command = "AI20"
trigger21 = command = "AI21"
trigger22 = command = "AI22"
trigger23 = command = "AI23"
trigger24 = command = "AI24"
trigger25 = command = "AI25"
trigger26 = command = "AI26"
trigger27 = command = "AI27"
trigger28 = command = "AI28"
trigger29 = command = "AI29"
trigger30 = command = "AI30"
trigger31 = command = "AI31"
trigger32 = command = "AI32"
trigger33 = command = "AI33"
trigger34 = command = "AI34"
trigger35 = command = "AI35"
trigger36 = command = "AI36"
trigger37 = command = "AI37"
trigger38 = command = "AI38"
trigger39 = command = "AI39"
trigger40 = command = "AI40"
trigger41 = command = "AI41"
trigger42 = command = "AI42"
trigger43 = command = "AI43"
trigger44 = command = "AI44"
trigger45 = command = "AI45"
trigger46 = command = "AI46"
trigger47 = command = "AI47"
trigger48 = command = "AI48"
trigger49 = command = "AI49"
trigger50 = command = "AI50"

;----------------------------------------------------------------------------------
[Statedef -2]

[State -2, 1]
type = Afterimage
trigger1 = movetype = H
trigger2 = ctrl
time = 0

[State -2, 1]
type = Afterimagetime
trigger1 = movetype = H
trigger2 = ctrl
time = 0
