; ____________________________________
;|Shin Gouki by Phantom.of.the.Server |
; ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;================================================================================================
;=======================================<HELPER STATES>==========================================
;================================================================================================

;========================<HITSPARKS>=============================
[Statedef 6000]
physics=N
velset=0,0
anim=9741
sprpriority=5
[State 6000, var]
type=varset
trigger1=!time
var(11)=parent,var(11)
ignorehitpause=1
[State 6000, reset]
type=parentvarset
trigger1=!time
var(11)=0
ignorehitpause=1

[State 6000, palfx]
type=palfx
trigger1=!time&&var(11)!=1
mul=384,256,256
time=300
ignorehitpause=1

[State 6000, guardspark]
type=explod
trigger1=!time&&var(11)=1
anim=6000
ID=6000
sprpriority=5
postype=p1
removetime=-2
scale=1,1
ignorehitpause=1
pausemovetime=300
supermovetime=300

[State 6000, spark]
type=explod
trigger1=!time&&var(11)>1
anim=ifelse(random<200,6001,ifelse(random<250,6002,ifelse(random<333,6003,ifelse(random<500,6004,6005))))
ID=6000
sprpriority=5
postype=p1
facing=-1+(random<500)*2
removetime=-2
scale=ifelse(var(11)=2,.4,ifelse(var(11)=3,.5,ifelse(var(11)=4,.6,ifelse(var(11)=5,.7,.8)))),ifelse(var(11)=2,.4,ifelse(var(11)=3,.5,ifelse(var(11)=4,.6,ifelse(var(11)=5,.7,.8))))
ignorehitpause=1
pausemovetime=300
supermovetime=300
[State 6000, spark2]
type=explod
trigger1=!time&&var(11)>1
anim=6006
ID=6000
sprpriority=5
postype=p1
facing=-1+(random<500)*2
removetime=-2
scale=ifelse(var(11)=2,.4,ifelse(var(11)=3,.5,ifelse(var(11)=4,.6,ifelse(var(11)=5,.7,.8)))),ifelse(var(11)=2,.4,ifelse(var(11)=3,.5,ifelse(var(11)=4,.6,ifelse(var(11)=5,.7,.8))))
ignorehitpause=1
pausemovetime=300
supermovetime=300

[State 6000, particles]
type=explod
trigger1=1
vel=ceil((-500+random)/50),ceil((-500+random)/50)
anim=ifelse(var(11)=1,6009,6008)
sprpriority=5
postype=p1
pos=0,0
random=30,30
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1.5,.2
pausemovetime=300
supermovetime=300
[State 6000, particles]
type=explod
trigger1=1
vel=ceil((-500+random)/50),ceil((-500+random)/50)
anim=ifelse(var(11)=1,6009,6008)
sprpriority=5
postype=p1
pos=0,0
random=30,30
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1.5,.2
pausemovetime=300
supermovetime=300

[State 6000, noshadow]
type=assertspecial
trigger1=1
flag=noshadow
flag2=invisible
ignorehitpause=1
[State 6000, bound]
type=screenbound
trigger1=1
value=0
[State 6000, end]
type=destroyself
trigger1=time=1


;========================<AI activation>=============================
;---by Winane---
[StateDef 9741]
anim=9741
ctrl=0
[State 9741, safety]
type=selfstate
trigger1=!ishelper
value=0
[State 9741, pausecheck]
type=varset
trigger1=(gametime>root,var(57))||!(root,alive)||(roundstate!=2)||root,var(58)
trigger2=var(3):=0
var(2)=(var(3):=1)+(var(4):=0)
[State 9741, facing]
type=turn
trigger1=(var(9):=(facing!=root,facing))
[State 9741, dirturnonAI]
type=parentvarset
triggerall=!var(3)&&!var(9)
trigger1=(root,command="holdfwd")||(root,command="holdback")||(root,command="holdup")||(root,command="holddown")
trigger2=!(var(4):=1)
var(58)=var(4)
[State 9741, dirturnoffAI]
type=parentvarset
triggerall=!var(3)&&parent,var(58)
trigger1=(command="holdfwd")&&(root,command="holdfwd")
trigger2=(command="holdback")&&(root,command="holdback")
trigger3=(command="holdup")&&(root,command="holdup")
trigger4=(command="holddown")&&(root,command="holddown")
var(58)=var(4):=0
[State 9741, buttonturnonAI]
type=parentvarset
triggerall=var(1)&&!var(2)
trigger1=(root,command="a")||(root,command="b")||(root,command="c")||(root,command="x")
trigger2=(root,command="y")||(root,command="z")||(root,command="start")
var(58)=1
[State 9741, buttonturnoffAI]
type=parentvarset
triggerall=!var(2)
trigger1=(command="a")&&(root,command="a")
trigger2=(command="b")&&(root,command="b")
trigger3=(command="c")&&(root,command="c")
trigger4=(command="x")&&(root,command="x")
trigger5=(command="y")&&(root,command="y")
trigger6=(command="z")&&(root,command="z")
trigger7=(command="start")&&(root,command="start")
var(58)=-1
[State 9741, unpausecheck]
type=varset
triggerall=var(2)
trigger1=(root,command="a")||(root,command="b")||(root,command="c")||(root,command="x")
trigger2=(root,command="y")||(root,command="z")||(root,command="start")
trigger3=var(2)=2
trigger3=var(2):=0
var(2)=2
[State 9741, end]
type=destroyself
triggerall=var(1):=1
trigger1=root,var(58)
trigger2=!(root,alive)
trigger3=roundstate!=2


;========================<GOU HADOU KEN>=============================
[Statedef 1005]
type=A
physics=N
movetype=A
anim=1005
ctrl=0
velset=0,0
sprpriority=4
juggle=5

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=1006
ignorehitpause=1
[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 1005, strengthvar]
type=varset
trigger1=!time
var(10)=root, var(10)
[State 1005, distvar]
type=varset
trigger1=!time
var(1)=floor(root, p2dist x)
[State 1005, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1

[State 1005, vel]
type=velset
trigger1=1
x=ifelse(var(10)=3,6,ifelse(var(10)=2,4.5,3))
y=0
[State 1005, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=3
palcontrast=120,90,150
trans=add

[State 1005, particles]
type=explod
trigger1=ifelse(var(10)=3,!(time%3),ifelse(var(10)=2,!(time%5),!(time%7)))
vel=-.5+(random<500),0
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=-40,0
random=10,30
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 1005, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 1005, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
persistent=0
ignorehitpause=1

[State 1005, hit]
type=hitdef
trigger1=1
priority=6,Hit
attr=S,SP
damage=ceil(ifelse(var(1)<100,100,90)*(1-root,fvar(10)+((root,fvar(11))*!(root,var(20)))+root,fvar(12))),5
animtype=Hard
hitflag=MAF
guardflag=MA
pausetime=4/((root,var(20)>0)+1),4/((root,var(20)>0)+1)
sparkno=-1
sparkxy=0,0
guard.sparkno=-1
guardsound=s2,0
ground.type=High
ground.slidetime=24/((root,var(20)>0)+1)
ground.hittime=24/((root,var(20)>0)+1)
ground.velocity=-vel x*ifelse(var(1)<160,.75,1),ifelse(var(1)<160,-2.5,0)
ground.cornerpush.veloff=0
air.velocity=-vel x,-2
fall=ifelse(var(1)<160,1,0)
air.fall=1
p2facing=1
getpower=ifelse(var(1)<100,100,90)*!(root,var(20))
envshake.time=12
envshake.freq=100
envshake.ampl=4
palfx.color=64
palfx.sinadd=30,10,40,12
palfx.mul=384,192,512
palfx.time=24
sprpriority=4

[State 1005, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,5,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),-floor(p2dist y)
ownpal=1
facing=-1
ignorehitpause=1
persistent=0

[State 1005, end]
type=changestate
trigger1=movecontact
value=1006
ignorehitpause=1
[State 1005, end]
type=destroyself
trigger1=frontedgedist<-80||backedgedist<0

[Statedef 1006]
type=A
physics=N
movetype=I
anim=1006
velset=0,0
ctrl=0
sprpriority=4
movehitpersist=1
[State 1006, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 1006, particles]
type=explod
trigger1=animelemtime(8)<0
vel=-5+ceil(random/100),-5+ceil(random/100)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=0,0
random=10,10
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 1006, snd]
type=playsnd
trigger1=animelem=1
value=5,3
ignorehitpause=1
persistent=0
[State 1006, end]
type=destroyself
trigger1=!animtime


;========================<SHAKUNETSU HADOU KEN>=============================
[Statedef 1025]
type=A
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
juggle=!var(3)*5

[State 1025,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1
[State 1025, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=ifelse(var(2)<var(10),1025,1026)
ignorehitpause=1

[State 1025, strengthvar]
type=varset
trigger1=!time&&!prevstateno
var(10)=root,var(10)
[State 1025, anim]
type=changeanim
trigger1=!time&&!prevstateno
value=1025

[State 1025, hitvar]
type=varadd
trigger1=!time
var(2)=1
[State 1025, distvar]
type=varset
trigger1=!time&&!prevstateno
var(1)=floor(root, p2dist x)
[State 1025, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1

[State 1025, vel]
type=velset
trigger1=1
x=ifelse((time<2&&var(2)>1),1,ifelse(var(10)=3,7,ifelse(var(10)=2,5.3,3.5)))
y=0

[State 1025, image]
type=null;afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=1
length=2
palmul=.5,.5,.5
palcontrast=90,0,0
trans=add

[State 1025, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=5
palcontrast=60,15,0
trans=add

[State 1025, particles]
type=explod
trigger1=ifelse(var(10)=3,!(time%3),ifelse(var(10)=2,!(time%5),!(time%7)))
vel=-.5+(random<500),0
accel=0,-.05
anim=1028
sprpriority=3
postype=p1
pos=-40,0
random=10,30
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 1025, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 1025, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
persistent=0
ignorehitpause=1

[State 1025, hit]
type=hitdef
trigger1=1
priority=6,Hit
attr=S,SP
damage=ceil((ifelse(var(10)=3,40,ifelse(var(10)=2,45,60))+random/300)*(1-root,fvar(10)+((root,fvar(11))*!(root,var(20)))+root,fvar(12))),5
animtype=Back
hitflag=MAF
guardflag=MA
pausetime=4/((root,var(20)>0)+1),6/((root,var(20)>0)+1)
sparkno=-1
sparkxy=0,0
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=24/((root,var(20)>0)+1)
ground.hittime=24/((root,var(20)>0)+1)
ground.velocity=var(10)*ifelse(var(1)<100,-2,-1.5),-3
ground.cornerpush.veloff=0
air.velocity=var(10)*ifelse(var(1)<100,-2,-1.5),-3
p2facing=1
fall=1
getpower=55*!(root,var(20))
envshake.time=16
envshake.freq=100
envshake.ampl=5
palfx.color=32
palfx.sinadd=80,25,0,8
palfx.mul=512,256,128
palfx.time=32
sprpriority=4

[State 1025, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,5,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),-floor(p2dist y)
ownpal=1
facing=-1
ignorehitpause=1
persistent=0

[State 1025, flames]
type=helper
triggerall=movehit&&numtarget&&numhelper(6040)<1
trigger1=(target,time=0)&&(target,movetype=H)
helpertype=normal
stateno=6040
ID=6040
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 1025, end]
type=changestate
trigger1=movecontact
value=ifelse(var(2)<var(10),1025,1026)
[State 1025, end]
type=destroyself
trigger1=frontedgedist<-90||backedgedist<0

[Statedef 1026]
type=A
physics=N
movetype=A
anim=1026
ctrl=0
velset=0,0
sprpriority=4

[State 1026, particles]
type=explod
trigger1=animelemtime(8)<0
vel=-5+ceil(random/100),-5+ceil(random/100)
accel=0,.05
anim=1028
sprpriority=3
postype=p1
pos=0,0
random=10,10
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 1026, snd]
type=playsnd
trigger1=animelem=1
value=5,3
ignorehitpause=1
persistent=0

[State 1026, end]
type=destroyself
trigger1=!animtime


;========================<ZANKUU HADOUKEN>=============================
[Statedef 1055]
type=A
physics=N
movetype=A
anim=1055
ctrl=0
velset=0,0
sprpriority=4
juggle=3

[State 1055, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=1056
ignorehitpause=1
[State 1055,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 1055, strengthvar]
type=varset
trigger1=!time
var(10)=root, var(10)
[State 1055, distvar]
type=varset
trigger1=!time
var(1)=floor(root, p2dist x)
[State 1055, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1

[State 1055, vel]
type=velset
trigger1=var(10)!=7
x=ifelse(var(10)=3,5.7,ifelse(var(10)=2,4.3,2.9))
y=ifelse(var(10)=3,4,ifelse(var(10)=2,3,2))

[State 1055, vel1]
type=velset
trigger1=!time&&var(10)=7&&(rootdist y>48)
x=5+random/400
y=3+random/500
[State 1055, vel2]
type=velset
trigger1=!time&&var(10)=7&&(rootdist y<=48)
x=5+random/400
y=5+random/500

[State 1055, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=3
palcontrast=120,90,150
trans=add

[State 1055, particles]
type=explod
trigger1=ifelse(var(10)=3,!(time%3),ifelse(var(10)=2,!(time%5),!(time%7)))
vel=-.5+(random<500),-.5+(random<500)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=-35,-25
random=20,20
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 1055, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 1055, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
persistent=0
ignorehitpause=1

[State 1055, hit]
type=hitdef
trigger1=var(10)!=7
priority=6,Hit
attr=A,SP
damage=ceil(55*(1-root,fvar(10)+((root,fvar(11))*!(root,var(20)))+root,fvar(12))),5
animtype=Hard
fall.animtype=Hard
hitflag=MAFD
guardflag=MA
pausetime=4/((root,var(20)>0)+1),4/((root,var(20)>0)+1)
sparkno=-1
sparkxy=0,0
guard.sparkno=-1
guardsound=s2,0
ground.type=High
ground.slidetime=24/((root,var(20)>0)+1)
ground.hittime=24/((root,var(20)>0)+1)
ground.velocity=vel x*ifelse(var(1)<100,-1.5,-1),0
ground.cornerpush.veloff=0
air.velocity=vel x*ifelse(var(1)<100,-1.5,-1),-2
down.hittime=32
down.velocity=0,0
air.fall=1
p2facing=ifelse(p2statetype=L,0,1)
getpower=55*!(root,var(20))
envshake.time=12
envshake.freq=100
envshake.ampl=4
palfx.color=64
palfx.sinadd=30,10,40,12
palfx.mul=384,192,512
palfx.time=24
sprpriority=4

[State 1055, hit]
type=hitdef
trigger1=var(10)=7
priority=6,Hit
attr=A,HP
damage=ceil(27*(1-root,fvar(10)+root,fvar(11)+root,fvar(12))),5
animtype=Hard
fall.animtype=Hard
hitflag=MAFD
guardflag=MA
pausetime=4,6
sparkno=-1
sparkxy=0,0
guard.sparkno=-1
guardsound=s2,0
ground.type=High
ground.slidetime=32
ground.hittime=32
ground.velocity=-4,0
ground.cornerpush.veloff=0
air.velocity=-3,-2
down.hittime=32
down.velocity=0,0
air.fall=1
p2facing=ifelse(p2statetype=L,0,1)
getpower=0
envshake.time=12
envshake.freq=100
envshake.ampl=4
palfx.color=64
palfx.sinadd=30,10,40,12
palfx.mul=384,192,512
palfx.time=24
sprpriority=4

[State 1055, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,ifelse(var(10)=7,6,5),1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),-floor(p2dist y)
ownpal=1
facing=-1
ignorehitpause=1
persistent=0

[State 1055, end]
type=changestate
trigger1=movecontact
value=1056
ignorehitpause=1
[State 1055, end]
type=changestate
trigger1=pos y>=0
value=1057
ignorehitpause=1
[State 1055, end]
type=destroyself
trigger1=frontedgedist<-65||backedgedist<0

[Statedef 1056]
type=A
physics=N
movetype=I
anim=1056
velset=0,0
ctrl=0
sprpriority=4
movehitpersist=1
[State 1056, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 1056, particles]
type=explod
trigger1=animelemtime(10)<0&&!(time%2)
vel=-5+ceil(random/100),-5+ceil(random/100)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=0,0
random=10,10
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 1056, snd]
type=playsnd
trigger1=animelem=1
value=5,3
ignorehitpause=1
persistent=0
[State 1056, end]
type=destroyself
trigger1=!animtime

[Statedef 1057]
type=A
physics=N
movetype=I
anim=1057
velset=0,0
ctrl=0
sprpriority=4
[State 1057, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 1057, pos]
type=posset
trigger1=1
y=0
[State 1057, snd]
type=playsnd
trigger1=animelem=1
value=5,3
ignorehitpause=1
persistent=0
[State 1057, particles]
type=explod
trigger1=animelemtime(5)<0
vel=-1+ceil(random/125),-1-ceil(random/125)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=0,-10
random=20,20
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
[State 1057, dust]
type=explod
trigger1=!time
anim=6020
ID=6020
sprpriority=-2
pos=0,0
vel=0,0
removetime=-2
ownpal=1
scale=.75,.75
[State 1057, end]
type=destroyself
trigger1=!animtime


;========================<MESSATSU GOU HADOU>=============================
[Statedef 3005]
type=A
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
juggle=!var(3)*5
[State 3005,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1
[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=ifelse(var(2)<8,3005,3006)
ignorehitpause=1

[State 3005, strengthvar]
type=varset
trigger1=!time&&!prevstateno
var(10)=5
[State 3005, anim]
type=changeanim
trigger1=!time&&!prevstateno
value=3005

[State 3005, hitvar]
type=varadd
trigger1=!time
var(2)=1
[State 3005, distvar]
type=varset
trigger1=!time&&!prevstateno
var(1)=floor(root, p2dist x)
[State 3005, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1

[State 3005, vel]
type=velset
trigger1=1
x=ifelse((time<2&&var(2)>1),1,9)
y=0

[State 3005, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=3
palcontrast=120,90,150
trans=add

[State 3005, particles]
type=explod
trigger1=vel x>2
vel=-1-(random<500),0
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=-70,0
random=10,50
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 3005, shake]
type=envshake
trigger1=!(time%6)
time=6
freq=120
ampl=4

[State 3005, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
persistent=0
ignorehitpause=1

[State 3005, hit]
type=hitdef
trigger1=1
priority=6,Hit
attr=S,HP
damage=ceil(35*(1-root,fvar(10)+root,fvar(11)+root,fvar(12))),5
animtype=Back
hitflag=MAF
guardflag=MA
pausetime=4,6
sparkno=-1
sparkxy=0,0
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=24
ground.hittime=24
ground.velocity=ifelse(var(1)<160,-6,-4),-4
ground.cornerpush.veloff=0
air.velocity=ifelse(var(1)<160,-6,-4),-4
p2facing=1
fall=1
fall.recover=0
getpower=0
envshake.time=16
envshake.freq=100
envshake.ampl=6
palfx.color=32
palfx.sinadd=40,20,60,8
palfx.mul=384,128,512
palfx.time=32
sprpriority=4

[State 3005, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,6,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),-floor(p2dist y)
ownpal=1
facing=-1
ignorehitpause=1
persistent=0

[State 3005, flames]
type=helper
triggerall=movehit&&numtarget&&numhelper(6041)<1
trigger1=(target,time=0)&&(target,movetype=H)
helpertype=normal
stateno=6041
ID=6041
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 3005, end]
type=changestate
trigger1=movecontact
value=ifelse(var(2)<8,3005,3006)
[State 3005, end]
type=destroyself
trigger1=frontedgedist<-130||backedgedist<0

[Statedef 3006]
type=A
physics=N
movetype=A
anim=3006
ctrl=0
velset=0,0
sprpriority=4
[State 3006, snd]
type=playsnd
trigger1=animelem=1
value=5,3
ignorehitpause=1
persistent=0

[State 3006, particles]
type=explod
trigger1=animelemtime(10)<0
vel=-10+ceil(random/50),-10+ceil(random/50)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=0,0
random=10,10
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 3006, end]
type=destroyself
trigger1=!animtime


;========================<MESSATSU CHOU HADOU>=============================
[Statedef 3025]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
juggle=!var(3)*5

[State 3025,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1
[State 3025, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=3025
ignorehitpause=1

[State 3025, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 3025, bind]
type=bindtoroot
trigger1=1
pos=69,-66

[State 3025, strengthvar]
type=varset
trigger1=!time&&!prevstateno
var(10)=7
[State 3025, anim]
type=changeanim
trigger1=!time&&!prevstateno
value=3025

[State 3025, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1
[State 3025, movehitvar2]
type=varset
trigger1=!time&&prevstateno
var(4)=animelemno(0)
ignorehitpause=1

[State 3025, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=3
palcontrast=120,90,150
trans=add
[State 3025, bgpalfx]
type=bgpalfx
trigger1=!time&&!prevstateno
time=60
add=-150,-150,-150
sinadd=150,150,150,240

[State 3025, particles]
type=explod
trigger1=1
vel=5+(random/100),-10+(random/50)
accel=0,.2
anim=1008
sprpriority=3
postype=p1
pos=10,0
random=20,20
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 3025, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
ignorehitpause=1

[State 3025, hit]
type=hitdef
triggerall=animelemno(0)!=var(4)
trigger1=animelem=1||animelem=2||animelem=3||animelem=4||animelem=5||animelem=7||animelem=9||animelem=11
trigger2=animelem=13||animelem=15||animelem=17||animelem=19||animelem=21||animelem=23||animelem=25||animelem=27
attr=S,HP                   
damage=ceil(34*(1-root,fvar(10)+root,fvar(11)+root,fvar(12))),5
animtype=Back       
guardflag=M          
hitflag=MAFD     
priority=7,Hit             
pausetime=2,2
guard.dist=320
sparkno=-1  
guard.sparkno=-1        
guardsound=s2,0
ground.type=High
ground.slidetime=30
ground.hittime=30
ground.velocity=-20,0
ground.cornerpush.veloff=0
air.velocity=-20,-.5
getpower=0
fall=1
fall.recover=0
palfx.color=32
palfx.sinadd=40,20,60,8
palfx.mul=384,128,512
palfx.time=30
sprpriority=4

[State 3025, flames]
type=helper
triggerall=movehit&&numtarget&&numhelper(6041)<1
trigger1=(target,time=0)&&(target,movetype=H)
helpertype=normal
stateno=6041
ID=6041
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 3025, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,6,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
ownpal=1
facing=-1
ignorehitpause=1

[State 3025, end]
type=changestate
trigger1=!animtime
value=3026

[Statedef 3026]
type=A
physics=N
movetype=A
anim=3026
ctrl=0
velset=0,0
sprpriority=4

[State 3026, end]
type=destroyself
trigger1=!animtime


;========================<TENMA GOU ZANKUU>=============================
[Statedef 3055]
type=A
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
juggle=!var(3)*5
[State 3055,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1
[State 3055, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=ifelse(var(2)<8,3055,3056)
ignorehitpause=1

[State 3055, strengthvar]
type=varset
trigger1=!time&&!prevstateno
var(10)=5
[State 3055, anim]
type=changeanim
trigger1=!time&&!prevstateno
value=3055

[State 3055, hitvar]
type=varadd
trigger1=!time
var(2)=1
[State 3055, distvar]
type=varset
trigger1=!time&&!prevstateno
var(1)=floor(root, p2dist x)
[State 3055, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1

[State 3055, vel]
type=velset
trigger1=1
x=ifelse((time<2&&var(2)>1),1,7.4)
y=ifelse((time<2&&var(2)>1),1,5.2)

[State 3055, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=3
palcontrast=120,90,150
trans=add

[State 3055, particles]
type=explod
trigger1=vel x>2
vel=-.5+(random<500),-.5+(random<500)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=-55,-40
random=30,20
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 3055, shake]
type=envshake
trigger1=!(time%6)
time=6
freq=150
ampl=ifelse(var(10)=7,5,ifelse(var(10)=6,4,3))

[State 3055, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 3055, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
persistent=0
ignorehitpause=1

[State 3055, hit]
type=hitdef
trigger1=1
priority=6,Hit
attr=S,HP
damage=ceil(35*(1-root,fvar(10)+root,fvar(11)+root,fvar(12))),5
animtype=Back
hitflag=MAFD
guardflag=MA
pausetime=4,6
sparkno=-1
sparkxy=0,0
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=24
ground.hittime=24
ground.velocity=ifelse(var(1)<160,-6,-4),ifelse(var(1)<160,-3,-2)
ground.cornerpush.veloff=0
air.velocity=-6,-2
down.velocity=-3,-2
p2facing=ifelse(p2statetype=L,0,1)
fall=1
fall.recover=0
getpower=0
envshake.time=16
envshake.freq=100
envshake.ampl=6
palfx.color=32
palfx.sinadd=40,20,60,8
palfx.mul=384,128,512
palfx.time=32
sprpriority=4

[State 3055, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,6,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),-floor(p2dist y)
ownpal=1
facing=-1
ignorehitpause=1
persistent=0

[State 3055, flames]
type=helper
triggerall=movehit&&numtarget&&numhelper(6041)<1
trigger1=(target,time=0)&&(target,movetype=H)
helpertype=normal
stateno=6041
ID=6041
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 3055, end]
type=changestate
trigger1=movecontact
value=ifelse(var(2)<8,3055,3056)
[State 3055, end]
type=changestate
trigger1=pos y>=0
value=3057
ignorehitpause=1
[State 3005, end]
type=destroyself
trigger1=frontedgedist<-130||backedgedist<0

[Statedef 3056]
type=A
physics=N
movetype=A
anim=3056
ctrl=0
velset=0,0
sprpriority=4
[State 3056, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 3056, snd]
type=playsnd
trigger1=animelem=1
value=5,3
ignorehitpause=1
persistent=0

[State 3006, particles]
type=explod
trigger1=animelemtime(10)<0
vel=-10+ceil(random/50),-10+ceil(random/50)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=0,0
random=10,10
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 3056, end]
type=destroyself
trigger1=!animtime

[Statedef 3057]
type=A
physics=N
movetype=I
anim=3056
velset=0,0
ctrl=0
sprpriority=4
[State 3057, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 3057, pos]
type=posset
trigger1=1
y=0
[State 3057, snd]
type=playsnd
trigger1=animelem=1
value=5,3
ignorehitpause=1
persistent=0
[State 3057, particles]
type=explod
trigger1=animelemtime(5)<0
vel=-2+ceil(random/60),-2-ceil(random/60)
accel=0,.05
anim=1008
sprpriority=3
postype=p1
pos=0,-10
random=20,20
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
[State 3057, dust]
type=explod
trigger1=!time
anim=6020
ID=6020
sprpriority=-2
pos=0,0
vel=0,0
removetime=-2
ownpal=1
[State 3057, end]
type=destroyself
trigger1=!animtime


;========================<KONGOU KOKURETSU ZAN>=============================
;---LIGHTNING---
[Statedef 4205]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
anim=4205
sprpriority=4
juggle=0

[State 4205, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 4205, strengthvar]
type=varset
trigger1=!time&&!prevstateno
var(10)=6

[State 4205, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1

[State 4205, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=3
palcontrast=20,10,50
trans=add

[State 4205, bgpalfx]
type=bgpalfx
trigger1=!time&&!prevstateno
time=30
add=150,0,200
sinadd=-150,0,-200,120

[State 4205, hit]
type=hitdef
trigger1=animelem=1
attr=S,HA                   
damage=ceil(60*(1-root,fvar(10)+root,fvar(11)+root,fvar(12))),5
animtype=Up        
guardflag=M          
hitflag=MAFD     
priority=7,Hit             
pausetime=0,0
sparkno=-1  
guard.sparkno=-1        
hitsound=s2,7
guardsound=s2,0
ground.type=High
ground.slidetime=22
ground.hittime=22
ground.velocity=-1,-3
ground.cornerpush.veloff=0
air.velocity=-1,-3
getpower=0
fall=1
fall.recover=0
palfx.color=24
palfx.sinadd=40,20,60,8
palfx.mul=384,128,512
palfx.time=32
sprpriority=4

[State 4205, flames]
type=helper
triggerall=movehit&&numtarget&&numhelper(6041)<1
trigger1=(target,time=0)&&(target,movetype=H)
helpertype=normal
stateno=6041
ID=6041
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 4205, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,6,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
ownpal=1
facing=-1
ignorehitpause=1

[State 4205, end]
type=destroyself
trigger1=!animtime


;---SHOCKWAVES---
[Statedef 4206]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
juggle=!var(3)*5

[State 4206,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1
[State 4206, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=4206
ignorehitpause=1

[State 4206, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 4206, strengthvar]
type=varset
trigger1=!time&&!prevstateno
var(10)=6
[State 4206, anim]
type=changeanim
trigger1=!time&&!prevstateno
value=4206

[State 4206, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1
[State 4206, movehitvar2]
type=varset
trigger1=!time&&prevstateno
var(4)=animelemno(0)
ignorehitpause=1

[State 4206, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=2
length=7
palcontrast=20,20,20
trans=add

[State 4206, particles]
type=explod
trigger1=animelemtime(2)>0&&animelemtime(12)<0
vel=ceil(2+random/200),-ceil(1+random/500)
accel=-.3,-.75
anim=4210
sprpriority=3
postype=p1
pos=65,-60
random=70,120
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 4206, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
ignorehitpause=1

[State 4206, hit]
type=hitdef
triggerall=animelemno(0)!=var(4)
trigger1=animelem=2||animelem=3||animelem=4||animelem=5
trigger2=animelem=6||animelem=7||animelem=8||animelem=9
attr=S,HA                   
damage=ceil(43*(1-root,fvar(10)+root,fvar(11)+root,fvar(12))),5
animtype=Hard        
fall.animtype=Up        
guardflag=M          
hitflag=MAFD     
priority=7,Hit             
pausetime=0,0
sparkno=-1  
guard.sparkno=-1        
guardsound=s2,0
ground.type=High
ground.slidetime=30
ground.hittime=30
ground.velocity=ifelse((animelem=9),-9,-3),0
ground.cornerpush.veloff=0
air.velocity=-2,-9
getpower=0
fall=0
fall.recover=0
air.fall=1
palfx.color=32
palfx.sinadd=40,20,60,8
palfx.mul=384,128,512
palfx.time=ifelse(p2statetype=A,60,30)
ID=4206+(facing=-1)
nochainID=4207-(facing=-1)
sprpriority=4

[State 4206, flames]
type=helper
triggerall=movehit&&numtarget&&numhelper(6041)<1
trigger1=(target,time=0)&&(target,movetype=H)
helpertype=normal
stateno=6041
ID=6041
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 4206, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,6,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
ownpal=1
facing=-1
ignorehitpause=1

[State 4206, end]
type=destroyself
trigger1=!animtime


;========================<TENSHOU KAIREKI JIN>=============================
[Statedef 4405]
type=A
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
juggle=!var(3)*5

[State 4405,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1
[State 4405, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=4405
ignorehitpause=1

[State 4405, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 4405, bind]
type=bindtoroot
trigger1=1
pos=20,-115

[State 4405, strengthvar]
type=varset
trigger1=!time&&!prevstateno
var(10)=6
[State 4405, anim]
type=changeanim
trigger1=!time&&!prevstateno
value=4405

[State 4405, movehitvar]
type=varset
trigger1=movehit&&numtarget
trigger1=target,movetype=H
var(3)=1
ignorehitpause=1
[State 4405, movehitvar2]
type=varset
trigger1=!time&&prevstateno
var(4)=animelemno(0)
ignorehitpause=1

[State 4405, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=1
length=5
palcontrast=120,90,150
trans=add

[State 4405, particles]
type=explod
trigger1=animelemtime(2)>0&&animelemtime(12)<0
vel=ceil(2+random/200),ceil(1+random/500)
accel=-.3,.75
anim=4210
sprpriority=3
postype=p1
pos=65,-60
random=70,120
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 4405, hitsnd]
type=playsnd
trigger1=movehit&&numtarget
trigger1=target,time=0&&target,movetype=H
value=2,7
ignorehitpause=1

[State 4405, hit]
type=hitdef
triggerall=animelemno(0)!=var(4)
trigger1=animelem=2||animelem=3||animelem=4||animelem=5
trigger2=animelem=6||animelem=7||animelem=8||animelem=9
attr=S,HA                   
damage=ceil(43*(1-root,fvar(10)+root,fvar(11)+root,fvar(12))),5
animtype=Hard        
fall.animtype=Up        
guardflag=M          
hitflag=MAFD     
priority=7,Hit             
pausetime=0,0
sparkno=-1  
guard.sparkno=-1        
guardsound=s2,0
ground.type=High
ground.slidetime=30
ground.hittime=30
ground.velocity=-2,-15
ground.cornerpush.veloff=0
air.velocity=-2,-15
getpower=0
fall=0
fall.recover=0
air.fall=1
palfx.color=32
palfx.sinadd=40,20,60,8
palfx.mul=384,128,512
palfx.time=ifelse(p2statetype=A,60,30)
ID=4206+(facing=-1)
nochainID=4207-(facing=-1)
sprpriority=4

[State 4405, flames]
type=helper
triggerall=movehit&&numtarget&&numhelper(6041)<1
trigger1=(target,time=0)&&(target,movetype=H)
helpertype=normal
stateno=6041
ID=6041
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 4405, sparks]
type=helper
triggerall=movecontact&&numtarget&&var(11):=ifelse(movehit,6,1)
triggerall=(target,movetype=H)&&!(target,time)
trigger1=movehit
trigger2=moveguarded
trigger2=(target,stateno=150)||(target,stateno=152)||(target,stateno=154)
helpertype=normal
stateno=6000
ID=6000
name="spark"
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
ownpal=1
facing=-1
ignorehitpause=1

[State 4405, end]
type=destroyself
trigger1=!animtime


;========================<HADOU FLASH>=============================
[Statedef 1007]
physics=N
velset=0,0
anim=ifelse((root,stateno=1000),1007,ifelse((root,stateno=3000),3007,1027))
sprpriority=2
[State 1007, bind]
type=bindtoroot
trigger1=1
[State 1007, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 1007, fade]
type=palfx
trigger1=!time&&anim!=3007
sinadd=-255,-255,-255,90
time=300
[State 1007, fade]
type=palfx
trigger1=!time&&anim=3007
add=20,20,20
sinadd=-275,-275,-275,90
time=300
[State 1007, end]
type=destroyself
trigger1=anim=1007&&root,stateno!=1000
trigger2=anim=1027&&root,stateno!=1020
trigger3=anim=3007&&root,stateno!=3000
trigger4=!animtime


;========================<ZANKUU FLASH>=============================
[Statedef 1058]
physics=N
velset=0,0
anim=ifelse((root,stateno=3050),3058,ifelse((root,animelem=2),1058,1059))
sprpriority=2
[State 1058, bind]
type=bindtoroot
trigger1=1
[State 1058, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 1058, var]
type=varset
trigger1=!time
var(10)=root,var(10)
ignorehitpause=1

[State 1058, anim]
type=changeanim
trigger1=!time&&var(10)=7
trigger1=root,animelem=5||root,animelem=11||root,animelem=17||root,animelem=23||root,animelem=29||root,animelem=35
value=1059
[State 1058, anim]
type=changeanim
trigger1=!time&&var(10)=7
trigger1=root,animelem=8||root,animelem=14||root,animelem=20||root,animelem=26||root,animelem=32
value=1058

[State 1058, fade]
type=palfx
trigger1=!time&&(anim=1058||anim=1059)&&var(10)!=7
sinadd=-255,-255,-255,90
time=300
[State 1058, fade]
type=palfx
trigger1=!time&&(anim=1058||anim=1059)&&var(10)=7
add=20,20,20
sinadd=-275,-275,-275,90
time=300
[State 1058, fade]
type=palfx
trigger1=!time&&(anim=1058||anim=1059)&&var(10)=7
sinadd=-255,-255,-255,75
time=300
[State 1058, end]
type=destroyself
trigger1=anim!=3058&&root,stateno!=1050&&root,stateno!=3060
trigger2=anim=3058&&root,stateno!=3050
trigger3=var(10)=7&&time>=7
trigger4=!animtime


;========================<EX TATSUMAKI FX>=============================
[Statedef 4306]
physics=N
velset=0,0
anim=4306
sprpriority=2
[State 4306, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 4306, sprpriority]
type=sprpriority
trigger1=!time&&root,stateno=4304
value=ifelse((root,animelemtime(2)>=0)&&(root,animelemtime(5)<0),2,-2)

[State 4306, vel]
type=velset
triggerall=!time&&root,stateno=4304
trigger1=(root,animelemtime(4)<0)
x=ifelse((root,animelem=1),4,ifelse((root,animelem=2),6,-2))
[State 4306, vel]
type=velset
triggerall=!time&&root,stateno=4304
trigger1=(root,animelemtime(4)>=0)
x=ifelse((root,animelem=4),-4,ifelse((root,animelem=5),-6,2))

[State 4306, image]
type=afterimage
trigger1=!time
time=999
timegap=1
framegap=1
length=6
palcontrast=120,90,150
trans=add

[State 4306, end]
type=destroyself
trigger1=!animtime


;========================<TATSUMAKI VACUUM>=============================
[Statedef 4307]
physics=N
velset=0,0
anim=4307
[State 4307, nhb]
type=nothitby
trigger1=1
time=-1
value=SCA
[State 4307, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA
stateno=4307
ignorehitpause=1
[State 3205, bound]
type=screenbound
trigger1=1
value=0
[State 4307, turn]
type=turn
trigger1=(facing=root,facing)
[State 4307, push]
type=playerpush
trigger1=p2bodydist x=[-5,5]
value=1
[State 4307, pos]
type=posset
trigger1=1
y=0
[State 4307, vel]
type=velset
trigger1=rootdist x>=0
x=ifelse((rootdist x=[0,100]),2,ifelse((rootdist x=[100,200]),1.5,1))
[State 4307, dust]
type=explod
trigger1=(p2bodydist x=[-5,5])&&(enemynear,statetype!=A)&&!(time%12)
anim=6021
ID=6201
sprpriority=2
postype=p1
pos=0,0
scale=1,1
removetime=-2
ownpal=1
[State 4307, pos]
type=posadd
trigger1=p2bodydist x!=[-5,5]
x=ceil(p2dist x)-enemynear,const(size.ground.back)-5
[State 4307, end]
type=destroyself
trigger1=root,stateno!=1210||root,anim!=1210||root,movecontact


;========================<TENMA SHINZUI WARI F.X.>=============================
[Statedef 3305]
physics=N
velset=0,0
anim=3305
sprpriority=3
[State 3305, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 3305, bind]
type=bindtoroot
trigger1=root,anim=3300
ignorehitpause=1

[State 3305, image]
type=afterimage
trigger1=!time
time=999
timegap=1
framegap=2
length=3
palcontrast=120,90,150
trans=add

[State 3305, particles]
type=explod
trigger1=1
vel=-5-(random/500),-5-(random/500)
accel=-.1,-.1
anim=4109
sprpriority=3
postype=p1
pos=36,-26
random=32,16
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15

[State 3305, end]
type=destroyself
trigger1=!animtime||root,stateno!=3300


;========================<SHINBUU MESSATSU FX>=============================
[Statedef 4305]
physics=N
velset=0,0
anim=4305
sprpriority=5
[State 4305, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 4305, snd]
type=playsnd
trigger1=!time
value=5,2

[State 4305, image]
type=afterimage
trigger1=!time
time=999
timegap=1
framegap=1
length=2
palcontrast=120,90,150
trans=add

[State 4305, particles]
type=explod
trigger1=animelemtime(3)>0&&animelemtime(11)<0
vel=ceil(-1+random/500),-ceil(2+random/500)
accel=0,-.5
anim=4210
sprpriority=3
postype=p1
pos=0,-100
random=70,200
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
ignorehitpause=1

[State 4305, end]
type=destroyself
trigger1=!animtime


;========================<POWER CHARGE>=============================
[Statedef 6011]
physics=N
anim=6011
sprpriority=3
[State 6011, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 6011, image]
type=afterimage
trigger1=!time&&!prevstateno
time=999
timegap=1
framegap=1
length=2
palcontrast=0,60,120
trans=add

[State 6011, particles]
type=explod
trigger1=!(time%3)
vel=ceil(1-random/500),-ceil(2+random/333)
accel=0,.15
anim=6013
sprpriority=3
postype=p1
pos=0,-3
random=125,6
;pos=ceil(50*sin(time/10)),ceil(5*cos(time/10))
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
pausemovetime=300
supermovetime=300

[State 6011, end]
type=destroyself
trigger1=(root,stateno!=510)||(root,anim!=510)
value=6012


;========================<MISOGI ILLUSIONS>=============================
[Statedef 4111]
physics=N
anim=9741
[State 4111, assert]
type=assertspecial
trigger1=1
flag=invisible

[State 4111, dust]
type=explod
trigger1=!time
anim=4107
ID=4107
sprpriority=-1
postype=p1
pos=0,0
vel=0,0
removetime=-2
ownpal=1
[State 4111, particles]
type=explod
trigger1=time=[1,16]
vel=0,-ceil(random/200)
accel=0,-.3
anim=4210
sprpriority=-1
postype=p1
pos=-2,-45
random=50,50
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
pausemovetime=300
supermovetime=300

[State 4111, illusion]
type=explod
trigger1=!time
anim=4111
ID=4111
sprpriority=-1
vel=3,0
accel=-.1,0
removetime=60
[State 4111, illusion]
type=explod
trigger1=!time
anim=4111
ID=4111
sprpriority=-1
vel=-3,0
accel=.1,0
removetime=60

[State 4111, fade]
type=palfx
trigger1=!time
mul=200,0,256
sinadd=-255,-255,-255,240
time=60

[State 4111, end]
type=destroyself
trigger1=time>=60


;========================<S.G.S. GUARDED>=============================
[Statedef 4012]
physics=N
anim=4012
sprpriority=5
[State 4012, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 4012, snd]
type=playsnd
trigger1=!time
value=6,1

[State 4012, bgpalfx]
type=bgpalfx
trigger1=!time
invertall=1
time=4
add=200,200,255
sinadd=-200,-200,-255,16

[State 4012, palfx]
type=palfx
trigger1=time=4
time=8
sinadd=-255,-255,-255,32

[State 4012, dust]
type=explod
trigger1=!time
anim=6020
ID=6020
sprpriority=-2
postype=p1
pos=0,0
vel=0,0
removetime=-2
ownpal=1

[State 4012, particles]
type=explod
trigger1=1
vel=-.5+(random/1000),-.5-(random/1000)
accel=.1,-.2
anim=4013
sprpriority=5
postype=p1
pos=65,-100
random=130,200
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15

[State 4012, end]
type=destroyself
trigger1=!animtime


;========================<RED DUST>=============================
[Statedef 6020]
physics=N
anim=9741
[State 6020, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 6020, dust]
type=explod
trigger1=!time
anim=6102
ID=6102
sprpriority=-2
postype=p1
removetime=16
pausemovetime=ifelse((parent,stateno=6100),300,0)
supermovetime=ifelse((parent,stateno=6100),300,0)
[State 6020, fade]
type=palfx
trigger1=!time
mul=384,384,384
sinadd=-255,-255,-255,64
time=16
[State 6020, shrink]
type=modifyexplod
trigger1=1
ID=6102
scale=.2+(.05*time)*const(size.xscale),.05+(.0125*time)*const(size.yscale)
[State 6020, end]
type=destroyself
trigger1=time>=17


;========================<PURPLE DUST>=============================
[Statedef 6021]
physics=N
anim=9741
[State 6021, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1
[State 6021, dust]
type=explod
trigger1=!time
anim=6101
ID=6101
sprpriority=-2
postype=p1
removetime=16
pausemovetime=ifelse((parent,stateno=6100),300,0)
supermovetime=ifelse((parent,stateno=6100),300,0)
[State 6021, fade]
type=palfx
trigger1=!time
mul=384,384,384
sinadd=-255,-255,-255,64
time=16
[State 6021, shrink]
type=modifyexplod
trigger1=1
ID=6101
scale=.2+(.05*time)*const(size.xscale),.05+(.0125*time)*const(size.yscale)
[State 6021, end]
type=destroyself
trigger1=time>=17


;========================<RED FIRE>=============================
[Statedef 6040]
physics=N
velset=0,0
anim=9741
sprpriority=4
[State 6040, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 6040, flames]
type=explod
trigger1=1
anim=6040
ID=6040
sprpriority=3
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))+10
random=40,40
removetime=-2
ownpal=1

[State 6040, particles]
type=explod
trigger1=!(time%3)
vel=.5+(random/1000),-.5-(random/1000)
accel=.1,-.2
anim=4108
sprpriority=5
postype=p2
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))+10
random=40,40
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15

[State 6040, pos]
type=posadd
trigger1=1
x=ceil(p2dist x)
y=ceil(p2dist y)
[State 6040, end]
type=destroyself
trigger1=enemynear,ctrl||(enemynear,stateno!=[5000,5099])


;========================<PURPLE FIRE>=============================
[Statedef 6041]
physics=N
velset=0,0
anim=9741
sprpriority=4
[State 6041, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 6041, flames]
type=explod
trigger1=1
anim=6041
ID=6041
sprpriority=3
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))+10
random=40,40
removetime=-2
ownpal=1

[State 6041, particles]
type=explod
trigger1=!(time%3)
vel=.5+(random/1000),-.5-(random/1000)
accel=.1,-.2
anim=4210
sprpriority=5
postype=p2
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))+10
random=40,40
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15

[State 6041, pos]
type=posadd
trigger1=1
x=ceil(p2dist x)
y=ceil(p2dist y)
[State 6041, end]
type=destroyself
trigger1=enemynear,ctrl||(enemynear,stateno!=[5000,5099])


;========================<AURA>=============================
[Statedef 6050]
physics=N
velset=0,0
anim=6050
sprpriority=-2
[State 6050, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 6050, image]
type=afterimage
trigger1=!time
time=999
timegap=1
framegap=1
length=2
palcontrast=120,90,150
trans=add
[State 6050, bind]
type=bindtoroot
trigger1=1
[State 6050, end]
type=destroyself
trigger1=root,stateno!=351&&root,stateno!=1400&&root,stateno!=1020&&root,anim!=3000
trigger1=root,stateno!=195&&root,anim!=510&&root,stateno!=357&&root,anim!=3020
trigger2=root,stateno=195&&root,animelemtime(19)>=0
trigger3=root,stateno=351&&root,animelemtime(26)>=0
trigger4=root,stateno=1020&&root,animelemtime(9)>=0
trigger5=root,stateno=1400&&root,animelemtime(5)>=0
trigger6=root,stateno=3020&&root,anim=3020&&root,animelemtime(22)>=0


;========================<METSU>=============================
[Statedef 6051]
physics=N
velset=0,-.5
anim=6051
sprpriority=-1
[State 6051, assert]
type=assertspecial
trigger1=1
flag=noshadow
ignorehitpause=1

[State 6051, image]
type=afterimage
trigger1=!time
time=999
timegap=1
framegap=1
length=2
palcontrast=120,90,150
trans=add
[State 6051, image]
type=velset
trigger1=animelem=6
y=-2
[State 6051, fade]
type=palfx
trigger1=animelem=7
sinadd=-255,-255,-255,64
time=16
[State 6051, end]
type=destroyself
trigger1=!animtime||root,movetype=H


;========================<SUPERCHARGE>=============================
[Statedef 6100]
physics=N
velset=0,0
anim=9741
[State 6100, var]
type=parentvarset
trigger1=root,var(20)!=-1
var(20)=-1

[State 6100, bgpalfx1]
type=bgpalfx
trigger1=!time&&root,var(10)=5
invertall=1
time=39
add=100,100,100
sinadd=-600,-600,-300,156
[State 6100, bgpalfx1]
type=bgpalfx
trigger1=time=39&&root,var(10)=5
time=6
add=-255,-255,-255
sinadd=255,255,255,24

[State 6101, bgpalfx2]
type=bgpalfx
trigger1=!time&&root,var(10)=6
invertall=1
time=47
add=100,100,100
sinadd=-600,-600,-300,188
[State 6101, bgpalfx2]
type=bgpalfx
trigger1=time=47&&root,var(10)=6
time=6
add=-255,-255,-255
sinadd=255,255,255,24

[State 6100, bgpalfx3]
type=bgpalfx
trigger1=!time&&root,var(10)=7
invertall=1
time=54
add=100,100,100
sinadd=-600,-600,-300,216
persistent=0
[State 6100, bgpalfx3]
type=bgpalfx
trigger1=time=54&&root,var(10)=7
time=6
add=-255,-255,-255
sinadd=255,255,255,24
persistent=0

[State 6100, fade]
type=palfx
trigger1=!time
time=45
add=25,25,25
sinadd=-280,-280,-280,180

[State 6100, dust]
type=helper
trigger1=!time&&root,statetype!=A
helpertype=normal
stateno=6020
ID=6020
name="Red Dust"
postype=p1
pos=ceil(rootdist x),ceil(rootdist y)
supermovetime=300
ownpal=1
[State 6100, dust]
type=explod
trigger1=!time&&root,statetype!=A
anim=6025
ID=6025
sprpriority=3
postype=p1
pos=ceil(rootdist x),ceil(rootdist y)
removetime=-2
supermovetime=300
ownpal=1
[State 6100, main]
type=explod
trigger1=!time
anim=6100
ID=6100
sprpriority=5
postype=p1
removetime=-1
supermovetime=300
ownpal=1
[State 6100, circle]
type=explod
trigger1=!time
anim=6101
ID=6101
sprpriority=5
postype=p1
removetime=43
supermovetime=300
[State 6100, circle]
type=explod
trigger1=!time
anim=6102
ID=6102
sprpriority=5
postype=p1
removetime=43
supermovetime=300
[State 6100, circle]
type=explod
trigger1=!time
anim=6103
ID=61031
sprpriority=5
postype=p1
removetime=20
supermovetime=300
ownpal=1
[State 6100, circle]
type=explod
trigger1=time=10
anim=6103
ID=61032
sprpriority=5
postype=p1
removetime=20
supermovetime=300
ownpal=1
[State 6100, circle]
type=explod
trigger1=time=20
anim=6103
ID=61033
sprpriority=5
postype=p1
removetime=20
supermovetime=300
ownpal=1
[State 6100, circle]
type=explod
trigger1=time=30&&(root,var(10)=[6,7])
anim=6103
ID=61034
sprpriority=5
postype=p1
removetime=20
supermovetime=300
ownpal=1
[State 6100, circle]
type=explod
trigger1=time=40&&root,var(10)=7
anim=6103
ID=61035
sprpriority=5
postype=p1
removetime=20
supermovetime=300
ownpal=1

[State 6100, shrink]
type=modifyexplod
trigger1=root,var(10)=5
ID=6100
scale=1.5-(.033*time),1.5-(.033*time)
[State 6100, shrink]
type=modifyexplod
trigger1=root,var(10)=6
ID=6100
scale=1.5-(.028*time),1.5-(.028*time)
[State 6100, shrink]
type=modifyexplod
trigger1=root,var(10)=7
ID=6100
scale=1.5-(.025*time),1.5-(.025*time)

[State 6100, shrink]
type=modifyexplod
trigger1=numexplod(6101)
ID=6101
scale=.1+(.05*time),.1+(.05*time)
[State 6100, shrink]
type=modifyexplod
trigger1=numexplod(6102)
ID=6102
scale=.25+(.1*time),.25+(.1*time)
[State 6100, shrink]
type=modifyexplod
trigger1=numexplod(61031)
ID=61031
scale=.2+(.03*time),.2+(.03*time)
[State 6100, shrink]
type=modifyexplod
trigger1=numexplod(61032)
ID=61032
scale=.2+(.03*(time-10)),.2+(.03*(time-10))
[State 6100, shrink]
type=modifyexplod
trigger1=numexplod(61033)
ID=61033
scale=.2+(.03*(time-20)),.2+(.03*(time-20))
[State 6100, shrink]
type=modifyexplod
trigger1=numexplod(61034)
ID=61034
scale=.2+(.03*(time-30)),.2+(.03*(time-30))
[State 6100, shrink]
type=modifyexplod
trigger1=numexplod(61035)
ID=61035
scale=.2+(.03*(time-40)),.2+(.03*(time-40))

[State 6100, light]
type=helper
trigger1=!time&&(root,var(10)=[6,7])
helpertype=normal
stateno=6105
ID=6105
name="Super Charge"
postype=p1
ownpal=1
supermovetime=999

[State 6100, ten]
type=explod
trigger1=!time&&root,var(10)=7
anim=6201
ID=6201
sprpriority=5
postype=p1
facing=(facing=1)*2-1
removetime=-1
supermovetime=300
ownpal=1
[State 6100, spinten]
type=modifyexplod
trigger1=numexplod(6201)
ID=6201
scale=-.2+(.02*time),-1.5+(.042*time)

[State 6100, particles]
type=null;explod
trigger1=1
vel=-5+(random/100),-5+(random/100)
anim=ifelse(random<333,4108,ifelse(random<333,4210,6013))
sprpriority=5
postype=p1
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.2
supermovetime=99

[State 6100, noshadow]
type=assertspecial
trigger1=1
flag=noshadow
flag2=invisible
ignorehitpause=1
[State 6100, bound]
type=screenbound
trigger1=1
value=0

[State 6100, safety]
type=removeexplod
trigger1=root,var(10)=5&&time>=46
trigger2=root,var(10)=6&&time>=54
trigger3=root,var(10)=7&&time>=61
[State 6100, end]
type=destroyself
trigger1=root,var(10)=5&&time>=46
trigger2=root,var(10)=6&&time>=54
trigger3=root,var(10)=7&&time>=61


;========================<SUPERCHARGE LIGHT>=============================
[Statedef 6105]
physics=N
velset=0,0
anim=9741
[State 6105, var]
type=varset
trigger1=!time
var(0)=ifelse(parent,stateno=6102,2,1)

[State 6105, fade]
type=palfx
trigger1=!time&&root,var(10)=6
time=53
sinadd=-255,-255,-255,318
[State 6105, fade]
type=palfx
trigger1=!time&&root,var(10)=7
time=60
sinadd=-255,-255,-255,360

[State 6105, light]
type=explod
trigger1=!time
anim=6105
ID=6105
sprpriority=5
postype=p1
removetime=-2
supermovetime=300
[State 6105, light]
type=explod
trigger1=!time
anim=6106
ID=6105
sprpriority=5
postype=p1
removetime=-2
supermovetime=300
[State 6105, light]
type=explod
trigger1=!time
anim=6107
ID=6105
sprpriority=5
postype=p1
removetime=-2
supermovetime=300
[State 6105, light]
type=explod
trigger1=!time
anim=6108
ID=6105
sprpriority=5
postype=p1
removetime=-2
supermovetime=300

[State 6105, light]
type=explod
trigger1=!time&&root,var(10)=7
anim=6105
ID=6106
sprpriority=5
postype=p1
removetime=-2
supermovetime=300
[State 6105, light]
type=explod
trigger1=!time&&root,var(10)=7
anim=6106
ID=6106
sprpriority=5
postype=p1
removetime=-2
supermovetime=300
[State 6105, light]
type=explod
trigger1=!time&&root,var(10)=7
anim=6107
ID=6106
sprpriority=5
postype=p1
removetime=-2
supermovetime=300
[State 6105, light]
type=explod
trigger1=!time&&root,var(10)=7
anim=6108
ID=6106
sprpriority=5
postype=p1
removetime=-2
supermovetime=300

[State 6105, flip]
type=modifyexplod
trigger1=root,var(10)=7
ID=6105
scale=-1+(.04*time),1
[State 6105, flip]
type=modifyexplod
trigger1=root,var(10)=7
ID=6106
scale=1,-1+(.04*time)

[State 6105, particles]
type=explod
trigger1=1
vel=-5+(random/100),-5+(random/100)
anim=6013
sprpriority=5
postype=p1
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
supermovetime=99

[State 6105, noshadow]
type=assertspecial
trigger1=1
flag=noshadow
flag2=invisible
ignorehitpause=1
[State 6105, bound]
type=screenbound
trigger1=1
value=0
[State 6105, safety]
type=removeexplod
trigger1=root,var(10)=6&&time>=54
trigger2=root,var(10)=7&&time>=61
[State 6105, end]
type=destroyself
trigger1=root,var(10)=6&&time>=54
trigger2=root,var(10)=7&&time>=61


;========================<CUSTOM COMBO CHARGE>=============================
[Statedef 6150]
physics=N
velset=0,0
anim=9741

[State 6150, superchargebgpalfx]
type=bgpalfx
trigger1=!time
invertall=0
time=30
add=-255,-255,-255
sinadd=255,255,255,120
persistent=0

[State 6150, main]
type=explod
trigger1=!time
anim=6150
ID=6150
sprpriority=5
postype=p1
removetime=-2
supermovetime=300

[State 6150, circle]
type=explod
trigger1=time=18
anim=6151
ID=6151
sprpriority=5
postype=p1
removetime=-2
supermovetime=300
[State 6150, circle]
type=explod
trigger1=time=18
anim=6151
ID=61511
sprpriority=5
postype=p1
removetime=-2
supermovetime=300

[State 6150, shrinkcircle]
type=null;modifyexplod
trigger1=1
ID=6150
scale=1.25-(.06*time),1.2-(.06*time)

[State 6150, shrinkcircle]
type=modifyexplod
trigger1=time>=18
ID=6151
scale=.1+(.1*(time-18)),.1+(.1*(time-18))
[State 6150, shrinkcircle]
type=modifyexplod
trigger1=time>=18
ID=61511
scale=.1+(.033*(time-18)),.1+(.033*(time-18))

[State 6150, noshadow]
type=assertspecial
trigger1=1
flag=noshadow
flag2=invisible
ignorehitpause=1
[State 6150, bound]
type=screenbound
trigger1=1
value=0

[State 6150, safety]
type=removeexplod
trigger1=time>=30
[State 6110, end]
type=destroyself
trigger1=time>=30


;========================<ZERO COUNTER CHARGE>=============================
[Statedef 6120]
physics=N
velset=0,0
anim=9741

[State 6120, superchargebgpalfx]
type=bgpalfx
trigger1=!time
invertall=0
time=20
add=-255,-255,-255
sinadd=255,255,255,80
persistent=0

[State 6120, circle]
type=explod
trigger1=!time
anim=6120
ID=6120
sprpriority=5
postype=p1
pos=23,-74
removetime=-2
supermovetime=30
[State 6120, spark]
type=explod
trigger1=!time
anim=6010
ID=6120
sprpriority=5
postype=p1
pos=23,-74
removetime=-2
supermovetime=30
[State 6120, lightning]
type=explod
trigger1=!time
anim=4012
ID=6120
sprpriority=4
postype=p1
pos=23,0
removetime=8
supermovetime=30
[State 6120, particles]
type=explod
trigger1=1
vel=-.5+(random/1000),-.5-(random/1000)
accel=.1,-.2
anim=4013
sprpriority=4
postype=p1
pos=88,-100
random=130,200
facing=-1+(random<500)*2
removetime=-2
ownpal=1
scale=1,.15
supermovetime=30

[State 6120, dust]
type=explod
trigger1=!time
anim=6020
ID=6020
sprpriority=-2
postype=p1
pos=23,0
removetime=-2
supermovetime=30

[State 6120, noshadow]
type=assertspecial
trigger1=1
flag=noshadow
flag2=invisible
ignorehitpause=1
[State 6120, bound]
type=screenbound
trigger1=1
value=0

[State 6120, safety]
type=removeexplod
trigger1=time>=20
[State 6120, end]
type=destroyself
trigger1=time>=20


;========================<KANJI>=============================
[Statedef 6054]
physics=N
velset=0,0
anim=6054
sprpriority=-3
[State 6054, glow]
type=palfx
trigger1=!time
time=9999
add=50,0,0
sinadd=100,0,0,80
[State 6054, bind]
type=bindtoroot
trigger1=1
pos=ifelse((root,facing=1),0,32),0


;========================<KANJI B.G.>=============================
[Statedef 6200]
physics=N
velset=0,0
anim=9741

[State 6200, snd]
type=playsnd
trigger1=!time
value=6,4

[State 6200, black]
type=bgpalfx
trigger1=time<120
time=2
add=-255,-255,-255
[State 6200, black]
type=bgpalfx
trigger1=time=120
time=60
add=-255,-255,-255
sinadd=255,255,255,240
[State 6200, fade]
type=palfx
trigger1=time=120
time=60
sinadd=-255,-255,-255,240

[State 6200, kanji]
type=explod
trigger1=!time
anim=6200
ID=6200
sprpriority=-5
postype=left
pos=160,120
removetime=-2

[State 6200, shrink]
type=modifyexplod
trigger1=time<5
ID=6200
scale=10-time,10-time
[State 6200, shrink]
type=modifyexplod
trigger1=time>=5
ID=6200
scale=1,1

[State 6200, flamebg]
type=explod
trigger1=!time
anim=6203
ID=6203
sprpriority=5
postype=left
pos=0,0
bindtime=-1
removetime=-1
pausemovetime=300
supermovetime=300

[State 6200, particles]
type=explod
trigger1=time<120
vel=ceil((-500+random)/100),-ceil(random/100)
accel=(-500+random)/5000,.1
anim=6202
sprpriority=5
postype=left
pos=160,235
random=320,10
facing=-1+(random<500)*2
removetime=-2
scale=1,.15
pausemovetime=300
supermovetime=300

[State 6200, assert]
type=assertspecial
trigger1=1
flag=noshadow
flag2=invisible
flag3=nobardisplay
ignorehitpause=1
[State 6200, safety]
type=removeexplod
trigger1=time>=180
[State 6200, end]
type=destroyself
trigger1=time>=180


;========================<K.O. F.X.>=============================
[Statedef 6210]
physics=N
velset=0,0
anim=6210

[State 6210, snd]
type=playsnd
trigger1=!time
value=6,6

[State 6210, bgpalfx]
type=bgpalfx
trigger1=time<20
time=20
add=-255,-255,-255
sinadd=255,255,255,80
ignorehitpause=1
[State 6210, palfx]
type=palfx
trigger1=!time
time=40
sinadd=-255,-255,-255,160
ignorehitpause=1

[State 6210, main]
type=explod
trigger1=!time
anim=6210
ID=6210
sprpriority=-5
postype=left
pos=160,120
bindtime=-1
removetime=40
ownpal=0
pausemovetime=300
supermovetime=300
[State 6210, shrink]
type=modifyexplod
trigger1=time<=40
ID=6210
scale=.5+(.15*time),.5+(.15*time)

[State 6210, assert]
type=assertspecial
trigger1=1
flag=invisible
ignorehitpause=1