; States
;---------------------------------------------------------------------------
; Lose by Time Over
[Statedef 170]
type = S
velset = 0,0
ctrl = 0

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

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

;---------------------------------------------------------------------------
; Win
[Statedef 180]
type = S
velset = 0,0
ctrl = 0

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

[State 180, 1]
type = VarRandom
trigger1 = Time <= 0
v = 0
range = 180,181

[State 180, Anim]
type = ChangeAnim
triggerall = Time <= 0
triggerall = MatchOver = 0
trigger1 = Anim != 180
trigger1 = Anim != 181
trigger1 = Anim != 182
value = Var(0)

[State 180, Anim]
type = ChangeAnim
triggerall = MatchOver
trigger1 = Time <= 0
trigger1 = Anim != 180
trigger1 = Anim != 181
trigger1 = Anim != 182
trigger1 = Anim != 185
trigger2 = Anim = 182
trigger2 = AnimTime = 0
value = 185

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Anim = 180
trigger1 = AnimElem = 5
trigger2 = Anim = 181
trigger2 = AnimElem = 3
value = 10, 10
channel = 1

[State 180, PlaySnd]
type = PlaySnd
triggerall = Anim = 185
trigger1 = AnimElem = 10
value = 1, 0
channel = 2

[State 180, Anim]
type = ChangeAnim
trigger1 = Anim = 182
trigger1 = AnimElem = 7, >= 0
trigger1 = MatchOver = 0
ignorehitpause = 1
value = 182
elem = 7

;---------------------------------------------------------------------------
; Introduction
[Statedef 190]
type = S
velset = 0,0
ctrl = 0

[State 190, State]
type = ChangeState
trigger1 = Name = "Omega Inarabbita"
trigger1 = AuthorName = "N-Mario"
value = 192

[State 190, Intro]
type = AssertSpecial
trigger1 = 1
flag = Intro

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

[State 190, Anim]
type = ChangeAnim
triggerall = Anim = 190
triggerall = AnimTime = 0
trigger1 = NumEnemy > 0
trigger1 = Enemy, StateNo = 0
trigger2 = NumEnemy <= 0
trigger3 = Time > 100
value = 191

[State 190, Sound]
type = PlaySnd
trigger1 = Anim = 191
trigger1 = AnimElem = 1
persistent = 0
value = 10, 0
channel = 1

[State 190, State]
type = ChangeState
trigger1 = Anim != 190
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Taunt (Normal Stand)
[Statedef 194]
type = S
ctrl = 0
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 195
trigger2 = Anim = 195
trigger2 = AnimElem = 10, < 0
value = 195
elem = 11

[State 195, State]
type = ChangeState
triggerall = Time > 0
trigger1 = Var(59) <= 0
trigger1 = AnimTime = 0
trigger2 = Var(59) > 0
trigger2 = AnimElem = 5, > 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Taunt (Upright Stand)
[Statedef 195]
type = S
ctrl = 0
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 195
value = 195
elem = 1

[State 195, State]
type = ChangeState
triggerall = Time > 0
trigger1 = Var(59) <= 0
trigger1 = AnimTime = 0
trigger2 = Var(59) > 0
trigger2 = AnimElem = 5, > 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Powering Up
[Statedef 196]
type = S
movetype = A
velset = 0,0
ctrl = 0

[State 196, VarSet]
type = VarSet
trigger1 = Time > 100
var(56) = 1

[State 196, Intro]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 196, Pause]
type = Pause
trigger1 = Time > 100
movetime = 2
time = 2

[State 196, NotHitBy]
type = NotHitBy
trigger1 = Time > 100
value = SCA
time = 1

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

[State 196, Sound]
type = PlaySnd
trigger1 = Anim = 196
trigger1 = AnimElem = 4
value = 10, 20
channel = 1

[State 196, EnvColor]
type = EnvColor
trigger1 = Anim = 196
trigger1 = AnimElem = 4
trigger2 = Anim != 181
trigger2 = Time = 100
value = 250,250,250
ignorehitpause = 1
under = 0
time = 2

[State 196, Sound]
type = PlaySnd
trigger1 = Anim = 196
trigger1 = AnimElem = 4
trigger2 = Anim != 181
trigger2 = Time = 100
value = 5, 10
channel = 2

[State 196, Sound]
type = PlaySnd
trigger1 = Anim = 196
trigger1 = AnimElem = 4
value = 5, 5
channel = 3
loop = 1

[State 196, Smoke]
type = Explod
trigger1 = Time < 100
trigger1 = Anim = 196
trigger1 = AnimElem = 5, >= 0
trigger1 = TimeMod = 10,0
sprpriority = 10
scale = const(size.xscale), const(size.yscale)
anim = F120
pos = ceil(20 * const(size.xscale)),0
vel = 0,0
accel = 1,0
supermovetime = -1
pausemovetime = -1
removeongethit = 1
postype = p1
facing = 1
ontop = 1

[State 196, Smoke]
type = Explod
trigger1 = Time < 100
trigger1 = Anim = 196
trigger1 = AnimElem = 5, >= 0
trigger1 = TimeMod = 10,0
sprpriority = 10
scale = const(size.xscale), const(size.yscale)
anim = F120
pos = ceil(-20 * const(size.xscale)),0
vel = 0,0
accel = -1,0
supermovetime = -1
pausemovetime = -1
removeongethit = 1
postype = p1
facing = 1
ontop = 1

[State 196, Explod]
type = Explod
trigger1 = Anim = 196
trigger1 = AnimElem = 5
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 196, Sound]
type = StopSnd
trigger1 = Anim != 181
trigger1 = Time = 100
channel = 3

[State 196, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(266) > 0
trigger1 = Anim != 181
trigger1 = Time = 100
trigger2 = AnimTime = 0
trigger2 = Time > 300
ignorehitpause = 1
id = 266

[State 196, VarSet]
type = VarSet
trigger1 = Time >= 100
var(55) = 1000

[State 196, Explod]
type = Explod
trigger1 = Time = 100
trigger1 = Anim != 181
trigger1 = NumExplod(266) <= 0
ignorehitpause = 1
sprpriority = 10
supermovetime = -1
pausemovetime = -1
removeongethit = 1
removetime = -1
scale = const(size.xscale) * 1.5, const(size.yscale)
bindtime = -1
postype = P1
ownpal = 1
ontop = 1
anim = 266
pos = ceil(-53 * const(size.xscale)),0
id = 266

[State 196, Explod]
type = Explod
trigger1 = Time = 100
trigger1 = Anim != 181
trigger1 = NumExplod(112) <= 0
sprpriority = 10
supermovetime = -1
pausemovetime = -1
removeongethit = 1
removetime = -1
facing = 1
scale = const(size.xscale) * 2, const(size.yscale)
postype = P1
ownpal = 1
ontop = 1
anim = 110
pos = 0,0
ID = 112

[State 196, Explod]
type = Explod
trigger1 = Time = 100
trigger1 = Anim != 181
trigger1 = NumExplod(113) <= 0
sprpriority = 10
supermovetime = -1
pausemovetime = -1
removeongethit = 1
removetime = -1
facing = -1
scale = const(size.xscale) * 2, const(size.yscale)
postype = P1
ownpal = 1
ontop = 1
anim = 110
pos = 0,0
ID = 113

[State 196, PalFX]
type = BGPalFX
trigger1 = Anim = 196
trigger1 = AnimElem = 5, >= 0
trigger1 = TimeMod = 6,0
time = 3
add = 25,25,25

[State 196, PalFX]
type = PalFX
trigger1 = Anim = 196
trigger1 = AnimElem = 5, >= 0
trigger1 = TimeMod = 4,0
ignorehitpause = 1
time = 2
add = 50,50,50

[State 196, EnvShake]
type = EnvShake
trigger1 = Anim = 196
trigger1 = AnimElem = 5
time = 100
freq = 50
ampl = -5
phase = 5

[State 196, Helper]
type = Helper
triggerall = NumHelper(995) = 0
trigger1 = Anim != 181
trigger1 = Time = 100
helpertype = normal
name = "Power Up"
id = 995
pos = 0, 0
postype = P1
stateno = 990
pausemovetime = 1000000000
supermovetime = 1000000000
keyctrl = 0

[State 196, Anim]
type = ChangeAnim
trigger1 = Anim != 181
trigger1 = Time = 100
trigger2 = Anim = 181
trigger2 = AnimElem = 4, < 0
value = 181
elem = 4

[State 196, Smoke]
type = Explod
trigger1 = Time > 100
trigger1 = TimeMod = 5,0
sprpriority = 10
scale = const(size.xscale), const(size.yscale)
anim = F120
pos = ceil(20 * const(size.xscale)),0
vel = 0,0
accel = 2,0
supermovetime = -1
pausemovetime = -1
removeongethit = 1
postype = p1
facing = 1
ontop = 1

[State 196, Smoke]
type = Explod
trigger1 = Time > 100
trigger1 = TimeMod = 5,0
sprpriority = 10
scale = const(size.xscale), const(size.yscale)
anim = F120
pos = ceil(-20 * const(size.xscale)),0
vel = 0,0
accel = -2,0
supermovetime = -1
pausemovetime = -1
removeongethit = 1
postype = p1
facing = 1
ontop = 1

[State 196, PalFX]
type = BGPalFX
trigger1 = Time > 100
trigger1 = TimeMod = 4,0
trigger1 = Anim = 181
time = 2
add = 50,50,50

[State 196, EnvShake]
type = EnvShake
trigger1 = Anim = 181
trigger1 = AnimElem = 4, <= 0
time = 100
freq = 100
ampl = -10
phase = 10

[State 196, PalFX]
type = PalFX
trigger1 = Anim = 181
trigger1 = TimeMod = 2,0
ignorehitpause = 1
time = 1
add = 100,100,100

[State 196, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(112) > 0
trigger1 = AnimTime = 0
trigger1 = Time > 300
ignorehitpause = 1
id = 112

[State 196, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(113) > 0
trigger1 = AnimTime = 0
trigger1 = Time > 300
ignorehitpause = 1
id = 113

[State 196, State]
type = ChangeState
trigger1 = Time < 100
trigger1 = Command != "hold_x" 
trigger2 = Time < 100
trigger2 = Command != "hold_y" 
trigger3 = Time < 100
trigger3 = Command != "hold_z" 
trigger4 = Time > 300
trigger4 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Sabre Attack 1
[Statedef 200]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 2
ctrl = 0

;----- Sabre Power -----
[State 200, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(390) <= 0
trigger1 = NumHelper(395) <= 0
var(1) = 0

[State 200, Max]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(390) > 0
trigger2 = NumHelper(395) > 0
var(1) = 10
;--------------------

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

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

[State 200, 2]
type = HitDef
triggerall = Var(1) <= 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 200
trigger1 = AnimElem = 2
attr = S, NA
damage = 30, 0
animtype = Light
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(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -5
airguard.velocity = -2,-1
air.type = Low
air.velocity = -3,-2
air.hittime = 10

[State 200, 2]
type = HitDef
triggerall = Var(1) > 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 200
trigger1 = AnimElem = 2
attr = S, NA
damage = 60, 0
animtype = Light
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(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -5
airguard.velocity = -2,-1
air.type = Low
air.velocity = -3,-2
air.hittime = 10

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

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

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

[State 200, State]
type = ChangeState
trigger1 = Var(20) < 0
trigger1 = AnimTime = 0
value = 210

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

;---------------------------------------------------------------------------
; Sabre Attack 2
[Statedef 210]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 4
ctrl = 0

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

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

[State 210, 2]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 210
trigger1 = AnimElem = 2
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 = -5
airguard.velocity = -2,-1
air.type = Low
air.velocity = -3,-2
air.hittime = 15

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

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

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

[State 210, State]
type = ChangeState
trigger1 = Var(20) < 0
trigger1 = AnimTime = 0
value = 220

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

;---------------------------------------------------------------------------
; Sabre Attack 3
[Statedef 220]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 6
ctrl = 0

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

[State 220, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = PrevStateNo = 240
value = Anim
elem = 2

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

[State 220, 2]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 220
trigger1 = AnimElem = 5
attr = S, NA
damage = 90, 0
animtype = Heavy
guardflag = MA
hitflag = MAF
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))
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -5
airguard.velocity = -2,-1
air.type = Low
air.velocity = -3,-2
air.hittime = 20

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

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

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

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

;---------------------------------------------------------------------------
; Sabre Uppercut
[Statedef 230]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 8
ctrl = 0

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

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

[State 230, 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 230, Hit]
type = PlaySnd
trigger1 = MoveHit
ignorehitpause = 1
value = 2, 11
channel = 2

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

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

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

;---------------------------------------------------------------------------
; Jump Sabre Attack
[Statedef 600]
type = A
movetype = A
physics = A
juggle = 2
ctrl = 0

;----- Sabre Power -----
[State 600, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(390) <= 0
trigger1 = NumHelper(395) <= 0
var(1) = 0

[State 600, Max]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(390) > 0
trigger2 = NumHelper(395) > 0
var(1) = 10
;--------------------

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

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

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

[State 600, HitDef]
type = HitDef
triggerall = Var(1) <= 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 600
trigger1 = AnimElem = 2
attr = A, NA
damage = 30, 0
animtype = Light
guardflag = HA
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)), 0
ground.type = High
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -5
airguard.velocity = -2,-1
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -10
air.type = Low
air.velocity = -3,-2
air.hittime = 10

[State 600, HitDef]
type = HitDef
triggerall = Var(1) > 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 600
trigger1 = AnimElem = 2
attr = A, NA
damage = 60, 0
animtype = Light
guardflag = HA
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)), 0
ground.type = High
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -5
airguard.velocity = -2,-1
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -10
air.type = Low
air.velocity = -3,-2
air.hittime = 10

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

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

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

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

;---------------------------------------------------------------------------
; Jump Spin Sabre Attack
[Statedef 610]
type = A
movetype = A
physics = A
juggle = 4
ctrl = 0

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

[State 610, 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

;----- Rapid Fire -----
[State 610, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = Anim = 610
trigger2 = AnimElem = 5, < 0
var(0) = 0

[State 610, VarSet]
type = VarSet
trigger1 = Time > 0
trigger1 = Anim = 610
trigger1 = AnimElem = 5, > 0
trigger1 = AnimElem = 10, < 0
trigger1 = Command = "x"
trigger1 = Var(3) > 0
var(0) = 1

[State 610, Anim]
type = ChangeAnim
trigger1 = Time > 0
trigger1 = Anim = 610
trigger1 = AnimElem = 10, >= 0
trigger1 = Var(0) > 0
trigger1 = Var(3) > 0
value = Anim
elem = 2
;--------------------

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

[State 610, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
triggerall = Anim = 610
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
trigger3 = AnimElem = 6
trigger4 = AnimElem = 8
trigger5 = AnimElem = 10
attr = A, NA
damage = 30, 0
animtype = Medium
guardflag = HA
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)), 0
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5
airguard.velocity = -3,-1
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -10
air.type = Low
air.velocity = -4,-2
air.hittime = 15

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

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

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

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

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

;---------------------------------------------------------------------------
; Jump Spin Sabre Slash
[Statedef 620]
type = A
movetype = A
physics = A
juggle = 4
velset = 0,0
ctrl = 0

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

[State 620, 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

;--------------------
; Launch Projectiles
[State 620, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 620
trigger1 = AnimElem = 1
helpertype = normal
name = "Spark Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
facing = 1
id = 630
pos = 0,0
postype = P1
stateno = 630
keyctrl = 0
ownpal = 1

[State 620, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 620
trigger1 = AnimElem = 2
helpertype = normal
name = "Spark Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
facing = 1
id = 631
pos = 0,0
postype = P1
stateno = 630
keyctrl = 0
ownpal = 1

[State 620, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 620
trigger1 = AnimElem = 4
helpertype = normal
name = "Spark Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
facing = 1
id = 632
pos = 0,0
postype = P1
stateno = 630
keyctrl = 0
ownpal = 1

[State 620, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 620
trigger1 = AnimElem = 6
helpertype = normal
name = "Spark Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
facing = 1
id = 633
pos = 0,0
postype = P1
stateno = 630
keyctrl = 0
ownpal = 1

[State 620, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 620
trigger1 = AnimElem = 8
helpertype = normal
name = "Spark Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
facing = -1
id = 634
pos = 0,0
postype = P1
stateno = 630
keyctrl = 0
ownpal = 1

[State 620, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 620
trigger1 = AnimElem = 10
helpertype = normal
name = "Spark Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
facing = -1
id = 635
pos = 0,0
postype = P1
stateno = 630
keyctrl = 0
ownpal = 1

[State 620, Helper]
type = Helper
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 620
trigger1 = AnimElem = 12
helpertype = normal
name = "Spark Blade"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
persistent = 0
facing = -1
id = 630
pos = 0,0
postype = P1
stateno = 630
keyctrl = 0
ownpal = 1
;--------------------

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

[State 620, VelSet]
type = VelSet
trigger1 = Anim = 620
trigger1 = AnimElem = 14, < 0
x = 0 
y = 0

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

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

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

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

[State 620, StateType]
type = StateTypeSet
triggerall = Var(20) < 0
trigger1 = Anim = 620
trigger1 = AnimElem = 16, >= 0
trigger2 = Anim != 620
statetype = A
movetype = I
physics = A

[State 620, Anim]
type = ChangeAnim
triggerall = Var(20) < 0
trigger1 = Anim = 620
trigger1 = AnimElem = 16, >= 0
value = 44

[State 620, 5]
type = ChangeState
triggerall = Var(20) >= 0
trigger1 = Anim = 620
trigger1 = AnimElem = 16, >= 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Sabre Stab
[Statedef 640]
type = A
movetype = A
physics = N
juggle = 6
velset = 0,Vel Y
ctrl = 0

[State 640, 3]
type = VelAdd
trigger1 = 1
y = 0.20 * Const(size.xscale)

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

[State 640, 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 640, VelSet]
type = VelSet
trigger1 = Anim = 640
trigger1 = AnimElem = 3 
y = 2 * Const(size.xscale)

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

[State 640, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 640
trigger1 = AnimElem = 3
attr = A, NA
damage = 60, 0
animtype = Medium
guardflag = HA
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)), 0
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5
airguard.velocity = -3,-1
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -10
air.type = Low
air.velocity = -4,-2
air.hittime = 15

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

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

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

[State 640, 5]
type = ChangeState
trigger1 = Time > 0
trigger1 = Pos Y >= -10
trigger1 = Vel Y > 0
value = 641

;---------------------------------------------------------------------------
; Jump Sabre Stab Land
[Statedef 641]
type = S
movetype = A
physics = S
velset = 0,0
ctrl = 0

[State 640, PosSet]
type = PosSet
trigger1 = 1
y = 0

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

[State 640, 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 640, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Dash Sabre Slash
[Statedef 700]
type = S
movetype = A
physics = N
juggle = 4
ctrl = 0

;----- Sabre Power -----
[State 700, VarSet]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(390) <= 0
trigger1 = NumHelper(395) <= 0
var(1) = 0

[State 700, Max]
type = VarSet
triggerall = Time <= 0
trigger1 = NumHelper(390) > 0
trigger2 = NumHelper(395) > 0
var(1) = 10
;--------------------

[State 700, Width]
type = Width
trigger1 = Anim = 700
value = ceil(10 * const(size.xscale)),0
ignorehitpause = 1

[State 700, Width]
type = Width
trigger1 = Anim != 700
value = ceil(5 * const(size.xscale)),0
ignorehitpause = 1

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

[State 700, VelMul]
type = VelMul
trigger1 = Anim != 700
x = .95

[State 700, Smoke]
type = Explod
trigger1 = TimeMod = 5,0
sprpriority = 20
scale = const(size.xscale), const(size.yscale)
anim = F120
pos = 0,0
vel = 0,0
accel = 0,0
postype = p1
facing = 1
ontop = 1

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

[State 700, HitDef]
type = HitDef
triggerall = Var(1) <= 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 700
trigger1 = AnimElem = 2
attr = S, NA
damage = 30, 0
animtype = Light
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(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -5
airguard.velocity = -2,-1
air.type = Low
air.velocity = -3,-2
air.hittime = 10

[State 700, HitDef]
type = HitDef
triggerall = Var(1) > 0
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 700
trigger1 = AnimElem = 2
attr = S, NA
damage = 60, 0
animtype = Light
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(-20 * Const(size.yscale))
ground.type = High
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -5
airguard.velocity = -2,-1
air.type = Low
air.velocity = -3,-2
air.hittime = 10

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

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

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

[State 700, Anim]
type = ChangeAnim
trigger1 = Anim = 700
trigger1 = AnimTime = 0
value = 100
elem = 5

[State 700, 5]
type = ChangeState
trigger1 = Anim != 700
trigger1 = AnimTime = 0
value = 101

;---------------------------------------------------------------------------
; Dash Spin Sabre Attack
[Statedef 710]
type = S
movetype = A
physics = N
juggle = 4
ctrl = 0

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

[State 710, 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

;----- Rapid Fire -----
[State 710, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = Anim = 710
trigger2 = AnimElem = 5, < 0
var(0) = 0

[State 710, Var1et]
type = VarSet
trigger1 = Time > 0
trigger1 = Anim = 710
trigger1 = AnimElem = 5, > 0
trigger1 = AnimElem = 10, < 0
trigger1 = Command = "x"
trigger1 = Var(3) > 0
var(0) = 1

[State 710, Anim]
type = ChangeAnim
trigger1 = Time > 0
trigger1 = Anim = 710
trigger1 = AnimElem = 9, >= 0
trigger1 = Var(0) > 0
trigger1 = Var(3) > 0
value = Anim
elem = 1
;--------------------

[State 710, Smoke]
type = Explod
trigger1 = TimeMod = 5,0
sprpriority = 20
scale = const(size.xscale), const(size.yscale)
anim = F120
pos = 0,0
vel = 0,0
accel = 0,0
postype = p1
facing = 1
ontop = 1

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

[State 710, Anim]
type = ChangeAnim
trigger1 = Anim = 710
trigger1 = Var(0) <= 0
trigger1 = AnimElem = 10, >= 0
value = 700
elem = 2

[State 710, Width]
type = Width
trigger1 = Anim = 700
value = ceil(10 * const(size.xscale)),0
ignorehitpause = 1

[State 710, Width]
type = Width
trigger1 = Anim != 700
value = ceil(5 * const(size.xscale)),0
ignorehitpause = 1

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

[State 710, Anim]
type = ChangeAnim
trigger1 = Anim = 700
trigger1 = AnimTime = 0
value = 100
elem = 6

[State 710, VelMul]
type = VelMul
trigger1 = Anim != 700
trigger1 = Anim != 710
x = .95

[State 710, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
triggerall = Anim = 710
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
trigger3 = AnimElem = 6
trigger4 = AnimElem = 8
trigger5 = AnimElem = 10
attr = S, NA
damage = 30, 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 = 20
ground.hittime = 20
ground.velocity = -5
airguard.velocity = -4,-1
air.type = Low
air.velocity = -5,-2
air.hittime = 20

[State 710, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 700
trigger1 = AnimElem = 2
attr = S, NA
damage = 30, 0
animtype = Medium
guardflag = MA
hitflag = MAF
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))
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5
airguard.velocity = -4,-1
air.type = Low
air.velocity = -5,-2
air.hittime = 15

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

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

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

[State 710, 5]
type = ChangeState
trigger1 = Anim != 700
trigger1 = Anim != 710
trigger1 = AnimTime = 0
value = 101

;---------------------------------------------------------------------------
; Dash Sabre Stab
[Statedef 720]
type = S
movetype = A
physics = N
juggle = 4
ctrl = 0

[State 720, Width]
type = Width
trigger1 = Anim = 720
value = ceil(10 * const(size.xscale)),0
ignorehitpause = 1

[State 720, Width]
type = Width
trigger1 = Anim != 720
value = ceil(5 * const(size.xscale)),0
ignorehitpause = 1

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

[State 720, VelMul]
type = VelMul
trigger1 = Anim != 720
x = .95

[State 720, Smoke]
type = Explod
trigger1 = TimeMod = 5,0
sprpriority = 20
scale = const(size.xscale), const(size.yscale)
anim = F120
pos = 0,0
vel = 0,0
accel = 0,0
postype = p1
facing = 1
ontop = 1

[State 720, 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 720, HitDef]
type = HitDef
triggerall = NumHelper(10000) > 0
trigger1 = Anim = 720
trigger1 = AnimElem = 2
attr = S, NA
damage = 60, 0
animtype = Heavy
guardflag = MA
hitflag = MAF
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))
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5
airguard.velocity = -4,-1
air.type = Low
air.velocity = -5,-2
air.hittime = 15

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

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

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

[State 720, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 10, 3
channel = 1

[State 720, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 101

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