;---------------------------------------------------------------------------
;相殺一時ステート
;---------------------------------------------------------------------------
[Statedef 320]
type 		= U
Movetype 	= I
physics 	= U
ctrl 		= 0

[State 雷　キァルトヴェルサ（フォース）];120を経由しなかった場合
type = VarSet
triggerall = StateType != C
trigger1 = var(21) = 10
trigger2 = var(21) = 11
trigger3 = var(21) = 12
trigger4 = var(21) = 20
var(21) = 130
[State 雷　キァルトヴェルサ（フォース）];120を経由しなかった場合
type = VarSet
triggerall = StateType = C
trigger1 = var(21) = 10
trigger2 = var(21) = 11
trigger3 = var(21) = 12
trigger4 = var(21) = 20
var(21) = 131

[State 相殺エフェクト]
Type = Helper
Trigger1 = time = 0
StateNo 		= 20930
ID 				= var(21)
name 			= "Sousai_efect"
PosType 		= P1
OwnPal 			= 1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1

[State アニメ]
type = ChangeAnim
trigger1 = 1
value = anim
elem = AnimElemNo(0)

[State アニメ];120を経由しなかった場合
type = ChangeAnim
triggerall = Anim != 130
triggerall = Anim != 131
trigger1 = var(21) = 130
trigger2 = var(21) = 131
value = ifelse(var(21) = 130,130,131)

[State ポーズ]
type = Pause
Trigger1 = time = 0
time 		= ifelse((var(21)=100||var(21)=290||var(21)=300),20,10)
movetime 	= ifelse((var(21)=100||var(21)=290||var(21)=300),20,10)
Persistent = 0

[State ポスフリーズ]
type = PosFreeze
trigger1 = 1

[State タイマーフリーズ]
type = AssertSpecial
trigger1 = time < ifelse((var(21)=100||var(21)=290||var(21)=300),20,10)
flag = timerfreeze

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
IgnoreHitPause = 1

[State 雷　クリィーオフ]
type = ChangeState
triggerall = time > ifelse((var(21)=100||var(21)=290||var(21)=300),var(22),0)+ifelse((var(21)=100||var(21)=290||var(21)=300),20,10)
trigger1 = StateType != A
trigger1 = var(15) = 42100 || var(15) = 42200
trigger2 = StateType = A
trigger2 = var(16) = 42100 || var(16) = 42200
value = 42200

[State 戻る]
type = ChangeState
triggerall = time > ifelse((var(21)=100||var(21)=290||var(21)=300),var(22),0)+ifelse((var(21)=100||var(21)=290||var(21)=300),20,10)
trigger1 = var(15) != 42100
trigger1 = var(15) != 42200
trigger1 = var(16) != 42100
trigger1 = var(16) != 42200
value = var(21)

;---------------------------------------------------------------------------
;helper ガーキャンホーミング　シールドエフェクト
;---------------------------------------------------------------------------
;fvar(11)イクスプロッドサイズ用1
;fvar(12)イクスプロッドサイズ用2
;fvar(13)イクスプロッドサイズ用3
;fvar(14)イクスプロッドサイズ用4

;fvar(21)イクスプロッド　ポス/ベルY用1
;fvar(22)イクスプロッド　ポス/ベルY用2
;fvar(23)イクスプロッド　ポス/ベルY用3
;fvar(24)イクスプロッド　ポス/ベルY用4

[Statedef 340]
type 		= A
Movetype 	= I
physics 	= N
SprPriority = 2

[State アニメ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 341
value = 340

[State 影無し]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA

[State サイズ]
type = AngleDraw
trigger1 = 1
scale = 1.0,1.0

[State 角度]
type = AngleSet
trigger1 = 1
value = 90

[State ポス]
type = PosSet
trigger1 = 1
X = floor(Root,Pos X)+20*root,facing
Y = floor(Root,Pos Y)+ifelse(root,StateType = A,-50,-40)
IgnoreHitPause = 1
Persistent = 1

[State トランス]
type = Trans
trigger1 = 1
trans = add

;玉エフェクト-----

[State サイズ1]
type = VarSet
trigger1 = 1
fvar(11) = 0.2+random%15*0.01
[State サイズ2]
type = VarSet
trigger1 = 1
fvar(12) = 0.2+random%15*0.01
[State サイズ3]
type = VarSet
trigger1 = 1
fvar(13) = 0.2+random%15*0.01
[State サイズ4]
type = VarSet
trigger1 = 1
fvar(14) = 0.2+random%15*0.01

[State ポス/ベルY用1]
type = VarSet
trigger1 = 1
fvar(21) = random%50
[State ポス/ベルY用2]
type = VarSet
trigger1 = 1
fvar(22) = random%50
[State ポス/ベルY用3]
type = VarSet
trigger1 = 1
fvar(23) = random%50
[State ポス/ベルY用4]
type = VarSet
trigger1 = 1
fvar(24) = random%50

[State 玉エフェクト1]
type = Explod
triggerall = PrevStateNo != 341
trigger1 = time <= 10
trigger1 = time%4 = 0
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,-floor(fvar(21))
Vel 			= -random%45*0.1,-fvar(21)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(11),fvar(11)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
ID = 346
[State 玉エフェクト2]
type = Explod
triggerall = PrevStateNo != 341
trigger1 = time <= 10
trigger1 = time%4 = 2
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,-floor(fvar(22))
Vel 			= -random%45*0.1,-fvar(22)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(12),fvar(12)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
ID = 346

[State 玉エフェクト3]
type = Explod
triggerall = PrevStateNo != 341
trigger1 = time <= 10
trigger1 = time%4 = 0
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,floor(fvar(23))
Vel 			= -random%45*0.1,fvar(23)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(13),fvar(13)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
ID = 346
IgnoreHitPause = 1
[State 玉エフェクト4]
type = Explod
triggerall = PrevStateNo != 341
trigger1 = time <= 10
trigger1 = time%4 = 2
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,floor(fvar(24))
Vel 			= -random%45*0.1,fvar(24)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(14),fvar(14)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
ID = 346

;玉エフェクト-----

[State 親　相殺]
type = ChangeState
trigger1 = root,StateNo = 320
value = 341

[State 消滅へ]
type = ChangeState
trigger1 = root,StateNo != 320
trigger1 = root,StateNo != 380
trigger1 = root,StateNo != 381
trigger1 = root,StateNo != 390
trigger1 = root,StateNo != 391
value = 345

;---------------------------------------------------------------------------
;helper ガーキャンホーミング　シールドエフェクト親　相殺
;---------------------------------------------------------------------------

[Statedef 341]
type 		= A
Movetype 	= I
physics 	= N
SprPriority = 2

[State 影無し]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA

[State サイズ]
type = AngleDraw
trigger1 = 1
scale = 1.0,1.0

[State 角度]
type = AngleSet
trigger1 = 1
value = 90

[State ポス]
type = PosSet
trigger1 = 1
X = floor(Root,Pos X)+20*root,facing
Y = floor(Root,Pos Y)+ifelse(root,StateType = A,-50,-40)

;玉エフェクト-----
[State サイズ1]
type = VarSet
trigger1 = 1
fvar(11) = 0.2+random%15*0.01
[State サイズ2]
type = VarSet
trigger1 = 1
fvar(12) = 0.2+random%15*0.01
[State サイズ3]
type = VarSet
trigger1 = 1
fvar(13) = 0.2+random%15*0.01
[State サイズ4]
type = VarSet
trigger1 = 1
fvar(14) = 0.2+random%15*0.01

[State ポス/ベルY用1]
type = VarSet
trigger1 = 1
fvar(21) = random%50
[State ポス/ベルY用2]
type = VarSet
trigger1 = 1
fvar(22) = random%50
[State ポス/ベルY用3]
type = VarSet
trigger1 = 1
fvar(23) = random%50
[State ポス/ベルY用4]
type = VarSet
trigger1 = 1
fvar(24) = random%50

[State 玉エフェクト1]
type = Explod
trigger1 = time = 1
trigger2 = time = 2
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,-floor(fvar(21))
Vel 			= -random%45*0.1,-fvar(21)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(11),fvar(11)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
ID = 346
[State 玉エフェクト2]
type = Explod
trigger1 = time = 1
trigger2 = time = 2
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,-floor(fvar(22))
Vel 			= -random%45*0.1,-fvar(22)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(12),fvar(12)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
ID = 346

[State 玉エフェクト3]
type = Explod
trigger1 = time = 1
trigger2 = time = 2
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,floor(fvar(23))
Vel 			= -random%45*0.1,fvar(23)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(13),fvar(13)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
ID = 346
[State 玉エフェクト4]
type = Explod
trigger1 = time = 1
trigger2 = time = 2
Anim 			= 346+random%4
PosType 		= P1
Pos 			= 25*facing*root,facing,floor(fvar(24))
Vel 			= -random%45*0.1,fvar(24)*0.1
Accel 			= -0.15-(random%15*0.01), 0
Scale 			= fvar(14),fvar(14)
SprPriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
ID = 346

;玉エフェクト-----

[State トランス]
type = Trans
trigger1 = 1
trans = add

[State 戻る]
type = ChangeState
trigger1 = root,StateNo != 320
value = 340

;---------------------------------------------------------------------------
;helper ガーキャンホーミング　シールドエフェクト　消滅
;---------------------------------------------------------------------------
[Statedef 345]
type 		= A
Movetype 	= I
physics 	= N
anim 		= 345
SprPriority = 2

[State 影無し]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA

[State サイズ]
type = AngleDraw
trigger1 = 1
scale = 1.0,1.0

[State 角度]
type = AngleSet
trigger1 = 1
value = 90

;トランス　デス
[State Sトランス]
type = VarSet
trigger1 = time = 0
var(0) = 256
[State Sフェードアウト]
type = VarAdd
trigger1 = time >= 1
trigger1 = var(0) > 0
var(0) = -26
[State Sフェード下限]
type = VarSet
trigger1 = var(0) < 0
var(0) = 0

[State トランス]
type = Trans
trigger1 = 1
trans = addalpha
alpha = var(0),256

[State デス]
Type = DestroySelf
trigger1 = var(0) <= 0
trigger1 = NumExplod(346) = 0

;---------------------------------------------------------------------------
;Nホーミング始動(地上/空中)
;---------------------------------------------------------------------------

[Statedef 350]
type 		= A
movetype 	= I
physics 	= N
VelSet 		= 0,0
faceP2 		= 1

[State 無敵　打・飛]
type = NotHitBy
trigger1 = time <= 1
value = ,AA,AP
time = 1

[State アニメ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 320
value = 350

[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = 1
var(24) = 1
[State アニメ　相殺後]
type = ChangeAnim
trigger1 = PrevStateNo = 320
trigger1 = var(24) = 16
trigger1 = AnimElemTime(3) < 0
value = anim
elem = 3

;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
triggerall = PrevStateNo != 320
trigger1 = time = 0
var(33) = 1

[State seホーミング]
type = PlaySnd
triggerall = PrevStateNo != 320
trigger1 = time = 0
value = s2,0
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
triggerall = PrevStateNo != 320
trigger1 = time = 0
StateNo 		= 20950
ID 				= ifelse(!ctrl,351,350)
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State ホーミングゲージ消費]
type = VarAdd
triggerall = PrevStateNo != 320
trigger1 = time = 0
;trigger1 = var(46) = 0
;trigger2 = var(46) = 5
;trigger3 = var(46) = 3 && !ctrl
;trigger4 = var(46) = 6 && !ctrl
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0

[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = var(46) = 0 && !ctrl
trigger2 = var(46) = 5 && !ctrl
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State コントロール不可]
type = CtrlSet
trigger1 = time = 0
value = 0

[State ホーミング目標点]
Type = Helper
Trigger1 = NumHelper(355) = 0
Trigger1 = time = 0
StateNo 		= 355
ID 				= 355
name 			= "mokuhyouten"
PosType 		= P1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State ホーミング移動へ]
type = ChangeState
trigger1 = AnimElemTime(3) >= 0
trigger2 = AnimTime = 0
value = 351

;エフェクト消去----------------------
[State 5A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 207
[State 6A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 217
[State 5B　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 225
[State 3B　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 235
[State 3B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 237
[State 5C　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 245
[State 5C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 247

[State 5E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 311
[State 5E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 312
[State 2E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 315
[State 2E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 316

[State 2A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 407
[State 3A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 417
[State 2B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 427
[State 2C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 447

[State 1E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 461
[State 1E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 462

[State j_5A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 607
[State j_6A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 617
[State j_5B　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 625
[State j_5B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 627
[State j_5C　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 645
[State j_5C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 647
[State j_6C　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 655
[State j_6C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 657
[State j_5E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 661
[State j_5E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 662

[State N投げ　鞘エフェクト]
type = removeExplod
trigger1 = time = 0
ID = 710
[State j_投げ　剣閃・剣オーラエフェクト]
type = removeExplod
trigger1 = time = 0
ID = 760

[State 閏間　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 1171
[State 閏間　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 1172
[State 閏間　剣オーラ3]
type = removeExplod
trigger1 = time = 0
ID = 1173
[State 閏間　剣オーラ4]
type = removeExplod
trigger1 = time = 0
ID = 1174

[State A斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1206
[State A斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1207
[State B斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1216
[State B斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1217
[State C斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1226
[State C斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1227

[State 空中AB斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1236
[State 空中AB斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1237

[State 対飛び道具用AB斯封　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 1291
[State 対飛び道具用C斯封　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 1292

[State 天鎖　剣オーラelem1]
type = removeExplod
trigger1 = time = 0
ID = 1351
[State 天鎖　剣オーラelem2]
type = removeExplod
trigger1 = time = 0
ID = 1352
[State 天鎖　剣オーラelem3]
type = removeExplod
trigger1 = time = 0
ID = 1353
[State 天鎖　剣オーラelem4]
type = removeExplod
trigger1 = time = 0
ID = 1354

[State C吐切　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 1463
[State C吐切　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 1464

[State 影宿　剣オーラelem1]
type = removeExplod
trigger1 = time = 0
ID = 2071
[State 影宿　剣オーラelem2]
type = removeExplod
trigger1 = time = 0
ID = 2072
[State 影宿　剣オーラelem3]
type = removeExplod
trigger1 = time = 0
ID = 2073
[State 影宿　剣オーラelem4]
type = removeExplod
trigger1 = time = 0
ID = 2074

[State 逝斬　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 2151

[State 枯霊　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 2261
[State 枯霊　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 2262
[State 枯霊　剣オーラ3]
type = removeExplod
trigger1 = time = 0
ID = 2263

;エフェクト消去----------------------

[State 雷　キァルトヴェルサ（フォース）対打撃・飛び道具　相殺成功へ]
type = HitOverride
trigger1 = var(58) = 2
trigger1 = var(47)
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;ホーミング移動
;---------------------------------------------------------------------------
[Statedef 351]
type    = A
movetype= I
physics = N
ctrl = 0
faceP2 = 1

[State レバー＆ボタン入力解除用　ジャンプ用]
type = VarSet
trigger1 = 1
var(29) = 1

[State seホーミング]
type = PlaySnd
trigger1 = time%15 = 0
value = s2,3

[State ホーミング目標点]
Type = Helper
Trigger1 = NumHelper(355) = 0
Trigger1 = time = 0
StateNo 		= 355
ID 				= 355
name 			= "mokuhyouten"
PosType 		= P1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

;速度--------------------------------------------

[State 速度　通常/レバー加速相手方向]
type = VelSet
triggerall = time >= 1
triggerall = NumHelper(355)
trigger1 = helper(355),var(27) = 0

trigger2 = helper(355),var(27) = 2
trigger3 = helper(355),var(27) = 3
trigger4 = helper(355),var(27) = 6
trigger5 = helper(355),var(27) = 8
trigger6 = helper(355),var(27) = 9
trigger7 = helper(355),var(27) = 13
trigger8 = helper(355),var(27) = 16
trigger9 = helper(355),var(27) = 19
x = helper(355),fvar(5)*cos((helper(355),fvar(3))*pi/180)
y = helper(355),fvar(6)*sin((helper(355),fvar(3))*pi/180)*(-1)

[State 速度　レバー加速反対方向方向Ｎ]
type = VelSet
triggerall = time >= 1
triggerall = NumHelper(355)
triggerall = var(53) = 0 && (P2Dist X >= 0 && command != "holdback" || P2Dist X < 0 && command != "holdfwd")
trigger1 = helper(355),var(27) = 1
trigger2 = helper(355),var(27) = 4
trigger3 = helper(355),var(27) = 7
trigger4 = helper(355),var(27) = 11
trigger5 = helper(355),var(27) = 14
trigger6 = helper(355),var(27) = 17
x = helper(355),fvar(5)*cos((helper(355),fvar(3))*pi/180)
y = helper(355),fvar(6)*sin((helper(355),fvar(3))*pi/180)*(-1)

[State 速度　レバー加速反対方向方向]
type = VelSet
triggerall = time >= 1
triggerall = NumHelper(355)
triggerall = var(53) = 0 && (P2Dist X >= 0 && command = "holdback" || P2Dist X < 0 && command = "holdfwd")
trigger1 = helper(355),var(27) = 1
trigger2 = helper(355),var(27) = 4
trigger3 = helper(355),var(27) = 7
trigger4 = helper(355),var(27) = 11
trigger5 = helper(355),var(27) = 14
trigger6 = helper(355),var(27) = 17
x = 4*cos((helper(355),fvar(3))*pi/180)*ifelse(P2Dist X >= 0,-1,1)
y = (helper(355),fvar(6)*0.8)*sin((helper(355),fvar(3))*pi/180)*(-1)

[State 速度　N加速]
type = VelSet
triggerall = time >= 1
triggerall = NumHelper(355)
trigger1 = helper(355),var(27) = 5
x = (helper(355),fvar(5)+2)*cos((helper(355),fvar(3))*pi/180)
y = (helper(355),fvar(6)+2)*sin((helper(355),fvar(3))*pi/180)*(-1)


[State レバー入力　速度X加減]
type = VelAdd
triggerall = time >= 1
triggerall = NumHelper(355)
triggerall = helper(355),var(28) = 0
trigger1 = P2Dist X >= 0 && var(53) = 0 && command="holdfwd"
trigger2 = P2Dist X <  0 && var(53) = 0 && command="holdback"
x = Vel X*ifelse(helper(355),var(29) = 0,0.075,ifelse(helper(355),var(29) = 1,0.15,0.20))*ifelse(P2Dist X >= 0,1,-1)
[State レバー入力　速度X加減]
type = VelAdd
triggerall = time >= 1
triggerall = NumHelper(355)
triggerall = helper(355),var(28) = 0
trigger1 = P2Dist X >= 0 && var(53) = 0 && command="holdback"
trigger2 = P2Dist X <  0 && var(53) = 0 && command="holdfwd"
x = Vel X*ifelse(helper(355),var(29) = 0,-0.1,ifelse(helper(355),var(29) = 1,-0.05,-0.01))*ifelse(P2Dist X >= 0,1,-1)

[State レバー入力　速度Y加減]
type = VelAdd
triggerall = time >= 1
triggerall = NumHelper(355)
triggerall = helper(355),var(28) = 0
trigger1 = var(53) = 0 && command="holdup"
y = ifelse(helper(355),var(29) = 0,-3,ifelse(helper(355),var(29) = 1,-2,-1))
[State レバー入力　速度Y加減]
type = VelAdd
triggerall = time >= 1
triggerall = NumHelper(355)
triggerall = helper(355),var(28) = 0
triggerall = pos Y<=-50
trigger1 = var(53) = 0 && command="holddown"
y = ifelse(helper(355),var(29) = 0,3,ifelse(helper(355),var(29) = 1,2,1))

;速度--------------------------------------------

;[State 相手追い越し時　ターン]
;type = Turn
;trigger1 = NumHelper(355)
;trigger1 = helper(355),var(27)=0
;trigger1 = P2Dist X < 0

;アニメ------------------------------------------
[State Anim]
type = ChangeAnim
trigger1 = time = 0
trigger1 = Anim != 370
trigger1 = PrevStateNo != 320
value = 350

;低速時(目標点との角度依存)-------
;[State アニメ　斜め上]
;type = ChangeAnim
;triggerall = time >= 1
;;triggerall = abs(Vel X)+abs(Vel Y) < 5
;triggerall = NumHelper(355)
;triggerall = anim != 351
;trigger1 = helper(355),fvar(3) = [30,150)
;value = 351
;[State アニメ　前]
;type = ChangeAnim
;triggerall = time >= 1
;;triggerall = abs(Vel X)+abs(Vel Y) < 5
;triggerall = NumHelper(355)
;triggerall = anim != 352
;trigger1 = helper(355),fvar(3) = [0,30)
;trigger2 = helper(355),fvar(3) = [150,180]
;value = 352
;[State アニメ　斜め下]
;type = ChangeAnim
;triggerall = time >= 1
;;triggerall = abs(Vel X)+abs(Vel Y) < 5
;triggerall = NumHelper(355)
;triggerall = anim != 353
;trigger1 = helper(355),fvar(3) = [-70,0)
;trigger2 = helper(355),fvar(3) = [-180,-120)
;value = 353
;[State アニメ　下]
;type = ChangeAnim
;triggerall = time >= 1
;;triggerall = abs(Vel X)+abs(Vel Y) < 5
;triggerall = NumHelper(355)
;triggerall = anim != 354
;trigger1 = helper(355),fvar(3) = [-120,-70)
;value = 354
;低速時(目標点との角度依存)-------

;非低速時(進行方向依存)---------

[State 速度ベクトルの角度]
type = VarSet
trigger1 = Vel X = 0
trigger1 = Vel Y = 0
fvar(2) = 0
IgnoreHitPause = 1
[State 速度ベクトルの角度]
type = VarSet
trigger1 = Vel X || Vel Y
fvar(2) = (atan((Vel X)/(Vel Y +0.0001))*180/Pi)-(90*ifelse(Vel Y <0,-1,1))
IgnoreHitPause = 1

[State アニメ　後ろ]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 356
trigger1 = fvar(2) = (160,180]
value = 356

[State アニメ　後ろ斜め上]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 355
trigger1 = fvar(2) = (90,160]
value = 355

[State アニメ　前斜め上]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 351
trigger1 = fvar(2) = [25,90]
value = 351

[State アニメ　前]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 352
trigger1 = fvar(2) = [0,25)
value = 352

[State アニメ　前斜め下]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 353
trigger1 = fvar(2) = [-55,0)
value = 353

[State アニメ　前下]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 354
trigger1 = fvar(2) = [-90,-55)
value = 354

[State アニメ　後ろ下]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 358
trigger1 = fvar(2) = [-125,-90)
value = 358

[State アニメ　後ろ斜め下]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 357
trigger1 = fvar(2) = [-160,-125)
value = 357

[State アニメ　後ろ]
type = ChangeAnim
triggerall = time >= 1
;triggerall = abs(Vel X)+abs(Vel Y) >= 5
triggerall = NumHelper(355)
triggerall = anim != 356
trigger1 = fvar(2) = [-180,-160)
value = 356

;非低速時(進行方向依存)---------
;アニメ------------------------------------------

;ヘルパー-------------------------
[State ホーミングエフェクト　青魔方陣1]
Type = Helper
Triggerall = NumHelper(355)
Trigger1 = time = 2
StateNo 		= 20940
ID 				= 20941
name 			= "Homing efect"
PosType 		= P1
Pos 			= 0,-60
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0
[State ホーミングエフェクト　青魔方陣2]
Type = Helper
Triggerall = Anim != 350
Triggerall = NumHelper(355)
trigger1 = helper(355),var(35) = 0
trigger1 = helper(355),var(29) = 1
StateNo 		= 20940
ID 				= 20942
name 			= "Homing efect"
PosType 		= P1
Pos 			= 0,-60
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0
[State ホーミングエフェクト　青魔方陣3]
Type = Helper
Triggerall = Anim != 350
Triggerall = NumHelper(355)
trigger1 = helper(355),var(35) = 0
trigger1 = helper(355),var(29) = 2
StateNo 		= 20940
ID 				= 20943
name 			= "Homing efect"
PosType 		= P1
Pos 			= 0,-60
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State ホーミングエフェクト　グレーリング]
Type = Helper
Trigger1 = time > 0
Trigger1 = time%15 = 0
StateNo 		= 20945
ID 				= 20945
name 			= "Homing efect2"
PosType 		= P1
Pos 			= 0,-60
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1

[State ホーミングエフェクト　きらきら]
type = Explod
trigger1 = time%5 = 0
anim 			= 20942+random%8
PosType 		= P1
pos 			= 0,-45
random 			= 30,90
scale 			= 0.5,0.5
sprpriority 	= 2
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1

;ヘルパー-------------------------

[State ポスY限界]
type = PosSet
trigger1 = NumHelper(355)
trigger1 = helper(355),var(28) = 0
trigger1 = Pos Y >= -10
Y = -10

[State ホーミング終了　空中ガード]
type = ChangeState
triggerall = P2MoveType = A
triggerall = var(32) = 0
triggerall = InGuardDist;足りてない攻撃はガードできない。Ｙはいくら離れていてもガードしてしまう。
trigger1 = P2Dist X >= 0 && var(53) = 0 && command = "holdback"
trigger2 = P2Dist X <  0 && var(53) = 0 && command = "holdfwd"
value = 120

[State ホーミング終了　コマンド入力]
type = ChangeState
triggerall = time >= 1
trigger1 = var(53) = 0
trigger1 = var(16) != 110;空中ダッシュ
trigger1 = var(16) != 115;空中バックダッシュ
trigger1 = var(15) != 0 || var(16) != 0
value = 352

[State ホーミング終了　目標点接触]
type = ChangeState
triggerall = time >= 1
triggerall = NumHelper(355)
trigger1 = (helper(355),var(25) = [-5,5]) && helper(355),var(26) = [-5,5]
value = 352

[State ホーミング終了　相手へ接近]
type = ChangeState
triggerall = time >= 1
triggerall = NumHelper(355)
trigger1 = helper(355),var(29) = 0 && fvar(4) < 60
trigger2 = helper(355),var(29) = 1 && fvar(4) < 70;105
trigger3 = helper(355),var(29) = 2 && fvar(4) < 80;120
value = 352
[State ホーミング終了　加速中着地]
type = ChangeState
triggerall = time >= 2
triggerall = NumHelper(355)
triggerall = helper(355),var(27)
triggerall = helper(355),var(28)
triggerall = Pos Y >= -10
trigger1 = var(53) = 0 && command = "holddown"
value = 352

[State ホーミング終了]
type = ChangeState
trigger1 = NumHelper(355) = 0
value = 352

[State 雷　キァルトヴェルサ（フォース）対打撃・飛び道具　相殺成功へ]
type = HitOverride
trigger1 = var(58) = 2
trigger1 = var(47)
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;ホーミング終了
;---------------------------------------------------------------------------
[Statedef 352]
type 		= A
movetype 	= I
physics 	= N
ctrl 		= 1
anim 		= 359
faceP2 		= 1

[State 重力]
type = Gravity
trigger1 = time >= 5

[State 着地へ]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
;helper ホーミング目標点ヘルパー
;---------------------------------------------------------------------------
;var(5)	ポスX
;var(6)	ポスY
;var(7)	ポス　本体と相手とのX距離補正
;var(8)	ポス　本体と相手とのY距離補正
;var(9)	ポス　時間補正
;var(25)親との距離X
;var(26)親との距離Y
;var(27)追加入力時レバー判別
;var(28)追加入力タイム代用
;var(29)追加入力回数
;var(35)タイム代用
;fvar(3)親→子の角度
;fvar(5)親速度X
;fvar(6)親速度Y

[Statedef 355]
type = A
MoveType = I
physics = N
;Anim = 9999;確認用
Anim = 12000;空アニメ
SprPriority = 2
ctrl = 0

[State 無敵]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA

[State 影無し]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State ポス]
type = PosSet
trigger1 = time = 0
trigger2 = root,StateNo = 350
trigger3 = root,StateNo = 370
x = EnemyNear, Pos X; * facing
y = EnemyNear, Pos Y -30 ;10 + EnemyNear,const(size.mid.pos.y)
IgnoreHitPause = 1

[State 本体との距離];+で子→親　-で親→子
type = null
trigger1 = 1 || var(25) := -floor(rootDist X)
trigger1 = 1 || var(26) := -floor(rootDist Y)
IgnoreHitPause = 1

[State 親→子の角度]
type = VarSet
trigger1 = 1
fvar(3) = (atan(var(25)/(var(26)+0.0001))*180/Pi)-(90*ifelse((var(26))<0,-1,1))

;[State 親→子の直線距離]
;type = VarSet
;trigger1 = var(25) != 0
;fvar(4) = abs(var(25))/(cos((90-(atan(abs(var(25))/(abs(var(26))+0.0001))*180/Pi))*Pi/180))
;[State 親→子の直線距離　X=0のとき]
;type = VarSet
;trigger1 = var(25) = 0
;fvar(4) = abs(var(26))

;親速度-------------------------------------
;350	Nホーミング
;351		ホーミング移動状態
;370	空中レバーホーミング
;391	空中前ガーキャン
;392	空中後ろガーキャン

;通常	max6
;加速1	max12
;加速2	max15

;初速-------------------------
;Nホーミング
[State 初速X　Nホーミング]
type = VarSet
triggerall = var(29) = 0
trigger1 = root,StateNo = 350
;fvar(5) = 0.01*root,fvar(4) +3		;3〜6
fvar(5) = 5
IgnoreHitPause = 1
Persistent = 1
[State 初速Y　Nホーミング]
type = VarSet
triggerall = var(29) = 0
trigger1 = root,StateNo = 350
;fvar(6) = 0.01*root,fvar(4) +3		;3〜6
fvar(6) = 5
IgnoreHitPause = 1
Persistent = 1

;空中レバーホーミング
[State 初速　初期化]
type = null
triggerall = root,StateNo = 370
triggerall = var(29) = 0
trigger1 = 1 || fvar(5) := 5
trigger1 = 1 || fvar(6) := 5
IgnoreHitPause = 1
Persistent = 0

[State 初速X　後ろ系]
type = VarSet
triggerall = root,StateNo = 370
triggerall = var(29) = 0
trigger1 = root,Anim = 373
trigger2 = root,Anim = 374
trigger3 = root,Anim = 375
fvar(5) = 2
IgnoreHitPause = 1
Persistent = 0
[State 初速X　上下]
type = VarSet
triggerall = root,StateNo = 370
triggerall = var(29) = 0
trigger1 = root,Anim = 372
trigger2 = root,Anim = 376
fvar(5) = 4
IgnoreHitPause = 1
Persistent = 0

[State 初速Y　左右]
type = VarSet
triggerall = root,StateNo = 370
triggerall = var(29) = 0
trigger1 = root,Anim = 370
trigger2 = root,Anim = 374
fvar(6) = 4
IgnoreHitPause = 1
Persistent = 0
[State 初速Y　下系];相手が上にいるとき
type = VarSet
triggerall = root,StateNo = 370
triggerall = root,P2Dist Y <= 0
triggerall = var(29) = 0
trigger1 = root,Anim = 371
trigger2 = root,Anim = 372
trigger3 = root,Anim = 373
fvar(6) = 2
IgnoreHitPause = 1
Persistent = 1
[State 初速Y　上系];相手が下にいるとき
type = VarSet
triggerall = root,StateNo = 370
triggerall = root,P2Dist Y > 0
triggerall = var(29) = 0
trigger1 = root,Anim = 375
trigger2 = root,Anim = 376
trigger3 = root,Anim = 377
fvar(6) = 2
IgnoreHitPause = 1
Persistent = 1

;空中ガーキャンホーミング
[State 初速X　空中ガーキャン]
type = VarSet
trigger1 = root,StateNo = 391
trigger2 = root,StateNo = 392
fvar(5) = 4
IgnoreHitPause = 1
Persistent = 0
[State 初速Y　空中ガーキャン]
type = VarSet
trigger1 = root,StateNo = 391
trigger2 = root,StateNo = 392
fvar(6) = 4
IgnoreHitPause = 1
Persistent = 0
;初速-------------------------


;追加入力加速-------------------------------
[State 追加入力回数用];2回まで
type = VarAdd
triggerall = root,var(53) = 0 && root,command = "x"
triggerall = root,var(33) = 0
triggerall = var(29) < 2
trigger1 = root,StateNo = 351
trigger2 = root,StateNo = 350
trigger3 = root,StateNo = 370
var(29) = 1

[State 追加入力時レバー判別リセット]
type = VarSet
trigger1 = var(28) = 0
trigger1 = var(27) != 0
trigger2 = var(27)
trigger2 = root,var(53) = 0 && root,command = "x"
var(27) = 0

[State 追加入力　レバー判別/タイム代用];1
type = null
triggerall = var(29) = 1
triggerall = root,StateNo = 351
triggerall = root,var(53) = 0 && root,command = "x"
;N
trigger1 = root,command  != "holdup"
trigger1 = root,command  != "holddown"
trigger1 = root,command  != "holdfwd"
trigger1 = root,command  != "holdback"
trigger1 = var(27) := 5
trigger1 = var(28) := 5

;8
trigger2 = root,command  = "holdup"
trigger2 = root,command != "holddown"
trigger2 = root,command != "holdfwd"
trigger2 = root,command != "holdback"
trigger2 = var(27) := 8
trigger2 = var(28) := 12
;2
trigger3 = root,command != "holdup"
trigger3 = root,command  = "holddown"
trigger3 = root,command != "holdfwd"
trigger3 = root,command != "holdback"
trigger3 = var(27) := 2
trigger3 = var(28) := 12

;通常方向--------------------
;9
trigger4 = root,P2Dist X >= 0
trigger4 = root,command  = "holdup"
trigger4 = root,command != "holddown"
trigger4 = root,command  = "holdfwd"
trigger4 = root,command != "holdback"
trigger4 = var(27) := 9
trigger4 = var(28) := 12
;6
trigger5 = root,P2Dist X >= 0
trigger5 = root,command != "holdup"
trigger5 = root,command != "holddown"
trigger5 = root,command  = "holdfwd"
trigger5 = root,command != "holdback"
trigger5 = var(27) := 6
trigger5 = var(28) := 12
;3
trigger6 = root,P2Dist X >= 0
trigger6 = root,command != "holdup"
trigger6 = root,command  = "holddown"
trigger6 = root,command  = "holdfwd"
trigger6 = root,command != "holdback"
trigger6 = var(27) := 3
trigger6 = var(28) := 12

;1
trigger7 = root,P2Dist X >= 0
trigger7 = root,command != "holdup"
trigger7 = root,command  = "holddown"
trigger7 = root,command != "holdfwd"
trigger7 = root,command  = "holdback"
trigger7 = var(27) := 1
trigger7 = var(28) := 20
;4
trigger8 = root,P2Dist X >= 0
trigger8 = root,command != "holdup"
trigger8 = root,command != "holddown"
trigger8 = root,command != "holdfwd"
trigger8 = root,command = "holdback"
trigger8 = var(27) := 4
trigger8 = var(28) := 20
;7
trigger9 = root,P2Dist X >= 0
trigger9 = root,command  = "holdup"
trigger9 = root,command != "holddown"
trigger9 = root,command != "holdfwd"
trigger9 = root,command  = "holdback"
trigger9 = var(27) := 7
trigger9 = var(28) := 20

;追い越し時------------------
;9
trigger10= root,P2Dist X < 0
trigger10= root,command  = "holdup"
trigger10= root,command != "holddown"
trigger10= root,command  = "holdfwd"
trigger10= root,command != "holdback"
trigger10= var(27) := 17
trigger10= var(28) := 12
;6
trigger11= root,P2Dist X < 0
trigger11= root,command != "holdup"
trigger11= root,command != "holddown"
trigger11= root,command  = "holdfwd"
trigger11= root,command != "holdback"
trigger11= var(27) := 14
trigger11= var(28) := 12
;3
trigger12= root,P2Dist X < 0
trigger12= root,command != "holdup"
trigger12= root,command  = "holddown"
trigger12= root,command  = "holdfwd"
trigger12= root,command != "holdback"
trigger12= var(27) := 11
trigger12= var(28) := 12

;1
trigger13= root,P2Dist X < 0
trigger13= root,command != "holdup"
trigger13= root,command  = "holddown"
trigger13= root,command != "holdfwd"
trigger13= root,command  = "holdback"
trigger13= var(27) := 13
trigger13= var(28) := 20
;4
trigger14= root,P2Dist X < 0
trigger14= root,command != "holdup"
trigger14= root,command != "holddown"
trigger14= root,command != "holdfwd"
trigger14= root,command = "holdback"
trigger14= var(27) := 16
trigger14= var(28) := 20
;7
trigger15= root,P2Dist X < 0
trigger15= root,command  = "holdup"
trigger15= root,command != "holddown"
trigger15= root,command != "holdfwd"
trigger15= root,command  = "holdback"
trigger15= var(27) := 19
trigger15= var(28) := 20

IgnoreHitPause = 1
Persistent = 0

[State 追加入力　レバー判別/タイム代用];2
type = null
triggerall = var(29) = 2
triggerall = root,StateNo = 351
triggerall = root,var(53) = 0 && root,command = "x"
;N
trigger1 = root,command  != "holdup"
trigger1 = root,command  != "holddown"
trigger1 = root,command  != "holdfwd"
trigger1 = root,command  != "holdback"
trigger1 = var(27) := 5
trigger1 = var(28) := 5

;8
trigger2 = root,command  = "holdup"
trigger2 = root,command != "holddown"
trigger2 = root,command != "holdfwd"
trigger2 = root,command != "holdback"
trigger2 = var(27) := 8
trigger2 = var(28) := 12
;2
trigger3 = root,command != "holdup"
trigger3 = root,command  = "holddown"
trigger3 = root,command != "holdfwd"
trigger3 = root,command != "holdback"
trigger3 = var(27) := 2
trigger3 = var(28) := 12

;通常方向--------------------
;9
trigger4 = root,P2Dist X >= 0
trigger4 = root,command  = "holdup"
trigger4 = root,command != "holddown"
trigger4 = root,command  = "holdfwd"
trigger4 = root,command != "holdback"
trigger4 = var(27) := 9
trigger4 = var(28) := 12
;6
trigger5 = root,P2Dist X >= 0
trigger5 = root,command != "holdup"
trigger5 = root,command != "holddown"
trigger5 = root,command  = "holdfwd"
trigger5 = root,command != "holdback"
trigger5 = var(27) := 6
trigger5 = var(28) := 12
;3
trigger6 = root,P2Dist X >= 0
trigger6 = root,command != "holdup"
trigger6 = root,command  = "holddown"
trigger6 = root,command  = "holdfwd"
trigger6 = root,command != "holdback"
trigger6 = var(27) := 3
trigger6 = var(28) := 12

;1
trigger7 = root,P2Dist X >= 0
trigger7 = root,command != "holdup"
trigger7 = root,command  = "holddown"
trigger7 = root,command != "holdfwd"
trigger7 = root,command  = "holdback"
trigger7 = var(27) := 1
trigger7 = var(28) := 20
;4
trigger8 = root,P2Dist X >= 0
trigger8 = root,command != "holdup"
trigger8 = root,command != "holddown"
trigger8 = root,command != "holdfwd"
trigger8 = root,command = "holdback"
trigger8 = var(27) := 4
trigger8 = var(28) := 20
;7
trigger9 = root,P2Dist X >= 0
trigger9 = root,command  = "holdup"
trigger9 = root,command != "holddown"
trigger9 = root,command != "holdfwd"
trigger9 = root,command  = "holdback"
trigger9 = var(27) := 7
trigger9 = var(28) := 20

;追い越し時------------------
;9
trigger10= root,P2Dist X < 0
trigger10= root,command  = "holdup"
trigger10= root,command != "holddown"
trigger10= root,command  = "holdfwd"
trigger10= root,command != "holdback"
trigger10= var(27) := 17
trigger10= var(28) := 12
;6
trigger11= root,P2Dist X < 0
trigger11= root,command != "holdup"
trigger11= root,command != "holddown"
trigger11= root,command  = "holdfwd"
trigger11= root,command != "holdback"
trigger11= var(27) := 14
trigger11= var(28) := 12
;3
trigger12= root,P2Dist X < 0
trigger12= root,command != "holdup"
trigger12= root,command  = "holddown"
trigger12= root,command  = "holdfwd"
trigger12= root,command != "holdback"
trigger12= var(27) := 11
trigger12= var(28) := 12

;1
trigger13= root,P2Dist X < 0
trigger13= root,command != "holdup"
trigger13= root,command  = "holddown"
trigger13= root,command != "holdfwd"
trigger13= root,command  = "holdback"
trigger13= var(27) := 13
trigger13= var(28) := 20
;4
trigger14= root,P2Dist X < 0
trigger14= root,command != "holdup"
trigger14= root,command != "holddown"
trigger14= root,command != "holdfwd"
trigger14= root,command = "holdback"
trigger14= var(27) := 16
trigger14= var(28) := 20
;7
trigger15= root,P2Dist X < 0
trigger15= root,command  = "holdup"
trigger15= root,command != "holddown"
trigger15= root,command != "holdfwd"
trigger15= root,command  = "holdback"
trigger15= var(27) := 19
trigger15= var(28) := 20

IgnoreHitPause = 1
Persistent = 0


;準備中入力初速-----------------
;Nホーミング準備中入力で最初から1段階目の最高速度近く
[State 初速X　ホーミング準備中入力1]
type = VarSet
triggerall = var(29) = 1
trigger1 = root,StateNo = 350
fvar(5) = 12
IgnoreHitPause = 1
Persistent = 0
[State 初速X　ホーミング準備中入力2]
type = VarSet
triggerall = var(29) = 2
trigger1 = root,StateNo = 350
fvar(5) = 13
IgnoreHitPause = 1
Persistent = 0
[State 初速Y　ホーミング準備中入力1]
type = VarSet
triggerall = var(29) = 1
trigger1 = root,StateNo = 350
fvar(6) = 12
IgnoreHitPause = 1
Persistent = 0
[State 初速Y　ホーミング準備中入力2]
type = VarSet
triggerall = var(29) = 2
trigger1 = root,StateNo = 350
fvar(6) = 13
IgnoreHitPause = 1
Persistent = 0

;空レバー入れホーミング準備中入力
[State 初速X　ホーミング準備中入力1]
type = VarAdd
triggerall = var(29) = 1
trigger1 = root,StateNo = 370
fvar(5) = 4
IgnoreHitPause = 1
Persistent = 0
[State 初速X　ホーミング準備中入力2]
type = VarAdd
triggerall = var(29) = 2
trigger1 = root,StateNo = 370
fvar(5) = 4
IgnoreHitPause = 1
Persistent = 0
[State 初速Y　ホーミング準備中入力1]
type = VarAdd
triggerall = var(29) = 1
trigger1 = root,StateNo = 370
fvar(6) = 4
IgnoreHitPause = 1
Persistent = 0
[State 初速Y　ホーミング準備中入力2]
type = VarAdd
triggerall = var(29) = 2
trigger1 = root,StateNo = 370
fvar(6) = 4
IgnoreHitPause = 1
Persistent = 0
;準備中入力初速-----------------

;追加入力加速-------------------------------


;加速-------------------------

[State 追加入力加速X];N1
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 1
trigger1 = var(27) = 5
fvar(5) = 5
Persistent = 0
[State 追加入力加速X];N2
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 2
trigger1 = var(27) = 5
fvar(5) = 5
Persistent = 0
[State 追加入力加速Y];N1
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 1
trigger1 = var(27) = 5
fvar(6) = 5
Persistent = 0
[State 追加入力加速Y];N2
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 2
trigger1 = var(27) = 5
fvar(6) = 5
Persistent = 0


[State 追加入力加速X];レバー後ろ系いれ1
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 1
trigger1 = var(27) = 1
trigger2 = var(27) = 4
trigger3 = var(27) = 7
trigger4 = var(27) = 11
trigger5 = var(27) = 14
trigger6 = var(27) = 17
fvar(5) = -6
Persistent = 0
[State 追加入力加速X];レバー前系いれ1
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 1
trigger1 = var(27) = 3
trigger2 = var(27) = 6
trigger3 = var(27) = 9
trigger4 = var(27) = 13
trigger5 = var(27) = 16
trigger6 = var(27) = 19
fvar(5) = 3
Persistent = 0

[State 追加入力加速X];レバー後ろ系いれ2
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 2
trigger1 = var(27) = 1
trigger2 = var(27) = 4
trigger3 = var(27) = 7
trigger4 = var(27) = 11
trigger5 = var(27) = 14
trigger6 = var(27) = 17
fvar(5) = -6
Persistent = 0
[State 追加入力加速X];レバー前系いれ2
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 2
trigger1 = var(27) = 3
trigger2 = var(27) = 6
trigger3 = var(27) = 9
trigger4 = var(27) = 13
trigger5 = var(27) = 16
trigger6 = var(27) = 19
fvar(5) = 3
Persistent = 0

[State 追加入力加速Y];レバーいれ1
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 1
trigger1 = var(27) = 1
trigger2 = var(27) = 2
trigger3 = var(27) = 3
trigger4 = var(27) = 4
trigger5 = var(27) = 6
trigger6 = var(27) = 7
trigger7 = var(27) = 8
trigger8 = var(27) = 9
trigger9 = var(27) = 11
trigger10= var(27) = 13
trigger11= var(27) = 14
trigger12= var(27) = 16
trigger13= var(27) = 17
trigger14= var(27) = 19
fvar(6) = 3
Persistent = 0

[State 追加入力加速Y];レバーいれ2
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(29) = 2
trigger1 = var(27) = 1
trigger2 = var(27) = 2
trigger3 = var(27) = 3
trigger4 = var(27) = 4
trigger5 = var(27) = 6
trigger6 = var(27) = 7
trigger7 = var(27) = 8
trigger8 = var(27) = 9
trigger9 = var(27) = 11
trigger10= var(27) = 13
trigger11= var(27) = 14
trigger12= var(27) = 16
trigger13= var(27) = 17
trigger14= var(27) = 19
fvar(6) = 3
Persistent = 0


[State 加速X]
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(28) = 0
trigger1 = var(29) = 0 && fvar(5) < 6
trigger2 = var(29) = 1 && fvar(5) < 11
trigger3 = var(29) = 2 && fvar(5) < 14
fvar(5) = 0.075;1
[State 加速Y]
type = VarAdd
triggerall = root,StateNo = 351
triggerall = var(28) = 0
trigger1 = var(29) = 0 && fvar(6) < 6
trigger2 = var(29) = 1 && fvar(6) < 11
trigger3 = var(29) = 2 && fvar(6) < 14
fvar(6) = 0.075;1

[State 速度X最低限度]
type = VarSet
trigger1 = var(29) = 0 && fvar(5) < 2
trigger2 = var(29) = 1 && fvar(5) < 2
trigger3 = var(29) = 2 && fvar(5) < 3
fvar(5) = ifelse(var(29) = 0,2,ifelse(var(29) = 1,3,4))

[State 速度X最高限度]
type = VarSet
trigger1 = var(29) = 0 && fvar(5) > 9
trigger2 = var(29) = 1 && fvar(5) > 11
trigger3 = var(29) = 2 && fvar(5) > 14
fvar(5) = ifelse(var(29) = 0,9,ifelse(var(29) = 1,11,14))
[State 速度Y最高限度]
type = VarSet
trigger1 = var(29) = 0 && fvar(6) > 9
trigger2 = var(29) = 1 && fvar(6) > 11
trigger3 = var(29) = 2 && fvar(6) > 14
fvar(6) = ifelse(var(29) = 0,9,ifelse(var(29) = 1,11,14))

;親速度-------------------------------------




;ポス---------------------------------------
;X----------------------
[State 目標点X　本体と相手との距離補正]
type = null
triggerall = var(28) = 0
trigger1 = root,fvar(4) > 250 && var(7) := 30
trigger2 = root,fvar(4) < 100 && var(7) := -30
[State 目標点X　本体と相手との距離補正]
type = null
triggerall = var(28)
trigger1 = root,fvar(4) > 250 && var(7) := 50
trigger2 = root,fvar(4) < 100 && var(7) := -20

[State 目標点X　本体と相手との距離補正]
type = VarSet
trigger1 = var(28) = 0
trigger1 = root,fvar(4) = [100,250]
var(7) = floor(root,fvar(4)*0.4-70)
[State 目標点X　本体と相手との距離補正]
type = VarSet
trigger1 = var(28)
trigger1 = root,fvar(4) = [100,250]
var(7) = floor(root,fvar(4)*0.4667-66.667)
;Y----------------------
[State 目標点Y　本体と相手との距離補正]
type = null
triggerall = var(28) = 0
trigger1 = root,fvar(4) > 250 && var(8) := 30
trigger2 = root,fvar(4) < 100 && var(8) := -30
[State 目標点Y　本体と相手との距離補正]
type = null
triggerall = var(28)
trigger1 = root,fvar(4) > 250 && var(8) := 100
trigger2 = root,fvar(4) < 100 && var(8) := -5

[State 目標点Y　本体と相手との距離補正]
type = VarSet
trigger1 = var(28) = 0
trigger1 = root,fvar(4) = [100,250]
var(8) = floor(root,fvar(4)*0.4-70)
[State 目標点Y　本体と相手との距離補正]
type = VarSet
trigger1 = var(28)
trigger1 = root,fvar(4) = [100,250]
var(8) = floor(root,fvar(4)*0.7-75)
;-----------------------

[State 目標点　時間補正]
type = VarAdd
trigger1 = var(28) = 0
trigger1 = time > 75
trigger1 = var(9) > -30
var(9) = -1


[State 目標点X　963入力]
type = VarSet
triggerall = root,StateNo = 351
trigger1 = root,var(53) = 0 && root,command ="holdfwd"
var(5) = 75+var(7)+var(9)
[State 目標点X　741入力]
type = VarSet
triggerall = root,StateNo = 351
trigger1 = root,var(53) = 0 && root,command ="holdback"
var(5) = -75-var(7)-var(9)

[State 目標点X　前系限界]
type = VarSet
trigger1 = var(5) > 75+var(7)+var(9)
var(5) = 75+var(7)+var(9)
[State 目標点X　後系限界]
type = VarSet
trigger1 = var(5) < -75-var(7)-var(9)
var(5) = -75-var(7)-var(9)


[State 目標点Y　789入力]
type = VarSet
triggerall = root,StateNo = 351
trigger1 = root,var(53) = 0 && root,command ="holdup"
var(6) = -60-var(8)-var(9)
[State 目標点Y　123入力]
type = VarSet
triggerall = root,StateNo = 351
trigger1 = root,var(53) = 0 && root,command ="holddown"
var(6) = 60+var(8)+var(9)

[State 目標点Y　上系限界]
type = VarSet
trigger1 = var(6) < -60-var(8)-var(9)
var(6) = -60-var(8)-var(9)
[State 目標点Y　下系限界]
type = VarSet
trigger1 = var(6) > 60+var(8)+var(9)
var(6) = 60+var(8)+var(9)

[State 目標点X　原点付近オフセット]
type = VarSet
triggerall = root,P2Dist X >= 0
triggerall = var(5) = [-20,-5]
triggerall = var(5) != -15
trigger1 = root,var(53) = 0 && root,command !="holdfwd"
trigger1 = root,var(53) = 0 && root,command !="holdback"
var(5) = -15
[State 目標点X　原点付近オフセット]
type = VarSet
triggerall = root,P2Dist X < 0
triggerall = var(5) = [5,20]
triggerall = var(5) != 15
trigger1 = root,var(53) = 0 && root,command !="holdfwd"
trigger1 = root,var(53) = 0 && root,command !="holdback"
var(5) = 15
;[State 目標点X　原点付近オフセット]
;type = VarSet
;triggerall = var(5) = [-10,10]
;triggerall = var(5) != 0
;trigger1 = root,var(53) = 0 && root,command !="holdfwd"
;trigger1 = root,var(53) = 0 && root,command !="holdback"
;var(5) = 0
[State 目標点X　戻り-]
type = VarAdd
triggerall = var(5) > ifelse(root,P2Dist X>=0,-15,15)
trigger1 = root,var(53) = 0 && root,command !="holdfwd"
var(5) = -5

[State 目標点X　戻り+]
type = VarAdd
triggerall = var(5) < ifelse(root,P2Dist X>=0,-15,15)
trigger1 = root,var(53) = 0 && root,command !="holdback"
var(5) = 5


[State 目標点Y　原点付近オフセット]
type = VarSet
triggerall = var(6) = [-10,10]
triggerall = var(6) != 0
trigger1 = root,var(53) = 0 && root,command !="holdup"
trigger1 = root,var(53) = 0 && root,command !="holddown"
var(6) = 0
[State 目標点Y　戻り+]
type = VarAdd
triggerall = var(6) < 0
trigger1 = root,var(53) = 0 && root,command !="holdup"
var(6) = 5
[State 目標点Y　戻り-]
type = VarAdd
triggerall = var(6) > 0
trigger1 = root,var(53) = 0 && root,command !="holddown"
var(6) = -5

[State ポス]
type = PosSet
trigger1 = root,StateNo = 351
trigger2 = root,StateNo = 320
x = EnemyNear, Pos X + var(5)*facing
y = EnemyNear, Pos Y + var(6) -30

;ポス---------------------------------------

[State タイム代用];追加入力se用
type = VarAdd
trigger1 = 1
var(35) = 1
IgnoreHitPause = 1
[State タイム代用リセット]
type = VarSet
trigger1 = var(29) = 1
var(35) = 0
IgnoreHitPause = 1
Persistent = 0
[State タイム代用リセット]
type = VarSet
trigger1 = var(29) = 2
var(35) = 0
IgnoreHitPause = 1
Persistent = 0

[State 追加入力タイム代用　カウントダウン]
type = VarAdd
trigger1 = var(28) > 0
var(28) = -1
IgnoreHitPause = 1

[State 追加入力時レバー判別リセット]
type = VarSet
trigger1 = var(28) = 0
trigger1 = var(27) != 0
var(27) = 0

[State ターン]
type = Turn
trigger1 = facing != root,facing
trigger1 = var(27) = 0

[State デス]
type = DestroySelf
trigger1 = NumEnemy = 0
trigger2 = root,StateNo = 352
trigger3 = root,StateNo != 320
trigger3 = root,StateNo != [350,399]
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;前地上レバーホーミング始動
;---------------------------------------------------------------------------
[Statedef 360]
type 		= S
movetype 	= I
physics 	= N
VelSet 		= 0,0

;エフェクト消去----------------------
[State 5A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 207
[State 6A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 217
[State 5B　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 225
[State 3B　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 235
[State 3B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 237
[State 5C　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 245
[State 5C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 247

[State 5E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 311
[State 5E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 312
[State 2E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 315
[State 2E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 316

[State 2A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 407
[State 3A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 417
[State 2B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 427
[State 2C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 447

[State 1E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 461
[State 1E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 462

[State N投げ　鞘エフェクト]
type = removeExplod
trigger1 = time = 0
ID = 710

[State 閏間　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 1171
[State 閏間　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 1172
[State 閏間　剣オーラ3]
type = removeExplod
trigger1 = time = 0
ID = 1173
[State 閏間　剣オーラ4]
type = removeExplod
trigger1 = time = 0
ID = 1174

[State A斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1206
[State A斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1207
[State B斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1216
[State B斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1217
[State C斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1226
[State C斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1227

[State C吐切　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 1463
[State C吐切　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 1464

[State 影宿　剣オーラelem1]
type = removeExplod
trigger1 = time = 0
ID = 2071
[State 影宿　剣オーラelem2]
type = removeExplod
trigger1 = time = 0
ID = 2072
[State 影宿　剣オーラelem3]
type = removeExplod
trigger1 = time = 0
ID = 2073
[State 影宿　剣オーラelem4]
type = removeExplod
trigger1 = time = 0
ID = 2074

[State 枯霊　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 2261
[State 枯霊　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 2262
[State 枯霊　剣オーラ3]
type = removeExplod
trigger1 = time = 0
ID = 2263

;エフェクト消去----------------------

[State アニメ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 320
value = 361
[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = 1
var(24) = 1
[State アニメ　相殺後]
type = ChangeAnim
trigger1 = PrevStateNo = 320
trigger1 = var(24) = 9
trigger1 = AnimElemTime(3) < 0
value = anim
elem = 3

;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(33) = 1

[State ホーミングゲージ消費]
type = VarAdd
triggerall = PrevStateNo != 320
trigger1 = time = 0
;trigger1 = var(46) = 0
;trigger2 = var(46) = 5
;trigger3 = var(46) = 3 && !ctrl
;trigger4 = var(46) = 6 && !ctrl
;trigger5 = var(58) = 3
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0

[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = var(46) = 0 && !ctrl
trigger2 = var(46) = 5 && !ctrl
trigger3 = var(58) = 3 && (var(46)=0||var(46) = 5)
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State seホーミング]
type = PlaySnd
triggerall = PrevStateNo != 320
trigger1 = time = 0
trigger1 = var(58) != 3
value = s2,0
channel = 1

[State seホーミング　時　虚空の意]
type = PlaySnd
triggerall = PrevStateNo != 320
trigger1 = time = 0
trigger1 = var(58) = 3
value = s0,11
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
triggerall = PrevStateNo != 320
trigger1 = time = 0
StateNo 		= 20950
ID 				= ifelse(var(58)=3,352,ifelse(!ctrl,351,350))
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State コントロール不可]
type = CtrlSet
trigger1 = time = 0
value = 0

[State 時カナ　虚空の意]
type = ChangeState
trigger1 = var(58) = 3
value = 43010

[State 地上ホーミング移動へ]
type = ChangeState
trigger1 = AnimElemTime(3) >= 0
trigger2 = AnimTime = 0
value = 363

[State 雷　キァルトヴェルサ（フォース）対打撃・飛び道具　相殺成功へ]
type = HitOverride
trigger1 = var(58) = 2
trigger1 = var(47)
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;後ろ地上レバーホーミング始動
;---------------------------------------------------------------------------
[Statedef 361]
type 		= A
movetype 	= I
physics 	= N
VelSet 		= 0,0
anim 		= 360

;エフェクト消去----------------------
[State 5A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 207
[State 6A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 217
[State 5B　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 225
[State 3B　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 235
[State 3B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 237
[State 5C　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 245
[State 5C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 247

[State 5E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 311
[State 5E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 312
[State 2E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 315
[State 2E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 316

[State 2A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 407
[State 3A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 417
[State 2B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 427
[State 2C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 447

[State 1E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 461
[State 1E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 462

[State N投げ　鞘エフェクト]
type = removeExplod
trigger1 = time = 0
ID = 710

[State 閏間　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 1171
[State 閏間　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 1172
[State 閏間　剣オーラ3]
type = removeExplod
trigger1 = time = 0
ID = 1173
[State 閏間　剣オーラ4]
type = removeExplod
trigger1 = time = 0
ID = 1174

[State A斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1206
[State A斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1207
[State B斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1216
[State B斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1217
[State C斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1226
[State C斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1227

[State C吐切　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 1463
[State C吐切　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 1464

[State 影宿　剣オーラelem1]
type = removeExplod
trigger1 = time = 0
ID = 2071
[State 影宿　剣オーラelem2]
type = removeExplod
trigger1 = time = 0
ID = 2072
[State 影宿　剣オーラelem3]
type = removeExplod
trigger1 = time = 0
ID = 2073
[State 影宿　剣オーラelem4]
type = removeExplod
trigger1 = time = 0
ID = 2074

[State 枯霊　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 2261
[State 枯霊　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 2262
[State 枯霊　剣オーラ3]
type = removeExplod
trigger1 = time = 0
ID = 2263

;エフェクト消去----------------------

;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(33) = 1

[State ホーミングゲージ消費]
type = VarAdd
trigger1 = time = 0
;trigger1 = var(46) = 0
;trigger2 = var(46) = 5
;trigger3 = var(46) = 3 && !ctrl
;trigger4 = var(46) = 6 && !ctrl
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0

[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = time = 0
trigger1 = var(46) = 0 && !ctrl
trigger2 = var(46) = 5 && !ctrl
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State seホーミング]
type = PlaySnd
trigger1 = time = 0
value = s2,0
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
trigger1 = time = 0
StateNo 		= 20950
ID 				= ifelse(!ctrl,351,350)
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State コントロール不可]
type = CtrlSet
trigger1 = time = 0
value = 0

[State 無敵　打・飛]
type = NotHitBy
trigger1 = 1
value = ,AA,AP
time = 10

[State 速度]
type = VelSet
trigger1 = 1
x = -5

[State 後ろ地上レバーホーミング待機へ]
type = ChangeState
trigger1 = animtime = 0
value = 362

;---------------------------------------------------------------------------
;後ろ地上レバーホーミング待機
;---------------------------------------------------------------------------
[Statedef 362]
type 		= A
movetype 	= I
physics 	= N
VelSet 		= 0,0
ctrl 		= 0

[State アニメ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 320
value = 361
[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = 1
var(24) = 1
[State アニメ　相殺後]
type = ChangeAnim
trigger1 = PrevStateNo = 320
trigger1 = var(24) = 9
trigger1 = AnimElemTime(3) < 0
value = anim
elem = 3

[State 0へ]
type = ChangeState
triggerall = var(53) = 0
triggerall = AnimElemTime(3) >= 0
trigger1 = command != "holdx"
trigger2 = var(15) != 0 || var(16) != 0
value = 0
ctrl = 1

[State 雷　キァルトヴェルサ（フォース）対打撃・飛び道具　相殺成功へ]
type = HitOverride
trigger1 = var(58) = 2
trigger1 = var(47)
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

[State 地上ホーミング移動へ]
type = ChangeState
trigger1 = AnimElemTime(3) >= 0
trigger2 = AnimTime = 0
value = 363

;---------------------------------------------------------------------------
;地上ホーミング移動
;---------------------------------------------------------------------------
[Statedef 363]
type 		= S
movetype 	= I
physics 	= N

[State アニメ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 320
value = 362

[State 速度X]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = time = 0
trigger1 = PrevStateNo = 360
x = 8.0
[State 速度X]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = time = 0
trigger1 = PrevStateNo = 362
x = 6.0

[State 速度X]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = time = 0
trigger1 = PrevStateNo = 381
x = vel X + 1.0
[State 速度X]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = time = 0
trigger1 = PrevStateNo = 388
x = vel X + 2.0

[State 速度X限度]
type = VelAdd
trigger1 = time >= 1
trigger1 = Vel X < 10
x = 0.05
[State 速度X限度]
type = VelSet
trigger1 = Vel X > 10
x = 10

[State seホーミング]
type = PlaySnd
trigger1 = time%15 = 0
value = s2,3

[State dust1]
type = Explod
triggerall = PrevStateNo != 320
trigger1 = time = 0
anim 			= 20990
postype 		= p1
pos 			= 0, 0
bindtime 		= 1
scale 			= 0.5,0.5
ownpal 			= 1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
sprpriority 	= 3
IgnoreHitPause = 1
Persistent = 0
[State dust1]
type = Explod
trigger1 = time >= 1
trigger1 = time%6 = 0
anim 			= 20990
postype 		= p1
pos 			= -60, 0
bindtime 		= 1
scale 			= 0.5,0.5
ownpal 			= 1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
sprpriority 	= 3
IgnoreHitPause = 1
Persistent = 1

[State 雷　キァルトヴェルサ（フォース）対打撃・飛び道具　相殺成功へ]
type = HitOverride
trigger1 = var(58) = 2
trigger1 = var(47)
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

[State 地上レバーホーミング停止へ]
type = ChangeState
triggerall = var(53) = 0
triggerall = time >= 5
trigger1 = var(15) != 0 || var(16) != 0
trigger2 = command != "holdx"
;trigger2 = command = "holdback"
value = 364

;---------------------------------------------------------------------------
;地上レバーホーミング停止
;---------------------------------------------------------------------------
[Statedef 364]
type 		= S
physics 	= S
faceP2 		= 1
anim 		= 363
ctrl 		= 1

[State 状態]
type = StateTypeSet
Trigger1 = Time = 0
trigger1 = command = "holddown"
StateType = C
Physics = C

[State dust2]
type = Explod
trigger1 = time = 0
anim 			= 20992
postype 		= p1
pos 			= 40, 0
facing 			= -1
bindtime 		= 1
scale 			= 0.5,0.3
ownpal 			= 1
sprpriority 	= 3
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State ポス]
type = PosSet
trigger1 = Time = 0
y = 0

[State 歩けない] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 振り向かない] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State Stand to Crouchへ]
type = ChangeState
trigger1 = command = "holddown"
trigger1 = Animtime = 0
value = 10
ctrl = 1

[State 0へ]
type = ChangeState
trigger1 = command != "holddown"
trigger1 = Animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;空中レバーホーミング始動
;---------------------------------------------------------------------------
[Statedef 370]
type 		= A
movetype 	= I
physics 	= N
VelSet 		= 0,0

;エフェクト消去----------------------
[State j_5A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 607
[State j_6A　剣オーラ]
type = removeExplod
trigger1 = time = 0
ID = 617
[State j_5B　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 625
[State j_5B　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 627
[State j_5C　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 645
[State j_5C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 647
[State j_6C　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 655
[State j_6C　剣オーラ2]
type = removeExplod
trigger1 = time = 0
ID = 657
[State j_5E　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 661
[State j_5E　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 662

[State j_投げ　剣閃・剣オーラエフェクト]
type = removeExplod
trigger1 = time = 0
ID = 760

[State 空中AB斯封派生　鞘エフェクト1]
type = removeExplod
trigger1 = time = 0
ID = 1236
[State 空中AB斯封派生　鞘エフェクト2]
type = removeExplod
trigger1 = time = 0
ID = 1237

[State 天鎖　剣オーラelem1]
type = removeExplod
trigger1 = time = 0
ID = 1351
[State 天鎖　剣オーラelem2]
type = removeExplod
trigger1 = time = 0
ID = 1352
[State 天鎖　剣オーラelem3]
type = removeExplod
trigger1 = time = 0
ID = 1353
[State 天鎖　剣オーラelem4]
type = removeExplod
trigger1 = time = 0
ID = 1354

[State 逝斬　剣オーラ1]
type = removeExplod
trigger1 = time = 0
ID = 2151

;エフェクト消去----------------------

[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = 1
var(24) = 1
[State アニメ　相殺後];ここから
type = ChangeAnim
trigger1 = PrevStateNo = 320
trigger1 = var(24) = 9
trigger1 = AnimElemTime(3) < 0
value = anim
elem = 3

;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(33) = 1

[State ホーミングゲージ消費]
type = VarAdd
triggerall = PrevStateNo != 320
trigger1 = time = 0
;trigger1 = var(46) = 0
;trigger2 = var(46) = 5
;trigger3 = var(46) = 3 && !ctrl
;trigger4 = var(46) = 6 && !ctrl
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0

[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = var(46) = 0 && !ctrl
trigger2 = var(46) = 5 && !ctrl
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State seホーミング]
type = PlaySnd
triggerall = PrevStateNo != 320
trigger1 = time = 0
value = s2,0
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
triggerall = PrevStateNo != 320
trigger1 = time = 0
StateNo 		= 20950
ID 				= ifelse(!ctrl,351,350)
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
OwnPal 			= var(58) = 6
IgnoreHitPause = 1
Persistent = 0

[State コントロール不可]
type = CtrlSet
trigger1 = time = 0
value = 0

[State 風カナ　ヴェロクス]
type = ChangeState
triggerall = var(58) = 6
triggerall = time = 0
trigger1 = var(53) = 0
trigger1 = command  = "holddown"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
value = 46010

;後ろ系		無敵時間有
;下・横系	限界高度有
;上系		重力有

[State ホーミング目標点]
Type = Helper
Trigger1 = NumHelper(355) = 0
Trigger1 = time = 0
StateNo 		= 355
ID 				= 355
name 			= "mokuhyouten"
PosType 		= P1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

;アニメ-------------------------
[State 6]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command = "holdfwd" && command != "holdup" && command != "holddown"
value = 370
IgnoreHitPause = 1
Persistent = 0
[State 3]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command = "holdfwd" && command = "holddown"
value = 371
IgnoreHitPause = 1
Persistent = 0
[State 2]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command != "holdfwd" && command != "holdback" && command = "holddown"
value = 372
IgnoreHitPause = 1
Persistent = 0
[State 1]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command = "holdback" && command = "holddown"
value = 373
IgnoreHitPause = 1
Persistent = 0
[State 4]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command = "holdback" && command != "holdup" && command != "holddown"
value = 374
IgnoreHitPause = 1
Persistent = 0
[State 7]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command = "holdback" && command = "holdup"
value = 375
IgnoreHitPause = 1
Persistent = 0
[State 8]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command != "holdfwd" && command != "holdback" && command = "holdup"
value = 376
IgnoreHitPause = 1
Persistent = 0
[State 9]
type = ChangeAnim
triggerall = var(53) = 0
triggerall = PrevStateNo != 320
triggerall = time = 0
trigger1 = command = "holdfwd" && command = "holdup"
value = 377
IgnoreHitPause = 1
Persistent = 0

;アニメ-------------------------

;速度---------------------------

[State 6]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 370 && time = 0
x = 5
y = 0
IgnoreHitPause = 1
[State 3]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 371 && time = 0
x = 5
y = 5
IgnoreHitPause = 1
[State 2]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 372 && time = 0
x = 0
y = 5
IgnoreHitPause = 1
[State 1]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 373 && time = 0
x = -5
y = 5
IgnoreHitPause = 1
[State 4]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 374 && time = 0
x = -5
y = 0
IgnoreHitPause = 1
[State 7]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 375 && time = 0
x = -5
y = -5
IgnoreHitPause = 1
[State 8]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 376 && time = 0
x = 0
y = -5
IgnoreHitPause = 1
[State 9]
type = VelSet
triggerall = PrevStateNo != 320
trigger1 = Anim = 377 && time = 0
x = 5
y = -5
IgnoreHitPause = 1

[State ]
type = VelMul
trigger1 = var(24) > 10
trigger1 = vel X < 0
x = 0.9
IgnoreHitPause = 1
Persistent = 1

[State 重力]
type = Gravity
Triggerall = var(24) > 7
trigger1 = Anim = 375
trigger2 = Anim = 376
trigger3 = Anim = 377

;速度---------------------------

[State ポスY限界]
type = PosSet
trigger1 = Pos Y >= -10
y = -10

[State ホーミング終了へ]
type = ChangeState
triggerall = Pos Y >= -10
trigger1 = Animtime = 0;time = 18
trigger2 = var(24) >= 19;time = 18
value = 352

[State ホーミング移動へ]
type = ChangeState
trigger1 = Animtime = 0;time = 18
trigger2 = var(24) >= 19;time = 18
value = 351

[State 雷　キァルトヴェルサ（フォース）対打撃・飛び道具　相殺成功へ]
type = HitOverride
trigger1 = var(58) = 2
trigger1 = var(47)
Trigger1 = var(24)
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;ガーキャン前地上ホーミング始動
;---------------------------------------------------------------------------
[Statedef 380]
type 		= S
movetype 	= I
physics 	= N
VelSet 		= 0,0
ctrl 		= 0

;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(33) = 1

[State ホーミングゲージ消費]
type = VarAdd
trigger1 = time = 0
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0

[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = time = 0
trigger1 = var(46) = 0
trigger2 = var(46) = 5
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State seホーミング]
type = PlaySnd
trigger1 = time = 0
value = s2,0
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
trigger1 = time = 0
trigger1 = var(58) != 6
StateNo 		= 20950
ID 				= 380
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State 風カナ　スクトゥム]
type = ChangeState
trigger1 = var(58) = 6
trigger1 = time = 0
value = 46020

[State ガーキャンシールドエフェクト]
Type = Helper
Trigger1 = NumHelper(340) = 0
Trigger1 = time = 0
StateNo 		= 340
ID 				= 340
name 			= "6D efect"
PosType 		= P1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State アニメ]
type = ChangeAnim
trigger1 = 1
value = anim
elem = AnimElemNo(0)

[State ガーキャン地上ホーミング移動へ]
type = ChangeState
trigger1 = time >= 5
trigger1 = var(8) <= 0
value = 381


;---------------------------------------------------------------------------
;ガーキャン地上ホーミング移動
;---------------------------------------------------------------------------
[Statedef 381]
type 		= S
movetype 	= I
physics 	= N

[State アニメ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 320
value = 381

[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = time >= 1
var(24) = 1

[State 速度X]
type = VelSet
trigger1 = time = 0
Trigger1 = PrevStateno != 320
x = 1.0

[State 速度X限度]
type = VelAdd
trigger1 = time >= 1
trigger1 = Vel X < 8
x = 0.1
[State 速度X限度]
type = VelSet
trigger1 = Vel X > 8
x = 8.0

[State seホーミング]
type = PlaySnd
trigger1 = GameTime%15 = 0
value = s2,3

[State 相殺一時ステートへ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

[State 地上ホーミング移動]
type = ChangeState
trigger1 = var(24) >= 23
value = 363




;---------------------------------------------------------------------------
;ガーキャン後ろ地上レバーホーミング　始動
;---------------------------------------------------------------------------
[Statedef 385]
type 		= U
movetype 	= I
physics 	= U
ctrl 		= 0

;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(33) = 1

[State ホーミングゲージ消費]
type = VarAdd
trigger1 = time = 0
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0

[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = time = 0
trigger1 = var(46) = 0
trigger2 = var(46) = 5
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State seホーミング]
type = PlaySnd
trigger1 = time = 0
value = s2,0
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
trigger1 = time = 0
StateNo 		= 20950
ID 				= 380
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State アニメ]
type = ChangeAnim
trigger1 = 1
value = anim
elem = AnimElemNo(0)

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State ガーキャン後ろ地上レバーホーミング　バックステップへ]
type = ChangeState
trigger1 = var(8) <= 0
value = 386

;---------------------------------------------------------------------------
;ガーキャン後ろ地上レバーホーミング　バックステップ
;---------------------------------------------------------------------------
[Statedef 386]
type 		= A
movetype 	= I
physics 	= N
anim 		= 386
ctrl 		= 0

[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = 1
var(24) = 1

[State seステップ]
type = PlaySnd
trigger1 = time = 0
value = s0,4
channel = 3

[State 速度]
type = VelSet
trigger1 = time = 0
x = -4
y = -5

[State 加速度]
type = VelAdd
trigger1 = Vel y <= 0
y = 0.35
[State 加速度]
type = VelAdd
trigger1 = Vel y > 0
y = const(movement.yaccel)

[State 減速]
type = VelMul
trigger1 = AnimElemTime(2) = 1
x = 0.65

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
[State 無敵]
type = NotHitBy
trigger1 = time = 0
value2 = SCA
time = 22

[State ガーキャン後ろ地上レバーホーミング着地]
type = ChangeState
trigger1 = (pos y >= 0) && (vel y > 0)
trigger1 = command != "holdx"
value = 387

[State ガーキャン後ろ地上レバーホーミング待機へ]
type = ChangeState
trigger1 = (pos y >= 0) && (vel y > 0)
value = 388


;---------------------------------------------------------------------------
;ガーキャン後ろ地上レバーホーミング　バックステップ着地
;---------------------------------------------------------------------------
[Statedef 387]
type 		= S
movetype 	= I
physics 	= S
VelSet 		= 0,0
ctrl 		= 0
anim 		= 387

[State 歩き禁止]
type = AssertSpecial
trigger1 = 1
flag  = NoWalk

[State 無敵]
type = NotHitBy
trigger1 = AnimElemTime(2) < 0
value = SCA
time = 1

[State se靴音]
type = PlaySnd
trigger1 = time = 0
value = s0,2
channel = 4
persistent = 0

[State ポス]
type = PosSet
trigger1 = time = 0
y = 0

[State コントロール]
type = CtrlSet
trigger1 = time = 1
value = 1

[State 0へ]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ガーキャン後ろ地上レバーホーミング　待期
;---------------------------------------------------------------------------
[Statedef 388]
type 		= S
movetype 	= I
physics 	= N
VelSet 		= 0,0
ctrl 		= 0
anim 		= 388

[State ポス]
type = PosSet
trigger1 = time = 0
y = 0

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 地上ホーミングダッシュ移動へ]
type = ChangeState
trigger1 = AnimTime = 0
value = 363

;---------------------------------------------------------------------------
;ガーキャン前空中ホーミング始動
;---------------------------------------------------------------------------
[Statedef 390]
type 		= A
movetype 	= I
physics 	= N
VelSet 		= 0,0
ctrl 		= 0

[State アニメ]
type = ChangeAnim
trigger1 = 1
value = anim
elem = AnimElemNo(0)

;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(33) = 1

[State ホーミングゲージ消費]
type = VarAdd
trigger1 = time = 0
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0

[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = time = 0
trigger1 = var(46) = 0
trigger2 = var(46) = 5
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State seホーミング]
type = PlaySnd
trigger1 = time = 0
value = s2,0
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
trigger1 = time = 0
trigger1 = var(58) != 6
StateNo 		= 20950
ID 				= 380
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State 風カナ　スクトゥム]
type = ChangeState
trigger1 = var(58) = 6
trigger1 = time = 0
value = 46020

[State ガーキャンシールドエフェクト]
Type = Helper
Trigger1 = NumHelper(340) = 0
Trigger1 = time = 0
StateNo 		= 340
ID 				= 340
name 			= "6D efect"
PosType 		= P1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State ガーキャン空中前ホーミング移動へ]
type = ChangeState
trigger1 = time >= 5
trigger1 = var(8) <= 0
value = 391

;---------------------------------------------------------------------------
;ガーキャン空中前ホーミング移動
;---------------------------------------------------------------------------
[Statedef 391]
type 		= A
movetype 	= I
physics 	= N

[State アニメ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 320
value = 391

;ジャンプ用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = 1
var(29) = 1

[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = time >= 1
var(24) = 1

[State 速度X]
type = VelSet
trigger1 = time = 0
x = 1.0
[State 速度X限度]
type = VelAdd
trigger1 = time >= 1
trigger1 = Vel X < 4
x = 0.05
[State 速度X限度]
type = VelSet
trigger1 = Vel X > 4
x = 4.0

[State 速度Y]
type = VelSet
trigger1 = time = 0
trigger1 = P2Dist Y >= -50
y = -1
[State 速度Y]
type = VelSet
trigger1 = time = 0
trigger1 = P2Dist Y = [-50,50]
y = 0
[State 速度Y]
type = VelSet
trigger1 = time = 0
trigger1 = P2Dist Y >= 50
y = 1



[State seホーミング]
type = PlaySnd
trigger1 = GameTime%15 = 0
value = s2,3

[State ホーミング目標点]
Type = Helper
Trigger1 = NumHelper(355) = 0
trigger1 = time = 0
StateNo 		= 355
ID 				= 355
name 			= "mokuhyouten"
PosType 		= P1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State 相殺一時ステートへ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP
stateno = 320
time = 1
IgnoreHitPause = 1

[State ホーミング移動へ]
type = ChangeState
trigger1 = var(24) >= 23
value = 351

;---------------------------------------------------------------------------
;ガーキャン後ろ空中レバーホーミング始動
;---------------------------------------------------------------------------
[Statedef 395]
type 		= A
movetype 	= I
physics 	= N
VelSet 		= 0,0
ctrl 		= 0
anim 		= 395


[State 進行状況リセット]
type = VarSet
trigger1 = time = 0
trigger1 = PrevStateNo != 320
var(24) = 0
[State 進行状況]
type = VarAdd
trigger1 = time >= 1
var(24) = 1

;空中後ろガーキャン用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(32) = 1
;ホーミング用
[State レバー＆ボタン入力解除用]
type = VarSet
trigger1 = time = 0
var(33) = 1

[State ホーミングゲージ消費]
type = VarAdd
trigger1 = time = 0
fvar(25) = -1000
IgnoreHitPause = 1
Persistent = 0
[State ホーミング回復開始待ち時間]
type = VarSet
triggerall = time = 0
trigger1 = var(46) = 0
trigger2 = var(46) = 5
var(30) = 120
IgnoreHitPause = 1
Persistent = 0

[State seホーミング]
type = PlaySnd
trigger1 = time = 0
value = s2,0
channel = 1

[State ホーミング発動エフェクトセット]
Type = Helper
trigger1 = time = 0
StateNo 		= 20950
ID 				= 380
name 			= "homing sidou"
PosType 		= P1
Pos 			= 0,-70
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 速度]
type = VelSet
trigger1 = time = 0
x = -4

[State 減速]
type = VelMul
trigger1 = time = 6
x = 0.65

[State ホーミング終了へ]
type = ChangeState
triggerall = var(53) = 0
triggerall = Animtime = 0
trigger1 = Pos Y >= -10
value = 352

[State ホーミング目標点]
Type = Helper
Trigger1 = NumHelper(355) = 0
trigger1 = time = 0
StateNo 		= 355
ID 				= 355
name 			= "mokuhyouten"
PosType 		= P1
SuperMoveTime 	= 999999999999
PauseMoveTime 	= 999999999999
IgnoreHitPause = 1
Persistent = 0

[State ホーミング移動へ]
type = ChangeState
trigger1 = Animtime = 0
value = 351