;---------------------------------------------------------------------------
; 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
;---------------------------------------------------------------------------
; Kikouken 
[StateDef 11000]
type = A
movetype = A
physics = N
ctrl = 0
anim = 11000
sprpriority = 4
velset = IfElse(IsHelper(11000), 3, IfElse(IsHelper(11001), 5, 7)), 0

[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, VarSet]
type = VarSet
triggerall = IsHelper(21000)
trigger1 = PrevStateNo = StateNo
var(0) = 1
persistent = 0

[State 11000, HitOverride]
type = HitOverride
triggerall = IsHelper(21000)
trigger1 = 1
attr = SCA,AA,AP,AT       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = IfElse(var(0) = 0, 11000, 11001)
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 = Vel X,0
offset = 0,0

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

[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(70*Root,fvar(20)),15
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 5, 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 = 5, 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(21000)
attr = A, SP
damage = floor(50*Root,fvar(20)),15
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 5, 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
triggerall = IsHelper(21000)
trigger1 = var(0) = 0 && MoveContact
value = 11000
ctrl = 0

[State 11000, ChangeState]
type = ChangeState
trigger1 = MoveContact
trigger2 = root,ProjCancelTime(0) != -1 && root,ProjCancelTime(0) < 15
trigger3 = IsHelper(11000) && Time = 60
trigger4 = IsHelper(11001) && Time = 30
trigger5 = IsHelper(21000) && (var(0) = 1 && MoveContact || Time = 60)
value = 11001
ctrl = 0
ignorehitpause = 1

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

[State 11001, var(16) Set]
type = ParentVarSet
trigger1 = MoveHit
var(16) = 1
ignorehitpause = 0
persistent = 0

[State 11001, 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, No More Projectiles]
type = ParentVarSet
trigger1 = AnimTime = 0
var(25) = 0
ignorehitpause = 0
persistent = 0

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

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

[State 12000, RemoveExplod]
type = RemoveExplod
triggerall = 1
trigger1 = Root, NumHelper(12000) > 0
trigger1 = !Time
id = 12000

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

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

[State 12000, HD Meter Decrease]
type = ParentVarAdd
triggerall = Root,PrevStateNo = [1000,2099]
trigger1 = Time = 0
var(30) = IfElse(Root, var(31) = 0, -500, -90)
persistent = 0

[State 12000, DC Explod 1]
type = Explod
triggerall = Root,PrevStateNo = [1000,2099]
triggerall = Root,var(31)=0
trigger1=time=0
anim = ifelse(teamside=1,12000,12002)
ID = 12000
pos = floor(Const240p(ifelse(teamside=1,0,200))), floor(const240p(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 = const240p(0.5), const240p(0.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,2099]
triggerall = Root,var(31)=0
trigger1=time=0
anim =ifelse(teamside=1,12001,12003)
ID = 12000
pos = floor(Const240p(ifelse(teamside=1,0,200))), floor(const240p(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 = const240p(0.5), const240p(0.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,2099]
triggerall = Root,var(31)=1
trigger1=time=0
anim = ifelse(teamside=1,12030,12032)
ID = 12000
pos = floor(Const240p(ifelse(teamside=1,0,200))), floor(const240p(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 = const240p(0.5), const240p(0.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,2099]
triggerall = Root,var(31)=1
trigger1=time=0
anim =ifelse(teamside=1,12031,12033)
ID = 12000
pos = floor(Const240p(ifelse(teamside=1,0,200))), floor(const240p(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 = const240p(0.5), const240p(0.5)
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 12000, DestroySelf]
type = DestroySelf
trigger1 = Root, MoveType = I
;---------------------------------------------------------------------------
; Kikoushou
[StateDef 13005]
type = A
movetype = A
physics = N
ctrl = 0
sprpriority = 5
velset = 0,0

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

[State 13005, BindToParent]
type = BindToParent
trigger1 = 1 
pos = 0,0
ignorehitpause = 1

[State 13005, SprPriority]
type = SprPriority
trigger1 = 1
value = 5
ignorehitpause = 1
persistent = 1

[State 13005, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo != 13005
trigger1 = !Time
value = 13005

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

[State 13005, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = IfElse(var(0) < 4, 13005, 13011)
time = -1
ignorehitpause = 1

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

[State 13005, VarAdd]
type = VarAdd
trigger1 = MoveContact
var(0) = 1
ignorehitpause = 1
persistent = 0

[State 11000, Projectile]
type = Projectile
trigger1 = 1
ProjID = 13005
projanim = 13005
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 = Vel X,0
offset = 0,0

[State 13005, PlaySnd]
type = PlaySnd
trigger1 = !Time
trigger1 = PrevStateNo != 13005
value = S13005,0
volumescale = 100
channel = 1

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

[State 13005, 1]
type = HitDef
triggerall = Root, Var(15) < 4
trigger1 = Var(0) < 3
attr = A, HP
damage = floor(50*Root,fvar(20)),15
animtype = Heavy
guardflag = M
hitflag = MAF
priority = 6, Hit
pausetime = 0,11
sparkno = S10002
guard.sparkno = S10132
sparkxy = -15, -50
hitsound = S5, 2
guardsound = S6, 1
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0,0
guard.velocity = -5.8765
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
fall.recovertime = 30
yaccel = 0.5
getpower = 0
givepower = 50
p1sprpriority = 5
p2sprpriority = -1
kill = 0

[State 13005, 2]
type = HitDef
triggerall = Root, Var(15) < 4
trigger1 = Var(0) >= 3
attr = A, HP
damage = floor(50*Root,fvar(20)),15
animtype = Heavy
guardflag = M
hitflag = MAF
priority = 6, Hit
pausetime = 0,11
sparkno = S10002
guard.sparkno = S10132
sparkxy = -15, -50
hitsound = S5, 2
guardsound = S6,1
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -4.5, -7.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5, -7.5
air.hittime = 13
ground.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 4
envshake.freq = 180
fall = 1
fall.recovertime = 30
yaccel = 0.5
getpower = 0
givepower = 50
p1sprpriority = 5
p2sprpriority = -1

[State 13005, ChangeState]
type = ChangeState
trigger1 = MoveContact
value = 13005
ctrl = 0

[State 13005, ChangeState]
type = ChangeState
trigger1 = root,ProjCancelTime(0) != -1 && root,ProjCancelTime(0) < 15
trigger2 = AnimTime = 0
trigger3 = var(0) > 4
value = 13006
ctrl = 0
ignorehitpause = 1

[State 13005, DestroySelf]
type = DestroySelf
trigger1 = Root, StateNo != 3005
ignorehitpause = 1
;---------------------------------------------------------------------------
;Kikoushou Hit
[StateDef 13006]
type = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
poweradd = 0
sprpriority = 4
movehitpersist = 1

[State 13006, var(16) Set]
type = ParentVarSet
trigger1 = MoveHit
var(16) = 1
ignorehitpause = 0
persistent = 0

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

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

[State 13006, No More Projectiles]
type = ParentVarSet
trigger1 = AnimTime = 0
var(25) = 0
ignorehitpause = 0
persistent = 0

[State 13006, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
;---------------------------------------------------------------------------
; EX Move FX
[StateDef 22000]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 9000
poweradd = -1000

[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 = const240p(0.5), const240p(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 = const240p(0.5), const240p(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 = const240p(0.5), const240p(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 = const240p(0.5), const240p(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, Drive Frame]
type = Explod
triggerall = roundstate=2
trigger1 =time=0
anim =22011
ID = 11011
pos = floor(const240p(Root,var(35)+ifelse(teamside=1,0,163))), floor(const240p(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 = const240p(1), const240p(1)
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 22010, Dim Drive Bar]
type = Explod
triggerall = roundstate=2
triggerall =(Root,var(30) =[1,499]) && Root,var(31)=0
trigger1= numexplod(11000)<1
anim =22012
ID = 11000
pos = floor( const240p( Root,var(35) + ifelse(teamside=1,7,281) ) ), floor(const240p(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 = const240p(1), const240p(1)
sprpriority = 7
ontop =1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 22010, Lit Drive Bar 1]
type = Explod
triggerall = roundstate=2
triggerall =Root,var(30) >500
trigger1= numexplod(11001)<1
anim =22013
ID = 11001
pos = floor(const240p(Root,var(35)+ifelse(teamside=1,63,225))), floor(const240p(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 = const240p(1), const240p(1)
sprpriority = 7
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 22010, Lit Drive Bar 2]
type = Explod
triggerall = roundstate=2
triggerall =Root,var(30) >=500 || Root,var(31)=1
trigger1= numexplod(11003)<1
anim =22013
ID = 11003
pos = floor(const240p(Root,var(35)+ifelse(teamside=1,7,281))), floor(const240p(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 = const240p(1), const240p(1)
sprpriority =7
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 22010, Drive Frame BG]
type = Explod
triggerall = roundstate=2
trigger1 =time=0
anim =22014
ID = 11011
pos = floor(const240p(Root,var(35)+ifelse(teamside=1,0,163))), floor(const240p(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 = const240p(1), const240p(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*const240p(1)*(Root,var(30)), const240p(1)
ignorehitpause =1

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

[State 22010, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID =11001
scale = .002004*const240p(1)*(Root,var(30)-500), const240p(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, 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 23020]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
sprpriority = 5
anim = 9000
poweradd = -3000

[State 23020, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic
persistent = 1

[State 23020, Explod]
type = Explod
trigger1 = !Time
anim = 23020
pos = 0,0
sprpriority = 20
ownpal = 1
bindtime = 1
supermove = 1
pausemovetime=30
scale = const240p(0.5), const240p(0.5)

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

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

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

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

[State 23020, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S23020,0
volumescale = 100

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

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

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

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

[State 23020, 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 23020, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 23020, VarAdd]
type = VarAdd
trigger1 = Time > IfElse((Root, StateNo = 3011), 250, 93) 
trigger1 = var(0) < 256
var(0) = 8
persistent = 1

[State 23020, VarSet]
type = VarSet
triggerall = Time > IfElse((Root, StateNo = 3011), 250, 93) 
trigger1 = Var(0) > 256
var(0) = 256

[State 23020, MC Explod 1]
type = Explod
triggerall = Root, PrevStateNo = [1000,3016]
trigger1=time=0
anim = ifelse(teamside=1,22040,22042)
ID = 22040
pos = floor(const240p(ifelse(teamside=1,-50,80))), floor(const240p(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 = const240p(0.5), const240p(0.5)
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 23020, MC Explod 2]
type = Explod
triggerall = Root, PrevStateNo = [1000,3016]
trigger1=time=0
anim =ifelse(teamside=1,22041,22043)
ID = 22040
pos = floor(const240p(ifelse(teamside=1,-50,80))), floor(const240p(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 = const240p(0.5), const240p(0.5)
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 23020, DestroySelf]
type = DestroySelf
trigger1 = Time > IfElse((Root, StateNo = 3011), 250, 70) && 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 = const240p(0.5), const240p(0.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 = const240p(0.5), const240p(0.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 = const240p(0.5), const240p(0.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 = const240p(0.5), const240p(0.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 = const240p(0.5), const240p(0.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 = const240p(0.5), const240p(0.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 = const240p(0.5), const240p(0.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 = const240p(0.5), const240p(0.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 = floor(Const240p(ifelse(teamside=1,0,200))), floor(const240p(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 = const240p(0.5), const240p(0.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 = floor(Const240p(ifelse(teamside=1,0,200))), floor(const240p(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 = const240p(0.5), const240p(0.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