;---------------------------------------------------------------------------
; ヘルパー関連
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; 昇華演出
[Statedef 2500]
anim = 10000
ctrl = 0

[State 2500, 1]
type = AssertSpecial
trigger1 = 1
flag = NoFG

[State 2500, 2]
type = Pause
trigger1 = Time = 0
time = 33
movetime = 33

[State 2500, 3]
type = EnvColor
trigger1 = Time = 0
time = 35
value = 0,0,0
under = 1

[State 2500, 4]
type = AllPalFx
trigger1 = Time = 0
trigger2 = Time = 34
add = 256,256,256
time = 1

[State 2500, 5]
type = Explod
trigger1 = Time = 0
trigger1 = Root,Facing = 1
anim = 10100
pos = 8,8
postype = Left
scale = Root,FVar(6),1
ownpal = 1
sprpriority = -2
removetime = 33
pausemovetime = 999999999
supermovetime = 999999999

[State 2500, 6]
type = Explod
trigger1 = Time = 0
trigger1 = Root,Facing = 1
anim = 10101
pos = 8,17
postype = Left
scale = Root,FVar(6),1
ownpal = 1
sprpriority = -1
removetime = 33
pausemovetime = 999999999
supermovetime = 999999999

[State 2500, 7]
type = Explod
trigger1 = Time = 0
trigger1 = Root,Facing = -1
anim = 10100
pos = -8,8
postype = Right
scale = Root,FVar(6),1
facing = -1
ownpal = 1
sprpriority = -2
removetime = 33
pausemovetime = 999999999
supermovetime = 999999999

[State 2500, 8]
type = Explod
trigger1 = Time = 0
trigger1 = Root,Facing = -1
anim = 10101
pos = -8,17
postype = Right
scale = Root,FVar(6),1
facing = -1
ownpal = 1
sprpriority = -1
removetime = 33
pausemovetime = 999999999
supermovetime = 999999999

[State 2500, 9]
type = DestroySelf
trigger1 = Time = 35

;---------------------------------------------------------------------------
; 狡兎・月隠（一撃目動作）
[Statedef 3003]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 3003
ctrl = 0
poweradd = 0
sprpriority = 2

[State 3003, 1]
type = AssertSpecial
trigger1 = 1
flag = NoFG

[State 3003, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 3003, 3]
type = PosSet
trigger1 = Time = 0
x = Root,Pos X - (20 * Facing)
y = Root,Pos Y + 60

[State 3003, 4]
type = VelSet
trigger1 = Time = 1
x = 5.0
y = -3.0

[State 3003, 5]
type = VelAdd
trigger1 = Time > 0
x = 0.25
y = -0.1

[State 3003, 6]
type = AfterImage
trigger1 = Time = 0
time = 20
palbright = 0,0,0
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 2
length = 6
trans = add1

[State 3003, 7]
type = Helper
trigger1 = AnimElemTime(10) = 0
stateno = 13000
id = 13002
pos = 0,-10
postype = P1
helpertype = Normal
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999999999
supermovetime = 999999999

[State 3003, 8]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S8,0+(Random%2)

[State 3003, 9]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; 狡兎・月隠（二撃目動作）
[Statedef 3004]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 3004
ctrl = 0
poweradd = 0
sprpriority = 2

[State 3004, 1]
type = AssertSpecial
trigger1 = 1
flag = NoFG

[State 3004, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 3004, 3]
type = PosSet
trigger1 = Time = 0
x = Root,Pos X - (140 * Facing)
y = Root,Pos Y - 20

[State 3004, 4]
type = VelSet
trigger1 = Time = 1
x = 3.5

[State 3004, 5]
type = VelAdd
trigger1 = Time > 0
x = 0.75

[State 3004, 6]
type = AfterImage
trigger1 = Time = 0
time = 20
palbright = 0,0,0
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 2
length = 6
trans = add1

[State 3004, 7]
type = Helper
trigger1 = AnimElemTime(10) = 0
stateno = 13000
id = 13003
pos = 0,-40
postype = P1
helpertype = Normal
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999999999
supermovetime = 999999999

[State 3004, 8]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S8,0+(Random%2)

[State 3004, 9]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S0,0+(Random%4)

[State 3004, 10]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; 狡兎・月隠（三撃目動作）
[Statedef 3005]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 3005
ctrl = 0
poweradd = 0
sprpriority = 2

[State 3005, 1]
type = AssertSpecial
trigger1 = 1
flag = NoFG

[State 3005, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 3005, 3]
type = PosSet
trigger1 = Time = 0
x = Root,Pos X - (20 * Facing)
y = Root,Pos Y - 50

[State 3005, 4]
type = VelSet
trigger1 = Time = 1
x = 6.0
y = 2.5

[State 3005, 5]
type = VelAdd
trigger1 = Time > 1
y = 0.15

[State 3005, 6]
type = AfterImage
trigger1 = Time = 0
time = 20
palbright = 0,0,0
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 2
length = 6
trans = add1

[State 3005, 7]
type = Helper
trigger1 = AnimElemTime(10) = 0
stateno = 13000
id = 13004
pos = 0,-50
postype = P1
helpertype = Normal
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999999999
supermovetime = 999999999

[State 3005, 8]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S8,0+(Random%2)

[State 3005, 9]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S0,0+(Random%4)

[State 3005, 10]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; 狡兎・月隠（四撃目動作）
[Statedef 3006]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 3006
ctrl = 0
poweradd = 0
sprpriority = 2

[State 3006, 1]
type = AssertSpecial
trigger1 = 1
flag = NoFG

[State 3006, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 3006, 3]
type = PosSet
trigger1 = Time = 0
x = Root,Pos X - (130 * Facing)
y = Root,Pos Y + 50

[State 3006, 4]
type = VelSet
trigger1 = Time = 1
x = 1.0
y = -6.0

[State 3006, 5]
type = VelAdd
trigger1 = Time > 0
x = 0.1
y = -0.3

[State 3006, 6]
type = AfterImage
trigger1 = Time = 0
time = 20
palbright = 0,0,0
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 2
length = 6
trans = add1

[State 3006, 7]
type = Helper
trigger1 = AnimElemTime(10) = 0
stateno = 13000
id = 13005
pos = 30,-10
postype = P1
helpertype = Normal
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999999999
supermovetime = 999999999

[State 3006, 8]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S8,0+(Random%2)

[State 3006, 9]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S0,0+(Random%4)

[State 3006, 10]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; 狡兎・月隠（五撃目動作）
[Statedef 3007]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 3007
ctrl = 0
poweradd = 0
sprpriority = 2

[State 3007, 1]
type = AssertSpecial
trigger1 = 1
flag = NoFG

[State 3007, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 3007, 3]
type = PosSet
trigger1 = Time = 0
x = Root,Pos X - (110 * Facing)
y = Root,Pos Y - 90

[State 3007, 4]
type = VelSet
trigger1 = Time = 1
x = 4.0
y = 6.0

[State 3007, 5]
type = VelAdd
trigger1 = Time > 0
x = 0.25
y = 0.15

[State 3007, 6]
type = AfterImage
trigger1 = Time = 0
time = 20
palbright = 0,0,0
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 2
length = 6
trans = add1

[State 3007, 7]
type = Helper
trigger1 = AnimElemTime(10) = 0
stateno = 13000
id = 13006
pos = 30,-10
postype = P1
helpertype = Normal
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999999999
supermovetime = 999999999

[State 3007, 8]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S8,0+(Random%2)

[State 3002, 9]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = S0,0+(Random%4)

[State 3007, 10]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; 6Cスクロール再現
;---------------------------------------------------------------------------
[Statedef 6241]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 10000
ctrl = 0
sprpriority = -2

[State 6241, 1]
type = AssertSpecial
trigger1 = 1
flag  = NoShadow
flag2 = Invisible

[State 6241, 2]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 6241, 3]
type = VelSet
trigger1 = Time = 0
x = -(BackEdgeDist * 0.1);-7.0

[State 6241, 4]
type = VelSet
trigger1 = Time > 0
trigger1 = Vel X > -2.5
x = 0

[State 6241, 5]
type = VelMul
trigger1 = Time > 0
x = 0.925

[State 6241, 6]
type = DestroySelf
trigger1 = P2StateNo != 241
trigger2 = Time > 0 && Vel X = 0

;---------------------------------------------------------------------------
; ゲージ表示
;---------------------------------------------------------------------------
[Statedef 10000]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 10000
ctrl = 0
;sprpriority = 10

[State 10000, 1]
type = AssertSpecial
trigger1 = 1
flag  = NoShadow
flag2 = Invisible

[State 10000, 2]
type = RemoveExplod
trigger1 = NumExplod(10010) = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) < 65
id = 10030

;剣質ゲージ枠表示・１Ｐ側
[State 10000, Explod_1]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = NumExplod(10001) = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) >= 65
anim = 10001 + (Root,Var(1) * 2)
id = 10001
scale = 1,1
pos = 15,199
postype = left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = 1
sprpriority = 20

;剣質ゲージ枠表示・２Ｐ側
[State 10000, Explod_1]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = NumExplod(10001) = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) >= 65
anim = 10002 + (Root,Var(1) * 2)
id = 10001
scale = 1,1
pos = -15,199
postype = right
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = 1
sprpriority = 20

;剣質ゲージ１／４・１Ｐ側
[State 10000, Explod_2]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = NumExplod(10010) = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) < 65
anim = 10011 + (Root,Var(1) * 2)
id = 10010
scale = 1,1
pos = 15,199
postype = left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = 1
sprpriority = 20

;剣質ゲージ１／４・２Ｐ側
[State 10000, Explod_2]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = NumExplod(10010) = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) < 65
anim = 10012 + (Root,Var(1) * 2)
id = 10010
scale = 1,1
pos = -15,199
postype = right
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = 1
sprpriority = 20

;剣質ゲージＭＡＸ・１Ｐ側
[State 10000, Explod_3]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = NumExplod(10020) = 0
trigger1 = Var(5) >= 64
anim = 10021 + (Root,Var(1) * 2)
id = 10020
scale = 1,1
pos = 15,199
postype = left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 22

;剣質ゲージＭＡＸ・２Ｐ側
[State 10000, Explod_3]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = NumExplod(10020) = 0
trigger1 = Var(5) >= 64
anim = 10022 + (Root,Var(1) * 2)
id = 10020
scale = 1,1
pos = -15,199
postype = right
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = 1
sprpriority = 22

;剣質ゲージ増加・１Ｐ側
[State 10000, Explod_4]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = NumExplod(10030) = 0
anim = 10030 + Root,Var(1)
id = 10030
postype = left
pos = 19,231
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 18

;剣質ゲージ増加・２Ｐ側
[State 10000, Explod_4]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = NumExplod(10030) = 0
anim = 10030 + Root,Var(1)
id = 10030
postype = right
pos = -19,231
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = -1
sprpriority = 18

[State 10000, VarAdd]
type = VarAdd
trigger1 = Ceil(Root,Power/15.625) < Var(5)
v = 5
value = -1
ignorehitpause = 1

[State 10000, VarAdd]
type = VarAdd
trigger1 = Ceil(Root,Power/15.625) > Var(5)
v = 5
value = 1
ignorehitpause = 1

[State 10000, 3]
type = ModifyExplod
trigger1 = Var(5) < 64
id = 10030
scale = Var(5)/64.0, 1.0

;通常剣質ゲージ消去１
[State 10000, 4]
type = RemoveExplod
trigger1 = NumExplod(10020) > 0
trigger1 = Var(5) >= 64
trigger2 = Floor((256*Root,Life)/Root,LifeMax) < 65
trigger3 = RoundState > 2
trigger3 = NumHelper(12001) > 0
id = 10001

;通常剣質ゲージ消去２
[State 10000, 5]
type = RemoveExplod
trigger1 = NumExplod(10020) > 0
trigger1 = Var(5) >= 64
trigger2 = Floor((256*Root,Life)/Root,LifeMax) >= 65
trigger3 = RoundState > 2
trigger3 = NumHelper(12001) > 0
id = 10010

;通常剣質ゲージ消去３
[State 10000, 6]
type = RemoveExplod
triggerall = NumExplod(10020) > 0
trigger1 = Var(5) >= 64
trigger2 = RoundState > 2
trigger2 = NumHelper(12001) > 0
id = 10030

;ＭＡＸ剣質ゲージ消去
[State 10000, 7]
type = RemoveExplod
trigger1 = Var(5) < 64
trigger2 = RoundState > 2
trigger2 = NumHelper(12001) > 0
id = 10020

;=====================================
;体力ゲージ枠表示・１Ｐ側
[State 10000, Explod_4]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = NumExplod(10500) = 0
anim = 10500
id = 10500
pos = 54,217
postype = left
scale = 0.5,0.5
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = 1
sprpriority = 19
pausemovetime = 999999999
supermovetime = 999999999

;体力ゲージ枠表示・２Ｐ側
[State 10000, Explod_5]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = NumExplod(10500) = 0
anim = 10500
id = 10500
pos = -54,217
postype = right
scale = 0.5,0.5
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = -1
sprpriority = 19
pausemovetime = 999999999
supermovetime = 999999999

;体力ゲージ消去１
[State 10000, 8]
type = RemoveExplod
triggerall = NumExplod(10501) > 0
trigger1 = Floor(FVar(1)) <= 0
trigger2 = Time%2 = 1
trigger2 = Floor(FVar(1)) < 256
trigger2 = Floor((256*Root,Life)/Root,LifeMax) < Floor(FVar(1))
id = 10501
ignorehitpause = 1

;体力ゲージ消去２
[State 10000, 9]
type = RemoveExplod
triggerall = NumExplod(10502) > 0
trigger1 = Floor(FVar(1)) <= 0
trigger2 = Floor(FVar(1)) >= 256
trigger3 = Time%2 = 1
trigger3 = Floor(FVar(1)) < 256
trigger3 = Floor((256*Root,Life)/Root,LifeMax) != Floor(FVar(1)) + 1
id = 10502
ignorehitpause = 1

;体力ゲージ消去３
[State 10000, 10]
type = RemoveExplod
triggerall = NumExplod(10503) > 0
trigger1 = Floor(FVar(1)) <= 0
trigger2 = Time%2 = 1
trigger2 = Floor(FVar(1)) < 256
trigger2 = Floor((256*Root,Life)/Root,LifeMax) != Floor(FVar(1))
id = 10503
ignorehitpause = 1

;体力ゲージ増減・１Ｐ側
[State 10000, Explod_6]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = Floor(FVar(1)) >= 256
trigger1 = NumExplod(10501) = 0
anim = 10757
id = 10501
pos = 57,221
postype = left
scale = 0.5,0.5
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 18
pausemovetime = 999999999
supermovetime = 999999999

[State 10000, Explod_7]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = Floor(FVar(1)) < 256
trigger1 = NumExplod(10502) = 0
anim = 10501 + Floor(FVar(1))
id = 10502
pos = 57,221
postype = left
scale = 0.5,0.5
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
sprpriority = 18
pausemovetime = 999999999
supermovetime = 999999999

[State 10000, Explod_8]
type = Explod
trigger1 = Root,TeamSide = 1
trigger1 = Time%4 <= 1
trigger1 = Floor(FVar(1)) < 65
trigger1 = NumExplod(10503) = 0
anim = 10801 + Floor(FVar(1))
id = 10503
pos = 57,221
postype = left
scale = 0.5,0.5
bindtime = -1
removetime = 3
ownpal = 1
ontop = 1
sprpriority = 18
pausemovetime = 999999999
supermovetime = 999999999

;体力ゲージ増減・２Ｐ側
[State 10000, Explod_9]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = Floor(FVar(1)) >= 256
trigger1 = NumExplod(10501) = 0
anim = 10757
id = 10501
pos = -57,221
postype = right
scale = 0.5,0.5
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = -1
sprpriority = 18
pausemovetime = 999999999
supermovetime = 999999999

[State 10000, Explod_10]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = Floor(FVar(1)) < 256
trigger1 = NumExplod(10502) = 0
anim = 10501 + Floor(FVar(1))
id = 10502
pos = -57,221
postype = right
scale = 0.5,0.5
bindtime = -1
removetime = -1
ownpal = 1
ontop = 1
facing = -1
sprpriority = 18
pausemovetime = 999999999
supermovetime = 999999999

[State 10000, Explod_11]
type = Explod
trigger1 = Root,TeamSide = 2
trigger1 = Time%4 <= 1
trigger1 = Floor(FVar(1)) < 65
trigger1 = NumExplod(10503) = 0
anim = 10801 + Floor(FVar(1))
id = 10503
pos = -57,221
postype = right
scale = 0.5,0.5
bindtime = -1
removetime = 3
ownpal = 1
ontop = 1
facing = -1
sprpriority = 18
pausemovetime = 999999999
supermovetime = 999999999

;体力ゲージ初期設定
[State 10000, VarSet]
type = VarSet
trigger1 = 1
fv = 1
value = Floor((256*Root,Life)/Root,LifeMax)
persistent = 0
ignorehitpause = 1

;体力差分測定
[State 10000, VarAdd]
type = VarSet
trigger1 = Time%2 = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) < Floor(FVar(1))
fv = 2
value = Floor(FVar(1) - Floor((256*Root,Life)/Root,LifeMax))
ignorehitpause = 1

[State 10000, VarAdd]
type = VarSet
trigger1 = Time%2 = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) > Floor(FVar(1))
fv = 2
value = Floor(Floor((256*Root,Life)/Root,LifeMax) - FVar(1))
ignorehitpause = 1

;体力ゲージ減少
[State 10000, VarAdd]
type = VarAdd
trigger1 = Time%2 = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) < Floor(FVar(1))
fv = 1
value = -Ceil(FVar(2) / 8)
ignorehitpause = 1

;体力ゲージ増加
[State 10000, VarAdd]
type = VarAdd
trigger1 = Time%2 = 0
trigger1 = Floor((256*Root,Life)/Root,LifeMax) > Floor(FVar(1))
fv = 1
value = Ceil(FVar(2) / 8)
ignorehitpause = 1

;体力ゲージ消去４
[State 10000, 11]
type = RemoveExplod
triggerall = NumExplod(10500) > 0
trigger1 = RoundState > 2
trigger1 = NumHelper(12001) > 0
id = 10500
ignorehitpause = 1

;体力ゲージ消去５
[State 10000, 12]
type = RemoveExplod
triggerall = NumExplod(10501) > 0
trigger1 = RoundState > 2
trigger1 = NumHelper(12001) > 0
id = 10501
ignorehitpause = 1

;体力ゲージ消去６
[State 10000, 13]
type = RemoveExplod
triggerall = NumExplod(10502) > 0
trigger1 = RoundState > 2
trigger1 = NumHelper(12001) > 0
id = 10502
ignorehitpause = 1

;体力ゲージ消去７
[State 10000, 14]
type = RemoveExplod
triggerall = NumExplod(10503) > 0
trigger1 = RoundState > 2
trigger1 = NumHelper(12001) > 0
id = 10503
ignorehitpause = 1

;=====================================
[State 10000, Stage Forward]
type = Helper
trigger1 = !Var(0)
trigger1 = !NumHelper(100000)
trigger1 = RoundState = [0,2]
helpertype = Normal
name = "Stage Forward"
stateno = 100000
id = 100000
keyctrl = 0
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 10000, Stage Backward]
type = Helper
trigger1 = !Var(1)
trigger1 = !NumHelper(110000)
trigger1 = RoundState = [0,2]
helpertype = Normal
name = "Stage Backward"
stateno = 110000
id = 110000
pos = 0,0
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999
persistent = 0

[State 10000, Stage Helper]
type = VarSet
trigger1 = NumHelper(100000) > 0
var(2) = Ceil(Helper(100000),RootDist X)

[State 10000, Stage Helper]
type = VarSet
trigger1 = NumHelper(110000) > 0
var(3) = Ceil(Helper(110000),RootDist X)

[State 10000, Stage Helper]
type = VarSet
trigger1 = 1
var(0) = IfElse((RootDist X < P2Dist X), Ceil(Var(2)+(RootDist X))*(IfElse(Root,Facing = 0, 1, -1)), Ceil(Var(3)+(RootDist X))*(IfElse(Root,Facing = 0, -1, 1)))

[State 10000, Stage Helper]
type = VarSet
trigger1 = 1
var(1) = IfElse((RootDist X < P2Dist X), Ceil(Var(3)+(RootDist X))*(IfElse(Root,Facing = 0, 1, -1)), Ceil(Var(2)+(RootDist X))*(IfElse(Root,Facing = 0, -1, 1)))

;---------------------------------------------------------------------------
; 力勝利ポーズ杵ヘルパー
;---------------------------------------------------------------------------
[Statedef 10182]
type     = A
movetype = I
physics  = A
velset = 0,-16.5
ctrl = 0
anim = 185
sprpriority = 2

[State 10182, 1]
type = NotHitBy
trigger1 = 1
value = SCA, AA

[State 10182, 2]
type = DestroySelf
trigger1 = Vel Y > 0
trigger1 = Root,StateNo = 182 && Root,AnimElemTime(6) = 0

;---------------------------------------------------------------------------
; 技勝利ポーズ兎ヘルパー
;---------------------------------------------------------------------------
[Statedef 10183]
type     = S
movetype = I
physics  = S
velset = 0,0
ctrl = 0
anim = 186
sprpriority = 2

[State 10183, 1]
type = NotHitBy
trigger1 = 1
value = SCA, AA

[State 10183, 2]
type = PlaySnd
trigger1 = AnimElemTime(6) = 0
value = S9,0

[State 10183, 3]
type = VelSet
trigger1 = IsHelper(10183)
x = 3.0

[State 10183, 4]
type = VelSet
trigger1 = IsHelper(10184)
x = 4.5

[State 10183, 5]
type = VelSet
trigger1 = IsHelper(10185)
x = 3.5

[State 10183, 6]
type = VelSet
trigger1 = IsHelper(10186)
x = 4.0

[State 10183, 7]
type = VelSet
trigger1 = IsHelper(10187)
x = 3.5

[State 10183, 8]
type = VelSet
trigger1 = IsHelper(10188)
x = 4.25

[State 10183, 9]
type = VelSet
trigger1 = IsHelper(10189)
x = 4.5

[State 10183, 10]
type = DestroySelf
trigger1 = FrontEdgeBodyDist < -60

;---------------------------------------------------------------------------
; 剣質選択ヘルパー
;---------------------------------------------------------------------------
; 剣質選択（力）
[Statedef 10190]
type     = A
movetype = I
physics  = N
ctrl = 0
anim = 10050
velset = 0,0
sprpriority = 10

[State 10190, 1]
type = AssertSpecial
trigger1 = 1
flag  = Intro
flag2 = NoShadow

[State 10190, 2]
type = Changestate
trigger1 = RoundState = 2
trigger2 = Time >= 360
trigger3 = Command = "a"
trigger4 = Command = "b"
trigger5 = Command = "start"
trigger6 = Root,Var(1) = 0
trigger6 = Root,Var(56) = 1
value = 10195

;力→技へ
[State 10190, 3]
type = ParentVarSet
trigger1 = Command = "fwd"
trigger2 = Command = "back"
trigger3 = Root,Var(56) = 2
var(1) = 1

[State 10190, 4]
type = ChangeState
trigger1 = Root,Var(1) = 1
value = 10191

;極剣質隠しコマンド
[State 10190, 5]
type = VarSet
trigger1 = Command = "down"
trigger1 = Var(1) != [6,8]
var(1) = 0

[State 10190, 6]
type = VarAdd
trigger1 = Command = "down"
trigger1 = Var(1) = [6,8]
var(1) = 1

[State 10190, 7]
type = VarSet
trigger1 = Command = "up"
trigger2 = Var(2) = 240
var(1) = 0

[State 10190, 8]
type = VarAdd
trigger1 = Var(1) > 0
var(2) = 1

[State 10190, 9]
type = VarSet
trigger1 = Var(1) = 0
trigger2 = Var(2) > 240
var(2) = 0

;即決定用短縮ルート
[State 10190, 10]
type = ChangeState
trigger1 = Root,Var(56) = 3
value = 10194

;---------------------------------------------------------------------------
; 剣質選択（力→技）
[Statedef 10191]
type     = A
movetype = I
physics  = N
ctrl = 0
anim = 10051
velset = 0,0
sprpriority = 10

[State 10191, 1]
type = AssertSpecial
trigger1 = 1
flag  = Intro
flag2 = NoShadow

[State 10191, 2]
type = PlaySnd
trigger1 = Time = 0
value = S6,0

[State 10191, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 10192

;---------------------------------------------------------------------------
; 剣質選択（技）
[Statedef 10192]
type     = A
movetype = I
physics  = N
ctrl = 0
anim = 10052
velset = 0,0
sprpriority = 10

[State 10192, 1]
type = AssertSpecial
trigger1 = 1
flag  = Intro
flag2 = NoShadow

[State 10192, 2]
type = ChangeState
trigger1 = RoundState = 2
trigger2 = Time >= 360
trigger3 = Command = "a"
trigger4 = Command = "b"
trigger5 = Command = "start"
trigger6 = Root,Var(1) = 1
trigger6 = Root,Var(56) = 2
value = 10195

;技→力へ
[State 10192, 3]
type = ParentVarSet
trigger1 = Command = "fwd"
trigger2 = Command = "back"
trigger3 = Root,Var(56) = 1
var(1) = 0

[State 10192, 4]
type = ChangeState
trigger1 = Root,Var(1) = 0
value = 10193

;極剣質隠しコマンド
[State 10192, 5]
type = VarSet
trigger1 = Command = "up"
trigger1 = Var(1) = [6,8]
var(1) = 0

[State 10192, 6]
type = VarAdd
trigger1 = Command = "up"
trigger1 = Var(1) != [6,8]
var(1) = 1

[State 10192, 7]
type = VarSet
trigger1 = Command = "down"
trigger2 = Var(2) = 240
var(1) = 0

[State 10192, 8]
type = VarAdd
trigger1 = Var(1) > 0
var(2) = 1

[State 10192, 9]
type = VarSet
trigger1 = Var(1) = 0
trigger2 = Var(2) > 240
var(2) = 0

[State 10192, 10]
type = ChangeState
trigger1 = Var(1) = 13
trigger2 = Root,Var(56) = 3
value = 10194

;---------------------------------------------------------------------------
; 剣質選択（技→力）
[Statedef 10193]
type     = A
movetype = I
physics  = N
ctrl = 0
anim = 10053
velset = 0,0
sprpriority = 10

[State 10193, 1]
type = AssertSpecial
trigger1 = 1
flag  = Intro
flag2 = NoShadow

[State 10193, 2]
type = PlaySnd
trigger1 = Time = 0
value = S6,0

[State 10193, 3]
type = Changestate
trigger1 = AnimTime = 0
value = 10190

;---------------------------------------------------------------------------
; 剣質選択（極）
[Statedef 10194]
type     = A
movetype = I
physics  = N
ctrl = 0
anim = 10054
velset = 0,0
sprpriority = 10

[State 10194, 1]
type = AssertSpecial
trigger1 = 1
flag  = Intro
flag2 = NoShadow

[State 10194, 2]
type = PlaySnd
trigger1 = Time = 0
value = S6,1

[State 10194, 3]
type = Changestate
trigger1 = RoundState = 2
trigger2 = Time >= 360
trigger3 = Command = "a"
trigger4 = Command = "b"
trigger5 = Command = "start"
trigger6 = Root,Var(1) = 2
trigger6 = Root,Var(56) = 3
value = 10195

[State 10194, 4]
type = ParentVarSet
trigger1 = Var(1) >= 13
trigger2 = Root,Var(56) = 3
var(1) = 2

;極→力へ
[State 10192, 3]
type = ParentVarSet
trigger1 = Var(1) < 13
trigger1 = Command = "fwd"
trigger2 = Root,Var(56) = 1
var(1) = 0

;極→技へ
[State 10192, 3]
type = ParentVarSet
trigger1 = Var(1) < 13
trigger1 = Command = "back"
trigger2 = Root,Var(56) = 2
var(1) = 1

[State 10192, 4]
type = ChangeState
trigger1 = Root,Var(1) = 0
value = 10193

[State 10192, 4]
type = ChangeState
trigger1 = Root,Var(1) = 1
value = 10191

;---------------------------------------------------------------------------
; 剣質決定
[Statedef 10195]
type     = A
movetype = I
physics  = N
ctrl = 0
velset = 0,0
sprpriority = 10

[State 10195, 1]
type = AssertSpecial
trigger1 = 1
flag  = Intro
flag2 = NoShadow

[State 10195, 2]
type = PlaySnd
trigger1 = Time = 0
value = S6,1

[State 10195, 3]
type = ChangeAnim
trigger1 = Time = 0
value = 10055 + Root,Var(1)

[State 10195, 4]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; K.O.勝利時背景点滅ヘルパー
;---------------------------------------------------------------------------
; 赤点滅
[Statedef 11000]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 10000
ctrl = 0

[State 11000, 1]
type = AssertSpecial
trigger1 = Time <= 38
flag = NoFG
ignorehitpause = 1

[State 11000, 2]
type = PlaySnd
trigger1 = Time = 0
value = S4,2
ignorehitpause = 1

[State 11000, 3]
type = EnvColor
trigger1 = Time%3 = 0
trigger1 = Time <= 38
time = 1
value = 255,0,0
under = 1

[State 11000, 4]
type = EnvColor
trigger1 = Time%3 = 1
trigger1 = Time <= 38
time = 1
value = 96,0,0
under = 1

[State 11000, 5]
type = EnvColor
trigger1 = Time%3 = 2
trigger1 = Time <= 38
time = 1
value = 176,0,0
under = 1

;---------------------------------------------------------------------------
; 白点滅
[Statedef 11010]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 10000
ctrl = 0

[State 11010, 1]
type = AssertSpecial
trigger1 = Time <= 32
flag = NoFG
ignorehitpause = 1

[State 11010, 2]
type = PlaySnd
trigger1 = Time = 0
value = S4,2
ignorehitpause = 1

[State 11010, 3]
type = BGPalFx
trigger1 = Time <= 32
add = 256-(Time*8),256-(Time*8),256-(Time*8)
time = 2

;---------------------------------------------------------------------------
; ワイプイン演出ヘルパー
;---------------------------------------------------------------------------
[Statedef 12000]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 10000
ctrl = 0

[State 12000, 1]
type = AssertSpecial
trigger1 = 1
flag  = NoShadow
flag2 = Invisible

[State 12000, 2]
type = AssertSpecial
trigger1 = 1
flag  = NoFG
flag2 = NoBarDisplay

[State 12000, 3]
type = Explod
trigger1 = Time = 0
trigger1 = NumExplod(10380) = 0
anim = 10380
id = 10380
pos = 0,0
postype = Left
scale = 1,1
ontop = 1
ownpal = 1
bindtime = -1
removetime = -2
sprpriority = 999
ignorehitpause = 1
supermovetime = 999999999
pausemovetime = 999999999

[State 12000, 4]
type = Explod
trigger1 = Time = 0
trigger1 = NumExplod(10381) = 0
anim = 10381
id = 10381
pos = 0,240
postype = Left
scale = 1,1
ontop = 1
ownpal = 1
bindtime = -1
removetime = -2
sprpriority = 999
ignorehitpause = 1
supermovetime = 999999999
pausemovetime = 999999999

[State 12000, ModifyExplod]
type = ModifyExplod
trigger1 = 1
id = 10380
scale = 1280,(24-Time)*10

[State 12000, ModifyExplod]
type = ModifyExplod
trigger1 = 1
id = 10381
scale = 1280,(24-Time)*10

[State 12000, 5]
type = DestroySelf
trigger1 = Time > 0
trigger1 = NumExplod(10380) = 0
trigger1 = NumExplod(10381) = 0

;---------------------------------------------------------------------------
; ワイプアウト演出ヘルパー
;---------------------------------------------------------------------------
[Statedef 12001]
type     = A
movetype = I
physics  = N
velset = 0,0
anim = 10000
ctrl = 0

[State 12001, 1]
type = AssertSpecial
trigger1 = 1
flag  = NoShadow
flag2 = Invisible

[State 12001, 2]
type = AssertSpecial
trigger1 = 1
flag  = NoFG
flag2 = NoBarDisplay

[State 12001, 3]
type = Explod
trigger1 = Time = 0
trigger1 = NumExplod(10382) = 0
anim = 10382
id = 10382
pos = 0,0
postype = Left
scale = 1,1
ontop = 1
ownpal = 1
bindtime = -1
removetime = -2
sprpriority = 999
ignorehitpause = 1
supermovetime = 999999999
pausemovetime = 999999999

[State 12001, 4]
type = Explod
trigger1 = Time = 0
trigger1 = NumExplod(10383) = 0
anim = 10383
id = 10383
pos = 0,240
postype = Left
scale = 1,1
ontop = 1
ownpal = 1
facing = 1
bindtime = -1
removetime = -2
sprpriority = 999
ignorehitpause = 1
supermovetime = 999999999
pausemovetime = 999999999

[State 12001, ModifyExplod]
type = ModifyExplod
trigger1 = 1
id = 10382
scale = 1280,(Time)*10

[State 12001, ModifyExplod]
type = ModifyExplod
trigger1 = 1
id = 10383
scale = 1280,(Time)*10

[State 12001, 5]
type = DestroySelf
trigger1 = Time > 0
trigger1 = NumExplod(10382) = 0
trigger1 = NumExplod(10383) = 0

;---------------------------------------------------------------------------
; 潜在奥義演出ヘルパー
;---------------------------------------------------------------------------
[Statedef 13000]
type     = A
movetype = I
physics  = N
juggle   = 0
poweradd = 0
velset = 0,0
anim = 10290
ctrl = 0
sprpriority = 2

[State 13000, 2]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 13000, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 13000, 4]
type = AngleDraw
trigger1 = IsHelper(13002)
value = 45
scale = 1+(Time*0.2),1+(Time*0.2)

[State 13000, 4]
type = AngleDraw
trigger1 = IsHelper(13003)
value = 0
scale = 1+(Time*0.2),1+(Time*0.2)

[State 13000, 4]
type = AngleDraw
trigger1 = IsHelper(13004)
value = -45
scale = 1+(Time*0.2),1+(Time*0.2)

[State 13000, 4]
type = AngleDraw
trigger1 = IsHelper(13005)
value = 80
scale = 1+(Time*0.2),1+(Time*0.2)

[State 13000, 4]
type = AngleDraw
trigger1 = IsHelper(13006)
value = -45
scale = 1+(Time*0.2),1+(Time*0.2)

[State 13000, 5]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 128,256

[State 13000, 6]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; 勝利時背景移動用ヘルパー
;---------------------------------------------------------------------------
[Statedef 18000]
type   = S
velset = 0,0
ctrl = 0
anim = 0

[State 18000, 1]
type = AssertSpecial
trigger1 = 1
flag  = NoShadow
flag2 = Invisible

[State 18000, 2]
type = NotHitBy
trigger1 = 1
value = SCA, AA

[State 18000, 3]
type = VelSet
trigger1 = Time = 0
trigger1 = Facing = 1
x = IfElse(Pos X < 0, -7.0, 21.0)

[State 18000, 4]
type = VelSet
trigger1 = Time = 0
trigger1 = Facing = -1
x = IfElse(Pos X > 0, -7.0, 21.0)

[State 18000, 5]
type = VelMul
trigger1 = Root,BackEdgeBodyDist > 105
x = 0.845

[State 18000, 6]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1

;---------------------------------------------------------------------------
; A.I.起動ヘルパー
;---------------------------------------------------------------------------
[Statedef 20000]
ctrl = 0
anim = 10000

[State 20000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 20000, Facing]
type = Turn
trigger1 = Facing != Root,Facing

[State 20000, SelfState]
type = SelfState
trigger1 = !IsHelper
value = 0

[State 20000, Judgement]
type = VarSet
trigger1  = Command = "a" && Root,Command = "a"
trigger2  = Command = "b" && Root,Command = "b"
trigger3  = Command = "c" && Root,Command = "c"
trigger4  = Command = "x" && Root,Command = "x"
trigger5  = Command = "y" && Root,Command = "y"
trigger6  = Command = "z" && Root,Command = "z"
trigger7  = Command = "start" && Root,Command = "start"
trigger8  = Command = "fwd" && Root,Command = "fwd"
trigger9  = Command = "back" && Root,Command = "back"
trigger10 = Command = "up" && Root,Command = "up"
trigger11 = Command = "down" && Root,Command = "down"
var(59) = -1

[State 20000, Disappear]
type = DestroySelf
triggerall = IsHelper
trigger1  = Root,Var(59) || Var(59) = -1
trigger2  = Command = "a" && Root,Command = "a"
trigger3  = Command = "b" && Root,Command = "b"
trigger4  = Command = "c" && Root,Command = "c"
trigger5  = Command = "x" && Root,Command = "x"
trigger6  = Command = "y" && Root,Command = "y"
trigger7  = Command = "z" && Root,Command = "z"
trigger8  = Command = "start" && Root,Command = "start"
trigger9  = Command = "fwd" && Root,Command = "fwd"
trigger10 = Command = "back" && Root,Command = "back"
trigger11 = Command = "up" && Root,Command = "up"
trigger12 = Command = "down" && Root,Command = "down"

[State 20000, AI_ON]
type = VarSet
triggerall = Var(59) != -1
triggerall = Time > 1
trigger1  = Root,Command = "a"
trigger2  = Root,Command = "b"
trigger3  = Root,Command = "c"
trigger4  = Root,Command = "x"
trigger5  = Root,Command = "y"
trigger6  = Root,Command = "z"
trigger7  = Root,Command = "start"
trigger8  = Root,Command = "fwd"
trigger9  = Root,Command = "back"
trigger10 = Root,Command = "up"
trigger11 = Root,Command = "down"
var(59) = 1

;---------------------------------------------------------------------------
; 先行入力ヘルパー
;---------------------------------------------------------------------------
[Statedef 76400]
type     = A
movetype = I
physics  = N
ctrl = 0
anim = 10000

[State 76400, SelfState]
type = SelfState
trigger1 = !IsHelper
value = 0

[State 76400, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag  = Invisible
flag2 = NoShadow

[State 76400, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AP, AT

[State 76400, Turn]
type = Turn
trigger1 = Root,Facing != Facing

[State 76400, PosSet]
type = PosSet
trigger1 = 1
x = Root,Pos X
y = 9999

;先行入力受付時間
[State 76400, VarSet]
type = VarSet
trigger1 = 1
v = 0
value = 20

;コマンド入力
[State 76400, Pre_Time]
Type = Null
triggerall = Var(59) = 0
triggerall = Root,StateType = A
trigger1 = Command = "236236+AB" && Command != "c" && Command != "x"
trigger1 = Var(11) := Var(0) || 1
trigger2 = Command = "623+B" && Command != "a" && Command != "c" && Command != "x"
trigger2 = Var(15) := Var(0) || 1

[State 76400, Pre_Time]
Type = Null
triggerall = Var(59) = 0
triggerall = Root,StateType != A
trigger1  = Command = "236236+B" && Command != "a" && Command != "c" && Command != "x"
trigger1  = Var(10) := Var(0) || 1
trigger2  = Command = "63214+C" && Command != "a" && Command != "b" && Command != "x"
trigger2  = Var(12) := Var(0) || 1
trigger3  = Command = "41236+C" && Command != "a" && Command != "b" && Command != "x"
trigger3  = Var(13) := Var(0) || 1
trigger4  = Command = "623+A" && Command != "b" && Command != "c" && Command != "x"
trigger4  = Var(14) := Var(0) || 1
trigger5  = Command = "623+B" && Command != "a" && Command != "c" && Command != "x"
trigger5  = Var(15) := Var(0) || 1
trigger6  = Command = "421+A" && Command != "b" && Command != "c" && Command != "x"
trigger6  = Var(16) := Var(0) || 1
trigger7  = Command = "421+B" && Command != "a" && Command != "c" && Command != "x"
trigger7  = Var(17) := Var(0) || 1
trigger8  = Command = "236+A" && Command != "b" && Command != "c" && Command != "x"
trigger8  = Var(18) := Var(0) || 1
trigger9  = Command = "236+B" && Command != "a" && Command != "c" && Command != "x"
trigger9  = Var(19) := Var(0) || 1
trigger10 = Command = "214+A" && Command != "b" && Command != "c" && Command != "x" && Root,StateNo != [1300,1320]
trigger10 = Var(20) := Var(0) || 1
trigger11 = Command = "214+B" && Command != "a" && Command != "c" && Command != "x" && Root,StateNo != [1300,1320]
trigger11 = Var(21) := Var(0) || 1
trigger12 = Command = "214+C" && Command != "a" && Command != "b" && Command != "x" && Root,StateNo != [1300,1320]
trigger12 = Var(22) := Var(0) || 1
trigger13 = Command = "412+X" && Command != "a" && Command != "b" && Command != "c"
trigger13 = Var(23) := Var(0) || 1
trigger14 = Command = "22+A" && Command != "b" && Command != "c" && Command != "x" && Root,StateNo != 1013
trigger14 = Var(24) := Var(0) || 1
trigger15 = Command = "22+B" && Command != "a" && Command != "c" && Command != "x" && Root,StateNo != 1013
trigger15 = Var(25) := Var(0) || 1

[State 76400, Pre_Time]
Type = VarSet
triggerall = Var(59) = 0
trigger1 = Command = "x"
v = 26
value = Var(0)

[State 76400, Pre_Time]
Type = VarSet
triggerall = Var(59) = 0
trigger1 = Command = "a"
v = 27
value = Var(0)

[State 76400, Pre_Time]
Type = VarSet
triggerall = Var(59) = 0
trigger1 = Command = "b"
v = 28
value = Var(0)

[State 76400, Pre_Time]
Type = VarSet
triggerall = Var(59) = 0
trigger1 = Command = "c"
v = 29
value = Var(0)

;変数リセット
[State 76400, Time_Reset]
Type = Null
triggerall = Root,Time <= 2
trigger1  = Var(10) > 0
trigger1  = Root,StateNo = 3000
trigger1  = Var(10) := 0 || 1
trigger2  = Var(11) > 0
trigger2  = Root,StateNo = 2000
trigger2  = Var(11) := 0 || 1
trigger3  = Var(12) > 0
trigger3  = Root,StateNo = [1400,1410]
trigger3  = Var(12) := 0 || 1
trigger4  = Var(13) > 0
trigger4  = Root,StateNo = 1411
trigger4  = Var(13) := 0 || 1
trigger5  = Var(14) > 0
trigger5  = Root,StateNo = 1100
trigger5  = Var(14) := 0 || 1
trigger6  = Var(15) > 0
trigger6  = Root,StateNo = 1110
trigger6  = Var(15) := 0 || 1
trigger7  = Var(16) > 0
trigger7  = Root,StateNo = 1200
trigger7  = Var(16) := 0 || 1
trigger8  = Var(17) > 0
trigger8  = Root,StateNo = 1210
trigger8  = Var(17) := 0 || 1
trigger9  = Var(18) > 0
trigger9  = Root,StateNo = [1000,1019]
trigger9  = Var(18) := 0 || 1
trigger10 = Var(19) > 0
trigger10 = Root,StateNo = [1000,1019]
trigger10 = Var(19) := 0 || 1
trigger11 = Var(20) > 0
trigger11 = Root,StateNo = [1300,1320]
trigger11 = Var(20) := 0 || 1
trigger12 = Var(21) > 0
trigger12 = Root,StateNo = [1300,1320]
trigger12 = Var(21) := 0 || 1
trigger13 = Var(22) > 0
trigger13 = Root,StateNo = [1300,1320]
trigger13 = Var(22) := 0 || 1
trigger14 = Var(23) > 0
trigger14 = Root,StateNo = 795
trigger14 = Var(23) := 0 || 1
trigger15 = Var(24) > 0
trigger15 = Root,StateNo = 3500
trigger15 = Var(24) := 0 || 1
trigger16 = Var(25) > 0
trigger16 = Root,StateNo = 3501
trigger16 = Var(25) := 0 || 1

;先行入力時間減少
[State 76400, 236236+B]
type = VarAdd
trigger1 = Var(10) > 0
var(10) = -1

[State 76400, 236236+AB]
type = VarAdd
trigger1 = Var(11) > 0
var(11) = -1

[State 76400, 63214+C]
type = VarAdd
trigger1 = Var(12) > 0
var(12) = -1

[State 76400, 41236+C]
type = VarAdd
trigger1 = Var(13) > 0
var(13) = -1

[State 76400, 623+A]
type = VarAdd
trigger1 = Var(14) > 0
var(14) = -1

[State 76400, 623+B]
type = VarAdd
trigger1 = Var(15) > 0
var(15) = -1

[State 76400, 421+A]
type = VarAdd
trigger1 = Var(16) > 0
var(16) = -1

[State 76400, 421+B]
type = VarAdd
trigger1 = Var(17) > 0
var(17) = -1

[State 76400, 236+A]
type = VarAdd
trigger1 = Var(18) > 0
var(18) = -1

[State 76400, 236+B]
type = VarAdd
trigger1 = Var(19) > 0
var(19) = -1

[State 76400, 214+A]
type = VarAdd
trigger1 = Var(20) > 0
var(20) = -1

[State 76400, 214+B]
type = VarAdd
trigger1 = Var(21) > 0
var(21) = -1

[State 76400, 214+C]
type = VarAdd
trigger1 = Var(22) > 0
var(22) = -1

[State 76400, 412+X]
type = VarAdd
trigger1 = Var(23) > 0
var(23) = -1

[State 76400, 22+A]
type = VarAdd
trigger1 = Var(24) > 0
var(24) = -1

[State 76400, 22+B]
type = VarAdd
trigger1 = Var(25) > 0
var(25) = -1

[State 76400, X]
type = VarAdd
trigger1 = Var(26) > 0
var(26) = -1

[State 76400, A]
type = VarAdd
trigger1 = Var(27) > 0
var(27) = -1

[State 76400, B]
type = VarAdd
trigger1 = Var(28) > 0
var(28) = -1

[State 76400, C]
type = VarAdd
trigger1 = Var(29) > 0
var(29) = -1

;---------------------------------------------------------------------------
; ステージ端測定ヘルパー（前方）
;---------------------------------------------------------------------------
[Statedef 100000]
type     = A
movetype = I
physics  = N
velset = IfElse(RoundState=2,30,10),0
anim = 0
ctrl = 0

[State 100000]
type = SelfState
trigger1 = !IsHelper
value = 0

[State 100000]
type = AssertSpecial
trigger1 = IsHelper
flag  = Invisible
flag2 = NoShadow
ignorehitpause = 1

[State 100000]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 100000]
type = Varset
trigger1 = Time = 0
var(0) = 0

[State 100000]
type = Projectile
trigger1 = Time = 0
trigger1 = NumProjID(100000) < 1
projID = 100000
projanim = 10000
projstagebound = Const(size.ground.front)*-2
projedgebound = 100000
projremovetime = -1
projpriority = 9999
velocity = IfElse(RoundState=2,30,10),0
offset = 0,0
supermovetime = 99999999
pausemovetime = 99999999

[state 100000]
type = VelSet
trigger1 = Vel X > 0
trigger1 = Root,NumProjID(100000) = 0
x = 0

[state 100000]
type = VarSet
trigger1 = Time > 0
trigger1 = Vel X = 0
trigger1 = NumHelper(100000) > 0
trigger1 = Root,NumProjID(100000) = 0
var(0) = Ceil(RootDist X)

[state 100000]
type = DestroySelf
trigger1 = Time > 0
trigger1 = Var(0)
trigger1 = NumHelper(10000) > 0
trigger1 = Helper(10000),Var(0)

;---------------------------------------------------------------------------
; ステージ端測定ヘルパー（後方）
;---------------------------------------------------------------------------
[Statedef 110000]
type     = A
movetype = I
physics  = N
velset = IfElse(RoundState=2,-30,-10),0
anim = 0
ctrl = 0

[State 110000]
type = SelfState
trigger1 = !IsHelper
value = 0

[State 110000]
type = AssertSpecial
trigger1 = IsHelper
flag  = Invisible
flag2 = NoShadow
ignorehitpause = 1

[State 110000]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 110000]
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State 110000]
type = Projectile
trigger1 = Time = 0
trigger1 = NumProjID(110000) < 1
projID = 110000
projanim = 10000
projstagebound = Const(size.ground.front)*-2
projedgebound = 110000
projremovetime = -1
projpriority = 9999
velocity = IfElse(RoundState=2,-30,-10),0
offset = 0,0
supermovetime = 99999999
pausemovetime = 99999999

[State 110000]
type = VelSet
trigger1 = Vel X < 0
trigger1 = Root,NumProjID(110000) = 0
x = 0

[State 110000]
type = VarSet
trigger1 = Time > 0
trigger1 = Vel X = 0
trigger1 = NumHelper(110000) > 0
trigger1 = Root,NumprojID(110000) = 0
var(0) = Ceil(RootDist X)

[State 110000]
type = DestroySelf
trigger1 = Time > 0
trigger1 = Var(0)
trigger1 = NumHelper(10000) > 0
trigger1 = Helper(10000),Var(1)
