;-| Button Remapping |-----------------------------------------------------
; This section lets you remap the player's buttons (to easily change the
; button configuration). The format is:
;   old_button = new_button
; If new_button is left blank, the button cannot be pressed.

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

;俺スティック用ボタン配置
;[Remap]
;x = a
;y = y
;z = b
;a = x
;b = z
;c = c
;s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.
command.time = 15

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.
command.buffer.time = 1

;------------------------------------------------------------------------------
;AI用コマンド

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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


;-| Special Motions |------------------------------------------------------

[Command]
name = "NEO MAX"
command = ~F, D, B, F, D, B, a+b
time = 35


[Command]
name = "エクスキュージョン"
command = ~F, D, B, F, D, B, x
time = 35

[Command]
name = "エクスキュージョン"
command = ~F, D, B, F, D, B, y
time = 35


[Command]
name = "エッジEX"
command = ~D, F, D, F, x+y
time = 25

[Command]
name = "エッジ"
command = ~D, F, D, F, x
time = 25

[Command]
name = "エッジ"
command = ~D, F, D, F, y
time = 25


[Command]
name = "レイスピンEX"
command = ~D, DB, B, a+b

[Command]
name = "レイスピン"
command = ~D, DB, B, a

[Command]
name = "レイスピン"
command = ~D, DB, B, b


[Command]
name = "シェルEX"
command = ~D, DB, B, x+y

[Command]
name = "シェル"
command = ~D, DB, B, x

[Command]
name = "シェル"
command = ~D, DB, B, y


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

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

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


[Command]
name = "ブレスEX"
command = ~D, DF, F, x+y

[Command]
name = "ブレス"
command = ~D, DF, F, x

[Command]
name = "ブレス"
command = ~D, DF, F, y


[Command]
name = "緊急回避前"
command = x+a
time = 1

[Command]
name = "緊急回避前"
command = z
time = 1

[Command]
name = "緊急回避後"
command = /$B,x+a
time = 1

[Command]
name = "緊急回避後"
command = /$B,z
time = 1

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

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

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

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

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

[Command]
name = "MAX"
command = y+a
time = 1

[Command]
name = "おしっぱなしx"
command = /$x
time = 1

[Command]
name = "おしっぱなしy"
command = /$y
time = 1

[Command]
name = "おしっぱなしa"
command = /$a
time = 1

[Command]
name = "おしっぱなしb"
command = /$b
time = 1

[Command]
name = "おしっぱなしz"
command = /$z
time = 1

[Command]
name = "おしっぱなしc"
command = /$c
time = 1

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

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

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

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

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

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

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

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

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

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

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

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

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


;-| Releese Button |---------------------------------------------------------
[Command]
name = "~a"
command = ~a
time = 1

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


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

;===========================================================================
;ＡＩフラグ
;===========================================================================

;AI
[State -1, AI]
type = VarSet
triggerall = var(59) <= 0
triggerall = RoundState = 2
triggerall = ctrl || movetype != I
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"
;trigger51  = !isHelper ;一番左の“ ; ”をはずすと常時ＡＩ起動
var(59) = 1 ;AI Level
         ;↑の数字を変える事で、AIの強さが変わります。
         ;[0:No AI]  [1:VS player level]  [2:VS AI level]
         ;対Ｐ操作レベル…超反応:無し（対空はする）　ヒット確認：ミスあり　ぶっぱ:あり
         ;対ＡＩレベル……超反応:低確率であり　　　　ヒット確認：完璧　　　ぶっぱ:ライフに余裕がある時にだけあり


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;===========================================================================
;ＡＩ動作
;===========================================================================
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

;ＡＩ製作用デバック
[State -3]
type = DisplayToClipboard
trigger1 = 1
text = " \n BDX:%d, DX:%d, V32:%d V5:%d FV3:%f"
params = floor(P2BodyDist X), floor(P2Dist X), var(32), floor(fvar(5)), fvar(39)


;トリガーEnemyNearの判別切り替え用
[State -3, AI]
Type = VarSet
Trigger1 = NumEnemy = 1
Trigger2 = NumEnemy = 2
Trigger2 = Enemynear,Life > 0
var(53) = 0
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

;トリガーEnemyNearの判別切り替え用
[State -3, AI]
Type = VarSet
Trigger1 = NumEnemy > 1
Trigger1 = Enemynear,Life = 0
var(53) = 1            ;simul戦用にEnemyNearの切り替えをさせる処理です
                        ;EnemyNear(Var(53))と記述することで自動判別します
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

;────────────────────────────────────────
; 壁端検出ヘルパー(乱入者氏式)
;────────────────────────────────────────
[State -3, Center]
Type = Helper
Trigger1 = !NumHelper(8900+id) && !IsHelper && RoundState < 3 && alive
HelperType = Normal
Name = "Center"
ID = 8900+id
pos = 160,524288
PosType = left
facing = 1
StateNo = 8900
KeyCtrl = 1
Ownpal = 0
supermovetime=524288
pausemovetime=524288
persistent = 0
IgnoreHitPause = 1

[State -3]
type=changestate
trigger1= ishelper
trigger1= ishelper(8900+root,id) && stateno != 8900
value=8900

[State -3]
type=changestate
trigger1= ishelper
trigger1= (ishelper(8905+root,id)||ishelper(8906+root,id)) && stateno !=8905
value=8905

[State -3]
type = AssertSpecial
trigger1 = var(59) > 0
flag = noairguard

[State -3]
type = AssertSpecial
trigger1 = NumEnemy <= 1 && var(59) > 0
trigger1 = Enemy(var(53)),P2Dist X < 0
flag = nostandguard
flag2 = nocrouchguard

;────────────────────────────────────────
; 対飛び道具ヘルパー(厨忍氏式)
;────────────────────────────────────────
[State -3]
Type = HelPer
Trigger1 = !NumHelper(20000)
HelPerType = normal
Name = "bullet"
StateNo = 20000
ID = 20000
OwnPal = 1
pos = 5, 0
postype = p1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
IgnoreHitPause = 1

;--------------------------------------------------------------------------
;その他ＡＩ殺し対策

;立ち下段対策（自己流なので、これで良いのかは知らん）
[State -1]
type = varset
triggerall = var(47) = 0
trigger1 = !EnemyNear(Var(53)),HitDefAttr = SC, NT,ST,HT
trigger1 = statetype = S && EnemyNear(Var(53)),statetype = S
trigger1 = movetype = H && EnemyNear(Var(53)),movetype = A
trigger1 = (prevstateno = [120,159]) && stateno != [120,159]
var(47) = EnemyNear(Var(53)),stateno

;空中下段対策（自己流なので、これで良いのかは知らん）
[State -1]
type = varset
triggerall = var(47) = 0
triggerall = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),statetype = A
Trigger1 = EnemyNear(Var(53)),Name="millia"
Trigger1 = EnemyNear(Var(53)),StateNo=1500
Trigger2 = EnemyNear(Var(53)),Name="cvscammy"
Trigger2 = EnemyNear(Var(53)),StateNo=1100
var(47) = EnemyNear(Var(53)),stateno

[State -1];リセット
type = varset
triggerall = var(47) != 0
trigger1 = teammode = turns && roundstate != 2
var(47) = 0

;立ち下段対策・その２（自己流なので、これで良いのかは知らん）
[State -1]
type = varset
triggerall = var(46) = 0
triggerall = var(47) != 0 && EnemyNear(Var(53)),stateno != var(47)
triggerall = EnemyNear(Var(53)),prevstateno != var(47)
trigger1 = !EnemyNear(Var(53)),HitDefAttr = SC, NT,ST,HT
trigger1 = statetype = S && EnemyNear(Var(53)),statetype = S
trigger1 = movetype = H && EnemyNear(Var(53)),movetype = A
trigger1 = (prevstateno = [120,159]) && stateno != [120,159]
var(46) = EnemyNear(Var(53)),stateno

;空中下段対策（自己流なので、これで良いのかは知らん）
[State -1]
type = varset
triggerall = var(46) = 0
triggerall = var(47) != 0 && EnemyNear(Var(53)),stateno != var(47)
triggerall = EnemyNear(Var(53)),prevstateno != var(47)
triggerall = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),statetype = A
Trigger1 = EnemyNear(Var(53)),Name="millia"
Trigger1 = EnemyNear(Var(53)),StateNo=1500
Trigger2 = EnemyNear(Var(53)),Name="cvscammy"
Trigger2 = EnemyNear(Var(53)),StateNo=1100
var(46) = EnemyNear(Var(53)),stateno

[State -1];リセット
type = varset
triggerall = var(46) != 0
trigger1 = teammode = turns && roundstate != 2
var(46) = 0

;敵投げ技判断
[State -1]
type = varset
triggerall = var(48) = 0
trigger1 = EnemyNear(Var(53)),HitDefAttr = SC, NT,ST,HT
trigger1 = EnemyNear(Var(53)),stateno = [1000,4999]
var(48) = EnemyNear(Var(53)),stateno

[State -1];リセット
type = varset
triggerall = var(48) != 0
trigger1 = teammode = turns && roundstate != 2
var(48) = 0

;敵投げ技判断・その２
[State -1]
type = varset
triggerall = var(45) = 0
trigger1 = EnemyNear(Var(53)),HitDefAttr = SC, NT,ST,HT
trigger1 = EnemyNear(Var(53)),stateno = [0,999]
var(45) = EnemyNear(Var(53)),stateno

[State -1];リセット
type = varset
triggerall = var(45) != 0
trigger1 = teammode = turns && roundstate != 2
var(45) = 0

;敵がcanrecoverを無視するかどうか
[State -2];自重する気のない人々
Type = VarSet
TriggerAll = var(50) = 0
Trigger1 = EnemyNear(Var(53)),Name ="Lin" && EnemyNear(Var(53)),AuthorName="ahuron"
Trigger2 = EnemyNear(Var(53)),Name ="Kim Kaphwan" && EnemyNear(Var(53)),AuthorName="ahuron"
Trigger3 = EnemyNear(Var(53)),Name ="Chris" && EnemyNear(Var(53)),AuthorName="ahuron"
Trigger4 = EnemyNear(Var(53)),Name ="Yashiro Nanakase" && EnemyNear(Var(53)),AuthorName="ahuron"
Trigger5 = EnemyNear(Var(53)),Name ="Shermie" && EnemyNear(Var(53)),AuthorName="ahuron"
Trigger6 = EnemyNear(Var(53)),Name ="Asura" && EnemyNear(Var(53)),AuthorName="ahuron"
Trigger7 = EnemyNear(Var(53)),Name ="Yuki" && EnemyNear(Var(53)),AuthorName="ahuron"
Trigger8 = EnemyNear(Var(53)),Name="anna" && EnemyNear(Var(53)),AuthorName="kayui uma"
Trigger9 = EnemyNear(Var(53)),Name="henri" && EnemyNear(Var(53)),AuthorName="kayui uma"
Trigger10= EnemyNear(Var(53)),Name="mora" && EnemyNear(Var(53)),AuthorName="kayui uma"
Trigger11= EnemyNear(Var(53)),Name="saya" && EnemyNear(Var(53)),AuthorName="kayui uma"
Trigger12= EnemyNear(Var(53)),Name="Geese Howard" && EnemyNear(Var(53)),AuthorName="Rin & Bat"
Trigger13= EnemyNear(Var(53)),Name="Nightmare Geese" && EnemyNear(Var(53)),AuthorName="Rin & Bat"
Trigger14= EnemyNear(Var(53)),Name="White" && EnemyNear(Var(53)),AuthorName="Rin & Bat"
Trigger15= EnemyNear(Var(53)),Name="Krizalid-" && EnemyNear(Var(53)),AuthorName="Chin-ya"
Trigger16= EnemyNear(Var(53)),Name="D-yashiro" && EnemyNear(Var(53)),AuthorName="Chin-ya"
Trigger17= EnemyNear(Var(53)),Name="Reak" && EnemyNear(Var(53)),AuthorName="Chin-ya"
Trigger18= EnemyNear(Var(53)),Name="Malin" && EnemyNear(Var(53)),AuthorName="Chin-ya"
Trigger19= EnemyNear(Var(53)),Name="EX_Saishu" && EnemyNear(Var(53)),AuthorName="Chin-ya"
Trigger20= EnemyNear(Var(53)),Name="Reak" && EnemyNear(Var(53)),AuthorName="Chin-ya"
Trigger21= EnemyNear(Var(53)),Name="Weakest_R" && EnemyNear(Var(53)),AuthorName="Chin-ya"
var(50) = 1

[State -2];
Type = VarSet
TriggerAll = var(50) = [0,1]
TriggerAll = Enemy,TeamMode = Single || Enemy,TeamMode = Turns
TriggerAll = RoundState = 2
Trigger1 =!EnemyNear(Var(53)),CanRecover
Trigger1 = EnemyNear(Var(53)),PrevStateNo = 5050
Trigger1 = EnemyNear(Var(53)),MoveType != H
var(50) = 2

[State -2]
Type = VarSet
TriggerAll = var(50) != 0
TriggerAll = Enemy,TeamMode = Turns
Trigger1 = RoundState != 2
var(50) = 0


;ＡＩ技強弱リセット
[State -2]
Type = null ;VarSet
TriggerAll = var(58) >= 1
Trigger1 = var(59) <= 0
var(58) = 0


[State -1];敵滞空時間
type = varadd
triggerall = roundstate = 2
trigger1 = EnemyNear(Var(53)),statetype = A
var(56) = 1

[State -1];敵滞空時間リセット
type = varset
triggerall = var(56) != 0
trigger1 = roundstate != 2
trigger2 = EnemyNear(Var(53)),statetype != A
var(56) = 0


;敵タッグ時、離れてる方の敵の位置判断
[State -1]
type = varset
trigger1 = EnemyNear(Var(53)),numpartner
var(38) = ifelse(facing = 1,floor(EnemyNear(1),Pos X - Pos X),-floor(EnemyNear(1),Pos X - Pos X))


;一勝フラグ
[State -1]
type = varset
triggerall = var(49) = 0
trigger1 = teammode = single || teammode = simul
trigger1 = win
var(49) = 1

[State -1];リセット
type = varset
triggerall = var(49) != 0
trigger1 = teammode = turns
var(49) = 0

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

;ジャンプ（投げ回避）
[state -1, jump]
type = ChangeState
value = ifelse(BackEdgeBodyDist > 50 && random <= 700 && EnemyNear(Var(53)),Vel X <= 0,105,62)
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = p2bodydist X <= 160
triggerall = random <= 250
trigger1 = EnemyNear(Var(53)),HitDefAttr = SC, NT,ST,HT && random <= 700
trigger2 = EnemyNear(Var(53)),stateno = var(48)
trigger2 = var(48) >= 1000 && EnemyNear(Var(53)),time <= 15
trigger3 = EnemyNear(Var(53)),stateno = var(45)
trigger3 = (var(45) = [1,999]) && EnemyNear(Var(53)),time <= 15

;ネオ・フリーズエクスキュージョン
[State -1]
type = ChangeState
value = 3500
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 3000 || (var(29) >= 1 && var(20) > 0 && power >= 2000)
triggerall = var(20) > 0 || var(19) >= 1000
triggerall = EnemyNear(Var(53)),life = [281,420]
triggerall = var(59) >= 2 || EnemyNear(Var(53)),time > 25
triggerall = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),statetype != A
triggerall = p2dist X = [1,320]
triggerall = EnemyNear(Var(53)),animtime <= -6
triggerall = p2bodydist X <= 70 - ((6 + EnemyNear(Var(53)),animtime) * 20)
triggerall = life <= const(data.life)*0.8
triggerall = EnemyNear(Var(53)),time > 3 || life <= 500
triggerall = random <= 500 || EnemyNear(Var(53)),time > 25
triggerall = random <= 50 || (life <= 400 && random <= 80)
triggerall = EnemyNear(Var(53)),life <= 420
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])

;フリーズエクスキュージョン
[State -1]
type = ChangeState
value = 3100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 2000
triggerall = var(59) >= 2 || EnemyNear(Var(53)),time > 25
triggerall = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),statetype != A
triggerall = p2dist X = [1,320]
triggerall = EnemyNear(Var(53)),animtime <= -7
triggerall = p2bodydist X <= 70 - ((7 + EnemyNear(Var(53)),animtime) * 20)
triggerall = life <= const(data.life)*0.8
triggerall = EnemyNear(Var(53)),time > 3 || life <= 500
triggerall = random <= 500 || EnemyNear(Var(53)),time > 25
triggerall = random <= 50 || (life <= 400 && random <= 80)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])

;EXレイスピン
[State -1]
type = ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(29) <= 0
triggerall = var(59) >= 2 || EnemyNear(Var(53)),time > 25
triggerall = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),statetype != A
triggerall = EnemyNear(Var(53)),animtime <= -12 && p2bodydist X <= 80
triggerall = life <= const(data.life)*0.8
triggerall = EnemyNear(Var(53)),time > 3 || life <= 500
triggerall = random <= 20 || (life <= 400 && random <= 60) || (power >= 3500 && random <= 80)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])

;EXダイヤモンドエッジ(タッグでぶっぱ)
[State -1]
type = ChangeState
value = 3010
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 2000
triggerall = teammode = simul && EnemyNear(Var(53)),numpartner
triggerall = EnemyNear(Var(53)),statetype != L ;&& EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Pos Y >= (-85 - (EnemyNear(Var(53)),Vel Y * 9) - (fvar(39) * 45))
triggerall = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Pos Y <= (-5 - (EnemyNear(Var(53)),Vel Y * 9) - (fvar(39) * 45))
triggerall = EnemyNear(Var(53)),stateno != [120,159]
triggerall = !Inguarddist && p2dist X = [1,320]
triggerall = p2bodydist X <= 150
triggerall = EnemyNear(Var(53)),statetype != A || p2bodydist X <= 80 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 15
triggerall = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = NumPartner && random <= 300
trigger1 = partner,authorname = "K.O.D" && partner,name = "K'"
trigger1 = partner,var(51) > 0 && var(20) < partner,var(51)
trigger2 = NumPartner && random <= 300
trigger2 = partner,authorname = "P-tan" && partner,name = "Leona XIII"
trigger2 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger3 = NumPartner && random <= 300
trigger3 = partner,authorname = "P-tan" && partner,name = "Izuko Chrysoberyl"
trigger3 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger4 = NumPartner && random <= 300
trigger4 = partner,authorname = "P-tan" && partner,name = "Kula Diamond"
trigger4 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger5 = NumPartner && random <= 300
trigger5 = partner,authorname = "Zenjidoh" && partner,name = "Neige_Pebble"
trigger5 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger6 = NumPartner && random <= 300
trigger6 = partner,authorname = "Ahuron" && partner,name = "Shermie"
trigger6 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger7 = NumPartner && random <= 300
trigger7 = partner,authorname = "Ahuron" && partner,name = "chris"
trigger7 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger8 = NumPartner && random <= 300
trigger8 = partner,authorname = "Ahuron" && partner,name = "Yashiro Nanakase"
trigger8 = partner,var(20) > 0 && var(20) < partner,var(20)

;フリーズエクスキュージョン(タッグでぶっぱ)
[State -1]
type = ChangeState
value = 3100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 2000
triggerall = teammode = simul && EnemyNear(Var(53)),numpartner
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = EnemyNear(Var(53)),time <= 10 && EnemyNear(Var(53)),stateno != [120,159]
triggerall = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = random <= 10
trigger2 = NumPartner && random <= 300
trigger2 = partner,authorname = "K.O.D" && partner,name = "K'"
trigger2 = partner,var(51) > 0 && var(20) < partner,var(51)
trigger3 = NumPartner && random <= 300
trigger3 = partner,authorname = "P-tan" && partner,name = "Leona XIII"
trigger3 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger4 = NumPartner && random <= 300
trigger4 = partner,authorname = "P-tan" && partner,name = "Izuko Chrysoberyl"
trigger4 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger5 = NumPartner && random <= 300
trigger5 = partner,authorname = "P-tan" && partner,name = "Kula Diamond"
trigger5 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger6 = NumPartner && random <= 300
trigger6 = partner,authorname = "Zenjidoh" && partner,name = "Neige_Pebble"
trigger6 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger7 = NumPartner && random <= 300
trigger7 = partner,authorname = "Ahuron" && partner,name = "Shermie"
trigger7 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger8 = NumPartner && random <= 300
trigger8 = partner,authorname = "Ahuron" && partner,name = "chris"
trigger8 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger9 = NumPartner && random <= 300
trigger9 = partner,authorname = "Ahuron" && partner,name = "Yashiro Nanakase"
trigger9 = partner,var(20) > 0 && var(20) < partner,var(20)

;EXレイスピン（ぶっぱ）
[State -1]
type = ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(29) <= 0
triggerall = power >= 2000 || EnemyNear(Var(53)),life <= 222 || EnemyNear(Var(53)),numpartner
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = EnemyNear(Var(53)),time <= 10 && p2bodydist X < 60 && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),time <= 5 || power >= 3500 || EnemyNear(Var(53)),numpartner
triggerall = life >= const(data.life)*0.8 || var(59) = 1 || EnemyNear(Var(53)),numpartner
triggerall = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = power >= 3500 || (power >= 2500 && random <= 500) || random <= 250 || EnemyNear(Var(53)),numpartner
trigger1 = random <= 25

;EXレイスピン（タッグ用ぶっぱ）
[State -1]
type = ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(29) <= 0
triggerall = teammode = simul && EnemyNear(Var(53)),numpartner
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = EnemyNear(Var(53)),time <= 10 && EnemyNear(Var(53)),stateno != [120,159]
triggerall = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = random <= 10
trigger2 = NumPartner && random <= 300
trigger2 = partner,authorname = "K.O.D" && partner,name = "K'"
trigger2 = partner,var(51) > 0 && var(20) < partner,var(51)
trigger3 = NumPartner && random <= 300
trigger3 = partner,authorname = "P-tan" && partner,name = "Leona XIII"
trigger3 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger4 = NumPartner && random <= 300
trigger4 = partner,authorname = "P-tan" && partner,name = "Izuko Chrysoberyl"
trigger4 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger5 = NumPartner && random <= 300
trigger5 = partner,authorname = "P-tan" && partner,name = "Kula Diamond"
trigger5 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger6 = NumPartner && random <= 300
trigger6 = partner,authorname = "Zenjidoh" && partner,name = "Neige_Pebble"
trigger6 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger7 = NumPartner && random <= 300
trigger7 = partner,authorname = "Ahuron" && partner,name = "Shermie"
trigger7 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger8 = NumPartner && random <= 300
trigger8 = partner,authorname = "Ahuron" && partner,name = "chris"
trigger8 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger9 = NumPartner && random <= 300
trigger9 = partner,authorname = "Ahuron" && partner,name = "Yashiro Nanakase"
trigger9 = partner,var(20) > 0 && var(20) < partner,var(20)

;クロウバイツ
[State -1]
type = ChangeState
value = 1000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(59) >= 2 || EnemyNear(Var(53)),time > 25
triggerall = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),statetype != A
triggerall = (EnemyNear(Var(53)),animtime <= -8 && p2bodydist X <= 35) || (EnemyNear(Var(53)),animtime <= -12 && p2bodydist X <= 60)
triggerall = life <= const(data.life)*0.8
triggerall = EnemyNear(Var(53)),time > 3 || life <= 500
triggerall = random <= 20 || (life <= 400 && random <= 60)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = var(58) := 2
trigger2 = stateno = 200 || stateno = 205 || stateno = 210 || stateno = 215 || stateno = 235 || stateno = 245
trigger2 = movecontact
trigger2 = var(58) := 2
trigger3 = stateno = 400 || stateno = 430 || stateno = 440 || stateno = 290
trigger3 = movecontact
trigger3 = var(58) := 2

;クロウバイツ（ぶっぱ）
[State -1]
type = ChangeState
value = 1000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = EnemyNear(Var(53)),time <= 5 && p2bodydist X < 60 && EnemyNear(Var(53)),stateno != [120,159]
triggerall = life >= const(data.life)*0.8 || var(59) = 1
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = random <= 5
trigger1 = var(58) := 2

;クロウバイツ(対空)
[State -1, taiku]
type = ChangeState
value = 1000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(21) <= 0
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),movetype != H
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
 triggerall = var(56) > 30 || random <= 200
 triggerall = var(59) >= 2 || random <= 400
 triggerall = EnemyNear(Var(53)),Vel Y >= 0 || random <= 250
 triggerall = random <= 500
trigger1 = EnemyNear(Var(53)),Pos Y >= (-40 - (EnemyNear(Var(53)),Vel Y * 4) - (EnemyNear(Var(53)),const(movement.yaccel) * 10))
trigger1 = EnemyNear(Var(53)),Pos Y <= (-5 - (EnemyNear(Var(53)),Vel Y * 4) - (EnemyNear(Var(53)),const(movement.yaccel) * 10))
trigger1 = p2dist X <= 90 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = p2dist X >= 35 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = var(58) := 2
trigger2 = EnemyNear(Var(53)),Pos Y >= (-40 - (EnemyNear(Var(53)),Vel Y * 6) - (EnemyNear(Var(53)),const(movement.yaccel) * 21))
trigger2 = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 5) - (EnemyNear(Var(53)),const(movement.yaccel) * 15))
trigger2 = p2dist X <= 90 + (EnemyNear(Var(53)),Vel X * 5) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger2 = p2dist X >= 35 + (EnemyNear(Var(53)),Vel X * 5) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger2 = var(58) := 1
trigger3 = EnemyNear(Var(53)),Pos Y >= (-55 - (EnemyNear(Var(53)),Vel Y * 10) - (EnemyNear(Var(53)),const(movement.yaccel) * 55))
trigger3 = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 9) - (EnemyNear(Var(53)),const(movement.yaccel) * 45))
trigger3 = p2dist X <= 100 + (EnemyNear(Var(53)),Vel X * 9) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger3 = p2dist X >= 45 + (EnemyNear(Var(53)),Vel X * 9) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger3 = var(58) := 1
trigger4 = EnemyNear(Var(53)),Pos Y >= (-70 - (EnemyNear(Var(53)),Vel Y * 12) - (EnemyNear(Var(53)),const(movement.yaccel) * 78))
trigger4 = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 11) - (EnemyNear(Var(53)),const(movement.yaccel) * 66))
trigger4 = p2dist X <= 110 + (EnemyNear(Var(53)),Vel X * 9) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger4 = p2dist X >= 55 + (EnemyNear(Var(53)),Vel X * 9) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger4 = var(58) := 1

;しゃがみ強パンチ(対空)
[State -1, taiku]
type = ChangeState
value = 410
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(21) <= 0
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),movetype != H
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
 triggerall = var(56) > 30 || random <= 200
 triggerall = var(59) >= 2 || random <= 200
 triggerall = EnemyNear(Var(53)),Vel Y >= 0 || random <= 100
 triggerall = random <= 200
trigger1 = EnemyNear(Var(53)),Pos Y >= (-80 - (EnemyNear(Var(53)),Vel Y * 7) - (EnemyNear(Var(53)),const(movement.yaccel) * 28))
trigger1 = EnemyNear(Var(53)),Pos Y <= (-30 - (EnemyNear(Var(53)),Vel Y * 7) - (EnemyNear(Var(53)),const(movement.yaccel) * 28))
trigger1 = p2dist X <= 80 + (EnemyNear(Var(53)),Vel X * 5) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = p2dist X >= 30 + (EnemyNear(Var(53)),Vel X * 5) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)

;立ち弱パンチ(対空)
[State -1, taiku]
type = ChangeState
value = 200
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(21) <= 0
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),movetype != H
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
 triggerall = var(56) > 30 || random <= 200
 triggerall = var(59) >= 2 || random <= 200
 triggerall = EnemyNear(Var(53)),Vel Y >= 0 || random <= 100
 triggerall = random <= 80
trigger1 = !inguarddist
trigger1 = EnemyNear(Var(53)),Pos Y >= (-50 - (EnemyNear(Var(53)),Vel Y * 5) - (EnemyNear(Var(53)),const(movement.yaccel) * 15))
trigger1 = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 5) - (EnemyNear(Var(53)),const(movement.yaccel) * 15))
trigger1 = p2dist X <= 80 + (EnemyNear(Var(53)),Vel X * 5) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = p2dist X >= 1 + (EnemyNear(Var(53)),Vel X * 5) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)

;遠距離立ち弱キック(対空)
[State -1, taiku]
type = ChangeState
value = 230
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(21) <= 0 && p2dist X > 50
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),movetype != H
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
 triggerall = var(56) > 30 || random <= 200
 triggerall = var(59) >= 2 || random <= 200
 triggerall = EnemyNear(Var(53)),Vel Y >= 0 || random <= 100
 triggerall = random <= 80
trigger1 = var(29) <= 0
trigger1 = EnemyNear(Var(53)),Pos Y >= (-35 - (EnemyNear(Var(53)),Vel Y * 4) - (EnemyNear(Var(53)),const(movement.yaccel) * 10))
trigger1 = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 4) - (EnemyNear(Var(53)),const(movement.yaccel) * 10))
trigger1 = p2dist X <= 90 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = p2dist X >= 40 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = !inguarddist || (p2dist X >= 70 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1))
trigger2 = var(29) >= 1
trigger2 = EnemyNear(Var(53)),Pos Y >= (-35 - (EnemyNear(Var(53)),Vel Y * 4) - (EnemyNear(Var(53)),const(movement.yaccel) * 10))
trigger2 = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 4) - (EnemyNear(Var(53)),const(movement.yaccel) * 10))
trigger2 = p2dist X <= 105 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger2 = p2dist X >= 55 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger2 = !inguarddist || (p2dist X >= 70 + (EnemyNear(Var(53)),Vel X * 4) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1))


;回り込み(対空)
[State -1, taiku]
type = ChangeState
value = 700
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(21) <= 0
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),movetype != H
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
 triggerall = var(56) > 30 || random <= 400
 triggerall = var(59) >= 2 || random <= 500
 triggerall = EnemyNear(Var(53)),Vel Y >= 0 || random <= 500
 triggerall = random <= 500
triggerall = EnemyNear(Var(53)),Pos Y >= (-80 - (EnemyNear(Var(53)),Vel Y * 20) - (EnemyNear(Var(53)),const(movement.yaccel) * 210))
triggerall = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 26) - (EnemyNear(Var(53)),const(movement.yaccel) * 358))
trigger1 = EnemyNear(Var(53)),facing = -facing
trigger1 = p2dist X <= 30 + (EnemyNear(Var(53)),Vel X * 20) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = p2dist X >= -80 + (EnemyNear(Var(53)),Vel X * 20) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)

;回り込み・後ろ(対空)
[State -1, taiku]
type = ChangeState
value = 701
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(21) <= 0
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),movetype != H
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
 triggerall = var(56) > 30 || random <= 400
 triggerall = var(59) >= 2 || random <= 500
 triggerall = EnemyNear(Var(53)),Vel Y >= 0 || random <= 500
 triggerall = random <= 500
triggerall = EnemyNear(Var(53)),Pos Y >= (-80 - (EnemyNear(Var(53)),Vel Y * 15) - (EnemyNear(Var(53)),const(movement.yaccel) * 120))
triggerall = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 20) - (EnemyNear(Var(53)),const(movement.yaccel) * 210))
trigger1 = EnemyNear(Var(53)),facing = facing
trigger1 = p2dist X <= 80 + (EnemyNear(Var(53)),Vel X * 15) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = p2dist X >= 0 + (EnemyNear(Var(53)),Vel X * 15) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)

;---------------------------------------------------------------------------
;飛び道具回避

;大ジャンプ
[State -1]
type=ChangeState
value = 68
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate=2 && statetype != A
triggerAll = EnemyNear(Var(53)),Alive
triggerall = P2Dist x = [1,320]
triggerAll = EnemyNear(Var(53)),MoveType!=H||EnemyNear(Var(53)),stateno<200
triggerAll = EnemyNear(Var(53)),statetype!=L
triggerAll = EnemyNear(Var(53)),statetype!=A || EnemyNear(Var(53)),Pos Y>=-30
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = numhelper(20000)
triggerall = (helper(20000),var(58)/10000000)%10
triggerall = P2Dist x > 140
triggerall = random <= 70
trigger1= EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),animtime < -20

;回り込み
[State -1]
type=ChangeState
value = 700
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate=2 && statetype != A
triggerAll=EnemyNear(Var(53)),Alive
triggerall=P2Dist x > 0
triggerAll=EnemyNear(Var(53)),MoveType!=H||EnemyNear(Var(53)),stateno<200
triggerAll=EnemyNear(Var(53)),statetype!=L
triggerall=ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall=numhelper(20000)
triggerall= (helper(20000),var(58)/100000000)%10
triggerall= random <= 70
trigger1 = EnemyNear(Var(53)),movetype = A || (var(55) = 2 && EnemyNear(Var(53)),movetype = I && EnemyNear(Var(53)),ctrl = 0)
trigger1 = EnemyNear(Var(53)),animtime < -30
trigger1 = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Vel Y <= 0
trigger2 = p2bodydist X > 200 + ((EnemyNear(Var(53)),Vel X * 20) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1))

;カウンターシェル
[State -1]
type=ChangeState
value = 1200
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate=2 && statetype != A
triggerAll = EnemyNear(Var(53)),Alive
triggerall = P2Dist x > 0
triggerAll = EnemyNear(Var(53)),MoveType!=H||EnemyNear(Var(53)),stateno<200
triggerAll = EnemyNear(Var(53)),statetype!=L
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = numhelper(20000)
triggerall = (helper(20000),var(58)/1000000)%10
triggerall = random <= 200
trigger1 = EnemyNear(Var(53)),movetype = A || (EnemyNear(Var(53)),movetype = I && EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [0,199])
trigger1 = EnemyNear(Var(53)),animtime < -10 || EnemyNear(Var(53)),statetype = A
trigger1 = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Vel Y <= 0
trigger2 = p2bodydist X > 100 + ((EnemyNear(Var(53)),Vel X * 20) * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1))

;----------------------------------------------------------------
;空中追撃


;敵空中喰らい加速度判断
[State -2];
Type = VarSet
TriggerAll = fvar(39) != 0.45
TriggerAll = RoundState = 2
TriggerAll = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = H
TriggerAll = EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [120,159]
TriggerAll = movehit
Trigger1 = stateno = 1000 || stateno = 2000 || (stateno = [200,699])
Trigger1 = stateno != 455
fvar(39) = 0.45

;敵空中喰らい加速度判断
[State -2];
Type = VarSet
TriggerAll = fvar(39) != 0.5
TriggerAll = RoundState = 2
TriggerAll = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = H
TriggerAll = EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [120,159]
TriggerAll = movehit
Trigger1 = (stateno = [1000,2999])
Trigger1 = stateno != 1000 && stateno != 2000 && stateno != 1330 && stateno != 2330
fvar(39) = 0.5

;敵空中喰らい加速度判断
[State -2];
Type = VarSet
TriggerAll = fvar(39) != 0.7
TriggerAll = RoundState = 2
TriggerAll = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = H
TriggerAll = EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [120,159]
TriggerAll = movehit
Trigger1 = stateno = 455
fvar(39) = 0.7

;敵空中喰らい加速度判断
[State -2];
Type = VarSet
TriggerAll = fvar(39) != 0.5
TriggerAll = RoundState = 2
TriggerAll = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = H
TriggerAll = EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [120,159]
TriggerAll = movehit
Trigger1 = stateno = 1330 || stateno = 2330
fvar(39) = 0.5

[State -2];
Type = VarSet
TriggerAll = fvar(39) != 0.35
TriggerAll = RoundState = 2
TriggerAll = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = H
TriggerAll = EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [120,159]
trigger1 = projhittime(1150) = 1
trigger2 = projhittime(2150) = 1
fvar(39) = 0.35

[State -2];
Type = VarSet
TriggerAll = fvar(39) != 0.5
TriggerAll = RoundState = 2
TriggerAll = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = H
TriggerAll = EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [120,159]
trigger1 = projhittime(3050) = 1
trigger2 = projhittime(3060) = 1
trigger3 = projhittime(3160) = 1
trigger4 = projhittime(3560) = 1
trigger5 = numhelper(1230)
trigger5 = helper(1230),movehit = 1 && enemynear,stateno != [120,159]
trigger6 = numhelper(2230)
trigger6 = helper(2230),movehit = 1 && enemynear,stateno != [120,159]
fvar(39) = 0.5

[State -2];
Type = VarSet
TriggerAll = fvar(39) != 0.3
TriggerAll = RoundState = 2
TriggerAll = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = H
TriggerAll = EnemyNear(Var(53)),ctrl = 0 && EnemyNear(Var(53)),stateno != [120,159]
trigger1 = projhittime(1250) = 1
trigger2 = projhittime(2250) = 1
trigger3 = movehit
fvar(39) = 0.3

[State -2];リセット
Type = VarSet
TriggerAll = fvar(39) != EnemyNear(Var(53)),const(movement.yaccel)
Trigger1 = RoundState != 2
Trigger2 = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),movetype = A
Trigger3 = EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),stateno = [120,159]
fvar(39) = EnemyNear(Var(53)),const(movement.yaccel)

;--------

;ネオ・フリーズエクスキュージョン
[State -1]
type = ChangeState
value = 3500
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 3000 || (var(29) >= 1 && var(20) > 0 && power >= 2000)
triggerall = var(20) > 0 || var(19) >= 1000
triggerall = var(49) = 1 || var(20) = [1,10]
triggerall = EnemyNear(Var(53)),life < 210 || EnemyNear(Var(53)),life < 420*fvar(0) || var(20) = [1,10]
triggerall = NumHelper(8900+id)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 6) - (fvar(39) * 21))
trigger1 = p2dist X > 0 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 6
trigger1 = p2bodydist X <= 60 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 6
trigger1 = EnemyNear(Var(53)),Pos Y >= (-55 - (EnemyNear(Var(53)),Vel Y * 6) - (fvar(39) * 21))
trigger2 = (Helper(8900+id),fvar(facing = -1) > 100 && p2dist X = [-5,320])
trigger2 = p2bodydist X > 60 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 9
trigger2 = p2bodydist X <= 120 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 9
trigger2 = EnemyNear(Var(53)),Pos Y >= (-55 - (EnemyNear(Var(53)),Vel Y * 9) - (fvar(39) * 45))
trigger2 = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 9) - (fvar(39) * 45))
trigger3 = (Helper(8900+id),fvar(facing = -1) > 150 && p2dist X = [-5,320])
trigger3 = p2bodydist X > 120 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 12
trigger3 = p2bodydist X <= 180 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 12
trigger3 = EnemyNear(Var(53)),Pos Y >= (-55 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
trigger3 = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
trigger4 = (Helper(8900+id),fvar(facing = -1) > 200 && p2dist X = [-5,320])
trigger4 = p2bodydist X > 180 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 15
trigger4 = p2bodydist X <= 240 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 15
trigger4 = EnemyNear(Var(53)),Pos Y >= (-55 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120))
trigger4 = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120))


;ワンインチ
[State -1, taiku2]
type = ChangeState
value = 260
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(29) >= 1
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y >= (-40 - (EnemyNear(Var(53)),Vel Y * 28) - (fvar(39) * 406))
triggerall = EnemyNear(Var(53)),Pos Y <= (-40 - (EnemyNear(Var(53)),Vel Y * 21) - (fvar(39) * 231))
trigger1 = (Helper(8900+id),fvar(facing = -1) <= 90 && p2dist X = [-80,320])
trigger1 = var(58) := 1

;EXレイスピン
[State -1, taiku3]
type = null ;ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(29) >= 1
triggerall = fvar(0) > 0.7 || (power >= 2000 && fvar(0) > 0.4)
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = var(20) <= 0 || (Helper(8900+id),fvar(facing = -1) > 120)
triggerall = fvar(0) > 0.9 || (fvar(0) > 0.75 && Helper(8900+id),fvar(facing = -1) <= 240) || (EnemyNear(Var(53)),life < 280*fvar(0)) || (var(19) >= 500 && EnemyNear(Var(53)),life < 380*fvar(0))
triggerall = power >= 2000 || (Helper(8900+id),fvar(facing = -1) <= 240)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Vel Y + (fvar(39) * 12) > 0
triggerall = EnemyNear(Var(53)),Pos Y >= (-65 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
triggerall = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
trigger1 = p2bodydist X <= 85 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 12
trigger2 = (Helper(8900+id),fvar(facing = -1) <= 110 && p2dist X = [-5,320])

;レイスピン・強
[State -1, taiku1]
type = ChangeState
value = 1300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = fvar(1) <= 0
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y >= (-95 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120))
triggerall = EnemyNear(Var(53)),Pos Y <= (-60 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120))
trigger1 = p2bodydist X <= 100 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 15
trigger1 = var(58) := 2
trigger2 = (Helper(8900+id),fvar(facing = -1) <= 130 && p2dist X = [-55,320])
trigger2 = var(58) := 2

;レイスピン・弱
[State -1, taiku2]
type = ChangeState
value = 1300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = fvar(1) <= 0
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y >= (-70 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120)) || EnemyNear(Var(53)),Pos Y > (0 - (EnemyNear(Var(53)),Vel Y * 16) - (fvar(39) * 136))
triggerall = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120))
trigger1 = (Helper(8900+id),fvar(facing = -1) <= 130 && p2dist X = [-80,320])
trigger1 = var(58) := 1
trigger2 = !(var(20) > 0 || var(19) >= 500 || EnemyNear(Var(53)),life < 125*fvar(0))
trigger2 = p2bodydist X <= 100 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 15
trigger2 = var(58) := 1


;ダイヤモンドエッジ
[State -1, taiku3]
type = ChangeState
value = 3000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = Numpartner = 0
triggerall = var(20) <= 0
triggerall = fvar(0) < 0.35
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y >= (-85 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120))
triggerall = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 15) - (fvar(39) * 120))
trigger1 = p2bodydist X <= 80 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 15
trigger2 = (Helper(8900+id),fvar(facing = -1) <= 100 && p2dist X = [-5,320])

;EXレイスピン
[State -1, taiku3]
type = null ;ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = var(20) <= 0 || (Helper(8900+id),fvar(facing = -1) > 120)
triggerall = fvar(0) > 0.9 || (fvar(0) > 0.75 && Helper(8900+id),fvar(facing = -1) <= 240) || (EnemyNear(Var(53)),life < 280*fvar(0)) || (var(19) >= 500 && EnemyNear(Var(53)),life < 380*fvar(0))
triggerall = power >= 2000 || (Helper(8900+id),fvar(facing = -1) <= 240)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Vel Y + (fvar(39) * 12) > 0
triggerall = EnemyNear(Var(53)),Pos Y >= (-65 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
triggerall = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
trigger1 = p2bodydist X <= 85 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 12
trigger2 = (Helper(8900+id),fvar(facing = -1) <= 110 && p2dist X = [-5,320])

;EXレイスピン(味方がMAX状態)
[State -1, taiku3]
type = null ;ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = NumHelper(8900+id)
triggerall = NumPartner
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y >= (-65 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
triggerall = EnemyNear(Var(53)),Pos Y <= (-15 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
triggerall = (p2bodydist X<=85+ifelse(EnemyNear(Var(53)),facing=facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X)*12)||(Helper(8900+id),fvar(facing=-1)<=110&&p2dist X=[-5,320])
trigger1 = partner,authorname = "K.O.D" && partner,name = "K'"
trigger1 = partner,var(51) > 0 && var(20) < partner,var(51)
trigger2 = partner,authorname = "P-tan" && partner,name = "Leona XIII"
trigger2 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger3 = partner,authorname = "P-tan" && partner,name = "Izuko Chrysoberyl"
trigger3 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger4 = partner,authorname = "P-tan" && partner,name = "Kula Diamond"
trigger4 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger5 = partner,authorname = "Zenjidoh" && partner,name = "Neige_Pebble"
trigger5 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger6 = partner,authorname = "Ahuron" && partner,name = "Shermie"
trigger6 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger7 = partner,authorname = "Ahuron" && partner,name = "chris"
trigger7 = partner,var(20) > 0 && var(20) < partner,var(20)
trigger8 = partner,authorname = "Ahuron" && partner,name = "Yashiro Nanakase"
trigger8 = partner,var(20) > 0 && var(20) < partner,var(20)

;クロウバイツ
[State -1, taiku4]
type = ChangeState
value = 1000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y >= (-40 - (EnemyNear(Var(53)),Vel Y * 4) - (fvar(39) * 10)) || EnemyNear(Var(53)),Pos Y > (0 - (EnemyNear(Var(53)),Vel Y * 5) - (fvar(39) * 15))
;triggerall = var(50) = 2 || EnemyNear(Var(53)),numpartner || var(20) > 0 || EnemyNear(Var(53)),Pos Y > (0 - (EnemyNear(Var(53)),Vel Y * 5) - (fvar(39) * 15))
triggerall = EnemyNear(Var(53)),Pos Y < 0
triggerall = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 4) - (fvar(39) * 10))
trigger1 = p2bodydist X <= 55 + ifelse(EnemyNear(Var(53)),facing = facing,-EnemyNear(Var(53)),Vel X,EnemyNear(Var(53)),Vel X) * 4
trigger1 = var(58) := 2
trigger2 = (Helper(8900+id),fvar(facing = -1) <= 90 && p2dist X = [-55,320])
trigger2 = var(58) := 2

;ダッシュ
[State -1, taiku5]
type = ChangeState
value = 100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (movetype != H && stateno = [120,149])
triggerall = stateno != 100
triggerall = EnemyNear(Var(53)),numpartner = 0
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = p2dist X = [1,320]
triggerall = EnemyNear(Var(53)),Pos Y <= (-1 - (EnemyNear(Var(53)),Vel Y * 4) - (fvar(39) * 10))
trigger1 = p2bodydist X = [5,320]
trigger1 = time > 5 || p2bodydist X = [15,320]

;----------------------------------------------------------------
;レイスピン派生

;EXシット(空中ヒット追撃)
[State 1100,end]
type = ChangeState
value = 2330
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = stateno = 2300 && anim = 2300
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = NumHelper(8900+id)
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = Vel Y > 0 && Pos Y >= 0
trigger1 = EnemyNear(Var(53)),Pos Y >= (-30 - (EnemyNear(Var(53)),Vel Y * 18) - (fvar(39) * 171))
trigger1 = EnemyNear(Var(53)),Pos Y < (0 - (EnemyNear(Var(53)),Vel Y * 11) - (fvar(39) * 66))

;シット(空中ヒット追撃)
[State 1100,end]
type = ChangeState
value = 1330
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = stateno = 1300 && anim = 1310
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = NumHelper(8900+id)
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = Vel Y > 0 && Pos Y >= 0
trigger1 = EnemyNear(Var(53)),Pos Y >= (-30 - (EnemyNear(Var(53)),Vel Y * 18) - (fvar(39) * 171))
trigger1 = EnemyNear(Var(53)),Pos Y < (0 - (EnemyNear(Var(53)),Vel Y * 11) - (fvar(39) * 66))

;シット(ヒット追撃)
[State 1100,end]
type = ChangeState
value = 1330
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = stateno = 1300 && anim = 1300
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = S || EnemyNear(Var(53)),statetype = C
triggerall = NumHelper(8900+id)
trigger1 = Vel Y > 0 && Pos Y >= 0
trigger1 = movehit

;スタンド(ヒット追撃)
[State 1100,end]
type = ChangeState
value = 1320
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate >= 2 && statetype = A
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = stateno = 1300 && (anim = 1300 || anim = 1310)
triggerall = anim = 1300 || hitcount = 1
triggerall = EnemyNear(Var(53)),movetype = H ;&& EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 811 && EnemyNear(Var(53)),stateno != 1280
triggerall = EnemyNear(Var(53)),stateno != 1280 && EnemyNear(Var(53)),stateno != 1290
triggerall = EnemyNear(Var(53)),stateno != 1291 && EnemyNear(Var(53)),stateno != 1292
triggerall = NumHelper(8900+id)
triggerall = var(21) <= 0 ;空中追撃判定
triggerall = EnemyNear(Var(53)),Pos Y >= (-100 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
triggerall = EnemyNear(Var(53)),Pos Y <= (-5 - (EnemyNear(Var(53)),Vel Y * 12) - (fvar(39) * 78))
trigger1 = Vel Y > 0 && Pos Y >= 0

;EXシット(地上ヒット追撃)
[State 1100,end]
type = ChangeState
value = 2330
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = !inguarddist
triggerall = NumHelper(8900+id)
triggerall = stateno = 2300 && anim = 2300
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = S || EnemyNear(Var(53)),statetype = C
triggerall = NumHelper(8900+id)
trigger1 = Vel Y > 0 && Pos Y >= 0
trigger1 = movehit

;----------------------------------------------------------------
;ドライブキャンセルコンボ

;ネオ・フリーズエクスキュージョン(MAXキャンセル)
[State -1]
type = ChangeState
value = 3500
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 3000 || (var(29) >= 1 && var(20) > 0 && power >= 2000)
triggerall = var(20) > 0 || var(19) >= 1000
triggerall = EnemyNear(Var(53)),statetype = A && p2dist X = [1,320]
triggerall = NumHelper(8900+id)
trigger1 = stateno = 3000 && (animelem = 5,>= 8 && animelem = 10,<0)
trigger1 = var(20) = [1,150]

;ダイヤモンドエッジ(MAXキャンセル用)
[State Scramble Dash]
type = ChangeState
value = 3000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(20) > 0 || var(19) >= 500
triggerall = movehit = 1 || (var(20) > 0 && movecontact = 1)
triggerall = EnemyNear(Var(53)),statetype = A && p2dist X = [1,320]
triggerall = NumHelper(8900+id)
triggerall = stateno = 1000
trigger1 = power >= 4000
trigger1 = EnemyNear(Var(53)),life > 105 && EnemyNear(Var(53)),life > 210*fvar(0)
trigger1 = var(20) = [140,250]

;ネオ・フリーズエクスキュージョン
[State -1]
type = ChangeState
value = 3500
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 3000 || (var(29) >= 1 && var(20) > 0 && power >= 2000)
triggerall = var(20) > 0 || var(19) >= 1000
triggerall = movehit = 1
triggerall = EnemyNear(Var(53)),statetype = A && p2dist X = [1,320]
triggerall = NumHelper(8900+id)
triggerall = stateno = 1000
trigger1 = var(20) = [1,100]
trigger2 = var(49) = 1
trigger2 = EnemyNear(Var(53)),life < 210 || EnemyNear(Var(53)),life < 420*fvar(0)

;EXダイヤモンドエッジ
[State Scramble Dash]
type = ChangeState
value = 3010
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 2000
triggerall = var(20) > 0 || var(19) >= 500
triggerall = movehit = 1 || (var(20) > 0 && movecontact = 1)
triggerall = EnemyNear(Var(53)),statetype = A && p2dist X = [1,320]
triggerall = NumHelper(8900+id)
triggerall = (Helper(8900+id),fvar(facing = -1) > 130 && p2dist X = [-5,320])
triggerall = stateno = 1000
triggerall = !(EnemyNear(Var(53)),life <= floor(fvar(0)*210) || EnemyNear(Var(53)),life <= 105)
trigger1 = var(20) <= 0
trigger1 = EnemyNear(Var(53)),life <= floor(fvar(0)*320) || EnemyNear(Var(53)),life <= 160
trigger2 = fvar(0) < 0.35
trigger2 = (var(20) = [0,100])

;ダイヤモンドエッジ
[State Scramble Dash]
type = ChangeState
value = 3000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(20) > 0 || var(19) >= 500
triggerall = movehit = 1 || (var(20) > 0 && movecontact = 1)
triggerall = EnemyNear(Var(53)),statetype = A && p2dist X = [1,320]
triggerall = NumHelper(8900+id)
triggerall = stateno = 1000
trigger1 = var(20) <= 0
trigger1 = EnemyNear(Var(53)),life <= floor(fvar(0)*210) || EnemyNear(Var(53)),life <= 105
trigger2 = fvar(0) < 0.35
trigger2 = (var(20) = [0,100])

;EXレイスピン
[State Scramble Dash]
type = ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = fvar(0) > 0.6 || (var(20) > 0 && fvar(0) > 0.4)
triggerall = power >= 2500 || EnemyNear(Var(53)),Pos Y > -25
triggerall = var(20) > 0 || var(19) >= 500
triggerall = movehit = 1 || (var(20) > 0 && movecontact = 1)
triggerall = EnemyNear(Var(53)),statetype = A || (var(20) > 0 && moveguarded = 1)
triggerall = (p2dist X = [-15,320]) || var(20) > 0
triggerall = NumHelper(8900+id)
triggerall = stateno = 1000
triggerall = fvar(0) > 0.7
triggerall = Helper(8900+id),fvar(facing = -1) <= 330 || var(20) > 0 || power >= 2000
triggerall = EnemyNear(Var(53)),life > floor(fvar(0)*60)
trigger1 = var(20) > 0 || (var(19) > 900 && EnemyNear(Var(53)),life > 5)

;レイスピン
[State Scramble Dash]
type = ChangeState
value = 1300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(20) > 0 || var(19) >= 500
triggerall = movehit = 1 || (var(20) > 0 && movecontact = 1)
triggerall = EnemyNear(Var(53)),statetype = A || var(20) > 0
triggerall = (p2dist X = [-15,320]) || var(20) > 0
triggerall = NumHelper(8900+id)
triggerall = stateno = 1000
triggerall = Helper(8900+id),fvar(facing = -1) <= 240 || var(20) > 0
trigger1 = var(20) > 0 && EnemyNear(Var(53)),statetype != A
trigger1 = var(58) := 1
trigger2 = var(20) > 0 || (var(19) > 900 && EnemyNear(Var(53)),life > 5)
trigger2 = var(58) := 2
trigger3 = EnemyNear(Var(53)),life <= floor(fvar(0)*112)
trigger3 = var(58) := 2
trigger4 = (Helper(8900+id),fvar(facing = -1) <= 240 && EnemyNear(Var(53)),life <= floor(fvar(0)*172))
trigger4 = var(58) := 2
trigger5 = var(19) >= 1000 && (Helper(8900+id),fvar(facing = -1) <= 240 && EnemyNear(Var(53)),life <= floor(fvar(0)*266))
trigger5 = var(58) := 2

;EXレイスピン
[State Scramble Dash]
type = ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(20) > 0 || var(19) >= 500
triggerall = movehit = 1 || (var(20) > 0 && movecontact = 1)
triggerall = EnemyNear(Var(53)),statetype = A || (var(20) > 0 && moveguarded = 1)
triggerall = (p2dist X = [-15,320]) || var(20) > 0
triggerall = NumHelper(8900+id)
triggerall = stateno = 1000
triggerall = fvar(0) > 0.7
triggerall = Helper(8900+id),fvar(facing = -1) <= 330 || var(20) > 0 || power >= 2000
triggerall = EnemyNear(Var(53)),life > floor(fvar(0)*60)
trigger1 = var(20) > 0 || (var(19) > 900 && EnemyNear(Var(53)),life > 5)

;----------------------------------------------------------------
;EXブレス追撃

;ダイヤモンドブレス
[State -1, taiku4]
type = ChangeState
value = 1100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno = 2110
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = p2bodydist X <= 95 && p2dist X = [1,320]
trigger1 = EnemyNear(Var(53)),time <= 35
trigger1 = var(58) := 2

;----------------------------------------------------------------
;地上コンボ

[State -1];有利状況
type = varset
triggerall = var(33) = 0
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149]) || stateno = 901
trigger1 = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),statetype != L
trigger1 = EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),stateno != [120,159]
var(33) = 1

[State -1];
type = varset
triggerall = var(33) != 0
trigger1 = roundstate != 2 || movetype = H || statetype = L
trigger2 = EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),statetype = A || EnemyNear(Var(53)),movetype != H
var(33) = 0

;ワンインチ
[State Scramble Dash]
type = ChangeState
value = 265
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = (movehit = [1,5])
triggerall = NumHelper(8900+id)
trigger1 = (Helper(8900+id),fvar(facing = -1) > 60 && p2dist X = [-5,320])
trigger1 = (stateno = 215 && animelem = 4,< 0) || (stateno = 245 && animelem = 5,< 0)
trigger2 = (Helper(8900+id),fvar(facing = -1) <= 60 && p2dist X = [-5,320])
trigger2 = (stateno = 215 && animelem = 8,>=1) || (stateno = 245 && animelem = 8,>=1)

;フリーズエクスキュージョン(タッグでぶっぱ)
[State -1]
type = ChangeState
value = 3100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 2000
triggerall = teammode = simul && EnemyNear(Var(53)),numpartner
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = (movehit = [1,5]) && random <= 200
triggerall = NumHelper(8900+id)
trigger1 = (Helper(8900+id),fvar(facing = -1) > 60 && p2dist X = [-5,320])
trigger1 = (stateno = 215 && animelem = 4,< 0) || (stateno = 245 && animelem = 5,< 0)

;EXダイヤモンドブレス
[State Scramble Dash]
type = ChangeState
value = 2100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = (movehit = [1,5])
triggerall = power >= 1000
triggerall = power > 2000 || EnemyNear(Var(53)),life = [floor(fvar(0)*172),floor(fvar(0)*461)]
;triggerall = var(59) >= 2 || life < 300
triggerall = NumHelper(8900+id)
triggerall = (Helper(8900+id),fvar(facing = -1) <= 120 && p2dist X = [-5,320])
triggerall = fvar(0) > 0.7 || power >= 4000
trigger1 = (stateno = 215 && animelem = 8,>=1) || (stateno = 245 && animelem = 8,>=1)
trigger2 = (stateno = 210 && animelem = 5,>=0) && p2bodydist X <= 45
trigger3 = stateno = 265

;クイックハイパーモード発動
[State -1, Jump Strong Kick]
type = ChangeState
value = 901
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = var(20) = 0 && var(19) >= 1000
triggerall = NumHelper(8900+id)
triggerall = (Helper(8900+id),fvar(facing = -1) <= 140 && p2dist X = [-5,320])
triggerall = EnemyNear(Var(53)),life > 400 || (power < 2000 && EnemyNear(Var(53)),life > 300)
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = (movehit = [1,5])
trigger1 = stateno = 200 || stateno = 230 || stateno = 400 || stateno = 430
trigger1 = var(33) = 1 || var(59) >= 2 || !(prevstateno = 200 || prevstateno = 205 || prevstateno = 230 || prevstateno = 235 || prevstateno = 400 || prevstateno = 430)
trigger1 = p2bodydist X <= 60
trigger2 = (stateno = 215 && animelem = 8,>=1) || (stateno = 245 && animelem = 8,>=1)
trigger3 = (stateno = 210 && animelem = 5,>=0) && p2bodydist X <= 60
trigger4 = stateno = 265

;ダイヤモンドブレス(固め)
[State Scramble Dash]
type = ChangeState
value = 1100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = moveguarded = 1
triggerall = NumHelper(8900+id)
trigger1 = (stateno = 215 && animelem = 4,< 0) || (stateno = 245 && animelem = 5,< 0)
trigger1 = random <= 250
trigger1 = var(58) := 2
trigger2 = (stateno = 215 && animelem = 8,>=1) || (stateno = 245 && animelem = 8,>=1)
trigger2 = var(58) := 1
trigger3 = (stateno = 215 && animelem = 4,< 0) || (stateno = 245 && animelem = 5,< 0)
trigger3 = random <= 250
trigger3 = var(58) := 1
trigger4 = (stateno = 210 && animelem = 5,>=0) && p2bodydist X <= 35
trigger4 = var(58) := 1
trigger5 = stateno = 265 && p2bodydist X <= 35
trigger5 = var(58) := 1

;ダイヤモンドブレス(壁端コンボ)
[State Scramble Dash]
type = ChangeState
value = 1100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = (movehit = [1,5])
triggerall = NumHelper(8900+id)
triggerall = (Helper(8900+id),fvar(facing = -1) <= 140 && p2dist X = [-5,320])
trigger1 = (stateno = 215 && animelem = 8,>=1) || (stateno = 245 && animelem = 8,>=1)
trigger1 = var(58) := 1
trigger2 = (stateno = 210 && animelem = 5,>=0) && p2bodydist X <= 45
trigger2 = var(58) := 1
trigger3 = stateno = 265
trigger3 = var(58) := 1

;レイスピン
[State Scramble Dash]
type = ChangeState
value = 1300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = (movehit = [1,5])
trigger1 = (stateno = 215 && animelem = 8,>=1) || (stateno = 245 && animelem = 8,>=1)
trigger1 = var(58) := 1
trigger2 = (stateno = 210 && animelem = 5,>=0) && p2bodydist X <= 45
trigger2 = var(58) := 1
trigger3 = stateno = 265
trigger3 = var(58) := 1

;しゃがみ弱キック(ヒット確認用)
[State -1, a]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A && (p2dist X = [1,320]) && p2bodydist X <= 30
triggerall = stateno = 200 || stateno = 430
trigger1 = !(prevstateno = 200 || prevstateno = 230 || prevstateno = 400 || prevstateno = 430)
trigger1 = movecontact = 1
trigger2 = movehit || random <= 500
trigger2 = movecontact = 1

;立ち弱キック(ヒット確認用)
[State -1, a]
type = ChangeState
value = 230
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(29) >= 1
triggerall = EnemyNear(Var(53)),statetype = S && (p2dist X = [1,320]) && p2bodydist X <= 40
triggerall = stateno = 200 || stateno = 430
trigger1 = !(prevstateno = 200 || prevstateno = 230 || prevstateno = 400 || prevstateno = 430)
trigger1 = movecontact = 1
trigger2 = movehit || random <= 500
trigger2 = movecontact = 1

;EXレイスピン
[State Scramble Dash]
type = ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = NumHelper(8900+id)
triggerall = (Helper(8900+id),fvar(facing = -1) <= 300 && p2dist X = [-5,320]) || power >= 2000 || EnemyNear(Var(53)),life = [floor(fvar(0)*125),floor(fvar(0)*250)]
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = stateno = 200 || stateno = 230 || stateno = 400 || stateno = 430
triggerall = (movehit = [1,3])
trigger1 = (prevstateno = 200 || prevstateno = 205 || prevstateno = 230 || prevstateno = 235 || prevstateno = 400 || prevstateno = 430 || prevstateno = 52)
trigger1 = var(58) := 2
trigger2 = var(33) = 1 || var(59) >= 2
trigger2 = var(58) := 2

;クロウバイツ
[State Scramble Dash]
type = ChangeState
value = 1000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),statetype != A
triggerall = stateno = 200 || stateno = 230 || stateno = 400 || stateno = 430
triggerall = (movehit = [1,5])
trigger1 = (prevstateno = 200 || prevstateno = 205 || prevstateno = 230 || prevstateno = 235 || prevstateno = 400 || prevstateno = 430 || prevstateno = 901 || prevstateno = 52)
trigger1 = var(58) := 2
trigger2 = var(33) = 1 || var(59) >= 2
trigger2 = var(58) := 2

;----------------------------------------------------------------
;地上追撃（ヒット確定）

;しゃがみ強パンチ(K’チェーンドライブ追撃)
[State -1]
type = ChangeState
value = 410
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),Pos Y >= -10
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (p2dist X = [1,320]) && p2bodydist X = [-5,10]
triggerall = NumPartner
trigger1 = NumPartner
trigger1 = partner,authorname = "K.O.D" && partner,name = "K'"
trigger1 = EnemyNear(Var(53)),movetype = H
trigger1 = (partner,stateno = 3106 && partner,time <= 80) || (partner,stateno = 3116 && partner,time <= 140)

;レイスピン(K’チェーンドライブ追撃)
[State -1]
type = ChangeState
value = 1300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),Pos Y >= -10
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (p2dist X = [1,320]) && p2bodydist X = [-5,70]
triggerall = NumPartner
trigger1 = partner,authorname = "Hazakura" && partner,name = "K'"
trigger1 = (EnemyNear(Var(53)),stateno = [2625,2627]) || (EnemyNear(Var(53)),stateno = 2620)
trigger1 = var(58) := 1
trigger2 = partner,authorname = "Beppu" && partner,name = "k'XI"
trigger2 = partner,time <= 100 && partner,stateno = [2300,2302]
trigger2 = (EnemyNear(Var(53)),stateno = [2325,2326])
trigger2 = var(58) := 1

;ジャンプ強キック
[State -1]
type = ChangeState
value = 640
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = p2dist X = [1,320]
triggerall = -(Vel Y * 6) - (const(movement.yaccel) * 21) < 0
triggerall = Pos Y <= (-1 - (Vel Y * 6) - (const(movement.yaccel) * 21))
triggerall = Pos Y >= (0 - (Vel Y * 17) - (const(movement.yaccel) * 153))
triggerall = p2bodydist X <= 65 + Vel X * 10 + EnemyNear(Var(53)),Vel X * 10 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
triggerall = p2dist X > 0 + Vel X * 6 + EnemyNear(Var(53)),Vel X * 6 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = Pos Y >= (-5 - (Vel Y * 10) - (const(movement.yaccel) * 55))
trigger1 = (EnemyNear(Var(53)),GetHitVar(hittime) = [4,5])
trigger2 = Pos Y >= (0 - (Vel Y * 7) - (const(movement.yaccel) * 28))
trigger2 = (EnemyNear(Var(53)),GetHitVar(hittime) >= 3)

;ジャンプ強パンチ
[State -1]
type = ChangeState
value = 610
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = p2dist X = [1,320]
triggerall = -(Vel Y * 13) - (const(movement.yaccel) * 91) < 0
triggerall = Pos Y <= (-1 - (Vel Y * 13) - (const(movement.yaccel) * 91))
triggerall = Pos Y >= (0 - (Vel Y * 24) - (const(movement.yaccel) * 300))
triggerall = p2bodydist X <= 65 + Vel X * 18 + EnemyNear(Var(53)),Vel X * 18 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
triggerall = p2dist X > -100 + Vel X * 13 + EnemyNear(Var(53)),Vel X * 13 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = Pos Y >= (-5 - (Vel Y * 18) - (const(movement.yaccel) * 171))
trigger1 = (EnemyNear(Var(53)),GetHitVar(hittime) = [11,12])
trigger2 = Pos Y >= (0 - (Vel Y * 14) - (const(movement.yaccel) * 105))
trigger2 = (EnemyNear(Var(53)),GetHitVar(hittime) >= 12)

;小ジャンプ
[State -1]
type = ChangeState
value = ifelse(p2dist X < 80,62,65)
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = p2dist X = [1,320]
trigger1 = (EnemyNear(Var(53)),GetHitVar(hittime) = [23,30]) && p2bodydist X <= 150

;ダイヤモンドブレス
[State -1]
type = ChangeState
value = 1100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno = 5910
triggerall = EnemyNear(Var(53)),time <= 30
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = p2dist X = [1,320]
trigger1 = p2bodydist X <= 90
trigger1 = var(58) := 2

;小ジャンプ(追撃用)
[State -1]
type = ChangeState
value = ifelse(p2bodydist X > 80,65,62)
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno = 5910
triggerall = EnemyNear(Var(53)),time <= 30
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = p2dist X = [1,320]
trigger1 = p2bodydist X <= 80

;ジャンプ強パンチ
[State -1]
type = ChangeState
value = ifelse(p2dist X < 0 || Vel X != 0,610,640)
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno = 5910
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || (movetype != H && stateno = [120,149])
trigger1 = Vel Y > -1 && (p2dist X < 0 || Vel X != 0 )
trigger2 = Vel Y > 2

;近立ち強パンチ
[State -1]
type = ChangeState
value = 215
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno = 5910
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (p2dist X = [1,50]) || p2bodydist X <= 10
trigger1 = p2bodydist X <= 10

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist
triggerall = stateno != 100
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno = 5910
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || stateno = 21 || stateno = 22
triggerall = stateno != 901
trigger1 = (p2dist X = [1,320]) && p2bodydist X = [2,180]

;近立ち強パンチ
[State -1]
type = ChangeState
value = 215
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (p2dist X = [1,50]) || p2bodydist X <= 10
trigger1 = (EnemyNear(Var(53)),GetHitVar(hittime) = [2,3]) && p2bodydist X <= 15
trigger2 = EnemyNear(Var(53)),GetHitVar(hittime) >= 2 && p2bodydist X <= 5

;しゃがみ弱キック
[State -1]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (p2dist X = [1,320]) && p2bodydist X = [-5,50]
triggerall = p2bodydist X > 15
trigger1 = EnemyNear(Var(53)),GetHitVar(hittime) = [3,4]

;立ち弱キック
[State -1]
type = ChangeState
value = 230
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = var(29) >= 1
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype = S
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (p2dist X = [1,320]) && p2bodydist X = [-5,55]
triggerall = p2bodydist X > 15
trigger1 = EnemyNear(Var(53)),GetHitVar(hittime) = [3,4]

;しゃがみ弱キック(ガード崩し)
[State -1]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno = [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (p2dist X = [1,320]) && p2bodydist X = [-5,45]
triggerall = random <= 500 || EnemyNear(Var(53)),GetHitVar(hittime) = [2,3]
trigger1 = random <= 200

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = stateno != 100
triggerall = EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || stateno = 21 || stateno = 22
triggerall = stateno != 901
triggerall = (p2dist X = [1,320]) && p2bodydist X = [2,150]
trigger1 = EnemyNear(Var(53)),GetHitVar(hittime) > 7
trigger2 = EnemyNear(Var(53)),stateno = 2110 && p2bodydist X = [50,320]

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist
triggerall = stateno != 100
triggerall = EnemyNear(Var(53)),movetype = H
triggerall = random <= 500 || EnemyNear(Var(53)),stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),statetype != A
triggerall = ctrl || stateno = 1 || stateno = 21 || stateno = 22
triggerall = stateno != 901
triggerall = (p2dist X = [1,320]) && p2bodydist X = [2,150]
trigger1 = random <= 50 + 50*EnemyNear(Var(53)),GetHitVar(hittime)

;----------------------------------------------------------------
;起き攻め

[State -1];起き攻め選択
type = varset
triggerall = var(55) = 0
triggerall = roundstate = 2
triggerall = EnemyNear(Var(53)),statetype = L && EnemyNear(Var(53)),movetype != A
triggerall = EnemyNear(Var(53)),ctrl = 0
triggerall = EnemyNear(Var(53)),stateno != 5120 || EnemyNear(Var(53)),animtime < -4
trigger1 = statetype != L && movetype != H
trigger1 = p2bodydist X <= 150
var(55) = 1 + (random % 4)

[State -1];上のリセット
type = varset
triggerall = var(55) != 0
trigger1 = roundstate != 2 || movetype = H || movetype = A || statetype = L
var(55) = 0

[State -1];上のリセット
type = varset
triggerall = var(55) != 0
trigger1 = var(55) = 1 && EnemyNear(Var(53)),stateno = 5120
trigger1 = EnemyNear(Var(53)),animtime > -3
trigger2 = var(55) = 2 && EnemyNear(Var(53)),stateno = 5120
trigger2 = EnemyNear(Var(53)),animtime > -11
trigger2 = !((stateno = [61,62]) || statetype = A)
trigger3 = var(55) = 3 && EnemyNear(Var(53)),statetype != L
trigger3 = var(42) = 0
trigger3 = (p2bodydist X > 5 && p2dist X > 50) || var(56) > 15 || p2dist X = [-320,-1]
trigger4 = var(55) = 4 && EnemyNear(Var(53)),stateno = 5120
trigger4 = EnemyNear(Var(53)),animtime > -5
var(55) = 10

;しゃがみ弱キック
[State -1]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),stateno = 5120
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = p2bodydist X <= 55
trigger1 = EnemyNear(Var(53)),animtime = -3
trigger1 = var(55) = 1

;小ジャンプ(中段)
[State -1]
type = ChangeState
value = ifelse(p2dist X <= 80,61,62)
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),stateno = 5120 && EnemyNear(Var(53)),animtime = -11
trigger1 = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = p2bodydist X <= 80
trigger1 = var(55) = 2

;ジャンプ強パンチ
[State -1]
type = ChangeState
value = 610
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = Vel X != 0 || p2dist X = [-320,20]
trigger1 = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
trigger1 = Vel Y > -3
trigger1 = var(55) = 2

;ジャンプ強キック
[State -1]
type = ChangeState
value = 640
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = Vel X = 0
trigger1 = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
trigger1 = Vel Y > 0
trigger1 = var(55) = 2

;----

[State -1];敵投げ無敵時間判断
type = varset
triggerall = var(42) = 0
triggerall = roundstate = 2
trigger1 = EnemyNear(Var(53)),stateno = 5120 && EnemyNear(Var(53)),animtime = -1
var(42) = 14

[State -1];敵投げ無敵時間判断
type = varadd
triggerall = var(42) > 0
trigger1 = 1
var(42) = -1

;通常投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = ifelse(EnemyNear(Var(53)),statetype = A || EnemyNear(Var(53)),movetype = H,215,ifelse(BackEdgeBodyDist < 160,820,800))
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = ((P2dist X = [1,320]) && (P2bodydist X = [-5,5]))
triggerall = var(55) = 3
triggerall = EnemyNear(Var(53)),statetype != A || var(56) <= 15
trigger1 = EnemyNear(Var(53)),statetype != L
trigger1 = var(42) = 0

;前進(投げの為の接近)
[State -1,a]
type = ChangeState
value = 21
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist && p2dist X = [0,320]
triggerall = EnemyNear(Var(53)),statetype != L
triggerall = EnemyNear(Var(53)),statetype != A || var(56) <= 15
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = stateno != 21
triggerall = stateno != 901
trigger1 = (p2bodydist X = [-5,5])
trigger1 = var(55) = 3
trigger1 = var(42) > 0

;ダッシュ(投げの為の接近)
[State -1,a]
type = ChangeState
value = 100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !inguarddist && p2dist X = [0,320]
triggerall = EnemyNear(Var(53)),statetype != L
triggerall = EnemyNear(Var(53)),statetype != A || var(56) <= 15
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = stateno != 901
triggerall = stateno != [100,101]
trigger1 = (p2bodydist X > 5)
trigger1 = var(55) = 3
trigger1 = var(42) > 0

;---

;バクステ
[State -1]
type = ChangeState
value = ifelse(BackEdgeBodyDist < 30,68,105)
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = var(55) = 4
trigger1 = NumHelper(8900+id)
trigger1 = (Helper(8900+id),fvar(facing = 1) <= 60 && p2dist X = [-5,320]) || BackEdgeBodyDist < 30
trigger1 = EnemyNear(Var(53)),statetype = L && p2bodydist X <= 80 && !Inguarddist
trigger1 = EnemyNear(Var(53)),stateno != 5120
trigger2 = EnemyNear(Var(53)),stateno = 5120
trigger2 = EnemyNear(Var(53)),animtime >= -10

;--------

[State -1];敵起き上がり時間計測
type = varset
triggerall = var(36) = 0
trigger1 = EnemyNear(Var(53)),stateno = 5120 && EnemyNear(Var(53)),time = 1
var(36) = -(EnemyNear(Var(53)),animtime) + 1

[State -1];リセット
type = varset
triggerall = var(36) != 0
trigger1 = teammode = turns && roundstate != 2
var(36) = 0

[State -1];移動敵起き上がりフラグ
type = varset
triggerall = var(34) = 0
trigger1 = EnemyNear(Var(53)),prevstateno = 5120 && EnemyNear(Var(53)),Vel X != 0
trigger1 = EnemyNear(Var(53)),stateno != 0
trigger2 = EnemyNear(Var(53)),stateno = 5120 && EnemyNear(Var(53)),Vel X != 0
var(34) = 1

[State -1];リセット
type = varset
triggerall = var(34) != 0
trigger1 = teammode = turns && roundstate != 2
var(34) = 0

;ダイヤモンドブレス
[State -1]
type = ChangeState
value = 1100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = !Inguarddist
triggerall = EnemyNear(Var(53)),statetype = L
triggerall = var(34) = 0
trigger1 = EnemyNear(Var(53)),stateno = 5101 && var(36) = [16,21]
trigger1 = EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y >= 0
trigger1 = p2bodydist X = [40 + EnemyNear(Var(53)),Vel X * 4 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1),130 + EnemyNear(Var(53)),Vel X * 4 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)]
trigger1 = var(58) := 2
trigger2 = EnemyNear(Var(53)),stateno = 5110 && var(36) = [22,33]
trigger2 = p2bodydist X = [40,130]
trigger2 = var(58) := 2
trigger3 = EnemyNear(Var(53)),stateno = 5120 && var(36) >= 34
trigger3 = EnemyNear(Var(53)),animtime = -33
trigger3 = p2bodydist X = [40,130]
trigger3 = var(58) := 2

;----------------------------------------------------------------
;暴れ

[State -1];暴れ選択
type = varset
triggerall = var(51) = 0
triggerall = roundstate = 2
triggerall = movetype = H
triggerall = (stateno = [120,159]) || (stateno = [5000,5999])
triggerall = statetype = S || statetype = C
triggerall = GetHitVar(hittime) = 0
triggerall = EnemyNear(Var(53)),statetype != L && var(56) <= 15
triggerall = EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),time <= 15
trigger1 = p2bodydist X <= 70
var(51) = ifelse(random <= 500,6,ifelse(p2bodydist X <= 10 && random <= 500,1,2+random%4))

[State -1];上のリセット
type = varset
triggerall = var(51) != 0
trigger1 = roundstate != 2 || movetype = A || statetype = A || statetype = L
trigger2 = stateno = [15,16]
trigger3 = GetHitVar(hittime) > 0
trigger4 = EnemyNear(Var(53)),statetype = L || var(56) > 15
trigger5 = var(51) = 1 && p2bodydist X > 10
trigger6 = var(51) = 2 && p2bodydist X > 45
trigger7 = var(51) = 3 && p2bodydist X > 50
trigger8 = var(51) = 4 && p2bodydist X > 65
trigger9 = var(51) = 5 && p2bodydist X > 70
var(51) = 0

;投げ(密着暴れ)
[State -1]
type = ChangeState
value = ifelse(EnemyNear(Var(53)),statetype = A || EnemyNear(Var(53)),movetype = H,215,ifelse(BackEdgeBodyDist < 160,820,800))
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = ((P2dist X = [1,320]) && (P2bodydist X = [-5,5]))
trigger1 = var(51) = 1

;EXレイスピン(無敵暴れ)
[State -1]
type = ChangeState
value = 2300
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(29) <= 0
triggerall = power >= 2000 || random <= 250
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = p2bodydist X <= 45
trigger1 = var(51) = 2
trigger1 = var(58) := 2

;クロウバイツ(無敵暴れ)
[State -1]
type = ChangeState
value = 1000
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = p2bodydist X <= 45
trigger1 = var(51) = 2
trigger1 = var(58) := 2

;しゃがみ弱キック(密着暴れ)
[State -1]
type = ChangeState
value = 430
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = p2bodydist X <= 50
trigger1 = var(51) = 3

;立ち弱キック(小ジャンプ潰し)
[State -1]
type = ChangeState
value = ifelse(p2dist X > 50,230,200)
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = p2bodydist X <= 65
trigger1 = var(51) = 4

;逃げジャンプ
[State -1]
type = ChangeState
value = 66
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = p2bodydist X <= 70
trigger1 = NumHelper(8900+id)
trigger1 = (Helper(8900+id),fvar(facing = 1) > 100 && p2dist X = [-5,320])
trigger1 = var(51) = 5
trigger1 = var(57) := 2

[State -1]
type = varset
triggerall = var(57) = 2
trigger1 = roundstate != 2 || movetype = H || statetype = L
trigger2 = movetype = A || stateno = 52
var(57) = 0

;逃げジャンプ強キック
[State -1]
type = ChangeState
value = 640
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
trigger1 = var(57) = 2

;--------------------------------------------------------------------------
;システムその他

; 通常投げ
[State -1]
type = ChangeState
value = ifelse(BackedgeBodyDist < 160,820,800)
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),MoveType != H && EnemyNear(Var(53)),statetype != L
triggerall = EnemyNear(Var(53)),StateType != A || (var(59) = 1 && var(56) <= 3 && EnemyNear(Var(53)),Vel Y < -2 && EnemyNear(Var(53)),Pos Y >= -40)
triggerall = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Pos Y >= -40
triggerall = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = ((P2dist X = [1,320]) && (P2bodydist X = [-5,5]))
trigger1 = EnemyNear(Var(53)),movetype != A || EnemyNear(Var(53)),time <= 5 || EnemyNear(Var(53)),animtime >= -5
trigger1 = random <= 10

;回り込み
[State -1]
type = ChangeState
value = 700
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype != H && EnemyNear(Var(53)),facing = -facing
triggerall = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = !EnemyNear(Var(53)),HitDefAttr = SCA,NT,ST,HT
trigger1 = var(59) >= 2 && P2Dist X = [-5,85]
trigger1 = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),AnimTime <= -30
trigger1 = random <= 10 || (random <= 40 && life <= 400)
trigger2 = FrontEdgeBodyDist >= 40 && EnemyNear(Var(53)),statetype = A
trigger2 = (P2Dist X = [-15,15]) && (EnemyNear(Var(53)),Pos Y = [-100,-70])
trigger2 = EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),stateno = [0,999]
trigger2 = random <= 80
trigger3 = P2Dist X = [-5,85]
trigger3 = var(59) = 1 || life > const(data.life) * 0.7
trigger3 = EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),time <= 5
trigger3 = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
trigger3 = random <= 10

;回り込み・後ろ（めくり回避）
[State -1]
type = ChangeState
value = ifelse(EnemyNear(Var(53)),Pos Y >= -90,105,701)
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype != H && EnemyNear(Var(53)),facing = facing
triggerall = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = BackEdgeBodyDist >= 40 && EnemyNear(Var(53)),statetype = A
trigger1 = (P2Dist X = [-15,15]) && (EnemyNear(Var(53)),Pos Y = [-120,-60])
trigger1 = EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),stateno = [0,999]
trigger1 = random <= 80

;ガードキャンセル緊急回避
[State -1]
type = ChangeState
value = 700
triggerall = var(59) >= 1
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = (stateno = [150,151])
triggerall = EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),movetype = A
triggerall = EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),facing = -facing
triggerall = FrontEdgeBodyDist >= 60
triggerall = p2dist X <= 85 || (EnemyNear(Var(53)),Vel X > 0 && p2dist X <= 95)
triggerall = teammode = single || teammode = turns
triggerall = EnemyNear(Var(53)),AnimTime <= -30 || (EnemyNear(Var(53)),time <= 7 && var(59) <= 1)
trigger1 = BackEdgeBodyDist <= 20 || EnemyNear(Var(53)),life <= 50 || power >= 3000 || EnemyNear(Var(53)),AnimTime <= -30
trigger1 = random <= 20 || (EnemyNear(Var(53)),life <= 50 && random <= 50)

;ガードキャンセルふっ飛ばし攻撃
[State -1]
type = ChangeState
value = 295
triggerall = var(59) >= 1
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = (stateno = [150,151])
triggerall = EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),movetype = A
triggerall = EnemyNear(Var(53)),animtime < -10 && EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),facing = -facing
triggerall = p2bodydist X <= 25 || (EnemyNear(Var(53)),Vel X > 0 && p2bodydist X <= 30)
trigger1 = BackEdgeBodyDist <= 20 || EnemyNear(Var(53)),life <= 50 || power >= 3000
trigger1 = random <= 5 || (EnemyNear(Var(53)),life <= 50 && random <= 30)
trigger2 = numpartner && EnemyNear(Var(53)),numpartner
trigger2 = partner,life > 0
trigger2 = BackEdgeBodyDist <= 20 || EnemyNear(Var(53)),life <= 50 || power >= 2000 || random <= 400
trigger2 = random <= 50 || (partner,movetype = H && partner,stateno != [120,159])
trigger3 = EnemyNear(Var(53)),stateno = var(48)
trigger3 = var(48) >= 1000 && EnemyNear(Var(53)),time <= 15
trigger3 = random <= 10 || (power >= 2000 && random <= 40)
trigger4 = EnemyNear(Var(53)),stateno = var(45)
trigger4 = (var(45) = [1,999]) && EnemyNear(Var(53)),time <= 15
trigger4 = random <= 10 || (power >= 2000 && random <= 40)

;ラン
[State -1]
type = ChangeState
value = 100
triggerall = var(59) >= 1
triggerall = roundstate = 2 && statetype != A
triggerall = EnemyNear(Var(53)),movetype != A
triggerall = !inguarddist && stateno != [100,101]
triggerall = ctrl || stateno = 21 || stateno = 22
triggerall = stateno != 901
triggerall = random <= 50 || EnemyNear(Var(53)),movetype = H
trigger1 = (p2bodydist X = [150,180]) && random <= 80
trigger2 = (p2bodydist X = [180,320]) && random <= 150
trigger3 = (EnemyNear(Var(53)),movetype = H && EnemyNear(Var(53)),statetype = A) || EnemyNear(Var(53)),statetype = L
trigger3 = (p2bodydist X = [81,180]) && random <= 200
trigger3 = teammode = single || teammode = turns

;----

;あんまワンパに飛び跳ねないように制御用
[State -1]
type = varset
triggerall = var(37) = 0
trigger1 = movetype != H && statetype = A
var(37) = 1

[State -1]
type = varset
triggerall = var(37) = 1
trigger1 = movetype = H && statetype = A
var(37) = 2 + random%2 ; (2:また跳ぶかも 3:跳ぶのを我慢)

[State -1]
type = varset
triggerall = var(37) = 1
trigger1 = roundstate != 2 || statetype != A
trigger2 = stateno = 52
var(37) = 0

[State -1]
type = varset
triggerall = var(37) = [2,3]
trigger1 = roundstate != 2
trigger2 = statetype = S || statetype = C
trigger2 = (stateno = [150,159]) || (stateno = [5000,5019])
trigger2 = movetype = H
trigger3 = movecontact
var(37) = 0

;中ジャンプ
[State -1, Dush Low Jump]
Type = ChangeState
value = 65
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = !EnemyNear(Var(53)),numproj 
triggerall = !inguarddist && EnemyNear(Var(53)),facing = -facing
triggerall = EnemyNear(Var(53)),statetype != A || (var(59) = 1 && var(56) <= 15)
triggerall = var(37) != 3
triggerall = var(37) != 2 || random <= 300
trigger1 = ctrl || stateno = 21 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (EnemyNear(Var(53)),Vel X <= 0 && P2Dist X = [130,170]) || (EnemyNear(Var(53)),Vel X > 0 && P2Dist X = [150,220])
trigger1 = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),stateno = [120,159] 
trigger1 = EnemyNear(Var(53)),StateType != L
trigger1 = random <= 20 || ((EnemyNear(Var(53)),statetype = C || EnemyNear(Var(53)),stateno = [120,159]) && random <= 50)

[State -1, Low Jump]
Type = ChangeState
value = 62
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 21 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = !EnemyNear(Var(53)),numproj 
triggerall = !inguarddist && EnemyNear(Var(53)),facing = -facing
triggerall = EnemyNear(Var(53)),statetype != A || (var(59) = 1 && var(56) <= 15)
triggerall = var(37) != 3
triggerall = var(37) != 2 || random <= 300
trigger1 = (EnemyNear(Var(53)),Vel X <= 0 && P2Dist X = [70,130])|| (EnemyNear(Var(53)),Vel X > 0 && P2Dist X = [90,150])
trigger1 = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),stateno = [120,159] 
trigger1 = EnemyNear(Var(53)),StateType != L
trigger1 = random <= 20 || ((EnemyNear(Var(53)),statetype = C || EnemyNear(Var(53)),stateno = [120,159]) && random <= 50)
trigger2 = NumHelper(8900+id)
trigger2 = (Helper(8900+id),fvar(facing = 1) <= 110 && p2dist X = [-5,320])
trigger2 = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),stateno = [120,159] 
trigger2 = EnemyNear(Var(53)),StateType != L
trigger2 = random <= 20 || ((EnemyNear(Var(53)),statetype = C || EnemyNear(Var(53)),stateno = [120,159]) && random <= 50)

[State -1, Nomal Jump]
Type = ChangeState
value = 42
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = ctrl || stateno = 21 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = !inguarddist && EnemyNear(Var(53)),facing = -facing
triggerall = EnemyNear(Var(53)),statetype != A || (var(59) = 1 && var(56) <= 15)
triggerall = var(37) != 3
triggerall = var(37) != 2 || random <= 300
trigger1 = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),stateno = [120,159] 
trigger1 = EnemyNear(Var(53)),StateType != L && EnemyNear(Var(53)),BackEdgeBodyDist > 20
trigger1 = NumHelper(8900+id)
trigger1 = (EnemyNear(Var(53)),Vel X <= 0 && P2Dist X = [130,170]) || (EnemyNear(Var(53)),Vel X > 0 && P2Dist X = [150,190])
trigger1 = random <= 20

[State -1, High Jump]
Type = ChangeState
value = 68
triggerall = Var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A && EnemyNear(Var(53)),facing = -facing
triggerall = ctrl || stateno = 21 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = var(37) != 3
trigger1 = var(37) != 2 || random <= 300
trigger1 = !inguarddist && EnemyNear(Var(53)),facing = -facing
trigger1 = EnemyNear(Var(53)),statetype != A || (var(59) = 1 && var(56) <= 15)
trigger1 = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),stateno = [120,159] 
trigger1 = EnemyNear(Var(53)),StateType != L
trigger1 = (EnemyNear(Var(53)),Vel X <= 0 && P2Dist X = [170,205]) || (EnemyNear(Var(53)),Vel X > 0 && P2Dist X = [190,220])
trigger1 = random <= 20
;飛び道具避け
trigger2 = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),stateno = [120,159] 
trigger2 = EnemyNear(Var(53)),StateType != L
trigger2 = P2Dist X >= 170
trigger2 = Enemy,NumProj || EnemyNear(Var(53)),HitDefAttr = SC,NP,SP,HP
trigger2 = EnemyNear(Var(53)),StateType != A && !inguarddist
trigger2 = random <= 40
trigger3 = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),statetype != A
trigger3 = P2Dist X >= 170 && EnemyNear(Var(53)),animtime <= -30
trigger3 = var(59) >= 2 && !inguarddist
trigger3 = random <= 20 || (random <= 50 && EnemyNear(Var(53)),stateno = [1000,1999])
trigger4 = P2Dist X >= 170
trigger4 = EnemyNear(Var(53)),numhelper && EnemyNear(Var(53)),movetype = A
trigger4 = !EnemyNear(Var(53)),HitDefAttr = SCA && !inguarddist
trigger4 = EnemyNear(Var(53)),time >= 10
trigger4 = random <= 20 || (EnemyNear(Var(53)),animtime <= -30 && random <= 50)

;--------------------------------------------------------------------------
;起き上がりぶっぱ

;起き上がりから3F以内
[State -1]
type = varset
triggerall = var(35) = 0
trigger1 = stateno = 5120 && animtime = 0
var(35) = 3

[State -1]
type = varadd
triggerall = var(35) >= 1
trigger1 = 1
var(35) = -1


;EXレイスピン（ぶっぱ）
[State -1]
type = ChangeState
value = 2300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power >= 1000
triggerall = var(29) <= 0
triggerall = power >= 2000 || EnemyNear(Var(53)),life <= 222
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),stateno != [120,159]
triggerall = p2bodydist X < 80 && p2dist X = [1,320]
triggerall = var(35) >= 1
triggerall = life >= const(data.life)*0.8 || var(59) = 1
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = random <= 250

;クロウバイツ（ぶっぱ）
[State -1]
type = ChangeState
value = 1000
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = power < 2000
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A && EnemyNear(Var(53)),stateno != [120,159]
triggerall = p2bodydist X < 60 && p2dist X = [1,320]
triggerall = var(35) >= 1
triggerall = life >= const(data.life)*0.8 || var(59) = 1
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = random <= 100
trigger1 = var(58) := 2

;--------------------------------------------------------------------------
;刺しこみ

;しゃがみ弱キック
[State -1]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320]) && p2bodydist X <= 60
triggerall = numhelper(8900+ID)
triggerall = helper(8900+ID),var(31)=1||helper(8900+ID),var(51)=1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-10,0])
trigger1 = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [0,40]) || (helper(8900+ID),var(31) = 1 && random = [0,100])

;しゃがみ強キック
[State -1]
type = ChangeState
value = 440
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320]) && p2bodydist X = [60,75]
triggerall = numhelper(8900+ID)
triggerall = helper(8900+ID),var(31)=1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-10,0])
trigger1 = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [0,40]) || (helper(8900+ID),var(31) = 1 && random = [0,100])

;--------------------------------------------------------------------------
;牽制

;ガード判定
[State -1]
Type = VarSet
triggerall= var(54) = 0
triggerall= roundstate=2
trigger1 = movetype = H && stateno = [120,159]
var(54) = 1
IgnoreHitPause = 1

[State -1] ;リセット
Type = VarSet
triggerall= var(54) != 0
trigger1 = !inguarddist || movetype = A
trigger2 = EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),time = 1 || EnemyNear(Var(53)),movetype = H
trigger3 = roundstate != 2
trigger4 = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),stateno >= 1000 && !(EnemyNear(Var(53)),HitDefAttr = SCA)
var(54) = 0
IgnoreHitPause = 1

;敵通常技
[State -1]
Type = VarSet
triggerall= var(40) = 0
triggerall= roundstate=2
trigger1 = EnemyNear(Var(53)),movetype = A && EnemyNear(Var(53)),HitDefAttr = SC, NA
trigger1 = inguarddist
var(40) = 1
IgnoreHitPause = 1

[State -1]
Type = VarSet
triggerall= var(40) = 1
triggerall= roundstate=2
trigger1 = EnemyNear(Var(53)),movetype != A || EnemyNear(Var(53)),statetype = A
trigger2 = EnemyNear(Var(53)),time <= 1 || EnemyNear(Var(53)),ctrl
trigger3 = !inguarddist
var(40) = 0
IgnoreHitPause = 1

;タッグ戦・味方位置判断
[State -1]
Type = VarSet
triggerall = Var(39) = 0
Triggerall = numpartner
Trigger1 = Partner,Life > 0
Trigger1 = Partner,StateType = S || Partner,StateType = C
Trigger1 = Facing*(Pos X - Partner,Pos X) < -35
var(39) = 1
IgnoreHitPause = 1

[State -1];リセット
Type = VarSet
triggerall = Var(39) = 1
Trigger1 = !numpartner
Trigger2 = Partner,Life <= 0
Trigger3 = Partner,StateType = A || Partner,StateType = L
Trigger4 = Facing*(Pos X - Partner,Pos X) >= -35
var(39) = 0
IgnoreHitPause = 1

;近立ち強パンチ
[State -1]
type = ChangeState
value = 215
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,50]) || p2bodydist X <= 10
triggerall = (p2bodydist X = [-5,30])
triggerall = !inguarddist || var(54) = 1 || (var(59) = 1 && EnemyNear(Var(53)),time <= 5) || (var(40) = 1 && EnemyNear(Var(53)),animtime >= -4) || var(39) = 1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-35,0])  || (var(59) = 1 && var(56) <= 10)
triggerall = !(var(55) = 3 && var(42) > 0)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [0,80]) || (var(54) = 1 && random = [0,150])

;しゃがみ弱キック
[State -1]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2bodydist X = [-5,65]) && p2dist X = [1,320]
triggerall = !inguarddist || var(54) = 1 || (var(59) = 1 && EnemyNear(Var(53)),time <= 5) || (var(40) = 1 && EnemyNear(Var(53)),animtime >= -4) || var(39) = 1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-10,0])  || (var(59) = 1 && var(56) <= 3)
triggerall = !(var(55) = 3 && var(42) > 0)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [150,230]) || (var(54) = 1 && random = [150,300])

;立ち弱キック
[State -1]
type = ChangeState
value = 230
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = p2dist X = [1,320]
triggerall = (p2bodydist X = [-5,55]) || (var(29) >= 1 && p2bodydist X = [-5,70])
triggerall = !inguarddist || var(54) = 1 || (var(59) = 1 && EnemyNear(Var(53)),time <= 5) || (var(40) = 1 && EnemyNear(Var(53)),animtime >= -4) || var(39) = 1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype = S || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-35,-10])  || (var(59) = 1 && var(56) <= 10)
triggerall = !(var(55) = 3 && var(42) > 0)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [400,450]) || (var(54) = 1 && random = [450,550])

;しゃがみ強キック
[State -1]
type = ChangeState
value = 440
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2bodydist X = [40,55]) && p2dist X = [1,320]
triggerall = !inguarddist || var(54) = 1 || (var(59) = 1 && EnemyNear(Var(53)),time <= 5) || (var(40) = 1 && EnemyNear(Var(53)),animtime >= -4) || var(39) = 1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-15,0])  || (var(59) = 1 && var(56) <= 10)
triggerall = !(var(55) = 3 && var(42) > 0)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [550,570]) || (var(54) = 1 && random = [550,600])

;レイスピン
[State -1, a]
type = ChangeState
value = 1300
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2bodydist X = [85,115]) && p2dist X = [1,320]
triggerall = !inguarddist || var(54) = 1 || (var(59) = 1 && EnemyNear(Var(53)),time <= 5) || (EnemyNear(Var(53)),statetype = S && EnemyNear(Var(53)),stateno = [200,1999]) || var(39) = 1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-40,0])  || (var(59) = 1 && var(56) <= 5)
triggerall = !(var(55) = 3 && var(42) > 0)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [700,730]) || (var(54) = 1 && random = [700,750])
trigger1 = p2bodydist X >= 105 || random <= 500
trigger1 = var(58) := 1

;スライダーシュート
[State -1, a]
type = ChangeState
value = 455
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2bodydist X = [90,115]) && p2dist X = [1,320]
triggerall = !inguarddist || var(54) = 1 || (var(59) = 1 && EnemyNear(Var(53)),time <= 5) || (EnemyNear(Var(53)),statetype = S && EnemyNear(Var(53)),stateno = [200,1999]) || var(39) = 1
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype != A || (EnemyNear(Var(53)),Vel Y > 0 && EnemyNear(Var(53)),Pos Y = [-40,0])  || (var(59) = 1 && var(56) <= 5)
triggerall = !(var(55) = 3 && var(42) > 0)
trigger1 = ctrl || stateno = 21 || stateno = 22 || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
trigger1 = (random = [800,830]) || (var(54) = 1 && random = [800,850])
trigger1 = p2bodydist X >= 120 || random <= 500

;---

;バクステ(牽制)
[State -1]
type = ChangeState
value = 105
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320]) && (p2bodydist X = [70,190])
triggerall = (EnemyNear(Var(53)),stateno != [15020,15040])
triggerall = !inguarddist
triggerall = EnemyNear(Var(53)),Vel X >= 0 && EnemyNear(Var(53)),facing = -facing
triggerall = Enemynear(var(53)),statetype != L && Enemynear(var(53)),movetype != H
triggerall = Enemynear(var(53)),statetype != A || (var(59) = 1 && var(49) <= 5)
triggerall = Enemynear(var(53)),stateno != 5120
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = stateno = 100 || random <= 300
triggerall = BackEdgeBodyDist > 70
triggerall = numhelper(20000)
triggerall = helper(20000),var(2) != 5
triggerall = (random = [0,50])
trigger1 = var(41) = 0
trigger1 = var(41) := 1
trigger2 = var(41) = 1
trigger2 = var(41) := 2

;しゃがみ弱キック(牽制)
[State -1]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320]) && (p2bodydist X = [66,95])
triggerall = (EnemyNear(Var(53)),stateno != [15020,15040])
triggerall = !inguarddist
triggerall = EnemyNear(Var(53)),Vel X >= 0 && EnemyNear(Var(53)),facing = -facing
triggerall = Enemynear(var(53)),statetype != L && Enemynear(var(53)),movetype != H
triggerall = Enemynear(var(53)),statetype != A || (var(59) = 1 && var(49) <= 3)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (random = [0,10]) || (random <= 20 && p2bodydist X <= 90 + Enemynear(var(53)),Vel X * 4)
trigger1 = var(41) = 0
trigger1 = var(41) := 1
trigger2 = var(41) = 1
trigger2 = var(41) := 2

;立ち弱キック(牽制)
[State -1]
type = ChangeState
value = 230
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320])
triggerall = (p2bodydist X = [56,85]) || (var(29) >= 1 && p2bodydist X = [71,100])
triggerall = (EnemyNear(Var(53)),stateno != [15020,15040])
triggerall = !inguarddist
triggerall = EnemyNear(Var(53)),Vel X >= 0 && EnemyNear(Var(53)),facing = -facing
triggerall = Enemynear(var(53)),statetype != L && Enemynear(var(53)),movetype != H
triggerall = Enemynear(var(53)),statetype != A || (var(59) = 1 && var(49) <= 5)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (random = [0,10]) || (random <= 20 && p2bodydist X <= 90 + Enemynear(var(53)),Vel X * 4)
trigger1 = var(41) = 0
trigger1 = var(41) := 1
trigger2 = var(41) = 1
trigger2 = var(41) := 2

;ふっとばし攻撃(牽制)
[State -1]
type = ChangeState
value = 290
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320]) && (p2bodydist X = [95,150])
triggerall = (EnemyNear(Var(53)),stateno != [15020,15040])
triggerall = !inguarddist
triggerall = EnemyNear(Var(53)),Vel X >= 0 && EnemyNear(Var(53)),facing = -facing
triggerall = Enemynear(var(53)),statetype != L && Enemynear(var(53)),movetype != H
triggerall = Enemynear(var(53)),statetype != A || (var(59) = 1 && var(49) <= 5)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (random = [0,10]) || (random <= 20 && p2bodydist X <= 95 + Enemynear(var(53)),Vel X * 4)
trigger1 = var(41) = 0
trigger1 = var(41) := 1
trigger2 = var(41) = 1
trigger2 = var(41) := 2

;ダイヤモンドブレス(牽制)
[State -1]
type = ChangeState
value = 1100
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320]) && (p2bodydist X = [131,180])
triggerall = (EnemyNear(Var(53)),stateno != [15020,15040])
triggerall = !inguarddist
triggerall = EnemyNear(Var(53)),Vel X >= 0 && EnemyNear(Var(53)),facing = -facing
triggerall = Enemynear(var(53)),statetype != L && Enemynear(var(53)),movetype != H
triggerall = Enemynear(var(53)),statetype != A || (var(59) = 1 && var(49) <= 5)
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = (random = [0,10]) || (random <= 20 && p2bodydist X <= 130 + Enemynear(var(53)),Vel X * 4)
trigger1 = var(41) = 0
trigger1 = var(41) := 1 && var(58) := 1
trigger2 = var(41) = 1
trigger2 = var(41) := 2 && var(58) := 1

;ダイヤモンドブレス
[State Scramble Dash]
type = ChangeState
value = 1100
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320])
triggerall = !inguarddist
triggerall = stateno = 290 && (animelem = 12,>=1 && animelem = 14,<0)
triggerall = Enemynear(var(53)),statetype != L
triggerall = Enemynear(var(53)),movetype != H || Enemynear(var(53)),stateno = [150,159]
triggerall = Enemynear(var(53)),statetype != A || (var(59) = 1 && var(49) <= 5)
trigger1 = var(58) := 1

;カウンターシェル
[State Scramble Dash]
type = ChangeState
value = 1200
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320])
triggerall = !inguarddist
triggerall = stateno = 290 && (animelem = 12,>=0 && animelem = 14,<0)
triggerall = Enemynear(var(53)),statetype != L && Enemynear(var(53)),movetype != H
triggerall = Enemynear(var(53)),statetype = A
trigger1 = 1

;レイスピン
[State Scramble Dash]
type = ChangeState
value = 1300
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = (p2dist X = [1,320])
triggerall = !inguarddist
triggerall = stateno = 290 && (animelem = 12,>=0 && animelem = 14,<0)
triggerall = Enemynear(var(53)),statetype != L && Enemynear(var(53)),movetype = H
triggerall = Enemynear(var(53)),statetype = A
trigger1 = var(58) := 2


;フラグリセット
[State -1, jump]
type = VarSet
triggerall = var(41) = [1,2]
trigger1 = roundstate != 2
trigger2 = movecontact
var(41) = 0


;---

;ガード
[state -1, Guard]
type = ChangeState
value = ifelse(EnemyNear(Var(53)),statetype = A || (EnemyNear(Var(53)),statetype = C && random <= 100),130,131)
triggerall = var(59) >= 2 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = stateno != [120,159]
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101])
triggerall = !EnemyNear(Var(53)),HitDefAttr = SCA, NT,ST,HT
trigger1 = EnemyNear(Var(53)),numproj && InGuardDist
trigger2 = (EnemyNear(Var(53)),HitDefAttr = SCA, NA,SA,HA) && InGuardDist
trigger2 = random <= ifelse(EnemyNear(Var(53)),statetype = A, 300, 150)
trigger3 = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype = A
trigger3 = (EnemyNear(Var(53)),Pos Y = [-150,-30]) && p2dist X = [-30,10]
trigger3 = random <= 150
trigger4 = EnemyNear(Var(53)),numhelper && InGuardDist
trigger4 = !(EnemyNear(Var(53)),HitDefAttr = SCA)
trigger4 = EnemyNear(Var(53)),time >= 10 || EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),stateno = [0,199]
trigger5 = numhelper(20000)
trigger5 = helper(20000),var(2) = 5
trigger5 = EnemyNear(Var(53)),numhelper || EnemyNear(Var(53)),numproj

;ガード
[state -1, Guard]
type = ChangeState
value = ifelse(EnemyNear(Var(53)),statetype = A || (EnemyNear(Var(53)),statetype = C && random <= 100),130,131)
triggerall = var(59) = 1 && numenemy
triggerall = roundstate = 2 && statetype != A
triggerall = stateno != [120,159]
triggerall = ctrl || stateno = 1 || (stateno = [15,16]) || (stateno = [21,22]) || (stateno = [100,101]) || (movetype != H && stateno = [120,149])
triggerall = time > 20 || EnemyNear(Var(53)),time > 15 || (stateno = [15,16]) || random <= 500
triggerall = !EnemyNear(Var(53)),HitDefAttr = SCA, NT,ST,HT
triggerall = !(var(55) = 3 && var(42) > 0)
trigger1 = EnemyNear(Var(53)),numproj && InGuardDist
trigger2 = (EnemyNear(Var(53)),HitDefAttr = SCA, NA,SA,HA) && InGuardDist
trigger2 = random <= ifelse(EnemyNear(Var(53)),statetype = A, 150, 50)
trigger3 = EnemyNear(Var(53)),numhelper && InGuardDist
trigger3 = !(EnemyNear(Var(53)),HitDefAttr = SCA)
trigger3 = EnemyNear(Var(53)),time >= 10 || EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),stateno = [0,199]
trigger4 = numhelper(20000)
trigger4 = helper(20000),var(2) = 5
trigger4 = EnemyNear(Var(53)),numhelper || EnemyNear(Var(53)),numproj

;歩き（相手ダウン中）
[State -1, Walk]
type = ChangeState
value = 21
triggerall = var(59)>=1
triggerall = roundstate=2 && statetype!=A
triggerall = !InGuardDist
triggerall = stateno != 20 && stateno != 21 && stateno != [100,101]
triggerall = stateno != [120,159]
triggerall = EnemyNear(Var(53)),statetype = L
triggerall = ctrl || stateno = 22
triggerall = stateno != 901
trigger1 = p2bodydist X >= 50 && time > 10
trigger1 = time > 20 || random <= 80
trigger2 = p2bodydist X >= 40 && EnemyNear(Var(53)),stateno = 5120 && time > 5

;歩き（相手ダウン中）
[State -1, Walk]
type = ChangeState
value = 22
triggerall = var(59)>=1
triggerall = roundstate=2 && statetype!=A
triggerall = !InGuardDist
triggerall = stateno != 20 && stateno != 22 && stateno != [100,101]
triggerall = stateno != [120,159]
triggerall = stateno != 901
triggerall = EnemyNear(Var(53)),statetype = L
trigger1 = ctrl || stateno = 21
trigger1 = p2bodydist X <= 20 && time > 5

;歩き・後ろ(間合い調整)
[State -1, Walk]
type = ChangeState
value = 22
triggerall = var(59) >= 1
triggerall = roundstate=2 && statetype!=A
triggerall = !InGuardDist
triggerall = stateno != 20 && stateno != 22 && stateno != 100
triggerall = stateno != [120,159]
triggerall = ctrl || stateno = 21
triggerall = stateno != 901
trigger1 = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype != H
trigger1 = (EnemyNear(Var(53)),stateno = [0,999]) && EnemyNear(Var(53)),Pos Y = [-120,-20]
trigger1 = p2bodydist X <= 40 && time > 5
trigger1 = random <= 50 || EnemyNear(Var(53)),facing = facing
trigger2 = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Vel X > 0
trigger2 = EnemyNear(Var(53)),time <= 10 && EnemyNear(Var(53)),movetype != H
trigger2 = p2bodydist X <= 70 && time > 5 && EnemyNear(Var(53)),facing = -facing
trigger2 = random <= 50 || (var(59) = 1 && random <= 80)
trigger3 = NumHelper(8900+id)
trigger3 = (Helper(8900+id),fvar(facing = 1) <= 60 && p2dist X = [-10,320])
trigger3 = EnemyNear(Var(53)),statetype = A && EnemyNear(Var(53)),movetype != H
trigger3 = p2bodydist X <= 70
trigger3 = time > 5 || stateno != 21
trigger3 = random <= 50 || (var(59) = 1 && random <= 80)

trigger4 = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Vel X > 0
trigger4 = EnemyNear(Var(53)),time <= 30 && EnemyNear(Var(53)),movetype != H
trigger4 = stateno != 21 || time > 30
trigger4 = EnemyNear(Var(53)),facing = -facing && BackEdgeBodyDist > 30
trigger4 = random <= 50 || (var(59) = 1 && random <= 80)
trigger4 = (p2bodydist X = [100,200]) ;&& time > 20
trigger4 = random <= 200

;歩き
[State -1, Walk]
type = ChangeState
value = 21
triggerall = var(59) >= 1
triggerall = roundstate=2 && statetype!=A
triggerall = ctrl && stateno != [100,101]
triggerall = !InGuardDist
triggerall = stateno != 20
triggerall = stateno != 21 && stateno != 22
triggerall = stateno != [120,159]
triggerall = stateno != 901
triggerall = p2bodydist X > 0
triggerall = EnemyNear(Var(53)),statetype != A || p2bodydist X >= 20
triggerall = EnemyNear(var(53)),statetype != A || EnemyNear(var(53)),facing = -facing || p2bodydist X >= 30
triggerall = random <= 200 || EnemyNear(Var(53)),movetype = H
trigger1 = random <= 50 || ((p2bodydist X > 40 || EnemyNear(var(53)),facing = facing) && random <= 700) || EnemyNear(var(53)),movetype = H

;ちょーはつ
[State -1]
Type = ChangeState
Value = ifelse(FrontEdgeBodyDist <= 30,105,ifelse(BackEdgeBodyDist <= 50,700,199))
TriggerAll = var(59) >= 1
TriggerAll = RoundState = 3
TriggerAll = !MatchOver || FrontEdgeBodyDist <= 30 || BackEdgeBodyDist <= 30
TriggerAll = life > 400 || FrontEdgeBodyDist <= 30 || BackEdgeBodyDist <= 30
TriggerAll = StateType != A
TriggerAll = P2Life < Life
TriggerAll = Ctrl 
TriggerAll = EnemyNear(var(53)),statetype != A || time > 10
Triggerall = StateNo != 199 && stateno != 700 && var(52) = 0
Trigger1 = 1
Trigger1 = var(52) := 1

;ちょーはつフラグリセット
[State -1]
type = VarSet
triggerall = var(52) != 0
trigger1 = roundstate != 3
var(52) = 0

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

;空中強キック(空対空)
[State -1]
type = ChangeState
value = 640
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),facing = -facing
triggerall = random <= 100
trigger1 = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 7) - (EnemyNear(Var(53)),const(movement.yaccel) * 28))
trigger1 = Pos Y <= (-20 - (Vel Y * 7) - (const(movement.yaccel) * 28))
trigger1 = p2bodydist X <= 65 + (EnemyNear(Var(53)),Vel X * 7) + Vel X * 7
trigger1 = p2dist X > 0 + (EnemyNear(Var(53)),Vel X * 7) + Vel X * 7
trigger1 = Pos Y + (Vel Y * 7) + (const(movement.yaccel) * 28) - 30 <= EnemyNear(Var(53)),Pos Y + (EnemyNear(Var(53)),Vel Y * 7) + (EnemyNear(Var(53)),const(movement.yaccel) * 28)

;空中弱パンチ(空対空)
[State -1]
type = ChangeState
value = 600
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),facing = -facing
triggerall = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 5) - (EnemyNear(Var(53)),const(movement.yaccel) * 15))
triggerall = Pos Y <= (-20 - (Vel Y * 5) - (const(movement.yaccel) * 15))
trigger1 = p2bodydist X <= 30 + (EnemyNear(Var(53)),Vel X * 5) + Vel X * 5
trigger1 = p2dist X > -50 + (EnemyNear(Var(53)),Vel X * 5) + Vel X * 5
trigger1 = Pos Y + (Vel Y * 5) + (const(movement.yaccel) * 15) <= EnemyNear(Var(53)),Pos Y + (EnemyNear(Var(53)),Vel Y * 5) + (EnemyNear(Var(53)),const(movement.yaccel) * 15)
trigger1 = Pos Y + (Vel Y * 5) + (const(movement.yaccel) * 15) + 50 >= EnemyNear(Var(53)),Pos Y + (EnemyNear(Var(53)),Vel Y * 5) + (EnemyNear(Var(53)),const(movement.yaccel) * 15)
trigger1 = random <= 100

;空中弱キック(空対空)
[State -1]
type = ChangeState
value = 630
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),movetype != H
triggerall = EnemyNear(Var(53)),statetype = A
triggerall = EnemyNear(Var(53)),facing = -facing
triggerall = EnemyNear(Var(53)),Pos Y <= (0 - (EnemyNear(Var(53)),Vel Y * 9) - (EnemyNear(Var(53)),const(movement.yaccel) * 45))
triggerall = Pos Y <= (-20 - (Vel Y * 9) - (const(movement.yaccel) * 45))
trigger1 = p2bodydist X <= 65 + (EnemyNear(Var(53)),Vel X * 9) + Vel X * 9
trigger1 = p2dist X > 0 + (EnemyNear(Var(53)),Vel X * 9) + Vel X * 9
trigger1 = Pos Y + (Vel Y * 9) + (const(movement.yaccel) * 45) - 70 <= EnemyNear(Var(53)),Pos Y + (EnemyNear(Var(53)),Vel Y * 9) + (EnemyNear(Var(53)),const(movement.yaccel) * 45)
trigger1 = Pos Y + (Vel Y * 9) + (const(movement.yaccel) * 45) >= EnemyNear(Var(53)),Pos Y + (EnemyNear(Var(53)),Vel Y * 9) + (EnemyNear(Var(53)),const(movement.yaccel) * 45)
trigger1 = random <= 100

;ジャンプ強パンチ
[State -1]
type = ChangeState
value = 610
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),stateno != 5910
triggerall = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),stateno = [120,159]
triggerall = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Pos Y >= -20
triggerall = -(Vel Y * 11) - (const(movement.yaccel) * 66) < 0
triggerall = Pos Y <= (-1 - (Vel Y * 13) - (const(movement.yaccel) * 91))
triggerall = Pos Y >= (0 - (Vel Y * 24) - (const(movement.yaccel) * 300))
triggerall = p2dist X > -70 + Vel X * 13 + EnemyNear(Var(53)),Vel X * 13 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = p2bodydist X <= 55 + Vel X * 13 + EnemyNear(Var(53)),Vel X * 13 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = random <= 40 || EnemyNear(Var(53)),ctrl && random <= 100 || p2dist X <= 10 + Vel X * 13 + EnemyNear(Var(53)),Vel X * 13 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger2 = p2bodydist X <= 55 + Vel X * 13 + EnemyNear(Var(53)),Vel X * 13 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger2 = Pos Y >= (-5 - (Vel Y * 18) - (const(movement.yaccel) * 171))

;ジャンプ強キック
[State -1]
type = ChangeState
value = 640
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),stateno != 5910
triggerall = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),stateno = [120,159]
triggerall = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Pos Y >= -20
triggerall = p2dist X = [1,320]
triggerall = -(Vel Y * 7) - (const(movement.yaccel) * 28) < 0
triggerall = Pos Y <= (-1 - (Vel Y * 7) - (const(movement.yaccel) * 28))
triggerall = Pos Y >= (0 - (Vel Y * 18) - (const(movement.yaccel) * 171))
triggerall = p2bodydist X <= 65 + Vel X * 12 + EnemyNear(Var(53)),Vel X * 12 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
;triggerall = p2dist X > 30 + Vel X * 7 + EnemyNear(Var(53)),Vel X * 7 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = random <= 50 || ((EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),stateno = [0,119]) && random <= 100) || (p2bodydist X > 120 && random <= 80)
trigger2 = Pos Y >= (-5 - (Vel Y * 12) - (const(movement.yaccel) * 78))

;ジャンプ弱キック
[State -1]
type = ChangeState
value = 630
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = !inguarddist
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),stateno != 5910
triggerall = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),stateno = [120,159]
triggerall = EnemyNear(Var(53)),statetype != C
triggerall = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Pos Y >= -20
triggerall = p2dist X = [1,320]
triggerall = -(Vel Y * 4) - (const(movement.yaccel) * 10) < 0
triggerall = Pos Y <= (-1 - (Vel Y * 4) - (const(movement.yaccel) * 10))
triggerall = Pos Y >= (0 - (Vel Y * 10) - (const(movement.yaccel) * 55))
triggerall = p2bodydist X <= 85 + Vel X * 9 + EnemyNear(Var(53)),Vel X * 9 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
triggerall = p2bodydist X > 40 + Vel X * 4 + EnemyNear(Var(53)),Vel X * 4 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = random <= 50 || ((EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),stateno = [0,119]) && random <= 100) || (p2bodydist X > 120 && random <= 80)
trigger2 = Pos Y >= (-5 - (Vel Y * 9) - (const(movement.yaccel) * 45))

;空中ふっとばし
[State -1]
type = ChangeState
value = 690
triggerall = var(59) >= 1 && numenemy
triggerall = roundstate = 2 && statetype = A
triggerall = ctrl || (movetype != H && (stateno = 50 || stateno = [120,149]))
triggerall = EnemyNear(Var(53)),statetype != L && EnemyNear(Var(53)),stateno != 5910
triggerall = EnemyNear(Var(53)),movetype != H || EnemyNear(Var(53)),stateno = [120,159]
triggerall = EnemyNear(Var(53)),statetype != A || EnemyNear(Var(53)),Pos Y >= -20
triggerall = p2dist X = [1,320]
triggerall = p2bodydist X > 40
triggerall = -(Vel Y * 19) - (const(movement.yaccel) * 190) < 0
triggerall = Pos Y <= (-1 - (Vel Y * 19) - (const(movement.yaccel) * 190))
triggerall = Pos Y >= (0 - (Vel Y * 25) - (const(movement.yaccel) * 630))
triggerall = p2bodydist X <= 55 + Vel X * 19 + EnemyNear(Var(53)),Vel X * 19 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
triggerall = p2bodydist X >  10 + Vel X * 19 + EnemyNear(Var(53)),Vel X * 19 * ifelse(EnemyNear(Var(53)),facing = -facing,1,-1)
trigger1 = random <= 30 || ((EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),stateno = [0,119]) && random <= 60) || (p2bodydist X > 120 && random <= 50)

[state -1, Guard]
type = ChangeState
value = 132
triggerall = var(59) >= 1
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl && stateno != [120,159]
triggerall = statetype = A && var(23) <= 0
triggerall = !(EnemyNear(Var(53)),HitDefAttr = SCA, NT,ST,HT)
triggerall = Vel Y > 0 || Pos Y < -80
trigger1 = EnemyNear(Var(53)),numproj
trigger2 = EnemyNear(Var(53)),HitDefAttr = SCA, NA,SA,HA
trigger2 = random <= ifelse(EnemyNear(Var(53)),statetype = A, 400, 200)
trigger3 = EnemyNear(Var(53)),numhelper && inguarddist
trigger3 = !(EnemyNear(Var(53)),HitDefAttr = SCA)
trigger3 = EnemyNear(Var(53)),time >= 10 || EnemyNear(Var(53)),ctrl || EnemyNear(Var(53)),stateno = [0,199]

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


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


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;===========================================================================
;プレイヤー操作
;===========================================================================
;---------------------------------------------------------------------------

;===========================================================================
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

;===========================================================================
;---------------------------------------------------------------------------

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

;---------------------------------------------------------------------------
;ネオ・フリーズエクスキュージョン
[State ERROR]
type = ChangeState
value = 3500
triggerall = var(59) <= 0
triggerall = command = "NEO MAX" || fvar(6) = 3500
triggerall = power >= 3000 || (var(29) >= 1 && var(20) > 0 && power >= 2000)
triggerall = var(20) > 0 || var(19) >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)

trigger14= stateno = 1000 && movecontact = [1,5]
trigger15= stateno = 1100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger16= stateno = 1200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger17= stateno = 1320 && movecontact = [1,5]
trigger18= stateno = 1330 && movecontact = [1,5]
trigger19= stateno = 2000 && movecontact = [1,5]
trigger20= stateno = 2100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger21= stateno = 2200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger22= stateno = 2320 && movecontact = [1,5]
trigger23= stateno = 2330 && movecontact = [1,5]

trigger24= stateno = 3000 && (animelem = 10,>= 8 && animelem = 15,<0) && var(20) > 0
trigger25= stateno = 3010 && (animelem = 10,>= 8 && animelem = 30,<0) && var(20) > 0

trigger26= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger27= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;フリーズエクスキュージョン・スーパーキャンセル
[State Scramble Dash]
type = ChangeState
value = 3100
triggerall = var(59) <= 0
triggerall = power >= 2000
triggerall = command = "エクスキュージョン"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000 && movecontact = [1,5]
trigger2 = stateno = 1100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger3 = stateno = 1200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger4 = stateno = 1320 && movecontact = [1,5]
trigger5 = stateno = 1330 && movecontact = [1,5]
trigger6 = stateno = 2000 && movecontact = [1,5]
trigger7 = stateno = 2100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger8 = stateno = 2200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger9 = stateno = 2320 && movecontact = [1,5]
trigger10= stateno = 2330 && movecontact = [1,5]

;---------------------------------------------------------------------------
;フリーズエクスキュージョン
[State Scramble Dash]
type = ChangeState
value = 3100
triggerall = var(59) <= 0
triggerall = power >= 2000
triggerall = command = "エクスキュージョン" || fvar(6) = 3100
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;EXダイヤモンドエッジ・スーパーキャンセル
[State Scramble Dash]
type = ChangeState
value = 3010
triggerall = var(59) <= 0
triggerall = power >= 2000
triggerall = command = "エッジEX"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000 && movecontact = [1,5]
trigger2 = stateno = 1100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger3 = stateno = 1200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger4 = stateno = 1320 && movecontact = [1,5]
trigger5 = stateno = 1330 && movecontact = [1,5]
trigger6 = stateno = 2000 && movecontact = [1,5]
trigger7 = stateno = 2100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger8 = stateno = 2200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger9 = stateno = 2320 && movecontact = [1,5]
trigger10= stateno = 2330 && movecontact = [1,5]

;---------------------------------------------------------------------------
;EXダイヤモンドエッジ
[State Scramble Dash]
type = ChangeState
value = 3010
triggerall = var(59) <= 0
triggerall = power >= 2000
triggerall = command = "エッジEX" || fvar(6) = 3010
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;ダイヤモンドエッジ・スーパーキャンセル
[State Scramble Dash]
type = ChangeState
value = 3000
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "エッジ"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000 && movecontact = [1,5]
trigger2 = stateno = 1100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger3 = stateno = 1200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger4 = stateno = 1320 && movecontact = [1,5]
trigger5 = stateno = 1330 && movecontact = [1,5]
trigger6 = stateno = 2000 && movecontact = [1,5]
trigger7 = stateno = 2100 && (animelem = 6,>=3 && animelem = 10,<0)
trigger8 = stateno = 2200 && (animelem = 4,>=1 && animelem = 6,<0)
trigger9 = stateno = 2320 && movecontact = [1,5]
trigger10= stateno = 2330 && movecontact = [1,5]

;---------------------------------------------------------------------------
;ダイヤモンドエッジ
[State Scramble Dash]
type = ChangeState
value = 3000
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "エッジ" || fvar(6) = 3000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;EXレイスピン・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 2300
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "レイスピンEX"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000
trigger1 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger2 = stateno = 1200
trigger2 = Numhelper(1230)
trigger2 = (helper(1230),movehit = [1,8]) || (var(20) > 0 && helper(1230),movecontact = [1,8])
trigger3 = stateno = 1320
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger4 = stateno = 1330
trigger4 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger5 = stateno = 1000
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2000
trigger6 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger7 = stateno = 2320
trigger7 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger8 = stateno = 2330
trigger8 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;EXレイスピン
[State Scramble Dash]
type = ChangeState
value = 2300
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "レイスピンEX" || fvar(6) = 2300
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;レイスピン・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 1300
triggerall = var(59) <= 0
triggerall = command = "レイスピン"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000
trigger1 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger2 = stateno = 1200
trigger2 = Numhelper(1230)
trigger2 = (helper(1230),movehit = [1,8]) || (var(20) > 0 && helper(1230),movecontact = [1,8])
trigger3 = stateno = 1320
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger4 = stateno = 1330
trigger4 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger5 = stateno = 1000
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2000
trigger6 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger7 = stateno = 2320
trigger7 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger8 = stateno = 2330
trigger8 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;レイスピン
[State Scramble Dash]
type = ChangeState
value = 1300
triggerall = var(59) <= 0
triggerall = command = "レイスピン" || fvar(6) = 1300
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;EXカウンターシェル・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 2200
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "シェルEX"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000
trigger1 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger2 = stateno = 1320
trigger2 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger3 = stateno = 1330
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger4 = stateno = 2000
trigger4 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger5 = stateno = 2320
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2330
trigger6 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;EXカウンターシェル
[State Scramble Dash]
type = ChangeState
value = 2200
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "シェルEX" || fvar(6) = 2200
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;カウンターシェル・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 1200
triggerall = var(59) <= 0
triggerall = command = "シェル"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000
trigger1 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger2 = stateno = 1320
trigger2 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger3 = stateno = 1330
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger4 = stateno = 2000
trigger4 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger5 = stateno = 2320
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2330
trigger6 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;カウンターシェル
[State Scramble Dash]
type = ChangeState
value = 1200
triggerall = var(59) <= 0
triggerall = command = "シェル" || fvar(6) = 1200
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;EXクロウバイツ・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 2000
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "クロウバイツEX"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1200
trigger1 = Numhelper(1230)
trigger1 = (helper(1230),movehit = [1,8]) || (var(20) > 0 && helper(1230),movecontact = [1,8])
trigger2 = stateno = 1320
trigger2 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger3 = stateno = 1330
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger4 = stateno = 2200
trigger4 = Numhelper(2230)
trigger4 = (helper(2230),movehit = [1,8]) || (var(20) > 0 && helper(2230),movecontact = [1,8])
trigger5 = stateno = 2320
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2330
trigger6 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;EXクロウバイツ
[State Scramble Dash]
type = ChangeState
value = 2000
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "クロウバイツEX" || fvar(6) = 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;クロウバイツ・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 1000
triggerall = var(59) <= 0
triggerall = command = "クロウバイツ"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1200
trigger1 = Numhelper(1230)
trigger1 = (helper(1230),movehit = [1,8]) || (var(20) > 0 && helper(1230),movecontact = [1,8])
trigger2 = stateno = 1320
trigger2 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger3 = stateno = 1330
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger4 = stateno = 2200
trigger4 = Numhelper(2230)
trigger4 = (helper(2230),movehit = [1,8]) || (var(20) > 0 && helper(2230),movecontact = [1,8])
trigger5 = stateno = 2320
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2330
trigger6 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;クロウバイツ
[State Scramble Dash]
type = ChangeState
value = 1000
triggerall = var(59) <= 0
triggerall = command = "クロウバイツ" || fvar(6) = 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;EXダイヤモンドブレス・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 2100
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "ブレスEX"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000
trigger1 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger2 = stateno = 1200
trigger2 = Numhelper(1230)
trigger2 = (helper(1230),movehit = [1,8]) || (var(20) > 0 && helper(1230),movecontact = [1,8])
trigger3 = stateno = 1320
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger4 = stateno = 1330
trigger4 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger5 = stateno = 1000
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2200
trigger6 = Numhelper(2230)
trigger6 = (helper(2230),movehit = [1,8]) || (var(20) > 0 && helper(2230),movecontact = [1,8])
trigger7 = stateno = 2320
trigger7 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger8 = stateno = 2330
trigger8 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;EXダイヤモンドブレス
[State Scramble Dash]
type = ChangeState
value = 2100
triggerall = var(59) <= 0
triggerall = power >= 1000
triggerall = command = "ブレスEX" || fvar(6) = 2100
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;---------------------------------------------------------------------------
;ダイヤモンドブレス・ドライブキャンセル
[State Scramble Dash]
type = ChangeState
value = 1100
triggerall = var(59) <= 0
triggerall = command = "ブレス"
triggerall = statetype != A
triggerall = var(20) > 0 || var(19) >= 500
trigger1 = stateno = 1000
trigger1 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger2 = stateno = 1200
trigger2 = Numhelper(1230)
trigger2 = (helper(1230),movehit = [1,8]) || (var(20) > 0 && helper(1230),movecontact = [1,8])
trigger3 = stateno = 1320
trigger3 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger4 = stateno = 1330
trigger4 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

trigger5 = stateno = 1000
trigger5 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger6 = stateno = 2200
trigger6 = Numhelper(2230)
trigger6 = (helper(2230),movehit = [1,8]) || (var(20) > 0 && helper(2230),movecontact = [1,8])
trigger7 = stateno = 2320
trigger7 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])
trigger8 = stateno = 2330
trigger8 = (movehit = [1,5]) || (var(20) > 0 && movecontact = [1,5])

;---------------------------------------------------------------------------
;ダイヤモンドブレス
[State Scramble Dash]
type = ChangeState
value = 1100
triggerall = var(59) <= 0
triggerall = command = "ブレス" || fvar(6) = 1100
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact = [1,5]
trigger3 = stateno = 210 && movecontact = [1,5]
trigger4 = stateno = 215 && movecontact = [1,5]
trigger5 = stateno = 230 && movecontact = [1,5]
trigger6 = stateno = 245 && movecontact = [1,5]
trigger7 = stateno = 400 && movecontact = [1,5]
trigger8 = stateno = 430 && movecontact = [1,5]
trigger9 = stateno = 440 && movecontact = [1,5]
trigger10= stateno = 290 && movecontact = [1,5]
trigger11= stateno = 265 && movecontact = [1,5]

trigger12= stateno = 210 && (animelem = 5,> 0 && animelem = 9,<0)
trigger13= stateno = 290 && (animelem = 12,> 0 && animelem = 15,<0)
trigger14= stateno = 240 && var(20) > 0 && movecontact = [1,5]
trigger15= stateno = 410 && var(20) > 0 && movecontact = [1,5]

;===========================================================================
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;ガードキャンセルふっ飛ばし攻撃
[State -1, 290]
type = ChangeState
value = 295
triggerall = var(59) <= 0
triggerall = command = "ふっ飛ばし"
triggerall = power >= 1000
trigger1 = stateno = 150
trigger2 = stateno = 151

;---------------------------------------------------------------------------
;ふっ飛ばし攻撃
[State -1, 290]
type = ChangeState
value = 290
triggerall = var(59) <= 0
triggerall = command = "ふっ飛ばし"
triggerall = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;空中ふっ飛ばし攻撃
[State -1, Jump Strong Kick]
type = ChangeState
value = 690
triggerall = var(59) <= 0
triggerall = command = "ふっ飛ばし"
trigger1 = statetype = A
trigger1 = stateno != 106
trigger1 = ctrl

;---------------------------------------------------------------------------
;ハイパードライブモード発動
[State -1, Jump Strong Kick]
type = ChangeState
value = 900
triggerall = var(59) <= 0
triggerall = command = "MAX"
triggerall = statetype != A
triggerall = power >= 1000
trigger1 = var(20) = 0 && var(19) >= 1000
trigger1 = ctrl

;---------------------------------------------------------------------------
;クイックハイパーモード発動
[State -1, Jump Strong Kick]
type = ChangeState
value = 901
triggerall = var(59) <= 0
triggerall = command = "MAX"
triggerall = statetype != A
trigger1 = var(20) = 0 && var(19) >= 1000
trigger1 = stateno = [200,499]
trigger1 = movecontact

;===========================================================================
;---------------------------------------------------------------------------
;緊急回避後
[State -1, Taunt]
type = ChangeState
value = 701
triggerall = var(59) <= 0
triggerall = command = "緊急回避後"
trigger1 = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;ガードキャンセル緊急回避後
[State -1, 701]
type = ChangeState
value = 701
triggerall = var(59) <= 0
triggerall = command = "緊急回避後"
triggerall = power >= 1000
trigger1 = stateno = 150
trigger2 = stateno = 151
;---------------------------------------------------------------------------
;緊急回避前
[State -1, Taunt]
type = ChangeState
value = 700
triggerall = var(59) <= 0
triggerall = command = "緊急回避前"
trigger1 = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;ガードキャンセル緊急回避前
[State -1, 700]
type = ChangeState
value = 700
triggerall = var(59) <= 0
triggerall = command = "緊急回避前"
triggerall = power >= 1000
trigger1 = stateno = 150
trigger2 = stateno = 151

;---------------------------------------------------------------------------
;ダウン回避
[State -1, Taunt]
type = ChangeState
value = 702
triggerall = var(59) <= 0
triggerall = command = "緊急回避前"
triggerall = alive && canrecover
trigger1 = stateno = 5050
trigger1 = pos y >=0
trigger1 = vel y > 0
;---------------------------------------------------------------------------
;Run Fwd
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = var(59) <= 0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = var(59) <= 0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;アイスコフィン
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall = var(59) <= 0
triggerall = command = "y"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl
triggerall = stateno != 100
trigger1 = ((P2dist X = [1,320]) && (P2bodydist X = [-5,5]))
trigger1 = p2statetype != A
trigger1 = p2movetype != H

;---------------------------------------------------------------------------
;アイスコフィン
[State -1, Kung Fu Throw]
type = ChangeState
value = 820
triggerall = var(59) <= 0
triggerall = command = "b"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl
triggerall = stateno != 100
trigger1 = ((P2dist X = [1,320]) && (P2bodydist X = [-5,5]))
trigger1 = p2statetype != A
trigger1 = p2movetype != H

;---------------------------------------------------------------------------
;ワンインチ
[State -1, a]
type = ChangeState
value = 260
triggerall = var(59) <= 0
triggerall = command = "x"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;ワンインチ(キャンセル版)
[State -1, a]
type = ChangeState
value = 265
triggerall = var(59) <= 0
triggerall = command = "x"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = stateno = 200 && movecontact = [1,5]
trigger2 = stateno = 210 && movecontact = [1,5]
trigger3 = stateno = 215 && movecontact = [1,5]
trigger4 = stateno = 230 && movecontact = [1,5]
trigger5 = stateno = 245 && movecontact = [1,5]
trigger6 = stateno = 400 && movecontact = [1,5]
trigger7 = stateno = 430 && movecontact = [1,5]
trigger8 = stateno = 440 && movecontact = [1,5]
trigger9 = stateno = 290 && movecontact = [1,5]

;---------------------------------------------------------------------------
;スライダーシュート
[State -1, a]
type = ChangeState
value = 455
triggerall = var(59) <= 0
triggerall = command = "a"
triggerall = command = "holdfwd"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;スライダーシュート(キャンセル版)
[State -1, a]
type = ChangeState
value = 455
triggerall = var(59) <= 0
triggerall = command = "a"
triggerall = command = "holdfwd"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = stateno = 200 && movecontact = [1,5]
trigger2 = stateno = 210 && movecontact = [1,5]
trigger3 = stateno = 215 && movecontact = [1,5]
trigger4 = stateno = 230 && movecontact = [1,5]
trigger5 = stateno = 245 && movecontact = [1,5]
trigger6 = stateno = 400 && movecontact = [1,5]
trigger7 = stateno = 430 && movecontact = [1,5]
trigger8 = stateno = 440 && movecontact = [1,5]
trigger9 = stateno = 290 && movecontact = [1,5]

;===========================================================================
;---------------------------------------------------------------------------
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) <= 0
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelem=3,>0 && animelem=6,<0)
trigger3 = stateno = 430 && (animelem=4,>0 && animelem=7,<0)


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

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

;---------------------------------------------------------------------------
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59) <= 0
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelem=3,>0 && animelem=6,<0)
trigger3 = stateno = 430 && (animelem=4,>0 && animelem=7,<0)

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

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

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

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

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

;---------------------------------------------------------------------------
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(59) <= 0
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelem=3,>0 && animelem=6,<0)
trigger3 = stateno = 430 && (animelem=4,>0 && animelem=7,<0)

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

;---------------------------------------------------------------------------
;空中弱パンチ
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(59) <= 0
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = var(59) <= 0
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = var(59) <= 0
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = var(59) <= 0
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
