; Super Moves
;---------------------------------------------------------------------------
; 7-Slash Sabre Dash
[Statedef 2000]
type = A
movetype = A
physics = N
ctrl = 0

[State 2000, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 2000
value = 2000

[State 2000, PlaySnd]
type = PlaySnd
triggerall = Name = "Omega Inarabbita"
triggerall = AuthorName = "N-Mario"
trigger1 = Anim = 2000
trigger1 = AnimElem = 1
value = 0, 1
channel = 5

[State 2000, PowerAdd]
type = PowerAdd
triggerall = Time <= 0
trigger1 = Var(20) >= 0
trigger1 = Var(55) <= 0
value = -1000

[State 2000, VelSet]
type = VelSet
trigger1 = Time <= 0
trigger1 = Anim = 2000
trigger1 = AnimElem = 1
x = 4 * Const(size.xscale)
y = -1.5 * Const(size.yscale)

[State 2000, VarSet]
type = VarSet
trigger1 = 1
var(1) = 0

[State 2000, AfterImage]
type = AfterImage
trigger1 = Time <= 0
trigger1 = PrevStateNo != 5000
time = 1
length = 12
framegap = 3
palcolor = 0

[State 2000, AfterImage]
type = AfterImageTime
trigger1 = 1
ignorehitpause = 1
time = 2

[State 2000, 3]
type = VelAdd
trigger1 = 1
y = 0.10 * Const(size.yscale)

[State 2000, 4]
type = HitDef
trigger1 = NumEnemy > 0
trigger1 = EnemyNear, MoveType != H
attr = A, ST
hitflag = MA-
priority = 1, Miss
sparkno = -1
sprpriority = 1
pausetime = 0, Ifelse(Var(55) > 0, 25, 50)
ground.hittime = 10
air.hittime = 10
forcestand = 1
numhits = 0

[State 2000, 5]
type = ChangeState
trigger1 = MoveContact
ignorehitpause = 1
value = 2001

[State 2000, 5]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; 7-Slash Sabre Combo
[Statedef 2001]
type = S
movetype = A
physics = S
velset = 0,0
ctrl = 0

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

[State 2000, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 200
value = 200

;--------------------
; Fast Speed Slashing
[State 2000, VarSet]
type = VarSet
triggerall = Var(55) <= 0
trigger1 = AnimElemNo(0) < Var(10) 
var(10) = AnimElemNo(0) - 1

[State 2000, VarAdd]
type = VarAdd
triggerall = Var(55) <= 0
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
var(10) = 1

[State 2000, Speed]
type = ChangeAnim
triggerall = Var(55) <= 0
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
value = Anim
elem = Var(10)
;--------------------

[State 2000, PosSet]
type = PosSet
trigger1 = Time <= 0
y = 0

[State 2000, Bind]
type = TargetBind
triggerall = NumTarget > 0
trigger1 = Target, StateType != A
trigger1 = Target, StateType != L
ignorehitpause = 1
persistent = 0
pos = ceil(25 * const(size.xscale)), 0

[State 2000, PlayerPush]
type = PlayerPush
trigger1 = NumTarget > 0
ignorehitpause = 1
value = 0

;--------------------
; No Escape Boundaries
[State 2000, Helper]
type = Helper
trigger1 = NumHelper(2010) = 0
helpertype = normal
name = "Boundary"
pausemovetime = 1000000000
supermovetime = 1000000000
size.height = 1000
ground.back = 20
ground.front = 20
air.back = 20
air.front = 20
id = 2010
pos = 0, 0
postype = P1
stateno = 2010
keyctrl = 0

[State 2000, Helper]
type = Helper
trigger1 = NumHelper(2011) = 0
helpertype = normal
name = "Boundary"
pausemovetime = 1000000000
supermovetime = 1000000000
size.height = 1000
ground.back = 20
ground.front = 20
air.back = 20
air.front = 20
id = 2011
pos = 0, 0
postype = P1
stateno = 2010
keyctrl = 0
;--------------------

[State 2000, Helper]
type = Helper
trigger1 = NumHelper(10000) = 0
helpertype = normal
name = "Sabre"
pausemovetime = 1000000000
supermovetime = 1000000000
id = 10000
pos = 0, 0
postype = P1
stateno = 10000
keyctrl = 0

;--------------------
; Anim Attack Combo
[State 2000, VarSet]
type = VarSet
trigger1 = Time <= 0
var(1) = 0

[State 2000, Anim]
type = ChangeAnim
triggerall = Var(1) = 1
trigger1 = Anim = 200
trigger1 = AnimElem = 9, > 0	;8, >= 0
persistent = 0
value = 210

[State 2000, Anim]
type = ChangeAnim
triggerall = Var(1) = 2
trigger1 = Anim = 210
trigger1 = AnimElem = 9, > 0	;6, >= 0
persistent = 0
value = 230

[State 2000, Anim]
type = ChangeAnim
triggerall = Var(1) = 3
trigger1 = Anim = 230
trigger1 = AnimElem = 10, > 0	;8, >= 0
persistent = 0
value = 210 ;240

[State 2000, Anim]
type = ChangeAnim
triggerall = Var(1) = 4
trigger1 = Anim = 210
trigger1 = AnimElem = 9, > 0	;6, >= 0
persistent = 0
value = 220

[State 2000, Anim]
type = ChangeAnim
triggerall = Var(1) = 5
trigger1 = Anim = 220
trigger1 = AnimElem = 13, > 0	;10, >= 0
persistent = 0
value = 230

[State 2000, VarAdd]
type = VarAdd
trigger1 = AnimElem = 2
var(1) = 1
;--------------------

;--------------------
; Anim Attack Sounds
[State 2000, PlaySnd]
type = PlaySnd
trigger1 = Anim = 200
trigger1 = AnimElem = 2
value = 10, 1
channel = 1

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = Anim = 210
trigger1 = AnimElem = 2
trigger2 = Anim = 240
trigger2 = AnimElem = 3
value = 10, 2
channel = 1

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = Anim = 220
trigger1 = AnimElem = 5
value = 10, 3
channel = 1

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = Anim = 230
trigger1 = AnimElem = 3
value = 10, 4
channel = 1
;--------------------

;--------------------
; Attack HitDefs
[State 2000, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 200
trigger1 = AnimElem = 2
attr = S, SA
damage = 30, 0
getpower = 0,0
animtype = Light
hitflag = MA+
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 0, 4), Ifelse(Var(55) > 0, 10, 20)
sparkno = 0
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0
airguard.velocity = 0,0
air.type = High
air.velocity = 0,0
air.hittime = 20
forcestand = 1
kill = 0

[State 2000, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 210
trigger1 = AnimElem = 2
trigger2 = Anim = 240
trigger2 = AnimElem = 3
attr = S, SA
damage = 30, 0
getpower = 0,0
animtype = Medium
hitflag = MA+
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 0, 4), Ifelse(Var(55) > 0, 10, 20)
sparkno = 1
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0
airguard.velocity = 0,0
air.type = Low
air.velocity = 0,0
air.hittime = 20
forcestand = 1
kill = 0

[State 2000, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 220
trigger1 = AnimElem = 5
trigger2 = Anim = 230
trigger2 = AnimElem = 3
attr = S, SA
damage = 30, 0
getpower = 0,0
animtype = Heavy
hitflag = MA+
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 0, 4), Ifelse(Var(55) > 0, 10, 20)
sparkno = 2
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0
airguard.velocity = 0,0
air.type = High
air.velocity = 0,0
air.hittime = 20
forcestand = 1
kill = 0
;--------------------

;----- Hit Impact -----
[State 2000, Hit]
type = PlaySnd
triggerall = MoveHit
trigger1 = Anim = 200
ignorehitpause = 1
value = 2, 10
channel = 2

[State 2000, Hit]
type = PlaySnd
triggerall = MoveHit
trigger1 = Anim = 210
trigger2 = Anim = 220
trigger3 = Anim = 230
trigger4 = Anim = 240
ignorehitpause = 1
value = 2, 11
channel = 2

[State 2000, Guard]
type = PlaySnd
trigger1 = MoveGuarded
ignorehitpause = 1
value = 2, 0
channel = 3

[State 2000, Reset]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1
;--------------------

[State 2000, State]
type = ChangeState
triggerall = Var(1) >= 6
trigger1 = Anim = 230
trigger1 = AnimElem = 10, > 0	;8, >= 0
value = 102

;---------------------------------------------------------------------------
; 7-Slash Rising Sabre
[Statedef 2050]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 10
ctrl = 0

[State 2050, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 250
value = 250

[State 2050, Helper]
type = Helper
trigger1 = NumHelper(10000) = 0
helpertype = normal
name = "Sabre"
pausemovetime = 1000000000
supermovetime = 1000000000
id = 10000
pos = 0, 0
postype = P1
stateno = 10000
keyctrl = 0

[State 2050, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 250
trigger1 = AnimElem = 3
attr = S, HA
damage = 90, 0
getpower = 0,0
animtype = Heavy
hitflag = MAF
guardflag = MA
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 2, 4), Ifelse(Var(55) > 0, 3, 6)
sparkno = 2
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-5 * Const(size.yscale))
;hitsound = S2, 12
;guardsound = S2, 0
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -4,-8
airguard.velocity = -2,-4
air.type = Low
air.velocity = -4,-8
air.hittime = 40
fall.recover = 0
air.fall = 1
fall = 1

;----- Hit Impact -----
[State 2050, Hit]
type = PlaySnd
trigger1 = MoveHit
ignorehitpause = 1
value = 2, 12
channel = 2

[State 2050, Guard]
type = PlaySnd
trigger1 = MoveGuarded
ignorehitpause = 1
value = 2, 0
channel = 3

[State 2050, Reset]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1
;--------------------

[State 2050, PlaySnd]
type = PlaySnd
trigger1 = Anim = 250
trigger1 = AnimElem = 4
value = 10, 6
channel = 1

[State 2050, PlaySnd]
type = PlaySnd
triggerall = Name = "Omega Inarabbita"
triggerall = AuthorName = "N-Mario"
trigger1 = Anim = 250
trigger1 = AnimElem = 4
value = 0, 1
channel = 5

[State 2050, VelSet]
type = VelSet
trigger1 = Anim = 250
trigger1 = AnimElem = 4, >= 0
x = 1.25 * const(size.xscale)
y = const(velocity.jump.y) - const(size.yscale)

[State 2050, State]
type = ChangeState
trigger1 = Anim = 250
trigger1 = AnimElem = 4, >= 0
value = 2051

;---------------------------------------------------------------------------
; 7-Slash Rising Sabre Jumping Air
[Statedef 2051]
type = A
movetype = A
physics = A
juggle = 10
ctrl = 0

[State 2050, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 44
trigger1 = Anim != 250
trigger1 = Anim != 251
value = 250
elem = 4

[State 2050, Helper]
type = Helper
trigger1 = NumHelper(10000) = 0
helpertype = normal
name = "Sabre"
pausemovetime = 1000000000
supermovetime = 1000000000
id = 10000
pos = 0, 0
postype = P1
stateno = 10000
keyctrl = 0

[State 2050, HitDef]
type = HitDef
triggerall = Var(15) <= 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 250
trigger1 = AnimElem = 4
attr = S, HA
damage = 90, 0
getpower = 0,0
animtype = Heavy
hitflag = MAF
guardflag = MA
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 2, 5), Ifelse(Var(55) > 0, 2, 5)
sparkno = 2
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-40 * Const(size.yscale))
;hitsound = S2, 12
;guardsound = S2, 0
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -4,-8
airguard.velocity = -2,-4
air.type = Low
air.velocity = -4,-8
air.hittime = 40
fall.recover = 0
air.fall = 1
fall = 1

[State 2050, HitDef]
type = HitDef
triggerall = Var(15) > 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 250
trigger1 = AnimElem = 4
attr = S, HA
damage = 90, 0
getpower = 0,0
animtype = Heavy
hitflag = MAF-
guardflag = MA
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 2, 5), Ifelse(Var(55) > 0, 2, 5)
sparkno = 2
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-40 * Const(size.yscale))
;hitsound = S2, 12
;guardsound = S2, 0
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -4,-8
airguard.velocity = -2,-4
air.type = Low
air.velocity = -4,-8
air.hittime = 40
fall.recover = 0
air.fall = 1
fall = 1

;----- Hit Impact -----
[State 2050, Hit]
type = PlaySnd
trigger1 = MoveHit
ignorehitpause = 1
value = 2, 12
channel = 2

[State 2050, Guard]
type = PlaySnd
trigger1 = MoveGuarded
ignorehitpause = 1
value = 2, 0
channel = 3

[State 2050, Reset]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1
;--------------------

[State 2050, Anim]
type = ChangeAnim
trigger1 = Anim = 250
trigger1 = AnimElem = 4, > 0
trigger1 = Vel Y >= 0
value = 251

[State 2050, State]
type = ChangeState
triggerall = Var(20) >= 0
triggerall = Anim = 251
trigger1 = AnimElem = 3, >= 0
trigger2 = AnimTime = 0
value = 51
ctrl = 1

[State 2050, StateType]
type = StateTypeSet
triggerall = Var(20) < 0
trigger1 = Anim != 250
statetype = A
movetype = I
physics = A

;---------------------------------------------------------------------------
; Reverse Ultimate Raging Omega Slash Combo
[Statedef 2100]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0

[State 2100, AttackMulSet]
type = AttackMulSet
trigger1 = 1
ignorehitpause = 1
value = 0.5

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

[State 2100, VarSet]
type = VarSet
trigger1 = 1
var(1) = 0

[State 2100, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 240
value = 240

[State 2100, PosSet]
type = PosSet
trigger1 = Time <= 0
y = 0

[State 2100, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = Anim = 240
trigger2 = AnimElem = 2, < 0
ignorehitpause = 1
var(55) = 0

[State 2100, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = Anim = 240
trigger2 = AnimElem = 2, < 0
ignorehitpause = 1
var(56) = 1

[State 2100, VarSet]
type = VarSet
triggerall = Var(55) <= 0
trigger1 = AnimElemNo(0) < Var(10) 
var(10) = AnimElemNo(0) - 1

[State 2100, VarAdd]
type = VarAdd
triggerall = Var(55) <= 0
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
var(10) = 1

[State 2100, EnvColor]
type = EnvColor
trigger1 = Time <= 0
value = 250,250,250
ignorehitpause = 1
persistent = 0
under = 0
time = 2

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Time <= 0
value = 10, 10
channel = 1

[State 2100, AfterImage]
type = AfterImage
trigger1 = Time <= 0
time = 0
framegap = 4
length = 20
PalBright = 250,0,0
PalContrast = 250,0,0

[State 2100, AfterImage]
type = AfterImageTime
trigger1 = 1
ignorehitpause = 1
time = 2

[State 2100, EnvShake]
type = EnvShake
trigger1 = Time <= 0
time = 5
freq = 50
ampl = -10
phase = 10

;--------------------
; Flash Animation
;--------------------
[State 2100, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 0,0
ontop = 1
ownpal = 1

[State 2100, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 256,0
ontop = 1
ownpal = 1

[State 2100, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 512,0
ontop = 1
ownpal = 1

[State 2100, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = 0,0
ontop = 1
ownpal = 1

[State 2100, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = -256,0
ontop = 1
ownpal = 1

[State 2100, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = -512,0
ontop = 1
ownpal = 1
;--------------------

;--------------------
; Super Portrait
;--------------------
[State 2100, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
scale = 2,2
anim = 9000
id = 9000
facing = 1
pos = 100,0
ontop = 1
ownpal = 1

[State 2100, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
scale = 2,2
anim = 9000
id = 9000
facing = -1
pos = -100,0
ontop = 1
ownpal = 1
;--------------------

[State 2100, Super]
type = Explod
trigger1 = Time <= 0
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = -50
persistent = 0
postype = P1
bindtime = -1
anim = F102
id = 102
pos = 0,ceil(-20 * const(size.yscale))
ontop = 0
ownpal = 1
under = 1

[State 2100, SuperPause]
type = SuperPause
trigger1 = Time <= 0
persistent = 0
pos = 0, 0
anim = -1
time = 40
movetime = 0
sound = S3, 0
poweradd = -1500

[State 2100, Helper]
type = Helper
trigger1 = NumHelper(10000) = 0
helpertype = normal
name = "Sabre"
pausemovetime = 1000000000
supermovetime = 1000000000
id = 10000
pos = 0, 0
postype = P1
stateno = 10000
keyctrl = 0

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 240
trigger1 = AnimElem = 3
value = 10, 2
channel = 1

[State 2100, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 240
trigger1 = AnimElem = 3
attr = S, SA
damage = 30, 0
getpower = 0,0
animtype = Medium
hitflag = MAF
guardflag = MA
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 1, 2), Ifelse(Var(55) > 0, 10, 20)
guard.pausetime = Ifelse(Var(55) > 0, 1, 2), Ifelse(Var(55) > 0, 5, 10)
sparkno = 1
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = Low
ground.slidetime = 50
ground.hittime = 50
ground.velocity = 0
guard.velocity = -5
airguard.velocity = -3,-1
air.type = Low
air.velocity = 0,0
air.hittime = 50
forcestand = 1
kill = 0

;----- Hit Impact -----
[State 2100, Hit]
type = PlaySnd
trigger1 = MoveHit
ignorehitpause = 1
persistent = 0
value = 2, 11
channel = 2

[State 2100, Guard]
type = PlaySnd
trigger1 = MoveGuarded
ignorehitpause = 1
persistent = 0
value = 2, 0
channel = 3
;--------------------

[State 2100, 5]
type = ChangeState
triggerall = Time > 0
triggerall = NumTarget > 0
trigger1 = MoveHit
ignorehitpause = 1
value = 2101

[State 2100, 5]
type = ChangeState
trigger1 = Anim = 240
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Reverse Ultimate Raging Omega Slash Combo of Insanity
[Statedef 2101]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0

[State 2100, AttackMulSet]
type = AttackMulSet
trigger1 = 1
ignorehitpause = 1
value = 0.5

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

[State 2100, AfterImage]
type = AfterImageTime
trigger1 = 1
ignorehitpause = 1
time = 2

[State 2100, Bind]
type = TargetBind
triggerall = MoveHit
triggerall = NumTarget > 0
;triggerall = Target, StateType != A
triggerall = Target, StateType != L
trigger1 = StateType != A
ignorehitpause = 1
pos = ceil(30 * const(size.xscale)), 0

[State 2100, PosSet]
type = PosSet
trigger1 = Time <= 0
y = 0

[State 2100, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 240
value = 240

;--------------------
; Fast Speed Slashing
[State 2100, VarSet]
type = VarSet
triggerall = Var(55) <= 0
trigger1 = AnimElemNo(0) < Var(10) 
var(10) = AnimElemNo(0) - 1

[State 2100, VarAdd]
type = VarAdd
triggerall = Var(55) <= 0
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
var(10) = 1

[State 2100, Speed]
type = ChangeAnim
triggerall = Var(55) <= 0
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
value = Anim
elem = Var(10)
;--------------------

[State 2100, Helper]
type = Helper
trigger1 = NumHelper(10000) = 0
helpertype = normal
name = "Sabre"
pausemovetime = 1000000000
supermovetime = 1000000000
id = 10000
pos = 0, 0
postype = P1
stateno = 10000
keyctrl = 0

[State 2100, VelSet]
type = VelSet
trigger1 = Time > 0
trigger1 = NumTarget > 0
trigger1 = Var(1) > 1
x = 0.75 * const(size.xscale)

;--------------------
; Anim Attack Combo
[State 2100, VarSet]
type = VarSet
trigger1 = Anim = 240
ignorehitpause = 1
persistent = 0
var(1) = 0

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 1
triggerall = NumTarget > 0
trigger1 = Anim = 240
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 200

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 2
trigger1 = Anim = 200
trigger1 = AnimElem = 8, >= 0
persistent = 0
value = 210

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 3
trigger1 = Anim = 210
trigger1 = AnimElem = 6, >= 0
persistent = 0
value = 220

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 4
trigger1 = Anim = 220
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 230

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 5
trigger1 = Anim = 230
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 250

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 6
trigger1 = Anim = 250
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 600

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 7
trigger1 = Anim = 600
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 610

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 8
trigger1 = Anim = 610
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 610
elem = 2

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 9
trigger1 = Anim = 610
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 610
elem = 2

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 10
trigger1 = Anim = 610
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 610
elem = 2

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 11
trigger1 = Anim = 610
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 610
elem = 2

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 12
trigger1 = Anim = 610
trigger1 = AnimElem = 11, >= 0
persistent = 0
value = 700
elem = 2

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 13
trigger1 = Anim = 700
trigger1 = AnimElem = 7, >= 0
persistent = 0
value = 720

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 14
trigger1 = Anim = 230
trigger1 = AnimElem = 10, >= 0
trigger2 = Anim = 720
trigger2 = AnimElem = 6, >= 0
persistent = 0
value = 240

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 15
trigger1 = Anim = 240
trigger1 = AnimElem = 10, >= 0
persistent = 0
value = 200

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 16
trigger1 = Anim = 200
trigger1 = AnimElem = 8, >= 0
persistent = 0
value = 210

[State 2100, Anim] 
type = ChangeAnim
triggerall = Var(1) = 17
trigger1 = Anim = 210
trigger1 = AnimElem = 6, >= 0
persistent = 0
value = 220

[State 2100, VarAdd]
type = VarAdd
triggerall = Command = "x"
trigger1 = Anim = 240
trigger1 = Var(1) <= 0
trigger2 = Anim = 200
trigger2 = Var(1) = 1
trigger3 = Anim = 210
trigger3 = Var(1) = 2
trigger4 = Anim = 220
trigger4 = Var(1) = 3
trigger5 = Anim = 230
trigger5 = Var(1) = 4
trigger6 = Anim = 250
trigger6 = Var(1) = 5
trigger7 = Anim = 600
trigger7 = Var(1) = 6
trigger8 = Anim = 610
trigger8 = Var(1) = 7
trigger9 = Anim = 610
trigger9 = Var(1) = 8
trigger10 = Anim = 610
trigger10 = Var(1) = 9
trigger11 = Anim = 610
trigger11 = Var(1) = 10
trigger12 = Anim = 610
trigger12 = Var(1) = 11
trigger13 = Anim = 700
trigger13 = Var(1) = 12
trigger14 = Anim = 720
trigger14 = Var(1) = 13
trigger15 = Anim = 240
trigger15 = Var(1) = 14
trigger16 = Anim = 200
trigger16 = Var(1) = 15
trigger17 = Anim = 210
trigger17 = Var(1) = 16
trigger18 = Anim = 220
trigger18 = Var(1) >= 17
var(1) = 1
;--------------------

;--------------------
; Anim Attack Sounds
[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 200
trigger1 = AnimElem = 2
trigger2 = Anim = 600
trigger2 = AnimElem = 2
trigger3 = Anim = 700
trigger3 = AnimElem = 2
value = 10, 1
channel = 1

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 210
trigger1 = AnimElem = 2
trigger2 = Anim = 240
trigger2 = AnimElem = 3
value = 10, 2
channel = 1

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 220
trigger1 = AnimElem = 5
trigger2 = Anim = 720
trigger2 = AnimElem = 2
value = 10, 3
channel = 1

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 230
trigger1 = AnimElem = 3
trigger2 = Anim = 610
trigger2 = AnimElem = 2
value = 10, 4
channel = 1

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 250
trigger1 = AnimElem = 4
value = 10, 6
channel = 1
;--------------------

;--------------------
; Attack HitDefs
[State 2100, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 200
trigger1 = AnimElem = 2
trigger2 = Anim = 600
trigger2 = AnimElem = 2
trigger3 = Anim = 700
trigger3 = AnimElem = 2
attr = S, SA
damage = 30, 0
getpower = 0,0
animtype = Light
hitflag = MAF
guardflag = MA
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 1, 2), Ifelse(Var(55) > 0, 10, 20)
sparkno = 0
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 50
ground.hittime = 50
ground.velocity = 0
airguard.velocity = 0,0
air.type = High
air.velocity = 0,0
air.hittime = 50
forcestand = 1
kill = 0

[State 2100, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 210
trigger1 = AnimElem = 2
trigger2 = Anim = 240
trigger2 = AnimElem = 3
trigger3 = Anim = 610
trigger3 = AnimElem = 3
trigger4 = Anim = 720
trigger4 = AnimElem = 2
attr = S, SA
damage = 30, 0
getpower = 0,0
animtype = Medium
hitflag = MAF
guardflag = MA
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 1, 2), Ifelse(Var(55) > 0, 10, 20)
sparkno = 1
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = Low
ground.slidetime = 50
ground.hittime = 50
ground.velocity = 0
airguard.velocity = 0,0
air.type = Low
air.velocity = 0,0
air.hittime = 50
forcestand = 1
kill = 0

[State 2100, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 220
trigger1 = AnimElem = 5
trigger2 = Anim = 230
trigger2 = AnimElem = 3
trigger3 = Anim = 250
trigger3 = AnimElem = 4
attr = S, SA
damage = 30, 0
getpower = 0,0
animtype = Heavy
hitflag = MAF
guardflag = MA
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 1, 2), Ifelse(Var(55) > 0, 10, 20)
sparkno = 2
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 50
ground.hittime = 50
ground.velocity = 0
airguard.velocity = 0,0
air.type = High
air.velocity = 0,0
air.hittime = 50
forcestand = 1
kill = 0
;--------------------

;----- Hit Impact -----
[State 2100, Hit]
type = PlaySnd
triggerall = MoveHit
trigger1 = Anim = 200
trigger2 = Anim = 600
trigger3 = Anim = 700
ignorehitpause = 1
value = 2, 10
channel = 2

[State 2100, Hit]
type = PlaySnd
triggerall = MoveHit
trigger1 = Anim = 210
trigger2 = Anim = 220
trigger3 = Anim = 230
trigger4 = Anim = 240
trigger5 = Anim = 610
trigger6 = Anim = 720
ignorehitpause = 1
value = 2, 11
channel = 2

[State 2100, Hit]
type = PlaySnd
triggerall = MoveHit
trigger1 = Anim = 250
ignorehitpause = 1
value = 2, 12
channel = 2

[State 2100, Guard]
type = PlaySnd
trigger1 = MoveGuarded
ignorehitpause = 1
value = 2, 0
channel = 3

[State 2100, Reset]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1
;--------------------

[State 2100, State]
type = ChangeState
trigger1 = Var(1) <= 17
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 2100, State]
type = ChangeState
trigger1 = Time > 100
trigger1 = Anim = 220
trigger1 = AnimElem = 10, >= 0
trigger1 = Var(1) >= 18
value = 2102

;---------------------------------------------------------------------------
; Reverse Ultimate Raging Omega Slash Finishing Blow
[Statedef 2102]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0

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

[State 2100, AfterImage]
type = AfterImageTime
trigger1 = 1
ignorehitpause = 1
time = 2

[State 2100, PosSet]
type = PosSet
trigger1 = Time <= 0
y = 0

[State 2100, Explod]
type = Explod
trigger1 = Time < 20
trigger1 = NumExplod(266) <= 0
ignorehitpause = 1
sprpriority = 10
supermovetime = -1
pausemovetime = -1
removeongethit = 1
scale = const(size.xscale), const(size.yscale)
bindtime = -1
postype = P1
ownpal = 1
ontop = 1
anim = 266
pos = ceil(-35 * const(size.xscale)),0
id = 266

[State 2100, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 230
value = 230

[State 2100, Helper]
type = Helper
trigger1 = NumHelper(10000) = 0
helpertype = normal
name = "Sabre"
pausemovetime = 1000000000
supermovetime = 1000000000
id = 10000
pos = 0, 0
postype = P1
stateno = 10000
keyctrl = 0

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 230
trigger1 = AnimElem = 2
persistent = 0
value = 1, 0
channel = 1

[State 2100, Anim]
type = ChangeAnim
trigger1 = Time < 20
trigger1 = Anim = 230
trigger1 = AnimElem = 2, >= 0
ignorehitpause = 1
value = 230
elem = 2

[State 2100, PalFX]
type = PalFX
trigger1 = Time < 20
trigger1 = Anim = 230
trigger1 = AnimElem = 2, >= 0
trigger1 = TimeMod = 2,0
time = 1
add = 250,250,250
ignorehitpause = 1

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 230
trigger1 = AnimElem = 3
value = 10, 4
channel = 1

[State 2100, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 230
trigger1 = AnimElem = 4
attr = S, HA
animtype  = Up
damage = 90, 0
getpower = 0,0
priority = 5
guardflag = MA
pausetime = Ifelse(Var(55) > 0, 15, 30), Ifelse(Var(55) > 0, 15, 30)
guard.pausetime = 10,10
sparkno = 3
hitsound = S2, 11
sparkxy = ceil(-10 * const(size.xscale)), ceil(-40 * const(size.yscale))
ground.type = Low
ground.slidetime = 26
ground.hittime  = 26
ground.velocity = -1.3,-20
guard.velocity = -11
air.velocity = -1.3,-25
airguard.velocity = -4.5,-5
envshake.time = 25
envshake.ampl = 7
envshake.freq = 176
p2facing = 1
fall.recover = 0
fall.damage = 30
fall.envshake.ampl = 6
fall.envshake.freq = 178
fall.envshake.time = 15
mindist = ceil(25 * const(size.xscale)), ceil(-50 * const(size.yscale))
maxdist = ceil(50 * const(size.xscale)), ceil(-5 * const(size.yscale))
forcestand = 1
air.fall = 1
;yaccel = 0.5 
fall = 1
kill = ifelse(Power >= 1500, 0, 1)

;----- Hit Impact -----
[State 2100, EnvColor]
type = EnvColor
triggerall = MoveHit
trigger1 = Anim = 230
value = 250,250,250
ignorehitpause = 1
persistent = 0
under = 1
time = 2

[State 2100, Hit]
type = PlaySnd
triggerall = MoveHit
trigger1 = Anim = 230
ignorehitpause = 1
persistent = 0
value = 2, 12
channel = 2

[State 2100, Guard]
type = PlaySnd
trigger1 = MoveGuarded
ignorehitpause = 1
persistent = 0
value = 2, 0
channel = 3
;--------------------

[State 2100, Anim]
type = ChangeAnim
triggerall = MoveContact
trigger1 = Anim = 230
trigger1 = AnimElem = 3, >= 0
trigger1 = AnimElem = 6, < 0
ignorehitpause = 1
persistent = 0
value = Anim
elem = 6

[State 2100, State]
type = ChangeState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Power >= 1500
ignorehitpause = 1
value = 2103

[State 2100, Reset]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 2100, State]
type = ChangeState
triggerall = NumTarget > 0
trigger1 = Anim = 230
trigger1 = AnimTime = 0
value = 2104

[State 2100, State]
type = ChangeState
triggerall = NumTarget <= 0
trigger1 = Anim = 230
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Grand Finale Command Input
[Statedef 2103]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0

[State 2100, Reset]
type = MoveHitReset
trigger1 = 1
ignorehitpause = 1

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

[State 2100, AfterImage]
type = AfterImageTime
trigger1 = 1
ignorehitpause = 1
time = 2

[State 2100, PosSet]
type = PosSet
trigger1 = Time <= 0
y = 0

;--------------------
; Grand Finale Input Command
[State 2100, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = Var(1) > 0
trigger2 = Var(2) >= 30
trigger3 = NumTarget > 0
trigger3 = Target, Pos Y >= 0 || Target, Alive = 0
trigger4 = NumTarget <= 0
ignorehitpause = 1
var(1) = 0

[State 2100, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = Var(1) > 0
trigger2 = Var(2) >= 30
trigger3 = NumTarget > 0
trigger3 = Target, Pos Y >= 0 || Target, Alive = 0
trigger4 = NumTarget <= 0
ignorehitpause = 1
var(2) = 0

[State 2100, !]
type = Explod
triggerall = Time > 0
triggerall = NumExplod(900) <= 0
triggerall = NumTarget > 0
triggerall = Target, Alive
trigger1 = TimeMod = 2,0
trigger1 = Var(1) <= 0
pausemovetime = -1
supermovetime = -1
removeongethit = 1
ignorehitpause = 1
sprpriority = 50
postype = P1
bindtime = -1
scale = const(size.xscale), const(size.yscale)
anim = 900
id = 900
pos = 0,0
ontop = 0
ownpal = 1

[State 2100, VarSet]
type = VarSet
triggerall = Time > 0
trigger1 = Command = "holddown"
trigger1 = Var(1) <= 0
trigger2 = Command = "holddownfwd"
trigger2 = Var(1) = 1
trigger3 = Command = "holdfwd"
trigger3 = Var(1) = 2
trigger4 = Command = "holdback"
trigger4 = Var(1) = 3
trigger5 = Command = "holddownback"
trigger5 = Var(1) = 4
trigger6 = Command = "holddown"
trigger6 = Var(1) = 5
trigger7 = Command = "holddownfwd"
trigger7 = Var(1) = 6
trigger8 = Command = "holdfwd"
trigger8 = Var(1) = 7
trigger9 = Command = "x"
trigger9 = Var(1) = 8
trigger10 = Command = "y"
trigger10 = Var(1) = 9
trigger11 = Command = "x" && Command = "y"
trigger11 = Var(1) = 10
ignorehitpause = 1
var(2) = -1

[State 2100, VarAdd]
type = VarAdd
trigger1 = Time > 0
ignorehitpause = 1
var(2) = 1

[State 2100, Varadd]
type = VarAdd
triggerall = Time > 0
trigger1 = Command = "holddown"
trigger1 = Var(1) <= 0
trigger2 = Command = "holddownfwd"
trigger2 = Var(1) = 1
trigger3 = Command = "holdfwd"
trigger3 = Var(1) = 2
trigger4 = Command = "holdback"
trigger4 = Var(1) = 3
trigger5 = Command = "holddownback"
trigger5 = Var(1) = 4
trigger6 = Command = "holddown"
trigger6 = Var(1) = 5
trigger7 = Command = "holddownfwd"
trigger7 = Var(1) = 6
trigger8 = Command = "holdfwd"
trigger8 = Var(1) = 7
trigger9 = Command = "x"
trigger9 = Var(1) = 8
trigger10 = Command = "y"
trigger10 = Var(1) = 9
trigger11 = Command = "x" && Command = "y"
trigger11 = Var(1) = 10
ignorehitpause = 1
var(1) = 1

[State 2100, Explod]
type = Explod
trigger1 = Var(1) > 0
trigger1 = NumExplod(266) <= 0
ignorehitpause = 1
sprpriority = 10
supermovetime = -1
pausemovetime = -1
removeongethit = 1
removetime = -1
scale = const(size.xscale), const(size.yscale)
bindtime = -1
postype = P1
ownpal = 1
ontop = 1
anim = 266
pos = ceil(-35 * const(size.xscale)),0
id = 266

[State 2100, Explod]
type = RemoveExplod
triggerall = NumExplod(266) > 0
trigger1 = Var(1) <= 0
trigger2 = Var(1) > 10
ignorehitpause = 1
id = 266

[State 2100, PalFX]
type = PalFX
triggerall = Time > 0
triggerall = Var(2) <= 0
trigger1 = Var(1) > 0
ignorehitpause = 1
time = 1
add = 250,0,0

[State 2100, PlaySnd]
type = PlaySnd
triggerall = Time > 0
triggerall = Var(2) <= 0
trigger1 = Var(1) > 0
ignorehitpause = 1
value = 2, 0
channel = 2
;--------------------

;--------------------
; Grand Finale Input Success
[State 2100, EnvColor]
type = EnvColor
triggerall = Time > 0
triggerall = Var(2) <= 0
trigger1 = Var(1) > 10
value = 250,250,250
ignorehitpause = 1
under = 1
time = 2

[State 2100, PlaySnd]
type = PlaySnd
triggerall = Time > 0
triggerall = Var(2) <= 0
trigger1 = Var(1) > 10
value = 8, 0
channel = 2

[State 2100, State]
type = ChangeState
triggerall = Time > 0
triggerall = NumTarget > 0
triggerall = Target, Alive
trigger1 = Var(1) > 10
ignorehitpause = 1
value = 2105
;--------------------

[State -2, Variables]
type = DisplayToClipboard
trigger1 = 1
text = "Command Input: %d     Input Timer: %d \nHold Start to see command hint"
params = Var(1), Var(2)
ignorehitpause = 1

[State -2, Variables]
type = DisplayToClipboard
trigger1 = Command ="hold_s"
text = "Command: v, v>, >, <, v<, v, v>, >, x, y, x+y"
ignorehitpause = 1

[State 2100, State]
type = ChangeState
triggerall = Time > 0
triggerall = AnimTime = 0
trigger1 = NumTarget > 0
trigger1 = Target, Pos Y >= 0 || Target, Alive = 0
trigger2 = NumTarget <= 0
trigger3 = Power < 1500
value = 2104

[State 2100, Anim]
type = ChangeAnim
trigger1 = Anim = 230
trigger1 = AnimTime = 0
trigger1 = NumTarget > 0
trigger1 = Target, Pos Y < 0
value = Anim
elem = 10

;---------------------------------------------------------------------------
; Finishing Taunt
[Statedef 2104]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0

[State 2100, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 182
value = 182

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 182
trigger1 = AnimElem = 5
value = 10, 10
channel = 1

[State 2100, Anim]
type = ChangeAnim
triggerall = RoundState > 2
trigger1 = Anim = 182
trigger1 = AnimElem = 7, >= 0
ignorehitpause = 1
value = Anim
elem = 7

[State 2100, CtrlSet]
type = CtrlSet
trigger1 = RoundState > 2
trigger1 = TimeMod = 50,0
ignorehitpause = 1
value = 1

[State 2100, CtrlSet]
type = CtrlSet
trigger1 = RoundState > 2
trigger1 = TimeMod = 2,1
trigger1 = Ctrl = 1
ignorehitpause = 1
value = 0

[State 2100, State]
type = ChangeState
trigger1 = Anim = 182
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Grand Finale Jump Backwards
[Statedef 2105]
type = A
movetype = A
physics = N
velset = 0,0
ctrl = 0

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

[State 2105, AfterImage]
type = AfterImageTime
trigger1 = 1
ignorehitpause = 1
time = 2

[State 2105, PlayerPush]
type = PlayerPush
trigger1 = 1
ignorehitpause = 1
value = 0

[State 2105, 3]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 44
value = 44

[State 2105, PlaySnd]
type = PlaySnd
triggerall = Name = "Omega Inarabbita"
triggerall = AuthorName = "N-Mario"
trigger1 = Time <= 0
trigger2 = Anim = 44
trigger2 = AnimElem = 1
value = 0, 1
channel = 5

[State 2105, Pause]
type = Pause
trigger1 = 1
ignorehitpause = 1
movetime = 2
time = 2

[State 2105, VelSet]
type = VelSet
trigger1 = Time <= 0
x = (-BackEdgeDist / 4 + const(velocity.run.back.x)) / 2

[State 2105, State]
type = ChangeState
trigger1 = Time > 0
trigger1 = (BackEdgeBodyDist <= 50 / const(size.xscale))
trigger2 = Time > 50
value = 2200

;---------------------------------------------------------------------------
; Omega Beam Hell Buster Shot Grand Finale
[Statedef 2200]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0

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

[State 2200, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(56) = 1

[State 2200, AfterImage]
type = AfterImageTime
trigger1 = Anim = 300
ignorehitpause = 1
time = 2

[State 2200, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 300
trigger2 = Anim = 300
trigger2 = Time < 50
trigger3 = NumTarget > 0
trigger3 = Target, Pos Y < -150
value = 300
elem = 2

[State 2200, EnvColor]
type = EnvColor
trigger1 = Time <= 0
value = 250,250,250
ignorehitpause = 1
persistent = 0
under = 0
time = 2

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = Time <= 0
value = 10, 10
channel = 1

[State 2200, SuperPause]
type = SuperPause
trigger1 = Time <= 0
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
anim = 102
time = 50
movetime = 50
sound = S3, 0
poweradd = -1500
persistent = 0
darken = 0

[State 2200, EnvShake]
type = EnvShake
trigger1 = Time <= 0
time = 5
freq = 50
ampl = -10
phase = 10

;--------------------
; Flash Animation
;--------------------
[State 2200, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 0,0
ontop = 1
ownpal = 1

[State 2200, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 256,0
ontop = 1
ownpal = 1

[State 2200, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 512,0
ontop = 1
ownpal = 1

[State 2200, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = 0,0
ontop = 1
ownpal = 1

[State 2200, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = -256,0
ontop = 1
ownpal = 1

[State 2200, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = -512,0
ontop = 1
ownpal = 1
;--------------------

;--------------------
; Super Portrait
;--------------------
[State 2200, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
scale = 2,2
anim = 9000
id = 9000
facing = 1
pos = 100,0
ontop = 1
ownpal = 1

[State 2200, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
scale = 2,2
anim = 9000
id = 9000
facing = -1
pos = -100,0
ontop = 1
ownpal = 1
;--------------------

[State 2200, PlaySnd]
type = PlaySnd
triggerall = Anim = 300
triggerall = AnimElem = 3, < 0
trigger1 = Time = 30
trigger2 = Time = 80
value = 3, 10
channel = 2

[State 2200, Helper]
type = Helper
triggerall = Anim = 300
triggerall = AnimElem = 3, < 0
trigger1 = Time = 30
trigger2 = Time = 80
helpertype = normal
pausemovetime = 1000000000
supermovetime = 1000000000
name = "Charge Spark"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 1011
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 1011
keyctrl = 0

[State 2200, 2]
type = null ;Helper
triggerall = NumHelper(500) = 0
trigger1 = Anim = 300
trigger1 = AnimElem = 3
helpertype = normal
pausemovetime = 1000000000
supermovetime = 1000000000
ignorehitpause = 1
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
name = "Beam"
id = 500
facing = 1
pos = ceil(40 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 500
keyctrl = 0
ownpal = 1

[State 2200, 2]
type = Helper
triggerall = NumHelper(550) = 0
trigger1 = Anim = 300
trigger1 = AnimElem = 3
helpertype = normal
pausemovetime = 1000000000
supermovetime = 1000000000
ignorehitpause = 1
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
name = "Super Beam"
id = 550
facing = 1
pos = ceil(50 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 550
keyctrl = 0
ownpal = 1

[State 2200, BGPalFX]
type = BGPalFX
triggerall = NumHelper(500) > 0 || NumHelper(550) > 0
trigger1 = Anim = 300
trigger1 = TimeMod = 2,0
add = 50, 50, 50
time = 1
ignorehitpause = 1

[State 2200, PalFX]
type = PalFX
triggerall = NumHelper(500) > 0 || NumHelper(550) > 0
trigger1 = Anim = 300
trigger1 = TimeMod = 2,0
time = 1
add = 50,50,50
ignorehitpause = 1

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = Anim = 300
trigger1 = AnimElem = 3
persistent = 0
value = 3, 11
channel = 2

[State 2200, EnvShake]
type = EnvShake
triggerall = NumHelper(500) > 0 || NumHelper(550) > 0
trigger1 = Anim = 300
trigger1 = TimeMod = 2,0
time = 10
freq = 50
ampl = -15
phase = 15

[State 2200, Anim]
type = ChangeAnim
triggerall = NumHelper(500) > 0 || NumHelper(550) > 0
trigger1 = Anim = 300
trigger1 = AnimElem = 5, > 0
value = Anim
elem = 3

[State 2200, Anim]
type = ChangeAnim
trigger1 = Anim = 300
trigger1 = AnimTime = 0
trigger2 = Anim = 301
trigger2 = AnimElem = 6, < 0
value = 301
elem = 6

[State 2200, State]
type = ChangeState
trigger1 = Anim = 301
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; The Ultimate Move
[Statedef 2500]
type = A
movetype = A
physics = N
sprpriority = 20
velset = 0,0
ctrl = 0

[State 2500, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(56) = 1

[State 2500, ScreenBound]
type = ScreenBound
trigger1 = 1
ignorehitpause = 1
movecamera = 0,0
value = 0

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

[State 2500, SprPriority]
type = SprPriority
trigger1 = 1
ignorehitpause = 1
value = 20

[State 2500, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 41
value = 41

[State 2500, PlaySnd]
type = PlaySnd
triggerall = Name = "Omega Inarabbita"
triggerall = AuthorName = "N-Mario"
trigger1 = Time <= 0
trigger2 = Anim = 41
trigger2 = AnimElem = 1
value = 0, 1
channel = 5

[State 2500, VarSet]
type = VelSet
trigger1 = Time <= 0
trigger2 = Anim = 41
trigger2 = AnimElem = 1
y = -10

[State 2500, 5]
type = ChangeState
trigger1 = Time > 0
trigger1 = Pos Y < -250
value = 2501

;---------------------------------------------------------------------------
; The Ultimate Move
[Statedef 2501]
type = A
movetype = A
physics = N
velset = 0,0
sprpriority = 20
ctrl = 0

[State 2500, ScreenBound]
type = ScreenBound
trigger1 = 1
ignorehitpause = 1
movecamera = 0,0
value = 0

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

[State 2500, SprPriority]
type = SprPriority
trigger1 = 1
ignorehitpause = 1
value = 20

[State 2500, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 1000
value = 1000

[State 2500, PosSet]
type = PosSet
trigger1 = Time <= 0
y = -300

[State 2500, EnvColor]
type = EnvColor
trigger1 = Time <= 0
value = 250,250,250
ignorehitpause = 1
persistent = 0
under = 0
time = 2

[State 2500, PlaySnd]
type = PlaySnd
trigger1 = Time <= 0
value = 10, 100
channel = 1

;--------------------
; Flash Animation
;--------------------
[State 2500, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 0,0
ontop = 1
ownpal = 1

[State 2500, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 256,0
ontop = 1
ownpal = 1

[State 2500, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
anim = 9900
id = 9900
facing = 1
pos = 512,0
ontop = 1
ownpal = 1

[State 2500, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = 0,0
ontop = 1
ownpal = 1

[State 2500, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = -256,0
ontop = 1
ownpal = 1

[State 2500, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
anim = 9900
id = 9900
facing = -1
pos = -512,0
ontop = 1
ownpal = 1
;--------------------

;--------------------
; Super Portrait
;--------------------
[State 2500, Left]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = 1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = left
bindtime = -1
scale = 2,2
anim = 9000
id = 9000
facing = 1
pos = 100,0
ontop = 1
ownpal = 1

[State 2500, Right]
type = Explod
trigger1 = Time <= 0
trigger1 = Facing = -1
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = 50
removetime = 40
persistent = 0
postype = right
bindtime = -1
scale = 2,2
anim = 9000
id = 9000
facing = -1
pos = -100,0
ontop = 1
ownpal = 1
;--------------------

[State 2500, Super]
type = Explod
trigger1 = Time <= 0
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
sprpriority = -50
persistent = 0
postype = P1
bindtime = -1
anim = F102
id = 102
pos = ceil(-10 * const(size.yscale)),ceil(-35 * const(size.yscale))
ontop = 0
ownpal = 1
under = 1

[State 2500, PosAdd]
type = PosAdd
trigger1 = Time <= 0
x = P2Dist X

[State 2500, Helper]
type = Helper
trigger1 = NumHelper(2510) = 0
trigger1 = Time <= 0
helpertype = normal
name = "Giant Mettaur"
size.xscale = const(size.xscale) / 1.3
size.yscale = const(size.yscale) / 1.3
size.ground.back = ceil(30 * const(size.xscale))
size.ground.front = ceil(30 * const(size.xscale))
size.air.back = ceil(30 * const(size.xscale))
size.air.front = ceil(30 * const(size.xscale))
id = 2510
pos = 0, 0
postype = P1
stateno = 2510
keyctrl = 0

[State 2500, SuperPause]
type = SuperPause
trigger1 = Time <= 0
pos = 0, 0
anim = -1
time = 40
movetime = 0
sound = S3, 0
poweradd = -3000

[State 2500, 5]
type = ChangeState
trigger1 = NumHelper(2510) <= 0
trigger1 = Time > 0
value = 50

[State 2500, Anim]
type = ChangeAnim
trigger1 = Time = 2
value = 1000
elem = 3

[State 2500, PosSet]
type = PosSet
trigger1 = NumHelper(2510) > 0
trigger1 = Helper(2510), StateType = S
x = Helper(2510), Pos X
y = Helper(2510), Pos Y - (80 * const(size.yscale)) ; 160

[State 2500, PosSet]
type = PosSet
trigger1 = NumHelper(2510) > 0
trigger1 = Helper(2510), StateType = A
x = Helper(2510), Pos X
y = Helper(2510), Pos Y - (85 * const(size.yscale)) ; 170

[State 2500, Anim]
type = ChangeAnim
trigger1 = Anim = 1000
trigger1 = NumHelper(2510) > 0
trigger1 = Helper(2510), StateType = S
trigger1 = Time > 50
value = 1001

[State 2500, Anim]
type = ChangeAnim
trigger1 = Anim = 1001
trigger1 = AnimTime = 0
value = 181

[State 2500, PlaySnd]
type = PlaySnd
trigger1 = Anim = 181
trigger1 = AnimElem = 4
value = 10, 10
persistent = 0
channel = 1

[State 2500, 5]
type = ChangeState
trigger1 = Time > 50
trigger1 = RoundState > 2
value = 2505

[State 2500, 5]
type = ChangeState
trigger1 = NumHelper(2510) > 0
trigger1 = Helper(2510), StateNo = 2515
value = 2502

;---------------------------------------------------------------------------
; Jump Off
[Statedef 2502]
type = A
movetype = I
physics = A
velset = 0,0
ctrl = 0

[State 2500, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 41
value = 41

[State 2500, PlaySnd]
type = PlaySnd
triggerall = Name = "Omega Inarabbita"
triggerall = AuthorName = "N-Mario"
trigger1 = Time <= 0
trigger2 = Anim = 41
trigger2 = AnimElem = 1
value = 0, 1
channel = 5

[State 2500, VelSet]
type = VelSet
trigger1 = Time <= 0
trigger2 = Anim = 41
trigger2 = AnimElem = 1
x = -1.5 * Const(size.xscale)
y = -3 * Const(size.xscale)

[State 2500, Anim]
type = ChangeAnim
trigger1 = Time > 0
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(Anim + 3)
trigger1 = Anim != Anim + 3
persistent = 0
value = Anim + 3

[State 60, State]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0
value = 50

;---------------------------------------------------------------------------
; The Ultimate Move Winning Taunt
[Statedef 2505]
type = S
movetype = I
physics = S
velset = 0,0
sprpriority = 20
ctrl = 0

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

[State 2500, SprPriority]
type = SprPriority
trigger1 = 1
ignorehitpause = 1
value = 20

[State 2500, Anim]
type = ChangeAnim
triggerall = Time <= 0
trigger1 = Anim != 1001
value = 1001

[State 2500, Anim]
type = ChangeAnim
trigger1 = Anim = 1001
trigger1 = AnimTime = 0
value = 181

[State 2500, PlaySnd]
type = PlaySnd
trigger1 = Anim = 181
trigger1 = AnimElem = 4
value = 10, 101
persistent = 0
channel = 1

[State 2500, CtrlSet]
type = CtrlSet
trigger1 = TimeMod = 50,0
ignorehitpause = 1
value = 1

[State 2500, CtrlSet]
type = CtrlSet
trigger1 = TimeMod = 2,1
trigger1 = Ctrl = 1
ignorehitpause = 1
value = 0

;---------------------------------------------------------------------------
