; _____________________________________
;| Shin Akuma by Phantom.of.the.Server & Modified by BeterHans |
; ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;==============================================================================================
;=======================================<HELPER STATES>========================================
;==============================================================================================

;========================<AI ACTIVATION>=============================
;Adapted from Winane's (http://www.mugenguild.com/winane)
[Statedef 9741]
type=A
movetype=I
physics=N
anim=9741
ctrl=0

[State 9741, wrong]
type=destroyself
trigger1= (parent,ID)!=(root,ID)
[State 9741, safety]
type=selfstate
trigger1= !ishelper
value=0

[State 9741, uglyhack]
type=varset
trigger1= !var(1)
var(2)=1
[State 9741, pausecheck]
type=varset
trigger1= gametime>root,var(58)
trigger2= !(root,alive)
trigger3= roundstate!=2
trigger4= root,var(59)
var(2)=1

[State 9741, facing]
type=turn
trigger1= var(9):=(facing!=root,facing)

[State 9741, dirturnonAI]
type=parentvarset
triggerall= !var(2) && !var(9)
trigger1= root,command="fwd"
trigger2= root,command="back"
trigger3= root,command="up"
trigger4= root,command="down"
var(59)=1
[State 9741, dirturnoffAI]
type=parentvarset
triggerall= !var(2) && !var(9) && (root,var(59)>=1)
trigger1= command="fwd" && root,command="fwd"
trigger2= command="back" && root,command="back"
trigger3= command="up" && root,command="up"
trigger4= command="down" && root,command="down"
var(59)=-1

[State 9741, buttonturnonAI]
type=parentvarset
triggerall= !var(2)
trigger1= root,command="a"
trigger2= root,command="b"
trigger3= root,command="c"
trigger4= root,command="x"
trigger5= root,command="y"
trigger6= root,command="z"
trigger7= root,command="start"
var(59)=1
[State 9741, buttonturnoffAI]
type=parentvarset
triggerall= !var(2) && (root,var(59)>=1)
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(59)=-1

[State 9741, unpausecheck]
type=varset
triggerall= var(2)
trigger1= root,command="fwd" || root,command="back" || root,command="up" || root,command="down"
trigger2= root,command="a" || root,command="b" || root,command="c"
trigger3= root,command="x" || root,command="y" || root,command="z"
trigger4= root,command="start"
trigger5= var(2)=1
trigger5= var(2):=0
var(2)=1

[State 9741, goodbye]
type=destroyself
triggerall= var(1):=1
trigger1= root,var(59)
trigger2= !(root,alive)
trigger3= roundstate!=2


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

[State 1005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
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, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
var(3)=1
ignorehitpause=1
[State 1005, timevar]
type=varadd
trigger1= time && var(1)<25
var(1)=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, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

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

[State 1005, hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr=S,SP
damage=ceil(ifelse(time<=1, 68, 54) * root,fvar(12)),9
animtype=Hard
hitflag=MAF
guardflag=MA
pausetime=0,4
sparkno=-1
guard.sparkno=s7001
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity= ifelse(var(1)<=12,-4,-10.52), ifelse(var(1)<=12,-2.5,0)
ground.cornerpush.veloff=0
air.velocity=-.75*vel x,-2
fall=var(1)<=12
air.fall=1
fall.recover=!(root,var(20))
fall.recovertime=ifelse(root,stateno=1000, -(root,animtime), 12)
getpower= ifelse(p2movetype=H,72,144)*!(root,var(20)), 36*!(root,var(20))
givepower=36,36
envshake.time=12
envshake.freq=100
envshake.ampl=4
sprpriority=4
airguard.ctrltime= 16
airguard.velocity= ifelse((root,var(20)),-4,-8), -1.5
forcestand=1

[State 1005, sparks]
type=explod
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
anim=7020+(random%8)
ID=7000
sprpriority=5
postype=left
pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

[State 1005, end]
type=changestate
trigger1= movecontact
value=1006
ignorehitpause=1
[State 1006, end]
type=destroyself
trigger1=pos x!=[-240,240]

[Statedef 1006]
type=A
physics=N
movetype=I
anim=3006
velset=0,0
ctrl=0
sprpriority=4
movehitpersist=1
[State 1006, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 1006, snd]
type=playsnd
trigger1= !time
value=5,1
ignorehitpause=1
persistent=0
[State 1006, end]
type=destroyself
trigger1= !animtime


;========================<SHAKUNETSU HADOU KEN>=============================
[Statedef 1025]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4

[State 1025, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(2)<var(10),1025,1026)
ignorehitpause=1
[State 1025,hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
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, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
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.25,3.5)))
y=0

[State 1025, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

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

[State 1025, hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr=S,SP
damage=ceil(ifelse(var(10)=1,74,ifelse(var(10)=2,44,44)) * root,fvar(12)),11
animtype=Back
hitflag=MAF
guardflag=MA
pausetime=4*(var(2)<var(10)),6
sparkno=-1
sparkxy=-10,0
guard.sparkno=s7001
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-4.5,-3
ground.cornerpush.veloff=0
guard.velocity= -10.52
air.velocity=-4.5,-3
fall=1
fall.recover=!(root,var(20))
fall.recovertime=ifelse(root,stateno=1020, -(root,animtime), 12)
getpower= ifelse(p2movetype=H,72,144)*!(root,var(20)), 36*!(root,var(20))
givepower=36,36
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
airguard.ctrltime= 16
airguard.velocity= ifelse((root,var(20)),-4,-8), -1.5
forcestand=1

[State 1025, sparks]
type=explod
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
anim=7020+(random%8)
ID=7000
sprpriority=5
postype=left
pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

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

[State 1025, end]
type=changestate
trigger1= movecontact
value=ifelse(var(2)<var(10),1025,1026)
[State 1025, end]
type=destroyself
trigger1=pos x!=[-240,240]

[Statedef 1026]
type=A
physics=N
movetype=I
anim=1026
ctrl=0
velset=0,0
sprpriority=4
[State 1026, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 1026, snd]
type=playsnd
trigger1= !time
value=5,2
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

[State 1055, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
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, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
var(3)=1
ignorehitpause=1

[State 1055, vel]
type=velset
trigger1= 1
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, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

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

[State 1055, hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr=A,SP
damage=ceil(47*root,fvar(12)),7
animtype=Hard
fall.animtype=Back
hitflag=MAFD
guardflag=HA
pausetime=0,8
sparkno=-1
sparkxy=-10,0
guard.sparkno=s7001
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=-7.51,0
guard.velocity= -10.52
ground.cornerpush.veloff=0
air.velocity=-1.5*vel x,-2
down.hittime=20
down.velocity=0,0
air.fall=1
fall.recover=!(root,var(20))
fall.recovertime=12
getpower= ifelse(p2movetype=H,72,144)*!(root,var(20)), 36*!(root,var(20))
givepower=36,36
envshake.time=12
envshake.freq=100
envshake.ampl=4
sprpriority=4
airguard.ctrltime= 16
airguard.velocity= ifelse((root,var(20)),-4,-8), -1.5
forcestand=1

[State 1055, sparks]
type=explod
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
anim=7020+(random%8)
ID=7000
sprpriority=5
postype=left
pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

[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=pos x!=[-240,240]

[Statedef 1056]
type=A
physics=N
movetype=I
anim=3056
velset=0,0
ctrl=0
sprpriority=4
movehitpersist=1
[State 1056, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 1056, snd]
type=playsnd
trigger1= !time
value=5,3
ignorehitpause=1
persistent=0
[State 1056, end]
type=destroyself
trigger1= !animtime

[Statedef 1057]
type=A
physics=N
movetype=I
anim=3057
velset=0,0
ctrl=0
sprpriority=4
[State 1057, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 1057, pos]
type=posset
trigger1= 1
y=0
[State 1057, snd]
type=playsnd
trigger1= !time
value=5,3
ignorehitpause=1
persistent=0
[State 1057, dust]
type=explod
trigger1= !time
anim=7104
ID=7104
sprpriority=-2
pos=0,0
vel=0,0
removetime=-2
ownpal=1
scale=.75,.75
pausemovetime=-1
supermovetime=-1
[State 1057, end]
type=destroyself
trigger1= !animtime


;========================<MESSATSU GOU HADOU>=============================
[Statedef 3005]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
 
[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(2)<8,3005,3006)
ignorehitpause=1
[State 3005,hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
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, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
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, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

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

[State 3005, hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr=S,HP
damage=ceil(25*root,fvar(12)),4
animtype=Back
hitflag=MAF
guardflag=MA
pausetime=4*(var(2)<8),6
sparkno=-1
sparkxy=-10,0
guard.sparkno=s7001
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity= ifelse(var(2)<8, -10.52, -6), ifelse(var(2)<8, 0, -4)
ground.cornerpush.veloff=0
air.velocity=-6,-4
guard.velocity= -10.52
fall=(var(2)>=8)
air.fall=1
fall.recover=0
getpower=0
givepower=36,36
envshake.time=16
envshake.freq=100
envshake.ampl=6
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
sprpriority=4
airguard.ctrltime= 16
airguard.velocity= ifelse((root,var(20)),-4,-8), -1.5
forcestand=1

[State 3005, sparks]
type=explod
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
anim=7030+(random%8)
ID=7000
sprpriority=5
postype=left
pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

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

[State 3005, end]
type=changestate
trigger1= movecontact
value=ifelse(var(2)<8,3005,3006)
[State 3005, end]
type=destroyself
trigger1=pos x!=[-280,280]

[Statedef 3006]
type=A
physics=N
movetype=I
anim=3006
ctrl=0
velset=0,0
sprpriority=4
[State 3006, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 3006, snd]
type=playsnd
trigger1= !time
value=5,1
ignorehitpause=1
persistent=0
[State 3006, end]
type=destroyself
trigger1= !animtime


;========================<TENMA GOU ZANKUU>=============================
[Statedef 3055]
type=A
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4

[State 3055, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=ifelse(var(2)<8,3055,3056)
ignorehitpause=1
[State 3055,hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
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, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
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, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

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

[State 3055, hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr=A,HP
damage=ceil(25*root,fvar(12)),4
animtype=Back
hitflag=MAFD
guardflag=HA
pausetime=4*(var(2)<8),6
sparkno=-1
sparkxy=-10,0
guard.sparkno=s7001
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity= ifelse(var(2)<8, -10.52, -4), ifelse(var(2)<8, 0, -2)
ground.cornerpush.veloff=0
air.velocity=-4,-2
down.velocity=0,0
down.hittime=20
guard.velocity= -10.52
fall=(var(2)>=8)
air.fall=1
fall.recover=0
getpower=0
givepower=36,36
envshake.time=16
envshake.freq=100
envshake.ampl=6
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
sprpriority=4
airguard.ctrltime= 16
airguard.velocity= ifelse((root,var(20)),-4,-8), -1.5
forcestand=1

[State 3055, sparks]
type=explod
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
anim=7030+(random%8)
ID=7000
sprpriority=5
postype=left
pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

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

[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 3055, end]
type=destroyself
trigger1=pos x!=[-280,280]

[Statedef 3056]
type=A
physics=N
movetype=I
anim=3056
ctrl=0
velset=0,0
sprpriority=4
[State 3056, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 3056, snd]
type=playsnd
trigger1= !time
value=5,3
ignorehitpause=1
persistent=0
[State 3056, end]
type=destroyself
trigger1= !animtime

[Statedef 3057]
type=A
physics=N
movetype=I
anim=3057
velset=0,0
ctrl=0
sprpriority=4
[State 3057, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
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, dust]
type=explod
trigger1= !time
anim=7104
ID=7104
sprpriority=-2
pos=0,0
vel=0,0
removetime=-2
ownpal=1
pausemovetime=-1
supermovetime=-1
[State 3057, end]
type=destroyself
trigger1= !animtime


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

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

[State 3075, strengthvar]
type=varset
trigger1= !time && !prevstateno
var(10)=6
[State 3075, movehitvar]
type=varset
triggerall= !var(3)
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
trigger2= numhelper(3075)
trigger2= helper(3075),var(3)
var(3)=1
ignorehitpause=1

[State 3075, vel1]
type=velset
trigger1= !time && (rootdist y>48)
x=7+random/333.3
y=3.5+random/666.7
[State 3075, vel2]
type=velset
trigger1= !time && (rootdist y<=48)
x=4+random/333.3
y=5+random/666.7
;x=y*1.425

[State 3075, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

[State 3075, hitsnd]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=2,7
channel=1
persistent=0
ignorehitpause=1

[State 3075, hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr=A,HP
damage=ceil(23*root,fvar(12)),3
animtype=Hard
fall.animtype=Back
hitflag=MAFD
guardflag=HA
pausetime=0,12
sparkno=-1
sparkxy=-10,0
guard.sparkno=s7001
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=-10,0
ground.cornerpush.veloff=0
air.velocity=-1,-.5
down.hittime=20
down.velocity=0,0
air.fall=1
fall.recover=0
getpower=0
givepower=36,36
envshake.time=12
envshake.freq=100
envshake.ampl=4
sprpriority=4
airguard.ctrltime= 16
airguard.velocity= ifelse((root,var(20)),-4,-8), -1.5
forcestand=1

[State 3075, sparks]
type=explod
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
anim=7030+(random%8)
ID=7000
sprpriority=5
postype=left
pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

[State 3075, end]
type=changestate
trigger1= movecontact
value=1056
ignorehitpause=1
[State 3075, end]
type=changestate
trigger1= pos y>=0
value=1057
ignorehitpause=1
[State 3075, end]
type=destroyself
trigger1=pos x!=[-240,240]


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

[State 4205, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

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

[State 4205, movehitvar]
type=varset
triggerall= !var(3)
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
trigger2= numhelper(4205)
trigger2= helper(4205),var(3)
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, hit]
type=hitdef
trigger1= animelem=1
attr=S,HA 
damage=ceil(70*root,fvar(12)),15
animtype=Up
guardflag=M
hitflag=MAFD 
priority=4,Hit 
pausetime=0,12
sparkno=-1
guard.sparkno=-1
hitsound=s2,7
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=ifelse(frontedgedist<backedgedist, 6, -6), -3
ground.cornerpush.veloff=0
air.velocity=ifelse(frontedgedist<backedgedist, 6, -6), -3
down.velocity=ifelse(frontedgedist<backedgedist, 6, -6), -3
getpower=0
givepower=36,36
guard.velocity= -10.52
fall=1
fall.recover=0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
sprpriority=4
forcestand=1

[State 4205, flames]
type=helper
triggerall= movehit && numtarget && numhelper(7181)<1
trigger1= !(target,time) && (target,movetype=H)
helpertype=normal
stateno=7181
ID=7181
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=explod
trigger1= movecontact=1 && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=ifelse(moveguarded,7001,7030+(random%8))
ID=7000
sprpriority=5
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
pausemovetime=100
supermovetime=100

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


;---SHOCKWAVES---
[Statedef 4206]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=5

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

[State 4206, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
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= movecontact && numtarget
trigger1= !(target,ishelper)
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, hitsnd]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=2,7
channel=1
ignorehitpause=1

[State 4206, hit]
type=hitdef
trigger1= animelemno(0)!=var(4)
trigger1= animelem=2 || animelem=3 || animelem=4 || animelem=5 || animelem=6 || animelem=7 || animelem=8 || animelem=9
attr=S,HA 
damage=ceil(70*root,fvar(12)),15
animtype=Hard
fall.animtype=Up
guardflag=M
hitflag=MAFD 
priority=4,Hit 
pausetime=0,1
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=ifelse((animelem=9),-12,-4),0
ground.cornerpush.veloff=0
air.velocity=-3,-12
getpower=0
givepower=36,36
fall=0
air.fall=1
fall.recover=0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=ifelse(p2statetype=A,74,30)
ID=4206+(facing=-1)
nochainID=4207-(facing=-1)
sprpriority=4
forcestand=1

[State 4206, flames]
type=helper
trigger1= movehit && numtarget && numhelper(7181)<1
trigger1= !(target,time) && (target,movetype=H)
helpertype=normal
stateno=7181
ID=7181
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=explod
trigger1= movecontact=1 && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=ifelse(moveguarded,7001,7030+(random%8))
ID=7000
sprpriority=5
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
pausemovetime=100
supermovetime=100

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


;========================<TENSHOU KAIREKI JIN>=============================
[Statedef 4305]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=5

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

[State 4305, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 4305, pos]
type=posset
trigger1= 1
y=0

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

[State 4305, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
var(3)=1
ignorehitpause=1
[State 4305, movehitvar2]
type=varset
trigger1= !time && prevstateno
var(4)=animelemno(0)
ignorehitpause=1

[State 4305, hitsnd]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=2,11
channel=1
ignorehitpause=1

[State 4305, hit]
type=hitdef
trigger1= animelemno(0)!=var(4) && animelem=2
attr=S,HA 
damage=ceil(60*root,fvar(12)),5
animtype=Hard
fall.animtype=Up
guardflag=M
hitflag=MAFD 
priority=4,Hit 
pausetime=0,0
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=ifelse(p2dist x>=30,1.5,ifelse(p2dist x<=-30,-1.5,ifelse((animelem=12),-3,0))),ifelse((animelem=12),-15,-10)
ground.cornerpush.veloff=0
air.velocity=ifelse(p2dist x>=30,1.5,ifelse(p2dist x<=-30,-1.5,ifelse((animelem=12),-3,0))),ifelse((animelem=12),-15,-10)
getpower=0
givepower=36,36
guard.velocity= -10.52
fall=1
fall.recover=0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=100
sprpriority=4
forcestand=1

[State 4305, hit]
type=hitdef
triggerall= animelemno(0)!=var(4)
trigger1= animelem=4 || animelem=6 || animelem=8 || animelem=10 || animelem=12
attr=S,HA 
damage=ceil(66*root,fvar(12)),5
animtype=Hard
fall.animtype=Up
guardflag=MA
hitflag=MAFD 
priority=4,Hit 
pausetime=0,0
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=ifelse((animelem=12),-3,0),ifelse((animelem=12),-15,-10)
ground.cornerpush.veloff=0
air.velocity=ifelse((animelem=12),-3,0),ifelse((animelem=12),-15,-10)
getpower=0
givepower=36,36
guard.velocity= -10.52
fall=1
fall.recover=0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=100
sprpriority=4
airguard.ctrltime= 16
airguard.velocity= ifelse((root,var(20)),-4,-8), -1.5
forcestand=1

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

[State 4305, sparks]
type=explod
trigger1= movecontact=1 && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=ifelse(moveguarded,7001,7030+(random%8))
ID=7000
sprpriority=5
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
pausemovetime=100
supermovetime=100

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


;========================<PURPLE DUST>=============================
[Statedef 4210]
physics=N
anim=9741
[State 4210, assert]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1
[State 4210, dust]
type=explod
trigger1= !time
anim=4210
ID=4210
sprpriority=-2
postype=p1
removetime=25
[State 4210, fade]
type=palfx
trigger1= !time
mul=384,384,384
sinadd=-255,-255,-255,100
time=25
[State 4210, shrink]
type=modifyexplod
trigger1= 1
ID=4210
scale=.5+(.1*time),.1+(.02*time)
[State 4210, end]
type=destroyself
trigger1= time>=26


;========================<TENMA SHINZUI WARI F.X.>=============================
[Statedef 3305]
physics=N
velset=0,0
anim=3305
sprpriority=3
[State 3305, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
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, end]
type=destroyself
trigger1= !animtime || root,stateno!=3300


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

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

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

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


;========================<S.G.S. GUARDED>=============================
[Statedef 4012]
physics=N
velset=0,0
anim=9741

[State 4012, bgpalfx]
type=bgpalfx
trigger1= !time
time=20
add=-255,-128,-64
sinadd=255,128,64,80
persistent=0
[State 4012, palfx]
type=palfx
trigger1= !time
time=24
sinadd=-255,-255,-255,96

[State 4012, thunder]
type=explod
trigger1= !time
anim=4012
ID=4012
sprpriority=-2
postype=p1
pos=0,-ceil(pos y)
removetime=-2
supermovetime=30
ownpal=1
[State 4012, circle]
type=explod
trigger1= !time
anim=7501
ID=4013
sprpriority=5
postype=p1
removetime=20
supermovetime=30

[State 4012, shrink]
type=modifyexplod
trigger1= numexplod(4013)
ID=4013
scale=.2+(.09*time),.2+(.09*time)
[State 4012, noshadow]
type=assertspecial
trigger1= 1
flag=invisible
ignorehitpause=1
[State 4012, end]
type=destroyself
trigger1= time>=24


;========================<AURA>=============================
[Statedef 6000]
physics=N
velset=0,0
anim=6000
sprpriority=-2
[State 6000, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 6000, var]
type=varset
trigger1= !time
var(0)=root,anim
[State 6000, image]
type=afterimage
trigger1= !time
time=999
timegap=1
framegap=1
length=2
palcontrast=100,100,100
trans=add
[State 6000, bind]
type=bindtoroot
trigger1= 1

[State 6000, end]
type=destroyself
trigger1= (root,anim)!=var(0)
trigger2= root,stateno=195 && root,animelemtime(19)>=0
trigger3= root,stateno=182 && 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
trigger7= root,stateno=193 && root,anim=193 && root,animelemtime(39)>=0


;========================<METSU>=============================
[Statedef 6002]
physics=N
velset=0,-.5
anim=6002
sprpriority=-1
[State 6002, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 6002, image]
type=afterimage
trigger1= !time
time=999
timegap=1
framegap=1
length=2
palcontrast=120,90,150
trans=add
[State 6002, image]
type=velset
trigger1= animelem=6
y=-2
[State 6002, fade]
type=palfx
trigger1= animelem=7
sinadd=-255,-255,-255,64
time=16

[State 6002, bind]
type=posset
trigger1= root,stateno=195 && root,movetype!=H
x= ceil(root,pos x) + ifelse(root,facing=-1, 5, -5)

[State 6002, end]
type=destroyself
trigger1= !animtime || root,movetype=H


;========================<KKZ AURA>=============================
[Statedef 4203]
physics=N
velset=0,0
anim=4203
sprpriority=0
[State 4203, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1
[State 4203, image]
type=afterimage
trigger1= !time
time=999
timegap=1
framegap=1
length=2
palcontrast=100,100,100
trans=add
[State 4203, bind]
type=bindtoroot
trigger1= 1
time=-1
[State 4203, end]
type=destroyself
trigger1= root,stateno!=4200 || root,anim!=4200
trigger2= root,stateno=4200 && root,animelemtime(19)>=0
trigger3= !animtime


;========================<Fake Hadouken 1>=============================
[Statedef 3051]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4

[State 3051, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=3051

[state 3051, assert]
type=assertspecial
trigger1=1
flag=noshadow

[State 3051,hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 3051, assert]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

[State 3051, bind]
type=bindtoroot
trigger1= 1
pos=69,-66

[State 3051, strengthvar]
type=varset
trigger1= var(10)!=7
var(10)=7

[State 3051, anim]
type=changeanim
trigger1= !time && !prevstateno
value=3051

[State 3051, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
var(3)=1
ignorehitpause=1

[State 3051, movehitvar2]
type=varset
trigger1= !time && prevstateno
var(4)=animelemno(0)
ignorehitpause=1

[State 3051, bgpal]
type=bgpalfx
trigger1= 1
mul=128,128,128
add=-100,-100,-100
time=2
color=20

[State 3051, hitsnd]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=2,7
channel=1
ignorehitpause=1

[State 3051, hit]
type=hitdef
triggerall= animelemno(0)!=var(4)
trigger1= animelem=1 || animelem=2 || animelem=3 || animelem=4 || animelem=5 || animelem=6 || animelem=7|| animelem=8 || animelem=9 || animelem=10
trigger2= animelem=11|| animelem=12|| animelem=13 || animelem=14 || animelem=15 || animelem=16 || animelem=17|| animelem=18 || animelem=19 || animelem=20
trigger3= animelem=21|| animelem=22|| animelem=23 || animelem=24 || animelem=25 || animelem=26
attr=S,HP 
damage=ceil(33*root,fvar(12)),7
animtype=Hard 
fall.animtype=Hard 
hitflag=MAFD
guardflag=M
priority=7,Hit 
pausetime=2,2
guard.dist=320
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-20,0
ground.cornerpush.veloff=0
guard.velocity= -10.52
air.velocity=-20,-.5
down.velocity=-20,-3
getpower=0
givepower=26,26
fall=1
fall.recover=0
sprpriority=4
yaccel=.5
forcestand=1

[State 3051, hit]
type=hitdef
trigger1= animelemno(0)!=var(4)
trigger1= animelem=27
attr=S,HP 
damage=ceil(44*root,fvar(12)),7
animtype=Diagup
fall.animtype=Diagup
hitflag=MAFD
priority=7,Hit 
pausetime=2,2
guard.dist=320
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-20,0
ground.cornerpush.veloff=0
guard.velocity= -10.52
air.velocity=-20,-9
down.velocity=-20,-9
getpower=0
givepower=36,36
fall=1
fall.recover=0
sprpriority=4
yaccel=.5
forcestand=1

[State 3051, sparks]
type=explod
trigger1= movecontact=1 && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=ifelse(moveguarded,7001,7030+(random%8))
ID=7000
sprpriority=5
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
pausemovetime=100
supermovetime=100

[state 3501, saflty]
type=destroyself
trigger1= (root,stateno!=3041) && time>12

[state 3051, end]
type=destroyself
trigger1= !animtime

;========================<Fake Hadouken 2>=============================
[Statedef 3052]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4

[State 3052, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=3052

[state 3052, assert]
type=assertspecial
trigger1=1
flag=noshadow

[State 3052,hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 3052, assert]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

[State 3052, bind]
type=bindtoroot
trigger1= 1
pos=69,-66

[State 3052, strengthvar]
type=varset
trigger1= var(10)!=7
var(10)=7

[State 3052, anim]
type=changeanim
trigger1= !time && !prevstateno
value=3052

[State 3052, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
var(3)=1
ignorehitpause=1

[State 3052, movehitvar2]
type=varset
trigger1= !time && prevstateno
var(4)=animelemno(0)
ignorehitpause=1

[State 3052, bgpal]
type=bgpalfx
trigger1= 1
mul=128,128,128
add=-100,-100,-100
time=2
color=20

[State 3052, hitsnd]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=2,7
channel=1
ignorehitpause=1

[State 3052, hit]
type=hitdef
triggerall= animelemno(0)!=var(4)
trigger1= animelem=1 || animelem=2 || animelem=3 || animelem=4 || animelem=5 || animelem=6 || animelem=7|| animelem=8 || animelem=9 || animelem=10
trigger2= animelem=11|| animelem=12|| animelem=13 || animelem=14 || animelem=15 || animelem=16 || animelem=17|| animelem=18 || animelem=19 || animelem=20
trigger3= animelem=21|| animelem=22|| animelem=23 || animelem=24 || animelem=25 || animelem=26 || animelem=27 || animelem=28 || animelem=29 || animelem=30
trigger4= animelem=31|| animelem=32|| animelem=33 || animelem=34 || animelem=35 || animelem=36 || animelem=37 || animelem=38 || animelem=39
attr=S,HP 
damage=ceil(44*root,fvar(12)),9
animtype=Hard 
fall.animtype=Hard 
hitflag=MAFD
guardflag=M
priority=7,Hit 
pausetime=2,2
guard.dist=320
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-20,0
ground.cornerpush.veloff=0
guard.velocity= -10.52
air.velocity=-20,-.5
down.velocity=-20,-3
getpower=0
givepower=26,26
fall=1
fall.recover=0
sprpriority=4
yaccel=.5
forcestand=1

[State 3052, hit]
type=hitdef
trigger1= animelemno(0)!=var(4)
trigger1= animelem=40
attr=S,HP 
damage=ceil(47*root,fvar(12)),10
animtype=Diagup
fall.animtype=Diagup
hitflag=MAFD
priority=7,Hit 
pausetime=2,2
guard.dist=320
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-20,0
ground.cornerpush.veloff=0
guard.velocity= -10.52
air.velocity=-20,-9
down.velocity=-20,-9
getpower=0
givepower=36,36
fall=1
fall.recover=0
sprpriority=4
yaccel=.5
forcestand=1

[State 3052, sparks]
type=explod
trigger1= movecontact=1 && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=ifelse(moveguarded,7001,7030+(random%8))
ID=7000
sprpriority=5
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
pausemovetime=100
supermovetime=100

[state 3502, saflty]
type=destroyself
trigger1= (root,stateno!=3041) && time>12

[state 3052, end]
type=destroyself
trigger1= !animtime

;========================<Fake Hadouken 3>=============================
[Statedef 3053]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4

[State 3053, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=3053

[state 3053, assert]
type=assertspecial
trigger1=1
flag=noshadow

[State 3053,hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 3053, assert]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256
ignorehitpause=1

[State 3053, bind]
type=bindtoroot
trigger1= 1
pos=69,-66

[State 3053, strengthvar]
type=varset
trigger1= var(10)!=7
var(10)=7

[State 3053, anim]
type=changeanim
trigger1= !time && !prevstateno
value=3053

[State 3053, movehitvar]
type=varset
trigger1= movecontact && numtarget
trigger1= !(target,ishelper)
var(3)=1
ignorehitpause=1

[State 3053, movehitvar2]
type=varset
trigger1= !time && prevstateno
var(4)=animelemno(0)
ignorehitpause=1

[State 3053, bgpal]
type=bgpalfx
trigger1= 1
mul=128,128,128
add=-100,-100,-100
time=2
color=20

[State 3053, hitsnd]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=2,7
channel=1
ignorehitpause=1

[State 3053, hit]
type=hitdef
triggerall= animelemno(0)!=var(4)
trigger1= animelem=1 || animelem=2 || animelem=3 || animelem=4 || animelem=5 || animelem=6 || animelem=7|| animelem=8 || animelem=9 || animelem=10
trigger2= animelem=11|| animelem=12|| animelem=13 || animelem=14 || animelem=15 || animelem=16 || animelem=17|| animelem=18 || animelem=19 || animelem=20
trigger3= animelem=21|| animelem=22|| animelem=23 || animelem=24 || animelem=25 || animelem=26 || animelem=27 || animelem=28 || animelem=29 || animelem=30
trigger4= animelem=31|| animelem=32|| animelem=33 || animelem=34 || animelem=35 || animelem=36 || animelem=37 || animelem=38 || animelem=39 || animelem=40
trigger5= animelem=41|| animelem=42|| animelem=43 || animelem=44 || animelem=45 || animelem=46 || animelem=47 || animelem=48 || animelem=49 || animelem=50
trigger6= animelem=51|| animelem=52|| animelem=53 
attr=S,HP 
damage=ceil(55*root,fvar(12)),10
animtype=Hard 
fall.animtype=Hard 
hitflag=MAFD
priority=7,Hit 
pausetime=2,2
guard.dist=320
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-20,0
ground.cornerpush.veloff=0
guard.velocity= -10.52
air.velocity=-20,-.5
down.velocity=-20,-3
getpower=0
givepower=26,26
fall=1
fall.recover=0
sprpriority=4
yaccel=.5
forcestand=1

[State 3053, hit]
type=hitdef
trigger1= animelemno(0)!=var(4)
trigger1= animelem=54
attr=S,HP 
damage=ceil(100*root,fvar(12)),20
animtype=Diagup
fall.animtype=Diagup
hitflag=MAFD
priority=7,Hit 
pausetime=2,2
guard.dist=320
sparkno=-1
guard.sparkno=-1
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity=-20,0
ground.cornerpush.veloff=0
guard.velocity= -10.52
air.velocity=-20,-9
down.velocity=-20,-9
getpower=0
givepower=36,36
fall=1
fall.recover=0
sprpriority=4
yaccel=.5
forcestand=1

[State 3053, sparks]
type=explod
trigger1= movecontact=1 && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=ifelse(moveguarded,7001,7030+(random%8))
ID=7000
sprpriority=5
postype=p2
pos=(target,const(size.ground.front)-10),(target,const(size.mid.pos.y))
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
pausemovetime=100
supermovetime=100

[state 3503, saflty]
type=destroyself
trigger1= (root,stateno!=3041) && time>12

[state 3053, end]
type=destroyself
trigger1= !animtime


;========================<RED PARTICLES>=============================
[Statedef 6021]
physics=N
anim=6021
sprpriority=4
[State 6021, assert]
type=assertspecial
trigger1= 1
flag=noshadow
[State 6021, assert]
type=assertspecial
trigger1= !time
flag=invisible
[State 6021, fade]
type=palfx
trigger1= !time
add=-255,-255,-255
sinadd=255,255,255,40
time=10
[State 6021, vel]
type=velset
trigger1= !time
x=(rootdist x+16)/36.0
y=(rootdist y-79)/36.0
[State 6021, end]
type=destroyself
trigger1= !animtime


;========================<VEGA>=============================
[Statedef 6100]
physics=N
velset=0,0
anim=6100
sprpriority=4
[State 6100, exists]
type=parentvarset
trigger1= playerIDexist(parent,ID)
var(51)=1
[State 6100, offset]
type=offset
trigger1= 1
y=6
[State 6100, snd]
type=playsnd
trigger1= time=5
value=6,random<500
channel=0
[State 6100, blood]
type=explod
trigger1= animelem=9
anim=6105
ID=6105
sprpriority=5
postype=p1
bindtime=-1
[State 6100, snd]
type=playsnd
trigger1= animelem=9
value=2,8
[State 6100, snd]
type=playsnd
trigger1= animelem=12
value=6,11
channel=0
[State 6100, gone]
type=destroyself
triggerall= numenemy
trigger1= enemy,name="Shin Gouki" && enemy,authorname="Phantom.of.the.Server" && enemy,numhelper(6100)
trigger2= enemy,name="Vega" && enemy,authorname="Phantom.of.the.Server"
trigger3= enemy,name="cvsvega" && (enemy,authorname="Warusaki3" || enemy,authorname!="Gargoyle")
trigger4= enemy,name="M. Bison" && enemy,authorname="VK, Updated by Terry Kuo, adapted by Tenebrous"
trigger5= enemy,name="M.Bison" && enemy,authorname="N-Mario"
trigger6= enemy,name="CvSBison" && enemy,authorname="Team Kai (Saiai and Koga)"
trigger7= enemy,name="[Necromancer's] M. Bison" || enemy,name="Sevil Nahte"


;---DEAD---
[Statedef 6101]
physics=N
velset=0,0
anim=6101
sprpriority=4
[State 6101, offset]
type=offset
trigger1= 1
y=6
[State 6101, snd]
type=stopsnd
trigger1= !time
channel=0
[State 6101, exists]
type=parentvarset
trigger1= playerIDexist(parent,ID)
var(51)=1
[State 6101, gone]
type=destroyself
triggerall= numenemy
trigger1= enemy,name="Shin Gouki" && enemy,authorname="Phantom.of.the.Server" && enemy,numhelper(6100)
trigger2= enemy,name="Vega" && enemy,authorname="Phantom.of.the.Server"
trigger3= enemy,name="cvsvega" && (enemy,authorname="Warusaki3" || enemy,authorname!="Gargoyle")
trigger4= enemy,name="M. Bison" && enemy,authorname="VK, Updated by Terry Kuo, adapted by Tenebrous"
trigger5= enemy,name="M.Bison" && enemy,authorname="N-Mario"
trigger6= enemy,name="CvSBison" && enemy,authorname="Team Kai (Saiai and Koga)"
trigger7= enemy,name="[Necromancer's] M. Bison" || enemy,name="Sevil Nahte"


;========================<JUMP DUST>=============================
[Statedef 7100]
physics=N
velset=0,0
anim=9741
[State 7100, bind]
type=bindtoroot
trigger1= time
[State 7100, dust]
type=explod
trigger1= !time
anim=7100
ID=7100
sprpriority=3
postype=p1
scale=.5,.5
pausemovetime=-1
supermovetime=-1
[State 7100, dust]
type=explod
trigger1= !time || time=2 || time=6
anim=7101
ID=7100
sprpriority=3
postype=p1
scale=.5,.5
pausemovetime=-1
supermovetime=-1
[State 7100, assert]
type=assertspecial
trigger1= 1
flag=invisible
[State 7100, end]
type=destroyself
trigger1= time>=7


;========================<FIRE>=============================
;---RED---
[Statedef 7180]
physics=N
velset=0,0
anim=9741
sprpriority=4
[State 7180, assert]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1
[State 7180, flames]
type=explod
trigger1= 1
anim=7180
ID=7180
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
scale=.5,.5
ownpal=1
[State 7180, pos]
type=posadd
trigger1= 1
x=ceil(p2dist x)
y=ceil(p2dist y)
[State 7180, end]
type=destroyself
trigger1= time>=120
trigger2= enemynear,ctrl || (enemynear,movetype!=H) || (enemynear,statetype=L)


;---PURPLE---
[Statedef 7181]
physics=N
velset=0,0
anim=9741
sprpriority=4
[State 7181, assert]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1
[State 7181, flames]
type=explod
trigger1= 1
anim=7181
ID=7181
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
scale=.5,.5
ownpal=1
[State 7181, pos]
type=posadd
trigger1= 1
x=ceil(p2dist x)
y=ceil(p2dist y)
[State 7181, end]
type=destroyself
trigger1= time>=120
trigger2= enemynear,ctrl || (enemynear,movetype!=H) || (enemynear,statetype=L)


;========================<SUPER CHARGE>=============================
[Statedef 7500]
physics=N
velset=0,0
anim=9741

[State 7500, Lv1]
type=bgpalfx
trigger1= time<=10 && root,var(10)=5
time=1
add=256-ceil(25.6*time),256-ceil(25.6*time),256-ceil(25.6*time)
mul=256-floor(25.6*time),256-floor(25.6*time),256
color=256-floor(25.6*time)
[State 7500, Lv1]
type=bgpalfx
trigger1= (time=[11,39])  && root,var(10)=5
time=1
mul=0,0,256
color=0
[State 7500, Lv1]
type=bgpalfx
trigger1= time>=40 && root,var(10)=5
time=1
mul=ceil(51.2*(time-40)),ceil(51.2*(time-40)),256
color=floor(51.2*(time-40))

[State 7500, Lv2]
type=bgpalfx
trigger1= time<=15 && root,var(10)=6
time=1
add=256-ceil(17.07*time),256-ceil(17.07*time),256-ceil(17.07*time)
mul=256-floor(17.07*time),256-floor(17.07*time),256
color=256-floor(17.07*time)
[State 7500, Lv2]
type=bgpalfx
trigger1= (time=[16,47]) && root,var(10)=6
time=1
mul=0,0,256
color=0
[State 7500, Lv2]
type=bgpalfx
trigger1= time>=48 && root,var(10)=6
time=1
mul=ceil(51.2*(time-48)),ceil(51.2*(time-48)),256
color=floor(51.2*(time-48))

[State 7500, Lv3]
type=bgpalfx
trigger1= time<=20 && root,var(10)=7
time=1
add=256-ceil(12.8*time),256-ceil(12.8*time),256-ceil(12.8*time)
mul=256-floor(12.8*time),256-floor(12.8*time),256-floor(12.8*time)
color=256-floor(12.8*time)
[State 7500, Lv3]
type=bgpalfx
trigger1= (time=[21,54])  && root,var(10)=7
time=1
mul=0,0,0
color=0
[State 7500, Lv3]
type=bgpalfx
trigger1= time>=55 && root,var(10)=7
time=1
mul=ceil(51.2*(time-55)),ceil(51.2*(time-55)),ceil(51.2*(time-55))
color=floor(51.2*(time-55))

[State 7500, spiral]
type=helper
trigger1= !time && root,var(10)>=6
helpertype=normal
stateno=7509
ID=7509
name="Super Charge Spiral"
postype=p1
pausemovetime=255
supermovetime=255
ownpal=1

[State 7500, Main]
type=explod
trigger1= !time
anim=7500
ID=7500
sprpriority=5
postype=p1
removetime=-1
pausemovetime=-1
supermovetime=-1
[State 7500, Large Circle]
type=explod
trigger1= !time
anim=7501
ID=7501
sprpriority=5
postype=p1
pausemovetime=-1
supermovetime=-1

[State 7500, Portrait]
type=explod
trigger1= time=1 && root,var(10)=7
anim=7510
ID=7510
postype=back
pos=160,120
under=1
bindtime=-1
pausemovetime=-1
supermovetime=-1

[State 7500, ChaoJia]
type=explod
trigger1= (root,animelem=3) && root,var(10)=5 && (root,stateno=3040)
anim=7606
ID=7606
postype=left
pos=160,100
scale=0.35, 0.35
under=1
bindtime=-1
pausemovetime=-1
supermovetime=-1

[State 7500, scaleChaojia]
type=modifyexplod
trigger1= numexplod(7606) && time>=36
ID=7606
postype=left
pos=160-(80*(time-36)),100
scale=0.35+(.5*(time-36)), 0.35+(.5*(time-36))
trans=addalpha
alpha=256-ceil(25.6*(time-36)),256

[State 7500, Circle]
type=explod
trigger1= !time
anim=7502
ID=75021
sprpriority=5
postype=p1
pausemovetime=-1
supermovetime=-1
[State 7500, Circle]
type=explod
trigger1= time=7
anim=7502
ID=75022
sprpriority=5
postype=p1
pausemovetime=-1
supermovetime=-1
[State 7500, Circle]
type=explod
trigger1= time=14
anim=7502
ID=75023
sprpriority=5
postype=p1
pausemovetime=-1
supermovetime=-1
[State 7500, Circle]
type=explod
trigger1= time=21
anim=7502
ID=75024
sprpriority=5
postype=p1
pausemovetime=-1
supermovetime=-1
[State 7500, Circle]
type=explod
trigger1= time=28
anim=7502
ID=75025
sprpriority=5
postype=p1
pausemovetime=-1
supermovetime=-1

[State 7500, scale]
type=modifyexplod
trigger1= root,var(10)=5
ID=7500
scale=1.5-(.0333*time),1.5-(.0333*time)
[State 7500, scale]
type=modifyexplod
trigger1= root,var(10)=6
ID=7500
scale=1.5-(.0283*time),1.5-(.0283*time)
[State 7500, scale]
type=modifyexplod
trigger1= root,var(10)=7
ID=7500
scale=1.5-(.025*time),1.5-(.025*time)

[State 7500, scale]
type=modifyexplod
trigger1= numexplod(7501)
ID=7501
scale=.25+(.075*time),.25+(.075*time)
trans=addalpha
alpha=ceil(256-6.4*time),256

[State 7500, scale]
type=modifyexplod
trigger1= numexplod(7510) && time<8
ID=7510
postype=back
pos=16,120
scale=.5,.5
trans=addalpha
alpha=(32*time),256
[State 7500, scale]
type=modifyexplod
trigger1= numexplod(7510) && (time=[8,50])
ID=7510
postype=back
pos=160,120
scale=.5,.5
trans=addalpha
alpha=256,256
[State 7500, scale]
type=modifyexplod
trigger1= numexplod(7510) && time>=50
ID=7510
postype=back
pos=160,120+(8*(time-50))
scale=.5+(.25*(time-50)),.5+(.25*(time-50))
trans=addalpha
alpha=256-ceil(25.6*(time-50)),256

[State 7500, scale]
type=modifyexplod
trigger1= numexplod(75021)
ID=75021
scale=.25+(.0375*time),.25+(.0375*time)
[State 7500, scale]
type=modifyexplod
trigger1= numexplod(75022)
ID=75022
scale=.25+(.0375*(time-7)),.25+(.0375*(time-7))
[State 7500, scale]
type=modifyexplod
trigger1= numexplod(75023)
ID=75023
scale=.25+(.0375*(time-14)),.25+(.0375*(time-14))
[State 7500, scale]
type=modifyexplod
trigger1= numexplod(75024)
ID=75024
scale=.25+(.0375*(time-21)),.25+(.0375*(time-21))
[State 7500, scale]
type=modifyexplod
trigger1= numexplod(75025)
ID=75025
scale=.25+(.0375*(time-28)),.25+(.0375*(time-28))

[State 7500, Safety]
type=assertspecial
trigger1= 1
flag=noshadow
flag2=invisible
[State 7500, No bars]
type=assertspecial
trigger1= root,var(10)=7
flag=nobardisplay
flag2=noFG

[State 7500, Safety]
type=removeexplod
trigger1= root,var(10)=5 && time>=45
trigger2= root,var(10)=6 && time>=53
trigger3= time>=60
[State 7500, End]
type=destroyself
trigger1= root,var(10)=5 && time>=45
trigger2= root,var(10)=6 && time>=53
trigger3= time>=60


;---Spiral---
[Statedef 7509]
physics=N
anim=7509
sprpriority=5
[State 7509, assert]
type=assertspecial
trigger1= 1
flag=noshadow

[State 7509, Spin]
type=angleset
trigger1= 1
value=-6*(random%60)
[State 7509, Spin]
type=angleadd
trigger1= 1
value=-6

[State 7509, Angle]
type=angledraw
trigger1= root,var(10)=6
scale=1-(time/53.0),1-(time/53.0)
[State 7509, Trans]
type=trans
trigger1= root,var(10)=6
trans=addalpha
alpha=floor(4.83*time),256

[State 7509, Angle]
type=angledraw
trigger1= root,var(10)=7
scale=1-(time/60.0),1-(time/60.0)
[State 7509, Trans]
type=trans
trigger1= root,var(10)=7
trans=addalpha
alpha=floor(4.267*time),256

[State 7509, end]
type=destroyself
trigger1= root,var(10)=6 && time>=54
trigger2= time>=61


;========================<POWER CHARGE>=============================
;---MAIN FX---
[Statedef 7240]
type=S
anim=7240
velset=0,0
ctrl=0

[State 7240, bind]
type=bindtoroot
trigger1= (root,stateno=740) && (root,anim=740)
pos=-4,0
[State 7240, snd]
type=playsnd
trigger1= !time
value=7,4
channel=0

[State 7240, aura]
type=explod
trigger1= !numexplod(7242)
ID=7242
anim=7242
sprpriority=3
postype=p1
bindtime=-1
removetime=-1
pausemovetime=-1
supermovetime=-1
scale=.5,.5
ownpal=1

[State 7240, fx]
type=modifyexplod
trigger1= numexplod(7242) && (root,power<3000)
ID=7242
scale=.5,.1+.4*(root,power/3000.0)
[State 7240, fx]
type=modifyexplod
trigger1= numexplod(7242) && (root,power>=3000)
ID=7242
scale=.5,.5

[State 7240, noshadow]
type=assertspecial
trigger1= 1
flag=noshadow

[State 7240, end]
type=stopsnd
trigger1= (root,stateno!=740) || (root,anim!=740) || (root,movetype=H)
channel=0
[State 7240, end]
type=removeexplod
trigger1= (root,stateno!=740) || (root,anim!=740) || (root,movetype=H)
[State 7240, end]
type=destroyself
trigger1= (root,stateno!=740) || (root,anim!=740) || (root,movetype=H)


;---PARTICLES---
[Statedef 7243]
type=S
anim=9741
velset=0,0
ctrl=0

[State 7243, bind]
type=bindtoroot
trigger1= !(time%4)
pos=ceil(-84+(random/6.25)),ceil(24-(random/6.25))

[State 7243, particle]
type=explod
trigger1= (time%4)=1
anim=7243
sprpriority=ifelse(random<750,5,-1)
postype=p1
vel=((rootdist x-4)/16.0),((rootdist y-56)/16.0)
scale=ifelse(random<500,.5,-.5),ifelse(random<500,.5,-.5)
removetime=16
pausemovetime=-1
supermovetime=-1

[State 7243, end]
type=removeexplod
trigger1= (root,stateno!=740) || (root,anim!=740) || (root,movetype=H)
[State 7243, end]
type=destroyself
trigger1= (root,stateno!=740) || (root,anim!=740) || (root,movetype=H)


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

[State 7250, bgpalfx]
type=bgpalfx
trigger1= !time
time=20
add=-255,-128,-64
sinadd=255,128,64,80
persistent=0
[State 7250, palfx]
type=palfx
trigger1= !time
time=20
sinadd=-255,-255,-255,80

[State 7250, thunder]
type=explod
trigger1= !time
anim=7250
ID=7250
sprpriority=-2
postype=p1
pos=0,-ceil(pos y)
removetime=-2
supermovetime=30
ownpal=1
[State 7250, circle]
type=explod
trigger1= !time
anim=7251
ID=7251
sprpriority=5
postype=p1
removetime=20
supermovetime=30

[State 7250, shrink]
type=modifyexplod
trigger1= numexplod(7251)
ID=7251
scale=.2+(.09*time),.2+(.09*time)
[State 7250, noshadow]
type=assertspecial
trigger1= 1
flag=noshadow
flag2=invisible
ignorehitpause=1
[State 7250, end]
type=destroyself
trigger1= time>=20


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

[State 7260, bgpalfx]
type=bgpalfx
trigger1= !time
time=30
add=-255,-255,-128
sinadd=255,255,128,120
[State 7260, palfx]
type=palfx
trigger1= time=20
time=11
sinadd=-255,-255,-255,40
persistent=0

[State 7260, main]
type=explod
trigger1= !time
anim=7260
ID=7260
sprpriority=5
postype=p1
removetime=20
supermovetime=300
[State 7260, sphere]
type=explod
trigger1= !time
anim=7500
ID=7261
sprpriority=5
postype=p1
removetime=-1
supermovetime=300
[State 7260, circle]
type=explod
trigger1= time=20
anim=7501
ID=7262
sprpriority=5
postype=p1
removetime=-1
supermovetime=300

[State 7260, shrinkcircle]
type=modifyexplod
trigger1= 1
ID=7260
scale=2-(.1*time),2-(.1*time)
[State 7260, shrinkcircle]
type=modifyexplod
trigger1= 1
ID=7261
scale=.017*time,.017*time
[State 7260, shrinkcircle]
type=modifyexplod
trigger1= time>=20
ID=7262
scale=.1+(.1*(time-20)),.1+(.1*(time-20))

[State 7260, noshadow]
type=assertspecial
trigger1= 1
flag=noshadow
flag2=invisible
ignorehitpause=1
[State 7260, bound]
type=screenbound
trigger1= 1
value=0
[State 7260, safety]
type=removeexplod
trigger1= time>=30
[State 6110, end]
type=destroyself
trigger1= time>=30


;========================<COUNTER F.X.>=============================
[Statedef 7400]
type=A
physics=N
anim=9741

[State 7400, superchargebgpalfx]
type=allpalfx
trigger1= !time
time=8
add=255,255,255
sinadd=-255,-255,-255,32

[State 7400, slow]
type=pause
trigger1= time<8
time=1

[State 7400, end]
type=destroyself
trigger1= time>=8


;========================<SUPER FINISH>=============================
[Statedef 7600]
type=A
velset=0,0
anim=9741
[State 7600, bind]
type=posset
trigger1= 1
x=0
y=ceil(pos y-screenpos y)+120

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

[State 7600, bgpalfx]
type=bgpalfx
trigger1= time<10
time=1
mul=0,0,0
[State 7600, bgpalfx]
type=bgpalfx
trigger1= time=[10,20]
time=1
mul=(time-10)*25,(time-10)*25,(time-10)*25

[State 7600, mvc]
type=explod
trigger1= !time
anim=7601
ID=7601
ontop=1
postype=left
bindtime=-1
removetime=20
pausemovetime=-1
supermovetime=-1
[State 7600, fade]
type=modifyexplod
trigger1= numexplod(7601)
ID=7601
trans=addalpha
alpha=ifelse(time<10,256,ceil(256-(time-10)*25.6)),256

[State 7600, circle]
type=explod
trigger1= !time
anim=7600
ID=7600
sprpriority=-255
postype=left
pos=160,120
bindtime=-1
removetime=20
pausemovetime=-1
supermovetime=-1
[State 7600, scale]
type=modifyexplod
trigger1= numexplod(7600)
ID=7600
scale=(.25*time),(.25*time)
trans=addalpha
alpha=ceil(256-12.8*time),256

[State 7600, ten]
type=explod
trigger1= !time && (root,stateno!=3041)
anim=7605
ID=7605
sprpriority=-5
postype=left
pos=160,120
scale=.5,.5
bindtime=-1
removetime=40
pausemovetime=-1
supermovetime=-1
[State 7600, shrink]
type=modifyexplod
trigger1= numexplod(7605)
ID=7605
scale=(.2*time),(.2*time)
trans=addalpha
alpha=ceil(256-12.8*time),256

[State 7600, haoshuangbo]
type=explod
trigger1= time=1 && (root,stateno=3041) 
anim=7607
ID=7607
sprpriority=-5
postype=left
pos=160,80
scale=.18,.18
bindtime=-1
removetime=40
pausemovetime=-1
supermovetime=-1

[State 7600, modifyhaoshuangbo]
type=modifyexplod
trigger1= numexplod(7607)
ID=7607
scale=0.18+(.012*time), 0.18+(.012*time)
trans=addalpha
alpha=ceil(256-12.8*time),256

[State 7600, safety]
type=removeexplod
trigger1= time>20 && numexplod
trigger2= roundstate<3
[State 7600, nobars]
type=assertspecial
trigger1= time<=20
flag=nobardisplay
flag2=noFG
flag3=globalnoshadow

[State 7600, end]
type=destroyself
trigger1= roundstate<3


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

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


;========================<KANJI B.G.>=============================
[Statedef 7610]
physics=N
velset=0,0
anim=9741
[State 7610, assert]
type=assertspecial
trigger1= time<120
flag=nomusic
[State 7610, snd]
type=playsnd
trigger1= !time
value=7,7
[State 7610, black]
type=bgpalfx
trigger1= time<120
time=2
add=-255,-255,-255
[State 7610, 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 7610, kanji]
type=explod
trigger1= !time
anim=7610
ID=7610
sprpriority=-5
postype=left
pos=160,120
scale=.5,.5
bindtime=-1
[State 7610, shrink]
type=modifyexplod
trigger1= time<6
ID=7610
scale=(5.5-time),(5.5-time)
[State 7610, shrink]
type=modifyexplod
trigger1= time>=6
ID=7610
scale=.5,.5
[State 7610, flamebg]
type=explod
trigger1= !time
anim=7611
ID=7611
sprpriority=5
postype=left
pos=0,0
bindtime=-1
removetime=-1
pausemovetime=300
supermovetime=300
[State 7610, assert]
type=assertspecial
trigger1= 1
flag=invisible
flag2=nobardisplay
ignorehitpause=1
[State 7610, assert]
type=assertspecial
trigger1= time<120
flag=noFG
ignorehitpause=1
[State 7610, safety]
type=removeexplod
trigger1= time>=180
[State 7610, end]
type=destroyself
trigger1= time>=180


;========================<CAMERA CONTROL>=============================
[Statedef 7650]
physics=N
velset=0,0
anim=9741
[State 7650, bound]
type=screenbound
trigger1= 1
value=0
movecamera=1,1
[State 7650, end]
type=destroyself
trigger1= roundstate=2
