;===========================================
;	パチュブラLv1現る
;===========================================
[Statedef 3000]
type    = S
movetype= I
physics = S
ctrl = 1
velset = 0,0
sprpriority = 0

[State 3000]
type = Helper
trigger1 = var(11) != 1
trigger1 = time = 0
trigger1 = numhelper(3000) = 0
trigger1 = numhelper(3001) = 0
trigger1 = numhelper(3002) = 0
trigger2 = var(11) = 1
trigger2 = time = 0
trigger2 = numhelper(3000) = 0
ID = 3000
name = "lv1"
postype = back
pos = -40,-35
sprpriority = 2
stateno = 3001
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000]
type = ChangeState
trigger1 = Time = 0
value = 0
ctrl = 1


;===========================================
;	パチュカブラLv1攻撃
;===========================================
[Statedef 3001]
type    = A
movetype= A
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3000
sprpriority = 0

[State 3001]
type = VelSet
trigger1 = Time = 0
x = 5
y = -5

[State 3001]
type = VelAdd
trigger1 = Time > 7
y = .38

[State 3001]
type = Velset
trigger1 = AnimElem = 6
x = -1
y = -2

[State 3001]
type = PlaySnd
trigger1 = AnimElem = 5
value = s0,2

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
attr = SCA, AA, AP, AT
stateno = 3004

[State 3001]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA
guardflag = HA
animtype  = Light
damage    = ifelse(Root, Var(28)=1, 30, 10), ifelse(Root, Var(28)=1, 10, 0)
pausetime = 13,13
sparkxy = 10,-50
hitsound   = s0,5
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5,0
air.velocity = -5,-3

[State 3001]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3002


;===========================================
;	パチュカブラLv1着地
;===========================================
[Statedef 3002]
type = S
physics = S
anim = 3001
velset = 0,0
sprpriority = 0

[State 3002]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3002]
type = ChangeState
trigger1 = AnimTime = 0
value = 3003


;===========================================
;	パチュカブラLv1帰宅
;===========================================
[Statedef 3003]
type = S
physics = N
anim = 3002
velset = 0,0
sprpriority = 0

[State 3003]
type = velset
trigger1 = Time = 9
x = -15
y = -5

[State 3003, 3]
type = destroyself
trigger1 = backedgedist <= -200


;===========================================
;	パチュカブラLv2
;===========================================
[Statedef 3010];lv2
type    = S
movetype= I
physics = S
ctrl = 1
velset = 0,0
poweradd = ifelse(Var(28)=1 ,-1000,-1500)
sprpriority = 0

[State 3010];
type = Helper
trigger1 = var(11) != 1
trigger1 = time = 0
trigger1 = numhelper(3000) = 0
trigger1 = numhelper(3001) = 0
trigger1 = numhelper(3002) = 0
trigger2 = var(11) = 1
trigger2 = time = 0
trigger2 = numhelper(3001) = 0
ID = 3001
name = "lv2"
postype = back
pos = -40,-80
sprpriority = 2
stateno = 3011
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3000, 4]
type = ChangeState
trigger1 = Time = 0
value = 0
ctrl = 1


;===========================================
;	パチュカブラLv2登場
;===========================================
[Statedef 3011]
type = A
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3010
sprpriority = 3

[State 3011]
type = velset
trigger1 = Time = 0
x = 10
y = 12

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
attr = SCA, AA, AP, AT
stateno = 3004

[State 3011]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3012


;===========================================
;	パチュカブラLv2着地
;===========================================
[Statedef 3012]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3011
sprpriority = 3

[State 3002]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
attr = SCA, AA, AP, AT
stateno = 3005

[State 3011]
type = ChangeState
trigger1 = Time = 30
value = 3013


;===========================================
;	パチュカブラLv2変身
;===========================================
[Statedef 3013]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3012
sprpriority = 3

[State 3013]
type = PlaySnd
trigger1 = Time = 20
value = s1,0

[State 3013]
type = Explod
trigger1 = Time = 20
anim = 6000
sprpriority = 5
postype = p1
pos = 0,5
bindtime = 1
supermove = 0
ignorehitpause = 1
under = 0

[State 3013]
type = Explod
trigger1 = Time = 25
anim = 6001
sprpriority = 6
postype = p1
pos = -2,03
bindtime = 1
supermove = 0
ignorehitpause =1
under = 0

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
trigger1 = Time >= 0
trigger2 = Root, Var(28) = 1
trigger2 = Time >= 20
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
trigger1 = Time >= 0
trigger1 = Time < 20
attr = SCA, AA, AP, AT
stateno = 3005

[State 3013]
type = ChangeState
trigger1 = Time = 80
value = 3014


;===========================================
;	パチュカブラLv2大地に立つ
;===========================================
[Statedef 3014]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3013
sprpriority = 3

[State 3014]
type = ChangeState
trigger1 = Time = 80
value = 3015


;===========================================
;	パチュカブラLv2暗転
;===========================================
[Statedef 3015]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3014
sprpriority = 3

[State 3015]
type = SuperPause
trigger1 = Time = 1
anim = -1       
pos = 0,0 
sound = s1,1
time = 70
movetime = 70  
darken = 1

[State 3015]
type = ChangeState
trigger1 = Time = 70
value = 3016


;===========================================
;	パチュカブラLv2タックル
;===========================================
[Statedef 3016]
type    = S
movetype= A
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3015
sprpriority = 3

[State 3016]
type = velset
trigger1 = Time = 15
x = 15

[State 3016]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = DiagUp
damage    = 100,0
pausetime = 13,13
sparkno = 3
sparkxy = 10,-50
hitsound   = s0,7
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 0,-20
air.velocity = 0,-20
fall = 1
fall.recover = 0

[State -3, AI]
Type = ParentVarSet
Trigger1 = MoveHit
Trigger1 = Parent,Var(55) = 0
V = 55
Value = 1

[State -3, AI]
type = MoveHitReset
Trigger1 = MoveHit

[State 3016]
type = destroyself
trigger1 =  backedgedist >= 300


;===========================================
;	パチュカブラLv3
;===========================================
[Statedef 3020];lv3
type    = S
movetype= I
physics = S
ctrl = 1
velset = 0,0
poweradd = -ceil(Power)
sprpriority = 0

[State 3020];
type = Helper
trigger1 = var(11) != 1
trigger1 = time = 0
trigger1 = numhelper(3000) = 0
trigger1 = numhelper(3001) = 0
trigger1 = numhelper(3002) = 0
trigger2 = var(11) = 1
trigger2 = time = 0
trigger2 = numhelper(3002) = 0
ID = 3002
name = "lv3"
postype = back
pos = 160,-240
sprpriority = 2
stateno = 3021
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3020, 4]
type = ChangeState
trigger1 = time = 0
value = 0
ctrl = 1


;===========================================
;	パチュカブラLv3登場
;===========================================
[Statedef 3021]
type = A
physics = N
ctrl = 0
velset = 0,0
anim = 3020
sprpriority = 0

[State 3021]
type = veladd
trigger1 = time = 0
y = 1.95

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
attr = SCA, AA, AP, AT
stateno = 3004

[State 3021]
type = ChangeState
trigger1 = vel Y > 0
trigger1 = pos Y >= 0
value = 3022


;===========================================
;	パチュカブラLv3着地
;===========================================
[Statedef 3022]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3021
sprpriority = 0

[State 3022]
type = PosSet
trigger1 = time = 0
y = 6

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
attr = SCA, AA, AP, AT
stateno = 3005

[State 3022]
type = ChangeState
trigger1 = time = 30
value = 3023


;===========================================
;	パチュカブラLv3変身
;===========================================
[Statedef 3023]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3022
sprpriority = 0

[State 3023]
type = PlaySnd
trigger1 = Time = 20
value = s1,0

[State 3023]
type = Explod
trigger1 = Time = 20
anim = 6000
sprpriority = 6
postype = p1
pos = 0,5
bindtime = 1
supermove = 0
ignorehitpause = 1

[State 3023]
type = Explod
trigger1 = Time = 25
anim = 6001
sprpriority = 5
postype = p1
pos = -2,03
bindtime = 1
supermove = 0
ignorehitpause =1

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
trigger1 = Time >= 0
trigger2 = Root, Var(28) = 1
trigger2 = Time >= 20
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
trigger1 = Time >= 0
trigger1 = Time < 20
attr = SCA, AA, AP, AT
time = 5
stateno = 3005

[State 3023]
type = ChangeState
trigger1 = Time = 50
value = 3024


;===========================================
;	パチュカブラLv3大地に立つ
;===========================================
[Statedef 3024]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3023
sprpriority = 0

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
trigger1 = Time >= 0
attr = SCA, AA, AP, AT
stateno = 3006

[State 3024]
type = ChangeState
trigger1 = time = 100
value = 3025


;===========================================
;	パチュカブラLv3宣言
;===========================================
[Statedef 3025]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3024
sprpriority = 0

[State 3025]
type = PlaySnd
trigger1 = Time = 38
value = s1,1

[State 3027];背景暗転
type = Helper
triggerall = Numhelper(3033) = 0
trigger1 = Time = 38
ID = 3033
name = "anten"
postype = P1
pos = 0,0
sprpriority = 0
stateno = 3033
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
trigger1 = Time >= 0
attr = SCA, AA, AP, AT
stateno = 3006

[State 3025]
type = ChangeState
trigger1 = Time = 100
value = 3026


;===========================================
;	パチュカブラLv3宣言終了
;===========================================
[Statedef 3026]
type    = S
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3025
sprpriority = 0

[State 3024]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 210]
type = HitOverride
trigger1 = Root, Var(28) = 1
trigger1 = Time >= 0
attr = SCA, AA, AP, AT
stateno = 3006

[State 3026]
type = ChangeState
trigger1 = AnimTime = 0
value = 3027


;===========================================
;	パチュカブラLv3発動
;===========================================
[Statedef 3027]
type    = S
movetype= A
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3026
sprpriority = 0

[State 3027];火球
type = Helper
triggerall = Numhelper(3029) = 0
trigger1 = AnimElem = 6 = 20
ID = 3029
name = "ka9"
postype = p1
pos = 25,-170
stateno = 3029
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 3027];火輪
type = Helper
triggerall = Numhelper(3030) = 0
trigger1 = AnimElem = 6 = 20
ID = 3030
name = "karin"
pos = 25,-170
postype = p1
stateno = 3030
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 3027];背景黒
type = Helper
triggerall = Numhelper(3031) = 0
trigger1 = AnimElem = 6,= 60
ID = 3031
name = "Black"
pos = 0,0
postype = p1
stateno = 3031
helpertype = normal
keyctrl = 0
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 3027];ＢＧＭ停止
type = Helper
triggerall = Numhelper(3032) = 0
trigger1 = AnimElem = 6,= 50
ID = 3032
name = "otokesi"
pos = 0,0
postype = p1
stateno = 3032
helpertype = normal
keyctrl = 0
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 3027];ｶｰﾅﾗｰｽﾞｰ
type = Helper
triggerall = Numhelper(3034) = 0
trigger1 = AnimElem = 6,= 60
ID = 3034
name = "karuma"
pos = 0,0
postype = p1
stateno = 3034
helpertype = normal
keyctrl = 0
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 3027];ロイヤル発動部分
type = SuperPause
trigger1 = AnimElem = 2
anim = -1
movetime = 40
darken = 0
time = 40

[State 3027];ユニバ発動部分
type = SuperPause
trigger1 = AnimElem = 6,= 60
movetime = 0
anim = -1
time = 30

[State 3027];ロイヤル発動音
type = PlaySnd
trigger1 = AnimElem = 6
value = s1,1

[State 3027];ユニバ発動音
type = PlaySnd
trigger1 = AnimElem = 6,= 60
value = s0,17

[State 3027];ﾄﾞｩｲﾝﾑﾄﾞｩｲﾝﾑﾄﾞｩｲﾝﾑ
type = PlaySnd
trigger1 = AnimElem = 6,= 70
trigger2 = AnimElem = 6,= 130
value = s0,19

[State 3027];Hit音
type = PlaySnd
trigger1 = movehit
trigger1 = AnimElem = 6,>= 70
trigger1 = AnimElem = 6,<= 250
trigger1 = Time%5 = 0
value = s0,18

[State 3027];ｼｭﾎﾟﾜｰｧ
type = PlaySnd
trigger1 = AnimElem = 6,= 180
value = s0,20

[State 3027];ロイヤル発動エフェクト
type = Explod
trigger1 = AnimElem = 6,= 5
anim = 6024
pos = 25,-170
sprpriority = 8
ownpal = 1
bindtime = 1
supermove = 1

[State 3027];ユニバ発動エフェクト
type = Explod
trigger1 = AnimElem = 6,= 60
anim = 6050
pos = 23,-130
sprpriority = 8
ownpal = 1
bindtime = 1
supermove = 1

[State 3027];ユニバ発動中エフェクト
type = Explod
trigger1 = AnimElem = 6,>= 70
persistent = 0
anim = 6060
postype = front
pos = ifelse(facing=-1,0,-320),0
sprpriority = 0
bindtime = -1

[State 3027]
type = NotHitBy
trigger1 = Root, Var(28) != 1
value = SCA

[State 3027]
type = HitOverride
trigger1 = Root, Var(28) = 1
trigger1 = Time >= 0
trigger1 = Time <= 70
attr = SCA, AA, AP, AT
stateno = 3006

[State 3027];ロイヤルフレア部分
type = Projectile
trigger1 = AnimElem = 6,>= 50
trigger1 = AnimElem = 6,< 205
attr             = S,HA
damage           = 5,1
getpower         = 0
animtype         = Back
pausetime        = 0,5
offset           = 0,0
projID           = 3027
projanim         = 10000
projremanim      = 10000
projscale        = 1,1 
projhits         = 1
projmisstime     = 1
projpriority     = 9
projremovetime   = 1
projsprpriority  = 5
guardflag        = MA
priority         = 3
sparkno          = -1
guard.sparkno    = -1
ground.type      = High

[State 3027];ユニバ部分
type = HitDef
trigger1 = AnimElem = 6,>= 70
trigger1 = AnimElem = 6,<= 250
trigger1 = Time%10 = 0
attr = S,HA
guardflag = MA
animtype = Hard
getpower = 0
damage = 10,10
pausetime = 0,7
sparkno = -1
guard.sparkno = -1
ground.type = High
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,-5
guard.velocity = -10
ground.cornerpush.veloff = 0
air.velocity = -3,-5
fall = 1
fall.recover = 0

[State 3027, ステート変更]
type = ChangeState
trigger1 = Animtime = 0
value = 3028
ctrl = 1


;===========================================
;	パチュカブラLv3帰る
;===========================================
[Statedef 3028]
type    = S
movetype= A
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3027
sprpriority = 0

[State 3028]
type = destroyself
trigger1 = Animtime = 0


;===========================================
;	ロイヤルフレア火球
;===========================================
[Statedef 3029]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 6022
sprpriority = 9

[State 3029]
Type = Varadd
Trigger1 = time >= 20
fvar(20) = .4

[State 3029]
type = Assertspecial
trigger1 = 1
flag = NoShadow

[State 3029]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3029]
Type = AngleDraw
Trigger1 = 1
Scale = .1 + fvar(20),.1 + fvar(20)

[State 3029]
Type = destroyself
Trigger1 = time = 270


;===========================================
;	ロイヤルフレア火輪
;===========================================
[Statedef 3030]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 6023
sprpriority = 9

[State 3030]
Type = Varadd
Trigger1 = time >= 10
fvar(21) = .3

[State 3030]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3030]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3030]
Type = AngleDraw
Trigger1 = 1
Scale = .05 + fvar(21),.05 + fvar(21)

[State 3029]
Type = destroyself
Trigger1 = time = 250


;===========================================
;	背景消し
;===========================================
[Statedef 3031]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 9999
sprpriority = 0

[State 3031]
type = AssertSpecial
trigger1 = 1
flag = NoFG
flag2 = NOBG
pausemovetime = 99999
supermovetime = 99999

[State 3029]
Type = destroyself
Trigger1 = time = 260


;===========================================
;	ＢＧＭ停止
;===========================================
[Statedef 3032]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 9999
sprpriority = 0

[state 3031]
type = AssertSpecial
trigger1 = 1
flag = nomusic
pausemovetime = 99999
supermovetime = 99999


;===========================================
;	宣言暗転
;===========================================
[Statedef 3033]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 9999
sprpriority = 0

[State 3033]
type = Varadd
trigger1 = time >= 0
trigger1 = time <= 30
var(22) = 3

[State 3033]
type = BGPalFX
trigger1 = 1
time = 1
add = 0 - var(22),0 - var(22),0 - var(22)

[State 3030]
type = destroyself
trigger1 = Time = 200


;===========================================
;	カルマ
;===========================================
[Statedef 3034]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 9999
sprpriority = 0

[State 3034];ｶｰﾅｰﾗｰｽﾞｰ
type = PlaySnd
trigger1 = Time = 0
value = s1341,0
loop = 1

;===========================================
;	パチュブラ空中喰らい（全レベル共通）
;===========================================
[Statedef 3004]
type    = A
movetype= I
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3003
sprpriority = -2

[State 3004]
type = VelAdd
trigger1 = Time = 0
y = 5

[State 3004]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3002



;===========================================
;	パチュブラ地上喰らい
;===========================================
[Statedef 3005]
type    = S
movetype= I
physics = N
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3005
sprpriority = -2

[State 3001]
type = ChangeState
trigger1 = AnimTime = 0
value = 3003



;===========================================
;	パチュブラLv3喰らい
;===========================================
[Statedef 3006]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 3028
sprpriority = -2

[State 3003]
type = velset
trigger1 = 1
x = -5
y = -5

[State 3016]
type = destroyself
trigger1 =  backedgedist < -100


;--------------------------------------------------
;	[ヘルパー]グレイズ処理　ヒット待ち
;--------------------------------------------------
[StateDef 3035]
Type = A
MoveType = I
Physics = N
Anim = 9998

;--------------------消滅
[State 3035, DestroySelf]
Type = DestroySelf
Trigger1 = Root,StateNo != 215

;--------------------毎フレーム処理
[State 3035, ReversalDef]
Type = ReversalDef
Trigger1 = 1
Reversal.Attr = SCA, AP
PauseTime = 0, 0
SparkNo = -1
NumHits = 0
P1StateNo = 3036
IgnoreHitPause = 1

[State 3035, NotHitby]
Type = NotHitBy
Trigger1 = 1
Value = SCA

[State 3035, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 1
Facing = 1
Pos = 0,0
IgnoreHitPause = 1

;--------------------------------------------------
;	[ヘルパー]グレイズ処理　ヒット後
;--------------------------------------------------
[StateDef 3036]
Type = A
MoveType = I
Physics = N
Anim = 9998

;--------------------消滅
[State 3036, DestroySelf]
Type = DestroySelf
Trigger1 = Root,StateNo != 215

;--------------------戻る
[State 3036, ChangeState]
Type = ChangeState
Trigger1 = Time > 2
Value = 3035

;--------------------グレイズ効果
[State 3036, Explod]
Type = Explod
Trigger1 = Time = 0
Persistent = 0
Anim = 7000
Pos = 10,-45
PosType = P1
PauseMoveTime = 999999
SuperMoveTime = 999999
Scale = 0.5, 0.5
SprPriority = 20
OnTop = 1
OwnPal = 1
IgnoreHitPause = 1

[State 3036, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = 0, 24
Channel = 9
IgnoreHitPause = 1

;--------------------毎フレーム処理
[State 3036, NotHitby]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 1
IgnoreHitPause = 1

[State 3036, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = -1
Facing = 1
Pos = 0, 0
IgnoreHitPause = 1


;===========================================
;	ジャンプ強攻撃衝撃波
;===========================================
[Statedef 3037]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 6025
sprpriority = 9

[State 3030]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3033]
type = Varadd
trigger1 = time >= 0
fvar(23) = 0.25

[State 3030]
Type = AngleDraw
Trigger1 = 1
Scale = .05 + fvar(23),2.5 - fvar(23)

[State 3030]
type = destroyself
trigger1 = Time = 10


;===========================================
;	咆哮衝撃波
;===========================================
[Statedef 3038]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 6070
sprpriority = 9

[State 3030]
Type = Varadd
Trigger1 = time >= 0
fvar(21) = .3

[State 3030]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3030]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3030]
Type = AngleDraw
Trigger1 = 1
Scale = .1 + fvar(21),.1 + fvar(21)

[State 3029]
Type = destroyself
Trigger1 = time = 10

;===========================================
;	瞬食後ため息
;===========================================
[Statedef 3039]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 8052
sprpriority = 5

[State 3008]
type = velset
trigger1 = time >= 0
trigger1 = time = 3
x = 3
y = -2

[State 3008]
type = velmul
trigger1 = time > 3
x = 0.75
y = 0.75

[State 3008]
type = null;velset
trigger1 = time >= 3
trigger1 = time = 4
x = 1
y = -1

[State 3008]
type = velset
trigger1 = time > 40;5
x = 0
y = 0

[State 3105, AssertSpecial]
type = AssertSpecial
trigger1 = Time = 0
flag =  NoShadow

[State 2401, フェードアウト]
type = Trans
trigger1 = Time > 40
trigger1 = Time <= 60
trans = addalpha
alpha = 256-floor((Time-40)*256.0/20.0), floor((Time-40)*256.0/20.0)

[State 3105, AssertSpecial]
type = AssertSpecial
trigger1 = Time >= 60
flag = invisible

[State 3030]
type = destroyself
trigger1 = !(Root,stateno = 2004)
trigger1 = !(Root,stateno = 2006)

;===========================================
;	瞬食背景暗転用
;===========================================
[Statedef 3040]
Type = A
MoveType = I
Physics = N
Ctrl = 0
Anim = 9999
SprPriority = -5

[State 3040]
Type = AssertSpecial
Trigger1 = 1
flag = Invisible
flag2 = Noshadow
ignorehitpause=1
[State 3040]
Type = NotHitBy
Value = SCA
Trigger1 = 1
IgnoreHitPause = 1
[State 3040]
type = BindToRoot
trigger1 = 1
time = 1
facing = 1
pos = 0, 0

[State 2003]
Type     = BGPalFx
Trigger1 = Root,Time > 15
Trigger1 = Root,Time < 31
Time     = 1
Add      = 0,0,0
Mul      = 256-16*(Root,Time-15),256-16*(Root,Time-15),256-16*(Root,Time-15)

[State 2003]
type = AssertSpecial
trigger1 = Root,time >= 15
trigger1 = Root,Time < 400
flag = TimerFreeze
flag2= NoBarDisplay
IgnoreHitPause = 1

[State 2003]
type = AssertSpecial
trigger1 = Root,Time >= 31
trigger1 = Root,Time < 400
flag = NoBG
flag2 = NoFG

[State 3030]
type = destroyself
trigger1 = !(Root,stateno = 2003)
;===========================================
;	腹具合文字
;===========================================
[StateDef 4000]
Type = A
MoveType = I
Physics = N
Anim = 9999

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) > 19
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
trigger4 = Root,Var(6) != 0
ID = 8000

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 20
trigger2 = Root,Var(1) > 49
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8001

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 50
trigger2 = Root,Var(1) > 79
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8002

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 80
trigger2 = Root,Var(1) > 99
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8003

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 100
trigger2 = Root,var(1) > 149
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8004

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) != 150
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
trigger4 = Root,Var(6) !=0
ID = 8010


[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) > 19
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
trigger4 = Root,Var(6) !=0
ID = 8005

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 20
trigger2 = Root,Var(1) > 49
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8006

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 50
trigger2 = Root,Var(1) > 79
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8007

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 80
trigger2 = Root,Var(1) > 99
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8008

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) < 100
trigger2 = Root,var(1) > 149
Trigger3 = !Root,Alive
trigger4 = Root,Stateno = 2003
trigger5 = Root,Var(6) !=0
ID = 8009

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) != 150
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
trigger4 = Root,Var(6) !=0
ID = 8010

[State 8000]
Type = removeexplod
trigger1 = Root,Var(1) != 150
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
trigger4 = Root,Var(6) !=0
ID = 8011

[State 8000]
Type = removeexplod
trigger1 = Root,Var(2) = 0
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
trigger4 = Root,Var(6) !=0
ID = 8012

[State 8000]
Type = removeexplod
trigger1 = Root,Var(2) = 0
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
trigger4 = Root,Var(6) !=0
ID = 8013

[State 8000]
Type = removeexplod
trigger1 = Root,Var(6) = 0
Trigger2 = !Root,Alive
trigger3 = Root,Stateno = 2003
ID = 8014


[State 8000,1P側腹具合文字];満腹
Type = Explod
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = TeamSide = 1
Trigger1 = NumExplod(8000) = 0
Trigger1 = Root,Var(1) < 20
trigger1 = Root,Var(6) <= 0
trigger1 = !(Root,StateNo = 2003)
Anim = 8000
ID = 8000
Pos = 65, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];八分目
Type = Explod
Trigger1 = Root,Var(1) >= 20
Trigger1 = Root,Var(1) <= 49
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8001) = 0
Trigger1 = TeamSide = 1
trigger1 = !(Root,StateNo = 2003)
Anim = 8001
ID = 8001
Pos = 75, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];五分目
Type = Explod
Trigger1 = Root,Var(1) >= 50
Trigger1 = Root,Var(1) <= 79
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8002) = 0
Trigger1 = TeamSide = 1
trigger1 = !(Root,StateNo = 2003)
Anim = 8002
ID = 8002
Pos = 75, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];二分目
Type = Explod
Trigger1 = Root,Var(1) >= 80
Trigger1 = Root,Var(1) <= 99
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8003) = 0
Trigger1 = TeamSide = 1
trigger1 = !(Root,StateNo = 2003)
Anim = 8003
ID = 8003
Pos = 75, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];空腹
Type = Explod
Trigger1 = Root,Var(1) >= 100
Trigger1 = Root,Var(1) <= 149
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8004) = 0
Trigger1 = TeamSide = 1
trigger1 = !(Root,StateNo = 2003)
Anim = 8004
ID = 8004
Pos = 65, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000,2P側腹具合文字];満腹
Type = Explod
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = TeamSide = 2
Trigger1 = NumExplod(8005) = 0
Trigger1 = Root,Var(1) < 20
trigger1 = Root,Var(6) <= 0
trigger1 = !(Root,StateNo = 2003)
Anim = 8000
ID = 8005
Pos = -15, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];八分目
Type = Explod
Trigger1 = Root,Var(1) >= 20
Trigger1 = Root,Var(1) <= 49
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8006) = 0
Trigger1 = TeamSide = 2
trigger1 = !(Root,StateNo = 2003)
Anim = 8001
ID = 8006
Pos = -5, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];五分目
Type = Explod
Trigger1 = Root,Var(1) >= 50
Trigger1 = Root,Var(1) <= 79
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8007) = 0
Trigger1 = TeamSide = 2
trigger1 = !(Root,StateNo = 2003)
Anim = 8002
ID = 8007
Pos = -5, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];二分目
Type = Explod
Trigger1 = Root,Var(1) >= 80
Trigger1 = Root,Var(1) <= 99
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8008) = 0
Trigger1 = TeamSide = 2
trigger1 = !(Root,StateNo = 2003)
Anim = 8003
ID = 8008
Pos = -5, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];空腹
Type = Explod
Trigger1 = Root,Var(1) >= 100
Trigger1 = Root,Var(1) <= 149
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8009) = 0
Trigger1 = TeamSide = 2
trigger1 = !(Root,StateNo = 2003)
Anim = 8004
ID = 8009
Pos = -15, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];飢餓
Type = Explod
Trigger1 = Root,Var(1) = 150
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8010) = 0
Trigger1 = TeamSide = 1
trigger1 = !(Root,StateNo = 2003)
Anim = 8010
ID = 8010
Pos = 65, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000];飢餓
Type = Explod
Trigger1 = Root,Var(1) = 150
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8011) = 0
Trigger1 = TeamSide = 2
trigger1 = !(Root,StateNo = 2003)
Anim = 8010
ID = 8011
Pos = -15, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000,1P側バッテン×]
Type = Explod
Trigger1 = Root,Var(2) != 0
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8012) = 0
Trigger1 = TeamSide = 1
trigger1 = !(Root,StateNo = 2003)
Anim = 8012
ID = 8012
Pos = 75, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000,2P側バッテン×]
Type = Explod
Trigger1 = Root,Var(2) != 0
trigger1 = Root,Var(6) <= 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = NumExplod(8013) = 0
Trigger1 = TeamSide = 2
trigger1 = !(Root,StateNo = 2003)
Anim = 8012
ID = 8013
Pos = -5, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000,1P側喉痛い]
Type = Explod
Trigger1 = Root,Var(6) > 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = TeamSide = 1
Trigger1 = NumExplod(8014) = 0
trigger1 = !(Root,StateNo = 2003)
Anim = 8014
ID = 8014
Pos = 75, 60
PosType = Left
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

[State 8000,2P側喉痛い]
Type = Explod
Trigger1 = Root,Var(6) > 0
Trigger1 = (RoundState > 0) && (RoundState != 4)
Trigger1 = !(Root,Life = 0 && Root,StateNo = 5150)
Trigger1 = Root,Alive
Trigger1 = TeamSide = 2
Trigger1 = NumExplod(8015) = 0
trigger1 = !(Root,StateNo = 2003)
Anim = 8014
ID = 8014
Pos = -5, 60
PosType = Right
ontop = 1
Facing = 1
BindTime = -1
OwnPal = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.5, 0.5

;---------------------------------------------------------------------------
[Statedef 10000]
anim=9999
ctrl=0

[State 10000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[state 10000]
type=varadd
triggerall=roundstate=2&&var(58)>-3
trigger1=root,command="a"
trigger2=root,command="b"
trigger3=root,command="c"
trigger4=root,command="x"
trigger5=root,command="y"
trigger6=root,command="z"
trigger7=root,command="s"
trigger8=root,command="up"
trigger9=root,command="down"
var(58)=-1
ignorehitpause=1
[state 10000,ﾌﾗｸﾞON]
type=varset
triggerall=roundstate=2&&var(58)>-3
trigger1=root,command="a"^^command="a"
trigger2=root,command="b"^^command="b"
trigger3=root,command="c"^^command="c"
trigger4=root,command="x"^^command="x"
trigger5=root,command="y"^^command="y"
trigger6=root,command="z"^^command="z"
trigger7=root,command="s"^^command="s"
trigger8=root,command="up"^^command="up"
trigger9=root,command="down"^^command="down"
var(59)=1
ignorehitpause=1

[State 10000,消失]
Type = DestroySelf
triggerAll = isHelper
Trigger1 = root,var(59)||var(58)<=-3
ignorehitpause=1


[State 10000,プレイヤー判定]
type=null;varset
trigger1=command="up"&&root,command="up"
trigger2=command="down"&&root,command="down"
trigger3=command="back"&&root,command="back"
trigger4=command="fwd"&&root,command="fwd"
trigger5=command="a"&&root,command="a"
trigger6=command="b"&&root,command="b"
trigger7=command="c"&&root,command="c"
trigger8=command="x"&&root,command="x"
trigger9=command="y"&&root,command="y"
trigger10=command="z"&&root,command="z"
trigger11=command="s"&&root,command="s"
var(59)=-1

[State 10000,立ったら消失]
Type = null;DestroySelf
triggerAll = isHelper
Trigger1 = root,var(59)||var(59)=-1||var(58)<=-3
trigger2=command="up"&&root,command="up"
trigger3=command="down"&&root,command="down"
trigger4=command="back"&&root,command="back"
trigger5=command="fwd"&&root,command="fwd"
trigger6=command="a"&&root,command="a"
trigger7=command="b"&&root,command="b"
trigger8=command="c"&&root,command="c"
trigger9=command="x"&&root,command="x"
trigger10=command="y"&&root,command="y"
trigger11=command="z"&&root,command="z"
trigger12=command="s"&&root,command="s"

[State 10000,ﾌﾗｸﾞON]
type=null;varset
triggerall=var(59)!=-1
trigger1=root,command="up"
trigger2=root,command="down"
trigger3=root,command="back"
trigger4=root,command="fwd"
trigger5=root,command="a"
trigger6=root,command="b"
trigger7=root,command="c"
trigger8=root,command="x"
trigger9=root,command="y"
trigger10=root,command="z"
trigger11=root,command="s"
var(59)=1

;---------------------------------------------------------------------------
[Statedef 8000]
Type = A
MoveType = I
Physics = N
Ctrl = 0
Anim = 9999
SprPriority = -5
[State 8000]
Type = AssertSpecial
Trigger1 = 1
flag = Invisible
flag2 = Noshadow
ignorehitpause=1
[State 8000]
Type = NotHitBy
Value = SCA
Trigger1 = 1
IgnoreHitPause = 1
[State 8000]
type = BindToRoot
trigger1 = 1
time = 1
facing = 1
pos = 0, 0

[State 8000]
Type = Null
TriggerAll = Var(40) != Root,StateNo
TriggerAll = Root,Time = 1
Trigger1 = 0 && Var(42) := Var(41)
Trigger2 = 0 && Var(41) := Var(40)
Trigger3 = 0 && Var(40) := Root,StateNo
IgnoreHitPause = 1

[State 8000]
type=varset
trigger1 = root,stateno = [120,159]
trigger1 = playerID(root,var(54)),Movetype = A
var(55) = playerID(root,var(54)),Stateno
ignorehitpause = 1
;-----------------------------------------
;歩く
[State 8000]
Type = VarRandom
trigger1 = (Root,StateNo = 20)
trigger1 = Time = [0,1]
v = 49
range = 0,5

;-----------------------------------------
;被ダメ計算
[State 8000]
Type = Null
Trigger1 = Root,Ctrl||Root,Life=Root,LifeMax
Trigger1 = 1 || Var(45) := Root,Life
Trigger2 = !Root,Ctrl
Trigger2 = Root,Life<Root,LifeMax
Trigger2 = 1 || Var(46) := Var(45)-Root,Life
IgnoreHitPause = 1

;-----------------------------------------
;中攻撃ヒットフラグ
[State 8000]
Type = Null
trigger1 = (Root,StateNo = 205)
trigger1 = Root,MoveContact
trigger1 = 1||var(47):=1
Trigger2 = !(Root,StateNo = 205)
Trigger2 = !(Root,StateNo = 2222)
trigger2 = 1||var(47):=0
IgnoreHitPause = 1

;-----------------------------------------
;強攻撃頻度
[State 8000]
type=varadd
trigger1 = var(41)=210
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = root,time = 1
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
var(51) = 1
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = (((Root,Life)*1.0/(Root,LifeMax)*1.0)<0.10)
var(51) = 10
ignorehitpause = 1

[State 8000]
type=varadd
trigger1 = var(51)>0
trigger1 = ctrl
trigger1 = Random <= 2
var(51) = -1
ignorehitpause = 1

;-----------------------------------------
;Lv2変身成功
[State -2]
type = Null
trigger1 = 1||var(48):=0
ignorehitpause = 1
[State -2]
type = Null
trigger1 = (numhelper(3001) = 1)
trigger1 = (helper(3001),StateNo = [3014,3016])
trigger1 = floor(helper(3001),Pos X-playerID(root,var(54)),Pos X)*helper(3001),facing <= -20
trigger1 = 1||var(48):=1
ignorehitpause = 1

;-----------------------------------------
;強攻撃→瞬食可否判断
[State -2]
type = Null
trigger1 = ((Root,StateNo = 210) && (Root,MoveContact=0))
trigger1 = playerID(root,var(54)),StateType = A
trigger1 = 1||var(52):=5
trigger2 = ((Root,StateNo = 210) && (Root,MoveContact=0))
trigger2 = playerID(root,var(54)),StateType != A
trigger2 = 1||var(52):=0
trigger3 = (Root,StateNo != 210)
trigger3 = 1||var(52):=0
IgnoreHitPause = 1

;-----------------------------------------
;中段学習
[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = !var(0)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
var(0) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = var(0)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(0)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = !var(1)
trigger1 = var(0)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
var(1) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = var(1)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(1)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = !var(2)
trigger1 = var(0)!=var(55)
trigger1 = var(1)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
var(2) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = var(2)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(2)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = !var(3)
trigger1 = var(0)!=var(55)
trigger1 = var(1)!=var(55)
trigger1 = var(2)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
var(3) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = var(3)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(3)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = !var(4)
trigger1 = var(0)!=var(55)
trigger1 = var(1)!=var(55)
trigger1 = var(2)!=var(55)
trigger1 = var(3)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
var(4) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = var(4)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype !=A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(4)=0
ignorehitpause=1
;-----------------------------------------
;下段学習
[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = !var(10)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
var(10) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = var(10)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(10)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = !var(11)
trigger1 = var(10)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
var(11) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = var(11)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(11)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = !var(12)
trigger1 = var(10)!=var(55)
trigger1 = var(11)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
var(12) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = var(12)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(12)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = !var(13)
trigger1 = var(10)!=var(55)
trigger1 = var(11)!=var(55)
trigger1 = var(12)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
var(13) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = var(13)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(13)=0
ignorehitpause=1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 1
trigger1 = !var(14)
trigger1 = var(10)!=var(55)
trigger1 = var(11)!=var(55)
trigger1 = var(12)!=var(55)
trigger1 = var(13)!=var(55)
trigger1 = root,movetype = H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
var(14) = var(55)
ignorehitpause = 1

[State 8000]
type=varset
trigger1 = root,fvar(38) = 2
trigger1 = var(14)=var(55)
trigger1 = root,movetype=H
trigger1 = root,stateno != [120,159]
trigger1 = playerID(root,var(54)),Statetype =A
trigger1 = playerID(root,var(54)),Movetype = A
trigger1 = 1 || var(56) := var(55)
var(14)=0
ignorehitpause=1
;-----------------------------------------
[State 8000];前詰め
type=Null
Trigger1 = !var(0)
Trigger1 = var(1) || var(0) := var(1)
Trigger2 = !var(1)
Trigger2 = var(2) || var(1) := var(2)
Trigger3 = !var(2)
Trigger3 = var(3) || var(2) := var(3)
Trigger4 = !var(3)
Trigger4 = var(4) || var(3) := var(4)
Trigger5 = var(1)
Trigger5 = var(1)=var(0)
Trigger5 = 1 || var(1) := 0
Trigger6 = var(2)
Trigger6 = var(2)=var(0)||var(2)=var(1)
Trigger6 = 1 || var(2) := 0
Trigger7 = var(3)
Trigger7 = var(4)=var(0)||var(4)=var(1)||var(4)=var(2)
Trigger7 = 1 || var(3) := 0
Trigger8 = var(4)
Trigger8 = var(4)=var(0)||var(4)=var(1)||var(4)=var(2)||var(4)=var(3)
Trigger8 = 1 || var(4) := 0
Trigger9 = !var(10)
Trigger9 = var(11) || var(10) := var(11)
Trigger10 = !var(11)
Trigger10 = var(12) || var(11) := var(12)
Trigger11 = !var(12)
Trigger11 = var(13) || var(12) := var(13)
Trigger12 = !var(13)
Trigger12 = var(14) || var(13) := var(14)
Trigger13 = var(11)
Trigger13 = var(11)=var(10)
Trigger13 = 1 || var(11) := 0
Trigger14 = var(12)
Trigger14 = var(12)=var(10)||var(12)=var(11)
Trigger14 = 1 || var(12) := 0
Trigger15 = var(13)
Trigger15 = var(14)=var(10)||var(14)=var(11)||var(14)=var(12)
Trigger15 = 1 || var(13) := 0
Trigger16 = var(14)
Trigger16 = var(14)=var(10)||var(14)=var(11)||var(14)=var(12)||var(14)=var(13)
Trigger16 = 1 || var(14) := 0
ignorehitpause=1

[State 8000];初期化
type=VarSet
Trigger1 = 1
var(50) = 0
ignorehitpause=1

[State 8000];中段ガード
type=VarSet
TriggerAll = NumEnemy
Trigger1 = var(0)
Trigger1 = playerID(root,var(54)),stateno = var(0)
Trigger2 = var(1)
Trigger2 = playerID(root,var(54)),stateno = var(1)
Trigger3 = var(2)
Trigger3 = playerID(root,var(54)),stateno = var(2)
Trigger4 = var(3)
Trigger4 = playerID(root,var(54)),stateno = var(3)
Trigger5 = var(4)
Trigger5 = playerID(root,var(54)),stateno = var(4)
var(50) = 1
ignorehitpause=1

[State 8000];下段ガード
type=VarSet
TriggerAll = NumEnemy
Trigger1 = var(10)
Trigger1 = playerID(root,var(54)),stateno = var(10)
Trigger2 = var(11)
Trigger2 = playerID(root,var(54)),stateno = var(11)
Trigger3 = var(12)
Trigger3 = playerID(root,var(54)),stateno = var(12)
Trigger4 = var(13)
Trigger4 = playerID(root,var(54)),stateno = var(13)
Trigger5 = var(14)
Trigger5 = playerID(root,var(54)),stateno = var(14)
var(50) = 2
ignorehitpause=1

[State 8000, クリップボード]
Type = DisplayToClipboard
Trigger1 = 1
Text = "(0):%d, (1):%d, (2):%d, (3):%d, (4):%d"
Params = Var(0), Var(1), Var(2), Var(3), Var(4)
IgnoreHitPause = 1
SuperMoveTime = 2147483647
PauseMoveTime = 2147483647
[State 8000, クリップボード]
type = AppendToClipboard
trigger1 = 1
Text = " (10):%d, (11):%d, (12):%d, (13):%d, (14):%d"
Params = Var(10), Var(11), Var(12), Var(13), Var(14)
IgnoreHitPause = 1
SuperMoveTime = 2147483647
PauseMoveTime = 2147483647
[State 8000, クリップボード]
type = AppendToClipboard
trigger1 = 1
Text = " (45):%d, (46):%d, (50):%d, (55):%d, (56):%d"
Params = Var(45), Var(46), Var(50), Var(55), Var(56)
IgnoreHitPause = 1
SuperMoveTime = 2147483647
PauseMoveTime = 2147483647