
;------------------------------------------------------------------
; Cut In
[Statedef 9020]
type = A
movetype = I
physics = N
anim = 9020
ctrl = 0

[State 9020]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State pal]
type = PalFX
trigger1 = time = 30
time = 48
sinadd = -512,-512,-512,192
ignorehitpause = 1

[State face]
type = Explod
trigger1 = time = 0
anim = ifelse((root,stateno=[2000,2100]),9021,9020)+ifelse((root,var(10)=1||root,fvar(10)>=2),1,0)*10000
pos = -115,120
postype = back;left
vel = 10.5,0
accel = -.5,0
removetime = 20
supermove = 1
scale = .5,.5
sprpriority = -6
[State face]
type = Explod
trigger1 = time = 20
anim = ifelse((root,stateno=[2000,2100]),9021,9020)+ifelse((root,var(10)=1||root,fvar(10)>=2),1,0)*10000
pos = 0,120
postype = back;left
bindtime = -1
removetime = 10
supermove = 1
scale = .5,.5
sprpriority = -6
[State face]
type = Explod
trigger1 = time = 30
anim = ifelse((root,stateno=[2000,2100]),9021,9020)+ifelse((root,var(10)=1||root,fvar(10)>=2),1,0)*10000
ID = 9020
pos = 0,120
postype = back;left
bindtime = -1
supermove = 1
sprpriority = -6

[State var]
type = varset
trigger1 = time = 0
fvar(2) = 0
[State var]
type = varadd
trigger1 = time >= 30
fvar(2) = .25
ignorehitpause = 1
[State explod]
type = ModifyExplod
trigger1 = 1
ID = 9020
scale = .5+fvar(2)/8,.5+fvar(2)/8
ignorehitpause = 1

[State explod]
type = RemoveExplod
trigger1 = time = 78
[State end]
type = DestroySelf
trigger1 = time = 78

;------------------------------------------------------------------
;赤主・檻髪(試行)
[Statedef 2000]
type = S
movetype = A
physics = S
anim = ifelse(var(10)=1||fvar(10)>=2,12000,2000)
velset = 0,0
ctrl = 0

[State explod]
type = RemoveExplod
trigger1 = animelem = 1
ID = 200

[State super effect]
type = Helper
trigger1 = animelem = 1
name = "super"
stateno = 4500
pos = 2,-92
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = time = 0
time = 78
movetime = 78
anim = -1
sound = s4510
darken = 0
poweradd = -3000
[State pal]
type = BGPalFX
trigger1 = time = 0
time = 52
sinadd = -128,-128,-64,104
ignorehitpause = 1
[State pal]
type = BGPalFX
trigger1 = time = [26,52]
time = 26
add = -128,-128,-64
sinadd = 128,128,64,104
ignorehitpause = 1

[State image]
type = AfterImage
trigger1 = time = 0
time = 162
length = 10
paladd = -10,-20,-20
palmul = .95,.95,.95
timegap = 1
framegap = 1
trans = add

[State hit]
type = NotHitBy
trigger1 = animelem = 28,< 0
value = SCA

[State explod]
type = Explod
trigger1 = animelem = 6
anim = 2040
ID = 2040
bindtime = -1
supermove = 1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State explod]
type = Explod
trigger1 = animelem = 7
anim = 2041
ID = 2040
bindtime = -1
supermove = 1
sprpriority = 1
ownpal = 1
removeongethit = 1

[State explod]
type = Explod
trigger1 = animelem = 30
anim = 2042
ID = 2040
pos = 60,-25
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State hit]
type = HitDef
trigger1 = animelem = 27
attr = S,HT
hitflag = MAFD
priority = 4,hit
sparkno = -1
snap = 40
p2facing = 1
p1stateno = 2001
p2stateno = 2005
p2getp1state = 1
fall = 1
fall.recover = 0
hitonce = 1

[State hit]
type = MoveHitReset
trigger1 = animelemno(0) = [30,37]
trigger1 = timemod = 2,0

[State hit]
type = HitDef
trigger1 = roundstate = 2
trigger1 = animelemno(0) = [30,37]
trigger1 = timemod = 2,0
attr = S,HP
hitflag = MAFDP
guardflag = HA
animtype = back
damage = 25,10
pausetime = 0,1
sparkno = 2
guard.sparkno = 42
sparkxy = 20-floor(p2dist x)/6,-70+floor(p2bodydist y)/2
hitsound = s4200,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .45
ground.velocity = -2,-6
air.velocity = -2,-6
ground.cornerpush.veloff = -2
fall = 1
fall.recover = 0
ID = 4200
guard.kill = 0
getpower = 0
palfx.time = 24
palfx.add = 150,-30,-50
palfx.mul = 240,210, 90
palfx.sinadd = -20,-20,-20,48
palfx.color = 0
palfx.invertall = 1
envshake.time = 4
envshake.ampl = -2

[State 2000]
type = PlaySnd
trigger1 = animelem = 28
value = 2000,0
channel = 0

[State type]
type = StateTypeSet
trigger1 = animelem = 38,-1
movetype = I

[State pos]
type = posadd
trigger1 = animelem = 28
trigger2 = animelem = 30
trigger3 = animelem = 31
x = 10
[State pos]
type = posadd
trigger1 = animelem = 42
trigger2 = animelem = 43
trigger3 = animelem = 44
x = -10

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;赤主・檻髪(成功)
[Statedef 2001]
type = S
movetype = A
physics = S
anim = 2001
velset = 0,0
ctrl = 0

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

[State image]
type = AfterImageTime
trigger1 = time = 0
time = 90

[State explod]
type = Explod
trigger1 = animelem = 3
anim = f4
pos = 44,-86
bindtime = -1
sprpriority = 2
ownpal = 1
[State snd]
type = PlaySnd
trigger1 = animelem = 3
value = 4000,0

[State bind]
type = TargetBind
trigger1 = animelem = 3,< 0
pos = 40,0
[State bind]
type = TargetBind
trigger1 = animelem = 3,>= 0
pos = 44,-86

[State 2001]
type = PlaySnd
trigger1 = animelem = 7
value = 2001,0
channel = 0

[State snd]
type = PlaySnd
trigger1 = animelem = 7
value = 2001,1
volume = 255

[State 2001]
type = EnvShake
trigger1 = animelem = 7
time = 4
ampl = -2

[State explod]
type = Explod
trigger1 = animelem = 7
anim = 2043
ID = 2040
pos = 0,0
bindtime = -1
sprpriority = 2
ownpal = 1

[State explod]
type = Explod
trigger1 = animelem = 7
anim = 2044
ID = 2040
pos = 44,0
bindtime = 90
sprpriority = 2
ownpal = 1

[State pause]
type = Pause
triggerall = roundstate = 2
trigger1 = animelem = 7,>= 0
trigger1 = timemod = 3,0
time = 6
movetime = 0

[State life]
type = TargetLifeAdd
trigger1 = animelem = 7,>= 0
trigger1 = timemod = 3,0
value = -ceil(15*(const(data.attack)*.01))
kill = 0

[State hit]
type = HitAdd
trigger1 = animelem = 7,>= 0
trigger1 = timemod = 3,0
value = 1

[State explod]
type = Explod
trigger1 = animelem = 7,>= 0
trigger1 = timemod = 3,0
anim = f2
pos = 45,-85
random = 20,20
sprpriority = 2
ownpal = 1
[State snd]
type = PlaySnd
trigger1 = animelem = 7,>= 0
trigger1 = timemod = 3,0
value = 4200,0

[State 2001]
type = EnvShake
trigger1 = animelem = 7,>= 0
trigger1 = timemod = 3,0
time = 4
ampl = -2

[State 2001]
type = ChangeState
trigger1 = time = 90
value = 2002

;赤主・檻髪(終了)
[Statedef 2002]
type = S
movetype = A
physics = S
anim = ifelse(var(10)=1||fvar(10)>=2,12002,2002)
velset = 0,0
ctrl = 0

[State hit]
type = NotHitBy
trigger1 = animelem = 5,< 0
value = SCA

[State image]
type = AfterImageTime
trigger1 = time = 0
time = 24

[State 2002]
type = TargetState
trigger1 = time = 1
value = 2006

[State hit]
type = HitDef
trigger1 = animelem = 5,< 0
trigger1 = timemod = 4,0
attr = S,HP
hitflag = MAFDP
guardflag = MA
animtype = back
damage = 20,8
pausetime = 0,1
sparkno = 2
guard.sparkno = 42
sparkxy = -20,-60+floor(p2bodydist y)/2
hitsound = s4200,0
guardsound = s4400,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
yaccel = .45
ground.velocity = -.1,-8
air.velocity = -.1,-8
ground.cornerpush.veloff = -2
fall = 1
fall.recover = 0
ID = 4200
getpower = 0
palfx.time = 24
palfx.add = 150,-30,-50
palfx.mul = 240,210, 90
palfx.sinadd = -20,-20,-20,48
palfx.color = 0
palfx.invertall = 1
envshake.time = 4
envshake.ampl = -2

[State type]
type = StateTypeSet
trigger1 = animelem = 5
movetype = I

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------
;赤主・檻髪(相手)
[Statedef 2005]
type = A
movetype = H
physics = N

[State hit]
type = NotHitBy
trigger1 = 1
value = SCA
[State 2005]
type = PlayerPush
trigger1 = 1
value = 0
[State 2005]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 2005]
type = ChangeAnim
trigger1 = time < 5
value = 5010

[State 2005]
type = ChangeAnim2
trigger1 = time = [5,24]
trigger2 = time >= 24
trigger2 = timemod = 9,0
value = 5453

[State 2005]
type = ChangeAnim2
trigger1 = time >= 24
trigger1 = timemod = 9,3
value = 5454

[State pal]
type = PalFX
trigger1 = time >= 24
trigger1 = timemod = 9,0
time = 24
add = 150,-30,-50
mul = 240,210, 90
sinadd = -20,-20,-20,48
color = 0
invertall = 1

[Statedef 2006]
type = A
movetype = H
physics = N

[State pos]
type = posadd
trigger1 = time = 0
x = -const(size.head.pos.x)
y = -const(size.head.pos.y)

[State vel]
type = velset
trigger1 = time = 0
x = -.1
y = -1

[State end]
type = SelfState
trigger1 = time = 0
value = 5050
