[statedef 6300]
type=u
movetype=u
hitdefpersist=1
movehitpersist=1
[state ]
type=changestate
trigger1=!ishelper
trigger1=sysvar(0)%257000!=256007
trigger2=ishelper
trigger2=root,sysvar(0)%257000!=256007
value=1836769491
persistent=256
ignorehitpause=1

;基本設定。
[state ]
type=changeanim
triggerall=var(50)=stateno
trigger1=anim!=var(50)
value=var(50)
ignorehitpause=1



;ループ処理。
[state ]
type=null
triggerall=var(50)=stateno
trigger1=1||var(21):=80
trigger1=1||var(22):=435
trigger1=1||fvar(0):=0.5*facing*(enemynear,screenpos x+enemynear,const(size.mid.pos.x)-screenpos x)||fvar(1):=-80
ignorehitpause=1
[state ]
type=changestate
triggerall=var(50)=stateno
triggerall=1||var(20):=0
triggerall=1||var(23):=60
trigger1=animelemtime(1)=0
value=6301
persistent=256
ignorehitpause=1
[state ]
type=null
triggerall=var(50)!=stateno
trigger1=1||var(50):=stateno
ignorehitpause=1



;基本設定（逆順処理）。
[state ]
type=statetypeset
trigger1=1
statetype=s
movetype=a
ignorehitpause=1



;音響。
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s6300,0
freqmul=1.0
volume=255
channel=11
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s6300,0
freqmul=1.0
volume=255
channel=12
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s6300,1
freqmul=1.0
volume=255
channel=13
ignorehitpause=1



;物理演算。
[state ]
type=velset
trigger1=1
x=vel x*((statetype=s)*const(movement.stand.friction)+(statetype=c||statetype=l)*const(movement.crouch.friction)+(statetype=a))
y=vel y+(statetype=a)*const(movement.yaccel)
ignorehitpause=1



;手元から溢れる光。
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(1)<=19
trigger1=animelemtime(1)%2=0
id=var(50)
anim=13005
;trans=addalpha
;alpha=256,256
facing=1
vfacing=1
scale=(2-var(45))*0.5*0.5,(2-var(45))*0.5*0.5
shadow=0,0,0
sprpriority=20
ontop=0
ownpal=1
supermove=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
removetime=-2
removeongethit=0
pos=40,-55
postype=p1
random=0,0
bindtime=1
vel=3*cos(var(58)),3*sin(var(58))
accel=-0.3,0
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(1)>=0&&animelemtime(1)<=19
trigger1=animelemtime(1)%2=0
id=var(50)
anim=13000
;trans=addalpha
;alpha=256,256
facing=1
vfacing=1
scale=(2-var(45))*0.5*0.3,(2-var(45))*0.5*0.3
shadow=0,0,0
sprpriority=21
ontop=0
ownpal=1
supermove=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
removetime=-2
removeongethit=0
pos=40,-55
postype=p1
random=0,0
bindtime=1
vel=3*cos(var(58)),3*sin(var(58))
accel=-0.2,0
ignorehitpause=1



;太陽月。
[state ]
type=explod
trigger1=animelemtime(1)=0
id=var(50)
anim=10350
;trans=addalpha
;alpha=256,256
facing=1
vfacing=1
scale=(2-var(45))*0.5*0.5,(2-var(45))*0.5*0.5
shadow=0,0,0
sprpriority=28
ontop=0
ownpal=1
supermove=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
removetime=-2
removeongethit=0
pos=floor(fvar(0)+var(21)*cos(pi*var(22)/180)),floor(fvar(1)+var(21)*sin(pi*var(22)/180))
postype=p1
random=0,0
bindtime=1
vel=0,0
accel=0,0
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(1)=0
id=var(50)
anim=10351
;trans=addalpha
;alpha=256,256
facing=1
vfacing=1
scale=(2-var(45))*0.5*0.5*0.7,(2-var(45))*0.5*0.5*0.7
shadow=0,0,0
sprpriority=29
ontop=0
ownpal=1
supermove=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
removetime=-2
removeongethit=0
pos=floor(fvar(0)+var(21)*cos(pi*var(22)/180)),floor(fvar(1)+var(21)*sin(pi*var(22)/180))
postype=p1
random=0,0
bindtime=1
vel=0,0
accel=0,0
ignorehitpause=1

[state ]
type=explod
trigger1=animelemtime(1)=0
id=var(50)
anim=10360
;trans=addalpha
;alpha=256,256
facing=1
vfacing=1
scale=(2-var(45))*0.5*0.5,(2-var(45))*0.5*0.5
shadow=0,0,0
sprpriority=30
ontop=0
ownpal=1
supermove=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
removetime=-2
removeongethit=0
pos=floor(fvar(0)+var(21)*cos(pi*(var(22)+180)/180)),floor(fvar(1)+var(21)*sin(pi*(var(22)+180)/180))
postype=p1
random=0,0
bindtime=1
vel=0,0
accel=0,0
ignorehitpause=1
[state ]
type=explod
trigger1=animelemtime(1)=0
id=var(50)
anim=10361
;trans=addalpha
;alpha=256,256
facing=1
vfacing=1
scale=(2-var(45))*0.5*0.5*0.7,(2-var(45))*0.5*0.5*0.7
shadow=0,0,0
sprpriority=31
ontop=0
ownpal=1
supermove=0
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
removetime=-2
removeongethit=0
pos=floor(fvar(0)+var(21)*cos(pi*(var(22)+180)/180)),floor(fvar(1)+var(21)*sin(pi*(var(22)+180)/180))
postype=p1
random=0,0
bindtime=1
vel=0,0
accel=0,0
ignorehitpause=1



;ステート番号保存変数セット。
[state ]
type=varset
triggerall=animtime=-1
trigger1=1||var(50):=11*(statetype=c||statetype=l)+50*(statetype=a)
trigger1=ishelper(103000)
sysvar(0)=var(50)
ignorehitpause=1

[statedef 6301]
type=u
movetype=u
hitdefpersist=1
movehitpersist=1
[state ]
type=changestate
trigger1=!ishelper
trigger1=sysvar(0)%257000!=256007
trigger2=ishelper
trigger2=root,sysvar(0)%257000!=256007
value=1836769491
persistent=256
ignorehitpause=1

;オサレなスフィア。
[state ]
type=projectile
triggerall=var(20)=[0,var(23)-1]
triggerall=var(20)%2=0
trigger1=1
projid=var(50)
projanim=40000
projremanim=13087
projhitanim=-1
projcancelanim=-1
projscale=(2-var(45))*0.5*0.3,(2-var(45))*0.5*0.3
projsprpriority=22
projshadow=0,0,0
offset=floor(fvar(0)+var(21)*sin((pi/2/var(23))*var(20))*cos(pi*var(22)*sin((pi/2/var(23))*var(20))/180)),floor(fvar(1)+var(21)*sin((pi/2/var(23))*var(20))*sin(pi*var(22)*sin((pi/2/var(23))*var(20))/180))
postype=p1
velocity=0,0
accel=0,0
velmul=1,1
remvelocity=0,0
projremove=0
projremovetime=var(20)
projhits=1
projmisstime=1
projpriority=2147483647
projedgebound=16777215
projheightbound=-16777216,16777215
projstagebound=16777215
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
attr=s,np
hitflag=hlafdp
ignorehitpause=1
[state ]
type=projectile
triggerall=var(20)=[0,var(23)-1]
triggerall=var(20)%2=0
trigger1=1
projid=var(50)
projanim=40000
projremanim=13082
projhitanim=-1
projcancelanim=-1
projscale=(2-var(45))*0.5*0.2,(2-var(45))*0.5*0.2
projsprpriority=24
projshadow=0,0,0
offset=floor(fvar(0)+var(21)*sin((pi/2/var(23))*var(20))*cos(pi*var(22)*sin((pi/2/var(23))*var(20))/180)),floor(fvar(1)+var(21)*sin((pi/2/var(23))*var(20))*sin(pi*var(22)*sin((pi/2/var(23))*var(20))/180))
postype=p1
velocity=0,0
accel=0,0
velmul=1,1
remvelocity=0,0
projremove=0
projremovetime=var(20)
projhits=1
projmisstime=1
projpriority=2147483647
projedgebound=16777215
projheightbound=-16777216,16777215
projstagebound=16777215
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
attr=s,np
hitflag=hlafdp
ignorehitpause=1
[state ]
type=projectile
triggerall=var(20)=[0,var(23)-1]
triggerall=var(20)%2=0
trigger1=1
projid=var(50)
projanim=40000
projremanim=13000
projhitanim=-1
projcancelanim=-1
projscale=(2-var(45))*0.5*0.2,(2-var(45))*0.5*0.2
projsprpriority=26
projshadow=0,0,0
offset=floor(fvar(0)+var(21)*sin((pi/2/var(23))*var(20))*cos(pi*var(22)*sin((pi/2/var(23))*var(20))/180)-3*cos(var(58))*var(20)),floor(fvar(1)+var(21)*sin((pi/2/var(23))*var(20))*sin(pi*var(22)*sin((pi/2/var(23))*var(20))/180)-3*sin(var(58))*var(20))
postype=p1
velocity=3*cos(var(58)),3*sin(var(58))
accel=0,0
velmul=1,1
remvelocity=3*cos(var(58)),3*sin(var(58))
projremove=0
projremovetime=var(20)
projhits=1
projmisstime=1
projpriority=2147483647
projedgebound=16777215
projheightbound=-16777216,16777215
projstagebound=16777215
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
attr=s,np
hitflag=hlafdp
ignorehitpause=1

[state ]
type=null
trigger1=1||fvar(2):=floor(fvar(0)+var(21)*sin((pi/2/var(23))*var(20))*cos(pi*(var(22)*sin((pi/2/var(23))*var(20))+180)/180))
trigger1=1||fvar(3):=floor(fvar(1)+var(21)*sin((pi/2/var(23))*var(20))*sin(pi*(var(22)*sin((pi/2/var(23))*var(20))+180)/180))
ignorehitpause=1
[state ]
type=projectile
triggerall=var(20)=[0,var(23)-1]
triggerall=var(20)%2=0
trigger1=1
projid=var(50)
projanim=40000
projremanim=13082
projhitanim=-1
projcancelanim=-1
projscale=(2-var(45))*0.5*0.3,(2-var(45))*0.5*0.3
projsprpriority=23
projshadow=0,0,0
offset=floor(fvar(2)),floor(fvar(3))
postype=p1
velocity=0,0
accel=0,0
velmul=1,1
remvelocity=0,0
projremove=0
projremovetime=var(20)
projhits=1
projmisstime=1
projpriority=2147483647
projedgebound=16777215
projheightbound=-16777216,16777215
projstagebound=16777215
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
attr=s,np
hitflag=hlafdp
ignorehitpause=1
[state ]
type=projectile
triggerall=var(20)=[0,var(23)-1]
triggerall=var(20)%2=0
trigger1=1
projid=var(50)
projanim=40000
projremanim=13087
projhitanim=-1
projcancelanim=-1
projscale=(2-var(45))*0.5*0.2,(2-var(45))*0.5*0.2
projsprpriority=25
projshadow=0,0,0
offset=floor(fvar(2)),floor(fvar(3))
postype=p1
velocity=0,0
accel=0,0
velmul=1,1
remvelocity=0,0
projremove=0
projremovetime=var(20)
projhits=1
projmisstime=1
projpriority=2147483647
projedgebound=16777215
projheightbound=-16777216,16777215
projstagebound=16777215
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
attr=s,np
hitflag=hlafdp
ignorehitpause=1
[state ]
type=projectile
triggerall=var(20)=[0,var(23)-1]
triggerall=var(20)%2=0
trigger1=1
projid=var(50)
projanim=40000
projremanim=13005
projhitanim=-1
projcancelanim=-1
projscale=(2-var(45))*0.5*0.2,(2-var(45))*0.5*0.2
projsprpriority=27
projshadow=0,0,0
offset=floor(fvar(2)-3*cos(var(58))*var(20)),floor(fvar(3)-3*sin(var(58))*var(20))
postype=p1
velocity=3*cos(var(58)),3*sin(var(58))
accel=0,0
velmul=1,1
remvelocity=3*cos(var(58)),3*sin(var(58))
projremove=0
projremovetime=var(20)
projhits=1
projmisstime=1
projpriority=2147483647
projedgebound=16777215
projheightbound=-16777216,16777215
projstagebound=16777215
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
attr=s,np
hitflag=hlafdp
ignorehitpause=1



;攻撃本体。
[state ]
type=projectile
triggerall=var(20)=[0,1]
trigger1=1
projid=var(50)
projanim=40230
projremanim=-1
projhitanim=-1
projcancelanim=-1
projscale=1,1
projsprpriority=-2147483648
projshadow=0,0,0
offset=floor(fvar(0)+var(21)*cos(pi*(var(22)+180*var(20))/180)),floor(fvar(1)+var(21)*sin(pi*(var(22)+180*var(20))/180))
postype=p1
velocity=0,0
accel=0,0
velmul=1,1
remvelocity=0,0
projremove=1
projremovetime=65+20
projhits=3
projmisstime=9
projpriority=2147483647
projedgebound=16777215
projheightbound=-16777216,16777215
projstagebound=16777215
pausemovetime=2147483647*var(54)
supermovetime=2147483647*var(54)
id=var(50)
chainid=-1
nochainid=-1
attr=s,np
hitflag=hlafdp
guardflag=hla
affectteam=e
priority=2147483647,h
hitonce=0
numhits=1
damage=20,2
fall.damage=0
getpower=50,25
givepower=0,10
kill=1
guard.kill=0
animtype=h
air.animtype=b
fall.animtype=b
ground.type=h
air.type=h
forcestand=0
;p1facing=1
p2facing=1
;p1getp2facing=0
palfx.time=0
pausetime=0,10
guard.pausetime=0,10
ground.hittime=10
air.hittime=20
guard.hittime=10
guard.ctrltime=30
airguard.ctrltime=30
ground.slidetime=0
guard.slidetime=0
fall.recover=0
fall.recovertime=2147483647
fall=1
air.fall=1
ground.velocity=-4,-4
air.velocity=-4,-4
;down.velocity=0,0
;guard.velocity=0
;airguard.velocity=0,0
yaccel=0.35
envshake.time=0
fall.envshake.time=0
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=-1
guardhitsound=-1
;air.juggle=0
;sprpriority=1
;p1stateno=50
;p2stateno=5050
;p2getp1state=1
;down.hittime=0
;down.bounce=0
;fall.kill=1
;guard.dist=const(size.attack.dist)
;mindist=-16777216,-16777215
;maxdist=16777216,16777215
;snap=0,0
ignorehitpause=1



;ランダム変数セット。
[state ]
type=varset
trigger1=1
var(58)=random
ignorehitpause=1



;ループ処理。
[state ]
type=changestate
triggerall=1||var(50):=stateno
trigger1=1||var(20):=var(20)+1
value=ifelse((var(20)=[1,var(21)-1]),stateno,6300)
persistent=256
ignorehitpause=1