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

[Command]
name = "FF"
command = F, F
time = 20

[Command]
name = "BB"
command = B, B
time = 20

[Command]
name = "AFF"
command = ~F, F
time = 20

[Command]
name = "ABB"
command = ~B, B
time = 20

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

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

[Command]
name = "z+c"
command = z+c
time = 10

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

[Command]
name = "down_a"
command = /$D,a
time = 1

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

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

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

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

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

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

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

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

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

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

[Command]
name = "holdfwd"
command = /$F
time = 1

[Command]
name = "holdback"
command = /$B
time = 1

[Command]
name = "holdup"
command = /$U
time = 1

[Command]
name = "holddown"
command = /$D
time = 1

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

[Statedef -1] 

[State -1, ステ抜け用変数無感知化] 
type = Varset
trigger1 = 1
var(0) = 0
ignorehitpause = 1

[State -1, 対本気霊夢]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = roundstate = 2
triggerall = !time
triggerall = anim != [17000,19000]
triggerall = anim != [1600,1900]
triggerall = palno = 11
trigger1 = enemy,name = "H-Reimu"
value = 1600
ignorehitpause = 1

[State -1, ボムその１]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = roundstate = 2
triggerall = !time
triggerall = anim != [17000,19000]
triggerall = anim != [1600,1900]
triggerall = power > 0
triggerall = enemy,name != "Iblis"
trigger1 = command = "start"
value = 1600
ignorehitpause = 1

[State -1, ボムその２]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = ctrl
triggerall = anim != [17000,19000]
triggerall = anim != [1600,1900]
triggerall = power > 0
trigger1 = command = "z+c"
value = 1800
ignorehitpause = 1

[State -1, オートボム]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = roundstate = 2
triggerall = !time
triggerall = anim != [17000,19000]
triggerall = anim != [1600,1900]
trigger1 = var(11) > 2
trigger1 = var(11) := var(11) - 1
value = 1800;ifelse(random % 2 = 0, 1600, 1800)
ignorehitpause = 1

[State -1, 弾幕その１]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = ctrl
trigger1 = command = "x"
value = 1000
ignorehitpause = 1

[State -1, 弾幕その２]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = ctrl
trigger1 = command = "a"
value = 1100
ignorehitpause = 1

[State -1, 弾幕その３]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = ctrl
trigger1 = command = "y"
value = 1200
ignorehitpause = 1

[State -1, 弾幕その４]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = ctrl
trigger1 = command = "b"
value = 1300
ignorehitpause = 1

[State -1, カルノバーン射出]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = ctrl
triggerall = numexplod(1400) = 0
trigger1 = command = "z"
value = 1400
ignorehitpause = 1

[State -1, 体当たり]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = ctrl
trigger1 = command = "c"
value = 1500
ignorehitpause = 1

[State -1, 勝利]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = roundstate > 3
triggerall = anim != [170,181]
triggerall = !time
trigger1 = win
value = 180
ignorehitpause = 1

[State -1, 引き分け]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = roundstate > 3
triggerall = anim != [170,181]
triggerall = !time
trigger1 = drawgame
value = 175
ignorehitpause = 1

[State -1, 判定負け]
type = Changestate
triggerall = !ishelper
triggerall = alive
triggerall = roundstate > 3
triggerall = anim != [170,181]
triggerall = !time
trigger1 = losetime
value = 170
ignorehitpause = 1

[State -1, 前進]
type = Velset
triggerall = !ishelper
triggerall = alive
triggerall = command = "holdfwd"
trigger1 = ctrl
trigger2 = anim = [1000,1400]
x = const(velocity.walk.fwd.x)
ignorehitpause = 1

[State -1, 後退]
type = Velset
triggerall = !ishelper
triggerall = alive
triggerall = command = "holdback"
trigger1 = ctrl
trigger2 = anim = [1000,1400]
x = const(velocity.walk.back.x)
ignorehitpause = 1

[State -1, 上昇]
type = Velset
triggerall = !ishelper
triggerall = alive
triggerall = command = "holdup"
trigger1 = ctrl
trigger2 = anim = [1000,1400]
y = -3
ignorehitpause = 1

[State -1, 下降]
type = Velset
triggerall = !ishelper
triggerall = alive
triggerall = command = "holddown"
trigger1 = ctrl
trigger2 = anim = [1000,1400]
y = 3
ignorehitpause = 1

[State -1, 停止]
type = Velset
triggerall = !ishelper
triggerall = roundstate != 4
triggerall = anim != [17000,19000]
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
x = 0
y = 0
ignorehitpause = 1

[State -1, 重力]
type = Gravity
triggerall = !ishelper
triggerall = roundstate != 4
triggerall = screenpos y < 180
triggerall = anim != [17000,19000]
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
ignorehitpause = 1

[State -1, 画面外制御]
type = Posadd
triggerall = !ishelper
triggerall = roundstate != 4
trigger1 = screenpos x != [0,320]
x = 3
ignorehitpause = 1

[State -1, 画面外制御]
type = Posset
triggerall = !ishelper
triggerall = roundstate != 4
trigger1 = screenpos y != [0,240]
y = pos y - screenpos y + 240 * (screenpos y > 240)
ignorehitpause = 1

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