[Statedef -3]

[State -3, AI起動用ヘルパー]
type=helper
trigger1=!NumHelper(90000)
trigger1=roundstate=2
trigger1=alive
trigger1=var(59)=0
Trigger1=(PrevStateNo=[190,192])||PrevStateNo=5900
Trigger1=ctrl&&stateno=0
helpertype=normal
name="AI"
stateno=90000
ID=90000
pos=9999,9999
keyctrl=1
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0

;念のため↓も付けておく
[State -3, 関係無いステートに行かないように]
type=changestate
trigger1= ishelper(90000)
trigger1= stateno!=90000
value=90000

[State -3, AIフラグセット]
type = VarSet
triggerall = Var(59) = 0
triggerall = RoundState = [1,2]
trigger1 = Command = "AI0" || Command = "AI1" || Command = "AI2" || Command = "AI3"
trigger2 = Command = "AI4" || Command = "AI5" || Command = "AI6" || Command = "AI7"
trigger3 = Command = "AI8" || Command = "AI9" || Command = "AI10"|| Command = "AI11"
trigger4 = Command = "AI12"|| Command = "AI13"|| Command = "AI14"|| Command = "AI15"
trigger5 = Command = "AI16"|| Command = "AI17"|| Command = "AI18"|| Command = "AI19"
trigger6 = Command = "AI20"|| Command = "AI21"|| Command = "AI22"|| Command = "AI23"
trigger7 = Command = "AI24"|| Command = "AI25"|| Command = "AI26"|| Command = "AI27"
trigger8 = Command = "AI28"|| Command = "AI29"|| Command = "AI30"|| Command = "AI31"
trigger9 = Command = "AI32"|| Command = "AI33"|| Command = "AI34"|| Command = "AI35"
trigger10= Command = "AI36"|| Command = "AI37"|| Command = "AI38"|| Command = "AI39"
trigger11= Command = "AI40"|| Command = "AI41"|| Command = "AI42"|| Command = "AI43"
trigger12= Command = "AI44"|| Command = "AI45"|| Command = "AI46"|| Command = "AI47"
trigger13= Command = "AI48"|| Command = "AI49"|| Command = "AI50";|| Command = "start"
trigger14= NumHelper(90000) > 0 && RoundState = 2
trigger14= Helper(90000),var(59)=1
;trigger15 = 1  ; ←1番左の;を外せば常時AI起動
var(59) = 6   ;　LV選択幅　1－11 　11は超反応有

[State -3,MAX2判断用]
type = VarSet
triggerall = var(59) > 0
trigger1 = 1
fvar(33) = 0 ;←1に変えればアネルがいてもMAX2を撃ちます
             ;　2に変えればMAX2を封印

[State -3,勝ち挑発封印]
type = VarSet
triggerall = var(59) > 0
trigger1 = RoundState = 2
fvar(38) = 0  ;←ここを1にすると勝ち挑発封印
              ;勝ち挑発はLV10以上時のみです

;==============================================================================
;コンボ関係
[State -3,お前蹴りあげてボコるわ]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(58) != 1
trigger1 = stateno = 1000 && movehit
var(58) = 1

[State -3,神に弓引く・・・なんだっけ？]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
trigger1 = Power >= 1000
trigger1 = stateno = 3003 && animtime = 0
trigger1 = EnemyNear(var(55)),StateNo = [5000,5099]
var(58) = 2

[State -3,吹っ飛ばして燃やすぞゴルァ!]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
trigger1 = Power >= 1000
trigger1 = stateno = 810 || stateno = 831
trigger1 = animtime = 0
trigger1 = EnemyNear(var(55)),StateNo = [821,822]
var(58) = 3

[State -3,大炎上後爆発]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
triggerall = EnemyNear(var(55)),StateNo = [5000,5099]
trigger1 = stateno = 2001 && animtime = 0
trigger2 = stateno = 2200 && animtime = 0
trigger3 = stateno = 20010 && animtime = 0
var(58) = 6

[State -3,サマー後追撃用]
type = VarSet
triggerall = var(59) >= 6 && RoundState = 2
triggerall = EnemyNear(var(55)),StateNo = [5000,5099]
trigger1 = stateno = 1062 && movehit
trigger2 = var(58) = 1
trigger2 = stateno = 1063 && movehit
var(58) = 7

[State -3,フラグリセット]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
triggerall = (var(58) = [1,3])||var(58) = 6
trigger1 = var(58) = 1 ||(var(58) = [6,7])
trigger1 = EnemyNear(var(55)),StateType = L
trigger2 = EnemyNear(var(55)),Ctrl
trigger3 = stateno = 1007 
trigger4 = stateno = 2001&&P2bodydist X > 180
trigger5 = (stateno = [3001,3003])&& Power < 1000 && P2bodydist X > 80
trigger6 = var(58) = 7 && stateno = 1004
trigger7 = stateno = 20010&&P2bodydist X > 180
var(58) = 0

[State -3,通常技用1]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
triggerall = (EnemyNear(var(55)),StateNo = [120,159])||(EnemyNear(var(55)),StateNo = [5000,5099])
triggerall = EnemyNear(var(55)),StateType != L && EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2bodydist X < 30
trigger1 = (stateno = [200,205])&& movecontact
trigger2 = (stateno = 400 || stateno = 430) && movehit
var(58) = 4

[State -3,通常技用2]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
triggerall = (EnemyNear(var(55)),StateNo = [120,159])
triggerall = EnemyNear(var(55)),StateType != L && EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = stateno = 400 || stateno = 430
trigger1 = moveguarded
var(58) = 5

[State -3,フラグリセット]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(58) = [4,5]
trigger1 = EnemyNear(var(55)),StateType = L
trigger2 = EnemyNear(var(55)),Ctrl
trigger3 = var(58) = 5 && EnemyNear(var(55)),StateType = A
trigger4 = (EnemyNear(var(55)),StateNo != [120,159])&&(EnemyNear(var(55)),StateNo != [5000,5099])
trigger5 = (Movetype = A && stateno = 260) || P2bodydist X > 50
var(58) = 0

[State -3,ジャッチ成功カウント]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
trigger1 = stateno = 1005 && time = 1
var(57) = var(57)+1

[State -3,カウントリセット]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
trigger1 = EnemyNear(var(55)),StateType = L
trigger2 = EnemyNear(var(55)),Ctrl
trigger3 = stateno = 1007 || stateno = 1010 || stateno = 1055
var(57) = 0

[State -3,クワトジャッチキャンセル前方移動カウント]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
trigger1 = stateno = 1017 && animtime = 0
trigger1 = (EnemyNear(var(55)),StateNo = [5000,5099])
var(56) = 1

[State -3,カウントリセット]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
trigger1 = EnemyNear(var(55)),StateType = L
trigger2 = EnemyNear(var(55)),Ctrl
var(56) = 0

;==============================================================================
;タッグ判定
[State -3,相手タッグパートナー死亡判定用1]
type = VarSet
triggerall = RoundState = 2
trigger1 = NumEnemy = 1
trigger2 = NumEnemy = 2
trigger2 = EnemyNear(0),Life > 0
var(55) = 0
ignorehitpause = 1

[State -3, 相手タッグパートナー死亡判定用2]
type = VarSet
triggerall = RoundState = 2
triggerall = NumEnemy = 2
trigger1 = EnemyNear(0),Life <= 0
var(55) = 1
ignorehitpause = 1

[State -3,味方パートナーダウン]
Type = VarSet
triggerall = var(59) > 0
trigger1 = TeamMode = Simul
trigger1 = (!NumPartner) || (!Partner,Alive)
trigger2 = TeamMode = Single
trigger3 = TeamMode = Turns
var(54) = 0

;パートナー前衛
[State -3,]
Type = VarSet
triggerall = TeamMode = Simul
triggerall = NumPartner && Partner,Alive
trigger1 = (facing = 1 && Partner,Pos X - Pos X > 0) || (facing = -1 && Partner,Pos X - Pos X < 0)
var(54) = 1

;パートナー後衛
[State -3,]
Type = VarSet
triggerall = TeamMode = Simul
triggerall = NumPartner && Partner,Alive
trigger1 = (facing = 1 && Partner,Pos X - Pos X < 0) || (facing = -1 && Partner,Pos X - Pos X > 0)
var(54) = 2

;相手が1人の時
[State -3]
Type = VarSet
trigger1 = NumEnemy = 1
trigger2 = NumEnemy = 2
trigger2 = !EnemyNear(0),Alive || !EnemyNear(1),Alive
var(53) = 0

;相手が2人の時
[State -3]
Type = VarSet
triggerall = NumEnemy = 2
trigger1 = EnemyNear(0),Alive && EnemyNear(1),Alive
var(53) = 1

;自分、パートナー、敵、敵
[State -3]
Type = VarSet
triggerall = NumEnemy = 2
triggerall = NumPartner && Partner,Alive
triggerall = EnemyNear(0),Alive && EnemyNear(1),Alive
trigger1 = ifelse(facing = 1,EnemyNear(0),Pos X - Pos X > 0,EnemyNear(0),Pos X - Pos X < 0)
trigger1 = ifelse(facing = 1,EnemyNear(1),Pos X - Pos X > 0,EnemyNear(1),Pos X - Pos X < 0)
trigger1 = ifelse(facing = 1,EnemyNear(0),Pos X - Partner,Pos X > 0,EnemyNear(0),Pos X - Partner,Pos X < 0)
trigger1 = ifelse(facing = 1,EnemyNear(1),Pos X - Partner,Pos X > 0,EnemyNear(1),Pos X - Partner,Pos X < 0)
var(53) = 2

;自分、敵、パートナー、敵
[State -3]
Type = VarSet
triggerall = NumEnemy = 2
triggerall = NumPartner && Partner,Alive
triggerall = EnemyNear(0),Alive && EnemyNear(1),Alive
trigger1 = ifelse(facing = 1,EnemyNear(0),Pos X - Pos X > 0,EnemyNear(0),Pos X - Pos X < 0)
trigger1 = ifelse(facing = 1,EnemyNear(1),Pos X - Pos X > 0,EnemyNear(1),Pos X - Pos X < 0)
trigger1 = ifelse(facing = 1,EnemyNear(0),Pos X - Partner,Pos X < 0,EnemyNear(0),Pos X - Partner,Pos X > 0)
trigger1 = ifelse(facing = 1,EnemyNear(1),Pos X - Partner,Pos X > 0,EnemyNear(1),Pos X - Partner,Pos X < 0)
var(53) = 3

;相手をはさんだ時
[State -3]
Type = VarSet
triggerall = NumEnemy = 2
triggerall = NumPartner && Partner,Alive
triggerall = EnemyNear(0),Alive && EnemyNear(1),Alive
trigger1 = ifelse(facing = 1,EnemyNear(0),Pos X - Pos X > 0,EnemyNear(0),Pos X - Pos X < 0)
trigger1 = ifelse(facing = 1,EnemyNear(1),Pos X - Pos X > 0,EnemyNear(1),Pos X - Pos X < 0)
trigger1 = ifelse(facing = 1,EnemyNear(0),Pos X - Partner,Pos X < 0,EnemyNear(0),Pos X - Partner,Pos X > 0)
trigger1 = ifelse(facing = 1,EnemyNear(1),Pos X - Partner,Pos X < 0,EnemyNear(1),Pos X - Partner,Pos X > 0)
var(53) = 4

;後ろに回られた時
[State -3]
Type = VarSet
triggerall = NumEnemy = 2
triggerall = EnemyNear(0),Alive && EnemyNear(1),Alive
trigger1 = ifelse(facing = 1,EnemyNear(0),Pos X - Pos X < 0,EnemyNear(0),Pos X - Pos X > 0)
trigger2 = ifelse(facing = 1,EnemyNear(1),Pos X - Pos X < 0,EnemyNear(1),Pos X - Pos X > 0)
var(53) = 5

[State -3,MAX2判定]
Type = VarSet
triggerall = var(59)
triggerall = fvar(33) != 1
trigger1 = TeamMode = Simul
trigger1 = NumPartner && Partner,Alive
trigger1 = partner,authorname = "A-KUE" && partner,name = "Aner"
trigger2 = p2name = "Aner" || p4name = "Aner"
trigger3 = fvar(33) = 2
fvar(34) = 1

;==============================================================================
;ガード切り替え
[State -3,下段ガード用]
Type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
Trigger1 = EnemyNear(var(55)),Name = "millia"
Trigger1 = EnemyNear(var(55)),StateNo = 1500
Trigger2 = EnemyNear(var(55)),Name = "eddie"
Trigger2 = EnemyNear(var(55)),StateNo=1000||EnemyNear(var(55)),StateNo=1050||EnemyNear,NumHelper(1002);||EnemyNear,NumHelper(1001)
Trigger3 = EnemyNear(var(55)),Name = "eddie"
Trigger3 = EnemyNear(var(55)),StateNo=1800||EnemyNear(var(55)),StateNo=1850
Trigger4 = EnemyNear(var(55)),Name = "eddie" || EnemyNear(var(55)),Name = "jam"
Trigger4 = EnemyNear(var(55)),StateNo = 210
Trigger5 = EnemyNear(var(55)),Name = "Lyndis" && EnemyNear(var(55)),StateNo = 1020
Trigger6 = EnemyNear(var(55)),Name = "Death Adder" && EnemyNear(var(55)),NumHelper(1022)
Trigger7 = EnemyNear(var(55)),Name = "jagyuta" && EnemyNear(var(55)),StateNo = 215
Trigger8 = fvar(37) && EnemyNear(var(55)),StateNo = fvar(37)
fvar(39) = 2

[State -3,中段ガード用]
Type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
Trigger1 = AutHorName = "muteki" || AutHorName = "Akutagawa"
Trigger1 = EnemyNear(var(55)),StateNo = 240
Trigger2 = EnemyNear(var(55)),Name!="millia"||EnemyNear(var(55)),StateNo!=1500
Trigger2 = EnemyNear(var(55)),Name!="eddie"||!(EnemyNear(var(55)),StateNo=1000||EnemyNear(var(55)),StateNo=1050||EnemyNear(var(55)),StateNo=1800||EnemyNear(var(55)),StateNo=1850||EnemyNear,NumHelper(1001)||EnemyNear,NumHelper(1002))
Trigger2 = EnemyNear(var(55)),StateType=A
Trigger3 = EnemyNear(var(55)),Name = "testa" || EnemyNear(var(55)),Name = "jagyuta" || EnemyNear(var(55)),Name = "lehyu"
Trigger3 = EnemyNear(var(55)),StateNo = 205
Trigger4 = EnemyNear(var(55)),Name="millia"||EnemyNear(var(55)),Name="BRIDGET"||EnemyNear(var(55)),Name="eddie"||EnemyNear(var(55)),Name = "jam"
Trigger4 = EnemyNear(var(55)),StateNo = 215
Trigger5 = EnemyNear(var(55)),Name = "faust" && EnemyNear(var(55)),StateNo = 235
Trigger6 = EnemyNear(var(55)),Name = "johnny"
Trigger6 = EnemyNear(var(55)),StateNo = 1500||EnemyNear(var(55)),StateNo = [3500,3501]
Trigger7 = EnemyNear(var(55)),Name = "order-Sol=Badguy" && EnemyNear(var(55)),StateNo = 432
Trigger8 = EnemyNear(var(55)),Name = "Sion_Eltnam_Atlasia" && (EnemyNear(var(55)),StateNo = [240,241])
Trigger9 = EnemyNear(var(55)),Name = "Gale"
Trigger9 = (EnemyNear(var(55)),StateNo = [320,330]) || (EnemyNear(var(55)),StateNo = [1100,1150])
Trigger10= EnemyNear(var(55)),Name = "Kim Kaphwan" && EnemyNear(var(55)),AuthorName = "Ahuron"
Trigger10= EnemyNear(var(55)),StateNo = 260
Trigger11= EnemyNear(var(55)),Name = "jagyuta" && (EnemyNear(var(55)),StateNo = [1040,1047])
Trigger12= EnemyNear(var(55)),Name = "Heavy D!" && EnemyNear(var(55)),StateNo = 300
Trigger13= EnemyNear(var(55)),Name = "Mukai" && EnemyNear(var(55)),AuthorName = "RYO 2005"
Trigger13= EnemyNear(var(55)),StateNo = 230
Trigger14= EnemyNear(var(55)),Name = "Karman" && EnemyNear(var(55)),StateNo = 250
Trigger15= EnemyNear(var(55)),Name = "Clark Still" && EnemyNear(var(55)),StateNo = [1400,1410]
Trigger16= (fvar(35) && EnemyNear(var(55)),StateNo = fvar(35))||(fvar(36) && EnemyNear(var(55)),StateNo = fvar(36))
fvar(39) = 3

[State -3,ガード不能用(投げ)]
Type = VarSet
triggerall = var(59) >= 1 && RoundState = 2
;通常投げ
Trigger1 = EnemyNear(var(55)),AutHorName = "muteki"||EnemyNear(var(55)),AutHorName="H”"||EnemyNear(var(55)),AutHorName="Phantom.of.the.Server"
Trigger1 = EnemyNear(var(55)),StateNo = 800
Trigger2 = EnemyNear(var(55)),AutHorName="GM"||EnemyNear(var(55)),AutHorName="⑨"||EnemyNear(var(55)),AutHorName="jin"||EnemyNear(var(55)),AutHorName="Ahuron"||AutHorName = "Akutagawa"
Trigger2 = EnemyNear(var(55)),StateNo = 800
Trigger3 = EnemyNear(var(55)),AutHorName = "Warusaki3"
Trigger3 = EnemyNear(var(55)),StateNo = 900
;GG系ガード不能技
Trigger4 = EnemyNear(var(55)),Name = "eddie"
Trigger4 = EnemyNear(var(55)),StateNo = 1300
Trigger5 = EnemyNear(var(55)),Name = "SLAYER"
Trigger5 = EnemyNear(var(55)),StateNo = 1200||EnemyNear(var(55)),StateNo = 1300
Trigger6 = EnemyNear(var(55)),Name = "order-Sol=Badguy"
Trigger6 = EnemyNear(var(55)),StateNo = 150
Trigger7 = EnemyNear(var(55)),Name = "jam"
Trigger7 = EnemyNear(var(55)),StateNo = 2500
Trigger8 = EnemyNear(var(55)),Name = "faust"
Trigger8 = EnemyNear(var(55)),StateNo = 1500
Trigger9 = EnemyNear(var(55)),Name = "johnny"
Trigger9 = EnemyNear(var(55)),var(49)
Trigger9 = EnemyNear(var(55)),StateNo = [1000,1099]
;瞬獄殺系
Trigger10= EnemyNear(var(55)),stateno=7600||EnemyNear(var(55)),stateno=7601
Trigger10= EnemyNear(var(55)),name = "wind"
Trigger11= EnemyNear(var(55)),stateno = 4000
Trigger11= EnemyNear(var(55)),name="Shin Gouki"||EnemyNear(var(55)),name="Ryu"||EnemyNear(var(55)),name="Morrigan Aensland"||EnemyNear(var(55)),name ="Sakura Kasugano"
Trigger12= EnemyNear(var(55)),stateno = 3300
Trigger12= EnemyNear(var(55)),name="Yuri Sakazaki"||EnemyNear(var(55)),name="cvsgouki"||EnemyNear(var(55)),name="cvsryu"||EnemyNear(var(55)),name="cvssakura"
Trigger13= (EnemyNear(var(55)),stateno = [1700,1701])||EnemyNear(var(55)),stateno=3200
Trigger13= EnemyNear(var(55)),Name="cvsg_rugal"||EnemyNear(var(55)),Name="cvsrugal"
Trigger14= EnemyNear(var(55)),stateno = 3600
Trigger14= EnemyNear(var(55)),name = "Gouki"
Trigger15= EnemyNear(var(55)),stateno = 20080||EnemyNear(var(55)),stateno = 20060
Trigger15= EnemyNear(var(55)),name = "Kaori Misaka"
Trigger16= EnemyNear(var(55)),stateno = 3890
Trigger16= EnemyNear(var(55)),name = "Evil Ken"
;琥珀 AAD時チャイナ琥珀
Trigger17 = EnemyNear(var(55)),Name = "Kohaku"
Trigger17 = EnemyNear(var(55)),StateNo = [2050,2051]
;コンバット越前・デットリーレイプ
Trigger18= EnemyNear(var(55)),Name = "Combat Echizen"
Trigger18= EnemyNear(var(55)),StateNo = [3200,3201]
;ウィンドMCXX・最終審判
Trigger19= EnemyNear(var(55)),Name = "wind_MCXX"
Trigger19= EnemyNear(var(55)),StateNo = [7600,7651]
fvar(39) = 4

[State -3,]
type = VarAdd
triggerall = var(59) >= 1
trigger1 = fvar(39) >= 1
fvar(39) = -1

;==============================================================================
;その他警報類
[State -3,]
type = VarSet
triggerall = var(59) >= 1 && RoundState = 3
trigger1 = stateno = 195
fvar(38) = 1

;==============================================================================
;切り返し
[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 85412 
triggerall = var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Power >= 3000 
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType = A
triggerall = EnemyNear(var(55)),life > 200
triggerall = EnemyNear(var(55)),AnimTime <= -15
triggerall = EnemyNear(var(55)),AnimTime <= -30 ||(var(53) && Random <= 50)||(EnemyNear(var(55)),Pos Y < -80 && EnemyNear(var(55)),StateType = A)
triggerall = Random<=var(59)*25||var(59)>10
triggerall = (Enemynear(var(55)),Time >= 30-var(59)*2)||(!Time&&var(59)>9)||var(59)>10
triggerall = P2bodydist X = [-100,125]
triggerall = P2bodydist Y > -140
trigger1 = Enemynear(var(55)),Time >= 50 || var(59) > 10
trigger2 = (PrevStateNo = [120,159])||(prevstateno = [890,899])||(prevstateno = [5000,5270])

[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 9500
triggerall = var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl 
triggerall = Power >= 3000 
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType = A
triggerall = EnemyNear(var(55)),life > 200
triggerall = EnemyNear(var(55)),AnimTime <= -15
triggerall = EnemyNear(var(55)),AnimTime <= -30 ||(var(53) && Random <= 50)||(EnemyNear(var(55)),Pos Y < -80 && EnemyNear(var(55)),StateType = A)
triggerall = Random<=var(59)*25||var(59)>10
triggerall = (Enemynear(var(55)),Time >= 30-var(59)*2)||(!Time&&var(59)>9)||var(59)>10
triggerall = P2bodydist X = [-100,125]
triggerall = P2bodydist Y > -140
trigger1 = Enemynear(var(55)),Time >= 50 || var(59) > 10
trigger2 = (PrevStateNo = [120,159])||(prevstateno = [890,899])||(prevstateno = [5000,5270])

[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 19999
triggerall = var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl 
triggerall = Power >= 2000 
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType = A
triggerall = EnemyNear(var(55)),life > 200
triggerall = EnemyNear(var(55)),AnimTime <= -15
triggerall = EnemyNear(var(55)),AnimTime <= -30 ||(var(53) && Random <= 50)||(EnemyNear(var(55)),Pos Y < -80 && EnemyNear(var(55)),StateType = A)
triggerall = Random<=var(59)*25||var(59)>10
triggerall = (Enemynear(var(55)),Time >= 30-var(59)*2)||(!Time&&var(59)>9)||var(59)>10
triggerall = P2bodydist X = [-100,125]
triggerall = P2bodydist Y > -140
trigger1 = Enemynear(var(55)),Time >= 50 || var(59) > 10
trigger2 = (PrevStateNo = [120,159])||(prevstateno = [890,899])||(prevstateno = [5000,5270])

[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 7840
triggerall = var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl 
triggerall = Power >= 4000 
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType = A
triggerall = EnemyNear(var(55)),life > 200
triggerall = EnemyNear(var(55)),AnimTime <= -15
triggerall = EnemyNear(var(55)),AnimTime <= -30 ||(var(53) && Random <= 50)||(EnemyNear(var(55)),Pos Y < -80 && EnemyNear(var(55)),StateType = A)
triggerall = Random<=var(59)*25||var(59)>10
triggerall = (Enemynear(var(55)),Time >= 30-var(59)*2)||(!Time&&var(59)>9)||var(59)>10
triggerall = P2bodydist X = [-100,125]
triggerall = P2bodydist Y > -140
trigger1 = Enemynear(var(55)),Time >= 50 || var(59) > 10
trigger2 = (PrevStateNo = [120,159])||(prevstateno = [890,899])||(prevstateno = [5000,5270])


;----------------------------------------------------------------------------------
[State -3,ハイ・ラグナレク・エンブリオ]
type = ChangeState
value = 55450 
triggerall = var(59) >= 6 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = Power >= 2000 || (Power >= 2000 && life <= lifemax * 0.6)
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType = A
triggerall = EnemyNear(var(55)),life > 150
triggerall = EnemyNear(var(55)),AnimTime <= -23
triggerall = Random<=var(59)*20||var(59)>10
triggerall = (Enemynear(var(55)),Time >= 30-var(59)*2)||(!Time&&var(59)>9)||var(59)>10
trigger1 = Enemynear(var(55)),Time >= 50 || var(59) > 10
trigger2 = (PrevStateNo = [120,159])||(prevstateno = [890,899])||(prevstateno = [5000,5270])

;-----------------------------------------------------------------------------------------
[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 2001
triggerall = var(59) >= 3 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = Power >= 2000 || (Power >= 1000 && life <= lifemax * 0.6)
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType = A
triggerall = EnemyNear(var(55)),life > 120
triggerall = Random<=var(59)*20||var(59)>10
triggerall = Enemynear(var(55)),Time >= 30||(!Time&&var(59)>9)||var(59)>10
triggerall = ((P2bodydist X = [30,90])&&EnemyNear(var(55)),AnimTime<=-20)||((P2bodydist X = [91,130])&&EnemyNear(var(55)),AnimTime<=-23)
triggerall = P2bodydist Y > -100
trigger1 = Enemynear(var(55)),Time >= 50 || var(59) > 10
trigger2 = (PrevStateNo = [120,159])||(prevstateno = [890,899])||(prevstateno = [5000,5270])

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 20010
triggerall = var(59) >= 3 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = Power >= 2000 || (Power >= 1000 && life <= lifemax * 0.6)
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType = A
triggerall = EnemyNear(var(55)),life > 120
triggerall = Random<=var(59)*20||var(59)>10
triggerall = Enemynear(var(55)),Time >= 30||(!Time&&var(59)>9)||var(59)>10
triggerall = ((P2bodydist X = [30,90])&&EnemyNear(var(55)),AnimTime<=-20)||((P2bodydist X = [91,130])&&EnemyNear(var(55)),AnimTime<=-23)
triggerall = P2bodydist Y > -100
trigger1 = Enemynear(var(55)),Time >= 50 || var(59) > 10
trigger2 = (PrevStateNo = [120,159])||(prevstateno = [890,899])||(prevstateno = [5000,5270])

;---------------------------------------------------------------------------
;垂直ジャンプ(近距離投げ対策)
[State -3,ジャンプ]
Type = ChangeState
Value = 38
Triggerall = Var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype != H
triggerall = p2bodydist X < 80
triggerall = Random <= var(59)*50 || var(59)>9
trigger1 = EnemyNear(var(55)),HitDefAttr = SC, NT, ST, HT
trigger2 = fvar(39)=[3,4]

;---------------------------------------------------------------------------
; Roll forward
[State -3];避け
type = ChangeState
value = 890
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = var(59) >= 3 && RoundState = 2
triggerall = (var(59)<=10 && Random<=var(59)*20)||(var(59)>10 && Random<=333)
triggerall = !var(54)
triggerall = Enemynear(var(55)),animtime <= -28
triggerall = InGuardDist
trigger1 = Enemy,numproj
trigger1 = P2BodyDist X = [30,100]
trigger1 = Random <= 333
trigger2 = EnemyNear(var(55)),movetype = A
trigger2 = P2BodyDist X = [30,80]

;---------------------------------------------------------------------------
; Roll backwards
[State -3];後ろ避け
type = ChangeState
value = 895
triggerall = var(59) >= 1 && RoundState = 2
triggerall = Random <= var(59)*100
trigger1 = statetype != A
trigger1 = ctrl || (stateno = [18,19])
trigger1 = EnemyNear(var(55)),Movetype = A
trigger1 = EnemyNear(var(55)),statetype != L
trigger1 = !Enemy,numproj
trigger1 = P2BodyDist X = [40,100]
trigger1 = BackEdgeBodyDist > 50
trigger1 = Random <= 10

;==============================================================================
;隙突き用
;空中強キック
[State -3, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype = A && ctrl
triggerall = stateno != 105
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),stateno != [5000,5500]
triggerall = EnemyNear(var(55)),AnimTime = [-15,-6]
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = !Enemy,numproj
triggerall = P2BodyDist X = [-15,60+Floor(vel X * 6)]
triggerall = P2BodyDist Y = [-35,60]
trigger1 = vel Y > 0
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = (prevstateno = [140,155])||(prevstateno = [5000,5210])||(EnemyNear(var(55)),facing = facing)
trigger1 = Random <= 500

;近距離立ち弱キック
[State -3, Stand Light Kick]
type = ChangeState
value = 235
triggerall = var(59) >= 8 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*60
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),stateno != [5000,5500]
triggerall = EnemyNear(var(55)),AnimTime <= -3
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = !Enemy,numproj
triggerall = P2bodydist X < 20
trigger1 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||(EnemyNear(var(55)),facing = facing)
trigger1 = Random <= 500
trigger2 = (EnemyNear(var(55)),HitDefAttr = SC, NA)||(EnemyNear(var(55)),stateno = [200,699])
trigger2 = EnemyNear(var(55)),AnimTime > -6
trigger2 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||Random <= var(59)*20 ||var(59)>10

;近距離立ち強キック
[State -3, Standing Strong Kick]
type = ChangeState
value = 245
triggerall = var(59) >= 6 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*50
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),stateno != [5000,5500]
triggerall = EnemyNear(var(55)),AnimTime <= -5
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = !Enemy,numproj
triggerall = P2bodydist X <= 30
triggerall = P2bodydist Y > -60
trigger1 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||(EnemyNear(var(55)),facing = facing)
trigger1 = Random <= 500
trigger2 = (EnemyNear(var(55)),HitDefAttr = SC, NA)||(EnemyNear(var(55)),stateno = [200,699])
trigger2 = EnemyNear(var(55)),AnimTime > -8
trigger2 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||Random <= var(59)*20 ||var(59)>10

;しゃがみ弱パンチ
[State -3, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) >= 8 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*30
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),stateno != [5000,5500]
triggerall = EnemyNear(var(55)),AnimTime <= -4
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = !Enemy,numproj
triggerall = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 4) = [-5,50]
trigger1 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||(EnemyNear(var(55)),facing = facing)
trigger1 = Random <= 500
trigger2 = (EnemyNear(var(55)),HitDefAttr = SC, NA)||(EnemyNear(var(55)),stateno = [200,699])
trigger2 = EnemyNear(var(55)),AnimTime > -7
trigger2 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||Random <= var(59)*20 ||var(59)>10

;遠距離立ち弱キック
[State -3, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59) >= 8 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*30
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),stateno != [5000,5500]
triggerall = EnemyNear(var(55)),AnimTime <= -6
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = !Enemy,numproj
triggerall = P2bodydist X = [30,90]
trigger1 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||(EnemyNear(var(55)),facing = facing)
trigger1 = Random <= 500
trigger2 = (EnemyNear(var(55)),HitDefAttr = SC, NA)||(EnemyNear(var(55)),stateno = [200,699])
trigger2 = EnemyNear(var(55)),AnimTime > -9
trigger2 = (prevstateno = [140,155])||(prevstateno = [890,899])||(prevstateno = [5000,5210])||Random <= var(59)*20 ||var(59)>10

;==============================================================================
;ガード・受け身記述
;立ちガード
[State -3]
type = ChangeState
value = 130
triggerall = Var(59) >= 1 && RoundState = 2
triggerall = fvar(39) != 1
triggerall = inguarddist
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*115
trigger1 = EnemyNear(var(55)),StateType = A
trigger2 = EnemyNear(var(55)),StateType = S
trigger2 = EnemyNear(var(55)),Time >= 18
trigger2 = !Enemy,Numproj
trigger3 = fvar(39) = 2

;---------------------------------------------------------------------------
;しゃがみガード
[State -3]
type = ChangeState
value = 131
triggerall = Var(59) >= 1 && RoundState = 2
triggerall = fvar(39) != 2
triggerall = inguarddist
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*115
trigger1 = EnemyNear(var(55)),StateType = C
trigger2 = EnemyNear(var(55)),StateType = S
trigger2 = EnemyNear(var(55)),Time < 18
trigger2 = !Enemy,Numproj
trigger3 = EnemyNear(var(55)),StateType = S
trigger3 = Enemy,Numproj
trigger4 = fvar(39) = 1

;---------------------------------------------------------------------------
;空中ガード
[State -3]
type = ChangeState
value = 132
triggerall = Var(59) >= 1 && RoundState = 2
triggerall = statetype = A && ctrl
trigger1 = P2BodyDist X > 65
trigger1 = inguarddist
trigger1 = Random <= var(59)*100
trigger2 = P2BodyDist X <= 65
trigger2 = EnemyNear(var(55)),Movetype = A
trigger2 = Random <= var(59)*80

;---------------------------------------------------------------------------
;空中受身
[State -3,A_UKEMI]
type = ChangeState
value = 5210
triggerall = RoundState = 2
triggerall = Vel Y > -1
triggerall = Alive
triggerall = StateNo = 5050
triggerall = CanRecover
trigger1 = Var(59) = [1,10]
trigger1 = Random <= var(59)*80
trigger2 = Var(59) > 10
trigger2 = Random <= 850

;---------------------------------------------------------------------------
;バックステップ
[State -3, Back Step]
type = ChangeState
value = 105
triggerall = var(59) >= 1 && RoundState = 2
triggerall = !var(58)
triggerall = Random <= var(59)*100
triggerall = StateType != A
triggerall = ctrl || (stateno = [18,19])
triggerall = BackEdgeBodyDist > 60
trigger1 = EnemyNear(var(55)),StateType = L
trigger1 = P2BodyDist X < 50
trigger1 = Random <= 500

;------------------------------------------------------------------------------
;ジャンプ
[State -3,ジャンプ]
Type     = ChangeState
Value    = 39
triggerall = var(59) >= 1 && RoundState = 2
triggerall = StateType != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = BackEdgeBodyDist <= 60
trigger1 = EnemyNear(var(55)),StateType = L
trigger1 = P2BodyDist X < 50
trigger1 = Random <= var(59)*100

;==============================================================================
;起き攻め
[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 85412 
triggerall = var(59) >= 9 && RoundState = 2
triggerall = Power >= 3000
triggerall = ctrl ||(stateno = [18,19])|| stateno = 99
triggerall = EnemyNear(var(55)),StateType = L
triggerall = (var(59)<=10 &&Random <= var(59)*10)||(var(59)>10 && Random <= 200)
trigger1 = EnemyNear(var(55)),StateNo = [5100,5120]
trigger1 = P2BodyDist X = [-80,100]

[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 19999
triggerall = var(59) >= 9 && RoundState = 2
triggerall = Power >= 2000
triggerall = ctrl ||(stateno = [18,19])|| stateno = 99
triggerall = EnemyNear(var(55)),StateType = L
triggerall = (var(59)<=10 &&Random <= var(59)*10)||(var(59)>10 && Random <= 200)
trigger1 = EnemyNear(var(55)),StateNo = [5100,5120]
trigger1 = P2BodyDist X = [-80,100]

;------------------------------------------------------------------------------
;[State -3,クワトジャッチ]
type = ChangeState
value = 11004
triggerall = StateType != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = var(59) > 8 && RoundState = 2
triggerall = EnemyNear(var(55)),StateType = L
triggerall = (var(59)<=10 &&Random <= var(59)*15)||(var(59)>10 && Random <= 333)
trigger1 = EnemyNear(var(55)),StateNo = 5120
trigger1 = EnemyNear(var(55)),AnimTime = [-16,-13]
trigger1 = P2BodyDist X = [60,130]

;------------------------------------------------------------------------------
;挑発
[State -3, Taunt]
type = ChangeState
value = 195
triggerall = StateType != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = (var(59) = [1,9]) && RoundState = 2
triggerall = Random <= 50-(var(59)*3)
triggerall = life > lifemax * 0.5 || var(59) < 4
triggerall = EnemyNear(var(55)),StateType = L
triggerall = P2BodyDist X > 120 || var(59) < 4
triggerall = !var(54) || var(59) < 9
trigger1 = var(59) = [8,9] 
trigger1 = (life > lifemax * 0.9)||(life*0.3 > enemynear(var(55)),life)
trigger2 = var(59) = [4,7] 
trigger2 = (life > lifemax * 0.7)||(life*0.3 > enemynear(var(55)),life)
trigger3 = var(59) < 4

;---------------------------------------------------------------------------
;AI前進
[State -3,前進]
Type = ChangeState
Value = 18
Triggerall = Var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(55)),StateType = A || EnemyNear(var(55)),StateType = L
triggerall = enemynear(var(55)),movetype = H
triggerall = EnemyNear(var(55)),stateno != [5110,5120]
triggerall = ctrl || (stateno = 19 && time >= 16)
Trigger1 = var(59) < 7 ||(!var(54) && var(59) < 11)
trigger1 = p2bodydist X > 60
Trigger2 = var(59) >= 11 || (var(54) && var(59) >= 7)
trigger2 = p2bodydist X > 95

;---------------------------------------------------------------------------
;AI後退
[State -3,後退]
Type = ChangeState
Value = 19
Triggerall = Var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(55)),StateType = L
triggerall = enemynear(var(55)),movetype = H
triggerall = ctrl ||((stateno = 18 || stateno = 20)&& time >= 12)
Trigger1 = var(59) < 7 ||(!var(54) && var(59) < 11)
trigger1 = p2bodydist X < 70
Trigger2 = var(59) >= 11 || (var(54) && var(59) >= 7)
trigger2 = p2bodydist X < 105

;==============================================================================
;タッグ記述
;お前らまとめてふっ飛ばすわ
[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 85412 
triggerall = statetype != A
triggerall = ctrl 
triggerall = var(59) >= 8 && RoundState = 2
triggerall = Power >= 3000
triggerall = TeamMode = Simul
triggerall = NumPartner && Partner,Alive
triggerall = Random <= var(59)*15||var(59)>10
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Life > 100
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = P2BodyDist X = [-100,120]
triggerall = P2BodyDist Y > -120
trigger1 = Partner,MoveType = H
trigger1 = (Partner,StateNo = [120,159])||(Partner,StateNo = [5000,5099])||(EnemyNear(var(55)),facing = facing)
trigger1 = EnemyNear(var(55)),Movetype = A
trigger1 = EnemyNear(var(55)),AnimTime <= -15
trigger2 = var(53) = 5
trigger2 = (Partner,StateNo = [120,159])||(Partner,StateNo = [5000,5099])

;お前らまとめてふっ飛ばすわ
[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 19999
triggerall = statetype != A
triggerall = ctrl 
triggerall = var(59) >= 8 && RoundState = 2
triggerall = Power >= 2000 
triggerall = TeamMode = Simul
triggerall = NumPartner && Partner,Alive
triggerall = Random <= var(59)*15||var(59)>10
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Life > 100
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = P2BodyDist X = [-100,120]
triggerall = P2BodyDist Y > -120
trigger1 = Partner,MoveType = H
trigger1 = (Partner,StateNo = [120,159])||(Partner,StateNo = [5000,5099])||(EnemyNear(var(55)),facing = facing)
trigger1 = EnemyNear(var(55)),Movetype = A
trigger1 = EnemyNear(var(55)),AnimTime <= -15
trigger2 = var(53) = 5
trigger2 = (Partner,StateNo = [120,159])||(Partner,StateNo = [5000,5099])

;お仕置きの時間だ
[State -3,ハイ・ラグナレク・エンブリオ]
type = ChangeState
value = 55450 
triggerall = Power >= 2000 || (Power >= 2000 && life <= lifemax * 0.6)
triggerall = statetype != A
triggerall = ctrl 
triggerall = var(59) >= 8 && RoundState = 2
triggerall = TeamMode = Simul
triggerall = NumPartner && Partner,Alive
triggerall = Random <= var(59)*15||var(59)>10
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = A
triggerall = EnemyNear(var(55)),Life > 100
triggerall = !EnemyNear(var(55)),Ctrl
trigger1 = Partner,MoveType = H
trigger1 = (Partner,StateNo = [120,159])||(Partner,StateNo = [5000,5099])||(EnemyNear(var(55)),facing = facing)
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = EnemyNear(var(55)),AnimTime <= -15
trigger2 = Partner,MoveType = A
trigger2 = EnemyNear(var(55)),StateNo = [5000,5019]
trigger2 = EnemyNear(var(55)),StateType != A && EnemyNear(var(55)),GetHitVar(hittime) <= -23
trigger3 = Partner,MoveType = A
trigger3 = EnemyNear(var(55)),StateNo = [5000,5029]
trigger3 = EnemyNear(var(55)),StateType = A && EnemyNear(var(55)),GetHitVar(fall.RecoverTime)<=-23
trigger3 = EnemyNear(var(55)),Pos Y < -60
trigger4 = var(53) = 5
trigger4 = (Partner,StateNo = [120,159])||(Partner,StateNo = [5000,5099])

;---------------------------------------------------------------------------
;抱きつくぞゴルァ！(違
[State -3,クワトジャッチ]
type = ChangeState
value = ifelse((var(59) > 9 && inguarddist),11004,1004)
triggerall = var(59) >= 4 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl ||(stateno = [18,19])|| stateno = 99
triggerall = TeamMode = Simul
triggerall = NumPartner && Partner,Alive
triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),movetype != H
triggerall = !EnemyNear(var(55)),Ctrl
triggerall = !Enemy,numproj
triggerall = P2BodyDist X = [60,110]
triggerall = P2BodyDist Y > -60
triggerall = Random <= var(59)*20
trigger1 = Partner,MoveType = H
trigger1 = (Partner,StateNo = [120,159]) || (Partner,StateNo = [5000,5099])
trigger2 = EnemyNear(var(55)),facing = facing
trigger2 = EnemyNear(var(55)),AnimTime <= -12

;---------------------------------------------------------------------------
;相方ごと吹っ飛ばす勢いで！（ﾏﾃ
[State -3,ディアンサス]
type = ChangeState
value = 1055
triggerall = var(59) >= 6 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl ||(stateno = [18,19])|| stateno = 99
triggerall = TeamMode = Simul
triggerall = NumPartner && Partner,Alive
triggerall = EnemyNear(var(55)),StateType != L
triggerall = !Enemy,numproj
triggerall = P2BodyDist X = [50,180]
triggerall = P2BodyDist Y > -120
triggerall = Random <= var(59)*15
trigger1 = (Partner,StateNo = [120,159]) || (Partner,StateNo = [5000,5099])
trigger2 = Partner,MoveType = A
trigger2 = EnemyNear(var(55)),StateType != A
trigger2 = EnemyNear(var(55)),MoveType = H
trigger2 = EnemyNear(var(55)),StateNo = [120,159]

;==============================================================================
;ブロ・アーマー対策
[State -3,クワトジャッチ]
type = ChangeState
value = ifelse(var(59)>10||(var(59)>9&&Random <=250),11004,11005)
triggerall = var(59) >= 8 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = P2bodydist X < 60
triggerall = P2bodydist Y > -65
triggerall = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 440
trigger1 = EnemyNear(var(55)),StateNo != [120,159]
trigger1 = EnemyNear(var(55)),StateNo != [5000,5099]
trigger1 = movecontact
trigger1 = (Random <= var(59)*20 && var(59)<=10)||(Random <= 333 && var(59)>10)||(Random <= 500&&var(59)>10&&InGuardDist)

;==============================================================================
;コンビネーション
;近距離立ち強キック
[State -3, Stand Light Punch]
type = ChangeState
value = 245
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl ||(stateno = [18,19])|| stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
triggerall = P2bodydist X < 30
trigger1 = var(58) = 4

;------------------------------------------------------------------------------
;遠距離立ち弱パンチ
[State -3, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
triggerall = P2bodydist x = [20,40]
trigger1 = stateno = 200 && movecontact
trigger1 = time > 6
trigger2 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger2 = var(58) = 4

;------------------------------------------------------------------------------
;遠距離立ち弱キック
[State -3, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
triggerall = P2bodydist x = [20,80]
trigger1 = (stateno = 200) && time > 7
trigger2 = (stateno = 230) && time > 9

;------------------------------------------------------------------------------
;立ち強パンチ
[State -3, Stand Strong Punch]
type = ChangeState
value = ifelse(P2bodydist x >= 30,210,215)
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
triggerall = movecontact
triggerall = P2bodydist x < 100
trigger1 = (stateno = 200) && time > 5
trigger2 = (stateno = 230) && time > 6

;------------------------------------------------------------------------------
;しゃがみ弱パンチ
[State -3, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl ||(stateno = [18,19])|| stateno = 99
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
triggerall = P2BodyDist X < 45
trigger1 = Random <= var(59)*100
trigger1 = var(58) = 4
trigger2 = Random <= 333
trigger2 = var(58) = 5

;------------------------------------------------------------------------------
;しゃがみ強キック
[State -3, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
triggerall = P2BodyDist X = [35,80]
trigger1 = stateno = 400 || stateno = 430
trigger1 = moveguarded && time > 5

;------------------------------------------------------------------------------
[State -3,特殊技]
type = ChangeState
value = 260
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
triggerall = (EnemyNear(var(55)),StateType = S && P2BodyDist X < 72)||(P2BodyDist X < 60)
triggerall = movecontact
trigger1 = (stateno = [210,215])||stateno = 235||(stateno = [240,245])||stateno = 410
trigger2 = P2BodyDist X > 45 && stateno = 230
trigger3 = P2BodyDist X >= 28
trigger3 = stateno = 400 || stateno = 430
trigger3 = movehit

;------------------------------------------------------------------------------
;ジャンプキャンセル
[State -3, Jump Cancel]
type = ChangeState
value = ifelse(Random<=250&&BackEdgeBodyDist >60,37,39)
triggerall = var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(55)),StateType != L
trigger1 = stateno = 440 && moveguarded
trigger1 = Random <= var(59)*5

;------------------------------------------------------------------------------
;ダッシュ
[State -3, dash]
type = ChangeState
value = 99
triggerall = var(59) >= 8 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19])
triggerall = !inguarddist
triggerall = !Enemy,NumProj
triggerall = EnemyNear(var(55)),StateType != L
trigger1 = P2bodydist X > 60
trigger1 = var(58) = 2 || var(58) = 6

;------------------------------------------------------------------------------
[State -3,ボムズディストラクション・弱]
type = ChangeState
value = 1000
triggerall = var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = Power >= 3000 && life <= 500
trigger1 = EnemyNear(var(55)),life > 300 || var(53)
trigger1 = P2bodydist X < 70
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit

;==============================================================================
;連続技・超必用
[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 85412 
triggerall = var(59) >= 7 && RoundState = 2
triggerall = Power >= 3000
triggerall = ctrl
triggerall = EnemyNear(var(55)),Alive
trigger1 = var(58) = 3
trigger1 = FrontEdgeBodyDist < 130
trigger1 = EnemyNear(var(55)),StateNo = [821,822]
trigger2 = var(58) = 1
trigger2 = EnemyNear(var(55)),StateType = L || EnemyNear(var(55)),StateType = A
trigger2 = EnemyNear(var(55)),life > 150 || var(53)

[State -3,ダークラグラレクエンプリオ]
type = ChangeState
value = 19999
triggerall = var(59) >= 7 && RoundState = 2
triggerall = Power >= 2000
triggerall = ctrl 
triggerall = EnemyNear(var(55)),Alive
trigger1 = var(58) = 3
trigger1 = FrontEdgeBodyDist < 130
trigger1 = EnemyNear(var(55)),StateNo = [821,822]
trigger2 = var(58) = 1
trigger2 = EnemyNear(var(55)),StateType = L || EnemyNear(var(55)),StateType = A
trigger2 = EnemyNear(var(55)),life > 150 || var(53)

[State -3,ダブル・ラグナレク・エンプリオ]
type = ChangeState
value = 8001
triggerall = var(59) >= 8 && RoundState = 2
triggerall = !fvar(34)
triggerall = Random <= var(59)*100
triggerall = Power >= 3000 ||(Power >= 2000 && life <= lifemax * 0.5)
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2BodyDist X+Floor(EnemyNear(var(55)),vel X * 10) < 60
trigger1 = EnemyNear(var(55)),life > 200
trigger1 = !var(53) ||((EnemyNear(var(55)),StateNo = [5000,5099])&&(EnemyNear(numenemy>=2),StateNo = [5000,5099]))
trigger1 = stateno = 260 && movehit

;----------------------------------------------------------------------------------
[State -3,ハイ・ラグナレク・エンブリオ]
type = ChangeState
value = 55450 
triggerall = var(59) >= 6 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 2000 ||(Power >= 2000 && life <= lifemax * 0.6)
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = var(53) || var(59) < 9
trigger1 = stateno = 260 && movehit
trigger1 = movehit
trigger2 = (stateno = [210,215])||(stateno = [240,245])||stateno = 410
trigger2 = movehit
trigger2 = var(53)
trigger2 = var(53) = 5 || EnemyNear(numenemy>=2),Movetype = A || InGuardDist

;-----------------------------------------------------------------------------------------
[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 2001
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 1000
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = EnemyNear(var(55)),BackEdgeBodyDist > 70
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = EnemyNear(var(55)),life <= 150 ||(Power >= 2000 &&(var(57)=1||var(59)<9))|| Power >= 3000
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 20010
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 2000
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = EnemyNear(var(55)),BackEdgeBodyDist > 70
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = EnemyNear(var(55)),life <= 150 ||(Power >= 2000 &&(var(57)=1||var(59)<9))|| Power >= 3000
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 79840
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 1000
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = EnemyNear(var(55)),BackEdgeBodyDist > 70
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = EnemyNear(var(55)),life <= 150 ||(Power >= 2000 &&(var(57)=1||var(59)<9))|| Power >= 3000
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit

;------------------------------------------------------------------------------
[State -3,クワトジャッチ]
type = ChangeState
value = 1004
triggerall = var(59) >= 8 && RoundState = 2
triggerall = !var(56)
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = EnemyNear(var(55)),facing != facing
trigger1 = EnemyNear(var(55)),BackEdgeBodyDist <= 20
trigger1 = P2bodydist X < 100
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit

;------------------------------------------------------------------------------
[State -3,ボムズディストラクション・弱]
type = ChangeState
value = 1000
triggerall = var(59) >= 9 && RoundState = 2
triggerall = !var(57)
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit

;----------------------------------------------------------------------------------
[State -3,ハイ・ラグナレク・エンブリオ]
type = ChangeState
value = 55450 
triggerall = var(59) >= 6 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 2000 || (Power >= 2000 && life <= lifemax * 0.6)
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = EnemyNear(var(55)),life > 180
trigger1 = stateno = 260 && movehit
trigger2 = EnemyNear(var(55)),life < 96
trigger2 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger2 = moveguarded
trigger3 = var(58) = 2
trigger3 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger3 = EnemyNear(var(55)),life > 100
trigger3 = EnemyNear(var(55)),StateNo = [5000,5099]

;-----------------------------------------------------------------------------------------
[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 2001
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 1000
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = EnemyNear(var(55)),BackEdgeBodyDist > 30
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = EnemyNear(var(55)),life <= 150 ||(Power >= 2000 && var(57)=1)|| Power >= 3000
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit
trigger2 = var(58) = 2
trigger2 = Power >= 2000 || EnemyNear(var(55)),life < 60
trigger2 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger2 = EnemyNear(var(55)),StateNo = [5000,5099]
trigger3 = var(58) = 3
trigger3 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger3 = EnemyNear(var(55)),StateNo = [821,822]
trigger3 = EnemyNear(var(55)),Alive

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 20010
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 2000
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = EnemyNear(var(55)),BackEdgeBodyDist > 30
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = EnemyNear(var(55)),life <= 150 ||(Power >= 2000 && var(57)=1)|| Power >= 3000
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit
trigger2 = var(58) = 2
trigger2 = Power >= 2000 || EnemyNear(var(55)),life < 60
trigger2 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger2 = EnemyNear(var(55)),StateNo = [5000,5099]
trigger3 = var(58) = 3
trigger3 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger3 = EnemyNear(var(55)),StateNo = [821,822]
trigger3 = EnemyNear(var(55)),Alive

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 79840
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = Power >= 1000
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = EnemyNear(var(55)),BackEdgeBodyDist > 30
trigger1 = EnemyNear(var(55)),StateType != A
trigger1 = EnemyNear(var(55)),life <= 150 ||(Power >= 2000 && var(57)=1)|| Power >= 3000
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit
trigger2 = var(58) = 2
trigger2 = Power >= 2000 || EnemyNear(var(55)),life < 60
trigger2 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger2 = EnemyNear(var(55)),StateNo = [5000,5099]
trigger3 = var(58) = 3
trigger3 = ctrl ||(stateno = [18,19])|| stateno = 99
trigger3 = EnemyNear(var(55)),StateNo = [821,822]
trigger3 = EnemyNear(var(55)),Alive

;==============================================================================
;連続技・必殺技用
[State -3,ボムズディストラクション・強]
type = ChangeState
value = 1050
triggerall = (var(59) = [1,5]) && RoundState = 2
triggerall = statetype != A
triggerall = Random <= 400-var(59)*30
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = stateno = [200,440]
trigger1 = movecontact

;------------------------------------------------------------------------------
[State -3,ボムズディストラクション・弱]
type = ChangeState
value = 1000
triggerall = var(59) >= 6 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X < 70
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = (var(59)<8 && moveguarded && Random <= 200) || movehit

;------------------------------------------------------------------------------
[State -3,クワトジャッチ]
type = ChangeState
value = 1004
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2bodydist X < 98
trigger1 = P2bodydist Y > -65
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 440
trigger1 = (var(59)<9 && movehit)||(var(59)>=9 && movecontact)
trigger2 = EnemyNear(var(55)),StateType = A
trigger2 = (stateno = [200,205])||(stateno = [230,235])
trigger2 = movehit
trigger3 = (var(58) = 1&&(!var(57)||(var(57)&&!var(53))))||var(58) = 7
trigger3 = ctrl || (stateno = [18,19]) || stateno = 99
trigger3 = EnemyNear(var(55)),StateType = A
trigger3 = P2bodydist Y > -70 || var(58) = 7
trigger4 = var(59) > 9 && P2bodydist X > 40
trigger4 = stateno = 400 && moveguarded
trigger5 = EnemyNear(var(55)),StateNo != [120,159]
trigger5 = EnemyNear(var(55)),GetHitVar(fall.RecoverTime)<=-12
trigger5 = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 9) = [0,65]
trigger5 = P2bodydist Y-Floor(EnemyNear(var(55)),vel Y * 9) > -75
trigger5 = var(58) = 2

;------------------------------------------------------------------------------
[State -3,ベイリーギル・弱]
type = ChangeState
value = 1919
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = A
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = var(59) < 10
trigger1 = P2bodydist X = [10,100]
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 260||stateno = 410
trigger1 = movehit
trigger2 = (var(59) < 9 && var(58) = 1)|| (var(58) = 2 && P2bodydist Y < -40)
trigger2 = ctrl || (stateno = [18,19]) || stateno = 99
trigger2 = EnemyNear(var(55)),StateType = A
trigger2 = P2bodydist X < 150
trigger2 = P2bodydist Y > -90

;------------------------------------------------------------------------------
[State -3,ディアンサス]
type = ChangeState
value = 1055
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2bodydist Y > -125
trigger1 = P2bodydist X = [30,180]
trigger1 = EnemyNear(var(55)),StateType = A || var(59)<8
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 410
trigger1 = movehit || (moveguarded && Random <= 200)
trigger2 = P2bodydist X = [30,180]
trigger2 = stateno = 210 || stateno = 240 || stateno = 260 || stateno = 430
trigger2 = moveguarded && Random <= 200
trigger3 = stateno = 210 || stateno = 260
trigger3 = movehit
trigger3 = P2bodydist X > 40
trigger4 = (var(59) < 9 && var(58) = 1)||(var(57) && var(53))||(var(58) = 2)||(var(58) = 6)
trigger4 = ctrl || (stateno = [18,19]) || stateno = 99
trigger4 = EnemyNear(var(55)),StateType = A
trigger4 = EnemyNear(var(55)),Vel Y > 0
trigger4 = P2bodydist X = [50,125]
trigger4 = P2bodydist Y < -30

[State -3,ディアンサス]
type = ChangeState
value = 7989
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2bodydist Y > -125
trigger1 = P2bodydist X = [30,180]
trigger1 = EnemyNear(var(55)),StateType = A || var(59)<8
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 410
trigger1 = movehit || (moveguarded && Random <= 200)
trigger2 = P2bodydist X = [30,180]
trigger2 = stateno = 210 || stateno = 240 || stateno = 260 || stateno = 430
trigger2 = moveguarded && Random <= 200
trigger3 = stateno = 210 || stateno = 260
trigger3 = movehit
trigger3 = P2bodydist X > 10
trigger4 = (var(59) < 9 && var(58) = 1)||(var(57) && var(53))||(var(58) = 2)||(var(58) = 6)
trigger4 = ctrl || (stateno = [18,19]) || stateno = 99
trigger4 = EnemyNear(var(55)),StateType = A
trigger4 = EnemyNear(var(55)),Vel Y > 0
trigger4 = P2bodydist X = [10,50]
trigger4 = P2bodydist Y < -30

[State -3,ディアンサス]
type = ChangeState
value = 67870
triggerall = var(59) >= 1 && RoundState = 2
triggerall = Power >= 2000
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2bodydist Y > -125
trigger1 = P2bodydist X = [30,180]
trigger1 = EnemyNear(var(55)),StateType = A || var(59)<8
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 410
trigger1 = movehit || (moveguarded && Random <= 200)
trigger2 = P2bodydist X = [30,180]
trigger2 = stateno = 210 || stateno = 240 || stateno = 260 || stateno = 430
trigger2 = moveguarded && Random <= 200
trigger3 = stateno = 210 || stateno = 260
trigger3 = movehit
trigger3 = P2bodydist X > 10
trigger4 = (var(59) < 9 && var(58) = 1)||(var(57) && var(53))||(var(58) = 2)||(var(58) = 6)
trigger4 = ctrl || (stateno = [18,19]) || stateno = 99
trigger4 = EnemyNear(var(55)),StateType = A
trigger4 = EnemyNear(var(55)),Vel Y > 0
trigger4 = P2bodydist X = [10,50]
trigger4 = P2bodydist Y < -30

[State -3,ディアンサス]
type = ChangeState
value = 1720
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2bodydist Y > -125
trigger1 = P2bodydist X = [30,180]
trigger1 = EnemyNear(var(55)),StateType = A || var(59)<8
trigger1 = (stateno = [210,215])||(stateno = [240,245])||stateno = 410
trigger1 = movehit || (moveguarded && Random <= 200)
trigger2 = P2bodydist X = [30,180]
trigger2 = stateno = 210 || stateno = 240 || stateno = 260 || stateno = 430
trigger2 = moveguarded && Random <= 200
trigger3 = stateno = 210 || stateno = 260
trigger3 = movehit
trigger3 = P2bodydist X > 20
trigger4 = (var(59) < 9 && var(58) = 1)||(var(57) && var(53))||(var(58) = 2)||(var(58) = 6)
trigger4 = ctrl || (stateno = [18,19]) || stateno = 99
trigger4 = EnemyNear(var(55)),StateType = A
trigger4 = EnemyNear(var(55)),Vel Y > 0
trigger4 = P2bodydist X = [20,80]
trigger4 = P2bodydist Y < -30


;==============================================================================
;地上繋ぎ
;しゃがみ弱攻撃
[State -3, Crouching Light Kick]
type = ChangeState
value = ifelse(var(59) >8,400,430)
triggerall = var(59) >= 1 && RoundState = 2
triggerall = !var(58)
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = !InGuardDist
trigger1 = EnemyNear(var(55)),StateNo = [120,159]
trigger1 = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 5) = [-5,51]

;------------------------------------------------------------------------------
;近距離立ち強キック
[State -3, Standing Strong Kick]
type = ChangeState
value = 245
triggerall = var(59) >= 1 && RoundState = 2
Triggerall = var(14) = 0
triggerall = var(20) = 0
Triggerall = var(26) = 0
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
triggerall = P2bodydist X < 30
triggerall = !InGuardDist
trigger1 = !var(58)
trigger1 = P2bodydist Y > -50

;------------------------------------------------------------------------------
;しゃがみ弱パンチ
[State -3, Crouching Light Kick]
type = ChangeState
value = 400
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType = H
trigger1 = EnemyNear(var(55)),StateNo != [120,159]
trigger1 = P2BodyDist X = [-3,50+Floor(EnemyNear(var(55)),vel X * 5)]
trigger1 = !InGuardDist

;------------------------------------------------------------------------------
;遠距離立ち弱キック
[State -3, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59) >= 1 && RoundState = 2
triggerall = !var(58)
Triggerall = var(14) = 0
triggerall = var(20) = 0
Triggerall = var(26) = 0
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateNo != [120,159]
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),Movetype = H
trigger1 = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 8) = [20,88]
trigger1 = P2bodydist Y > -30
trigger1 = !InGuardDist

;==============================================================================
;立ち回り
;ダッシュ
[State -3, dash]
type = ChangeState
value = 99
triggerall = (var(59) = [1,10]) && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19])
triggerall = !inguarddist
triggerall = !Enemy,NumProj
trigger1 = P2BodyDist X > 140
trigger1 = EnemyNear(var(55)),StateType = L
trigger1 = EnemyNear(var(55)),StateNo != [5110,5120]
trigger1 = Random <= 100
trigger2 = P2BodyDist X > 180 && Random <= 50
trigger2 = EnemyNear(var(55)),StateType != L
trigger2 = EnemyNear(var(55)),MoveType != A

;------------------------------------------------------------------------------
;挑発
[State -3, Taunt]
type = ChangeState
value = 195
triggerall = StateType != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = (var(59) = [1,9]) && RoundState = 2
triggerall = life > lifemax * 0.5 || var(59) < 4
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType != A
triggerall = !Enemy,NumProj
triggerall = !inguarddist
triggerall = Random <= 50-(var(59)*5)
triggerall = P2BodyDist X > 180 || var(59) < 4
triggerall = !var(54) || var(59) < 9
trigger1 = var(59) = [8,9] 
trigger1 = (life > lifemax * 0.9) || (life*0.3 > enemynear(var(55)),life)
trigger2 = var(59) = [4,7] 
trigger2 = (life > lifemax * 0.7) || (life*0.3 > enemynear(var(55)),life)
trigger3 = var(59) < 4 && P2BodyDist X > 130

;---------------------------------------------------------------------------
;AI前進
[State -3,前進]
Type = ChangeState
Value = 18
Triggerall = Var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(55)),stateno != [5110,5120]
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = Random <= 50
trigger1 = ctrl ||(stateno = 19 && time >= 16)
trigger1 = var(59) < 9
trigger1 = p2bodydist X > 65
trigger2 = ctrl ||(stateno = 19 && time >= 16)|| stateno = 99
trigger2 = var(59) >= 9
trigger2 = p2bodydist X > 95

;---------------------------------------------------------------------------
;AI後退
[State -3,後退]
Type = ChangeState
Value = 19
Triggerall = Var(59) >= 1 && RoundState = 2
triggerall = !var(58)
triggerall = statetype != A
triggerall = ctrl ||(stateno = 18 && time >= 16)
triggerall = EnemyNear(var(55)),StateType != L
triggerall = BackEdgeBodyDist > 20
trigger1 = EnemyNear(var(55)),MoveType != H
trigger1 = var(59) < 9
trigger1 = p2bodydist X < 70
trigger1 = Random <= 25
trigger2 = EnemyNear(var(55)),MoveType != H
trigger2 = var(59) >= 9
trigger2 = p2bodydist X < 100
trigger2 = Random <= 25
trigger3 = p2bodydist X < 20
trigger3 = EnemyNear(var(55)),StateType = A
trigger3 = EnemyNear(var(55)),MoveType = H
trigger3 = Random <= 50

;---------------------------------------------------------------------------
;行動思案中・・・
[State -3, wait]
type = ChangeState
Value = 0
ctrl = 1
triggerall = statetype != A
triggerall = alive
triggerall = stateno = [18,20]
Trigger1 = Var(59) >= 1 && RoundState = 2
trigger1 = Random <= 30
trigger2 = Roundstate = 3

;------------------------------------------------------------------------------
;バックステップ
[State -3, Back Step]
type = ChangeState
value = 105
triggerall = var(59) >= 1 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19])
triggerall = EnemyNear(var(55)),stateno != [5000,5999]
triggerall = !Enemy,numproj
triggerall = BackEdgeBodyDist > 60
trigger1 = EnemyNear(var(55)),MoveType = A
trigger1 = P2BodyDist X = [30,90]
trigger1 = Random <= 120
trigger2 = EnemyNear(var(55)),HitDefAttr = SC, NT, ST, HT
trigger2 = P2BodyDist X = [-5,60]
trigger2 = Random <= 150 || (var(59) > 10)

;------------------------------------------------------------------------------
;ジャンプ(低レベル時)
[State -3,ジャンプ]
Type     = ChangeState
Value    = 39
Triggerall = (var(59) = [1,3]) && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
trigger1 = Random <= 50

;------------------------------------------------------------------------------
;前ジャンプ
[State -3,ジャンプ]
Type     = ChangeState
Value    = 39
Triggerall = Var(59) > 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = EnemyNear(var(55)),alive
triggerall = !inguarddist
trigger1 = (var(59)<10&&Random<=20) || ((var(59)=[10,11])&&Random<=12) || (fvar(39) = [3,4])
trigger1 = P2BodyDist X = [100,160]
trigger2 = (var(59)<10&&Random<=30) || ((var(59)=[10,11])&&Random<=15) || (fvar(39) = [3,4])
trigger2 = P2BodyDist X <= 100
trigger3 = EnemyNear(var(55)),MoveType = A || Enemy,numproj
trigger3 = Random <= 150
trigger3 = P2BodyDist X = [160,220]
trigger4 = (var(59)<10 && Random <= 20)||((var(59)=[10,11])&& Random <= 10)
trigger4 = P2BodyDist X = [160,220]

;------------------------------------------------------------------------------
;後方ジャンプ
[State -3,ジャンプ]
Type     = ChangeState
Value    = 37
Triggerall = Var(59) > 3 && RoundState = 2
Triggerall = Var(59) < 11
triggerall = Random <= var(59)*100
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19])
triggerall = !inguarddist
triggerall = EnemyNear(var(55)),alive
triggerall = EnemyNear(var(55)),stateno != [5000,5999]
triggerall = P2BodyDist X = [80,140]
trigger1 = EnemyNear(var(55)),StateType = A
trigger1 = EnemyNear(var(55)),vel  Y > 0
trigger1 = Random <= 40

;==============================================================================
;地上技振り・ぶっぱ
[State -3,ハイ・ラグナレク・エンブリオ]
type = ChangeState
value = 55450 
triggerall = var(59) >= 7 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = Power >= 2000 || (Power >= 2000 && life <= lifemax * 0.6)
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
trigger1 = var(59) <= 8 && Random <= 25
trigger2 = EnemyNear(var(55)),life < 90 ||(Power >= 3000 && var(53))||Power >= 3000
trigger2 = var(59) > 8 && Random <= 75

;-----------------------------------------------------------------------------------------
[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 2001
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Power >= 1000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
trigger1 = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 10) = [60,185]
trigger1 = var(59) < 9
trigger1 = Random <= 30-var(59)*2

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 20010
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Power >= 2000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
trigger1 = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 10) = [60,185]
trigger1 = var(59) < 9
trigger1 = Random <= 30-var(59)*2

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 79840
triggerall = var(59) >= 3 && RoundState = 2
triggerall = Power >= 1000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
trigger1 = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 10) = [60,185]
trigger1 = var(59) < 9
trigger1 = Random <= 30-var(59)*2


;------------------------------------------------------------------------------
[State -3,クワトジャッチ]
type = ChangeState
value = ifelse((var(59)>10||(var(59)>9&&P2bodydist X < -3)||Random <=150), 11004, 11005)
triggerall = var(59) >= 8 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = P2bodydist X < 170
trigger1 = var(59)<10 && Random <= 20
trigger2 =(var(59)=[10,11])&&Random <= 50
trigger3 = var(59)>11 && Random <= 150
trigger4 = var(59)>8 && var(53) = 5
trigger4 = Random <= 150

;------------------------------------------------------------------------------
[State -3,ボムズディストラクション・強]
type = ChangeState
value = 1050
triggerall = (var(59) = [1,7]) && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = P2bodydist X = [40,95]
trigger1 = Random <= 60-var(59)*5

;------------------------------------------------------------------------------
[State -3,ボムズディストラクション・弱]
type = ChangeState
value = 1000
triggerall = var(59) > 7 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || (var(59)<9 && EnemyNear(var(55)),Ctrl)
trigger1 = P2bodydist X = [40,95]
trigger1 = var(59) < 9 && Random <= var(59)*2
trigger2 = P2bodydist X = [60,95]
trigger2 = var(59) >= 9 && Random <= 50

;------------------------------------------------------------------------------
[State -3,ディアンサス]
type = ChangeState
value = 1055
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 10) = [100,180]
triggerall = P2bodydist Y > -120
trigger1 = var(59) = [1,8]
trigger1 = Random <= var(59)*3
trigger2 = P2bodydist X > 100
trigger2 = ((var(59)=[8,10])&&Random <= 50)||(var(59)>10 && Random <= 90)

[State -3,ディアンサス]
type = ChangeState
value = 7989
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 10) = [10,30]
triggerall = P2bodydist Y > -120
trigger1 = var(59) = [1,8]
trigger1 = Random <= var(59)*3
trigger2 = P2bodydist X > 10
trigger2 = ((var(59)=[8,10])&&Random <= 50)||(var(59)>10 && Random <= 90)

[State -3,ディアンサス]
type = ChangeState
value = 67870
triggerall = var(59) >= 1 && RoundState = 2
triggerall = Power >= 2000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 10) = [10,30]
triggerall = P2bodydist Y > -120
trigger1 = var(59) = [1,8]
trigger1 = Random <= var(59)*3
trigger2 = P2bodydist X > 10
trigger2 = ((var(59)=[8,10])&&Random <= 50)||(var(59)>10 && Random <= 90)

[State -3,ディアンサス]
type = ChangeState
value = 1720
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = P2bodydist X+Floor(EnemyNear(var(55)),vel X * 10) = [20,80]
triggerall = P2bodydist Y > -120
trigger1 = var(59) = [1,8]
trigger1 = Random <= var(59)*3
trigger2 = P2bodydist X > 20
trigger2 = ((var(59)=[8,10])&&Random <= 50)||(var(59)>10 && Random <= 90)

;==============================================================================
;地上技振り・投げ対策
[State -3,クワトジャッチ]
type = ChangeState
value = ifelse(var(59)>10||(var(59)>9&&(P2bodydist X < -3||Random <=150)), 11004, 11005)
triggerall = statetype != A && RoundState = 2
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
Triggerall = EnemyNear(var(55)),MoveType != H
Triggerall = EnemyNear(var(55)),MoveType=A || EnemyNear(var(55)),Ctrl
triggerall = ((var(59) = [5,10]) && Random <= var(59)*10)||((var(59) > 10) && Random <= 300)
triggerall = P2bodydist X < 120
trigger1 = var(59) < 9
trigger1 = EnemyNear(var(55)),Time > 30
trigger2 = var(59) >= 9
trigger2 = EnemyNear(var(55)),Time > 15

;==============================================================================
;地上技振り・投げ
;投げ
[State -3, Kung Fu Throw]
type = ChangeState
value=ifelse(BackEdgeBodyDist > 30,800,830)
Triggerall = Var(59) > 0 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19])
triggerall = stateno != [99,100]
triggerall = (EnemyNear(var(55)),StateType = S)||(EnemyNear(var(55)),StateType = C)
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2bodydist X = (-5,5)
trigger1 = var(59) < 10
trigger1 = Random <= var(59)*7
trigger2 = var(59) >= 10
trigger2 = Random <= 100
trigger3 = var(59) > 9
trigger3 = (PrevStateNo = [130,159])||(PrevStateNo = [890,899])||(prevstateno = [5000,5270])||(EnemyNear(var(55)),facing = facing)
trigger3 = Random <= 300

;==============================================================================
;地上技振り・対空(上段)
[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 2001
triggerall = (var(59) = [6,8]) && RoundState = 2
triggerall = Power >= 1000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X+Floor(EnemyNear(var(55)),vel X * 10) = [70,180]
triggerall = P2BodyDist Y-Floor(EnemyNear(var(55)),vel Y * 10) = [-140,-60]
trigger1 = Random <= 70

;地上技振り・対空(上段)
[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 20010
triggerall = (var(59) = [6,8]) && RoundState = 2
triggerall = Power >= 2000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X+Floor(EnemyNear(var(55)),vel X * 10) = [70,180]
triggerall = P2BodyDist Y-Floor(EnemyNear(var(55)),vel Y * 10) = [-140,-60]
trigger1 = Random <= 70

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 79840
triggerall = (var(59) = [6,8]) && RoundState = 2
triggerall = Power >= 1000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X+Floor(EnemyNear(var(55)),vel X * 10) = [70,180]
triggerall = P2BodyDist Y-Floor(EnemyNear(var(55)),vel Y * 10) = [-140,-60]
trigger1 = Random <= 70

[State -3,ブレイド・オブ・クサナギ]
type = ChangeState
value = 24000
triggerall = (var(59) = [6,8]) && RoundState = 2
triggerall = Power >= 1000
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X+Floor(EnemyNear(var(55)),vel X * 10) = [70,180]
triggerall = P2BodyDist Y-Floor(EnemyNear(var(55)),vel Y * 10) = [-140,-60]
trigger1 = Random <= 200

;しゃがみ強パンチ
[State -3, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = (EnemyNear(var(55)),StateNo != [120,159]) || EnemyNear(var(55)),StateType=A
triggerall = P2BodyDist X+Floor(EnemyNear(var(55)),vel X * 8) = [30,60]
triggerall = P2BodyDist Y > -90-Floor(EnemyNear(var(55)),vel Y * 8)
trigger1 = !InGuardDist
trigger1 = var(59) < 11
trigger1 = Random <= 80-var(59)*6
trigger2 = EnemyNear(var(55)),StateType = A
trigger2 = EnemyNear(var(55)),Vel Y > 0
trigger2 = P2BodyDist Y < -40
trigger2 = var(59) >= 9
trigger2 = Random <= 150

;------------------------------------------------------------------------------
;遠距離立ち強キック
[State -3, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != C
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = (EnemyNear(var(55)),StateNo != [120,159]) || EnemyNear(var(55)),StateType=A
triggerall = P2BodyDist X+Floor(EnemyNear(var(55)),vel X * 12) = [60,85]
triggerall = P2BodyDist Y > -60
trigger1 = !InGuardDist
trigger1 = var(59) < 9
trigger1 = Random <= 80-var(59)*5
trigger2 = EnemyNear(var(55)),StateType = A
trigger2 = EnemyNear(var(55)),Vel Y >= 0
trigger2 = P2BodyDist Y < -40
trigger2 = var(59) = [8,10]
trigger2 = Random <= 150

;==============================================================================
;地上技振り・中段

;==============================================================================
;地上技振り・下段
;しゃがみ弱キック
[State -3, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = S
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X = [-3,53+Floor(EnemyNear(var(55)),vel X * 5)]
trigger1 = var(59) < 10
trigger1 = Random <= var(59)*5
trigger2 = var(59) >= 10
trigger2 = Random <= 30

;------------------------------------------------------------------------------
;しゃがみ強キック
[State -3, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = S
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X = [60,92+Floor(EnemyNear(var(55)),vel X * 12)]
triggerall = !InGuardDist
trigger1 = var(59) < 8
trigger1 = Random <= var(59)*8
trigger2 = var(59) = [8,10]
trigger2 = Random <= 100-var(59)*9

;==============================================================================
;地上技振り・上段
;近距離立ち弱キック
[State -3, Stand Light Kick]
type = ChangeState
value = 235
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2bodydist X < 15
triggerall = P2BodyDist Y > -40
triggerall = !InGuardDist
trigger1 = Random <= 120
trigger2 = var(59) > 7 && Random <= 333
trigger2 = EnemyNear(var(55)),AnimTime <= -3
trigger2 = EnemyNear(var(55)),MoveType = I
trigger2 = EnemyNear(var(55)),StateNo = [200,649]

;------------------------------------------------------------------------------
;しゃがみ弱パンチ
[State -3, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) >= 1 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X = [-5,51+Floor(EnemyNear(var(55)),vel X * 4)]
trigger1 = Random <= 70
trigger2 = var(59) > 7 && Random <= 333
trigger2 = EnemyNear(var(55)),AnimTime <= -4
trigger2 = EnemyNear(var(55)),MoveType = I
trigger2 = EnemyNear(var(55)),StateNo = [200,649]

;------------------------------------------------------------------------------
;遠距離立ち弱キック
[State -3, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59) >= 7 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X = [30,90+Floor(EnemyNear(var(55)),vel X * 6)]
triggerall = !InGuardDist
trigger1 = Random <= 70
trigger2 = var(59) > 7 && Random <= 333
trigger2 = P2BodyDist X > 50
trigger2 = EnemyNear(var(55)),AnimTime <= -6
trigger2 = EnemyNear(var(55)),MoveType = I
trigger2 = EnemyNear(var(55)),StateNo = [200,649]

;------------------------------------------------------------------------------
;立ち強パンチ
[State -3, Stand Strong Punch]
type = ChangeState
value = ifelse(P2bodydist x >= 30,210,215)
triggerall = var(59) >= 5 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = EnemyNear(var(55)),StateType != A
triggerall = EnemyNear(var(55)),MoveType != H
triggerall = P2BodyDist X = [-3,110+Floor(EnemyNear(var(55)),vel X * 6)]
triggerall = !InGuardDist
trigger1 = var(59) < 11
trigger1 = P2BodyDist X < 30
trigger1 = Random <= 50
trigger2 = var(59) < 9
trigger2 = P2BodyDist X > 60
trigger2 = Random <= 20
trigger3 = var(59) > 7 && Random <= 333
trigger3 = P2BodyDist X > 80
trigger3 = EnemyNear(var(55)),AnimTime <= -11
trigger3 = EnemyNear(var(55)),MoveType = I
trigger3 = EnemyNear(var(55)),StateNo = [200,649]

;==============================================================================
;空中技振り
;空中弱キック
[State -3, Jump Light Kick]
type = ChangeState
value = 630
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype = A && ctrl
triggerall = stateno != 105
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = A
trigger1 = P2BodyDist X = [-5,70+Floor(vel X * 4)]
trigger1 = P2BodyDist Y = [-50,50]
trigger1 = vel X < 0

;空中弱キック
[State -3, Jump Light Kick]
type = ChangeState
value = 7650
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype = A && ctrl
triggerall = stateno != 105
triggerall = Random <= 200
trigger1 = P2BodyDist X = [-5,70+Floor(vel X * 4)]
trigger1 = P2BodyDist Y = [-50,50]
trigger1 = vel X < 0

;------------------------------------------------------------------------------
;空中強パンチ
[State -3, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype = A && ctrl
triggerall = stateno != 105
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType = A
trigger1 = P2BodyDist X = [-5,45+Floor(vel X * 7)]
trigger1 = P2BodyDist Y = [-50,30]

;------------------------------------------------------------------------------
;空中強キック
[State -3, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = var(59) >= 1 && RoundState = 2
triggerall = var(20) = 0
triggerall = statetype = A && ctrl
triggerall = stateno != 105
triggerall = Random <= var(59)*100
triggerall = EnemyNear(var(55)),StateType != L
triggerall = P2BodyDist X = [-15,60+Floor(vel X * 6)]
triggerall = P2BodyDist Y = [-35,60]
trigger1 = vel X >= 0 && vel Y > 0
trigger1 = EnemyNear(var(55)),StateType != A
trigger2 = EnemyNear(var(55)),StateType = A

;==============================================================================
; AI その他
;バックステップ
[State -3, Back Step]
type = ChangeState
value = 105
triggerall = var(59) >= 1 && RoundState = 3
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
trigger1 = FrontEdgeBodyDist < 70

;ダッシュ
[State -3, Dush]
type=changestate
value = 99
triggerall = var(59) >= 1 && RoundState = 3
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19])
trigger1 = P2BodyDist X > 20
trigger1 = BackEdgeBodyDist <= 35

;ジャンプ
[State -3, Jump]
type=changestate
value = 39
triggerall = var(59) >= 1 && RoundState = 3
triggerall = statetype != A
triggerall = ctrl || (stateno = [18,19]) || stateno = 99
trigger1 = P2BodyDist X <= 20
trigger1 = BackEdgeBodyDist <= 30

[state -3,挑発]
type=changestate
value=195
triggerall = var(59) >= 10 && RoundState = 3
triggerall = !fvar(38)
triggerall = statetype != A && time > 2
triggerall = ctrl || (stateno = [18,19]) || stateno = 99 || (stateno = 105&& AnimTime = 0)
triggerall = FrontEdgeBodyDist >= 70 && BackEdgeBodyDist > 50
trigger1 = var(59) = 10
trigger1 = life > lifemax * 0.5
trigger2 = var(59) > 10

;==============================================================================

[State -2, ダッシュ音]
type = PlaySnd
trigger1 = time = 2
trigger1 = stateno = 100
value = 4,3 
channel = 7
loop = 1

[State -2, ダッシュ音ストップ]
type = StopSnd
trigger1 = stateno != 100
channel = 7

[State -3, 着地音]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52
trigger2 = stateno = 107
value = 4, 0


;以下のいくつかの項目は、大部分のボイスを設定しています。

[State -3, ダメージボイス]
type = PlaySnd
triggerall = Time = 1
triggerall = Alive && GameTime % 3 = 0                  ;生きている時＆3Fに一回の確率で
trigger1 = stateno=5000 || stateno=5010 || stateno=5020 ;ダメージの瞬間
trigger2 = stateno = 5070 || stateno = 5080             ;ダメージの瞬間
value = 50,random/250                                   ;50,0～50,3までをランダムに決定
channel = 0 ;チャンネルを決定しています。同じチャンネルの音は重なりません。

[State -3, ガードボイス]
type = PlaySnd
triggerall = Time = 1
triggerall = Alive && GameTime % 4 = 0               ;%は割ったあまりを求める
trigger1 = stateno=151 || stateno=153 || stateno=155 ;ガードのノックバック時
trigger2 = stateno = 702                             ;シールド成功時
value = 60,random/334                                ;60,0～60,2までをランダムに決定
channel = 0 ;例えば4チャンネルの音が新たに鳴った場合、現在の4chの音は消えます。

[State -3, 受身ボイス]
type = PlaySnd
triggerall = Time = 1
triggerall = Alive && GameTime % 3 = 0      ;GameTimeを3で割ったあまりが0の時
trigger1 = stateno = 5200 || stateno = 5210 ;受身直後
value = 70,random/334
channel = 0 ;そのおかげで、各ボイスが同時に発せられることがなくなります。

[State -3, 起き上がりボイス]
type = PlaySnd
triggerall = Time = 1
triggerall = Alive && GameTime % 3 = 0
trigger1 = stateno = 5120              ;起き上がり時
value = 80,random/334
channel = 0 ;キャラボイスは0chを推奨

;以下二つは、各技のステートに直接設定する方が良いです

;ここで空中ダッシュ回数を決定・リセットしてます。
[State -3, 空中ダッシュ回数]
type = VarSet
trigger1 = floor(pos Y) >= 0 ;着地すると回数が戻る
trigger2 = stateno = [0,20]  ;立ち～歩きステートでもリセット
v = 4
value = 2                    ;2回にしてみた

;※※※※※※※※※※※※※※※※※※※※ハイジャンプ

[State -3, コマンドを入れたらVarをON] 
type = VarSet
trigger1 = !var(59)
trigger1 = statetype = S && ctrl
trigger1 = command = "longjump"
trigger2 = var(59)
trigger2 = statetype != A && ctrl
trigger2 = p2bodydist X > 80
v = 3
value = 1

[State -3, sysvarを引継ぐ]
type = VarSet
trigger1 = Var(3) = 1
trigger1 = stateno = [37,40] ;ジャンプする前のステート
trigger1 = AnimTime = 0 ;ジャンプ方向を決めるsysvarがリセットされる寸前
var(3) = ifelse(sysvar(1)=0, 2, ifelse(sysvar(1)=1, 3, 4))

[State -3, varをOFFにするステート]
type = VarSet
triggerall = Time = 2
trigger1 = stateno = 50
trigger2 = stateno != [37,59]
v = 3
value = 0

[State -3, 前にボタンを押してたら前にも加速]
type = VelAdd
trigger1 = var(3) = 3
trigger1 = stateno = 50
y = -1.2
x = 2

[State -3, 後ろなら後ろに加速]
type = VelAdd
trigger1 = var(3) = 4
trigger1 = stateno = 50
y = -1.2
x = -2.1

[State -3, 垂直ジャンプにveladdを使って上に加速]
type = VelAdd
trigger1 = var(3) = 2
trigger1 = stateno = 50
y = -3

[State -3, 垂直ジャンプ時、水平方向０]
type = VelSet
triggerall = var(3) = 2
trigger1 = stateno = 50
x = 0

[State -3, 垂直ジャンプ時、アニメ強制41]
type = ChangeAnim
triggerall = var(3) = 2
trigger1 = stateno = 50
trigger1 = Time <= 1
value = 41

[State -3, 成功したときの残像]
type = AfterImage
trigger1 = var(3) >= 1
trigger1 = stateno = 50
time = 10
length = 10
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1;.9, .9, .9
FrameGap = 4
Trans = Add1

