
;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = U
movetype = U
physics = N

[State 0, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 0, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 0, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 0, コントロールフラグ]
type = Varset
triggerall = !ishelper
trigger1 = ctrl
trigger2 = roundstate > 1
trigger2 = !animtime
sysvar(2) = 1
ignorehitpause = 1

[State 0, コントロール可否]
type = Ctrlset
triggerall = !ishelper
trigger1 = sysvar(2)
value = 1
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 = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 0, 立ちガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 130
ignorehitpause = 1

[State 0, 立ち食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5000
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 = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 0, １２Ｐ準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type = U
movetype = U
physics = N

[State 10, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 10, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
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 = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 10, しゃがみガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 131
ignorehitpause = 1

[State 10, しゃがみ食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5010
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 = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 10, １２Ｐ準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type = U
movetype = U
physics = N

[State 11, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 11, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
ignorehitpause = 1

[State 11, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 0
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 = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 11, 食らい感知]
type = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 11, しゃがみガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 131
ignorehitpause = 1

[State 11, しゃがみ食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5010
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 = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
ignorehitpause = 1

[State 11, １２Ｐ準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type = U
movetype = U
physics = N

[State 12, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 12, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
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 = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 12, 立ちガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 130
ignorehitpause = 1

[State 12, 立ち食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5000
ignorehitpause = 1

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

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

[State 12, １２Ｐ準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type = U
movetype = U
physics = N

[State 20, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 20, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 20, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 0
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 = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 20, 食らい感知]
type = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 20, 立ちガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 130
ignorehitpause = 1

[State 20, 立ち食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5000
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 = Changestate
triggerall = !ishelper
trigger1 = !alive
value = 5050
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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type = U
movetype = U
physics = N

[State 40, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 40, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 40, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 40, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

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

[State 40, ジャンプ音]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(1)
triggerall = var(2) = 1
trigger1 = prevstateno != 100
value = s41, 0
ignorehitpause = 1

[State 40, 空中ｏｒハイジャンプ音]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(1)
trigger1 = var(2) = 2
trigger2 = prevstateno = 100
value = s41, 2
ignorehitpause = 1

[State 40, ジャンプエフェクト]
type = Explod
triggerall = !ishelper
trigger1 = !animelemtime(1)
anim = 6000
id = 6000
postype = p1
pos = 0, 17
sprpriority = 7
ownpal = 1
scale = 0.5, 0.5
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 40, 食らい感知]
type = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 40, ジャンプガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 132
ignorehitpause = 1

[State 40, ジャンプ食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5020
ignorehitpause = 1

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

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

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

[State 40, 4]
type = VelSet
triggerall = !ishelper
trigger1 = AnimTime = 0
x = ifelse(var(1)=0, const(velocity.jump.neu.x), ifelse(var(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 = var(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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; AirJump Start
[Statedef 45]
type = U
movetype = U
physics = N

[State 45, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type = U
movetype = U
physics = N

[State 50, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 50, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 50, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 50, 食らい感知]
type = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 50, ジャンプガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 132
ignorehitpause = 1

[State 50, ジャンプ食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5020
ignorehitpause = 1

[State 50, 1]
type = VarSet
triggerall = !ishelper
trigger1 = animelem = 1
var(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, 3]
type = ChangeAnim
triggerall = !ishelper
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3
ignorehitpause = 1

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

[State 50, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; Jump Down (empty State for compatibility)
[Statedef 51]
type = U
movetype = U
physics = N

[State 51, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 51, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 51, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
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 = Targetdrop
triggerall = !ishelper
trigger1 = numtarget
ignonorehitpause = 1

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

[State 51, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type = U
movetype = U
physics = N

[State 52, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 52, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 52, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

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

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

[State 52, 着地音]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = 47, 0
ignorehitpause = 1

[State 52, 着地エフェクト]
type = Explod
triggerall = !ishelper
trigger1 = !animelemtime(1)
anim = 6005
id = 6005
postype = p1
pos = 15, 0
vel = 5, 0
sprpriority = 7
ownpal = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 52, 着地エフェクト]
type = Explod
triggerall = !ishelper
trigger1 = !animelemtime(1)
anim = 6005
id = 6005
postype = p1
pos = -15, 0
vel = -5, 0
sprpriority = 7
ownpal = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 52, 食らい感知]
type = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 52, 立ちガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 130
ignorehitpause = 1

[State 52, 立ち食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5000
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 = animelem = 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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type = U
movetype = U
physics = N

[State 100, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 100, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 100, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 100, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 100, ダッシュ音]
type = Playsnd
triggerall = !ishelper
trigger1 = gametime % 10 = 5
value = s100, 1
ignorehitpause = 1

[State 100, ダッシュエフェクト]
type = Explod
triggerall = !ishelper
trigger1 = gametime % 7 = 6
anim = 6010
id = 6010
postype = p1
pos = 0,6
sprpriority = 7
bindtime = 1
ownpal = 1
scale = 0.5, 0.5
supermovetime = 9999999999999
pausemovetime = 9999999999999
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, 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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type = U
movetype = U
physics = N

[State 105, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 105, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

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

[State 105, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 105, バクステ音]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = s100, 0
ignorehitpause = 1

[State 105, バクステ声]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = s101, 1
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, 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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 106]
type = U
movetype = U
physics = N

[State 106, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 106, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 106, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

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

[State 106, 着地音]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = 47, 0
ignorehitpause = 1

[State 106, 着地エフェクト]
type = Explod
triggerall = !ishelper
trigger1 = !animelemtime(1)
anim = 6005
id = 6005
postype = p1
pos = 15, 0
vel = 5, 0
sprpriority = 7
ownpal = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 106, 着地エフェクト]
type = Explod
triggerall = !ishelper
trigger1 = animelemtime(1) = 2
anim = 6005
id = 6005
postype = p1
pos = -15, 0
vel = -5, 0
sprpriority = 7
ownpal = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 106, 食らい感知]
type = Reversaldef
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = !numtarget(300)
reversal.attr = SCA, AA, AP
ID = 300
pausetime = 0, 2
sparkxy = 999, 999
ignorehitpause = 1

[State 106, 立ちガードモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = target,ishelper
value = 130
ignorehitpause = 1

[State 106, 立ち食らいモーション再現]
type = Changestate
triggerall = !ishelper
triggerall = numtarget(300)
trigger1 = !target,ishelper
value = 5000
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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_UP
[Statedef 110]
type = U
movetype = U
physics = N

[State 110, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 110, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 110 コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 110, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = 30
y = -0.1
ignorehitpause = 1

[State 110, 空中ダッシュ音]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = s41, 1
ignorehitpause = 1

[State 110, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = vel y > 0
trigger1 = pos y >= -5
trigger2 = !animtime
value = 51
ctrl = 1
ignorehitpause = 1

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

[State 110, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_DOWN
[Statedef 115]
type = U
movetype = U
physics = N

[State 115, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 115, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 115 コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 115, 位置調整]
type = Velset
trigger1 = !ishelper
x = -20
y = -0.1
ignorehitpause = 1

[State 115, 空中ダッシュ音]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = s41, 1
ignorehitpause = 1

[State 115, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = vel y > 0
trigger1 = pos y >= -5
trigger2 = !animtime
value = 51
ctrl = 1
ignorehitpause = 1

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

[State 115, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

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

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

[State 120, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

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

;---------------------------------------------------------------------------
; STAND GUARD (guarding)
[Statedef 130]
type = U
movetype = U
physics = N

[State 130, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 130, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 130, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 130, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

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

[State 130, ガードエフェクト]
type = Explod
triggerall = !ishelper
trigger1 = numexplod(130) = 0
anim = 212
ID = 130
postype = p1
pos = 30, -75
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 0.5, 0.5
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 130, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = 120, 3 + random % 3
volume = -64
ignorehitpause = 1

[State 130, ダメージ１〜６Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [1,6]
trigger1 = !animelemtime(1)
sysvar(1) = 15 + random % 16
ignorehitpause = 1

[State 130, ダメージ７〜１０Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [7,10]
trigger1 = !animelemtime(1)
sysvar(1) = 10 + random % 11
ignorehitpause = 1

[State 130, ダメージ１２Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = 12
trigger1 = !animelemtime(1)
sysvar(1) = random % 6
ignorehitpause = 1

[State 130, ターゲット削除]
type = Targetdrop
triggerall = !ishelper
trigger1 = numtarget
ignonorehitpause = 1

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

[State 130, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 0, ifelse(random % 2 = 0, 730, 740))
ignorehitpause = 1

;---------------------------------------------------------------------------
; CROUCH GUARD (guarding)
[Statedef 131]
type = U
movetype = U
physics = N

[State 131, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 131, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
ignorehitpause = 1

[State 131, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 131, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

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

[State 131, ガードエフェクト]
type = Explod
triggerall = !ishelper
trigger1 = numexplod(130) = 0
anim = 212
ID = 130
postype = p1
pos = 20, -40
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 0.5, 0.5
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 131, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = 120, 3 + random % 3
volume = -64
ignorehitpause = 1

[State 131, ダメージ１〜６Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [1,6]
trigger1 = !animelemtime(1)
sysvar(1) = 15 + random % 16
ignorehitpause = 1

[State 131, ダメージ７〜１０Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [7,10]
trigger1 = !animelemtime(1)
sysvar(1) = 10 + random % 11
ignorehitpause = 1

[State 131, ダメージ１２Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = 12
trigger1 = !animelemtime(1)
sysvar(1) = random % 6
ignorehitpause = 1

[State 131, ターゲット削除]
type = Targetdrop
triggerall = !ishelper
trigger1 = numtarget
ignonorehitpause = 1

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

[State 131, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 11, ifelse(random % 2 = 0, 730, 740))
ignorehitpause = 1

;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type = U
movetype = U
physics = N

[State 132, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 132, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 132, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 132, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

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

[State 132, ガードエフェクト]
type = Explod
triggerall = !ishelper
trigger1 = numexplod(130) = 0
anim = 212
ID = 130
postype = p1
pos = 40, -60
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 0.5, 0.5
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 132, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = 120, 3 + random % 3
volume = -64
ignorehitpause = 1

[State 132, ダメージ１〜６Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [1,6]
trigger1 = !animelemtime(1)
sysvar(1) = 15 + random % 16
ignorehitpause = 1

[State 132, ダメージ７〜１０Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [7,10]
trigger1 = !animelemtime(1)
sysvar(1) = 10 + random % 11
ignorehitpause = 1

[State 132, ダメージ１２Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = 12
trigger1 = !animelemtime(1)
sysvar(1) = random % 6
ignorehitpause = 1

[State 132, ターゲット削除]
type = Targetdrop
triggerall = !ishelper
trigger1 = numtarget
ignonorehitpause = 1

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

[State 132, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 51, ifelse(random % 2 = 0, 730, 740))
ignorehitpause = 1

;---------------------------------------------------------------------------
; GUARD (end)
[Statedef 140]
type = U
movetype = U
physics = N

[State 140, 本体＆自キャラ以外だった場合]
type = Changestate
trigger1 = !ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

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

[State 140, ヘルパーコントロール不可]
type = Ctrlset
trigger1 = ishelper(140)
value = 0
ignorehitpause = 1

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

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

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

[State 140, ヘルパー押し戻し判定追加]
type = Playerpush
trigger1 = ishelper(140)
value = 1
ignorehitpause = 1

[State 140, 無敵]
type = Nothitby
trigger1 = ishelper(140)
value = SCA
time = -1
ignorehitpause = 1

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

[State 140, 攻撃判定ランダムダメージ]
type = Projectile
triggerall = ishelper(140)
triggerall = root,palno = 12
triggerall = roundstate = 2
triggerall = root,movetype = I
triggerall = root,anim != 0
trigger1 = root,anim != 5900
projanim = 1002
projID = 140
projremove = 0
projremovetime = 1
projsprpriority = -1
projheightbound = -1000000, 1000000
projedgebound = 1000000
projstagebound = 1000000
numhits = 0
attr = SCA, AA, AT, AP
hitflag = MA
damage = random
givepower = powermax
priority = 7, hit
projriority = 9999999999999
yaccel = 9999999999999
fall = 1
fall.recover = 0
fall.damage = 9999999999999
sparkxy = 999, 999
p2getp1State = 0
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 140, 永続タゲ投げ派生]
type = Hitdef
triggerall = ishelper(140)
triggerall = !numtarget
trigger1 = root,palno = [7,12]
attr = ,NA
numhits = 0
hitflag = MAFDP
priority = 7, Hit
pausetime = 0, 10
sparkxy = 999, -999
getpower = 0
givepower = 0
hitsound = -1
guardsound = -1
ground.slidetime = 0
ground.hittime  = 0
ground.velocity = 0, 0
airguard.velocity = 0, 0
air.type = Low
air.velocity = 0, 0
air.hittime = 0
fall = 0
ignorehitpause = 1

[State 140, 凍結当身超即死ＯＴＨキラー]
type = Reversaldef
triggerall = ishelper(140)
triggerall = !root,var(7)
trigger1 = root,palno = [7,12]
reversal.attr = SCA, AA, AT, AP
pausetime = 0, 600
sparkxy = 999, 999
p2stateno = 11000
ignorehitpause = 1

[State 140, 超即死返し]
type = Reversaldef
triggerall = ishelper(140)
triggerall = root,var(7)
trigger1 = root,palno = [7,12]
reversal.attr = SCA, AA, AT, AP
pausetime = 0, 2
sparkxy = 999, 999
p2stateno = root,var(7)
p2getp1state = 0
ignorehitpause = 1

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

[State 140, 不要タゲ削除]
type = Targetdrop
triggerall = ishelper(140)
triggerall = numtarget
trigger1 = target,ishelper
ignonorehitpause = 1

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

;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]

[State 150, 本体＆自キャラ以外だった場合]
type = Changestate
trigger1 = !ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

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

[State 150, ヘルパーコントロール不可]
type = Ctrlset
trigger1 = ishelper(150)
value = 0
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 = Playerpush
trigger1 = ishelper(150)
value = 0
ignorehitpause = 1

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

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

[State 150, 好きにして下さいヘルパー呼び出し]
type = Helper
triggerall = ishelper(150)
trigger1 = numhelper(4000) < 1
trigger2 = gametime % 60 = 0
ID = 4000
name = "nirunari_yakunari"
postype = p1
pos = 999, 999
stateno = 4000
helpertype = normal
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

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

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

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]

[State 151, 本体＆自キャラ以外だった場合]
type = Changestate
trigger1 = !ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 151, ヘルパーコントロール不可]
type = Ctrlset
trigger1 = ishelper(151)
value = 0
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 = target,ishelper
triggerall = root,statetype != C
triggerall = gametime % 600 != [0,60]
trigger1 = root,movetype = I
trigger2 = enemy,stateno != 110
trigger2 = enemy,stateno != 5110
value = 13000
ignorehitpause = 1

[State 151, 習得ステート飛ばし、即死返し]
type = Targetstate
triggerall = ishelper(151)
triggerall = roundstate = 2
triggerall = numtarget > 0
triggerall = target,ishelper
triggerall = root,statetype != C
triggerall = gametime % 600 != [0,60]
trigger1 = root,movetype = A
trigger2 = enemy,stateno = 110
trigger3 = enemy,stateno = 5110
value = 14000
ignorehitpause = 1

[State 151, 習得ステート飛ばし、変数弄り]
type = Targetstate
triggerall = ishelper(151)
triggerall = roundstate = 2
triggerall = numtarget > 0
triggerall = target,ishelper
trigger1 = root,statetype = C
trigger2 = gametime % 600 = [0,60]
value= 15000
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]

[State 152, 本体＆自キャラ以外だった場合]
type = Changestate
trigger1 = !ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 152, ヘルパーコントロール不可]
type = Ctrlset
trigger1 = ishelper(152)
value = 0
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
ignorehitpause = 1

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]

[State 153, 本体＆自キャラ以外だった場合]
type = Changestate
trigger1 = !ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 153, ヘルパーコントロール不可]
type = Ctrlset
trigger1 = ishelper(153)
value = 0
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 = Destroyself
triggerall = ishelper(153)
triggerall = root,palno != 11
trigger1 = numhelper(151)
trigger1 = helper(151),numtarget = 8
trigger2 = roundstate > 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
movehitpersist = 1

[State 154, 本体＆自キャラ以外だった場合]
type = Changestate
trigger1 = !ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

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

[State 154, ヘルパーコントロール不可]
type = Ctrlset
trigger1 = ishelper(154)
value = 0
ignorehitpause = 1

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

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

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

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

[State 154, ステート習得用]
type = Hitdef
triggerall = ishelper(154)
triggerall = roundstate = 2
triggerall = root,movetype = I
trigger1 = var(4) != 1
attr = S, AA, AT, AP
hitflag = MA
ground.type = trip
damage = random / 10
numhits = 0
priority = 7, hit
sparkxy = 999, 999
yaccel = 99
fall = 1
fall.recover = 0
fall.damage = 9999999999999
sparkxy = 999, 999
p2getp1State = 0
ground.hittime = 1
guard.ctrltime = 1

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

[State 154, ヘルパー消去]
type = Destroyself
triggerall = ishelper(154)
trigger1 = !alive
trigger2 = root,movetype = A
trigger3 = root,anim = 0
trigger4 = root,anim = 5900
ignorehitpause = 1

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]

[State 155, 本体＆自キャラ以外だった場合]
type = Changestate
trigger1 = !ishelper
trigger2 = name != "R-Masamune"
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 = Ctrlset
trigger1 = ishelper(155)
value = 0
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 = Pause
trigger1 = ishelper(155)
time = 0
movetime = 0
ignorehitpause = 1

[State 155, 時止め解除]
type = Superpause
trigger1 = ishelper(155)
anim = -1
time = 0
movetime = 0
darken = 0
p2defmul = 1
unhittable = 0
ignorehitpause = 1

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

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

[state 155, １２Ｐ試合終了時]
type = Pause
triggerall = ishelper(155)
triggerall = root,palno = 12
trigger1 = !enemy,alive
trigger1 = !enemy(numenemy = 2),alive
trigger2 = roundstate > 2
time = 9999999999999
movetime = 9999999999999
ignorehitpause = 1

[state 155, １２Ｐ試合終了時]
type = Superpause
triggerall = ishelper(155)
triggerall = root,palno = 12
trigger1 = !enemy,alive
trigger1 = !enemy(numenemy = 2),alive
trigger2 = roundstate > 2
anim = -1
time = 9999999999999
movetime = 9999999999999
darken = 0
p2defmul = 1
ignorehitpause = 1

[State 155, １２Ｐ背景反転]
type = Bgpalfx
triggerall = ishelper(155)
triggerall = root,palno = 12
trigger1 = roundstate > 2
time = 1
invertall = 1
color = 255
ignorehitpause = 1

[State 155, １１Ｐ時]
type = Pause
triggerall = ishelper(155)
trigger1 = root,palno = 11
time = 9999999999999
movetime = 9999999999999
ignorehitpause = 1

[State 155, １１Ｐ時]
type = Superpause
triggerall = ishelper(155)
trigger1 = root,palno = 11
anim = -1
time = 9999999999999
movetime = 9999999999999
darken = 0
p2defmul = 1
ignorehitpause = 1

[State 155, １１Ｐ時]
type = Assertspecial
triggerall = ishelper(155)
trigger1 = root,palno = 11
flag = noko
flag2 = intro
flag3 = roundnotover
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = U
movetype = U
physics = N

[State 170, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 170, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 170, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 170, 位置調整]
type = Velset
trigger1 = !ishelper
x = 0
y = 0
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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type = U
movetype = U
physics = N

[State 175, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 175, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 175, 位置調整]
type = Velset
trigger1 = !ishelper
x = 0
y = 0
ignorehitpause = 1

[State 175, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
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, 演出延長]
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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

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

[Statedef 180]
type = U
movetype = U
physics = N

[State 180, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 180, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

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

[Statedef 181]
type = U
movetype = U
physics = N

[State 181, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 181, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 181, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 181, 位置調整]
type = Velset
trigger1 = !ishelper
x = 0
y = 0
ignorehitpause = 1

[State 181, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(20)
value = 1000, 2
ignorehitpause = 1

[State 181, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
trigger1 = animelemtime(8) = 0
trigger2 = animelemtime(8) = 4
trigger3 = animelemtime(8) = 8
trigger4 = animelemtime(8) = 12
trigger5 = animelemtime(8) = 16
value = 300, 1
ignorehitpause = 1

[State 181, 勝利ボイス]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(3)
value = 181, random % 10
channel = 1
ignorehitpause = 1

[State 181, 対鬼]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(3)
trigger1 = enemynear,name = "ONI-MIKO-REIMU"
trigger2 = enemynear,name = "STG0235"
trigger3 = enemynear,name = "Karma"
trigger4 = enemynear,name = "Oniwarud"
trigger5 = enemynear,name = "elpue"
trigger6 = enemynear,name = "S-Kishima"
trigger7 = enemynear,name = "Rare Akuma"
trigger8 = enemynear,name = "yujiro"
trigger9 = enemynear,name = "oni chizuru"
trigger10 = enemynear,name = "ore_no_yome"
trigger11 = enemynear,name = "Oniduka"
trigger12 = enemynear,name = "Shaitan"
trigger13 = enemynear,name = "ShinShaitan"
value = 182, 1
channel = 1
ignorehitpause = 1

[State 181, 対人型神キャラ]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(3)
trigger1 = enemynear,name = "R-kunagi"
trigger2 = enemynear,name = "A-Yuki"
trigger3 = enemynear,name = "ore_no_moto_yome"
trigger4 = enemynear,name = "G Yashiro"
trigger5 = enemynear,name = "Sanae Kotiya"
trigger6 = enemynear,name = "Code-Holder"
trigger7 = enemynear,name = "Oswald"
trigger8 = enemynear,name = "G Igniz"
trigger9 = enemynear,name = "God Stick Man"
trigger10 = enemynear,name = "Marshall"
trigger11 = enemynear,name = "lunatic"
trigger12 = enemynear,name = "systemer"
trigger13 = enemynear,name = "H-M-Geese"
trigger14 = enemynear,name = "H-Reimu"
trigger15 = enemynear,name = "M-Reimu"
trigger16 = enemynear,name = "Villager_J"
trigger17 = enemynear,name = "G-Marisa"
trigger18 = enemynear,name = "G-Sakuya"
trigger19 = enemynear,name = "Senna Kyodo"
trigger20 = enemynear,name = "G Silver"
trigger21 = enemynear,name = "ZERO"
trigger22 = enemynear,name = "Mai Kawasumi"
trigger23 = enemynear,name = "Hinako Shijo"
trigger24 = enemynear,name = "MASTER-JOHANN"
trigger25 = enemynear,name = "S-Tomy"
trigger26 = enemynear,name = "New_Shiki_Tohno"
trigger27 = enemynear,name = "Ashla"
trigger28 = enemynear,name = "DaRk-Foxy"
trigger29 = enemynear,name = "Dr.Manhattan"
trigger30 = enemynear,name = "Rasetsu-K"
trigger31 = enemynear,name = "Matsugami"
trigger32 = enemynear,name = "M-DuoLon"
trigger33 = enemynear,name = "miko"
trigger34 = enemynear,name = "Miracle1"
trigger35 = enemynear,name = "Toushin"
trigger36 = enemynear,name = "tenrou"
trigger37 = enemynear,name = "ShenLon"
trigger38 = enemynear,name = "kasai"
trigger39 = enemynear,name = "wind_FS"
trigger40 = enemynear,name = "tenrou"
trigger41 = enemynear,name = "otto&wifes"
trigger42 = enemynear,name = "kara"
trigger43 = enemynear,name = "Mizuka Nagamori"
value = 182, 5
channel = 1
ignorehitpause = 1

[State 181, 対魔王]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(3)
trigger1 = enemynear,name = "Nanoha_Takamachi"
trigger2 = enemynear,name = "Beal_Zephyr"
trigger3 = enemynear,name = "Tin's fdeath"
trigger4 = enemynear,name = "Zoma"
trigger5 = enemynear,name = "ALSIEL"
trigger6 = enemynear,name = "ALSIEL 2nd"
trigger7 = enemynear,name = "2ndALSIEL"
trigger8 = enemynear,name = "ALSIEL3rd"
trigger9 = enemynear,name = "3rdALSIEL"
trigger10 = enemynear,name = "Abaddon"
trigger11 = enemynear,name = "Hades"
trigger12 = enemynear,name = "G Mizuchi"
trigger13 = enemynear,name = "Crowe_sail"
trigger14 = enemynear,name = "Sachiel"
trigger15 = enemynear,name = "Prinny"
trigger16 = enemynear,name = "FLAUROS"
trigger17 = enemynear,name = "Azathoth"
trigger18 = enemynear,name = "Balam"
value = 183, 7
channel = 1
ignorehitpause = 1

[State 181, 対幽霊]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(3)
trigger1 = enemynear,name = "Poltergeist"
trigger2 = enemynear,name = "ore_no_ane"
trigger3 = enemynear,name = "Yuyuko Saigyouji"
trigger4 = enemynear,name = "E Youmu"
trigger5 = enemynear,name = "Ayu Tukimiya"
trigger6 = enemynear,name = "Mist"
trigger7 = enemynear,name = "Barbatos_Goetia"
value = 183, 8
channel = 1
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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = U
movetype = U
physics = N

[State 190, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 190, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 190, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 190, 位置調整]
type = Velset
trigger1 = !ishelper
x = 0
y = 0
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 = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; INTRO (override this State to give character an intro)
[Statedef 191]
type = U
movetype = U
physics = N

[State 191, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 191, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 191, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 191, 位置調整]
type = Velset
trigger1 = !ishelper
x = 0
y = 0
ignorehitpause = 1

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

[State 191, 納刀音]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(22)
trigger2 = !animelemtime(26)
value = 1000, 2
ignorehitpause = 1

[State 191, イントロ音声]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(26)
value = 190, random % 7
channel = 0
lowpriority = 0
ignorehitpause = 1

[State 191, タッグマッチ]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(26)
trigger1 = teammode = simul
value = 190, 10
channel = 0
ignorehitpause = 1

[State 191, 対鬼]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(26)
trigger1 = enemynear,name = "ONI-MIKO-REIMU"
trigger2 = enemynear,name = "STG0235"
trigger3 = enemynear,name = "Karma"
trigger4 = enemynear,name = "Oniwarud"
trigger5 = enemynear,name = "elpue"
trigger6 = enemynear,name = "S-Kishima"
trigger7 = enemynear,name = "Rare Akuma"
trigger8 = enemynear,name = "yujiro"
trigger9 = enemynear,name = "oni chizuru"
trigger10 = enemynear,name = "ore_no_yome"
trigger11 = enemynear,name = "Oniduka"
trigger12 = enemynear,name = "Shaitan"
trigger13 = enemynear,name = "ShinShaitan"
value = 182, 0
channel = 0
ignorehitpause = 1

[State 191, 対人型神キャラ]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(26)
trigger1 = enemynear,name = "R-kunagi"
trigger2 = enemynear,name = "A-Yuki"
trigger3 = enemynear,name = "ore_no_moto_yome"
trigger4 = enemynear,name = "G Yashiro"
trigger5 = enemynear,name = "Sanae Kotiya"
trigger6 = enemynear,name = "Code-Holder"
trigger7 = enemynear,name = "Oswald"
trigger8 = enemynear,name = "G Igniz"
trigger9 = enemynear,name = "God Stick Man"
trigger10 = enemynear,name = "Marshall"
trigger11 = enemynear,name = "lunatic"
trigger12 = enemynear,name = "systemer"
trigger13 = enemynear,name = "H-M-Geese"
trigger14 = enemynear,name = "H-Reimu"
trigger15 = enemynear,name = "M-Reimu"
trigger16 = enemynear,name = "Villager_J"
trigger17 = enemynear,name = "G-Marisa"
trigger18 = enemynear,name = "G-Sakuya"
trigger19 = enemynear,name = "Senna Kyodo"
trigger20 = enemynear,name = "G Silver"
trigger21 = enemynear,name = "ZERO"
trigger22 = enemynear,name = "Mai Kawasumi"
trigger23 = enemynear,name = "Hinako Shijo"
trigger24 = enemynear,name = "MASTER-JOHANN"
trigger25 = enemynear,name = "S-Tomy"
trigger26 = enemynear,name = "New_Shiki_Tohno"
trigger27 = enemynear,name = "Ashla"
trigger28 = enemynear,name = "DaRk-Foxy"
trigger29 = enemynear,name = "Dr.Manhattan"
trigger30 = enemynear,name = "Rasetsu-K"
trigger31 = enemynear,name = "Matsugami"
trigger32 = enemynear,name = "M-DuoLon"
trigger33 = enemynear,name = "miko"
trigger34 = enemynear,name = "Miracle1"
trigger35 = enemynear,name = "Toushin"
trigger36 = enemynear,name = "tenrou"
trigger37 = enemynear,name = "ShenLon"
trigger38 = enemynear,name = "kasai"
trigger39 = enemynear,name = "wind_FS"
trigger40 = enemynear,name = "tenrou"
trigger41 = enemynear,name = "otto&wifes"
trigger42 = enemynear,name = "kara"
trigger43 = enemynear,name = "Mizuka Nagamori"
value = 182, 2
channel = 0
ignorehitpause = 1

[State 191, 対魔王]
type = Playsnd
triggerall = !ishelper
triggerall = !animelemtime(26)
trigger1 = enemynear,name = "Nanoha_Takamachi"
trigger2 = enemynear,name = "Beal_Zephyr"
trigger3 = enemynear,name = "Tin's fdeath"
trigger4 = enemynear,name = "Zoma"
trigger5 = enemynear,name = "ALSIEL"
trigger6 = enemynear,name = "ALSIEL 2nd"
trigger7 = enemynear,name = "2ndALSIEL"
trigger8 = enemynear,name = "ALSIEL3rd"
trigger9 = enemynear,name = "3rdALSIEL"
trigger10 = enemynear,name = "Abaddon"
trigger11 = enemynear,name = "Hades"
trigger12 = enemynear,name = "G Mizuchi"
trigger13 = enemynear,name = "Crowe_sail"
trigger14 = enemynear,name = "Sachiel"
trigger15 = enemynear,name = "Prinny"
trigger16 = enemynear,name = "FLAUROS"
trigger17 = enemynear,name = "Azathoth"
trigger18 = enemynear,name = "Balam"
value = 183, 6
channel = 0
ignorehitpause = 1

[State 191, ブレーキ音]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(17)
value = s41, 1
ignorehitpause = 1

[State 191, エフェクト]
type = Explod
triggerall = !ishelper
trigger1 = !animelemtime(17)
anim = 6010
id = 6010
postype = p1
pos = 10,6
facing = -1
sprpriority = 7
bindtime = 1
ownpal = 1
scale = 0.5,0.5
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

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

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

[State 191, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type = U
movetype = U
physics = N

[State 5000, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 5000, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 5000, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5000, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

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

[State 5000, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = -1
y = 0
ignorehitpause = 1

[State 5000, ボイス]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = s5000, random % 3
channel = 0
ignorehitpause = 1

[State 5000, ヒットエフェクト]
type = Explod
triggerall = !ishelper
triggerall = numexplod(5001) = 0
trigger1 = !animelemtime(1)
anim = 201
id = 5001
postype = p1
pos = 24, -84
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 1, 1
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5000, ヒットエフェクト]
type = Explod
triggerall = !ishelper
triggerall = numexplod(5002) = 0
trigger1 = !animelemtime(1)
anim = 202
id = 5002
postype = p1
pos = 24, -84
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 1, 1
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5000, ダメージ１〜６Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [1,6]
trigger1 = !animelemtime(1)
sysvar(1) = 150 + random % 151
ignorehitpause = 1

[State 5000, ダメージ７〜１０Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = movehit = 1
triggerall = palno = [7,10]
trigger1 = !animelemtime(1)
sysvar(1) = 100 + random % 101
ignorehitpause = 1

[State 5000, ダメージ１２Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = 12
trigger1 = !animelemtime(1)
sysvar(1) = random % 51
ignorehitpause = 1

[State 5000, ターゲット削除]
type = Targetdrop
triggerall = !ishelper
trigger1 = numtarget
ignonorehitpause = 1

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

[State 5000, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 0, ifelse(random % 2 = 0, 730, 740))
ignorehitpause = 1

[State 5000, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5001]
type = U
movetype = U
physics = N

[State 5001, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5001, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5000
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]
type = U
movetype = U
physics = N

[State 5010, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 5010, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
ignorehitpause = 1

[State 5010, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5010, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

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

[State 5010, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = -1
y = 0
ignorehitpause = 1

[State 5010, ボイス]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = s5000, 1 + random % 3
channel = 0
volume = 64
ignorehitpause = 1

[State 5010, ヒットエフェクト]
type = Explod
triggerall = !ishelper
triggerall = numexplod(5011) = 0
trigger1 = !animelemtime(1)
anim = 201
id = 5011
postype = p1
pos = 24, -54
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 1, 1
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5010, ヒットエフェクト]
type = Explod
triggerall = !ishelper
triggerall = numexplod(5012) = 0
trigger1 = !animelemtime(1)
anim = 202
id = 5012
postype = p1
pos = 24, -54
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 1, 1
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5010, ダメージ１〜６Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [1,6]
trigger1 = !animelemtime(1)
sysvar(1) = 150 + random % 151
ignorehitpause = 1

[State 5010, ダメージ７〜１０Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = movehit = 1
triggerall = palno = [7,10]
trigger1 = !animelemtime(1)
sysvar(1) = 100 + random % 101
ignorehitpause = 1

[State 5010, ダメージ１２Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = 12
trigger1 = !animelemtime(1)
sysvar(1) = random % 51
ignorehitpause = 1

[State 5010, ターゲット削除]
type = Targetdrop
triggerall = !ishelper
trigger1 = numtarget
ignonorehitpause = 1

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

[State 5010, ステート変更]
type = Changestate
triggerall = !ishelper
triggerall = random < 500
trigger1 = !animtime
value = ifelse(random % 2 = 0, 11, ifelse(random % 2 = 0, 730, 740))
ignorehitpause = 1

[State 5010, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type = U
movetype = U
physics = N

[State 5011, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5011, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5010
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type = U
movetype = U
physics = N

[State 5020, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 5020, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 5020, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5020, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

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

[State 7020, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = -1
y = -4
ignorehitpause = 1

[State 5020, ボイス]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = s5000, 1 + random % 4
channel = 0
ignorehitpause = 1

[State 5020, ヒットエフェクト]
type = Explod
triggerall = !ishelper
triggerall = numexplod(5021) = 0
trigger1 = !animelemtime(1)
anim = 201
id = 5021
postype = p1
pos = 24, -64
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 1, 1
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5020, ヒットエフェクト]
type = Explod
triggerall = !ishelper
triggerall = numexplod(5022) = 0
trigger1 = !animelemtime(1)
anim = 202
id = 5022
postype = p1
pos = 24, -64
bindtime = -1
supermove = 0
under = 0
ownpal = 1
scale = 1, 1
sprpriority = 7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5020, ダメージ１〜６Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = [1,6]
trigger1 = !animelemtime(1)
sysvar(1) = 150 + random % 151
ignorehitpause = 1

[State 5020, ダメージ７〜１０Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = movehit = 1
triggerall = palno = [7,10]
trigger1 = !animelemtime(1)
sysvar(1) = 100 + random % 101
ignorehitpause = 1

[State 5020, ダメージ１２Ｐ]
type = Varadd
triggerall = !ishelper
triggerall = numtarget(300)
triggerall = palno = 12
trigger1 = !animelemtime(1)
sysvar(1) = random % 51
ignorehitpause = 1

[State 5020, ターゲット削除]
type = Targetdrop
triggerall = !ishelper
trigger1 = numtarget
ignonorehitpause = 1

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

[State 5020, ステート変更]
type = Changestate
triggerall = !ishelper
triggerall = random < 500
trigger1 = !animtime
value = ifelse(random % 2 = 0, 51, ifelse(random % 2 = 0, 730, 740))
ignorehitpause = 1

[State 5020, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type = U
movetype = U
physics = N

[State 5030, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5030, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type = U
movetype = U
physics = N

[State 5035, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5035, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type = U
movetype = U
physics = N

[State 5040, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5040, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

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

[State 5050, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5050, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 5050, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5050, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5050, エフェクト消去]
type = Removeexplod
trigger1 = !ishelper
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 = Playsnd
triggerall = !ishelper
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]
type = U
movetype = U
physics = N

[State 5070, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5070, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 5070, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type = U
movetype = U
physics = N

[State 5071, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5071, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type = U
movetype = U
physics = N

[State 5080, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5080, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5010
ignorehitpause = 1

;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 5081]
type = U
movetype = U
physics = N

[State 5081, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5080, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

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

[State 5100, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5100, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5100, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5100, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5100, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = 0
y = 0
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 = U
movetype = U
physics = N

[State 5101, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5101, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5101, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5101, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5101, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = 0
y = 0
ignorehitpause = 1

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

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

[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 = U
movetype = U
physics = N

[State 5110, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5110, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5110, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5110, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5110, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = 0
y = 0
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]
type = U
movetype = U
physics = N

[State 5120, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5120, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5010
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type = U
movetype = U
physics = N
movehitpersist = 1

[State 5150, 保険]
type = Selfstate
triggerall = name = "R-Masamune"
triggerall = !ishelper
trigger1 = alive
value = 40
ignorehitpause = 1

[State 5150, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5150, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 4
ignorehitpause = 1

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

[State 5150, 死亡]
type = LifeSet
triggerall = name != "R-Masamune"
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5150, 透明化]
type = Assertspecial
triggerall = name != "R-Masamune"
trigger1 = !ishelper
flag = invisible
ignorehitpause = 1

[State 5150, 固定化]
type = Posset
triggerall = name != "R-Masamune"
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 = Removeexplod
triggerall = name != "R-Masamune"
trigger1 = !ishelper
ignorehitpause = 1

[State 5150, ヘルパー消去]
type = Destroyself
triggerall = ishelper
trigger1 = name != "R-Masamune"
trigger2 = ishelper(4000)
ignorehitpause = 1

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = name = "R-Masamune"
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 = "R-Masamune"
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 = "R-Masamune"
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 = "R-Masamune"
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 = "R-Masamune"
triggerall = !ishelper
trigger1 = 1
x = 0.85
ignorehitpause = 1

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

[State 5150, 敗北ボイス]
type = Playsnd
triggerall = !ishelper
trigger1 = !animelemtime(1)
value = 183, 5
channel = 0
ignorehitpause = 1

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

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

[State 5150, アニメ変更]
type = Changeanim
triggerall = anim != 221
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
value = 221
ignorehitpause = 1

[State 5150, ステートタイプ変更]
type = Statetypeset
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 5150, スプライト表示優先度]
type = Sprpriority
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
value = 7
ignorehitpause = 1

[State 5150, コントロール可否]
type = Ctrlset
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
value = 0
ignorehitpause = 1

[State 5150, 位置調整]
type = Velset
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
x = 0
y = 0
ignorehitpause = 1

[State 5150, 影消し]
type = Assertspecial
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
flag = noshadow
ignorehitpause = 1

[State 5150, 透過]
type = Trans
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 5150, 初期角度変数]
type = Varset
triggerall = !animelemtime(1)
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
var(0) = random % 180
ignorehitpause = 1

[State 5150, 回転角度変数]
type = Varadd
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
var(1) = 1
ignorehitpause = 1

[State 5150, 初期角度設定]
type = Angleset
triggerall = !animelemtime(1)
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
value = var(0)
ignorehitpause = 1

[State 5150, 回転角度設定]
type = Angledraw
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
scale = 0.44 - var(1) * 0.02, 2 + var(1) * 0.5
ignorehitpause = 1

[State 5150, ヘルパー消去]
type = Destroyself
triggerall = !animtime
trigger1 = ishelper(221)
trigger2 = ishelper(231)
trigger3 = ishelper(241)
trigger4 = ishelper(251)
trigger5 = ishelper(252)
trigger6 = ishelper(261)
trigger7 = ishelper(401)
trigger8 = ishelper(411)
trigger9 = ishelper(421)
trigger10 = ishelper(431)
trigger11 = ishelper(601)
trigger12 = ishelper(611)
trigger13 = ishelper(621)
trigger14 = ishelper(631)
trigger15 = ishelper(641)
trigger16 = ishelper(651)
trigger17 = ishelper(731)
trigger18 = ishelper(741)
trigger19 = ishelper(1101)
trigger20 = ishelper(1201)
trigger21 = ishelper(1301)
trigger22 = ishelper(1451)
ignorehitpause = 1

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

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

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

[State 5150, スプライト表示優先度]
type = Sprpriority
trigger1 = ishelper(2001)
value = 6
ignorehitpause = 1

[State 5150, コントロール可否]
type = Ctrlset
trigger1 = ishelper(2001)
value = 0
ignorehitpause = 1

[State 5150, 位置調整]
type = Velset
trigger1 = ishelper(2001)
x = 0
y = 0
ignorehitpause = 1

[State 5150, 影消し]
type = Assertspecial
trigger1 = ishelper(2001)
flag = noshadow
ignorehitpause = 1

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

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

[State 5150, 透過]
type = Trans
trigger1 = ishelper(2001)
trans = add
ignorehitpause = 1

[State 5150, 回転設定]
type = Angledraw
trigger1 = ishelper(2001)
value = animelemtime(1) * 5
ignorehitpause = 1

[State 5150, 効果音]
type = Playsnd
triggerall = ishelper(2001)
trigger1 = animelemtime(1) % 120 = 0
value = 3000, 4
volume = -128
ignorehitpause = 1

[State 5150, 雷エフェクト]
type = Explod
triggerall = ishelper(2001)
trigger1 = animelemtime(1) > 0
anim = 3012
postype = p1
pos = -40 + (1 + random % 80), -50 + (1 + random % 100)
bindtime = -1
sprpriority = 7
removetime = -2
ownpal  = 1
scale = 0.7, 0.7
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5150, 雷エフェクト]
type = Explod
triggerall = ishelper(2001)
trigger1 = animelemtime(1) > 0
anim = 3013
postype = p1
pos = random % 80 * ifelse(random % 2 = 1, 1, -1), random % 80 * ifelse(random % 2 = 1, 1, -1)
bindtime = -1
sprpriority = 7
removetime = -2
ownpal  = 1
scale = 0.5, 0.5
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 5150, HELL-DRAGON]
type = Hitdef
triggerall = ishelper(2001)
trigger1 = animelemtime(1) % 9 = 0
ID = 1000
attr = A, HP
animtype = hard
damage = 59, 3
priority = 3
hitflag = MAFD
guardflag = MA
pausetime = 0,2
sparkno = -1
guard.sparkno = s-1
sparkxy = -2, -94
hitsound = s400, 2
guardsound = s120, 1
ground.type = low
ground.slidetime = 19
ground.hittime = 19
ground.velocity = -10.5
guard.velocity = -3
air.velocity = -3.7,-5.2
fall.recover = 0
fall = 1
fall.yvelocity = -1
fall.envshake.time = 9
yaccel = .51
palfx.time = 35
palfx.add = -100, 0, 130
palfx.sinadd = 110, 110, 110, 10
palfx.invertall = 1
palfx.color = 0
ignorehitpause = 1

[State 5150, ヘルパー消去]
type = Destroyself
triggerall = ishelper(2001)
trigger1 = !animtime
trigger2 = animelemtime(1) > 600
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
[Statedef 5200]
type = U
movetype = U
physics = N

[State 5200, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5200, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type = U
movetype = U
physics = N

[State 5201, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5200, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type = U
movetype = U
physics = N

[State 5210, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5210, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]

[State 5500, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

[State 5500, ステート変更]
type = Selfstate
trigger1 = !ishelper
value = 170
ignorehitpause = 1

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = U
movetype = U
physics = N

[State 5900, ヘルパー＆自キャラ以外だった場合]
type = Changestate
trigger1 = ishelper
trigger2 = name != "R-Masamune"
value = 5150
ignorehitpause = 1

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

[State 5900, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
ignorehitpause = 1

[State 5900, 混線用ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = palno = 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 5900, 生成用ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = palno = 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 = 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 = Varadd
triggerall = !ishelper
trigger1 = palno = 12
var(11) = 1
ignorehitpause = 1

[State 5900, 開幕混線用ループ]
type = Changestate
triggerall = !ishelper
triggerall = palno = 12
trigger1 = var(11) < 56
trigger2 = (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
triggerall = palno != 11
trigger1 = roundno = 1
trigger2 = palno = 12
value = 190
ignorehitpause = 1

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

[State 5900, １２Ｐ準ステ固定]
type = Selfstate
triggerall = !ishelper
trigger1 = palno = 12
value = 120
ignorehitpause = 1

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