[statedef 40]
type=s
physics=s
anim=40
ctrl=0
sprpriority=1

[state ]
type=varset
trigger1=time=0
sysvar(1)=0
[state ]
type=varset
trigger1=var(20)=0
trigger1=command="holdfwd"
trigger2=var(20)!=0
sysvar(1)=1
[state ]
type=varset
trigger1=var(20)=0
trigger1=command="holdback"
sysvar(1)=-1



[state ]
type=playsnd
triggerall=animtime=0
trigger1=sysvar(1)=0
value=s3,0
volume=255
[state ]
type=playsnd
triggerall=animtime=0
trigger1=sysvar(1)!=0
value=s3,1
volume=255



[state ]
type=velset
trigger1=animtime=0
x=ifelse(sysvar(1)=0,const(velocity.jump.neu.x),ifelse(sysvar(1)=1,const(velocity.jump.fwd.x),const(velocity.jump.back.x)))
y=const(velocity.jump.y)
[state ]
type=velset
trigger1=animtime=0
trigger1=prevstateno=100
trigger1=sysvar(1)=1
x=const(velocity.runjump.fwd.x)



[state ]
type=explod
triggerall=animtime=0
trigger1=1
anim=21310
pos=0,-15
scale=1,1
sprpriority=6
ownpal=1



[state ]
type=changestate
trigger1=animtime=0
value=50
ctrl=1



[statedef 52]
type=s
physics=s
ctrl=0
anim=47

[state ]
type=ctrlset
trigger1=time=3
trigger2=prevstateno=600
trigger3=prevstateno=610
trigger4=prevstateno=630
trigger5=prevstateno=640
trigger6=prevstateno=650
value=1



[state ]
type=playsnd
trigger1=time=0
value=s4,0
volume=255



[state ]
type=velset
trigger1=time=0
y=0
[state ]
type=posset
trigger1=time=0
y=0



[state ]
type=explod
trigger1=time=0
anim=21320
pos=0,-5
scale=1,1
sprpriority=-6
ownpal=1



[state ]
type=changestate
trigger1=animtime=0
value=0
ctrl=1



[statedef 100]
type=s
physics=n
sprpriority=1

[state ]
type=changeanim
trigger1=anim!=stateno
value=stateno



[state ]
type=nothitby
trigger1=animelemtime(1)=[0,7]
value=sca



[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s3,2
freqmul=1.8
volume=255
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s5110,1
freqmul=0.8
volume=255
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s5110,1
freqmul=1.2
volume=255



[state ]
type=envshake
trigger1=animelemtime(1)=0
time=3
ampl=5
freq=165



[state ]
type=afterimage
trigger1=animelemtime(1)=0
time=1
length=8
framegap=1
palbright=0,0,0
palcontrast=256,256,256
paladd=-16,-16,-16
palmul=1,1,1
palinvertall=0
trans=add1
[state ]
type=afterimagetime
trigger1=1
time=2



[state ]
type=veladd
trigger1=animelemtime(1)=[0,14]
x=0.65
[state ]
type=playerpush
trigger1=1
value=0
[state ]
type=assertspecial
trigger1=1
flag=noautoturn
flag2=nowalk



[state ]
type=explod
trigger1=animelemtime(1)=0
anim=21020
facing=-1
pos=120,-20
scale=1,1
sprpriority=6
ownpal=1
[state ]
type=explod
trigger1=animelemtime(1)=0
anim=21020
trans=sub
facing=-1
pos=100,-20
scale=0.7,0.7
sprpriority=7
ownpal=1



[state ]
type=changestate
trigger1=var(20)=0
trigger1=command!="holdfwd"
trigger2=var(20)!=0
trigger2=animelemtime(1)>=40
value=101

[statedef 101]
type=s
physics=s
anim=101
sprpriority=1

[state ]
type=changestate
trigger1=animtime=0
value=0
ctrl=1



[statedef 105]
type=s
physics=n
sprpriority=1

[state ]
type=changeanim
trigger1=anim!=stateno
value=stateno



[state ]
type=nothitby
trigger1=animelemtime(1)=[0,7]
value=sca



[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s3,2
freqmul=1.8
volume=255
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s5110,1
freqmul=0.8
volume=255
[state ]
type=playsnd
trigger1=animelemtime(1)=0
value=s5110,1
freqmul=1.2
volume=255



[state ]
type=envshake
trigger1=animelemtime(1)=0
time=3
ampl=5
freq=165



[state ]
type=afterimage
trigger1=animelemtime(1)=0
time=1
length=8
framegap=1
palbright=0,0,0
palcontrast=256,256,256
paladd=-16,-16,-16
palmul=1,1,1
palinvertall=0
trans=add1
[state ]
type=afterimagetime
trigger1=1
time=2



[state ]
type=veladd
trigger1=animelemtime(1)=[0,14]
x=-0.65
[state ]
type=playerpush
trigger1=1
value=0
[state ]
type=assertspecial
trigger1=1
flag=noautoturn
flag2=nowalk




[state ]
type=explod
trigger1=animelemtime(1)=0
anim=21020
facing=1
pos=-120,-20
scale=1,1
sprpriority=6
ownpal=1
[state ]
type=explod
trigger1=animelemtime(1)=0
anim=21020
trans=sub
facing=1
pos=-100,-20
scale=0.7,0.7
sprpriority=7
ownpal=1



[state ]
type=changestate
trigger1=var(20)=0
trigger1=command!="holdback"
trigger2=var(20)!=0
trigger2=animelemtime(1)>=40
value=106

[statedef 106]
type=s
physics=s
anim=106
sprpriority=1

[state ]
type=changestate
trigger1=animtime=0
value=0
ctrl=1



[statedef 120]
type=u
physics=u
[state ]
type=changeanim
trigger1=time=0
value=120+(statetype=c)+(statetype=a)*2
[state ]
type=statetypeset
trigger1=time=0&&statetype=s
physics=s
[state ]
type=statetypeset
trigger1=time=0&&statetype=c
physics=c
[state ]
type=statetypeset
trigger1=time=0&&statetype=a
physics=a
[state ]
type=statetypeset
triggerall=statetype=s
trigger1=var(20)=0
trigger1=command="holddown"
statetype=c
physics=c
[state ]
type=statetypeset
triggerall=statetype=c
trigger1=var(20)=0
trigger1=command!="holddown"
statetype=s
physics=s
[state ]
type=changestate
trigger1=animtime=0
value=130+(statetype=c)+(statetype=a)*2
[state ]
type=changestate
trigger1=var(20)=0
trigger1=command!="holdback"
trigger2=var(20)!=0
trigger2=!inguarddist
value=140
[statedef 130]
type=s
physics=s
[state ]
type=changeanim
trigger1=anim!=130
value=130
[state ]
type=changestate
trigger1=var(20)=0
trigger1=command="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=c
value=131
[state ]
type=changestate
trigger1=var(20)=0
trigger1=command!="holdback"
trigger2=var(20)!=0
trigger2=!inguarddist
value=140
[statedef 131]
type=c
physics=c
[state ]
type=changeanim
trigger1=anim!=131
value=131
[state ]
type=changestate
trigger1=var(20)=0
trigger1=command!="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=s
value=130
[state ]
type=changestate
trigger1=var(20)=0
trigger1=command!="holdback"
trigger2=var(20)!=0
trigger2=!inguarddist
value=140
[statedef 132]
type=a
physics=n
[state ]
type=changeanim
trigger1=anim!=132
value=132
[state ]
type=veladd
trigger1=1
y=const(movement.yaccel)
[state ]
type=varset
trigger1=1
sysvar(0)=(pos y>=0)&&(vel y>0)
[state ]
type=velset
trigger1=sysvar(0)
y=0
[state ]
type=posset
trigger1=sysvar(0)
y=0
[state ]
type=changestate
trigger1=sysvar(0)
trigger1=var(20)=0
trigger1=command="holdback"
trigger1=inguarddist
value=130
[state ]
type=changestate
trigger1=sysvar(0)
value=52
[state ]
type=changestate
trigger1=var(20)=0
trigger1=command!="holdback"
trigger2=var(20)!=0
trigger2=!inguarddist
value=140
[statedef 140]
type=u
physics=u
ctrl=1
[state ]
type=changeanim
trigger1=time=0
value=140+(statetype=c)+(statetype=a)*2
[state ]
type=statetypeset
trigger1=time=0&&statetype=s
physics=s
[state ]
type=statetypeset
trigger1=time=0&&statetype=c
physics=c
[state ]
type=statetypeset
trigger1=time=0&&statetype=a
physics=a
[state ]
type=statetypeset
triggerall=statetype=s
trigger1=var(20)=0
trigger1=command="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=c
statetype=c
physics=c
[state ]
type=statetypeset
triggerall=statetype=c
trigger1=var(20)=0
trigger1=command!="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=s
statetype=s
physics=s
[statedef 150]
type=s
movetype=h
physics=n
velset=0,0
[state ]
type=changeanim
trigger1=1
value=150
[state ]
type=changestate
trigger1=hitshakeover
trigger1=var(20)=0
value=151+2*(command="holddown")
[state ]
type=changestate
trigger1=hitshakeover
trigger1=var(20)!=0
value=151+2*(enemynear,statetype=c)
[state ]
type=statetypeset
triggerall=statetype=s
trigger1=var(20)=0
trigger1=command="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=c
statetype=c
physics=c
[state ]
type=statetypeset
triggerall=statetype=c
trigger1=var(20)=0
trigger1=command!="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=s
statetype=s
physics=s
[state ]
type=forcefeedback
trigger1=time=0
waveform=square
time=3
[statedef 151]
type=s
movetype=h
physics=s
anim=150
[state ]
type=hitvelset
trigger1=time=0
x=1
[state ]
type=velset
trigger1=time=gethitvar(slidetime)
trigger2=hitover
x=0
[state ]
type=ctrlset
trigger1=time=gethitvar(ctrltime)
value=1
[state ]
type=statetypeset
triggerall=statetype=s
trigger1=var(20)=0
trigger1=command="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=c
statetype=c
physics=c
[state ]
type=statetypeset
triggerall=statetype=c
trigger1=var(20)=0
trigger1=command!="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=s
statetype=s
physics=s
[state ]
type=changestate
trigger1=hitover
value=130
ctrl=1
[statedef 152]
type=c
movetype=h
physics=n
velset=0,0
[state ]
type=changeanim
trigger1=1
value=151
[state ]
type=changestate
trigger1=hitshakeover
trigger1=var(20)=0
value=151+2*(command="holddown")
[state ]
type=changestate
trigger1=hitshakeover
trigger1=var(20)!=0
value=151+2*(enemynear,statetype=c)
[state ]
type=statetypeset
triggerall=statetype=s
trigger1=var(20)=0
trigger1=command="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=c
statetype=c
physics=c
[state ]
type=statetypeset
triggerall=statetype=c
trigger1=var(20)=0
trigger1=command!="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=s
statetype=s
physics=s
[state ]
type=forcefeedback
trigger1=time=0
waveform=square
time=4
[statedef 153]
type=c
movetype=h
physics=c
anim=151
[state ]
type=hitvelset
trigger1=time=0
x=1
[state ]
type=velset
trigger1=time=gethitvar(slidetime)
trigger2=hitover
x=0
[state ]
type=ctrlset
trigger1=time=gethitvar(ctrltime)
value=1
[state ]
type=statetypeset
triggerall=statetype=s
trigger1=var(20)=0
trigger1=command="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=c
statetype=c
physics=c
[state ]
type=statetypeset
triggerall=statetype=c
trigger1=var(20)=0
trigger1=command!="holddown"
trigger2=var(20)!=0
trigger2=enemynear,statetype=s
statetype=s
physics=s
[state ]
type=changestate
trigger1=hitover
value=131
ctrl=1
[statedef 154]
type=a
movetype=h
physics=n
velset=0,0
[state ]
type=changeanim
trigger1=1
value=152
[state ]
type=changestate
trigger1=hitshakeover
value=155
[state ]
type=forcefeedback
trigger1=time=0
waveform=square
time=4
[statedef 155]
type=a
movetype=h
physics=n
anim=152
[state ]
type=hitvelset
trigger1=time=0
x=1
y=1
[state ]
type=veladd
trigger1=1
y=const(movement.yaccel)
[state ]
type=ctrlset
trigger1=time=gethitvar(ctrltime)
value=1
[state ]
type=varset
trigger1=1
sysvar(0)=(pos y>=0)&&(vel y>0)
[state ]
type=velset
trigger1=sysvar(0)
y=0
[state ]
type=posset
trigger1=sysvar(0)
y=0
[state ]
type=changestate
trigger1=sysvar(0)
trigger1=var(20)=0
trigger1=command="holdback"
trigger1=inguarddist
value=130
[state ]
type=changestate
trigger1=sysvar(0)
value=52



[statedef 190]
type=s
ctrl=0
velset=0,0

[state ]
type=changeanim
trigger1=anim!=stateno
value=stateno



[state ]
type=playsnd
trigger1=animelemtime(1)=30
value=s10,31
freqmul=1
volume=255
channel=0
[state ]
type=playsnd
trigger1=animelemtime(4)=0
value=s3,0
freqmul=1
volume=0



[state ]
type=assertspecial
trigger1=1
flag=intro



[state ]
type=offset
triggerall=var(40)=0
trigger1=animelemtime(1)>=0&&animelemtime(4)<=-1
x=-6*facing
[state ]
type=offset
triggerall=var(40)=0
trigger1=animelemtime(4)=[0,9]
x=facing*(-6+0.4*animelemtime(4))
y=-2*sin((pi/10)*animelemtime(4))
[state ]
type=offset
triggerall=var(40)=0
trigger1=animelemtime(4)=[10,29]
x=facing*(-2+2*sin((pi/2/20)*(animelemtime(4)-10)))



[state ]
type=explod
trigger1=animelemtime(4)=0
anim=21020
facing=-1
pos=120-85,-20
scale=0.75*0.75,0.75*0.75
sprpriority=6
ownpal=1
[state ]
type=explod
trigger1=animelemtime(4)=0
anim=21020
trans=sub
facing=-1
pos=100-85,-20
scale=0.7*0.75*0.75,0.7*0.75*0.75
sprpriority=7
ownpal=1



[state ]
type=changestate
trigger1=animtime=0
value=0



[statedef 180]
type=s
ctrl=0
velset=0,0

[state ]
type=changeanim
trigger1=anim!=stateno
value=stateno



[state ]
type=playsnd
trigger1=animelemtime(1)=20
value=s10,35
freqmul=1
volume=255
channel=0



[state ]
type=assertspecial
trigger1=animelemtime(1)>=0&&animelemtime(13)<=74
flag=roundnotover



[statedef 5150]
type=l
movetype=h
physics=n
sprpriority=-3
[state ]
type=changeanim
triggerall=time=0
triggerall=selfanimexist(5140)
trigger1=(anim!=[5111,5119])&&(anim!=[5171,5179])
trigger2=!selfanimexist(5140+(anim%10))
value=5140
[state ]
type=changeanim
trigger1=time=0
trigger1=(anim=[5111,5119])||(anim=[5171,5179])
trigger1=selfanimexist(5140+(anim%10))
value=5140+(anim%10)
[state ]
type=changeanim
persistent=0
trigger1=matchover=1
trigger1=anim=[5140,5149]
trigger1=selfanimexist(anim+10)
value=anim+10
[state ]
type=changeanim
trigger1=time=0
trigger1=anim!=[5140,5159]
trigger1=anim!=[5110,5119]
value=5110
[state ]
type=nothitby
trigger1=1
value=sca
time=1
[state ]
type=screenbound
trigger1=name!="Kagerou Akagane"
value=0
movecamera=0,0
[state ]
type=velmul
trigger1=1
x=0.85
[state ]
type=velset
trigger1=vel x<.05
persistent=0
x=0









