;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 0, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
triggerall = !ishelper
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0
ignorehitpause = 1

[State 0, 2]
type = VelSet
triggerall = !ishelper
trigger1 = animelem = 1
y = 0
ignorehitpause = 1

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
triggerall = !ishelper
trigger1 = abs(vel x) < 2
trigger2 = animelemtime(1) = 4
x = 0
ignorehitpause = 1

[State 0, コントロールフラグ]
type = Varset
triggerall = !ishelper
trigger1 = ctrl
var(10) = 1
ignorehitpause = 1

[State 0, コントロール可否]
type = Ctrlset
triggerall = !ishelper
trigger1 = var(10)
value = 1
ignorehitpause = 1

[State 0, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
volume = 255
value = 2000, 6
ignorehitpause = 1

[State 0, 振り向き]
type = Turn
triggerall = !ishelper
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 0, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 0, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C

[State 10, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 10, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 10, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 10
value = 10
ignorehitpause = 1

[State ]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)
y = 0
ignorehitpause = 1

[State ]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)
y = 0
ignorehitpause = 1

[State 10, 1]
type = VelMul
triggerall = !ishelper
trigger1 = animelem = 1
x = .75
ignorehitpause = 1

[State 10, 2]
type = ChangeState
triggerall = !ishelper
trigger1 = AnimTime = 0
value = 11
ctrl = 1
ignorehitpause = 1

[State 10, 振り向き]
type = Turn
triggerall = !ishelper
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 10, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 10, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
sprpriority = 0

[State 11, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 11, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 11, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 11
value = 11
ignorehitpause = 1

[State 11, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 40
volume = 255
ignorehitpause = 1

[State 11, 1] ;Change from turning animation
type = ChangeAnim
triggerall = !ishelper
trigger1 = Anim = 6 && AnimTime = 0
trigger2 = anim = 15
value = 11
ignorehitpause = 1

[State 11, 振り向き]
type = Turn
triggerall = !ishelper
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 11, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 11, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type    = S
physics = S

[State 12, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 12, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 12, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 12
value = 12
ignorehitpause = 1

[State ]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x) / 2
y = 0
ignorehitpause = 1

[State ]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdback"
x = const(velocity.walk.back.x) / 2
y = 0
ignorehitpause = 1

[State 12, 1]
type = ChangeState
triggerall = !ishelper
trigger1 = AnimTime = 0
value = 0
ctrl = 1
ignorehitpause = 1

[State 12, 振り向き]
type = Turn
triggerall = !ishelper
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 12, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 12, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; しゃがみ歩き
[Statedef 15]
type = C
physics = C 
ctrl = 1

[State 15, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 15, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 15, しゃがみ前歩き]
type = Changeanim
triggerall = !ishelper
triggerall = vel x > 0
trigger1 = anim != 15
trigger2 = animtime = 0
value = 15
ignorehitpause = 1

[State 15, しゃがみ後ろ歩き]
type = Changeanim
triggerall = !ishelper
triggerall = vel x < 0
trigger1 = anim != 16
trigger2 = animtime = 0
value = 16
ignorehitpause = 1

[State 15, 1]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x) / 3
y = 0
ignorehitpause = 1

[State 15, 2]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdback"
x = const(velocity.walk.back.x) / 3
y = 0
ignorehitpause = 1

[State 15, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 30
volume = 255
ignorehitpause = 1

[State 15, ステート変更]
type = ChangeState
triggerall = !ishelper
trigger1 = command != "holdfwd" && command != "holdback"
value = 11
ctrl = 1
ignorehitpause = 1

[State 15, 振り向き]
type = Turn
triggerall = !ishelper
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 15, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 15, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 20, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 20, 1]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)
ignorehitpause = 1

[State 20, 2]
type = VelSet
triggerall = !ishelper
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)
ignorehitpause = 1

[State 20, 3]
type = ChangeAnim
triggerall = !ishelper
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20
ignorehitpause = 1

[State 20, 4]
type = ChangeAnim
triggerall = !ishelper
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21
ignorehitpause = 1

[State 20, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelemtime(1) = 0
value = 2000, 30
volume = 255
ignorehitpause = 1

[State 20, ステート変更]
type = Changestate
triggerall = !ishelper
triggerall = vel x = 0
trigger1 = command != "holdfwd"
trigger2 = command != "holdback"
value = 0
ctrl = 1
ignorehitpause = 1

[State 20, 振り向き]
type = Turn
triggerall = !ishelper
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 20, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 20, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
ctrl = 0
sprpriority = 1

[State 40, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 40, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 40, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 40
value = 40
ignorehitpause = 1

[State 40, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 39
volume = -100
ignorehitpause = 1

[State 40, ジャンプ回数計測]
type = Varadd
triggerall = !ishelper
trigger1 = animelem = 1
var(9) = 1
ignorehitpause = 1

[State 40, 1]
type = VarSet
triggerall = !ishelper
trigger1 = animelem = 1
sysvar(1) = 0
ignorehitpause = 1

[State 40, 2]
type = VarSet
triggerall = !ishelper
trigger1 = command = "holdfwd"
sysvar(1) = 1
ignorehitpause = 1

[State 40, 3]
type = VarSet
triggerall = !ishelper
trigger1 = command = "holdback"
sysvar(1) = -1
ignorehitpause = 1

[State 40, 4]
type = VelSet
triggerall = !ishelper
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)
ignorehitpause = 1

[State 40, 5]
type = VelSet
triggerall = !ishelper
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)
ignorehitpause = 1

[State 40, 6]
type = ChangeState
trigger1 = !ishelper
trigger1 = AnimTime = 0
value = 50
ctrl = 1
ignorehitpause = 1

[State 40, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 40, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; AirJump Start
[Statedef 45]
type    = A
physics = N
ctrl = 0

[State 45, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 45, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 45, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 45
value = 45
ignorehitpause = 1

[state 45, 位置調整]
type = velset
triggerall = !ishelper
trigger1 = animelem = 1
x = 0
y = 0
ignorehitpause = 1

[State 45, 音を鳴らす]
type = PlaySnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 39
volume = -100
freqmul = 0.9
ignorehitpause = 1

[State 45, 3]
type = VarSet
triggerall = !ishelper
trigger1 = animelem = 1
sysvar(1) = 0
ignorehitpause = 1

[State 45, 4]
type = VarSet
triggerall = !ishelper
trigger1 = command = "holdfwd"
sysvar(1) = 1
ignorehitpause = 1

[State 45, 5]
type = VarSet
triggerall = !ishelper
trigger1 = command = "holdback"
sysvar(1) = -1
ignorehitpause = 1

[State 45, 6]
type = VelSet
triggerall = !ishelper
trigger1 = animelemtime(1) = 2
x = ifelse(sysvar(1)=0, const(velocity.airjump.neu.x), ifelse(sysvar(1)=1, const(velocity.airjump.fwd.x), const(velocity.airjump.back.x)))
y = const(velocity.airjump.y)
ignorehitpause = 1

[State 45, 7]
type = ChangeState
triggerall = !ishelper
trigger1 = animelemtime(1) = 0
value = 50
ctrl = 1
ignorehitpause = 1

[State 45, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 45, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 50, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 50, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 50, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != [41,43]
value = 50
ignorehitpause = 1

[State 50, 1]
type = VarSet
triggerall = !ishelper
trigger1 = animelem = 1
sysvar(1) = 0
ignorehitpause = 1

[State 50, 2]
type = ChangeAnim
triggerall = !ishelper
trigger1 = animelem = 1
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
ignorehitpause = 1

[State 50, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 50, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type    = A
physics = A

[State 51, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 51, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 51, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 51
value = 51
ignorehitpause = 1

[State 51, 振り向き]
type = Turn
triggerall = !ishelper
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 51, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 51, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0

[State 52, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 52, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 52, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 47
value = 47
ignorehitpause = 1

[State 52, ジャンプ回数リセット]
type = Varset
trigger1 = !ishelper
var(9) = 0
ignorehitpause = 1

[State 52, 1]
type = VelSet
triggerall = !ishelper
trigger1 = animelem = 1
y = 0
ignorehitpause = 1

[State 52, 2]
type = PosSet
triggerall = !ishelper
trigger1 = animelem = 1
y = 0
ignorehitpause = 1

[State 52, 3]
type = CtrlSet
triggerall = !ishelper
trigger1 = animelemtime(1) = 3
value = 1
ignorehitpause = 1

[State 52, 4]
type = ChangeState
triggerall = !ishelper
trigger1 = AnimTime = 0
value = 0
ctrl = 1
ignorehitpause = 1

[State 52, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 52, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
sprpriority = 1

[State 100, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 100, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 100, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 100
value = 100
ignorehitpause = 1

[State 100, 1]
type = VelSet
triggerall = !ishelper
trigger1 = 1
x = const(velocity.run.fwd.x)
ignorehitpause = 1

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
triggerall = !ishelper
trigger1 = 1
flag = NoWalk
ignorehitpause = 1

[State 100, 音を鳴らす]
type = PlaySnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 33
freqmul = 0.9
ignorehitpause = 1

[State 100, 4]
type = ChangeState
triggerall = !ishelper
trigger1 = command != "holdfwd"
value = 0
ctrl = 1
ignorehitpause = 1

[State 100, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 100, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
sprpriority = 1

[State 105, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 105, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 105, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 105
value = 105
ignorehitpause = 1

[State 105, 1]
type = VelSet
triggerall = !ishelper
trigger1 = animelem = 1
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)
ignorehitpause = 1

[State 105, 2]
type = CtrlSet
triggerall = !ishelper
trigger1 = animelemtime(1) = 2
value = 1
ignorehitpause = 1

[State 105, 音を鳴らす]
type = PlaySnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 33
ignorehitpause = 1

[State 105, 透明化]
type = Assertspecial
trigger1 = !ishelper
flag = invisible
ignorehitpause = 1

[State 105, 3]
type = ChangeState
triggerall = !ishelper
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106
ignorehitpause = 1

[State 105, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 105, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 106]
type    = S
physics = S
ctrl = 0

[State 106, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 106, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 106, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 106
value = 106
ignorehitpause = 1

[State 106, 1]
type = VelSet
triggerall = !ishelper
trigger1 = animelem = 1
y = 0
ignorehitpause = 1

[State 106, 2]
type = PosSet
triggerall = !ishelper
trigger1 = animelem = 1
y = 0
ignorehitpause = 1

[State 106, 4]
type = ChangeState
triggerall = !ishelper
trigger1 = animtime = 0
value = 0
ctrl = 1
ignorehitpause = 1

[State 106, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 106, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_UP
[Statedef 110]

[State 110, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 110, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_DOWN
[Statedef 115]

[State 115, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 115, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
;空中ダッシュ
[Statedef 116]
type = A
physics = A 
ctrl = 1

[State 116, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 116, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 116, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 116
value = 116
ignorehitpause = 1

[state 116, 位置調整]
type = velset
triggerall = !ishelper
trigger1 = animelem = 1
x = 5
y = -3
ignorehitpause = 1

[State 116, 音を鳴らす]
type = PlaySnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 33
freqmul = 0.9
ignorehitpause = 1

[State 116, ステート変更]
type = ChangeState
triggerall = !ishelper
triggerall = vel Y > 0
trigger1 = pos Y >= -5
value = 52
ctrl = 1 
ignorehitpause = 1

[State 116, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 116, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
;空中バックダッシュ
[Statedef 117]
type = A
physics = A
ctrl = 0

[State 117, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 117, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 117, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 117
value = 117
ignorehitpause = 1

[state 900, 位置調整]
type = velset
triggerall = !ishelper
trigger1 = animelem = 1
x = -4
y = -4
ignorehitpause = 1

[State 117, 音を鳴らす]
type = PlaySnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 33
ignorehitpause = 1

[State 117, 透明化]
type = Assertspecial
trigger1 = !ishelper
flag = invisible
ignorehitpause = 1

[State 117, ステート変更]
type = ChangeState
triggerall = !ishelper
triggerall = vel Y > 0
trigger1 = pos Y >= -5
value = 52
ctrl = 1
ignorehitpause = 1

[State 117, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 117, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

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

[Statedef 120]
ctrl = 0

[State 120, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 120, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(120)
statetype = C
movetype = I
physics = N
ignorehitpause = 1

[State 120, ヘルパーアニメ変更]
type = Changeanim
trigger1 = ishelper(120)
value = 1003
ignorehitpause = 1

[State 120, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(120)
value = 9999999999999
ignorehitpause = 1

[State 120, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(120)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 120, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(120)
value = 0
ignorehitpause = 1

[state 120, ヘルパー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(120)
value = 0
ignorehitpause = 1

[State 120, 干渉外へ]
type = posset
trigger1 = ishelper(120)
x = root,pos x
y = 9999999999999
ignorehitpause = 1

[State 120, 混線用用特定属性のみ命中]
type = Hitby
trigger1 = ishelper(120)
value = C, HA
ignorehitpause = 1

[State 120, ターゲット生産ヘルパー]
type = Projectile
trigger1 = ishelper(120)
projanim = 1002
projid = 7000
projremove = 0
projremovetime = 1
projscale = 1.0,1.0
affectteam = f
postype = p1
numhits = 0
offset = 0, 0
attr = C, HA
hitflag = MAFD
sparkno = -1
p2stateno = 40
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 120, 生産ヘルパー消去]
type = Destroyself
triggerall = ishelper(120)
trigger1 = !alive
trigger2 = !root,alive
trigger3 = root,palno != 11
trigger3 = root,anim != [1100,1200]
trigger3 = root,anim != [7000,7200]
trigger3 = root,anim != [9000,9200]
ignorehitpause = 1

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

[Statedef 130]
ctrl = 0

[State 130, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 130, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(130)
statetype = C
movetype = I
physics = N
ignorehitpause = 1

[State 130, ヘルパーアニメ変更]
type = Changeanim
trigger1 = ishelper(130)
value = 1003
ignorehitpause = 1

[State 130, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(130)
value = 9999999999999
ignorehitpause = 1

[State 130, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(130)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 130, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(130)
value = 0
ignorehitpause = 1

[state 130, ヘルパー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(130)
value = 0
ignorehitpause = 1

[State 130, ヘルパー本体追従]
type = Bindtoroot
trigger1 = ishelper(130)
ignorehitpause = 1

[State 130, 特定属性のみ命中]
type = Hitby
trigger1 = ishelper(130)
value = C, HP
ignorehitpause = 1

[State 130, 食らいヘルパー消去]
type = Destroyself
triggerall = ishelper(130)
trigger1 = !alive
trigger2 = !root,alive
ignorehitpause = 1

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

[Statedef 131]
ctrl = 0
movehitpersist = 1

[State 131, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 131, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(131)
statetype = S
movetype = A
physics = N
ignorehitpause = 1

[State 131, ヘルパーアニメ変更]
type = Changeanim
trigger1 = ishelper(131)
value = 1002
ignorehitpause = 1

[State 131, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(131)
value = 9999999999999
ignorehitpause = 1

[State 131, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(131)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 131, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(131)
value = 0
ignorehitpause = 1

[State 131, ヘルパー追従]
type = Bindtoroot
trigger1 = ishelper(131)
ignorehitpause = 1

[State 131, 破片＆エラーコード１〜６Ｐ]
type = Hitdef
triggerall = ishelper(131)
triggerall = var(4) != 1
trigger1 = root,anim = [7000,7200]
trigger2 = root,palno = [1,6]
trigger2 = root,anim = [1100,1200]
attr = S, AA, AT, AP
hitflag = MAFD
ground.type = trip
damage = 1
givepower = powermax
priority = 7, hit
sparkxy = 999, 999
yaccel = 1
ground.hittime = 1
guard.ctrltime = 1

[State 131, エラーコード、ＲＢＭ]
type = Hitdef
triggerall = ishelper(131)
triggerall = var(4) != 1
trigger1 = root,palno = [7,12]
trigger1 = root,anim = [1100,1200]
trigger2 = root,anim = [9000,9200]
trigger3 = root,palno = 11
trigger3 = root,numexplod(12000) = 0
attr = S, AA, AT, AP
hitflag = MA
ground.type = trip
damage = random
priority = 7, hit
sparkxy = 999, 999
yaccel = 9999999999999
fall = 1
fall.recover = 0
fall.damage = 9999999999999
sparkxy = 999, 999
p2getp1state = 0
ground.hittime = 1
guard.ctrltime = 1

[State 131, 当身感知時代入]
type = Null
triggerall = ishelper(131)
triggerall = movereversed
trigger1 = var(4) := 1
ignorehitpause = 1

[State 131, ヘルパー消去]
type = Destroyself
triggerall = ishelper(131)
trigger1 = !alive
trigger2 = !root,alive
trigger3 = roundstate != 2
trigger4 = root,numexplod(12000) = 1
trigger5 = root,palno != 11
trigger5 = root,anim != [1100,1200]
trigger5 = root,anim != [7000,7200]
trigger5 = root,anim != [9000,9200]
ignorehitpause = 1

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

[Statedef 132]
ctrl = 0

[State 132, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 132, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(132)
statetype = A
movetype = A
physics = N
ignorehitpause = 1

[State 132, アニメ変更]
type = Changeanim
trigger1 = ishelper(132)
trigger1 = anim != 11000
value = 11000
ignorehitpause = 1

[State 132, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(132)
value = 9999999999999
ignorehitpause = 1

[State 132, 透明化]
type = Assertspecial
triggerall = ishelper(132)
trigger1 = roundstate = 4
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 132, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(132)
value = 0
ignorehitpause = 1

[State 132, アーマー追従]
type = Bindtoroot
trigger1 = ishelper(132)
pos = cos(gametime) * 2, sin(gametime) * 3 - 15
ignorehitpause = 1

[state 132, 振り向き]
type = Turn
triggerall = ishelper(132)
trigger1 = facing != root,facing
ignorehitpause = 1

[State 132, 影１１Ｐ]
type = Afterimage
triggerall = ishelper(132)
triggerall = roundstate != 4
trigger1 = time = 0
time = -1
length = 60
palinvertall = 1
palcontrast = 5, 5, 5
paladd = 25, 25, 25
palmul = .65, .65, .65
framegap = 1
trans = sub
ignorehitpause = 1

[State 132, 透明１１Ｐ]
type = Trans
trigger1 = ishelper(132)
trans = sub
ignorehitpause = 1

[State 132, 内臓]
type = Explod
triggerall = ishelper(132)
trigger1 = time = 0
anim = 1400
ID = 1200
pos = -6, -41
postype = p1
bindtime = -1
removetime = -1
scale = 0.04, 0.04
sprpriority = 0
ownpal = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[state 132, エフェクト消去]
type = Removeexplod
triggerall = ishelper(132)
trigger1 = roundstate = 4
ignorehitpause = 1

[State 132, 背景反転]
type = Bgpalfx
triggerall = ishelper(132)
trigger1 = roundstate = 2
time = 1
invertall = 1
color = 255
ignorehitpause = 1

[State 132, 凍結超即死当身ＯＴＨキラー]
type = Reversaldef
trigger1 = ishelper(132)
reversal.attr = SCA, AA, AT, AP
pausetime = 0, 3000
sparkxy = 999, 999
p2stateno = 4000
ignorehitpause = 1

[State 132, 死の宣告]
type = Targetlifeadd
triggerall = ishelper(132)
triggerall = numtarget
trigger1 = !target,ishelper
value = -9999999999999
absolute = 1
ignorehitpause = 1

[State 132, 毒]
type = Targetlifeadd
triggerall = ishelper(132)
triggerall = numtarget
trigger1 = !target,ishelper
value = -1
absolute = 1
ignorehitpause = 1

[State 132, 八百長対策]
type = Assertspecial
triggerall = ishelper(132)
triggerall = roundstate >= 3
trigger1 = root,anim != [170,181]
trigger1 = root,stateno != 5150
flag = roundnotover
ignorehitpause = 1

[State 132, ヘルパー消去]
type = Destroyself
triggerall = ishelper(132)
trigger1 = !alive
trigger2 = !root,alive
ignorehitpause = 1

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

[Statedef 140]
type = U
movetype = U
physics = U 
movehitpersist = 1
hitdefpersist = 1

[State 140, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 140, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 140, 準ステート固定]
type = Null
trigger1 = !ishelper
ignorehitpause = 1

[State 140, 死亡時]
type = ChangeState
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

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

[Statedef 150]
ctrl = 0

[State 150, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 150, ヘルパーアニメ変更]
type = Changeanim
trigger1 = ishelper(150)
value = 10000
ignorehitpause = 1

[State 150, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(150)
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 150, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(150)
value = 9999999999999
ignorehitpause = 1

[State 150, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(150)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 150, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(150)
value = 0
ignorehitpause = 1

[State 150, ヘルパー追従]
type = Bindtoroot
trigger1 = ishelper(150)
pos = 0, 0
ignorehitpause = 1

[state 150, 押し戻し判定追加]
type = Playerpush
trigger1 = ishelper(150)
value = 1
ignorehitpause = 1

[state 150, 振り向き]
type = Turn
triggerall = ishelper(150)
trigger1 = facing != root,facing
ignorehitpause = 1

[State 150, アーマー処理]
type = Hitoverride
trigger1 = ishelper(150)
time = -1
slot = 1
attr = SCA, AA, AT, AP
stateno = 150
ignorehitpause = 1

[State 150, 一定時間無敵]
type = Nothitby
triggerall = ishelper(150)
trigger1 = gethitvar(damage)
value = SCA
time = 12
ignorehitpause = 1

[State 150, 特定動作中無敵]
type = Nothitby
triggerall = ishelper(150)
trigger1 = roundstate != 2
trigger2 = root,anim = 100
trigger3 = root,anim = 105
trigger3 = root,anim = 116
trigger4 = root,anim = 117
trigger5 = root,anim = 1000
trigger6 = root,anim = 1100
trigger7 = root,anim = 1200
trigger8 = root,anim = 7000
trigger9 = root,anim = 7100
trigger10 = root,anim = 7200
trigger11 = root,anim = 9000
trigger12 = root,anim = 9100
trigger13 = root,anim = 9200
value = SCA
time = 1
ignorehitpause = 1

[State 150, １２Ｐ反射ダメージ]
type = Varset
triggerall = ishelper(150)
trigger1 = gethitvar(damage)
var(8) = gethitvar(damage)
ignorehitpause = 1

[State 150, 八百長対策]
type = Assertspecial
triggerall = ishelper(150)
triggerall = roundstate >= 3
triggerall = root,anim != [170,181]
trigger1 = root,stateno != 5150
flag = roundnotover
ignorehitpause = 1

[State 150, ヘルパー消去]
type = Destroyself
triggerall = ishelper(150)
trigger1 = !alive
ignorehitpause = 1

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

[Statedef 151]
ctrl = 0

[State , 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 151, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(151)
value = 9999999999999
ignorehitpause = 1

[State 151, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(151)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 151, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(151)
value = 0
ignorehitpause = 1

[state 151, ヘルパー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(151)
value = 0
ignorehitpause = 1

[State 151, ヘルパー追従]
type = Bindtoroot
trigger1 = ishelper(151)
pos = 0, 0
ignorehitpause = 1

[State 151, 無敵化]
type = Nothitby
trigger1 = ishelper(151)
value = SCA, AA, AT, AP
time = -1
ignorehitpause = 1

[State 151, ヘルパーステートタイプ変更]
type = Statetypeset
triggerall = ishelper(151)
triggerall = numtarget = 0
trigger1 = numhelper(152) > 0
statetype = A
movetype = A
physics = N
ignorehitpause = 1

[State 151, ヘルパーアニメ変更]
type = Changeanim
triggerall = ishelper(151)
triggerall = numtarget = 0
trigger1 = numhelper(152) > 0
value = 1002
ignorehitpause = 1

[State 151, ターゲット習得時ステートタイプ変更]
type = Statetypeset
triggerall = ishelper(151)
trigger1 = numtarget = 8
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 151, ターゲット習得時アニメ変更]
type = changeanim
triggerall = ishelper(151)
trigger1 = numtarget = 8
value= 1004
ignorehitpause = 1

[State 151, 生成用ヘルパー保険]
type = Helper
triggerall = ishelper(151)
trigger1 = numhelper(152) < 8
trigger1 = helper(151),numtarget < 8
ID = 152
name = "konsen_seisei"
postype = p1
pos = 0, 0
stateno = 152
helpertype = player
keyctrl = 0
size.xscale = 1
size.yscale = 1
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 151, 永続ターゲット]
type = Reversaldef
triggerall = ishelper(151)
trigger1 = numtarget > 0
reversal.attr = SCA, AA, AT, AP
priority = 9999999999999
pausetime = 0, 0
sparkno = -1
hitsound = -1
ignorehitpause = 1

[State 151, 当身されないＨｉｔｄｅｆ]
type = Hitdef
triggerall = ishelper(151)
triggerall = numtarget = 0
trigger1 = numhelper(152) > 0
attr = ,NA
numhits = 0
hitflag = MAFDP
priority = 7, Hit
pausetime = 0, 10
animtype = hard
sparkxy = 999, -999
getpower = 0
givepower = -1
hitsound = -1
guardsound = -1
ground.type = high 
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = 0, 0
airguard.velocity = 0, 0
air.type = Low
air.velocity = 0, 0
air.hittime = 5
fall = 0
affectteam = f
ignorehitpause = 1

[State 151, １１Ｐ習得ステート飛ばし、アーマー貫通砲]
type = Targetstate
triggerall = ishelper(151)
triggerall = roundstate = 2
triggerall = numtarget > 0
triggerall = root,numexplod(12000) = 0
triggerall = target,ishelper
triggerall = root,palno = 11
trigger1 = root,statetype = S
trigger2 = enemy,stateno != 110
trigger2 = enemy,stateno != 5110
value = 7500
ignorehitpause = 1

[State 151, １２Ｐ習得ステート飛ばし、アーマー貫通砲]
type = Targetstate
triggerall = ishelper(151)
triggerall = roundstate = 2
triggerall = numtarget > 0
triggerall = root,numexplod(12000) = 0
triggerall = target,ishelper
triggerall = root,palno = 12
trigger1 = root,anim = [9000,9200]
value = 7500
ignorehitpause = 1

[State 151, １１Ｐ習得ステート飛ばし、即死返し]
type = Targetstate
triggerall = ishelper(151)
triggerall = roundstate = 2
triggerall = numtarget > 0
triggerall = root,numexplod(12000) = 0
triggerall = target,ishelper
triggerall = root,palno = 11
trigger1 = root,statetype = A
trigger2 = enemy,stateno = 110
trigger3 = enemy,stateno = 5110
value = 7300
ignorehitpause = 1

[State 151, １２Ｐ習得ステート飛ばし、即死返し]
type = Targetstate
triggerall = ishelper(151)
triggerall = roundstate = 2
triggerall = numtarget > 0
triggerall = root,numexplod(12000) = 0
triggerall = target,ishelper
triggerall = root,palno = 12
trigger1 = root,anim = [7000,7200]
value= 7300
ignorehitpause = 1

[State 151, 習得ステート飛ばし、変数弄り]
type = Targetstate
triggerall = ishelper(151)
triggerall = numtarget > 0
triggerall = root,numexplod(12000) = 0
triggerall = target,ishelper
trigger1 = root,palno = 11 && root,statetype = C
trigger2 = root,palno = 11 && gametime % 600 = [0,60]
trigger3 = root,palno = 12
trigger3 = root,anim = [1100,1200]
value= 7400
ignorehitpause = 1

[State 151, ヘルパー消去]
type = Destroyself
triggerall = ishelper(151)
trigger1 = !alive
trigger2 = !root,alive
trigger3 = root,palno = 12
trigger3 = enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu"
trigger3 = root,anim != [9000,9200]
ignorehitpause = 1

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

[Statedef 152]
ctrl = 0

[State , 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 152, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(152)
statetype = S
movetype = H
physics = N
ignorehitpause = 1

[State 152, ヘルパーアニメ変更]
type = Changeanim
trigger1 = ishelper(152)
value = 1003
ignorehitpause = 1

[State 152, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(152)
value = 9999999999999
ignorehitpause = 1

[State 152, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(152)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 152, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(152)
value = 0
ignorehitpause = 1

[state 152, ヘルパー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(152)
value = 0
ignorehitpause = 1

[State 152, ヘルパー追従]
type = Bindtoroot
trigger1 = ishelper(152)
pos = 0, 0
ignorehitpause = 1

[State 152, ターゲット生成]
type = Nothitby
triggerall = ishelper(152)
trigger1 = numhelper(152) < 8
value= SCA
ignorehitpause = 1

[State 152, ターゲット増加]
type = Hitby
triggerall = ishelper(152)
trigger1 = numhelper(152) = 8
value= SCA, NA
ignorehitpause = 1

[State 152, 空ターゲット作成]
type = Destroyself
triggerall = ishelper(152)
trigger1 = numhelper(151)
trigger1 = helper(151),numtarget = 8
trigger2 = numhelper(151) = 0
trigger3 = root,numexplod(12000) = 1
ignorehitpause = 1

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

[Statedef 153]
ctrl = 0

[State 153, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 153, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(153)
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 153, ヘルパーアニメ変更]
type = Changeanim
trigger1 = ishelper(153)
value = 1004
ignorehitpause = 1

[State 153, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(153)
value = 9999999999999
ignorehitpause = 1

[State 153, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(153)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 153, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(153)
value = 0
ignorehitpause = 1

[State 153, ヘルパー追従]
type = Bindtoroot
trigger1 = ishelper(153)
pos = 0, 0
ignorehitpause = 1

[state 153, ヘルパー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(153)
value = 0
ignorehitpause = 1

[state 153, ヘルパー消去]
type = Destroyself
triggerall = ishelper(153)
trigger1 = numhelper(151)
trigger1 = helper(151),numtarget = 8
trigger2 = roundstate > 1
ignorehitpause = 1

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

[Statedef 154]

[State 154, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 154, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

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

[StateDef 155]
ctrl = 0

[State 155, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 155, ヘルパーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(155)
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 155, ヘルパーアニメ変更]
type = Changeanim
trigger1 = ishelper(155)
value = 1004
ignorehitpause = 1

[State 155, ヘルパーライフ]
type = Lifeset
trigger1 = ishelper(155)
value = 9999999999999
ignorehitpause = 1

[State 155, ヘルパー透明化]
type = Assertspecial
trigger1 = ishelper(155)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 155, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper(155)
value = 0
ignorehitpause = 1

[State 155, ヘルパー追従]
type = Bindtoroot
trigger1 = ishelper(155)
pos = 0, 0
ignorehitpause = 1

[state 155, ヘルパー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(155)
value = 0
ignorehitpause = 1

[state 155, 時止め解除]
type = Pause
triggerall = ishelper(155)
trigger1 = root,palno = 11
trigger2 = root,palno != 11
trigger2 = roundstate > 2
trigger3 = root,anim = [1000,1200]
trigger4 = root,anim = [7000,7200]
trigger5 = root,anim = [9000,9200]
time = 0
movetime = 0
ignorehitpause = 1

[state 155, 時止め解除]
type = Superpause
triggerall = ishelper(155)
trigger1 = root,palno = 11
trigger2 = root,palno != 11
trigger2 = roundstate > 2
trigger3 = root,anim = [1000,1200]
trigger4 = root,anim = [7000,7200]
trigger5 = root,anim = [9000,9200]
anim = -1
time = 0
movetime = 0
darken = 0
p2defmul = 1
ignorehitpause = 1

[state 155, 対現実、黒イフ]
type = Pause
triggerall = ishelper(155)
triggerall = !enemy,alive && !enemy(numenemy = 2),alive
trigger1 = enemy,name = "genjitsu"
trigger2 = enemy,name = "Efreet"
time = 9999999999999
movetime = 9999999999999
ignorehitpause = 1

[state 155, 対現実、黒イフ]
type = Superpause
triggerall = ishelper(155)
triggerall = !enemy,alive && !enemy(numenemy = 2),alive
trigger1 = enemy,name = "genjitsu"
trigger2 = enemy,name = "Efreet"
anim = -1
time = 9999999999999
movetime = 9999999999999
darken = 0
p2defmul = 1
ignorehitpause = 1

[state 155, 超即死用時止め]
type = Pause
triggerall = ishelper(155)
triggerall = roundstate = 2
trigger1 = !enemy,alive && !enemy(numenemy = 2),alive
time = 1
movetime = 1
ignorehitpause = 1

[state 155, 超即死用時止め]
type = Superpause
triggerall = ishelper(155)
triggerall = roundstate = 2
trigger1 = !enemy,alive && !enemy(numenemy = 2),alive
anim = -1
time = 1
movetime = 1
darken = 0
p2defmul = 1
ignorehitpause = 1

[state 155, ヘルパー消去]
type = Destroyself
triggerall = ishelper(155)
trigger1 = !alive
trigger2 = !root,alive
trigger3 = numhelper(155) > 1
ignorehitpause = 1

;===========================================================================
;タイムオーバー（負けた時）
[Statedef 170]
type = S
ctrl = 0
velset = 0,0

[State 170, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 170, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 170, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 170
value = 170
ignorehitpause = 1

[State 170, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
value = 2000, 43
volume = 255
loop = 1
ignorehitpause = 1

[State 170, 演出延長]
type = Assertspecial
trigger1 = animelemtime(1) <= 300
flag = roundnotover
ignorehitpause = 1

[State 170, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 170, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type = S
ctrl = 0
velset = 0,0

[State 175, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 175, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 175, 1] ; If no anim, use go to lose state.
type = ChangeState
triggerall = !ishelper
trigger1 = animelem = 1
trigger1 = !SelfAnimExist(175)
value = 170
ignorehitpause = 1

[State 175, 2]
type = ChangeAnim
triggerall = !ishelper
trigger1 = animelem = 1
value = 175
ignorehitpause = 1

[State 175, 演出延長]
type = Assertspecial
trigger1 = animelemtime(1) <= 300
flag = roundnotover
ignorehitpause = 1

[State 175, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 175, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
;勝利ポーズ分岐（common1.cnsには無いけど、これもコモンステート）
[Statedef 180]
type = S

[State 180, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 180, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 180, ステート変更]
type = ChangeState
triggerall = !ishelper
trigger1 = win
value = 181
ignorehitpause = 1

[State 180, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 180, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
;勝利ポーズ（礼をする）
[Statedef 181]
type = S
ctrl = 0
velset = 0,0

[State 181, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 181, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 181, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 181
value = 181
ignorehitpause = 1

[State 181, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 1
trigger2 = animelemtime(1) = 90
trigger3 = animelemtime(1) = 180
value = 2000, 3
ignorehitpause = 1

[State 181, 演出延長]
type = Assertspecial
trigger1 = animelemtime(1) <= 300
flag = roundnotover
ignorehitpause = 1

[State 181, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 181, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 190, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 190, 1]
type = ChangeAnim
triggerall = !ishelper
trigger1 = SelfAnimExist(190)
value = 190
ignorehitpause = 1

[State 190, 2] ;Go straight to intro.
type = ChangeState
triggerall = !ishelper
trigger1 = animelem = 1
value = 191
ignorehitpause = 1

[State 190, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 190, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
;イントロ（試合開始前の登場演出アクション）
[Statedef 191]
type = S
ctrl = 0
velset = 0,0

[State 191, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 191, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 191, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 191
value = 191
ignorehitpause = 1

[State 191, アニメ変更]
type = ChangeAnim
triggerall = !ishelper
trigger1 = RoundState = 0
value = 191
ignorehitpause = 1

[State 191, フェードイン]
type = Trans
triggerall = !ishelper
trigger1 = animelemtime(1) < 60
trans = addalpha
alpha = animelemtime(1), 256-animelemtime(1)
ignorehitpause = 1

[State 191, 特殊効果]
type = AssertSpecial
trigger1 = !ishelper
flag = Intro
ignorehitpause = 1

[State 191, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelem = 2
value = 2000, 1
volume = 255
ignorehitpause = 1

[State 191, 音を鳴らす2]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = animelemtime(1) = 120
value = 2000, 0
volume = 255
ignorehitpause = 1

[State 191, ステート変更]
type = ChangeState
triggerall = !ishelper
trigger1 = AnimTime = 0
trigger2 = !time
trigger2 = roundstate = 2
value = 0
ignorehitpause = 1

[State 191, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 191, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]

[State 5000, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5000, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5001]

[State 5001, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5001, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]

[State 5010, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5010, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]

[State 5011, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5011, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]

[State 5020, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5020, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]

[State 5030, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5030, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]

[State ]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]

[State 5040, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5040, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5050, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
triggerall = !ishelper
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050
ignorehitpause = 1

[State 5050, 2] ;Coming down anim
type = ChangeAnim
triggerall = !ishelper
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0
ignorehitpause = 1

[State 5050, 3] ;Gravity
type = VelAdd
triggerall = !ishelper
trigger1 = 1
y = GetHitVar(yaccel)
ignorehitpause = 1

[State 5050, 4] ;Recover near ground
type = ChangeState
triggerall = !ishelper
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER
ignorehitpause = 1

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = !ishelper
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER
ignorehitpause = 1

[state 5050, エフェクト消去]
type = Removeexplod
trigger1 = 1
ignorehitpause = 1

[State 5050, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
triggerall = palno != 11
trigger1 = time = 0
value = 11, 1
ignorehitpause = 1

[State 5050, 6]
type = ChangeState
triggerall = !ishelper
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_TRIP (shaking)
[Statedef 5070]

[State 5070, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5070, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]

[State 5071, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5071, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]

[State 5080, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5080, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 5081]

[State 5081, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5081, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N

[State 5100, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5100, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 5100, 1]
type = VelSet
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1
ignorehitpause = 1

[State 5100, EnvShake]
type = FallEnvShake
triggerall = !ishelper
trigger1 = Time = 0
ignorehitpause = 1

[State 5100, Var] ;Save fall velocity
type = VarSet
triggerall = !ishelper
trigger1 = Time = 0
sysvar(1) = floor(vel y)
ignorehitpause = 1

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100
ignorehitpause = 1

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = !ishelper
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)
ignorehitpause = 1

[State 5100, 4]
type = PosSet
triggerall = !ishelper
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 5100, 5]
type = VelSet
triggerall = !ishelper
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 5100, 6] ;Reduce speed
type = VelMul
triggerall = !ishelper
trigger1 = Time = 0
x = 0.75
ignorehitpause = 1

[State 5100, 7]
type = ChangeState
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN
ignorehitpause = 1

[State 5100, 8]
type = GameMakeAnim
triggerall = !ishelper
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14
ignorehitpause = 1

[State 5100, 10]
type = PlaySnd
triggerall = !ishelper
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)
ignorehitpause = 1

[State 5100, 11]
type = PosFreeze
triggerall = !ishelper
trigger1 = 1
ignorehitpause = 1

[State 5100, 12]
type = ChangeState
triggerall = !ishelper
trigger1 = AnimTime = 0
value = 5101
ignorehitpause = 1

[State 5100, 13]
type = ForceFeedback
triggerall = !ishelper
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= H
physics = N

[State 5101, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5101, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160
ignorehitpause = 1

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)
ignorehitpause = 1

[State 5101, 3]
type = HitFallVel
triggerall = !ishelper
trigger1 = Time = 0
ignorehitpause = 1

[State 5101, 4]
type = PosSet
triggerall = !ishelper
trigger1 = Time = 0
y = 20
ignorehitpause = 1

[State 5101, 5] ;Acceleration
type = VelAdd
triggerall = !ishelper
trigger1 = 1
y = .4
ignorehitpause = 1

[State 5101, 6] ;Hit ground
triggerall = !ishelper
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

[State 5110, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5110, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 5110, EnvShake]
type = FallEnvShake
triggerall = !ishelper
trigger1 = Time = 0
ignorehitpause = 1

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
triggerall = !ishelper
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)
ignorehitpause = 1

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170
ignorehitpause = 1

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)
ignorehitpause = 1

[State 5110, 5]
type = PosSet
triggerall = !ishelper
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 5110, Var] ;Get fall velocity
type = VarSet
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)
ignorehitpause = 1

[State 5110, 6]
type = PlaySnd
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)
ignorehitpause = 1

[State 5110, 7]
type = GameMakeAnim
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14
ignorehitpause = 1

[State 5110, 8]
type = VelSet
triggerall = !ishelper
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = !ishelper
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)
ignorehitpause = 1

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = !ishelper
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110
ignorehitpause = 1

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !ishelper
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150
ignorehitpause = 1

[State 5110, 12]
type = VarSet
triggerall = !ishelper
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0
ignorehitpause = 1

[State 5110, 13] ;Friction
type = VelMul
triggerall = !ishelper
trigger1 = 1
x = 0.85
ignorehitpause = 1

[State 5110, 14]
type = ForceFeedback
triggerall = !ishelper
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine
ignorehitpause = 1

[State 5110, 15]
type = ForceFeedback
triggerall = !ishelper
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]

[State 5120, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5120, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = 4
movehitpersist = 1

[State 5150, 保険]
type = Selfstate
triggerall = name = "Mirror Cube Square"
triggerall = !ishelper
trigger1 = alive
value = 40
ignorehitpause = 1

[State 5150, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper
value = 0
ignorehitpause = 1

[State 5150, 死亡]
type = LifeSet
triggerall = name != "Mirror Cube Square"
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5150, 透明化]
type = Assertspecial
trigger1 = name != "Mirror Cube Square"
flag = invisible
ignorehitpause = 1

[State 5150, 固定化]
type = Posset
triggerall = name != "Mirror Cube Square"
triggerall = !ishelper
trigger1 = !alive
x = 0
y = 0
ignorehitpause = 1

[State 5150, 死なない場合]
type = Selfstate
triggerall = !ishelper
triggerall = alive
trigger1 = time >= 60
value = 50
ignorehitpause = 1

[State 5150, ヘルパー消去]
type = Destroyself
triggerall = name != "Mirror Cube Square"
trigger1 = ishelper
ignorehitpause = 1

[state 5150, エフェクト消去]
type = Removeexplod
trigger1 = name != "Mirror Cube Square"
ignorehitpause = 1

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = name = "Mirror Cube Square"
triggerall = !ishelper
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140
ignorehitpause = 1

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
triggerall = name = "Mirror Cube Square"
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)
ignorehitpause = 1

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
triggerall = name = "Mirror Cube Square"
triggerall = !ishelper
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10
ignorehitpause = 1

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
triggerall = name = "Mirror Cube Square"
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110
ignorehitpause = 1

[State 5150, 6] ;Friction
type = VelMul
triggerall = name = "Mirror Cube Square"
triggerall = !ishelper
trigger1 = 1
x = 0.85
ignorehitpause = 1

[State 5150, 7] ;Friction
type = VelSet
triggerall = name = "Mirror Cube Square"
triggerall = !ishelper
trigger1 = Vel x < .05
persistent = 0
x = 0
ignorehitpause = 1

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

[State 5150, 設置ミラーステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(2000) || ishelper(2100) || ishelper(2200)
statetype = A
movetype = A
physics = N
ignorehitpause = 1

[State 5150, 設置ミラーアニメ変更]
type = Changeanim
triggerall = ishelper(2000) || ishelper(2100) || ishelper(2200)
trigger1 = anim != 2300
value = 2300
ignorehitpause = 1

[State 5150, 設置ミラーコントロール不可]
type = Ctrlset
trigger1 = ishelper(2000) || ishelper(2100) || ishelper(2200)
value = 0
ignorehitpause = 1

[State 5150, 設置ミラー速度設定]
type = Velset
trigger1 = ishelper(2000) || ishelper(2100) || ishelper(2200)
x = 1
ignorehitpause = 1

[State 5150, 設置ミラーライフ]
type = Lifeset
trigger1 = ishelper(2000) || ishelper(2100) || ishelper(2200)
value = 9999999999999
ignorehitpause = 1

[State 5150, 設置ミラー影消し]
type = Assertspecial
trigger1 = ishelper(2000) || ishelper(2100) || ishelper(2200)
flag = noshadow
ignorehitpause = 1

[State 5150, 設置ミラー攻撃判定１〜６Ｐ]
type = Hitdef
triggerall = ishelper(2000) || ishelper(2100) || ishelper(2200)
triggerall = root,palno = [1,6]
trigger1 = var(4) != 1
attr = , SA
damage   = 1
priority = 7, hit
animtype = Medium
sparkxy = 999, 999

[State 5150, 設置ミラー当身感知時代入]
type = Null
triggerall = ishelper(2000) || ishelper(2100) || ishelper(2200)
triggerall = movereversed
trigger1 = var(4) := 1
ignorehitpause = 1

[state 5150, 設置ミラー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(2000) || ishelper(2100) || ishelper(2200)
value = 0
ignorehitpause = 1

[State 5150, 設置ミラー超即死返し７〜１２Ｐ]
type = Reversaldef
triggerall = ishelper(2000) || ishelper(2100) || ishelper(2200)
triggerall = root,palno = [7,12]
trigger1 = root,var(7) != 0
reversal.attr = SCA, AA, AT, AP
pausetime = 0, 2
hitsound = s2000, 24
sparkxy = 999, 999
p1stateno = 153
p2stateno = root,var(7)
p2getp1state = 0
ignorehitpause = 1

[State 5150, 設置ミラー超即死当身７〜１２Ｐ]
type = Reversaldef
triggerall = ishelper(2000) || ishelper(2100) || ishelper(2200)
triggerall = root,palno = [7,12]
trigger1 = root,var(7) = 0
reversal.attr = SCA, AA, AT, AP
pausetime = 0, 2
hitsound = s2000, 24
sparkxy = 999, 999
p1stateno = 153
p2stateno = 4000
ignorehitpause = 1

[State 5150, 設置ミラーターゲットオーバーフロー]
type = Targetlifeadd
triggerall = ishelper(2000) || ishelper(2100) || ishelper(2200)
trigger1 = root,palno = [7,12]
value = -9999999999999
absolute = 1
ignorehitpause = 1

[State 5150, 設置ミラー画面端到達時消滅]
type = Destroyself
triggerall = ishelper(2000) || ishelper(2100) || ishelper(2200)
trigger1 = frontedgebodydist <= -50
trigger2 = frontedgebodydist >= 370
trigger3 = !alive
ignorehitpause = 1

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

[State 5150, 跳弾ステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
statetype = A
movetype = A
physics = N
ignorehitpause = 1

[State 5150, 跳弾アニメ変更]
type = Changeanim
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = anim != 370
value = 370
ignorehitpause = 1

[State 5150, 跳弾コントロール不可]
type = Ctrlset
trigger1 = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
value = 0
ignorehitpause = 1

[State 5150, 跳弾ライフ]
type = Lifeset
trigger1 = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
value = 9999999999999
ignorehitpause = 1

[State 5150, 跳弾残像１〜６Ｐ]
type = Afterimage
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
triggerall = root,palno = [1,6]
trigger1 = animelem = 1
time = -1
length = 60
palcontrast = 256, 256, 256
paladd = 10, 10, 10
palmul = .65, .65, .65
framegap = 1
trans = add
ignorehitpause = 1

[State 5150, 跳弾残像７〜１０Ｐ]
type = Afterimage
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
triggerall = root,palno = [7,10]
trigger1 = animelem = 1
time = -1
length = 60
palcontrast = 256, 0, 0
paladd = 25, 10, 10
palmul = .75, .65, .65
framegap = 1
trans = add
ignorehitpause = 1

[State 5150, 跳弾残像１２Ｐ]
type = Afterimage
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
triggerall = root,palno = 12
trigger1 = animelem = 1
time = -1
length = 60
palcontrast = 256 - (10 * gametime) % 256, 256 - (5 * gametime) % 256, 256 - (2 * gametime) % 256
paladd = 25, 25, 25
palmul = .65, .65, .65
framegap = 1
trans = add
ignorehitpause = 1

[State 5150, 跳弾半透明化]
type = Trans
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = root,palno = [1,10]
trigger2 = root,palno = 12
trans = add
ignorehitpause = 1

[State 5150, 跳弾影消し]
type = Assertspecial
trigger1 = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
flag = noshadow
ignorehitpause = 1

[State 5150, 跳弾反射音]
type = Playsnd
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = frontedgebodydist = 0
trigger2 = frontedgebodydist = 320
trigger3 = screenpos Y = 0
trigger4 = screenpos Y = 240
value = 2000, 39
ignorehitpause = 1

[state 5150, 跳弾押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
value = 0
ignorehitpause = 1

[State 5150, 跳弾攻撃判定]
type = Hitdef
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = var(4) != 1
attr = A, NA
damage   = 5
priority = 7, hit
sparkxy = 999, 999
ground.slidetime = 20
ground.hittime = 20

[State 5150, 跳弾当身感知時代入]
type = Null
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
triggerall = movereversed
trigger1 = var(4) := 1
ignorehitpause = 1

[State 5150, 跳弾立ちＡ時初期軌道]
type = Velset
triggerall = ishelper(3000)
trigger1 = var(8) = 0
x = -8
y = -1
ignorehitpause = 1

[State 5150, 跳弾しゃがみＡ時初期軌道]
type = Velset
triggerall = ishelper(3100)
trigger1 = var(8) = 0
x = 1.3
y = 8
ignorehitpause = 1

[State 5150, 跳弾ジャンプＡ時初期軌道]
type = Velset
triggerall = ishelper(3200)
trigger1 = var(8) = 0
x = 1.3
y = -8
ignorehitpause = 1

[State 5150, 跳弾立ちＢ時初期軌道]
type = Velset
triggerall = ishelper(3300)
trigger1 = var(8) = 0
x = -5
y = -5
ignorehitpause = 1

[State 5150, 跳弾しゃがみＢ時初期軌道]
type = Velset
triggerall = ishelper(3400)
trigger1 = var(8) = 0
x = 5
y = -5
ignorehitpause = 1

[State 5150, 跳弾ジャンプＢ時初期軌道]
type = Velset
triggerall = ishelper(3500)
trigger1 = var(8) = 0
x = -5
y = 5
ignorehitpause = 1

[State 5150, 跳弾Ｘ用反射時軌道変更]
type = Velmul
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = frontedgebodydist  <= 0
trigger2 = frontedgebodydist  >= 320
x = -1
ignorehitpause = 1

[State 5150, 跳弾Ｙ用反射時軌道変更]
type = Velmul
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = screenpos Y <= 0
trigger2 = screenpos Y >= 240
y = -1
ignorehitpause = 1

[State 5150, 跳弾反射回数記憶]
type = Varadd
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = frontedgebodydist  <= 0
trigger2 = frontedgebodydist  >= 320
trigger3 = screenpos Y <= 0
trigger4 = screenpos Y >= 240
var(8) = 1
ignorehitpause = 1

[State 5150, 跳弾消滅]
type = Destroyself
triggerall = ishelper(3000) || ishelper(3100) || ishelper(3200) || ishelper(3300) || ishelper(3400) || ishelper(3500)
trigger1 = !alive
trigger2 = var(8) > 5
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
[Statedef 5200]

[State 5200, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5200, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]

[State 5201, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5201, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]

[State 5210, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5210, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]
type = S
ctrl = 0
anim = 5300
velset = 0,0

[State 5500, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5500, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 5500, 1] ;Use continue animation if available
type = ChangeAnim
triggerall = !ishelper
trigger1 = time = 0
trigger1 = SelfAnimExist(5500)
value = 5500
ignorehitpause = 1

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, ヘルパー消去]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 5900, 自キャラ以外だった場合]
type = Changestate
triggerall = !ishelper
trigger1 = name != "Mirror Cube Square"
value = 5150
ignorehitpause = 1

[State 5900, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 5900
value = 5900
ignorehitpause = 1

[State -2, １１、１２Ｐ混線用ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = palno = [11,12]
trigger1 = numhelper(151) = 0
ID = 151
name = "konsen"
postype = p1
pos = 0, 0
stateno = 151
helpertype = player
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State -2, １１、１２Ｐ生成用ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = palno = [11,12]
trigger1 = numhelper(152) < 8
ID = 152
name = "konsen_seisei"
postype = p1
pos = 0, 0
stateno = 152
helpertype = player
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[state 5900, １１、１２Ｐ占有ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = palno = [11,12]
triggerall = numhelper(152) = 8
trigger1 = (numhelper + enemy,numhelper) < 55 + numhelper(151)
ID = 153
name = "konsen_senyu"
postype = p1
pos = 0, 0
stateno = 153
helpertype = player
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[state 5900, 開幕混線用ループ]
type = Changestate
triggerall = !ishelper
triggerall = palno = [11,12]
trigger1 = (numhelper + enemy,numhelper) < 56
value = 5900
ignorehitpause = 1

[State 5900, 1] ;Clear all int variables
type = VarRangeSet
triggerall = !ishelper
trigger1 = roundsexisted = 0
value = 0
ignorehitpause = 1

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
triggerall = !ishelper
trigger1 = roundsexisted = 0
fvalue = 0
ignorehitpause = 1

[State 5900, 3] ;Intro for round 1
type = ChangeState
triggerall = !ishelper
trigger1 = roundno = 1
trigger2 = palno = 11
value = 190
ignorehitpause = 1

[State 5900, 死亡時]
type = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 5900, 準ステート固定]
type = Changestate
triggerall = !ishelper
trigger1 = !(enemy,name = "ONI-MIKO-REIMU" || enemy,name = "H-Reimu")
value = 140
ignorehitpause = 1
