;---------------------------------------------------------------------------
;===========================================================================
;登場イントロ
;===========================================================================
;---------------------------------------------------------------------------
;登場イントロ分岐
[Statedef 190]
type = S

[State ]
type = ChangeState
trigger1 = Time = 0
value = 191
;---------------------------------------------------------------------------
;登場イントロ１
[Statedef 191]
type = S
movetype = I
physics = S
ctrl = 0
anim = 191
sprpriority = 2

[State ]
type = ChangeAnim
trigger1 = RoundState = 0
value = 191
[State ]
type = AssertSpecial
trigger1 = 1
flag = Intro
[State ]
type = VarSet
trigger1 = Time = 0
var(0) = random%3

[State ]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State ]
type = PlaySnd
trigger1 = AnimElem = 13
value = 5,0
[State ]
type = PlaySnd
trigger1 = AnimElem = 50
value = 5,2

[State ]
type = PlaySnd
triggerall = var(0) = 0
trigger1 = AnimElem = 14
value = 4,23
[State ]
type = PlaySnd
triggerall = var(0) = 1
trigger1 = AnimElem = 2
value = 4,11
[State ]
type = PlaySnd
triggerall = var(0) = 1
trigger1 = AnimElem = 14
value = 4,14
[State ]
type = PlaySnd
triggerall = var(0) = 2
trigger1 = AnimElem = 2
value = 4,15
[State ]
type = PlaySnd
triggerall = var(0) = 2
trigger1 = AnimElem = 14
value = 4,19

[State ]
type = Explod
trigger1 = AnimElem = 13
anim = 4027
postype = p1
pos = 0,0
scale = 0.5,0.5
removetime = -2
bindtime = -1
sprpriority = 3
ownpal = 1
[State ]
type = Explod
trigger1 = AnimElem = 14
anim = 4029
postype = p1
pos = 0,0
scale = 0.5,0.5
removetime = 108
bindtime = -1
sprpriority = 3
ownpal = 1
[State ]
type = Explod
trigger1 = AnimElem = 50
anim = 4028
postype = p1
pos = 0,0
scale = 0.5,0.5
removetime = -2
bindtime = -1
sprpriority = 3
ownpal = 1

[State ]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;===========================================================================
;勝利イントロ
;===========================================================================
;---------------------------------------------------------------------------
;勝利イントロ分岐
[Statedef 180]
type = S

[State ]
type = ChangeState
trigger1 = var(13) = 1
value = 181
[State ]
type = ChangeState
trigger1 = 1
value = 181+random%2
;---------------------------------------------------------------------------
;勝利イントロ１
[Statedef 181]
type = S
movetype = I
physics = S
ctrl = 0
anim = 181
sprpriority = 2

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

[State ]
type = AssertSpecial
trigger1 = Time <= 300
flag = RoundNotOver

[State ]
type = Explod
trigger1 = Time = 0
anim = 4009+((var(0=1))*21)
postype = p1
pos = 0,0
scale = 0.5,0.5
removetime = -1
bindtime = -1
sprpriority = -2
ownpal = 1

[State ]
type = Explod
triggerall = var(0) = 1
trigger1 = Time = 0
anim = 3004
postype = p1
pos = 0,0
scale = const(size.xscale),const(size.yscale)
removetime = -1
bindtime = -1
sprpriority = 3
ownpal = 1

[State ]
type = PlaySnd
triggerall = var(0) = 0
trigger1 = Time = 60
value = 4,22
[State ]
type = PlaySnd
triggerall = var(0) = 1
trigger1 = Time = 60
value = 4,31

[State ]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;勝利イントロ２
[Statedef 182]
type = S
movetype = I
physics = S
ctrl = 0
anim = 182
sprpriority = 2

[State ]
type = AssertSpecial
trigger1 = Time <= 300
flag = RoundNotOver
[State ]
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State ]
type = PlaySnd
trigger1 = Time = 0
value = 5,0

[State ]
type = PlaySnd
triggerall = var(0) = 0
trigger1 = Time = 120
value = 4,12

[State ]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;===========================================================================
;その他
;===========================================================================
;---------------------------------------------------------------------------
;タイムオーバー（負けた時）
[Statedef 170]
type = S
ctrl = 0
anim = 5301
velset = 0,0

[State ]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;ラウンド切替
[Statedef 5900]
type = S

[State ]
type = VarRangeSet
trigger1 = RoundsExisted = 0
value = 0
[State ]
type = VarRangeSet
trigger1 = RoundsExisted = 0
fvalue = 0

[State ]
type = ChangeState
trigger1 = RoundNo = 1
trigger2 = RoundsExisted = 0
trigger2 = TeamMode = Turns
trigger2 = RoundNo > 0
value = 190
;---------------------------------------------------------------------------
;立ち（フィアーパニッシュメント用上書き）
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State ]
type = ChangeAnim
triggerall = var(13) = 0
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 0

[State ]
type = ChangeAnim
trigger1 = var(13) = 1
trigger1 = Anim != 3005
value = 3005

[State ]
type = VelSet
trigger1 = Time = 0
y = 0

[State ]
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

;********フィアーパニッシュメント処理*********
[State ]
type = AssertSpecial
trigger1 = Anim = 3005
flag = NoAutoTurn
flag2 = NoWalk
;**************************

[State ]
type = ChangeState
trigger1 = !alive
value = 5050
;---------------------------------------------------------------------------
;===========================================================================
;特殊やられ
;===========================================================================
;---------------------------------------------------------------------------
;死亡：上書き
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State ]
type = PlaySnd
triggerall= Anim != 91231
trigger1 = time = 0
value = F7,0

;*********首狩り用*********
[State ]
type = posset
triggerall= Anim = 91231
trigger1 = 1
y = 0
 
[State ]
type = changeanim
triggerall= Anim = 91231
trigger1 = time = 0
value = 91232
 
[State ]
type = PlaySnd
triggerall= Anim = 91232
trigger1 = time = 1
value = F7,0
;**************************

[State ]
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140
[State ]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)
[State ]
type = ChangeAnim
persistent = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10
[State ]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State ]
type = VelMul
trigger1 = 1
x = 0.85
[State ]
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State ]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;首狩り
[Statedef 91230]
type = S
movetype = H
ctrl = 0
;physics = A
velset = 0, 0
anim = 91230
 
[State ]
type = screenbound
trigger1 = 1
movecamera = 1,0
value = 1
 
[State ]
type = Width
trigger1 = alive = 1
value = 50,50
 
[State ];頭ヘルパー
type = Helper
trigger1 = AnimElem = 2
name = "cabeza"
ID = 4011
stateno = 912320
postype = p1
pos = -5,-34
sprpriority = 7
 
[State ]
type = changestate
trigger1 = time = 140
value = 91231
ctrl = 0
;---------------------------------------------------------------------------
;首狩り：首狩られた後
[Statedef 91231]
type = S
movetype = H
ctrl = 0
physics = N
velset = 0,0
 
[State ]
type = Changeanim
trigger1 = Time = 0
value = 91231
 
[State ]
type = screenbound
trigger1 = 1
movecamera = 1,0
value = 1
 
[State ]
type = veladd
trigger1 = 1
y = .3
 
[State ]
type = sprpriority
trigger1 = 1
value = 1
 
[State ]
type = Width
trigger1 = alive = 1
value = 50,50
 
[State ]
type = selfstate
trigger1 = pos Y >= -20 && vel y > 0
value = 5150
ctrl = 0
;---------------------------------------------------------------------------
;首狩り：頭ヘルパー
[Statedef 912320]
type = A
movetype= I
physics = N
poweradd= 0
ctrl = 0
velset = -1,-5
sprpriority = 7
anim = 912320

[State ]
type = veladd
trigger1 = 1
y = 0.3

[State ]
type = PlaySnd
trigger1 = pos Y >= -3 && vel y > 0
value = F7,0
freqmul = 1.3
volume = 100
persistent = 0

[State ]
type = velset
trigger1 = pos Y >= -3 && vel y > 0
y = -4.8
persistent = 0

[State ]
type = changeanim
trigger1 = pos Y >= 0 && vel y > 0
value = 912321

[State ]
type = VelSet
trigger1 = anim = 912321
x = 0
y = 0

[State ]
type = posSet
trigger1 = anim = 912321
y = 4

[State ]
type = PlaySnd
trigger1 = anim = 912321
value = F7,0
freqmul = 1.3
volume = 100
persistent = 0
;---------------------------------------------------------------------------
;胴体切断：ヘルパー
[Statedef 91241]
type = S
movetype= I
physics = N
poweradd= 0
ctrl = 0

[State ]
type = ChangeAnim
trigger1 = !time
value = 91242

[State ]
type = VelSet
trigger1 = !time
x = 3+(random/500.0)
y = -3

[State ]
type = VelAdd
trigger1 = 1
y = .4

[State ]
type = ChangeAnim
trigger1 = vel y > 0 && pos y > 0
value = 91243

[State ]
type = VelSet
trigger1 = anim = 91243
x = 0
y = 0

[State ]
type = posset
trigger1 = anim = 91243
y = 0

[State ]
type = Explod
trigger1 = anim = 91243
anim = f61
pos = 20,0
sprpriority = 0
persistent = 0

[State ]
type = EnvShake
trigger1 = anim = 91243
time = 10
ampl = -8
persistent = 0

[State ]
type = PlaySnd
trigger1 = anim = 91243
value = f 7, 1
persistent = 0
;---------------------------------------------------------------------------