
[statedef 310]
type=s
movetype=a
physics=s
ctrl=0
sprpriority=5

[state ]
type=changestate
triggerall=(sysfvar(0)=256006.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1
[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
persistent=256
ignorehitpause=1
[state ]
type=varset
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
sysvar(0)=stateno
ignorehitpause=1

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



;音響。
[state ]
type=playsnd
trigger1=animelemtime(5)>=0&&animelemtime(5)<=17
trigger1=animelemtime(5)%5=0
value=s300,1
channel=1
ignorehitpause=1
[state ]
type=playsnd
trigger1=animelemtime(5)>=0&&animelemtime(5)<=17
trigger1=animelemtime(5)%5=0
value=s10000,2
channel=2
ignorehitpause=1



;画面色レイヤー、上。
[state ]
type=explod
trigger1=animelemtime(5)>=0&&animelemtime(5)<=17
trigger1=animelemtime(5)%5=0
anim=11000
trans=addalpha
alpha=0,0
scale=1,1
pos=0,0
postype=back
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=1
pausemovetime=2147483647*ifelse(!ishelper,0,root,palno>=10&&root,palno<=12)
supermovetime=2147483647*ifelse(!ishelper,0,root,palno>=10&&root,palno<=12)
ignorehitpause=1

;画面揺らし。
[state ]
type=envshake
trigger1=animelemtime(5)>=0&&animelemtime(5)<=17
time=2
freq=180
ampl=(4-4*sin((pi/2/18)*animelemtime(5)))*ifelse(animelemtime(1)%2=0,1,-1)
phase=90
ignorehitpause=1



;var(0).........ループ用変数。
;var(1).........手から出る鎖の発生座標X。
;var(2).........手から出る鎖の発生座標Y。
;var(3).........鎖サイズ。
;var(4).........鎖が出る速さ/鎖のscale。
;var(5).........ダブルループ用変数。
;var(6).........鎖のベクトル調整。
;var(7).........ベクトルに合った鎖のアニメ。

[state ]
type=varset
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(1)=40
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(2)=-68
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(3)=12
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(4)=2
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(5)=0
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(6)=36-animelemtime(5)
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
triggerall=var(6)%36>=0&&var(6)%36<=9
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(7)=10400+var(6)
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
triggerall=var(6)%36>=10&&var(6)%36<=19
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(7)=70400-10+var(6)
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
triggerall=var(6)%36>=20&&var(6)%36<=29
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(7)=80400-20+var(6)
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
triggerall=var(6)%36>=30&&var(6)%36<=35
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(7)=90400-30+var(6)
ignorehitpause=1
[state ]
type=varset
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
var(0)=0
ignorehitpause=1
[state ]
type=changestate
triggerall=prevstateno!=311
trigger1=animelemtime(5)>=0&&animelemtime(5)<=9
trigger1=animelemtime(5)%2=0
value=311
ignorehitpause=1



;帰還、する。
[state ]
type=changestate
trigger1=animtime=0
value=0
ctrl=1
persistent=256
ignorehitpause=1

[statedef 311]

[state ]
type=changestate
triggerall=(sysfvar(0)=256006.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1
[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
persistent=256
ignorehitpause=1
[state ]
type=varset
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
sysvar(0)=stateno
ignorehitpause=1

[state ]
type=changestate
trigger1=var(0)<=-1
trigger2=var(0)>=floor(600/var(3)/var(4))+1
value=310
ignorehitpause=1



;さらにループ。
[state ]
type=changestate
triggerall=var(5)=0
trigger1=(animelemtime(5)-var(0))>=0&&(animelemtime(5)-var(0))<=floor(600/var(3)/var(4))
value=312
ignorehitpause=1
[state ]
type=varset
triggerall=var(5)!=0
trigger1=(animelemtime(5)-var(0))>=0&&(animelemtime(5)-var(0))<=floor(600/var(3)/var(4))
var(5)=0
ignorehitpause=1



;たいむ。
[state ]
type=varadd
trigger1=1
var(0)=1
ignorehitpause=1
[state ]
type=changestate
trigger1=var(0)>=1&&var(0)<=floor(600/var(3)/var(4))+1
value=stateno
persistent=256
ignorehitpause=1

[statedef 312]

[state ]
type=changestate
triggerall=(sysfvar(0)=256006.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1
[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
persistent=256
ignorehitpause=1
[state ]
type=varset
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
sysvar(0)=stateno
ignorehitpause=1



[state ]
type=changestate
trigger1=var(5)<=-1
trigger2=var(5)>=var(4)+1
value=311
ignorehitpause=1



;手から出る鎖の発生座標設定。
[state ]
type=explod
trigger1=(animelemtime(5)-var(0))>=0&&(animelemtime(5)-var(0))<=floor(600/var(3)/var(4))
trigger1=var(5)%2=0
anim=var(7)+20
scale=0.01*var(3),0.01*var(3)
pos=var(1)+var(3)*(var(4)*(animelemtime(5)-var(0))+var(5))*cos(pi*(var(6)%36)/18),var(2)+var(3)*(var(4)*(animelemtime(5)-var(0))+var(5))*sin(pi*(var(6)%36)/18)
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*ifelse(!ishelper,0,root,palno>=10&&root,palno<=12)
supermovetime=2147483647*ifelse(!ishelper,0,root,palno>=10&&root,palno<=12)
ignorehitpause=1
[state ]
type=explod
trigger1=(animelemtime(5)-var(0))>=0&&(animelemtime(5)-var(0))<=floor(600/var(3)/var(4))
trigger1=var(5)%2=1
anim=var(7)+30
scale=0.01*var(3),0.01*var(3)
pos=var(1)+var(3)*(var(4)*(animelemtime(5)-var(0))+var(5))*cos(pi*(var(6)%36)/18),var(2)+var(3)*(var(4)*(animelemtime(5)-var(0))+var(5))*sin(pi*(var(6)%36)/18)
vel=0,0
accel=0,0
removetime=-2
sprpriority=2147483647
ontop=0
pausemovetime=2147483647*ifelse(!ishelper,0,root,palno>=10&&root,palno<=12)
supermovetime=2147483647*ifelse(!ishelper,0,root,palno>=10&&root,palno<=12)
ignorehitpause=1



;たいむ。
[state ]
type=varadd
trigger1=1
var(5)=1
ignorehitpause=1
[state ]
type=changestate
trigger1=var(5)>=1&&var(5)<=var(4)+1
value=stateno
persistent=256
ignorehitpause=1
