;---------------------------------------------------------------------------
; DM/EX DM/Neo MAX Finish
[StateDef 8100]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 9000

[State 8100, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S8100,0
volumescale = 100
channel = 5

[State 8100, AssertSpecial]
type = AssertSpecial
Triggerall = time = [0,60]
trigger1 =1
ignorehitpause = 1
persistent = 1
flag = noBG
flag2 = noFG
flag3 = noshadow

[State 8100, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,60]
flag=nomusic

[State 8100, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[State 8100, Trans]
type = trans
trigger1 = 1
trans = add

[State 8100, Explod]
type = Explod
trigger1 =time=0
anim = 8100
ID = 8100
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
scale = .667,ifelse(GameHeight=180,0.5980066445182724,0.7973421926910299)
sprpriority = -8
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 8100, Explod]
type = Explod
trigger1 =time=0
anim = 8101
ID = 8100
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
scale = .667,ifelse(GameHeight=180,0.5980066445182724,0.7973421926910299)
sprpriority = -9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 8100, AssertSpecial]
type = AssertSpecial
trigger1 = time >60
flag = invisible

[State 8100, DestroySelf]
type = DestroySelf
trigger1 = time = 669
;---------------------------------------------------------------------------
; Hakki Shou 
[StateDef 11000]
type = A
movetype = A
physics = N
ctrl = 0
anim = 11000
sprpriority = 4

[State 11000, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 11001
time = -1
ignorehitpause = 1

[State 11000, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP
time = -1
ignorehitpause = 1

[State 11000, Projectile]
type = Projectile
trigger1 = 1
ProjID = 11000
projanim = 11000
projhitanim = -1
projremanim = -1
projscale = 0,0
projpriority = 0
projremovetime = 1;abs(floor(frontedgedist/root,var(15)))
postype = p1         ;p2,front,back,left,right
velocity = IfElse(IsHelper(11000), 5, IfElse(IsHelper(11001), 7, 9)),0
offset = 0,0

[State 11000, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S11000,0
volumescale = 100
channel = 1

[State 11000, VelSet]
type = VelSet
trigger1 = !Time
x = IfElse(IsHelper(11000), 5, 7)

[State 11000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 11000, 1]
type = HitDef
triggerall = IfElse(Root, Var(31) = 0, Root,var(15) = 0, Root,var(15) < 4)
trigger1 = IsHelper(11000)
attr = A, SP
damage = floor(60*Root,fvar(20)),15
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,11
sparkno = S10001
guard.sparkno = S10131
sparkxy = -15,0
hitsound = S5, 2
guardsound = S6,1
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity =  -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5, -6.5
air.hittime = 13
ground.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 4
envshake.freq = 180
air.fall = 1
yaccel = 0.5
getpower = 100,100
givepower = 100

[State 11000, 2]
type = HitDef
triggerall = IfElse(Root, Var(31) = 0, Root,var(15) = 0, Root,var(15) < 4)
trigger1 = IsHelper(11001)
attr = A, SP
damage = floor(80*Root,fvar(20)),15
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,11
sparkno = S10001
guard.sparkno = S10131
sparkxy = -15,0
hitsound = S5, 2
guardsound = S6,1
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity =  -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5, -6.5
air.hittime = 13
ground.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 4
envshake.freq = 180
air.fall = 1
yaccel = 0.5
getpower = 125,125
givepower = 125

[State 11000, 3]
type = HitDef
triggerall = IfElse(Root, Var(31) = 0, Root,var(15) = 0, Root,var(15) < 4)
trigger1 = IsHelper(22000)
attr = A, SP
damage = floor(100*Root,fvar(20)),15
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,11
sparkno = S10001
guard.sparkno = S10131
sparkxy = -15,0
hitsound = S5, 2
guardsound = S6,1
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity =  -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5, -6.5
air.hittime = 13
ground.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 4
envshake.freq = 180
air.fall = 1
yaccel = 0.5
getpower = 0,0
givepower = 150

[State 11000, ChangeState]
type = ChangeState
trigger1 = MoveContact
trigger2 = root,ProjCancelTime(0) != -1 && root,ProjCancelTime(0) < 15
trigger3 = Time > 90
value = 11001
ctrl = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Hakki Shou Hit
[StateDef 11001]
type = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 11001
poweradd = 0
sprpriority = 4
movehitpersist = 1

[State 1000, HD Meter Increase]
type = ParentVarAdd
trigger1 = Root, var(31) = 0 && Root,var(30) < 1000 && (Root,PrevStateNo !=[1000,2999])
var(30) = IfElse(MoveHit = 1, 50, 25)
ignorehitpause = 0
persistent = 0

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1

[State 11001, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 11001, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Kobi Kyaku Projectile Shield
[StateDef 11010]
type = A
movetype = A
physics = N
ctrl = 0
anim = 11010
sprpriority = 4

[State 11010, BindToRoot]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 11010, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 11011
time = -1
ignorehitpause = 1

[State 11010, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AP
time = -1
ignorehitpause = 1

[State 11001, DestroySelf]
type = DestroySelf
trigger1 = Root, AnimElem = 6
trigger2 = Root, Anim = 1012
trigger3 = Root, MoveType = H
;---------------------------------------------------------------------------
; Kobi Kyaku Projectile Shield End
[StateDef 11011]
type = A
movetype = A
physics = N
ctrl = 0
anim = 9000
sprpriority = 4

[State 11011, Helper]
type = Helper
trigger1 = !Time
ID = 11000
pos = 60, -65
postype = p1
stateno = 11000
helpertype = normal
name = "Hakki Shou"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

[State 11001, DestroySelf]
type = DestroySelf
trigger1 = Time = 1
;---------------------------------------------------------------------------
; Drive/HD Cancel FX
[StateDef 12000]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 9000

[State 12000, DC Explod 1]
type = Explod
triggerall = (Root,PrevStateNo = [1000,2999])
triggerall = Root,var(31)=0
trigger1=time=0
anim = ifelse(teamside=1,12000,12002)
ID = 12000
pos = ifelse(teamside=1,0,200),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 12000, DC Explod 2]
type = Explod
triggerall = (Root,PrevStateNo = [1000,2999])
triggerall = Root,var(31)=0
trigger1=time=0
anim =ifelse(teamside=1,12001,12003)
ID = 12000
pos = ifelse(teamside=1,0,200),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 12000, HDC Explod 1]
type = Explod
triggerall = (Root,PrevStateNo = [1000,2999])
triggerall = Root,var(31)=1
trigger1=time=0
anim = ifelse(teamside=1,12030,12032)
ID = 12030
pos = ifelse(teamside=1,0,200),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 12000, HDC Explod 2]
type = Explod
triggerall = (Root,PrevStateNo = [1000,2999])
triggerall = Root,var(31)=1
trigger1=time=0
anim =ifelse(teamside=1,12031,12033)
ID = 12030
pos = ifelse(teamside=1,0,200),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 12000, RemoveExplod]
type = RemoveExplod
trigger1 = Root, NumHelper(30000) = 1
id = -1

[State 12000, RemoveExplod]
type = RemoveExplod
trigger1 = Root, NumHelper(23015) = 1
id = -1

[State 12000, DestroySelf]
type = DestroySelf
trigger1 = Root, MoveType = I
;---------------------------------------------------------------------------
; Blackout
[StateDef 13011]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
sprpriority = 5
anim = 9000

[State 13011, VarSet]
type = VarSet
trigger1 = !Time
var(0) = 256

[State 13011, VarAdd]
type = VarAdd
trigger1 = Time < 32
var(0) = -8
persistent = 1

[State 13011, VarSet]
type = VarSet
triggerall = Time < 32
trigger1 = Var(0) < 0
var(0) = 0

[State 13011, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 1
add = 0,0,0
mul = var(0), var(0), var(0)
sinadd = 0,0,0, 10
color = 256
persistent = 1

[State 13011, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 13011, VarAdd]
type = VarAdd
trigger1 = Time > 121
trigger1 = var(0) < 256
var(0) = 8
persistent = 1

[State 13011, VarSet]
type = VarSet
triggerall = Time > 121
trigger1 = Var(0) > 256
var(0) = 256

[State 13011, DestroySelf]
type = DestroySelf
trigger1 = Time > 121 && Var(0) = 256

;---------------------------------------------------------------------------
; EX Move FX
[StateDef 22000]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 9000

[State 22000, Drive Meter VarAdd]
type = ParentVarAdd
triggerall = Root, PrevStateNo = [1000,2099]
triggerall = Root, PrevStateNo != [2020,2021]
trigger1 = !Time
var(30) = IfElse(Root, var(31) = 0, -500, -175)
ignorehitpause = 1
persistent = 0

[State 22000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,0

[State 22009, Explod]
type = Explod
trigger1 = Time = 0
anim = 22000
pos = 0, 0
postype = p1
bindtime = 1
facing = -1
sprpriority = 5
ownpal = 1
scale = 0.5,0.5  ;0.65,0.65

[State 22009, Explod]
type = Explod
trigger1 = Time = 0
anim = 22001
pos = 0, 0
postype = p1
bindtime = 1
facing = 1
sprpriority = -1
ownpal = 1
scale = 0.5,0.5  ;0.65,0.65

[State 22009, Explod]
type = Explod
trigger1 = Time = 0
anim = 22002
pos = 0, 0
postype = p1
bindtime = 1
facing = -1
sprpriority = 4
ownpal = 1
scale = 0.5,0.5  ;0.65,0.65

[State 22009, Explod]
type = Explod
trigger1 = Time = 0
anim = 22003
pos = 0, 0
postype = p1
bindtime = 1
sprpriority = -2
ownpal = 1
scale = 0.5,0.5  ;0.65,0.65

[State 22000, EX Sound]
type = PlaySnd
trigger1 = !Time
value = S22000,0
channel = 1

[State 22000, DestroySelf]
type = DestroySelf
trigger1 = Time = 20
;----------------------------------------------------------------
;Drive Meter
[StateDef 22010]
type = A
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 9000
poweradd = 0

[State 22010, Explod]
type = Explod
triggerall = roundstate=2
trigger1 =time=0
anim =22011
ID = 11011
pos = Root,var(35)+ifelse(teamside=1,0,163), Root,Var(36)
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
removetime = -1
scale = 1,1
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
;----------
[State 22010, Explod]
type = Explod
triggerall = roundstate=2
triggerall =(Root,var(30) =[1,499]) && Root,var(31)=0
trigger1= numexplod(11000)<1
anim =22012
ID = 11000
pos = Root,var(35)+ifelse(teamside=1,7,281),Root,Var(36)+1
postype = left  ;p2,front,back,left,right
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority = 7
ontop =1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
[State 22010, Explod]
type = Explod
triggerall = roundstate=2
triggerall =Root,var(30) >=500 || Root,var(31)=1
trigger1= numexplod(11003)<1
anim =22013
ID = 11003
pos = Root,var(35)+ifelse(teamside=1,7,281),Root,Var(36)+1
postype = left  ;p2,front,back,left,right
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority =7
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 22010, Explod]
type = Explod
triggerall = roundstate=2
trigger1 =time=0
anim =22014
ID = 11011
pos = Root,var(35)+ifelse(teamside=1,0,163), Root,Var(36)
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
removetime = -1
scale = 1,1
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 22010, ModifyExplod]
type = ModifyExplod
trigger1 = Root,var(30)<=500
ID =11000
scale = .00201*(Root,var(30)),1
ignorehitpause =1

[State 22010, ModifyExplod]
type = ModifyExplod
trigger1 = Root,var(30)<=500
ID =11003
scale = .00201*(Root,var(30)),1
ignorehitpause =1

[State 22010, RemoveExplod]
type = RemoveExplod
trigger1 =(Root,var(31)=0&&Root,var(30)<500)
id = 11003
ignorehitpause = 1

[State 22010, RemoveExplod]
type = RemoveExplod
trigger1 =(Root,var(30)>499)
id = 11000
ignorehitpause = 1

[State 22010, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11003 
ignorehitpause = 1

[State 22010, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11000 
ignorehitpause = 1

[State 22010, Explod]
type = Explod
triggerall = roundstate=2
triggerall =Root,var(30) >500
trigger1= numexplod(11001)<1
anim =22013
ID = 11001
pos = Root,var(35)+ifelse(teamside=1,63,225),Root,var(36)+1
postype = left  ;p2,front,back,left,right
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority = 7
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
[State 22010, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID =11001
scale = .002004*(Root,var(30)-500),1
ignorehitpause =1

[State 22010, RemoveExplod]
type = RemoveExplod
trigger1 =Root,var(30)<500 
id = 11001
ignorehitpause = 1

[State 22010, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11001 
ignorehitpause = 1

[State 22010, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11011 
ignorehitpause = 1

[State 22010, HD Mode Drain]
type = parentVaradd
trigger1 = Root, Var(31) = 1 
trigger1 = Root, Var(30) > 0
var(30) = -1
ignorehitpause=0

[State 22010, MAX CANCEL Drain]
type = ParentVarSet
trigger1 = Root, var(31) = 1 
trigger1 = Root, StateNo = 3020
var(30) = 0
ignorehitpause=1

[State -2, HD Mode End]
type = ParentVarSet
triggerall = RoundState = 2
trigger1 = Root, Var(31) = 1 
trigger1 = Root, Var(30) <= 0
trigger2 = Root, StateNo = 3020
var(31) = 0
ignorehitpause = 1

[State -2, HD Mode Round End]
type = ParentVarSet
triggerall = RoundState != 2
trigger1 = var(31) = 1
var(30) = 0
ignorehitpause = 1

[State -2, HD Mode Round End]
type = ParentVarSet
triggerall = RoundState != 2
trigger1 = var(31) = 1
var(31) = 0
ignorehitpause = 1

[State 22010, end]
type = destroyself
trigger1 =roundstate!=2
;---------------------------------------------------------------------------
; NEO MAX BLACKOUT
[StateDef 23015]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
sprpriority = 5
anim = 9000

[State 23015, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 23015, Explod]
type = Explod
trigger1 = !Time
anim = 23015
pos = 0,0
sprpriority = 20
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 23015, Explod]
type = Explod
trigger1 = !Time
anim = 23021
pos = 160,120
postype=left
sprpriority = -3
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.6557377049180328,ifelse(GameHeight=180,0.5247813411078717,0.6997084548104956)

[State 23015, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(17) = 0

[State 23015, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(31) = 0

[State 23015, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(30) = 0

[State 23015, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S23015,0
volumescale = 100

[State 23015, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(0) = %d"
params = var(0)

[State 23015, VarSet]
type = VarSet
trigger1 = !Time
var(0) = 256

[State 23015, VarAdd]
type = VarAdd
trigger1 = Time < 16
var(0) = -16
persistent = 1

[State 23015, VarSet]
type = VarSet
triggerall = Time < 16
trigger1 = Var(0) < 0
var(0) = 0

[State 23015, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 1
add = 0,0,0
mul = var(0), var(0), var(0)
sinadd = 0,0,0, 10
color = 256
persistent = 1

[State 23015, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 23015, VarAdd]
type = VarAdd
trigger1 = IfElse((Root,MoveHit = 0), Time > 93, Time > 200)
trigger1 = var(0) < 256
var(0) = 8
persistent = 1

[State 23015, VarSet]
type = VarSet
triggerall = IfElse((Root,MoveHit = 0), Time > 93, Time > 200)
trigger1 = Var(0) > 256
var(0) = 256

[State 12000, MC Explod 1]
type = Explod
triggerall = Root,PrevStateNo = [1000,3001]
trigger1=time=0
anim = ifelse(teamside=1,22040,22042)
ID = 22040
pos = ifelse(teamside=1,-50,80),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 12000, MC Explod 2]
type = Explod
triggerall = Root,PrevStateNo = [1000,3001]
trigger1=time=0
anim =ifelse(teamside=1,22041,22043)
ID = 22040
pos = ifelse(teamside=1,-50,80),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 23015, DestroySelf]
type = DestroySelf
trigger1 = IfElse((Root,MoveHit = 0), Time > 93, Time > 200) && Var(0) = 256
;---------------------------------------------------------------------------
; Super FX
[StateDef 30000]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
anim = 9000
poweradd = 0
sprpriority = 5

[State 30000, VarSet]
type = VarSet
trigger1 = !Time
var(0) = IfElse(IsHelper(30000), 0, 256)

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30000)
trigger1 =!Time
anim = 30000
pos = 0,0
sprpriority = 4
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30000)
trigger1 =!Time
anim = 30001
pos = 0,0
sprpriority = 5
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30000)
trigger1 =!Time
anim = 30003
pos = 0,0
sprpriority = 1
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30000)
trigger1 =!Time
anim = 30002
pos = 0,0
sprpriority = 4
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30001)
trigger1 =!Time
anim = 30010
pos = 0,0
sprpriority = 5
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30001)
trigger1 =!Time
anim = 30011
pos = 0,0
sprpriority = 1
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30001)
trigger1 =!Time
anim = 30013
pos = 0,0
sprpriority = 2
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, Explod]
type = Explod
triggerall = IsHelper(30001)
trigger1 =!Time
anim = 30012
pos = 0,0
sprpriority = 0
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale=.5,.5

[State 30000, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(17) = 0

[State 30000, Super Cancel Drain]
type = ParentVarAdd
triggerall = Root,PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(Root,var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 30000, SC Explod 1]
type = Explod
triggerall = Root,PrevStateNo = [1000,2099]
trigger1=time=0
anim = ifelse(teamside=1,12020,12022)
ID = 12020
pos = ifelse(teamside=1,0,200),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 30000, SC Explod 2]
type = Explod
triggerall = Root,PrevStateNo = [1000,2099]
trigger1=time=0
anim =ifelse(teamside=1,12021,12023)
ID = 12020
pos = ifelse(teamside=1,0,200),55
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =30
scale = .5,.5
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 30000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible 

[State 30000, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S30000,0
volumescale = 100

[State 30000, PlaySnd]
type = PlaySnd
trigger1 = !Time && IsHelper(30001)
value = S22000,0
volumescale = 100

[State 30000, VarAdd]
type = VarAdd
triggerall = IsHelper(30000)
trigger1 = Time < 8
var(0) = 32

[State 30000, VarAdd]
type = VarAdd
triggerall = IsHelper(30000)
triggerall = Time > 32
trigger1 = Var(0) > 0
var(0) = -16

[State 30000, VarAdd]
type = VarAdd
triggerall = IsHelper(30001)
trigger1 = Time < 8
var(0) = -32

[State 30000, VarAdd]
type = VarAdd
triggerall = IsHelper(30001)
triggerall = Time > 32
trigger1 = Var(0) < 256
var(0) = 16

[State 30000, BGPalFX]
type = BGPalFX
trigger1 = IsHelper(30000)
time = 1
add = 0,0,0
mul = 256,256,256
sinadd = 0,0,0,10
color = 256-var(0)
invertall = 0
persistent = 1

[State 30000, BGPalFX]
type = BGPalFX
trigger1 = IsHelper(30001)
time = 1
add = 0,0,0
mul = var(0), var(0), var(0) 
sinadd = 0,0,0,10
color = 256
invertall = 0
persistent = 1

[State 30000, end]
type = DestroySelf
trigger1 = IsHelper(30000) && Time > 32 && var(0) = 0 
trigger2 = IsHelper(30001) && Time > 32 && var(0) = 256
