

[statedef 10000]
type=a
movetype=a
physics=n
ctrl=0
sprpriority=5

[state ]
type=changestate
trigger1=!ishelper&&ifelse(sysvar(0)%257000!=256006,1,floor((sysvar(3)%floor(2.0**5))/floor(2.0**4))=1)
trigger2=ishelper
trigger2=ifelse(root,sysvar(0)%257000!=256006,1,!ishelper(103000))
value=1836769491
persistent=256
ignorehitpause=1
[state ]
type=varset
triggerall=ifelse(!ishelper,0,ishelper(100000)&&floor(sysfvar(1))>=7&&floor(sysfvar(1))<=12)
trigger1=1
sysvar(0)=stateno
ignorehitpause=1

[state ]
type=changeanim
trigger1=anim!=30010
value=30010
ignorehitpause=1



;変数代入。
[state ]
type=varset
trigger1=1
fvar(0)=0.02
ignorehitpause=1
[state ]
type=varset
trigger1=1
var(1)=165
ignorehitpause=1
[state ]
type=varset
trigger1=1
var(2)=-140
ignorehitpause=1
[state ]
type=varset
trigger1=1
var(3)=30
ignorehitpause=1
[state ]
type=varset
trigger1=1
var(4)=random
ignorehitpause=1



;音響。
[state ]
type=stopsnd
trigger1=animelemtime(1)=0
channel=-1
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s100,30
freqmul=0.8
volume=255
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s100,30
freqmul=1.2
volume=255
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s10000,9
freqmul=0.9
volume=255
channel=1
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s10000,20
freqmul=0.8
volume=255
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s10000,20
freqmul=1.2
volume=255
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s10000,20
freqmul=1.2
volume=255
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(16)=0
value=s10000,23
volume=255
channel=1
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(16)=0
value=s10000,24
volume=255
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(16)=100
value=s10000,29
volume=255
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(16)=100
value=s10000,30
volume=255
ignorehitpause=1



;画面色レイヤー、下。
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(1)<=59
anim=11000
trans=addalpha
alpha=floor(256*sin((pi/2/60)*animelemtime(1))),floor(256*cos((pi/2/60)*animelemtime(1)))
scale=1,1
pos=0,0
postype=back
vel=0,0
accel=0,0
removetime=-2
sprpriority=-2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(1)>=60&&animelemtime(16)<=99999
anim=11000
trans=addalpha
alpha=256,0
scale=1,1
pos=0,0
postype=back
vel=0,0
accel=0,0
removetime=-2
sprpriority=-2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1



;画面揺らし。
[state ]
type=envshake
trigger1=animelemtime(1)>=0&&animelemtime(1)<=19
time=2
freq=180
ampl=floor(80*sin((pi/2/20)*animelemtime(1))*sin((pi/2/0.7)*(gametime%1000)))
phase=90
ignorehitpause=1
[state ]
type=envshake
trigger1=animelemtime(1)>=20&&animelemtime(16)<=-1
time=2
freq=180
ampl=floor(3*sin((pi/2/0.7)*(gametime%1000)))
phase=90
ignorehitpause=1
[state ]
type=envshake
trigger1=animelemtime(16)>=0&&animelemtime(16)<=29
time=2
freq=180
ampl=floor(80*sin((pi/2/30)*animelemtime(16))*sin((pi/2/0.7)*(gametime%1000)))
phase=90
ignorehitpause=1
[state ]
type=envshake
trigger1=animelemtime(16)>=100&&animelemtime(16)<=129
time=2
freq=180
ampl=floor(10*sin((pi/2/30)*(animelemtime(16)-100))*sin((pi/2/0.7)*(gametime%1000)))
phase=90
ignorehitpause=1



;色変更。
[state ]
type=afterimage
trigger1=animelemtime(1)=0
time=var(1)
length=60
timegap=30
framegap=1
palcolor=256
palinvertall=0
palbright=0,0,0
palcontrast=0,0,0
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1
trans=add1
ignorehitpause=1
[state ]
type=afterimage
trigger1=animelemtime(16)=0
time=0
ignorehitpause=1
[state ]
type=trans
trigger1=animelemtime(1)>=0&&animelemtime(1)<=var(1)-31
trans=addalpha
alpha=floor(256*cos((pi/2/(var(1)-30))*animelemtime(1))),0
ignorehitpause=1
[state ]
type=trans
trigger1=animelemtime(16)>=-30&&animelemtime(16)<=-1
trans=addalpha
alpha=0,0
ignorehitpause=1



;落下制御。
[state ]
type=velset
trigger1=animelemtime(1)=0
x=-0.8
y=((var(2)+40-pos y)/var(1))-0.5*var(1)*fvar(0)
ignorehitpause=1
[state ]
type=veladd
trigger1=animelemtime(1)>=0&&animelemtime(1)<=var(1)-1
y=fvar(0)
ignorehitpause=1
[state ]
type=velset
trigger1=animelemtime(16)>=0&&animtime<=-1
x=0
y=0
ignorehitpause=1
[state ]
type=posset
trigger1=animelemtime(16)=0
y=0
ignorehitpause=1



;スペルブレイク。
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(1)<=19
trigger1=animelemtime(1)%3=0
anim=10310
scale=2,2
pos=0,-44
random=100,100
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(1)<=19
anim=ifelse(var(55)%18>=0&&var(55)%18<=9,10190+var(55)%18,70190-10+var(55)%18)
scale=1,1
pos=0,-44
random=100,100
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483646
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(1)<=19
anim=10370
scale=0.1,0.1
pos=0,-44
random=10,10
vel=(6+6*cos(random))*cos(var(55)),(6+6*cos(random))*sin(var(55))
accel=0,0
removetime=-2
sprpriority=214748345
ontop=1
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1



;おかしなオーラ。
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(16)<=-1
anim=10100
trans=addalpha
alpha=0,128
scale=0.11*(0.7+0.1*cos(var(55))),0.11*(0.7+0.1*cos(var(55)))
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1

;飛散する闇。
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(16)<=-1
trigger1=animelemtime(1)%2=0
anim=10034
scale=0.6,0.6
pos=0,-44
vel=(3+6*cos(random))*cos(var(55)),(3+6*cos(random))*sin(var(55))
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1



;黒い煙幕的な爆発的な。
[state ]
type=explod
trigger1=animelemtime(16)>=-4&&animelemtime(16)<=-1
anim=10070
scale=0.123*1.2*sin((pi/2/20)*(animelemtime(16)+5)),0.123*1.2*sin((pi/2/20)*(animelemtime(16)+5))
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)>=0&&animelemtime(16)<=34
anim=10070
scale=0.123*1.2*sin((pi/2/20)*(animelemtime(16)+5)),0.123*1.2*sin((pi/2/20)*(animelemtime(16)+5))
pos=0,-44+var(2)+40
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1

;爆発。
[state ]
type=explod
trigger1=animelemtime(16)=0
anim=10890
scale=1,1
pos=0,-44+var(2)+40
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)>=0&&animelemtime(16)<=24
anim=10100
trans=addalpha
alpha=0,128+floor(128*sin((pi/2/25)*animelemtime(16)))
scale=0.11*(0.7+0.3*animelemtime(16)),0.11*(0.7+0.3*animelemtime(16))
pos=0,-44+var(2)+40
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)>=0&&animelemtime(16)<=24
anim=10100
trans=addalpha
alpha=floor(256*cos((pi/2/25)*animelemtime(16))),floor(256*sin((pi/2/25)*animelemtime(16)))
scale=0.11*(0.7+0.3*animelemtime(16)),0.11*(0.7+0.3*animelemtime(16))
pos=0,-44+var(2)+40
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1

;雷。
[state ]
type=explod
trigger1=animelemtime(16)=0
anim=10780
scale=1,1
pos=0,-44+var(2)+40
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)=0
anim=10800
scale=1,1
pos=0,-44+var(2)+40
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1

;カス。
[state ]
type=explod
trigger1=animelemtime(16)>=0&&animelemtime(16)<=34
trigger1=animelemtime(16)%2=0
anim=10034
scale=0.6,0.6
pos=0,-44+var(2)+40
vel=(3+6*cos(random))*cos(var(55)),(3+6*cos(random))*sin(var(55))
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1



;オーラが集まる。
[state ]
type=explod
trigger1=animelemtime(16)>=50&&animelemtime(16)<=99
anim=10100
trans=addalpha
alpha=0,floor(256*cos((pi/2/50)*(animelemtime(16)-50)))
scale=0.11*4*cos((pi/2/50)*(animelemtime(16)-50)),0.11*4*cos((pi/2/50)*(animelemtime(16)-50))
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1



;爆発。
[state ]
type=explod
trigger1=animelemtime(16)>=100&&animelemtime(16)<=149
anim=10101
trans=addalpha
alpha=floor(256*cos((pi/2/50)*(animelemtime(16)-100))),floor(256*sin((pi/2/50)*(animelemtime(16)-100)))
scale=0.11*4*sin((pi/2/50)*(animelemtime(16)-100)),0.11*4*sin((pi/2/50)*(animelemtime(16)-100))
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)>=120&&animelemtime(16)<=169
anim=10101
trans=addalpha
alpha=floor(256*cos((pi/2/50)*(animelemtime(16)-120))),floor(256*sin((pi/2/50)*(animelemtime(16)-120)))
scale=0.11*4*sin((pi/2/50)*(animelemtime(16)-120)),0.11*4*sin((pi/2/50)*(animelemtime(16)-120))
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1

;雷。
[state ]
type=explod
trigger1=animelemtime(16)=100
anim=10780
scale=1,1
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)=100
anim=10800
scale=1,1
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1

;火柱。
[state ]
type=explod
trigger1=animelemtime(16)=100
anim=10841
scale=0.7,0.7
pos=0,floor(-pos y)
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)=100
anim=10850
scale=1,1
pos=0,floor(-pos y)
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(16)>=100&&animelemtime(16)<=109
anim=10860
random=10,0
scale=0.5,1
pos=0,floor(-pos y+30)
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1

;カス。
[state ]
type=explod
trigger1=animelemtime(16)>=100&&animelemtime(16)<=134
trigger1=animelemtime(16)%2=0
anim=10034
scale=0.6,0.6
pos=0,0
vel=(3+6*cos(random))*cos(var(55)),(3+6*cos(random))*sin(var(55))
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1



;アメジスト。
[state ]
type=null;explod
trigger1=animelemtime(16)>=0&&animelemtime(16)<=999
trigger1=animelemtime(16)%30=0
anim=10811
scale=0.2,0.2
pos=0,-44
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
ignorehitpause=1



;帰還、する。
[state ]
type=changestate
trigger1=animtime=0
value=0
ctrl=1
persistent=256
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(7)>=40&&animelemtime(7)<=80
value=s10000,3
freqmul=0.5+0.02*(animelemtime(7)-40)
volume=-100
ignorehitpause=1