
;------------------------------------------------------------------
; Mode Change
[Statedef 2900]
type = S
movetype = I
physics = S
anim = 2900
velset = 0,0
ctrl = 0

[State 2900]
type = AssertSpecial
trigger1 = time = [0,60]
flag = intro

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

[State var]
type = varset
trigger1 = animelem = 1
var(10) = 1

[State super effect]
type = Helper
trigger1 = animelem = 1 && roundstate = 2
name = "super"
stateno = 4500
pos = 2,-80
ownpal = 1
supermovetime = 78
[State super effect]
type = SuperPause
trigger1 = animelem = 1 && roundstate = 2
time = 52
movetime = 52
anim = -1
sound = s4500
darken = 0
poweradd = -ifelse(roundstate=2,3000,0)
[State pal]
type = BGPalFX
trigger1 = animelem = 1,5
time = ifelse(roundstate=2,52,78)
sinadd = -128,-128,-64,ifelse(roundstate=2,104,156)
ignorehitpause = 1

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

[State 2900]
type = PlaySnd
trigger1 = animelem = 1,1
value = 2900,ifelse(var(50)=1,22,20)
channel = 0
[State 2900]
type = PlaySnd
trigger1 = animelem = 9
value = 2900,ifelse(var(50)=1,23,21)
channel = 0

[State ctrl]
type = ctrlset
trigger1 = animelem = 9
value = ifelse(roundstate=2,1,0)

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

;------------------------------------------------------------------
;鬼門開封(試行)
[Statedef 12100]
type = S
movetype = I
physics = N
anim = 12100
velset = 0,0
ctrl = 0

[State explod]
type = RemoveExplod
trigger1 = 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 = animelem = 1
time = 78
movetime = 78
anim = -1
sound = s4510
darken = 0
poweradd = -3000
[State pal]
type = BGPalFX
trigger1 = time = 0
time = 78
sinadd = -128,-128,-64,156
ignorehitpause = 1

[State image]
type = AfterImage
trigger1 = time = 0
time = 126
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 12100]
type = PlaySnd
trigger1 = animelem = 20
value = 12100,20
channel = 0

[State type]
type = StateTypeSet
trigger1 = animelem = 23,-1
movetype = A

[State hit]
type = HitDef
trigger1 = movecontact = 0
trigger1 = animelemno(0) = 23
attr = S,HA
hitflag = MAFDP
guardflag = HA
animtype = hard
damage = 40,16
pausetime = 2,12
sparkno = 2
guard.sparkno = 41
sparkxy = -10,-60
hitsound = s4020,0
guardsound = s4400,0
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -6
air.velocity = -2,-3
kill = 0
guard.kill = 0
getpower = 0
persistent = 0

[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 hit]
type = movehitreset
trigger1 = animelem = 30,-1

[State hit]
type = HitDef
trigger1 = animelem = 30,>= 0
attr = S,HT
hitflag = MAFD
guardflag = M
pausetime = 0,0
sparkno = -1
guard.sparkno = 42
sparkxy = -5,-55
guardsound = s4400,0
p2facing = 1
p1stateno = 12101
p2stateno = 12105
p2getp1state = 1
fall = 1
fall.recover = 0
hitonce = 1

[State pos]
type = posadd
trigger1 = animelem = 29
x = 10

[State vel]
type = velset
trigger1 = animelem = 30
x = 10

[State vel]
type = veladd
trigger1 = animelem = 30,>= 0
x = .4

[State 12100]
type = ChangeState
trigger1 = time = 122
trigger2 = animelem = 30,>= 0
trigger2 = moveguarded = 1
value = 12104

;鬼門開封(失敗)
[Statedef 12104]
type = S
movetype = I
physics = S
anim = 12104
velset = 4,0
ctrl = 0

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

[State pos]
type = posset
trigger1 = 1
y = 0

[State vel]
type = velset
trigger1 = time = [0,9]
x = 4

[State 12104]
type = PlaySnd
trigger1 = animelem = 1
value = 12104,20
channel = 0

[State snd]
type = PlaySnd
trigger1 = time = 1
value = 101,0

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

;鬼門開封(成功)
[Statedef 12101]
type = S
movetype = I
physics = N
anim = 12101
velset = 12,0
ctrl = 0

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

[State image]
type = AfterImageTime
trigger1 = timemod = 6,0
time = 6

[State snd]
type = PlaySnd
trigger1 = animelem = 1
value = 102,0

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

[State bind]
type = TargetBind
trigger1 = 1
pos = 24,-40

[State explod]
type = Explod
trigger1 = time = [0,11]
trigger1 = timemod = 6,0
anim = 12140
pos = 20,0
sprpriority = 5
ownpal = 1

[State explod]
type = Explod
trigger1 = time >= 12
trigger1 = timemod = 6,0
anim = 12141
pos = 20,0
sprpriority = 5
ownpal = 1

[State explod]
type = Explod
trigger1 = timemod = 6,0
anim = f2
pos = 20,-40
sprpriority = 2
ownpal = 1

[State life]
type = TargetLifeAdd
trigger1 = timemod = 6,0
value = -ceil(10*(const(data.attack)*.01))
kill = 0
[State hit]
type = HitAdd
trigger1 = timemod = 6,0
value = 1

[State 12101]
type = ChangeState
trigger1 = frontedgedist = 0
value = 12102

;鬼門開封(壁際)
[Statedef 12102]
type = S
movetype = A
physics = N
anim = 12102
velset = 0,0
ctrl = 0

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

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

[State pos]
type = posadd
trigger1 = time = 0
x = -40

[State explod]
type = Explod
trigger1 = animelem = 1
anim = 2040
bindtime = -1
sprpriority = 5
ownpal = 1

[State explod]
type = Explod
trigger1 = animelem = 1
anim = 2041
bindtime = -1
sprpriority = 4
ownpal = 1

[State explod]
type = Explod
trigger1 = animelem = 1
anim = f3
pos = 40,-80
bindtime = -1
sprpriority = 2
ownpal = 1
[State snd]
type = PlaySnd
trigger1 = animelem = 1
value = 4350,0

[State life]
type = TargetLifeAdd
trigger1 = animelem = 1
value = -ceil(60*(const(data.attack)*.01))
kill = 0
[State hit]
type = HitAdd
trigger1 = animelem = 1
value = 1
[State 12102]
type = EnvShake
trigger1 = animelem = 1
time = 12
ampl = -6

[State 12102]
type = TargetState
trigger1 = animelem = 1
value = 12106

[State bind]
type = TargetBind
trigger1 = animelem = 2,< 0
pos = 34,-74
[State bind]
type = TargetBind
trigger1 = animelemno(0) = 2
pos = 40,-80

[State 12102]
type = PlaySnd
trigger1 = animelem = 3
value = 12102,20
channel = 0

[State explod]
type = Explod
trigger1 = animelem = 2,8
anim = 12142
pos = 40,0
bindtime = -1
sprpriority = 5
ownpal = 1

[State snd]
type = PlaySnd
trigger1 = animelem = 2,8
value = 12140,0
[State snd]
type = PlaySnd
trigger1 = animelem = 2,9
value = 2001,1
volume = 255

[State hit]
type = HitDef
trigger1 = timemod = 3,0
attr = S,HP
hitflag = MAFDP
guardflag = MA
animtype = up
damage = 30,12
pausetime = 0,1
sparkno = 2
guard.sparkno = 42
sparkxy = -10,-80+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 = 0
fall = 1
fall.recover = 0
ID = 4200
kill = 0
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 = 6

[State pause]
type = Pause
triggerall = roundstate = 2
trigger1 = time = [18,42]
trigger1 = timemod = 3,0
time = 6
movetime = 0

[State life]
type = TargetLifeAdd
trigger1 = time = 48
value = -ceil(10*(const(data.attack)*.01))

[State 12102]
type = ChangeState
trigger1 = time = 48
value = 12103

;鬼門開封(終了)
[Statedef 12103]
type = S
movetype = I
physics = S
anim = 12103
velset = 0,0
ctrl = 0

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

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

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

;------------------------------------------------------------------
;鬼門開封(相手)
[Statedef 12105]
type = A
movetype = H
physics = N
sprpriority = 2

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

[State anim]
type = ChangeAnim2
trigger1 = time = [0,2]
value = 5405
[State anim]
type = ChangeAnim2
trigger1 = time = [3,5]
value = 5402
[State anim]
type = ChangeAnim2
trigger1 = time = [6,8]
value = 5461
[State anim]
type = ChangeAnim2
trigger1 = time >= 9
value = 5462

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

[Statedef 12106]
type = A
movetype = H
physics = N
sprpriority = 1

[State hit]
type = NotHitBy
trigger1 = time < 18
value = SCA
[State 12106]
type = PlayerPush
trigger1 = time < 18
value = 0
[State 12106]
type = ScreenBound
trigger1 = time < 18
value = 0
movecamera = 0,0

[State anim]
type = ChangeAnim2
trigger1 = time = [0,3]
value = 5405
[State anim]
type = ChangeAnim2
trigger1 = time = [4,17]
value = 5403

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

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

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