;-| ＣＰＵ |-----------------------------------------------------------
[Command]
name = "cpu1"
command = D, DF, F,D
time = 1

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

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

[Command]
name = "cpu4"
command = D, DB, B
time = 1

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

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

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

[Command]
name = "cpu8"
command = UB, DB, FB
time = 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[Command]
name = "cpu41"
command = x, b, F,F
time = 1

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

[Command]
name = "cpu43"
command = B, U, b,y
time = 1

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

[Command]
name = "cpu45"
command = x, DB, y
time = 1

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

[Command]
name = "cpu47"
command = U, x, s
time = 1

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

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

[Command]
name = "cpu50"
command = c, UB, z
time = 1

;-| 超必殺技 |-----------------------------------------------------------
;---------------------------------------------------------------------
;~~~~十文字(Jumonji)
[Command]
name = "jumonji_x"
command = ~D, DF, F, D, DF, x
time = 50

[Command]
name = "jumonji_y"
command = ~D, DF, F, D, DF, y
time = 50

[Command]
name = "jumonji_z"
command = ~D, DF, F, D, DF, z
time = 50
;~~~~~~~爆龍昇(Bakuryushou)
[Command]
name = "bakuryushou_a"
command = ~D, DF, F, D, DF, a
time = 24

[Command]
name = "bakuryushou_b"
command = ~D, DF, F, D, DF, b
time = 24

[Command]
name = "bakuryushou_c"
command = ~D, DF, F, D, DF, c
time = 24

;~~~~~~~閻魔突き(Enmazuki)
[Command]
name = "enma"
command = ~D, DB, B, D, DB, x
time = 24

[Command]
name = "enma"
command = ~D, DB, B, D, DB, y
time = 24

[Command]
name = "enma"
command = ~D, DB, B, D, DB, z
time = 24

;~~~~~~~焔旋風(Homura-Tsumuji)
[Command]
name = "homura"
command = ~D, DB, B, D, DB, a
time = 24

[Command]
name = "homura"
command = ~D, DB, B, D, DB, b
time = 24

[Command]
name = "homura"
command = ~D, DB, B, D, DB, c
time = 24

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

;==螺旋脚(Rasen-kyaku)===
[Command]
name = "rasen_a"
command = ~D, DB, B, a
time = 12

[Command]
name = "rasen_b"
command = ~D, DB, B, b
time = 12

[Command]
name = "rasen_c"
command = ~D, DB, B, c
time = 12

;==空蝉(Utsusemi)===
[Command]
name = "utsusemi_a"
command = ~F, D, DF, a
time = 18

[Command]
name = "utsusemi_b"
command = ~F, D, DF, b
time = 18

[Command]
name = "utsusemi_c"
command = ~F, D, DF, c
time = 18

;==羅刹刃(Rasetsu-jin)===
[Command]
name = "rasetsu_x"
command = ~F, DF, D, DB, B, x
time = 18

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

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

;==蜻蛉(Kagerou)===
[Command]
name = "kagerou_a"
command = ~B, DB, D, DF, F, a
time = 18

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

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

;==一文字(Ichimonji)==
[Command]
name = "ichimonji_x"
command = ~D, DF, F, x
time = 12

[Command]
name = "ichimonji_y"
command = ~D, DF, F, y
time = 12

[Command]
name = "ichimonji_z"
command = ~D, DF, F, z
time = 12

;==旋風(Tsumuji)===
[Command]
name = "tsumuji_x"
command = ~B, D, DB, x
time = 18

[Command]
name = "tsumuji_y"
command = ~B, D, DB, y
time = 18

[Command]
name = "tsumuji_z"
command = ~B, D, DB, z
time = 18

;==蜻蛉・改(Kagerou-Kai)===
[Command]
name = "kagerou-kai_a"
command = ~B, D, DB, a
time = 18

[Command]
name = "kagerou-kai_b"
command = ~B, D, DB, b
time = 18

[Command]
name = "kagerou-kai_c"
command = ~B, D, DB, c
time = 18

;--アルティメットカウンター(Ultimate Counter)--
[Command]
name = "kosode"
command = ~B, DB, D, x
time = 12

[Command]
name = "kosode"
command = ~B, DB, D, y
time = 12

[Command]
name = "kosode"
command = ~B, DB, D, z
time = 12

[Command]
name = "kimo"
command = ~B, DB, D, a
time = 12

[Command]
name = "kimo"
command = ~B, DB, D, b
time = 12

[Command]
name = "kimo"
command = ~B, DB, D, c
time = 12

;-| ２回押し技 |-----------------------------------------------------------
[Command]
name = "longjump"
command = $D, $U
time = 10

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

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

;-| ２〜３個のボタン同時押し技 |-----------------------------------------------

[Command]
name = "recovery"
command = x+y
time = 1

[Command]
name = "recovery"
command = y+z
time = 1

[Command]
name = "recovery"
command = x+z
time = 1

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

[Command]
name = "bc"
command = b+c
time = 1

[Command]
name = "ac"
command = a+c
time = 1

[Command]
name = "ax"
command = a+x
time = 1

[Command]
name = "by"
command = b+y
time = 1

[Command]
name = "cz"
command = c+z
time = 1

;-| 方向キー＋ボタン設定 |--------------------------------------------------------------
[Command]
name = "down_x";Required (do not remove)
command = /$D,x
time = 1

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

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

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

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

[Command]
name = "down_c";Required (do not remove)
command = /$D,c
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 = "s"
command = s
time = 1

[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

[Command];（ジャストディフェンス用）
name = "backdown"
command = DB
time = 1

[Command]
name = "fwddown"
command = DF
time = 1

[Command]
name = "backup"
command = UB
time = 1

[Command]
name = "fwdup"
command = UF
time = 1

;-| ボタン押しっぱなし設定 |-----------------------------------------------------------
[Command]
name = "hold_x"
command = /x
time = 1

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

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

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

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

[Command]
name = "hold_c"
command = /c
time = 1
;-| 方向キー押しっぱなし設定 |--------------------------------------------------------------
[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

;---------------------------------------------------------------------------
; 下の記述↓は絶対に消さないでください。
[Statedef -1]
;===========================================================================
;キャンセル設定

[State -1]
type =Varset
trigger1 = var(3)>0
var(3)=0
ignorehitpause=1

;通常技→必殺技
[State -1,special]
type = VarSet
triggerall = !var(21) && movecontact && !var(3) && !fvar(21) && !(fvar(37)&&ceil(fvar(13))%512>255)
triggerall = !(prevstateno=200&&(stateno!=[200,205])&&(stateno!=[210,215])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)
triggerall = (prevstateno!=[210,215])&&(prevstateno!=[220,225])&&(prevstateno!=[230,235])&&(prevstateno!=[240,245])&&(prevstateno!=[250,255])
triggerall = !(prevstateno=400&&(stateno!=[200,205])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)&&prevstateno!=410&&prevstateno!=420&&prevstateno!=440&&prevstateno!=450
triggerall = prevstateno!=600&&prevstateno!=610&&prevstateno!=620&&prevstateno!=630&&prevstateno!=640&&prevstateno!=650
trigger1 = (StateNo=200&&AnimElemtime(5)<0)|| (StateNo=230&&AnimElemtime(4)<0)
trigger2 = (StateNo=400&&AnimElemtime(4)<0) || (StateNo=410&&AnimElemtime(4)<0) || (StateNo=430&&AnimElemtime(3)<=0) || (StateNo=440&&AnimElemtime(6)<0)
trigger3 = (StateNo=920&&(movecontact=[1,5]))
var(3)=1
ignorehitpause = 1

;通常技→スーパーコンボ（超必殺技）
[State -1,super]
type = VarSet
triggerall = !var(21) && movecontact && !var(3) && !fvar(21) && !(fvar(37)&&ceil(fvar(13))%512>255)
triggerall = !(prevstateno=200&&(stateno!=[200,205])&&(stateno!=[210,215])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)
triggerall = (prevstateno!=[210,215])&&(prevstateno!=[220,225])&&(prevstateno!=[230,235])&&(prevstateno!=[240,245])&&(prevstateno!=[250,255])
triggerall = !(prevstateno=400&&(stateno!=[200,205])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)&&prevstateno!=410&&prevstateno!=420&&prevstateno!=440&&prevstateno!=450
triggerall = prevstateno!=600&&prevstateno!=610&&prevstateno!=620&&prevstateno!=630&&prevstateno!=640&&prevstateno!=650
trigger1 = (StateNo=210 && AnimElemTime(5)<0)||(StateNo=920 && AnimElemTime(7)<0&&var(1))
var(3)=2
ignorehitpause = 1

;通常技→必殺技
[State -1,special]
type = VarSet
triggerall = !var(21) && movecontact && !var(3) && fvar(21) && !(fvar(37)&&ceil(fvar(13))%512>255)
triggerall = !(prevstateno=200&&(stateno!=[200,205])&&(stateno!=[210,215])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)
triggerall = (prevstateno!=[210,215])&&(prevstateno!=[220,225])&&(prevstateno!=[230,235])&&(prevstateno!=[240,245])&&(prevstateno!=[250,255])
triggerall = !(prevstateno=400&&(stateno!=[200,205])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)&&prevstateno!=410&&prevstateno!=420&&prevstateno!=440&&prevstateno!=450
triggerall = prevstateno!=600&&prevstateno!=610&&prevstateno!=620&&prevstateno!=630&&prevstateno!=640&&prevstateno!=650
trigger1 = StateNo=200 || StateNo=230
trigger2 = StateNo=400 || (StateNo=410&&AnimElemtime(4)<0) || StateNo=430 || StateNo=440
trigger3 = (StateNo=920&&(movecontact=[1,5]))
var(3)=1
ignorehitpause = 1

;通常技→スーパーコンボ（超必殺技）
[State -1,super]
type = VarSet
triggerall = !var(21) && movecontact && !var(3) && fvar(21) && !(fvar(37)&&ceil(fvar(13))%512>255)
triggerall = !(prevstateno=200&&(stateno!=[200,205])&&(stateno!=[210,215])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)
triggerall = (prevstateno!=[210,215])&&(prevstateno!=[220,225])&&(prevstateno!=[230,235])&&(prevstateno!=[240,245])&&(prevstateno!=[250,255])
triggerall = !(prevstateno=400&&(stateno!=[200,205])&&(stateno!=[230,235])&&stateno!=400&&stateno!=430)&&prevstateno!=410&&prevstateno!=420&&prevstateno!=430&&prevstateno!=440&&prevstateno!=450
triggerall = prevstateno!=600&&prevstateno!=610&&prevstateno!=620&&prevstateno!=630&&prevstateno!=640&&prevstateno!=650
trigger1 = StateNo=210||stateno=920
var(3)=2
ignorehitpause = 1

;通常技→必殺技（キャンセルエニィムーブ）
[State -1,super]
type = VarSet
triggerall = movecontact && !var(3) && fvar(37) && ceil(fvar(13))%512>255
trigger1 = (StateNo=[200,799])&&!var(21)
trigger2 = stateno=[920,930]
var(3)=1
ignorehitpause = 1

;空振りキャンセル
[State -1]
type = VarSet
triggerall = !var(3)
triggerall = (prevstateno!=[200,799])
trigger1 = ((StateNo=[200,799])||(stateno=[920,930]))&& ifelse(var(56)>0&&(StateNo=[200,799]),1,time<5) && !movecontact
var(3)=3
ignorehitpause = 1

;オリコン中
[State -1,oricom]
type = VarSet
triggerall = var(59)=1 && var(56)>0 && !var(3)
trigger1 = ((StateNo=[200,799]) || ((StateNo=[1000,1999]) && Statetype!=A))&&movecontact
trigger2 = stateno=1450&&(projcontacttime(6000)=[1,30])
trigger3 = stateno=1850&&AnimElemTime(19)>=0&&(projcontacttime(6700)=[1,20])
var(3)=4
ignorehitpause = 1

;LV2キャンセル
[State -1,oricom]
type = VarSet
triggerall = !var(3) && Statetype!=A && var(1)=1
triggerall = StateNo=[3000,3199]
trigger1 = (projhittime(6100)=[1,30])||(projhittime(6101)=[1,30])||(projhittime(6102)=[1,30])||(projhittime(6103)=[1,30])||(projhittime(6104)=[1,30])||(projhittime(6105)=[1,30])||(projhittime(6106)=[1,30])||(projhittime(6107)=[1,30])
trigger2 = (projhittime(6600)=[1,30])
var(3)=5
ignorehitpause = 1

;スーパーコンボキャンセル
[State -1,oricom]
type = VarSet
triggerall = fvar(37) && ceil(fvar(13))%256>127
triggerall = !var(3) && Statetype!=A && !var(21) && (StateNo=[1000,2099])
trigger1 = numtarget
trigger1 = (movehit||var(13)=1)
trigger2 = (projhittime(6000)=[1,30])&&stateno=1450&&P2movetype=H
trigger3 = numhelper(1770)&&stateno=1750
trigger3 = helper(1770),movehit && helper(1770),numtarget
trigger4 = (projhittime(6700)=[1,30])&&stateno=1850&&P2movetype=H
var(3)=6
ignorehitpause = 1
;=====================================================================
; cpu Function
;=====================================================================
;
[State -1]
type = varset
triggerall = fvar(38) != 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"
fvar(38) = 1

[State -1]
type = VarRandom
triggerall = fvar(38)=1 && enemynear,statetype!=A
trigger1 = gametime%30=0 || StateNo=900 || StateNo=40
v = 54
range = 0,999

;~~~~~~~~~~~~~~~~~オリジナルコンボ~~~~~~~~~~~~~~~~~~~~~~
;;オリジナルコンボ発動
[state -1,clp]
type = ChangeState
value = 2400
triggerall = fvar(38) && P2statetype!=L && statetype!=A && !var(21) && var(59)=1 && Power>=PowerMAX && roundstate=2
trigger1 = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
trigger1 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && Abs(P2bodydist X)<30 && random%4=1
trigger2 = P2statetype=A && enemynear,Vel Y>0 && enemynear,Pos Y<-50 && enemynear,Pos Y>-65 && random%2=0
trigger2 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && P2bodydist X<ifelse(enemynear,Vel X>0,50,30)

;爆龍昇（十文字）
[state -1,clp]
type = ChangeState
value = 3100-(enemynear,backedgebodydist<=10&&P2bodydist X<40)*100
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
trigger1 = P2statetype=A&&enemynear,Vel Y>=(-2+(enemynear,backedgebodydist<=10&&P2bodydist X<40)*2) && (enemynear,Pos Y=[-145+(enemynear,backedgebodydist<=10&&P2bodydist X<40)*40,-70])
trigger1 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && enemynear,hitfall=1 && var(16)>1 && P2bodydist X<140 && var(56)<=80
trigger2 = P2statetype=A&&enemynear,Vel Y>=(-2+(enemynear,backedgebodydist<=10&&P2bodydist X<40)*2) && (enemynear,Pos Y=[-165,-100]) && enemynear,Vel Y>8
trigger2 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && enemynear,hitfall=1 && var(16)>1 && P2bodydist X<140 && var(56)<=80

;牡丹落とし
[state -1,clp]
type = ChangeState
value = 310
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
trigger1 = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
trigger1 = stateno=400 && movecontact=1 && random%13<2 && var(56)<200

;旋風（弱）
[state -1,clp]
type = ChangeState
value = 1800
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2 && !var(47)
triggerall = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
triggerall = enemynear,backedgebodydist<=5
trigger1 = stateno=440 && movecontact=1 && var(16)<=1
trigger2 = stateno=1850 && (projcontacttime(6700)=[1,15])

;蜻蛉（弱）
[state -1,clp]
type = ChangeState
value = 1300
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
triggerall = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
trigger1 = stateno=440 && movecontact=1 && var(16)<=1

;屈中K
[state -1,clp]
type = ChangeState
value = 440
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
triggerall = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
trigger1 = stateno=322 && movecontact=1 && var(16)<=1
trigger2 = stateno=400 && movecontact=1 && var(16)<=1

;燕操り(TsubaKuraguri)
[State -1]
type = ChangeState
value = 350
triggerall = fvar(38) && roundstate = 2 && Statetype!=A && var(21) && enemynear,backedgebodydist<=5
trigger1 = stateno=240 && ifelse(var(56)<100,movecontact=10,movecontact=2)

;立ち中K
[state -1,clp]
type = ChangeState
value = 240
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
trigger1 = stateno=322 && movecontact=1 && var(16)>1
trigger2 = P2statetype=A&&enemynear,Vel Y>0 && (enemynear,Pos Y=[-75,-40])
trigger2 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && enemynear,hitfall=1 && var(16)>1 && P2bodydist X<60 && var(56)>50 && enemynear,backedgebodydist<=5
trigger3 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22)
trigger3 = P2statetype=A&&enemynear,Vel Y>=0 && (enemynear,Pos Y=[-65,-10]) && var(56)>350
trigger4 = stateno=240 && enemynear,Pos Y>-50 && var(56)>100 && movecontact=1 && var(16)=1

;楽車当て
[state -1,clp]
type = ChangeState
value = 322
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
trigger1 = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
trigger1 = stateno=400 && movecontact=1

;;屈弱P
[state -1,clp]
type = ChangeState
value = 400
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
trigger1 = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
trigger1 = stateno=430 && time=4

;;屈弱K
[state -1,clp]
type = ChangeState
value = 430
triggerall = fvar(38) && P2statetype!=L && statetype!=A && var(21) && roundstate=2
trigger1 = (P2statetype!=A||(enemynear,Vel Y<0 && enemynear,Pos Y>-40))
trigger1 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && Abs(P2bodydist X)<40 && ifelse(var(56)>350||fvar(23)<16,random%5<3,random%4=0)

;ジャンプ中P
[state -1,cutom_combo]
type = ChangeState
value = 610
triggerall = fvar(38)=1 && roundstate=2 && enemynear,Statetype!=L && var(21) && statetype=A && enemynear,backedgebodydist>5
triggerall = P2statetype=A&&enemynear,Vel Y>-2 && (P2bodydist Y=[-80,40])
trigger1 = ctrl && enemynear,hitfall=1 && var(16)>1 && P2bodydist X<80 && var(56)>50
trigger2 = stateno=610 && vel Y<2 && movecontact=1 && var(16)>1 && (var(56)>50||(prevstateno!=610&&var(56)<=50))

;ジャンプ
[state -1,cutom_combo]
type = ChangeState
value = 40
triggerall = fvar(38)=1 && roundstate=2 && enemynear,Statetype!=L && var(21) && statetype!=A && enemynear,backedgebodydist>5
trigger1 = P2statetype=A&&(enemynear,Vel Y=[-6,8]) && (enemynear,Pos Y=[-160,-60])
trigger1 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && enemynear,hitfall=1 && var(16)>1 && P2bodydist X<120 && var(56)>100

;歩き（前）
[state -1,cutom_combo]
type = ChangeState
value = 21
triggerall = fvar(38)=1 && roundstate=2 && enemynear,Statetype!=L && var(21) && statetype!=A
trigger1 = P2statetype=A&&enemynear,Vel Y>0 && (enemynear,Pos Y=[-100,-50])
trigger1 = (ctrl||stateno=3||stateno=13||stateno=21||stateno=22) && enemynear,hitfall=1 && var(16)>1 && (P2bodydist X=[55,80]) && var(56)>50

;========Land========
;===Anti Air===

;^^^^^^ブロッキング反撃^^^^^^
[state -1,chp]
type = changestate
value = var(24)
triggerall = fvar(38) && roundstate=2 && P2statetype!=L && statetype!=A
triggerall = (var(24)=410||var(24)=430||(var(24)=[800,820]))
trigger1 = var(24) && (ctrl||stateno=13||stateno=21||stateno=22 || (stateno=52&&Time>=2))

[state -1,chp]
type = changestate
value = var(24)
triggerall = fvar(38) && roundstate=2 && P2statetype!=L && statetype=A
triggerall = var(24)=650
trigger1 = var(24) && ctrl
;^^^^^^^^^^^^^^スーパーコンボ^^^^^^^^^^^^^^^^^^^
;焔旋風(LV.3専用)
[State -1, homura]
type = ChangeState
value = 3300
triggerall = fvar(38)
triggerall = roundstate = 2 && statetype != A && !(P2statetype = L && P2stateno!=5150) && !var(47)
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))||(var(59)=7&&Power>=1500&&var(57)>2)
triggerall = !fvar(33)
triggerall = (ctrl||stateno=13||(stateno=[21,22]))
trigger1 = (P2statetype!=A || (enemynear,Pos Y > -40 && enemynear,Vel Y < 0&&enemynear,hitfall=0))
trigger1 = (P2bodydist X=[80,160]) && var(54)%9<ifelse(var(23)<200&&var(59)!=4,6,(ifelse(var(59)=4,3,2)-(P2bodydist X>120)))
trigger2 = P2statetype=A && (enemynear,Pos Y =[-75,-50]) && (enemynear,Vel Y =[ 0,4])&&enemynear,hitfall=0 && P2bodydist X<140 && !(enemynear,P2dist X<0&&enemynear,vel X>0) && enemynear,vel X>=0

;閻魔突き(LV.3専用)
[State -1, enma]
type = ChangeState
value = 3200
triggerall = fvar(38)
triggerall = roundstate = 2 && statetype != A && !(P2statetype = L && P2stateno!=5150)
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))||(var(59)=7&&Power>=1500&&var(57)>2)
triggerall = (P2statetype!=A || (enemynear,Pos Y > -40 && enemynear,Vel Y < 0&&enemynear,hitfall=0))
triggerall = !fvar(33)
trigger1 = stateno=400 && var(16)>1 && var(3)=1
trigger1 = P2bodydist X<60

;Lv.3爆龍昇
[State -1, enma]
type = ChangeState
value = 3120
triggerall = fvar(38)
triggerall = roundstate = 2 && statetype != A && !(P2statetype = L && P2stateno!=5150)
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))||(var(59)=7&&Power>=1500&&var(57)>2)
triggerall = (ctrl||stateno=13||stateno=21||stateno=22) && enemy,life>ifelse(var(22)||var(59)=2||var(59)=7,60,140)
trigger1 = (P2stateno=[1657,1659]) && P2statetype=A && P2movetype=H && enemynear,Pos Y>=-180 && enemynear,Pos Y<-140 && enemynear,Vel Y>0 && random%5<2
trigger2 = (stateno=410||stateno=440) && var(16)>1 && movecontact=1 && P2bodydist X<100

;Lv.1爆龍昇
[State -1, enma]
type = ChangeState
value = 3100
triggerall = fvar(38)
triggerall = roundstate = 2 && statetype != A && !(P2statetype = L && P2stateno!=5150)
triggerall = (!var(59) && Power>=1000)||(var(59)=4 && !var(22) && Power>=1000)||(var(59)=3 && ((var(22)&& (100*Life/const(data.life)>30))||(!var(22)&&100*Life/const(data.life)<=30)))||(var(59)=7&&Power>=1500&&var(57)<3)
trigger1 = (ctrl||stateno=13||stateno=21||stateno=22) && ifelse(var(59)=3||var(59)=4,1,enemy,life>60)
trigger1 = (P2stateno=[1657,1659]) && P2statetype=A && P2movetype=H && enemynear,Pos Y>=-180 && enemynear,Pos Y<-140 && enemynear,Vel Y>0 && random%3=0
trigger2 = (ctrl||stateno=13||stateno=21||stateno=22)
trigger2 = enemynear,hitfall=1 && P2statetype=A && P2movetype=H && enemynear,Pos Y>=-280 && enemynear,Pos Y<-200 && enemynear,Vel Y>10 && random%3=0 && var(18)<4 && var(59)=3 && 100*Life/const(data.life)<=30
trigger3 = (stateno=210||stateno=410||stateno=440) && movecontact=1
trigger3 = (P2bodydist X=[60,110]) && var(54)%7<5 && var(59)=3 && 100*Life/const(data.life)<=30
trigger4 = (stateno=410||stateno=440) && var(16)>1 && movecontact=1 && P2bodydist X<100

;Lv.3十文字
[State -1, jumonji]
type = ChangeState
value = 3020
triggerall = fvar(38) && !var(42)
triggerall = roundstate = 2 && statetype != A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,time>10)) && !numproj
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))||(var(59)=7&&Power>=1500&&var(57)>2)
triggerall = (P2statetype!=A || (enemynear,Pos Y > -40 && enemynear,Vel Y < 0&&enemynear,hitfall=0))
triggerall = !fvar(33)
trigger1 = (ctrl||stateno=3||stateno=13||(stateno=[21,22]))
trigger1 = P2bodydist X>(140-(prevstateno=950)*40-(P2statetype=L)*140)
trigger1 = ifelse(prevstateno=950&&P2bodydist X>100,random%5<3,ifelse(var(22),ifelse(var(23)<200,random%10=0,ifelse(fvar(34)>=120,random%35=0,random%25=0)),var(54)%4=0&&random%25=0))
trigger2 = P2bodydist X>50 && ifelse(stateno=210||stateno=410,var(54)%5>0,var(54)%5>1) && (var(3)=[1,2]) && (stateno=210||stateno=410||stateno=440||stateno=920)
trigger2 = var(59)>=3&&var(23)<=200

;Lv.1十文字
[State -1, jumonji]
type = ChangeState
value = 3000
triggerall = fvar(38) && !var(42)
triggerall = roundstate = 2 && statetype != A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,time>10)) && !numproj
triggerall = (!var(59) && Power>=1000)||(var(59)=4 && !var(22) && Power>=1000)||(var(59)=3 && ((var(22)&& (100*Life/const(data.life)>30))||(!var(22)&&100*Life/const(data.life)<=30)))||(var(59)=7&&Power>=1500&&var(57)<3)
triggerall = (enemy,life<60||Power>=2000||(var(59)=3&&(100*Life/const(data.life)<=30)))
triggerall = (P2statetype!=A || (enemynear,Pos Y > -40 && enemynear,Vel Y < 0&&enemynear,hitfall=0))
triggerall = !fvar(33)
trigger1 = (ctrl||stateno=3||stateno=13||(stateno=[21,22]))
trigger1 = P2bodydist X>(140-(P2statetype=L)*150)&&ifelse(var(59)=3,ifelse((var(23)=[1,200])||(100*Life/const(data.life)<=30),ifelse(P2statetype=L,random%3=0,random%17=0),ifelse(fvar(34)>=120,random%55=0,random%35=0)),var(54)%7=0&&random%19=0)
trigger2 = P2bodydist X>50 && ifelse(stateno=210||stateno=410,var(54)%5>2,var(54)%5>3) && (var(3)=[1,2]) && (stateno=210||stateno=410||stateno=440||stateno=920)
trigger2 = var(59)!=3 && var(54)%4=0
trigger3 = P2bodydist X>50 && ifelse(stateno=210||stateno=410,var(54)%5>0,var(54)%5>1) && (var(3)=[1,2]) && (stateno=210||stateno=410||stateno=440||stateno=920)
trigger3 = var(59)=3 && ((var(22)&& (100*Life/const(data.life)>30))||(!var(22)&&100*Life/const(data.life)<=30))
trigger4 = (ctrl||stateno=3||stateno=13||(stateno=[21,22])) && ifelse(enemynear,facing=facing,enemynear,frontedgebodydist<=15,enemynear,backedgebodydist<=15)&&((projcontacttime(6102)=[1,20])||(projcontacttime(6105)=[1,20]))
trigger4 = var(59)=3 && ((var(22)&& (100*Life/const(data.life)>30))||(!var(22)&&100*Life/const(data.life)<=30))

----------CPU------------------

;===Special Moves===
;強(弱)・羅刹刃
[State -1]
type = ChangeState
value = 1120-(P2stateno=5300&&enemynear,time>45&&P2bodydist X<140)*20
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger1 = teammode=simul
trigger1 = (100*enemy,Life/enemy,const(data.life))>30 && (100*Life/const(data.life))>30
trigger1 = (P2bodydist X=[160,220]) && var(54)%4=0 && random%7=0&&numpartner
trigger2 = !(teammode=simul)
trigger2 = (P2bodydist X=[0,220])&&(P2stateno=5300||(numhelper(6900)&&(P2stateno=15300||P2stateno=15340))) && enemynear,time<80

;中・羅刹刃
[State -1]
type = ChangeState
value = 1110
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = (stateno=[200,599]) && movecontact=1
trigger1 = ((P2stateno=[15910,15925])||(P2stateno=[5910,5920]))

;空蝉
[State -1]
type = ChangeState
value = 1210+ifelse(movecontact&&enemynear,backedgebodydist>40,-10,ifelse(backedgebodydist >20,ifelse(var(54)%3=0,10,ifelse(var(54)%4=1,-10,0)),0))
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger1 = P2bodydist X>160 && var(54)%5=0 && random%9=0
trigger2 = var(54)%5>2 && var(3)=1 && (stateno=400||stateno=410||stateno=430||stateno=440) && backedgebodydist<=20
trigger3 = stateno=400 && movecontact=1 && enemynear,backedgebodydist>40
trigger3 = Abs(P2bodydist X)<60 && var(16)<=1 && random%6=1
trigger4 = fvar(37) && ceil(fvar(13))%512>255 && movecontact=1 && var(54)%11<1
trigger4 = ((stateno=220||stateno=420)&&var(54)%7<4)||(stateno=[320,322])||stateno=210||stateno=930||stateno=540

;旋風
[State -1]
type = ChangeState
value = 1800
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !var(42) && !var(47) && !numproj
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = (P2bodydist X=[40,60]) && (stateno=410||stateno=440) && ifelse(enemynear,backedgebodydist<=5,var(54)%7<2,var(54)%5<1) && var(3)=1
trigger2 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger2 = (P2bodydist X=[0,90]) && var(54)%5<2 && ifelse(fvar(34)>=120,var(54)%3=0,1) && P2stateno=5120 && (enemynear,time=[5,10])

;蜻蛉・改
[State -1]
type = ChangeState
value = 1700+(P2bodydist X>160&&random%2=0)*(20-(random<350)*10)
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !var(48) && var(47)=1 && !numproj && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger1 = P2bodydist X>160 && random%5=0 && var(54)%11<2
trigger2 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger2 = (P2bodydist X=[0,120]) && var(54)%5<1 && ifelse(fvar(34)>=120,var(54)%3=0,1) && P2stateno=5120 && (enemynear,time=[5,10])
trigger3 = fvar(37) && ceil(fvar(13))%512>255 && movecontact=1 && var(54)%11<2
trigger3 = ((stateno=220||stateno=420)&&var(54)%7<4)||stateno=540

;鎖縛り
[State -1]
type = ChangeState
value = 1600
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !var(42) && var(47)=1
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = (P2bodydist X=[80,100]) && (stateno=410||stateno=440) && var(54)%5<1 && var(3)=1
trigger2 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger2 = (P2bodydist X=[ifelse(numproj,60,110),ifelse(numproj,100,150)]) && ifelse(numproj,var(59)<2,var(54)%5<1) && ifelse(fvar(34)>=120,var(54)%3=0,1)

;蜻蛉
[State -1]
type = ChangeState
value = ifelse(backedgebodydist<=10&&var(54)%7<5,1320,ifelse(random%4=0&&P2bodydist X>100&&!enemynear,hitfall&&P2statetype!=L,1310,1300))
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !var(42) && !(var(21)&&var(16)>1)
trigger1 = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = P2bodydist X>40 && ifelse(stateno=410,var(54)%5<=2,ifelse(stateno=400||stateno=430,var(54)%5<1,var(54)%5<2)) && var(3)=1
trigger1 = (stateno=400||stateno=430||stateno=440||stateno=410||stateno=920)
trigger2 = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger2 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger2 = P2bodydist X>ifelse(numproj,140,180) && ifelse(numproj,ifelse(var(59)>2,var(54)%5<3,1),ifelse(fvar(34)>=120,var(54)%4=0,var(54)%2=0)) && ifelse(var(59)=3||var(59)=5,random%9=0,random%5=0)
trigger3 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger3 = !(teammode=simul)
trigger3 = !(P2stateno=5120&&enemynear,animtime>-14) && (P2statetype=L||((P2stateno=[3206,3207])&&P2movetype=H))&random%3=0&&var(59)!=3&&var(59)!=5&&(P2stateno!=[1657,1659])&&!(P2stateno=15340&&P2movetype=H)
trigger4 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger4 = enemynear,hitfall=1 && ((enemynear,vel Y<0&&enemynear,pos Y<-200)||(enemynear,pos Y<(-140-(var(59)=7)*120) && enemynear,vel Y>=0)) && !enemynear,canrecover
trigger4 = !(var(59)=7 && ((enemynear,Vel Y>2 && enemynear,Pos Y>(-enemynear,Vel Y*24) && enemynear,hitfall)||(P2statetype=L&&P2stateno!=5120&&P2stateno!=5150))&&enemynear,Pos Y<-160 && Abs(P2bodydist X)<120)
trigger5 = fvar(37) && ceil(fvar(13))%512>255 && movecontact=1 && var(54)%11<ifelse((stateno=[320,322]),ifelse(var(16)>=2,11,9),7)
trigger5 = ((stateno=220||stateno=420)&&var(54)%7<4)||(stateno=[320,322])||stateno=210||stateno=930||stateno=540||((stateno=410||stateno=440)&&(prevstateno=400||prevstateno=430))

;弱・一文字
[State -1]
type = ChangeState
value = 1400
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && !numproj && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = fvar(20)!=.1&&fvar(20)!=1.1&&fvar(23)>=6
trigger1 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger1 = P2bodydist X>120 && var(54)%3=0 && ifelse(var(59)=3&&(var(22)||(100*Life/const(data.life)<=30)),random%14=0,random%7=0)
trigger2 = P2bodydist X>50 && ifelse(stateno=410||stateno=920,var(54)%5>2,var(54)%5>3) && var(3)=1 && (stateno=440||stateno=410||stateno=920)
trigger3 = fvar(37) && ceil(fvar(13))%512>255 && movecontact=1 && (var(54)%11=[9,10]) && var(16)<=1
trigger3 = ((stateno=220||stateno=420)&&var(54)%7<4)||((stateno=320||stateno=322)&&var(16)<=1)||stateno=210||stateno=930||((stateno=410||stateno=440)&&(prevstateno=400||prevstateno=430))

;螺旋脚(Rasen-Kyaku)
[State -1,rasen]
type = ChangeState
value = 1000+ifelse(movecontact,20,ifelse((P2bodydist X=[70,100]),10,ifelse(P2bodydist X>100,20,0)))
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-4)) && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = (ctrl||stateno=13||(stateno=[21,22]))
trigger1 = var(54)%7=0 && random%11=0 && (P2bodydist X=[60,120])
trigger2 = stateno=400 && time=3 && movecontact
trigger2 = Abs(P2bodydist X)<60 && var(16)>1 && P2statetype=S && var(54)<350
trigger3 = fvar(37) && ceil(fvar(13))%512>255 && movehit=1 && !numtarget
trigger3 = stateno=540;空中ブロ対処
trigger4 = (ctrl||stateno=13||(stateno=[21,22]))
trigger4 = Abs(P2bodydist X)<80 && enemynear,backedgebodydist<=5 && (projhittime(6700)=[1,40]) && P2movetype=H && random%5<3

;========Throw======
;Ｋ通常投げ(Kick Throw)
[State -1,throw]
type = ChangeState
value = 810-(P2statetype=A||P2movetype=H)*560
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && p2statetype!=L && !var(42) && !(var(21)&&!((var(56)>350&&enemynear,life<100&&var(39))||var(56)<200))
triggerall = P2stateno!=5300&&!(P2stateno=15300&&P2movetype=H)
triggerall = P2BodyDist X <=24 && P2movetype!=H
triggerall = (P2statetype!=A || (enemynear,Pos Y > -30 && enemynear,Vel Y < 0))
trigger1 = (((stateno=105||prevstateno=105||prevstateno=101||(prevstateno=1340&&var(54)%2=0))&&Ctrl)||(stateno=21&&time>7)) && random%5<3 && var(54)%5<=1

;Ｐ通常投げ(Punch Throw)
[State -1,throw]
type = ChangeState
value = 800-(P2statetype=A||P2movetype=H)*580
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && p2statetype!=L && !var(42) && !(var(21)&&!((var(56)>350&&enemynear,life<100&&var(39))||var(56)<200))
triggerall = P2stateno!=5300&&!(P2stateno=15300&&P2movetype=H)
triggerall = P2BodyDist X <=24 && P2movetype!=H
triggerall = (P2statetype!=A || (enemynear,Pos Y > -30 && enemynear,Vel Y < 0))
trigger1 = (var(54)>750||(enemynear,movetype=I && P2statetype=S && (enemynear,time=[18,22]))||(prevstateno=140 && time>2&&random<200)) && (!fvar(33) || (fvar(33)=4&&fvar(30)>2))
trigger1 = (Ctrl||stateno=13 || stateno=22) && !(numhelper(6200)&&enemynear,backedgebodydist <=0&&random%3<1)
trigger2 = (((stateno=105||prevstateno=105||prevstateno=101||prevstateno=1340)&&Ctrl)||(stateno=21&&time>7)) && random%5<3 && var(54)%5<=3
trigger3 = random%3=0 && fvar(32)=1 && (!fvar(33)||fvar(33)&&fvar(30)>4||fvar(33)=4) && (Ctrl||stateno=13|| stateno=21 || stateno=22)

;===Normal Actions===

;木立ち払い
[State -1]
type = ChangeState
value = 540
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-10)) && !var(42)&& !(var(21)&&var(16)>1)
triggerall = P2statetype=A&&enemynear,Pos Y>-90&&enemynear,Pos Y<-60&&enemynear,Vel Y>=0
triggerall = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22||(stateno=100&&time>4)||stateno=101)
trigger1 = ifelse(enemynear,Vel X>0,Abs(P2bodydist X)>20,1) && Abs(P2bodydist X)<(70+ceil(enemynear,Vel X)*5) && random%4=0

;立ち強P
[State -1]
type = ChangeState
value = 220
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,time>22)) && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22||(stateno=100&&time>4)||stateno=101)
trigger1 = (Abs(P2bodydist X)=[120,190]) && random%57=0

;屈強P
[State -1]
type = ChangeState
value = 420
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,time>22)) && !var(42)
triggerall = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22||(stateno=100&&time>4)||stateno=101)
trigger1 = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
trigger1 = (Abs(P2bodydist X)=[120,170]) && random%49=0
trigger2 = (P2stateno=[1657,1659]) && P2statetype=A && P2movetype=H && enemynear,Pos Y>=-180 && enemynear,Pos Y<-140 && enemynear,Vel Y>0 && random%4=0

;立ち中P
[State -1]
type = ChangeState
value = 210
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,time>22)) && !var(42)
triggerall = !((P2stateno=[3206,3207])&&P2movetype=H)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22||(stateno=100&&time>4)||stateno=101)
trigger1 = (Abs(P2bodydist X)=[51-(numhelper(6000))*60,92-(numhelper(6000))*60]) && random%7=0 && (!fvar(33)||(fvar(33)&&ifelse(fvar(33)=1,var(54)%5=0,var(54)%4=0)))

;屈中K(屈中P)
[State -1]
type = ChangeState
value = 440-(random%5<2||P2bodydist X>85)*30
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,time>22)) && !var(42)
triggerall = !((P2stateno=[3206,3207])&&P2movetype=H)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22||(stateno=100&&time>4)||stateno=101)
trigger1 = (Abs(P2bodydist X)=[51-(numhelper(6000))*50,92-(numhelper(6000))*50]) && random%5=0 && (!fvar(33)||(fvar(33)&&ifelse(fvar(33)=1,var(54)%5=0,var(54)%4=0)))
trigger2 = Abs(P2bodydist X)<(50+(enemynear,backedgebodydist<=5)*30) && (projhittime(6700)=[1,40]) && P2movetype=H && random%5<3
trigger3 = fvar(37) && ceil(fvar(13))%512>255 && (stateno=400||(stateno=430&&P2bodydist X>40)) && movecontact=1 && var(54)%13<ifelse(P2bodydist X>40,9,5) && var(16)<=1

;牡丹落とし(Botan-Otoshi)
[State -1]
type = ChangeState
value = 310
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A &&(!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,time>16))
trigger1 = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger1 = var(54)%15=0 && var(16)<=1 && (P2bodydist X=[100,140]) && random%4=0 && !enemynear,hitfall

;堂鐘打ち
[State -1]
type = ChangeState
value = 321
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-4)) && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = stateno=400 && time=3 && movecontact
trigger1 = Abs(P2bodydist X)<30 && var(16)<=1 && ifelse(fvar(37) && ceil(fvar(13))%512>255,var(54)%13<6,var(54)%5=0)

;楽車当て
[State -1]
type = ChangeState
value = 322
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-4)) && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = stateno=400 && time=3 && movecontact
trigger1 = Abs(P2bodydist X)<60 && ifelse(fvar(37) && ceil(fvar(13))%512>255&&var(16)<=1,var(54)%7<4,var(16)>1)

;屈弱P
[State -1]
type = ChangeState
value = 400
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-4)) && !var(42)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = stateno=430 && time=5
trigger1 = Abs(P2bodydist X)<35

;屈弱K
[State -1]
type = ChangeState
value = 430
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-4)) && !var(42)
triggerall = !((P2stateno=[3206,3207])&&P2movetype=H)
triggerall = P2stateno!=5300&&!(P2stateno=15300&&P2movetype=H)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = (Ctrl||stateno=3||Stateno=13||stateno=21||stateno=22)
trigger1 = Abs(P2bodydist X)<51 && random%7<2 && (!fvar(33)||(fvar(33)&&ifelse(fvar(33)=1,var(54)%4=0,var(54)%3=0)))

;千木落とし(Chigi-Otoshi)
[State -1]
type = ChangeState
value = 700
triggerall = fvar(38)=1 && roundstate=2 && Statetype=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-10))&& !(var(21)&&var(16)>1)
triggerall = (P2statetype=A&&enemynear,Pos Y<-50&&enemynear,Vel Y>=0)
triggerall = Ctrl
trigger1 = Abs(P2bodydist X)<(20+ceil(Vel X)*7) && random%7<2 && vel Y<-6 && (Pos Y=[-40,-20])

;ジャンプ弱P
[State -1]
type = ChangeState
value = 600
triggerall = fvar(38)=1 && roundstate=2 && Statetype=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-10))&& !(var(21)&&var(16)>1)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)||(P2statetype=A&&enemynear,Pos Y<-50&&enemynear,Vel Y>=0)
triggerall = Ctrl
trigger1 = Abs(P2bodydist X)<(35+ceil(Vel X)*7) && random%7<2 && vel Y>0 && (Pos Y=[-90,-60]) && var(54)%2=0

;ジャンプ弱K
[State -1]
type = ChangeState
value = 630
triggerall = fvar(38)=1 && roundstate=2 && Statetype=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-10))&& !(var(21)&&var(16)>1)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)||(P2statetype=A&&enemynear,Pos Y<-50&&enemynear,Vel Y>=0)
triggerall = Ctrl
trigger1 = Abs(P2bodydist X)<(30+ceil(Vel X)*7) && random%7<2 && vel Y>2 && (Pos Y=[-90,-40]) && var(54)%2!=0

;ジャンプ強K
[State -1]
type = ChangeState
value = 650
triggerall = fvar(38)=1 && roundstate=2 && Statetype=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-10))&& !(var(21)&&var(16)>1)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)
triggerall = Ctrl
trigger1 = Abs(P2bodydist X)<55 && random%3=0 && vel Y<-4 && Pos Y>-40

;ジャンプ強P
[State -1]
type = ChangeState
value = 620
triggerall = fvar(38)=1 && roundstate=2 && Statetype=A && (!(P2statetype=L&&P2stateno!=5150)||(P2stateno=5120&&enemynear,animtime>-10))&& !(var(21)&&var(16)>1)
triggerall = P2statetype!=A||(P2statetype=A&&enemynear,Pos Y>=-40&&enemynear,Vel Y<=0)||(P2statetype=A&&enemynear,Pos Y<-50&&enemynear,Vel Y>=0)
triggerall = Ctrl
trigger1 = Abs(P2bodydist X)>=(80-(enemynear,Vel X>3)*20) && Abs(P2bodydist X)<=(140-(enemynear,Vel X>3)*20) && random%7<2 && vel Y>ifelse(var(4)=1,-.5,0) && (Pos Y=[-95,-65+(var(7)=1)*15]) && var(54)%4!=0

;==Sub System===
;パワーMAX発動
[State -1]
type = ChangeState
value = 2500
triggerall = fvar(38)=1 && roundstate=2 && statetype!=A && !var(42)
triggerall = Power >= 2000 && var(59)=4 && !var(22)
triggerall = (100*enemy,Life/enemy,const(data.life))>30 && (100*Life/const(data.life))>30
triggerall = (Ctrl||stateno=13||stateno=21||stateno=22)
trigger1 = abs(enemynear,Pos X - Pos X) >= 140 && Random <= ifelse(Power>=3000,60,7)
trigger2 = enemynear,stateno!=5120 && p2statetype=L && Random <= ifelse(Power>=3000,400,60)

;レベルアップ
[State -1,lv_up]
type = ChangeState
value = 2600
triggerall = fvar(38)=1 && roundstate=2 && Statetype!=A
triggerall = Power >= 1500 && var(59)=7 && var(57)<6
triggerall = Abs(enemy,life-life)<300
triggerall = (Ctrl||stateno=13||stateno=21||stateno=22) || (StateNo=100 && animelemtime(2)>=0) || StateNo=101
trigger1 = abs(enemynear,Pos X - Pos X) <= 80 && Random <ifelse(P2statetype=A&&enemynear,Vel Y>1 && (enemynear,Pos Y=[-90,-50]),50,3)
trigger2 = enemynear,stateno!=5120 && p2statetype=L && Random <=ifelse(var(57)<3,250,80)
trigger3 = Abs(P2bodydist X)>100 && random<ifelse(Power>=3000,ifelse(var(57)<3,60,15),ifelse(var(57)<3,12,9))

;ダウン追い討ち(Down Attack?)
[state -3,varset]
type = ChangeState
value = 960
triggerall = fvar(38)=1 && roundstate=2 && statetype!=A && !var(42)
triggerall = (ctrl||stateno=13||stateno=21||stateno=22)
triggerall = var(59)=7 && ((enemynear,Vel Y>2 && enemynear,Pos Y>(-enemynear,Vel Y*24) && enemynear,hitfall)||(P2statetype=L&&P2stateno!=5120&&P2stateno!=5150))
trigger1 = random%7<2 && enemynear,Pos Y<-160 && Abs(P2bodydist X)<120

[State -1]
;回り込み
type = ChangeState
value = 900
triggerall = fvar(38) && roundstate=2 && !(var(21) && enemy,hitfall=1)
triggerall = (!fvar(37)&&(var(59)<=1 || var(59)=4))||(fvar(37) && ceil(fvar(14))%32>15)
triggerall = StateType!=A && (ctrl || StateNo=3 || StateNo=13 || StateNo=21 || StateNo=22)
trigger1 = var(54)<=400 && enemy,numproj>0 && P2BodyDist X>160 && ((enemynear,movetype=A && Enemynear,Time>((P2BodyDist X)/10+2))||enemynear,movetype!=A) && inguarddist && enemynear,Statetype!=L
trigger2 = (random < ifelse(P2bodydist X>170,1,ifelse(fvar(33),6,ifelse(var(55)>20,2,4)))) && P2BodyDist X>=120 && !(P2Statetype=L&&enemynear,alive)
trigger3 = enemynear,statetype=A && enemynear,Vel Y>=0 && random<300 && Abs(P2bodydist X)<40 && var(54)<ifelse(backedgebodydist <20,700,150) && enemynear,backedgebodydist >100 && !(P2Statetype=L&&enemynear,alive) && P2movetype!=H

;避け
[State -1]
type = ChangeState
value = 910
triggerall = fvar(38) && roundstate=2 && enemynear,Statetype!=L && !(var(21) && enemy,hitfall=1)
triggerall = ((!fvar(37)&&var(59)=3)||(fvar(37) && ceil(fvar(14))%64>31)) && !fvar(31) && !numproj
triggerall = statetype != A && (ctrl || StateNo=3 || StateNo=13 || StateNo=21 || StateNo=22)
trigger1 = (P2BodyDist X = [60,160]) && (enemynear,Pos Y>-40 && enemynear,Vel Y<=0) && var(54)%7>ifelse(floor(var(55)/10)>0,5,4)
trigger2 = var(54)<=400 && enemy,numproj>0 && P2BodyDist X>160 && ((enemynear,movetype=A && Enemynear,Time>((P2BodyDist X)/10+2))||enemynear,movetype!=A) && inguarddist

;Pカウンター攻撃
[State -1]
type = ChangeState
value = 920
triggerall = fvar(38)=1 && (roundstate=2 || (RoundState=3 && Win)) && Statetype!=A && !var(42)
trigger1 = StateNo=910 && (Time=[15,25]) && Abs((P2BodyDist X) = [60,78]) && random <30

;Kカウンター攻撃
[State -1]
type = ChangeState
value = 930
triggerall = fvar(38)=1 && (roundstate=2 || (RoundState=3 && Win)) && Statetype!=A && !var(42)
trigger1 = StateNo=910 && (Time=[15,25]) && Abs((P2BodyDist X) = [70,82]) && (random =[31,46])

;ガードキャンセル移動（前）
[State -1]
type = ChangeState
value = 2100
triggerall = fvar(38)=1 && (roundstate=2 || (RoundState=3 && Win))
triggerall = ((Power >= 1000 && (!var(59)||var(59)=3||var(59)=4))||(Power>=1500&&(var(59)=1||var(59)=7))||(var(59)=3 && var(22))||(Power>=3000&&(var(59)=2||var(59)=5))) && var(31)>=0
triggerall = (!fvar(37)&&var(59)=4)||(fvar(37)&&ceil(fvar(14))%512>255)
triggerall = StateNo=150 || StateNo=152
trigger1 = random<9 && P2BodyDist X < 60 && var(31)>=0 && gethitvar(ctrltime)>=17 && backedgebodydist <40 && var(59)!=1
trigger2 = life<28 && gethitvar(ctrltime)>=17 && backedgebodydist <40 && (P2stateno=[1000,3999]) && P2bodydist X<60 && (prevstateno=[150,153]) && random%12=0

;ガードキャンセル攻撃
[State -1]
type = ChangeState
value = 2000
triggerall = fvar(38)=1 && roundstate=2
triggerall = ((Power >= 1000 && (!var(59)||var(59)=3||var(59)=4))||(Power>=1500&&(var(59)=1||var(59)=7))||(var(59)=3 && var(22))||(Power>=3000&&(var(59)=2||var(59)=5))) && var(31)>=0
triggerall = (!fvar(37)&&(!var(59)||var(59)=1||var(59)=3||var(59)=4))||(fvar(37)&&ceil(fvar(14))%256>127)
trigger1 = (StateNo=150||StateNo=152) && (((prevstateno=[150,155])&&((P2stateno=[1000,4999])||Gethitvar(damage)))||backedgebodydist<=0||var(31)<10) && (Abs(life-enemy,life)<=300||Life>500)
trigger1 = random <ifelse(Life<22,80,15) && P2bodydist X<60 && var(59)!=1
trigger2 = life<28 && (P2stateno=[1000,3999]) && P2bodydist X<60 && (prevstateno=[150,153]) && random%12=0

;アルティメットガード
[state -3,varset]
type = ChangeState
value = 4200
triggerall = fvar(38)=1 && roundstate=2 && statetype!=A
triggerall = (stateno=[150,153])||(Life<10&&(ctrl||stateno=13||stateno=21||stateno=22))
triggerall = var(59)=7 && P2bodydist X<70 && P2dist X>0
trigger1 = ifelse(P2bodydist X<40,ifelse(Life<22,random%4=1,random%55=1),ifelse(Life<22,random%6=1,random%90=1))

;Lv.3十文字連発用
[state -1]
type = varset
triggerall = fvar(38)=1
trigger1 = (stateno=3||stateno=13||stateno=21||stateno=22)&&time=1
var(2)=0

;Lv.3十文字連発用
[state -1]
type = varset
triggerall = fvar(38)=1 && roundstate=2 && statetype!=A && !var(42)
triggerall = !var(22) && var(59)=3
triggerall = (P2statetype!=A || (P2statetype=A && enemynear,Pos Y>-40 && enemynear,Vel Y<=0))
trigger1 = numproj>0 && (stateno=[3000,3020]) && animtime=0 && P2bodydist X>140
var(2)=50

;ゲージ溜め動作(Power Charge)
[State -1]
type = ChangeState
value = 950
triggerall = fvar(38)=1 && roundstate=2 && statetype!=A && !var(42)
triggerall = !var(22) && var(59)=3 && (ctrl || StateNo=3 || StateNo=13 || StateNo=21 || StateNo=22)
trigger1 = (P2statetype!=A || (P2statetype=A && enemynear,Pos Y>-40 && enemynear,Vel Y<=0))
trigger1 =  enemynear,Statetype=L && var(54) <ifelse((100*Life/const(data.life))<30,700+(power>750)*150,550+(power>750)*150) && P2BodyDist X >140
trigger2 = (P2statetype!=A || (P2statetype=A && enemynear,Pos Y>-40 && enemynear,Vel Y<=0))
trigger2 = P2BodyDist X>=120 && ifelse(power>750,var(54)%11<3,ifelse(fvar(34)>=120,var(54)%8<1,var(54)%11<2))
trigger3 = numproj>0 && var(2)=50 && random%5<3 && P2bodydist X>140
trigger4 = enemynear,hitfall=1 && ((enemynear,vel Y<0&&enemynear,pos Y<-200)||(enemynear,pos Y<-100 && enemynear,vel Y>=0)) && !enemynear,canrecover

;時間差起き上がり
[state -3,varset]
type = varSet
triggerall = fvar(38)=1
triggerall = stateno=5110 && var(2)=1
triggerall = ((!fvar(37)&&(!var(59)||var(59)=2 || var(59)=3)) || (fvar(37) && ceil(fvar(14))%32768>16383))
trigger1 = random%3=1 && Abs(P2bodydist X)<=50 && var(54)%3=0
var(1)=1

;ダウン回避
[state -3,varset]
type = ChangeState
value = 5200
triggerall = fvar(38) && roundstate=2 && !var(42)
triggerall = ((!fvar(37)&&(var(59)=1||var(59)=4 || var(59)=5)) || (fvar(37) && ceil(fvar(14))%65536>32767))
triggerall = (stateno=5100||(stateno=5110&&(prevstateno!=[5100,5101])))&&!fvar(11) && time<=4 && alive
trigger1 = random%3=1 && Abs(P2bodydist X)>=100 && var(54)%5=0

;移動起き上がり
[state -3,varset]
type = varSet
triggerall = fvar(38)=1 && (roundstate=2 || (RoundState=3 && Win))
triggerall = stateno=5110 && var(2)=1
triggerall = var(59)=7
trigger1 = ifelse(backedgebodydist>=30,random%7<3,random%4=0)
var(1)=ifelse(backedgebodydist<30,2,3)

;雲隠れ
[State -1]
type = ChangeState
value = 45
triggerall = fvar(38) && (roundstate=2 || (RoundState>=3 && Win)) && stateno=1260
triggerall = statetype=A&&ctrl
trigger1 = var(54)%3!=0 && random%4=0 && P2stateno!=5120

[State -1]
;ジャンプ
type = ChangeState
value = 40
triggerall = fvar(38)=1 && !var(43) && (!var(44) || var(44)=2) && !((var(36)<=12 && var(34)=2)||(var(37)<=12 && var(35)=2)) && (P2stateno!=[15300,15350]) && !var(42)&& !(var(21)&&var(16)>1)
triggerall = (ctrl || StateNo=3 || StateNo=13 || stateno=21 || stateno=22) && StateType != A  && roundstate = 2 && enemynear,hitfall=0
trigger1 = enemy,numproj > 0 && (random =[980,1000]) && enemynear,MoveType != H
trigger1 = P2BodyDist X > 120
trigger2 = P2BodyDist X <80 && P2BodyDist X >=ifelse(enemynear,backedgebodydist <=0,0,30) && var(54)>750 && ifelse(P2bodydist X<=55,1,(var(59)=[2,5]))
trigger3 = (P2BodyDist X = [80,130]) && var(54)>ifelse(P2bodydist X>100,ifelse(((!fvar(37)&&(var(59)=[2,5]))||(fvar(37) && ceil(fvar(14))%4096>2047)),660,760),940)
trigger4 = (P2BodyDist X = [131,200]) && var(54)>ifelse(((!fvar(37)&&(var(59)=[2,5]))||(fvar(37) && ceil(fvar(14))%4096>2047))&&P2bodydist X>160,780,960)
trigger5 = enemynear,Vel X >0 && P2BodyDist X <100 && enemynear,Pos Y <-60 && random<(ifelse(P2BodyDist X <60,350,250))
trigger5 = enemynear,Vel Y>=0 && enemynear,Vel Y<=1.0 && ifelse(enemynear,Vel X=0,var(54)%5<=1,var(54)%3=0)
trigger6 = P2stateno=5120 && enemynear,time<4 && var(54)%5=0 && P2bodydist X<=80

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;ラン(Run)
[State -1]
type = ChangeState
value = 100
triggerall = fvar(38) && roundstate=2 && statetype!=A && !var(42)
triggerall = ((!fvar(37)&&(var(59)=[3,5]))||(fvar(37)&&ceil(fvar(14))%4>1))
triggerall = (ctrl||stateno=3||stateno=13||stateno=21)
trigger1 = enemynear,Vel Y<=0 && enemynear,Pos Y >-40
trigger1 = (P2BodyDist X =[120,180]) && var(54)<ifelse(numhelper(6200),400,160) && random<400 && !fvar(33)
trigger2 = ((P2statetype=L&&!(P2stateno!=5120&&P2bodydist X<=120 && var(54)%2=0))||(enemynear,hitfall=1&&enemynear,Pos Y>-65&&P2bodydist X>100))
trigger2 = P2bodydist X>40 && random%4=0 && enemynear,Alive=1 && !(var(59)=3&&(100*Life/const(data.life)<=30))
trigger3 = numproj && P2bodydist X>ifelse(prevstateno=3050||var(59)>=3,80,180)

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;ステップ(Step)
[State -1]
type = ChangeState
value = 105
triggerall = fvar(38) && roundstate=2 && statetype!=A && !var(42) && enemynear,hitfall=0&& !(var(21)&&var(16)>1)
triggerall = ((!fvar(37)&&(var(59)=[0,2]))||(fvar(37)&&ceil(fvar(14))%2>0))
triggerall = (ctrl||stateno=3||stateno=13||stateno=21)
trigger1 = enemynear,Vel Y<=0 && enemynear,Pos Y >-40
trigger1 = (P2BodyDist X =[80,160]) && ifelse(P2bodydist X<140,(var(54)=[660,800]),(var(54)=[720,800])) && !fvar(33)
trigger2 = ((P2statetype=L&&!(P2bodydist X<=140 && var(54)%3!=0&&P2stateno=5120))||(enemynear,hitfall=1&&enemynear,Pos Y>-65&&P2bodydist X>100)) && P2bodydist X>40 && random%4=0 && enemynear,Alive=1

;バックステップ(Back Step)
[State -1]
type = ChangeState
value = 110
triggerall = fvar(38) && roundstate=2 && statetype!=A && enemynear,hitfall=0 && backedgebodydist >20 && !var(42)&& !(var(21)&&var(16)>1)
triggerall = !fvar(37)||(fvar(37)&&(ceil(fvar(14))%2>0||ceil(fvar(14))%4>1))
triggerall = (ctrl||stateno=3||stateno=13||stateno=21)
trigger1 = enemynear,Vel Y<=0 && enemynear,Pos Y >-40
trigger1 = (P2BodyDist X =[120,160]) && ifelse(P2bodydist X<140,(var(54)=[720-(var(59)=3&&100*Life/const(data.life)<=30)*60,800]),(var(54)=[760-(var(59)=3&&100*Life/const(data.life)<=30)*100,800])) && !fvar(33)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


[State -1]
;ガード
type = ChangeState
value = 131
triggerall = fvar(38) && (roundstate=2 || (RoundState=3 && Win)) && enemynear,Statetype!=L && StateType!=A &&!var(21) && !((var(36)<=12 && var(34)=2)||(var(37)<=12 && var(35)=2))
triggerall = P2statetype!=A||(P2statetype=A && enemynear,Vel Y<0 && enemynear,Pos Y>=-40)
triggerall = (enemynear,Movetype = A||inguarddist||(fvar(33)=1&&(P2dist X=[-(100+const(size.ground.front)),0])))
triggerall = ((ctrl && fvar(33) && random<800) || StateNo=13 || stateno=22)
trigger1 = Abs(P2BodyDist X) <=120
trigger1 = (fvar(32)!=2 || fvar(33)=1) && ifelse(P2bodydist X<40&&fvar(33)&&var(54)%8=0,random%3=0,1)
trigger2 = Abs(P2BodyDist X) >120
trigger3 = (var(54) = [320-(var(59)=2)*320,870]) && (P2BodyDist X >160||(Abs(P2bodydist Y)>60&&enemynear,time>24))
trigger3 = (enemy,numproj>0||(enemy,numhelper&&(enemynear,hitdefattr!=SCA,AA,AT,AP))) && ((enemynear,movetype=A && Enemynear,Time>20) || enemynear,movetype!=A) && random%7<5
trigger3 = !(var(59)=2&&enemy,numproj&&random%20!=0)

;ガード
[State -1]
type = ChangeState
value = Ifelse(StateType=A,132,130)
triggerall = fvar(38) && (roundstate=2 || (RoundState=3 && Win)) && enemynear,Statetype!=L && !((var(36)<=12 && var(34)=2)||(var(37)<=12 && var(35)=2)) &&!var(21)
triggerall = !(Var(59)&&statetype=A)
triggerall = ifelse(enemynear,P2dist X<0&&random<ifelse(fvar(33)=1,750,500),P2movetype=A&&(P2dist X=[-(100+const(size.ground.front)),0]),inguarddist)
triggerall = !(P2statetype=A && enemynear,Vel Y<0 && enemynear,Pos Y>=-40)
triggerall = (enemynear,Movetype = A||inguarddist||(fvar(33)=1&&(P2dist X=[-(100+const(size.ground.front)),0])))
triggerall = (ctrl||StateNo=3||(P2statetype=A&&(StateNo=13||stateno=21))||StateNo=22)
trigger1 = P2BodyDist X <=120 && (fvar(32)!=2 || fvar(33)=1)
trigger2 = P2BodyDist X >120
trigger3 = (var(54) = [300-(var(59)=2)*300,870]) && (P2BodyDist X >160||(Abs(P2bodydist Y)>60&&enemynear,time>24))
trigger3 = (enemy,numproj>0||(enemy,numhelper&&(enemynear,hitdefattr!=SCA,AA,AT,AP))) && ((enemynear,movetype=A && Enemynear,Time>20) || enemynear,movetype!=A) && random%7<5
trigger3 = !(var(59)=2&&enemy,numproj&&random%20!=0)

[State -1]
;歩き（前）
type = ChangeState
value = 21
triggerall = fvar(38)=1 && (roundstate=2 || (RoundState=3 && Win)) && enemynear,Statetype!=L && !var(42)&& !(var(21)&&var(16)>1)
triggerall = StateType != A && enemynear,numproj=0
trigger1 = var(54)<ifelse(P2Bodydist X>ifelse(fvar(34),fvar(34)+60,140),400,240) && (ctrl || StateNo=3 || StateNo=13)
trigger1 = ((!(P2Statetype=L&&enemynear,alive) && P2BodyDist X >80) || (P2Statetype=L && P2BodyDist X <= 60))
trigger2 = P2BodyDist X <100 && (stateNo=52 || (prevstateno=[200,799])) && ctrl && var(54)>700
trigger3 = P2bodydist X<100 && numproj>3 && random%5=0

[State -1]
;歩き（後）
type = ChangeState
value = 22
triggerall = fvar(38)=1 && (roundstate=2 || (RoundState=3 && Win)) && enemynear,Statetype!=L && !var(42)&& !(var(21)&&var(16)>1)
triggerall = (roundstate=2 || (RoundState=3 && Win)) && StateType != A
triggerall = (ctrl || StateNo=3 || StateNo=13 || stateNo=21)
triggerall = Movetype = I
trigger1 = ((var(54)=[500,ifelse(P2Bodydist X>ifelse(fvar(34),fvar(34),100),620,680)]))
trigger1 = ((!(P2Statetype=L&&enemynear,alive) && (P2BodyDist X=[ifelse(fvar(34),fvar(34)+20,80),ifelse(fvar(34),fvar(34)+20,120)])) || (P2Statetype=L && P2BodyDist X > 80))
trigger2 = enemynear,statetype=A && enemynear,Pos Y<-60 && P2BodyDist X<70

[State -1]
;しゃがみ
type = ChangeState
value = 13
triggerall = fvar(38) && roundstate=2 && StateType != A
trigger1 = random&7<3 && (ctrl || stateNo=3 || ((stateno=[21,22])&&time>14)) && !(P2Statetype=L&&enemynear,alive) && P2BodyDist X >=60
trigger2 = P2BodyDist X<60 && ctrl
trigger3 = (ctrl || stateno=3||stateno=21||stateno=22) && ((var(36)<=12 && var(34)=2)||(var(37)<=12 && var(35)=2))
;------------------------------------

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;Player
;…〜……〜……〜……〜……〜……〜……〜
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;焔旋風(Lv.3専用)(Homura-Tsumuji(Lv.3 Only))
[State -1,onico]
type = ChangeState
value = 3300
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj && !var(47)
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))
triggerall = (command="homura"||var(24)=3300)
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;焔旋風(Lv.3専用)(Homura-Tsumuji(Lv.3 Only))
[State -1,onico]
type = ChangeState
value = 3300
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj && !var(47)
triggerall = var(59)=7 && var(57)>=3 && Power>=1500
triggerall = (command="homura"||var(24)=3300)
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;閻魔突き(Lv.3専用)(Enmazuki(Lv.3 Only))
[State -1,onico]
type = ChangeState
value = 3200
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))
triggerall = (command="enma"||var(24)=3200)
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;閻魔突き(Lv.3専用)(Enmazuki(Lv.3 Only))
[State -1,onico]
type = ChangeState
value = 3200
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A
triggerall = var(59)=7 && var(57)>=3 && Power>=1500
triggerall = (command="enma"||var(24)=3200)
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;LV.3 十文字(Lv.3 Jumonji)
[State -1,oricom]
type = ChangeState
value = 3020
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))
triggerall = (var(59) && (command="jumonji_x" || command="jumonji_y" || command="jumonji_z")) || (!var(59) && command="jumonji_z")||var(24)=3020
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.3 十文字(Lv.3 Jumonji)
[State -1,onicom]
type = ChangeState
value = 3020
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = var(59)=7 && var(57)>=3 && Power>=1500
triggerall = (command="jumonji_x"||command="jumonji_y"||command="jumonji_z")||var(24)=3000
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.2 十文字(Lv.2 Jumonji)
[State -1,oricom]
type = ChangeState
value = 3010
triggerall = fvar(38)!=1 && roundstate=2 && !var(59) && Power>=2000 && Statetype!=A && !numproj
triggerall = command="jumonji_y" || (Power <3000 && command="jumonji_z")||var(24)=3010
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.1 十文字(Lv.1 Jumonji)
[State -1,onicom]
type = ChangeState
value = 3000
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = (((!var(59)||var(59)=4) && Power>=1000 && !var(22)) || (var(59)=1 && (Power>=1500||var(21)))) || (var(59)=3 && ((var(22)&&(100*Life/const(data.life))>30)||(!var(22) && (100*Life/const(data.life))<=30)))
triggerall = (!var(59)&&(command="jumonji_x"||(Power<2000&&(command="jumonji_y"||command="jumonji_z"))))||((var(59)=1||var(59)=3||var(59)=4)&&(command="jumonji_x"||command="jumonji_y"||command="jumonji_z"))||var(24)=3000
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.1 十文字(Lv.1 Jumonji)
[State -1,onicom]
type = ChangeState
value = 3000
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = var(59)=7 && var(57)<3 && Power>=1500
triggerall = (command="jumonji_x"||command="jumonji_y"||command="jumonji_z")||var(24)=3000
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;LV.3 爆龍昇(Lv.3 Bakuryushou)
[State -1,onico]
type = ChangeState
value = 3120
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = (!var(59) && Power>=3000)||(var(59)=4 && var(22) && Power>=1000)||((var(59)=2||var(59)=5)&&Power>=3000)||(var(59)=3 && var(22) && (100*Life/const(data.life)<=30))
triggerall = (var(59) && (command="bakuryushou_a" || command="bakuryushou_b" || command="bakuryushou_c")) || (!var(59) && command="bakuryushou_c")||var(24)=3120
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.3 爆龍昇(Lv.3 Bakuryushou)
[State -1,onico]
type = ChangeState
value = 3120
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = var(59)=7 && var(57)>=3 && Power>=1500
triggerall = (command="bakuryushou_a" || command="bakuryushou_b" || command="bakuryushou_c"||var(24)=3120)
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.2 爆龍昇(Lv.2 Bakuryushou)
[State -1,onicom]
type = ChangeState
value = 3110
triggerall = fvar(38)!=1 && roundstate=2 && !var(59) && Power>=2000 && Statetype!=A && !numproj
triggerall = command="bakuryushou_b" || (Power <3000 && command="bakuryushou_c")||var(24)=3110
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.1 爆龍昇(Lv.1 Bakuryushou)
[State -1,onicom]
type = ChangeState
value = 3100
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = (((!var(59)||var(59)=4) && Power>=1000 && !var(22)) || (var(59)=1 && (Power>=1500||var(21)))) || (var(59)=3 && ((var(22)&&(100*Life/const(data.life))>30)||(!var(22) && (100*Life/const(data.life))<=30)))
triggerall = (!var(59) && (command="bakuryushou_a" || (Power <2000 && (command="bakuryushou_b" || command="bakuryushou_c"))))
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.1 爆龍昇(Lv.1 Bakuryushou)
[State -1,onicom]
type = ChangeState
value = 3100
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = (((!var(59)||var(59)=4) && Power>=1000 && !var(22)) || (var(59)=1 && (Power>=1500||var(21)))) || (var(59)=3 && ((var(22)&&(100*Life/const(data.life))>30)||(!var(22) && (100*Life/const(data.life))<=30)))
triggerall = ((var(59)=1||var(59)=3||var(59)=4) && (command="bakuryushou_a" || command="bakuryushou_b" || command="bakuryushou_c"))||var(24)=3100
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;LV.1 爆龍昇(Lv.1 Bakuryushou)
[State -1,onicom]
type = ChangeState
value = 3100
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = var(59)=7 && var(57)<3 && Power>=1500
triggerall = (command="bakuryushou_a" || command="bakuryushou_b" || command="bakuryushou_c"||var(24)=3100)
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=[1,6])

;~~~~~~~~~~~~~~~~~~~~Special Moves~~~~~~~~~~~~~~~~~~~~
;鎖縛(Kusari-Shibari)
[State -1,Shibari]
type = ChangeState
value = 1600+ifelse((command="tsumuji_z"||var(24)=1620),20,ifelse((command="tsumuji_y"||var(24)=1610),10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && var(47)=1
triggerall = ((var(24)=[1600,1620]) ||command="tsumuji_x" || command="tsumuji_y" || command="tsumuji_z")
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;羅刹刃(Rasetsu-Jin)
[State -1,Rasetsu]
type = ChangeState
value = 1100+ifelse(command="rasetsu_z"||var(24)=1120,20,ifelse(command="rasetsu_y"||var(24)=1110,10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A
triggerall = ((var(24)=[1100,1120]) || (command="rasetsu_x" || command="rasetsu_y" || command="rasetsu_z"))
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;空蝉・改(Utsusemi-kai)
[State -1,somer_a]
type = null;ChangeState
value = 1200+ifelse((command="ac"||command="bc"||var(24)=1240),40,30)
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A
triggerall = ((var(24)=[1230,1240]) || ((command="utsusemi_a" || command="utsusemi_b" || command="utsusemi_c")&&(command="ab"||command="bc"||command="ac")))
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;空蝉(Utsusemi)
[State -1,somer_a]
type = ChangeState
value = 1200+ifelse((command="utsusemi_c"||var(24)=1220),20,ifelse((command="utsusemi_b"||var(24)=1210),10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A
triggerall = ((var(24)=[1200,1220]) ||command="utsusemi_a" || command="utsusemi_b" || command="utsusemi_c")
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;蜻蛉・改(Kagerou-Kai)
[State -1,Kagerou-Kai]
type = ChangeState
value = 1700+ifelse(var(24)=1720||command="kagerou-kai_c",20,ifelse(var(24)=1710||command="kagerou-kai_b",10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !var(48) && !numproj && var(47)=1
triggerall = ((var(24)=[1700,1720]) || command="kagerou-kai_a" || command="kagerou-kai_b" || command="kagerou-kai_c")
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;蜻蛉(Kagerou)
[State -1,Kagerou]
type = ChangeState
value = 1300+ifelse(var(24)=1320||command="kagerou_c",20,ifelse(var(24)=1310||command="kagerou_b",10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A
triggerall = ((var(24)=[1300,1320]) || command="kagerou_a" || command="kagerou_b" || command="kagerou_c")
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;旋風(Tsumuji)
[State -1,Tsumuji]
type = ChangeState
value = 1800+ifelse(var(24)=1820||command="tsumuji_z",20,ifelse(var(24)=1810||command="tsumuji_y",10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !var(48) && !numproj && !var(47)
triggerall = ((var(24)=[1700,1720]) || command="tsumuji_x" || command="tsumuji_y" || command="tsumuji_z")
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;螺旋脚(Rasenkyaku)
[State -1,sonic_x]
type = ChangeState
value = 1000+ifelse(var(24)=1020||command="rasen_c",20,ifelse(var(24)=1010||command="rasen_b",10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A
triggerall = ((var(24)=[1000,1020]) || command="rasen_a" || command="rasen_b" || command="rasen_c")
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;一文字(Ichimonji)
[State -1,violence_a]
type = ChangeState
value = 1400+ifelse(var(24)=1420||command="ichimonji_z",20,ifelse(var(24)=1410||command="ichimonji_y",10,0))
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && !numproj
triggerall = ((var(24)=[1400,1420]) || command="ichimonji_x" || command="ichimonji_y" || command="ichimonji_z")
trigger1 = (Ctrl || Stateno=40 || (StateNo=52 && Time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = (var(3)=1 || (var(3)=[3,5]))

;----+----+----+----+----+----+----+----+----+----+----+----+----+----+
;----+----+----+----+----+----+----+----+----+----+----+----+----+----+
;回り込み(Rolling)
[State -1]
type = ChangeState
value = 900
triggerall = fvar(38)!=1 && (var(24)=900 || command="ax") && Statetype!=A
triggerall = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101 || var(3)=4 || (Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])))
trigger1 = !fvar(37) && (!var(59)||var(59)=1||var(59)=4)
trigger2 = fvar(37) && ceil(fvar(14))%32>15

;避け(Dodge)
[State -1]
type = ChangeState
value = 910
triggerall = fvar(38)!=1 && (var(24)=900 || command="ax") && !fvar(31) && statetype!=A
triggerall = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101 || var(3)=4 || (Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])))
trigger1 = !fvar(37) && var(59)=3
trigger2 = fvar(37) && ceil(fvar(14))%64>31

;Ｐカウンター攻撃(Counter Attack Punch)
[State -1]
type = ChangeState
value = 920
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && Statetype!=A && (command="x" || command="y" || command="z")
trigger1 = StateNo=910 && (Time=[15,25])

Ｋカウンター攻撃(Counter Attack Kick)
[State -1]
type = ChangeState
value = 930
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && Statetype!=A && (command="a" || command="b" || command="c")
trigger1 = StateNo=910 && (Time=[15,25])

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;ダウン追い討ち(Down Attack?)
[State -1]
type = ChangeState
value = 960
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && command="holdup" && (command="a"||command="b"||command="c") && statetype!=A
triggerall = ((enemynear,Vel Y>2 && enemynear,Pos Y>(-enemynear,Vel Y*24) && enemynear,hitfall)||(P2statetype=L&&P2stateno!=5120&&P2stateno!=5150))
triggerall = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101||(Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])))
trigger1 = !fvar(37) && var(59)=7
trigger2 = fvar(37) && ceil(fvar(14))%524288>262143
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;ガードキャンセル攻撃(Counter Attack)
[State -1]
type = ChangeState
value = 2000
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && command="by" && command="holdfwd" && command!="holddown"
triggerall = ((Power >= 1000 && (!var(59)||var(59)=4))||(Power>=1500&&var(59)=1)||(Power>=3000&&(var(59)=2||var(59)=5))||(var(59)=3 && var(22))) && var(31)>=0
triggerall = (StateNo=150||StateNo=152)
trigger1 = !fvar(37)&&(!var(59)||var(59)=1||var(59)=3||var(59)=4)
trigger2 = fvar(37)&&ceil(fvar(14))%256>127

;ガードキャンセル移動（前）(Counter Movement)
[State -1]
type = ChangeState
value = 2100
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && command="ax" && command="holdfwd" && command!="holddown"
triggerall = ((Power >= 1000 && (!var(59)||var(59)=4))||(Power>=1500&&var(59)=1)||(Power>=3000&&(var(59)=2||var(59)=5))||(var(59)=3 && var(22))) && var(31)>=0
triggerall = (StateNo=150||StateNo=152)
trigger1 = !fvar(37)&&var(59)=4
trigger2 = fvar(37)&&ceil(fvar(14))%512>255

;ガードキャンセル移動（後）(Counter Movement)
[State -1]
type = ChangeState
value = 2200
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && command="ax" && command="holdback" && command!="holddown"
triggerall = ((Power >= 1000 && (!var(59)||var(59)=4))||(Power>=1500&&var(59)=1)||(Power>=3000&&(var(59)=2||var(59)=5))||(var(59)=3 && var(22))) && var(31)>=0
triggerall = (StateNo=150||StateNo=152)
trigger1 = !fvar(37)&&var(59)=4
trigger2 = fvar(37)&&ceil(fvar(14))%512>255

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;ゲージ溜め動作(Power Charge)
[State -1]
type = ChangeState
value = 950
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && (command="cz"||var(24)=2400) && statetype!=A
triggerall = !var(22) && var(59)=3
trigger1 = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;オリコン発動（地上）(Custom Combo Ground)
[State -1]
type = ChangeState
value = 2400
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && (command="cz"||var(24)=2400)
triggerall = Power >= 3000 && var(59)=1 && statetype!=A
trigger1 = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])

;オリコン発動（空中）(Custom Combo air)
[State -1]
type = ChangeState
value = 2450
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && (command="cz"||var(24)=2400)
triggerall = Power >= 3000 && var(59)=1 && Statetype=A
trigger1 = Ctrl
trigger2 = Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;パワーMAX発動(Power MAX ON)
[State -1]
type = ChangeState
value = 2500
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && (command="cz"||var(24)=2400) && statetype!=A
triggerall = Power >= 1000 && var(59)=4 && !var(22)
trigger1 = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;レベルアップ(Level Up)
[State -1]
type = ChangeState
value = 2600
triggerall = fvar(38)!=1 && (roundstate=[2,3]) && command="cz" && statetype!=A
triggerall = Power >= 1500 && var(59)=7 && !numexplod(7621) && var(57)<6
trigger1 = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799])

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;アルティメットガード(Ultimate Guard)
[State -1]
type = ChangeState
value = 4200
triggerall = fvar(38)!=1 && roundstate=2 && command="by" && statetype!=A
triggerall = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101||(Time<2 && (stateno=[200,799]) && (prevstateno!=[200,799]))||(stateno=[150,153]))
trigger1 = !fvar(37)&&var(59)=7
trigger2 = fvar(37)&&ceil(fvar(13))%2048>1023

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;時間差起き上がり(Tactical Recovery)
[state -3,varset]
type = varSet
triggerall = !fvar(38) && (roundstate=2 || (RoundState=3 && Win))
triggerall = stateno=5110 && var(2)=1
triggerall = (command="hold_x"&&command="hold_y")||(command="hold_y"&&command="hold_z")||(command="hold_x"&&command="hold_z")
trigger1 = !fvar(37) && (!var(59)||var(59)=2||var(59)=3)
trigger2 = fvar(37) && ceil(fvar(14))%32768>16383
var(1)=1

;ダウン回避(Safe Fall)
[State -1]
type = ChangeState
value = 5200
triggerall = !fvar(38) && (roundstate=2 || (RoundState=3 && Win))
triggerall = (stateno=5100||(stateno=5110&&(prevstateno!=[5100,5101])))&&!fvar(11) && time<=4 && alive
triggerall = Command = "recovery"
trigger1 = !fvar(37) && (var(59)=1||var(59)=4||var(59)=5)
trigger2 = fvar(37) && ceil(fvar(14))%65536>32767

;移動起き上がり(Movement Recovery)
[state -3,varset]
type = varSet
triggerall = !fvar(38) && (roundstate=2 || (RoundState=3 && Win))
triggerall = stateno=5110 && var(2)=1
triggerall = (command="holdback"||command="holdfwd")
trigger1 = !fvar(37)&&var(59)=7
trigger2 = fvar(37) && ceil(fvar(14))%262144>131071
var(1)=ifelse(command="holdfwd",2,3)
;----+----+----+----+----+----+----+----+----+----+----+----+----+----+

;ラン(Run)
[State -1]
type = ChangeState
value = 100
triggerall = fvar(38)!=1 && roundstate=2 && statetype!=A
triggerall = command = "FF" && ctrl
trigger1 = !fvar(37)&&(var(59) =[3,5])
trigger2 = fvar(37)&&ceil(fvar(14))%4>1

;ステップ(Dash)
[State -1]
type = ChangeState
value = 105
triggerall = fvar(38)!=1 && roundstate=2 && statetype!=A
triggerall = command = "FF" && ctrl
trigger1 = !fvar(37)&&((var(59) =[0,2])||var(59)=7)
trigger2 = fvar(37)&&ceil(fvar(14))%2>0

;バックステップ(Back Dash)
[State -1]
type = ChangeState
value = 110
triggerall = fvar(38)!=1 && roundstate=2 && statetype!=A
triggerall = command = "BB"&&ctrl
trigger1 = !fvar(37)
trigger2 = fvar(37)&&(ceil(fvar(14))%2>0||ceil(fvar(14))%4>1)

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;チェーンコンボ(強K)
[State -1, Chain]
type = ChangeState
value = ifelse(command="holddown",450,250)
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%32>15 && fvar(37) && statetype!=A
triggerall = command="c" && movecontact=1
trigger1 = (stateno=[200,559]) && (stateno!=[250,255]) && stateno!=450
trigger1 = (stateno!=[350,359]) && (stateno!=[550,559])

;チェーンコンボ(強P)
[State -1, Chain]
type = ChangeState
value = ifelse(command="holddown",420,220)
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%32>15 && fvar(37) && statetype!=A
triggerall = command="z" && movecontact=1
trigger1 = (stateno=[200,559]) && (stateno!=[250,255]) && stateno!=450 && (stateno!=[220,225]) && stateno!=420
trigger1 = (stateno!=[320,329]) && (stateno!=[350,359]) && (stateno!=[520,529]) && (stateno!=[550,559])

;チェーンコンボ(中K)
[State -1, Chain]
type = ChangeState
value = ifelse(command="holddown",ifelse(command="holdfwd",540,440),240)
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%32>15 && fvar(37) && statetype!=A
triggerall = command="b" && movecontact=1
trigger1 = (stateno=[200,559]) && (stateno!=[250,255]) && stateno!=450 && (stateno!=[220,225]) && stateno!=420 && (stateno!=[240,245]) && stateno!=440
trigger1 = (stateno!=[320,329]) && (stateno!=[340,359]) && (stateno!=[520,529]) && (stateno!=[540,559])

;チェーンコンボ(中P)
[State -1, Chain]
type = ChangeState
value = ifelse(command="holddown",410,ifelse(command="holdfwd",310,210))
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%32>15 && fvar(37) && statetype!=A
triggerall = command="y" && movecontact=1
trigger1 = (stateno=[200,559]) && (stateno!=[250,255]) && stateno!=450 && (stateno!=[220,225]) && stateno!=420 && (stateno!=[240,245]) && stateno!=440 && (stateno!=[210,215]) && stateno!=410
trigger1 = (stateno!=[310,329]) && (stateno!=[340,359]) && (stateno!=[510,529]) && (stateno!=[540,559])

;チェーンコンボ(弱K)
[State -1, Chain]
type = ChangeState
value = ifelse(command="holddown",430,230)
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%32>15 && fvar(37) && statetype!=A
triggerall = command="a" && movecontact=1
trigger1 = (stateno=[200,559]) && (stateno!=[250,255]) && stateno!=450 && (stateno!=[220,225]) && stateno!=420 && (stateno!=[240,245]) && stateno!=440 && (stateno!=[210,215]) && stateno!=410 && stateno!=230 && stateno!=45
trigger1 = (stateno!=[310,359]) && (stateno!=[510,559])

;^^^^^^^^^^^^^^^^^^^^^^^^^^^
;空中チェーンコンボ(強K)
[State -1, Chain]
type = ChangeState
value = 650
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%64>31 && fvar(37) && statetype=A
triggerall = command="c" && movecontact=1
trigger1 = stateno=600
trigger2 = stateno=610
trigger3 = stateno=620
trigger4 = stateno=630
trigger5 = stateno=640

;空中チェーンコンボ(強P)
[State -1, Chain]
type = ChangeState
value = 620
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%64>31 && fvar(37) && statetype=A
triggerall = command="z" && movecontact=1
trigger1 = stateno=600
trigger2 = stateno=610
trigger3 = stateno=630
trigger4 = stateno=640

;空中チェーンコンボ(中K)
[State -1, Chain]
type = ChangeState
value = 640
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%64>31 && fvar(37) && statetype=A
triggerall = command="b" && movecontact=1
trigger1 = stateno=600
trigger2 = stateno=610
trigger3 = stateno=630

;空中チェーンコンボ(中P)
[State -1, Chain]
type = ChangeState
value = 610
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%64>31 && fvar(37) && statetype=A
triggerall = command="y" && movecontact=1
trigger1 = stateno=600
trigger2 = stateno=630

;空中チェーンコンボ(弱K)
[State -1, Chain]
type = ChangeState
value = 630
triggerall = !fvar(38)
triggerall = ceil(fvar(13))%64>31 && fvar(37) && statetype=A
triggerall = command="a" && movecontact=1
trigger1 = stateno=600
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;---------------------------------------------------------------------

;Ｐ通常投げ(Punch Throw)
[State -1]
type = ChangeState
value = 800
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && p2statetype!=A && p2statetype!=L
triggerall = ((command="z" && command!="holddown" && command!="holdup" && (command="holdback" || command="holdfwd"))||(var(24)=[800,805]))
trigger1 = Ctrl && P2BodyDist X <=24 && (enemynear,movetype!=H||var(21))

;Ｋ通常投げ(Kick Throw)
[State -1]
type = ChangeState
value = 810
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && p2statetype!=A && p2statetype!=L
triggerall = ((command="c" && command!="holddown" && command!="holdup" && (command="holdback" || command="holdfwd"))||(var(24)=[810,815]))
trigger1 = Ctrl && P2BodyDist X <=24 && (enemynear,movetype!=H||var(21))

;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
; 挑発(Taunt)
[State -1]
type = ChangeState
value = 195
triggerall = !fvar(38)
triggerall = (Command="s"||var(24)=195) && StateType!=A
trigger1 = (Ctrl || StateNo=40 || (StateNo=52 && time>=2) || (StateNo=100 && animelemtime(2) >=0) || StateNo=101)
trigger2 = var(3)=1 || (var(3)=[3,5])
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;木立ち払い(Kodachi-Barai)
[State -1]
type = ChangeState
value = 540
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && ((command="down_b" && command="holdfwd")||var(24)=540)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4 || (stateno=310 && AnimElemTime(5)<0 && movecontact)

;楽車当て(Danjiri-Ate)
;堂鐘打ち(Doukane-Uchi)
[State -1]
type = ChangeState
value = 321+(command="down_z")
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && command="z"
trigger1 = ((stateno=200&&AnimElemTime(5)<0)||(stateno=400&&AnimElemTime(4)<0)) &&AnimElemTime(3)>=0 && movecontact

;燕操り(TsubaKuraguri)
[State -1]
type = ChangeState
value = 350
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && command="c" && command!="down_c"
trigger1 = stateno=240 &&AnimElemTime(3)>=0&&AnimElemTime(6)<0 && movecontact

;牡丹落とし(Botan-Otoshi)
[State -1]
type = ChangeState
value = 310
triggerall = fvar(38)!=1 && roundstate=2 && Statetype!=A && ((command="y" && command="holdfwd")||var(24)=310)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4
;trigger3 = (stateno=200||stateno=400||stateno=230||stateno=430)&&movecontact=1

;千木落とし(Chigi-Otoshi)
[State -1]
type = ChangeState
value = 700
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && ((command="x"&&Vel Y<0)||var(24)=600)
trigger1 = Ctrl
trigger2 = var(3)=4

;狛犬倒し(Komainu-Daoshi)
[State -1]
type = ChangeState
value = 750+ifelse(command="holddown"||var(24)=750,0,1)
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && ((command="c"&&(command="holddown"||command="holdfwd"))||(var(24)=[750,751]))
trigger1 = Ctrl
trigger2 = var(3)=4

;天狗倒し(Tengu-Daoshi)
[State -1]
type = ChangeState
value = 752+ifelse(command="holdup"||var(24)=752,0,1)
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && ((command="c"&&(command="holdup"||command="holdback"))||(var(24)=[752,753])) && var(47)=1
trigger1 = Ctrl
trigger2 = var(3)=4
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;立ち弱パンチ
[State -1]
type = ChangeState
value = 200
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="x" && command!="down_x")||var(24)=200)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4 ||((stateno=200||stateno=400||stateno=430)&&time>=5||(stateno=230&&time>=7))

;立ち中パンチ
[State -1]
type = ChangeState
value = 210
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="y" && command!="down_y")||var(24)=210)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4
trigger3 = (stateno=200||stateno=400||stateno=230||stateno=430)&&movecontact=1

;立ち強パンチ
[State -1]
type = ChangeState
value = 220
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="z" && command!="holddown")||var(24)=220)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4

;立ち弱キック
[State -1]
type = ChangeState
value = 230
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="a" && command!="down_a")||var(24)=230)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4 ||((stateno=200||stateno=400||stateno=430)&&time>=5||(stateno=230&&time>=7))

;立ち中キック
[State -1]
type = ChangeState
value = 240
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="b" && command!="down_b")||var(24)=240)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4
trigger3 = (stateno=200||stateno=400||stateno=230||stateno=430)&&movecontact=1

;立ち強キック
[State -1]
type = ChangeState
value = 250
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="c" && command!="holddown")||var(24)=250)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4

;しゃがみ弱パンチ
[State -1]
type = ChangeState
value = 400
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="down_x")||var(24)=400)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4 ||((stateno=200||stateno=400||stateno=430)&&time>=5||(stateno=230&&time>=7))

;しゃがみ中パンチ
[State -1]
type = ChangeState
value = 410
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="down_y")||Var(24)=410)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4
trigger3 = (stateno=200||stateno=400||stateno=230||stateno=430)&&movecontact=1

;しゃがみ強パンチ
[State -1]
type = ChangeState
value = 420
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="z" && command="holddown")||var(24)=420)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4

;しゃがみ弱キック
[State -1]
type = ChangeState
value = 430
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="down_a")||var(24)=430)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4 ||((stateno=200||stateno=400||stateno=430)&&time>=5||(stateno=230&&time>=7))

;しゃがみ中キック
[State -1]
type = ChangeState
value = 440
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="down_b")||var(24)=440)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4
trigger3 = (stateno=200||stateno=400||stateno=230||stateno=430)&&movecontact=1

;しゃがみ強キック
[State -1]
type = ChangeState
value = 450
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype!=A && ((command="c" && command="holddown")||var(24)=450)
trigger1 = Ctrl || (StateNo=100 && animelemtime(2) >=0) || StateNo=101
trigger2 = var(3)=4

;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;ジャンプ弱パンチ
[State -1]
type = ChangeState
value = 600
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && (command="x"||var(24)=600)
trigger1 = Ctrl
trigger2 = var(3)=4

;ジャンプ中パンチ
[State -1]
type = ChangeState
value = 610
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A &&( command="y"||var(24)=610)
trigger1 = Ctrl
trigger2 = var(3)=4

;ジャンプ強パンチ
[State -1]
type = ChangeState
value = 620
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && (command="z"||var(24)=620)
trigger1 = Ctrl
trigger2 = var(3)=4

;ジャンプ弱キック
[State -1]
type = ChangeState
value = 630
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && (command="a"||var(24)=630)
trigger1 = Ctrl
trigger2 = var(3)=4

;ジャンプ中キック
[State -1]
type = ChangeState
value = 640+ifelse(stateno=4130,var(2),Vel X!=0)*5
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && (command="b"||var(24)=640)
trigger1 = Ctrl
trigger2 = var(3)=4

;ジャンプ強キック
[State -1]
type = ChangeState
value = 650
triggerall = fvar(38)!=1 && roundstate = 2 && Statetype=A && (command="c"||var(24)=650)
trigger1 = Ctrl
trigger2 = var(3)=4

;ガード
[State -1]
type = ChangeState
value = 120
triggerall = !fvar(38) && (roundstate=2 || (RoundState>=3 && Win)) && !var(21) && !var(56) && (stateno!=[120,140]) && inguarddist
triggerall = ctrl && ((command="holdback"&&P2dist X>=0&&(statetype!=A||(statetype=A&&P2dist X>=0)))||(command="holdfwd"&&statetype=A&&P2dist X<0))
trigger1 = statetype!=A&&command!="holdup"
trigger2 = !fvar(37) && !var(59) && var(7)!=1 && statetype=A
trigger3 = fvar(37) && ceil(fvar(14))%2048>1023 && var(7)!=1&&statetype=A

;雲隠れ
[State -1]
type = ChangeState
value = 45
triggerall = !fvar(38) && (roundstate=2 || (RoundState>=3 && Win)) && stateno=1260
triggerall = statetype=A&&ctrl
trigger1 = command="holdup"
