; Special Moves
;---------------------------------------------------------------------------
; Sabre Uppercut Slash Blade
[Statedef 235]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 10
ctrl = 0

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

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

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

[State 235, 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 235, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 10, 4
channel = 1

[State 235, 2]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 230
trigger1 = AnimElem = 3
attr = S, NA
damage = 60, 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 2, 5), Ifelse(Var(55) > 0, 2, 5)
sparkno = 1
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
airguard.velocity = -3,-2
air.type = Low
air.velocity = -4,-3
air.hittime = 15

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

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

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

[State 235, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 230
trigger1 = AnimElem = 4
helpertype = normal
name = "Blade"
id = 370
pos = ceil(25 * Const(size.xscale)), 0
postype = P1
stateno = 370
keyctrl = 0
ownpal = 1

[State 235, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Sabre Slash Attack
[Statedef 240]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 10
ctrl = 0

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

[State 240, 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 240, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 10, 2
channel = 1

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

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

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

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

[State 240, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 240
trigger1 = AnimElem = 3
helpertype = normal
name = "Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 245
pos = ceil(30 * Const(size.xscale)), ceil(-20 * const(size.yscale))
postype = P1
stateno = 245
keyctrl = 0
ownpal = 1

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

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

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

[State 250, 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 250, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 250
trigger1 = AnimElem = 3
attr = S, NA
damage = 90, 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 250, Hit]
type = PlaySnd
trigger1 = MoveHit
ignorehitpause = 1
value = 2, 12
channel = 2

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

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

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

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

[State 250, 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 250, State]
type = ChangeState
trigger1 = Anim = 250
trigger1 = AnimElem = 4, >= 0
value = 251

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

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

[State 250, 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 250, HitDef]
type = HitDef
triggerall = Var(15) <= 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 250
trigger1 = AnimElem = 4
attr = S, NA
damage = 90, 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 250, HitDef]
type = HitDef
triggerall = Var(15) > 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 250
trigger1 = AnimElem = 4
attr = S, NA
damage = 90, 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 250, Hit]
type = PlaySnd
trigger1 = MoveHit
ignorehitpause = 1
value = 2, 12
channel = 2

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

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

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

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

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

;---------------------------------------------------------------------------
; Charged Sabre
[Statedef 260]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 10
ctrl = 0

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

[State 260, 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 260, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 10, 4
channel = 1

[State 260, EnvShake]
type = EnvShake
trigger1 = AnimElem = 3
time = 25
freq = 100
ampl = -10
phase = 10

[State 260, Explod]
type = Explod
triggerall = NumHelper(10000) > 0
trigger1 = AnimElem = 4
sprpriority = 15
scale = const(size.xscale), const(size.yscale)
postype = P1
ownpal = 1
anim = 267
pos = 0,0
id = 267

;--------------------
; Small Rocks
[State 260, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = AnimElem = 4
helpertype = normal
name = "Small Big Rock"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 285
pos = ceil(35 * const(size.xscale)), 0
postype = P1
stateno = 280
keyctrl = 0
ownpal = 1

[State 260, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = AnimElem = 4
helpertype = normal
name = "Small Big Rock"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 286
pos = ceil(35 * const(size.xscale)), 0
postype = P1
stateno = 280
keyctrl = 0
ownpal = 1

[State 260, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = AnimElem = 4
helpertype = normal
name = "Small Little Rock"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 287
pos = ceil(35 * const(size.xscale)), 0
postype = P1
stateno = 280
keyctrl = 0
ownpal = 1

[State 260, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = AnimElem = 4
helpertype = normal
name = "Small Little Rock"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 288
pos = ceil(35 * const(size.xscale)), 0
postype = P1
stateno = 280
keyctrl = 0
ownpal = 1

[State 260, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = AnimElem = 4
helpertype = normal
name = "Small Tiny Rock"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 289
pos = ceil(35 * const(size.xscale)), 0
postype = P1
stateno = 280
keyctrl = 0
ownpal = 1
;--------------------

[State 260, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = AnimElem = 4
helpertype = normal
name = "Boulder Trigger"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 265
pos = 0, 0
postype = P1
stateno = 265
keyctrl = 0
ownpal = 1

[State 260, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 260
trigger1 = AnimElem = 4
attr = S, SA
damage = 90, 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(-20 * Const(size.yscale))
;hitsound = S2, 11
;guardsound = S2, 0
ground.type = High
ground.slidetime = 40
ground.hittime = 40
ground.velocity = -3,-6
airguard.velocity = -2,-3
air.type = Low
air.velocity = -3,-6
air.hittime = 40
fall.recover = 0
air.fall = 1
fall = 1

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

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

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

[State 260, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Buster Shot
[Statedef 300]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 5
ctrl = 0

;----- Shot Power -----
[State 300, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) <= 0
var(1) = 0

[State 300, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(391) > 0
trigger2 = NumHelper(396) > 0
var(1) = 10

[State 300, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) > 0
var(1) = 20
;--------------------

;----- Raid Fire -----
[State 300, Anim]
type = ChangeAnim
triggerall = Time > 0
triggerall = Var(1) <= 0
triggerall = Var(3) > 0
triggerall = Var(32) <= 0
triggerall = Var(35) <= 0
trigger1 = NumHelper(310) < 3
trigger1 = AnimElem = 3, > 0
trigger1 = Command = "y"
value = 300
elem = ifelse (Var(55) > 0, 2, 3)
;--------------------

;----- Shot Reset -----
[State 300, VarSet]
type = VarSet
triggerall = Time > 0
triggerall = Var(1) > 0
triggerall = Var(32) <= 0
triggerall = Var(35) <= 0
trigger1 = NumHelper(310) > 0
trigger1 = AnimElem = 3, > 0
var(1) = 0
;--------------------

;--- Shot Storing Variables ---
[State 300, VarSet]
type = VarSet
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) <= 0
var(32) = 0

[State 300, VarSet]
type = VarSet
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) > 0
var(32) = 1

[State 300, VarSet]
type = VarSet
trigger1 = Var(1) < 20
var(35) = 0

[State 300, VarSet]
type = VarSet
trigger1 = Var(1) >= 20
var(35) = 1
;------------------------------

[State 300, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 300
value = 300
elem = ifelse(Var(1) = 10, 1, 3)

[State 300, Anim]
type = ChangeAnim
triggerall = Var(55) > 0
trigger1 = Anim = 300
trigger1 = Time <= 0
value = 300
elem = 2

[State 300, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Var(1) >= 20 || Var(35) > 0
trigger1 = Anim != 301
value = 301
elem = ifelse(PrevStateNo = 300, 3, 1)

[State 300, Anim]
type = ChangeAnim
triggerall = Var(55) > 0
trigger1 = Anim = 301
trigger1 = Time <= 0
value = 301
elem = 2

;----- Buster Shot -----
[State 300, Helper]
type = Helper
triggerall = Var(1) = 0
trigger1 = AnimElem = 3
helpertype = normal
name = "Small Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 310
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 310
keyctrl = 0
ownpal = 1

[State 300, Helper]
type = Helper
triggerall = Var(1) = 10
trigger1 = AnimElem = 3
helpertype = normal
name = "Charged Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 310
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 320
keyctrl = 0
ownpal = 1

[State 300, Helper]
type = Helper
triggerall = Var(1) = 20
trigger1 = AnimElem = 3
helpertype = normal
name = "Charged Mega Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 310
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 330
keyctrl = 0
ownpal = 1
;--------------------

[State 300, PlaySnd]
type = PlaySnd
triggerall = Var(1) <= 0
trigger1 = AnimElem = 3
value = 4, 0
channel = 3

[State 300, PlaySnd]
type = PlaySnd
triggerall = Var(1) > 0
trigger1 = AnimElem = 3
value = 10, 7
channel = 1

[State 300, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Buster Shot Air
[Statedef 305]
type = A
movetype = A
physics = A
juggle = 5
ctrl = 0

;----- Shot Power -----
[State 305, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) <= 0
var(1) = 0

[State 305, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(391) > 0
trigger2 = NumHelper(396) > 0
var(1) = 10

[State 305, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) > 0
var(1) = 20
;--------------------

;----- Raid Fire -----
[State 305, Anim]
type = ChangeAnim
triggerall = Time > 0
triggerall = Var(1) <= 0
triggerall = Var(3) > 0
triggerall = Var(32) <= 0
triggerall = Var(35) <= 0
trigger1 = NumHelper(310) < 3
trigger1 = AnimElem = 3, > 0
trigger1 = Command = "y"
value = 305
elem = ifelse (Var(55) > 0, 1, 2)
;--------------------

;----- Shot Reset -----
[State 305, VarSet]
type = VarSet
triggerall = Time > 0
triggerall = Var(1) > 0
triggerall = Var(32) <= 0
triggerall = Var(35) <= 0
trigger1 = NumHelper(310) > 0
trigger1 = AnimElem = 3, > 0
var(1) = 0
;--------------------

;--- Shot Storing Variables ---
[State 305, VarSet]
type = VarSet
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) <= 0
var(32) = 0

[State 305, VarSet]
type = VarSet
trigger1 = NumHelper(391) <= 0
trigger1 = NumHelper(396) > 0
var(32) = 1

[State 305, VarSet]
type = VarSet
trigger1 = Var(1) < 20
var(35) = 0

[State 305, VarSet]
type = VarSet
trigger1 = Var(1) >= 20
var(35) = 1
;------------------------------

[State 305, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 305
value = 305
elem = ifelse(Var(1) = 10, 1, 2)

[State 305, Anim]
type = ChangeAnim
triggerall = Var(55) > 0
trigger1 = Anim = 305
trigger1 = Time <= 0
value = 305
elem = 1

[State 305, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Var(1) >= 20 || Var(35) > 0
trigger1 = Anim != 306
value = 306
elem = ifelse(PrevStateNo = 305, 2, 1)

[State 305, Anim]
type = ChangeAnim
triggerall = Var(55) > 0
trigger1 = Anim = 306
trigger1 = Time <= 0
value = 306
elem = 1

;----- Buster Shot -----
[State 305, Helper]
type = Helper
triggerall = Var(1) = 0
trigger1 = AnimElem = 2
helpertype = normal
name = "Small Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 310
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 310
keyctrl = 0
ownpal = 1

[State 305, Helper]
type = Helper
triggerall = Var(1) = 10
trigger1 = AnimElem = 2
helpertype = normal
name = "Charged Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 310
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 320
keyctrl = 0
ownpal = 1

[State 305, Helper]
type = Helper
triggerall = Var(1) = 20
trigger1 = AnimElem = 2
helpertype = normal
name = "Charged Mega Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 310
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 330
keyctrl = 0
ownpal = 1
;--------------------

[State 305, PlaySnd]
type = PlaySnd
triggerall = Var(1) <= 0
trigger1 = AnimElem = 2
value = 4, 0
channel = 3

[State 305, PlaySnd]
type = PlaySnd
triggerall = Var(1) > 0
trigger1 = AnimElem = 2
value = 10, 7
channel = 1

[State 305, State]
type = ChangeState
trigger1 = Anim = 305
trigger1 = AnimElem = 8, >= 0
trigger2 = Anim = 306
trigger2 = AnimElem = 5, >= 0
trigger3 = AnimTime = 0
value = 51
ctrl = 1

;---------------------------------------------------------------------------
; CPU Sabre Charge Attack
[Statedef 350]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 5
ctrl = 0

[State 350, Turn]
type = Turn
trigger1 = P2Dist X < 0
ignorehitpause = 1

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

[State 350, Helper]
type = Helper
triggerall = Facing = 1
triggerall = NumHelper(390) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Inner Charge"
persistent = 0
id = 390
pos = 0, 0
postype = P1
stateno = 391
keyctrl = 0
facing = 1
ownpal = 1

[State 350, Helper]
type = Helper
triggerall = Facing = 1
triggerall = NumHelper(395) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Outer Charge"
persistent = 0
id = 395
pos = 0, 0
postype = P1
stateno = 396
keyctrl = 0
facing = 1
ownpal = 1

[State 350, Helper]
type = Helper
triggerall = Facing = -1
triggerall = NumHelper(390) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Inner Charge"
persistent = 0
id = 390
pos = 0, 0
postype = P1
stateno = 391
keyctrl = 0
facing = -1
ownpal = 1

[State 350, Helper]
type = Helper
triggerall = Facing = -1
triggerall = NumHelper(395) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Outer Charge"
persistent = 0
id = 395
pos = 0, 0
postype = P1
stateno = 396
keyctrl = 0
facing = -1
ownpal = 1

[State 350, State]
type = ChangeState
triggerall = Time > 0
trigger1 = Var(55) <= 0
trigger1 = Var(44) >= 30 || Time >= 30
trigger2 = Var(55) > 0
trigger2 = Var(44) >= 15 || Time >= 15
value = 260

[State 350, State]
type = ChangeState
trigger1 = Time > 0
trigger1 = NumHelper(390) <= 0 || NumHelper(395) <= 0
trigger2 = RoundState != 2
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; CPU Z-Buster Charge Attack
[Statedef 360]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 5
ctrl = 0

[State 360, Turn]
type = Turn
trigger1 = P2Dist X < 0
ignorehitpause = 1

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

[State 360, Helper]
type = Helper
triggerall = Facing = 1
triggerall = NumHelper(390) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Inner Charge"
persistent = 0
id = 390
pos = 0, 0
postype = P1
stateno = 391
keyctrl = 0
facing = 1
ownpal = 1

[State 360, Helper]
type = Helper
triggerall = Facing = 1
triggerall = NumHelper(395) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Outer Charge"
persistent = 0
id = 395
pos = 0, 0
postype = P1
stateno = 396
keyctrl = 0
facing = 1
ownpal = 1

[State 350, Helper]
type = Helper
triggerall = Facing = -1
triggerall = NumHelper(390) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Inner Charge"
persistent = 0
id = 390
pos = 0, 0
postype = P1
stateno = 391
keyctrl = 0
facing = -1
ownpal = 1

[State 350, Helper]
type = Helper
triggerall = Facing = -1
triggerall = NumHelper(395) = 0
trigger1 = Anim = 0
helpertype = normal
name = "Outer Charge"
persistent = 0
id = 395
pos = 0, 0
postype = P1
stateno = 396
keyctrl = 0
facing = -1
ownpal = 1

[State 360, State]
type = ChangeState
triggerall = Time > 0
trigger1 = Var(55) <= 0
trigger1 = Var(44) >= 30 || Time >= 30
trigger2 = Var(55) > 0
trigger2 = Var(44) >= 15 || Time >= 15
value = 361

[State 360, State]
type = ChangeState
trigger1 = Time > 0
trigger1 = NumHelper(390) <= 0 || NumHelper(395) <= 0
trigger2 = RoundState != 2
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; CPU 3-in-1 Z-Buster Sabre Blade Combo
[Statedef 361]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 5
ctrl = 0

[State 360, Anim]
type = ChangeAnim
triggerall = Time <= 0
trigger1 = Anim != 300
trigger1 = Anim != 301
value = 300

[State 360, Anim]
type = ChangeAnim
trigger1 = Anim = 300
trigger1 = AnimTime = 0
trigger1 = Var(55) <= 0
value = 301
elem = 3

[State 360, Anim]
type = ChangeAnim
trigger1 = Anim = 300
trigger1 = AnimElem = 5, > 0
trigger1 = Var(55) > 0
value = 301
elem = 2

[State 360, Helper]
type = Helper
trigger1 = Anim = 300
trigger1 = AnimElem = 3
helpertype = normal
name = "Charged Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 320
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 320
keyctrl = 0
ownpal = 1

[State 360, Helper]
type = Helper
trigger1 = Anim = 301
trigger1 = AnimElem = 3
helpertype = normal
name = "Charged Mega Shot"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 330
pos = ceil(25 * const(size.xscale)), ceil(-25 * const(size.yscale))
postype = P1
stateno = 330
keyctrl = 0
ownpal = 1

[State 360, PlaySnd]
type = PlaySnd
trigger1 = Anim = 300 || Anim = 301
trigger1 = AnimElem = 3
value = 10, 7
channel = 1

[State 360, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 362

;---------------------------------------------------------------------------
; CPU Sabre Blade Attack
[Statedef 362]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 5
ctrl = 0

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

[State 360, State]
type = ChangeState
triggerall = Time > 0
trigger1 = Var(55) <= 0
trigger1 = Var(44) >= 25 || Time >= 25
trigger2 = Var(55) > 0
trigger2 = Var(44) > 0 || Time > 0
value = 235

;---------------------------------------------------------------------------
; Jump Charged Sabre
[Statedef 660]
type = A
movetype = A
physics = A
juggle = 10
ctrl = 0

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

[State 660, 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 660, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 10, 4
channel = 1

[State 660, EnvShake]
type = EnvShake
trigger1 = AnimElem = 3
time = 25
freq = 100
ampl = -10
phase = 10

[State 660, VelSet]
type = VelSet
trigger1 = AnimElem = 3
trigger1 = Vel X < 0
x = Vel X

[State 660, VelSet]
type = VelSet
trigger1 = AnimElem = 3
trigger1 = Vel X >= 0
x = Vel X / 2

[State 660, VelSet]
type = VelSet
trigger1 = AnimElem = 3
trigger1 = Vel Y < 0
y = Vel Y

[State 660, VelSet]
type = VelSet
trigger1 = AnimElem = 3
trigger1 = Vel Y >= 0
y = -Vel Y

[State 660, Anim]
type = ChangeAnim
triggerall = Command = "holddown"
trigger1 = Anim = 600
trigger1 = AnimElem = 10, >= 0
trigger1 = AnimElem = 12, < 0
trigger2 = Anim = 660
trigger2 = AnimElem = 9, >= 0
trigger2 = AnimElem = 11, < 0
value = 600
elem = 7

[State 660, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 660
trigger1 = AnimElem = 4
attr = A, SA
damage = 90, 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(-10 * Const(size.yscale))
;hitsound = S2, 11
;guardsound = S2, 0
ground.type = High
ground.slidetime = 40
ground.hittime = 40
ground.velocity = -3,-6
airguard.velocity = -2,-3
air.type = Low
air.velocity = -3,-6
air.hittime = 40
fall.recover = 0
air.fall = 1
fall = 1

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

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

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

[State 660, State]
type = ChangeState
trigger1 = Anim = 660
trigger1 = AnimElem = 12, >= 0
trigger2 = AnimTime = 0
value = 51
ctrl = 1

;---------------------------------------------------------------------------
; Jump Sabre Slash Blade
[Statedef 690]
type = A
movetype = A
physics = A
juggle = 4
ctrl = 0

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

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

[State 690, 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 690, VelSet]
type = VelSet
trigger1 = Anim = 690
trigger1 = AnimElem = 3, < 0
x = 0
y = 0

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

[State 690, VelSet]
type = VelSet
trigger1 = Anim = 690
trigger1 = AnimElem = 3
x = -1 * Const(size.xscale)
y = -2 * Const(size.yscale)

[State 690, Anim]
type = ChangeAnim
triggerall = Command = "holddown"
trigger1 = Anim = 600
trigger1 = AnimElem = 10, >= 0
trigger1 = AnimElem = 12, < 0
trigger2 = Anim = 690
trigger2 = AnimElem = 11, >= 0
trigger2 = AnimElem = 13, < 0
value = 600
elem = 7

[State 690, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 690
trigger1 = AnimElem = 3
attr = A, NA
damage = 60, 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = Ifelse(Var(55) > 0, 2, 5), Ifelse(Var(55) > 0, 2, 5)
sparkno = 0
sparkxy = ceil(-10 * Const(size.xscale)), ceil(-10 * Const(size.yscale))
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5
airguard.velocity = -3,-1
air.type = Low
air.velocity = -4,-2
air.hittime = 15

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

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

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

[State 690, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 690
trigger1 = AnimElem = 4
helpertype = normal
name = "Blade"
id = 370
pos = ceil(20 * Const(size.xscale)), 0
postype = P1
stateno = 370
keyctrl = 0
ownpal = 1

[State 690, State]
type = ChangeState
trigger1 = Anim = 690
trigger1 = AnimElem = 16, >= 0
trigger2 = AnimTime = 0
value = 51
ctrl = 1

;---------------------------------------------------------------------------
; Light Beam Recover
[Statedef 1000]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 2
ctrl = 0

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

[State 1000, Helper]
type = Helper
triggerall = NumHelper(1010) = 0
trigger1 = Anim = 1000
trigger1 = AnimElem = 1
helpertype = normal
name = "Spark"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 1010
pos = 0, 0
postype = P1
stateno = 1010
keyctrl = 0
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
value = 10, 8
channel = 1

[State 1000, Helper]
type = Helper
triggerall = NumHelper(1015) = 0
trigger1 = Anim = 1000
trigger1 = AnimElem = 8, >= 0
helpertype = normal
name = "Beam Object"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
id = 1015
pos = 0, 0
postype = P1
stateno = 1015
keyctrl = 0
ownpal = 1

[State 1000, NotHitBy]
type = NotHitBy
trigger1 = Anim = 1000
trigger1 = NumHelper(1015) > 0
ignorehitpause = 1
value = SCA
time = 1

[State 1000, PlayerPush]
type = PlayerPush
trigger1 = Anim = 1000
trigger1 = NumHelper(1015) > 0
ignorehitpause = 1
value = 0

[State 1000, LifeAdd]
type = LifeAdd
triggerall = Anim = 1000
triggerall = TimeMod = 5,0
triggerall = Life < LifeMax
triggerall = RoundState <= 2
triggerall = NumHelper(1015) > 0
trigger1 = Var(55) <= 0
trigger1 = Var(44) > 30 || Time > 30
value = 15

[State 1000, LifeAdd]
type = LifeAdd
triggerall = Anim = 1000
triggerall = TimeMod = 5,0
triggerall = Life < LifeMax
triggerall = RoundState <= 2
triggerall = NumHelper(1015) > 0
trigger1 = Var(55) > 0
trigger1 = Var(44) > 20 || Time > 20
value = 20

[State 1000, PlaySnd]
type = PlaySnd
triggerall = Anim = 1000
triggerall = TimeMod = 5,0
triggerall = Life < LifeMax
triggerall = RoundState <= 2
triggerall = NumHelper(1015) > 0
trigger1 = Var(55) <= 0
trigger1 = Var(44) > 30 || Time > 30
trigger2 = Var(55) > 0
trigger2 = Var(44) > 20 || Time > 20
value = 9, 10
channel = 2

[State 1000, Anim]
type = ChangeAnim
trigger1 = Time > 0
trigger1 = Var(44) > 100 || Time > 100
trigger1 = Anim != 1001
value = 1001

[State 1000, State]
type = ChangeState
trigger1 = Anim = 1001
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Ground Pound
[Statedef 1100]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 2
ctrl = 0

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

[State 1100, Helper]
type = Helper
triggerall = NumHelper(1050) = 0
trigger1 = Anim = 1000
trigger1 = AnimElem = 1
helpertype = normal
name = "Spark"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 1050
pos = 0, 0
postype = P1
stateno = 1050
keyctrl = 0

;--------------------
; Launch Projectiles
[State 1100, Helper]
type = Helper
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
helpertype = normal
name = "Spark Projectile"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
facing = 1
id = 1030
pos = ceil(5 * const(size.xscale)), ceil(-5 * const(size.yscale))
postype = P1
stateno = 1030
keyctrl = 0
ownpal = 1

[State 1100, Helper]
type = Helper
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
helpertype = normal
name = "Spark Projectile"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
facing = 1
id = 1031
pos = ceil(5 * const(size.xscale)), ceil(-5 * const(size.yscale))
postype = P1
stateno = 1030
keyctrl = 0
ownpal = 1

[State 1100, Helper]
type = Helper
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
helpertype = normal
name = "Spark Projectile"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
facing = 1
id = 1032
pos = ceil(5 * const(size.xscale)), ceil(-5 * const(size.yscale))
postype = P1
stateno = 1030
keyctrl = 0
ownpal = 1

[State 1100, Helper]
type = Helper
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
helpertype = normal
name = "Spark Projectile"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
facing = -1
id = 1031
pos = ceil(5 * const(size.xscale)), ceil(-5 * const(size.yscale))
postype = P1
stateno = 1030
keyctrl = 0
ownpal = 1

[State 1100, Helper]
type = Helper
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
helpertype = normal
name = "Spark Projectile"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
facing = -1
id = 1030
pos = ceil(5 * const(size.xscale)), ceil(-5 * const(size.yscale))
postype = P1
stateno = 1030
keyctrl = 0
ownpal = 1
;--------------------

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
value = 10, 9
channel = 1

[State 1100, Helper]
type = Helper
triggerall = NumHelper(1055) = 0
trigger1 = Anim = 1000
trigger1 = AnimElem = 8
helpertype = normal
name = "Ground Spark"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 1055
pos = 0, 0
postype = P1
stateno = 1055
keyctrl = 0

[State 1100, Anim]
type = ChangeAnim
trigger1 = Anim = 1000
trigger1 = AnimTime = 0
value = 1001

[State 1100, State]
type = ChangeState
trigger1 = Anim = 1001
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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