;---------------------------------------------------------------------------
; Hercules Rush
[Statedef 2000]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 2000 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
sprpriority = (var(13) := 2) + 1

[State 2000, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 45

[State 2000, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 45
anim = -1
sound = S2000,0
darken = 0
movetime = 45
poweradd = -1000
p2defmul = 1

[State 2000, SuperPause]
type = SuperPause
trigger1 = moveguarded
trigger1 = time < 45
time = 1
anim = -1
sound = -1
darken = 0
movetime = 1
poweradd = 0
p2defmul = 1
persistent = 0
ignorehitpause = 1

[State 2000, Explod]
type = Explod
trigger1 = time = 0
postype = left
id = 7500
anim = 7550
bindtime = -1
sprpriority = -5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1000, 0
channel = 0

[State 2000, Explod]
type = Explod
trigger1 = animelem = 4, = 1
postype = p1
anim = 7300
pos = floor(-78*const(size.xscale)), floor(-77*const(size.yscale))
bindtime = -1
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1

[State 2000, Width]
type = Width
trigger1 = animelemno(0) = [9, 10]
player = floor(-16*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

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

[State 2000, VarSet]
type = VarSet
trigger1 = var(10) < 5
fvar(9) = 1.05 - var(10)*0.05

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

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

[State 2000, Hit Tracking]
type = VarSet
trigger1 = movecontact = 1
trigger2 = movereversed = 1
var(18) = animelemno(-1)

[State 2000, 1]
type = HitDef
triggerall = var(22)
trigger1 = animelemno(0) = [5, 6]
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := floor(fvar(12)*200) || 1
trigger2 = anim > 1010
trigger2 = animelemno(0) = [9, 10]
trigger2 = var(18) < animelemno(0)
trigger2 = var(6) := floor(fvar(12)*200) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, HA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*var(0))), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*var(0)))
getpower = 0,0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 11, 11
sparkno = s17003
guard.sparkno = s17007 + (numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20 - 5*(animelemno(0) = [9, 10]), floor((-59*(animelemno(0) = [5, 6]) - 48*(animelemno(0) = [9, 10]))*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -6 - 3*(var(0)%3)
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 10
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536

[State 2000, 1]
type = HitDef
triggerall = var(22)
trigger1 = anim > 1000
trigger1 = animelemno(0) = [7, 8]
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := 200 || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, HA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*var(0))), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*var(0)))
getpower = 0,0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 11, 11
sparkno = s17003
guard.sparkno = s17007 + (numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -25, floor(-36.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -6 - 3*(var(0)%3)
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 19
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536

[State 2000, 1]
type = HitDef
triggerall = !var(22)
trigger1 = animelemno(0) = [5, 6]
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := floor(fvar(12)*200) || 1
trigger2 = anim > 1010
trigger2 = animelemno(0) = [9, 10]
trigger2 = var(18) < animelemno(0)
trigger2 = var(6) := floor(fvar(12)*200) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, HA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*var(0))), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*var(0)))
getpower = 0,0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 11, 11
sparkno = 3
sparkxy = -20 - 5*(animelemno(0) = [9, 10]), floor((-59*(animelemno(0) = [5, 6]) - 48*(animelemno(0) = [9, 10]))*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -6 - 3*(var(0)%3)
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 10
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536

[State 2000, 1]
type = HitDef
triggerall = !var(22)
trigger1 = anim > 1000
trigger1 = animelemno(0) = [7, 8]
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := 200 || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, HA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*var(0))), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*var(0)))
getpower = 0,0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 11, 11
sparkno = 3
sparkxy = -25, floor(-36.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -6 - 3*(var(0)%3)
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 19
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536

[State 2000, Screenbounder]
type = Helper
trigger1 = animelem = 7, = -1
name = "screenbounder"
id = 1040
stateno = 1040
persistent = 0
pausemovetime = 5
supermovetime = 5

[State 2000, ChangeState]
type = ChangeState
trigger1 = animelem = 14
value = 2001

[State 2000, PosAdd]
type = PosAdd
trigger1 = animelem = 7
x = 32*const(size.xscale)

[State 2000, VelSet]
type = VelSet
trigger1 = animelemno(0) = [5, 10]
x = 10

[State 2000, VelSet]
type = VelSet
trigger1 = animelemno(0) > 10
x = 0

[State XP Add]
type = VarAdd
trigger1 = var(20)
trigger1 = var(26)
var(19) = 600
ignorehitpause = 1

[State Weapon Layer]
type = Null
trigger1 = animelemno(0) = [5, 8]
trigger1 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = animelemno(0) > 2
trigger1 = var(12) := 1

[State Shield Layer]
type = VarSet
trigger1 = animelemno(0) = 4
var(12) = 2

[State Weapon Trail]
type = Null
trigger1 = var(17) := 2030

[State Delay Dampening]
type = VarSet
trigger1 = time
var(33) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; Hercules Rush End
[Statedef 2001]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
sprpriority = (var(13) := 2) + 1
hitcountpersist = 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
trigger1 = animelem = 19, = 12
value = anim
elem = animelemno(0) + 1

[State 2001, Width]
type = Width
trigger1 = animelemno(0) = 15 || animelemno(0) = 20
player = floor(16*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 2001, Width]
type = Width
trigger1 = animelemno(0) = [16, 19]
player = floor(32*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 2001, PlaySnd]
type = PlaySnd
trigger1 = animelem = 16
value = 200, 2
channel = 0

[State 2001, PlaySnd]
type = PlaySnd
trigger1 = animelem = 16
value = 20, 5

[State 2001, 1]
type = HitDef
triggerall = var(22)
trigger1 = var(9) != [6, 8]
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*112/(1.0 + 0.4*hitcount)), ceil((1 + fvar(7)*5)*(fvar(6)*16)/(1.0 + 0.4*hitcount))
getpower = 0,0
animtype = Back
guardflag = MA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5, -7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
air.hittime = 999
airguard.ctrltime = 999
air.velocity = -5, -6.43
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 2001, 1b]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*112/(1.0 + 0.4*hitcount)), ceil((1 + fvar(7)*5)*(fvar(6)*16)/(1.0 + 0.4*hitcount))
getpower = 0,0
animtype = Back
guardflag = MA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = s17002 + 2*(var(9) = 6)
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5, -7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
air.hittime = 999
airguard.ctrltime = 999
air.velocity = -5, -6.43
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0
palfx.invertall = ifelse(var(9) = 8, 1, 0)
palfx.time = 50
palfx.color = 0
palfx.mul = ifelse(var(9) = 8, 256, 256), ifelse(var(9) = 8, 256, 64), ifelse(var(9) = 8, 256, 0)
palfx.add = ifelse(var(9) = 8, -64, 0), ifelse(var(9) = 8, -96, 0), ifelse(var(9) = 8, -160, 0)
palfx.sinadd = ifelse(var(9) = 8, 64, -64), ifelse(var(9) = 8, 96, -64), ifelse(var(9) = 8, 128, 0), ifelse(var(9) = 8, 10, 20)

[State 2001, 1c]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 7
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112/(1.0 + 0.4*hitcount)), ceil((1 + fvar(7)*5)*(fvar(6)*16)/(1.0 + 0.4*hitcount))
getpower = 0,0
animtype = Back
guardflag = MA
hitflag = MAF
pausetime = 14, 24
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5, -7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
air.hittime = 999
airguard.ctrltime = 999
air.velocity = -5, -6.43
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 2001, 1]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) != [6, 8]
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*112/(1.0 + 0.4*hitcount)), ceil((1 + fvar(7)*5)*(fvar(6)*16)/(1.0 + 0.4*hitcount))
getpower = 0,0
animtype = Back
guardflag = MA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5, -7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
air.hittime = 999
airguard.ctrltime = 999
air.velocity = -5, -6.43
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 2001, 1b]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*112/(1.0 + 0.4*hitcount)), ceil((1 + fvar(7)*5)*(fvar(6)*16)/(1.0 + 0.4*hitcount))
getpower = 0,0
animtype = Back
guardflag = MA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2 + (var(9) = 6)
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5, -7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
air.hittime = 999
airguard.ctrltime = 999
air.velocity = -5, -6.43
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0
palfx.invertall = ifelse(var(9) = 8, 1, 0)
palfx.time = 50
palfx.color = 0
palfx.mul = ifelse(var(9) = 8, 256, 256), ifelse(var(9) = 8, 256, 64), ifelse(var(9) = 8, 256, 0)
palfx.add = ifelse(var(9) = 8, -64, 0), ifelse(var(9) = 8, -96, 0), ifelse(var(9) = 8, -160, 0)
palfx.sinadd = ifelse(var(9) = 8, 64, -64), ifelse(var(9) = 8, 96, -64), ifelse(var(9) = 8, 128, 0), ifelse(var(9) = 8, 10, 20)

[State 2001, 1c]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 7
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112/(1.0 + 0.4*hitcount)), ceil((1 + fvar(7)*5)*(fvar(6)*16)/(1.0 + 0.4*hitcount))
getpower = 0,0
animtype = Back
guardflag = MA
hitflag = MAF
pausetime = 14, 24
guard.pausetime = 13, 13
sparkno = 2
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5, -7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
air.hittime = 999
airguard.ctrltime = 999
air.velocity = -5, -6.43
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 2001, Elemental FX]
type = VarSet
trigger1 = var(9) = [6, 8]
trigger1 = !movecontact && !movereversed
var(27) = var(9) - 5
ignorehitpause = 1

[State 2001, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 26
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 18
movetype = I

[State Idle Anim Cancel]
type = ChangeState
triggerall = ctrl
trigger1 = var(59) < 1
trigger1 = command != "holddown" && (command = "holdfwd" || command = "holdback")
trigger1 = var(0) := 0 || 1
trigger2 = var(59) < 1
trigger2 = command = "holddown"
trigger2 = var(0) := 1
trigger3 = var(59) < 1
trigger3 = command = "holdup"
trigger3 = var(0) := 2
value = ifelse(var(0) = 2, 40, ifelse(var(0) = 1, 10, 20))
ctrl = 1

[State 2001, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

[State XP Add]
type = VarAdd
trigger1 = var(20)
trigger1 = var(26)
var(19) = 600
ignorehitpause = 1

[State Weapon Layer]
type = Null
trigger1 = animelemno(0) = [15, 20]
trigger1 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = animelemno(0) = 14 || animelemno(0) = 20
trigger1 = var(12) := 1

[State Weapon Trail]
type = Null
trigger1 = var(17) := 2030

[State Delay Dampening]
type = VarSet
trigger1 = 1
var(33) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; Gigas Driver
[Statedef 2100] ;7 of free pausetime
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 2100
sprpriority = (var(13) := 2) + 1

[State 2100, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 40

[State 2100, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 38;45
anim = -1
sound = S2000,0
darken = 0
movetime = 38
poweradd = -1000
p2defmul = 1

[State 2100, Explod]
type = Explod
trigger1 = time = 0
postype = left
id = 7500
anim = 7550
bindtime = -1
sprpriority = -5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1

[State 2100, Explod]
type = Explod
trigger1 = time = 7
postype = p1
anim = 7300
pos = floor(64*const(size.xscale)), floor(-61*const(size.yscale))
bindtime = -1
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1

[State 2100, 1]
type = HitDef
trigger1 = animelem = 3, -1
trigger1 = p2bodydist x < const(size.xscale)*(95 - const(size.ground.front))
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
hitsound = s8, 0
sprpriority = 2       ;Draw in front of p2
p2facing = 1          ;Force p2 to face player
p1stateno = 2101       ;On success, player changes to state 810
p2stateno = 2105       ;If hit, p2 changes to state 820 in player's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
ground.velocity = 0
fall = 1              ;Force p2 into falling down
fall.recover = 0
fall.xvelocity = -4.12
fall.yvelocity = -7.5
;fall.envshake.time = 10
;fall.envshake.freq = 50
;fall.envshake.ampl = 5
;fall.envshake.phase = 90
yaccel = .536

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 5000, 0
channel = 0

[State Idle Anim]
type = StateTypeSet
trigger1 = animelem = 3
movetype = I

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

[State Weapon Layer]
type = Null
trigger1 = animelemno(0) = 4
trigger1 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = animelemno(0) = [3, 4]
trigger1 = var(12) := 1

[Statedef 2101]
type    = S
movetype= A
physics = N
anim = 1201
ctrl = 0

[State 2101, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 200, 2
channel = 0

[State 2101, Bind 1]
type = VarSet
trigger1 = animelem = 1
fvar(0) = facing*(target, pos x - pos x)*0.5 + 40*const(size.xscale)

[State 2101, Bind 1]
type = TargetBind
trigger1 = animelemno(0) = 1
pos = fvar(0), 0

[State 2101, Bind 2]
type = TargetBind
trigger1 = animelemno(0) = 2
pos = 80*const(size.xscale), 0

[State 2101, Bind 3]
type = TargetBind
trigger1 = animelemno(0) = 3
pos = 80*const(size.xscale), 0

[State 2101, TargetState]
type = TargetState
trigger1 = animtime = 0
id = var(14)
value = 1206

[State 2101, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 2102

[Statedef 2102] ;freeze at 22, changestate time = 28 + 7 = 35 ticks
type    = A ;freeze at 30, changestate time = 46 + 3 = 49 ticks
movetype= A ;freeze at ??, changestate time = 52 + 2 = 54 ticks
physics = N
anim = 1202
ctrl = 0
velset = 0,0

[State 2102, PlaySnd]
type = PlaySnd
trigger1 = time = 0
trigger1 = prevstateno != 2101
value = 200, 2
channel = 0

[State 2102, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = var(0) = 0
x = (-pos x*facing - 48*const(size.xscale))*0.04545
y = -12.5
persistent = 0

[State 2102, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = var(0) = 1
y = -17.5

[State 2102, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = var(0) = 2
y = -28.5

[State 2102, PosAdd]
type = PosAdd
trigger1 = time = 0
;trigger1 = prevstateno = 2101
x = ifelse(prevstateno = 2101, 48, 16)*const(size.xscale)

[State 2102, ChangeState]
type = ChangeState
trigger1 = var(0) = 0
trigger1 = time = 28
trigger2 = var(0) = 1
trigger2 = time = 46
trigger3 = var(0) = 2
trigger3 = time = 52
value = 2103

[State 2102, VelAdd]
type = VelAdd
trigger1 = 1
y = ifelse(var(0) = 2, 0.8, 0.536)

[State 2102, VelAdd]
type = VelAdd
trigger1 = vel y > 0
y = ifelse(var(0) = 2, 1.6, 1.0714)

[State 2102, VelMul]
type = VelMul
trigger1 = time > 18
x = 0.8

[State 2102, PlaySnd]
type = PlaySnd
trigger1 = !var(0)
trigger1 = animelem = 2
trigger2 = var(0)
trigger2 = animelem = 3
value = 20, 1

[State 2102, Bind 1]
type = TargetBind
trigger1 = animelemno(0) = 1
pos = 25*const(size.xscale), -50*const(size.yscale)

[State 2102, Bind 1]
type = TargetBind
trigger1 = animelemno(0) = 2
pos = -5*const(size.xscale), -50*const(size.yscale)

[State 2102, Bind 1]
type = TargetBind
trigger1 = animelemno(0) = 3
pos = -35*const(size.xscale), -50*const(size.yscale)

[State 2102, Bind 1]
type = TargetBind
trigger1 = animelemno(0) = 4
pos = 15*const(size.xscale), -50*const(size.yscale)

[State 2102, SprPriority]
type = SprPriority
trigger1 = animelemno(0) != 4
value = (var(13) := 2) + 1

[State 2102, SprPriority]
type = SprPriority
trigger1 = animelemno(0) = 4
value = (var(13) := -(teamside = 1))

[State Weapon Layer]
type = Null
trigger1 = animelemno(0) = 2
trigger1 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = animelemno(0) = 4
trigger1 = var(12) := 1

[Statedef 2103]
type    = A
movetype= A
physics = N
anim = 2103
sprpriority = (var(13) := 2) + 1
ctrl = 0

[State 2103, TargetState]
type = TargetState
trigger1 = time = 0
id = var(14)
value = ifelse(var(0) = 2, 1207, 2107)

[State 2103, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = pos y >= 0
trigger1 = target, life > 1
value = ceil(0.7*(92.0*(1+0.5*var(0)))*(ifelse(var(21)%10 = 5 || var(9) = 5, ifelse(var(20), 1.25, 1.4), 0.95 + 0.05*(var(21)%10)))*const(data.attack)*ifelse(var(20), 1 + (var(20) - 1)*fvar(15), 1)/100.0)
persistent = 0

[State 2103, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = pos y >= 0
value = ceil(-(92.0*(1+0.5*var(0)))*(ifelse(var(21)%10 = 5 || var(9) = 5, ifelse(var(20), 1.25, 1.4), 0.95 + 0.05*(var(21)%10)))*const(data.attack)*ifelse(var(20), 1 + (var(20) - 1)*fvar(15), 1)/100.0)
persistent = 0
kill = var(0) = 2

[State XP Add]
type = VarAdd
trigger1 = pos y >= 0
var(19) = ifelse(!var(0), 500, ifelse(var(0) = 1, 900, 1000))
persistent = 0

[State 2103, EnvShake]
type = EnvShake
trigger1 = pos y + vel y > -16*const(size.yscale)
time = 10 + 2*var(0)
freq = 50
ampl = 5 + 5*var(0)
phase = 270
persistent = 0

[State 2103, Explod]
type = Explod
triggerall = var(22)
trigger1 = pos y + vel y > -16*const(size.yscale)
postype = p1
anim = 17005
facing = -facing
bindtime = 1
pos = floor(32*const(size.xscale)), floor(-pos y - vel y + 5)
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
persistent = 0
ownpal = 1

[State 2103, Explod]
type = Explod
triggerall = var(22)
trigger1 = pos y + vel y > -16*const(size.yscale)
postype = p1
anim = F61
bindtime = 1
pos = floor(32*const(size.xscale)), floor(-pos y - vel y)
sprpriority = -5
pausemovetime = 99999
supermovetime = 99999
persistent = 0
ownpal = 1

[State 2103, Explod]
type = Explod
triggerall = !var(22)
trigger1 = pos y + vel y > -16*const(size.yscale)
postype = p1
anim = F62
bindtime = 1
facing = -facing
pos = floor(32*const(size.xscale)), floor(-pos y - vel y)
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
persistent = 0
ownpal = 1

[State 2103, PlaySnd]
type = PlaySnd
trigger1 = pos y + vel y > -16*const(size.yscale)
pan = floor(32*const(size.xscale))
value = 8, 2
persistent = 0

[State 2103, PlaySnd]
type = PlaySnd
trigger1 = pos y + vel y > -16*const(size.yscale)
pan = floor(32*const(size.xscale))
value = 810, 0
persistent = 0

[State 2103, ChangeState]
type = ChangeState
trigger1 = animelem = 4
value = ifelse(var(0) = 2, 1204, 2104)

[State 2103, VelAdd]
type = VelAdd
trigger1 = pos y < 0
y = 0.536

[State 2103, VelAdd]
type = VelAdd
trigger1 = animelem = 1, < 2
trigger1 = vel y > 0
y = 1.0714

[State 2103, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 1, < 2
trigger1 = pos y + vel y < 0
value = ifelse(var(0) = 2, 1203, 2103)

[State 2103, PosSet]
type = PosSet
trigger1 = pos y + vel y >= 0
y = 0

[State 2103, VelSet]
type = VelSet
trigger1 = pos y + vel y >= 0
x = 0
y = 0

[State 2103, Bind 1]
type = TargetBind
trigger1 = 1
pos = 16*const(size.xscale), ifelse(pos y + vel y > -16*const(size.yscale), -pos y - vel y, 16*const(size.yscale))

[State Shield Layer]
type = Null
trigger1 = animelemno(0) = [2, 3]
trigger1 = var(12) := 1

[Statedef 2104]
type    = A
movetype= A
physics = N
velset = 0, 0
ctrl = 0

[State 2104, PosAdd]
type = PosAdd
trigger1 = time = 0
;trigger1 = prevstateno = 2101
x = -16*const(size.xscale)

[State 2104, TargetState]
type = TargetState
trigger1 = animtime = 0
id = var(14)
value = 1206

[State 2104, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = var(0) := var(0) + 1
value = 2102

[State 2104, Bind 1]
type = TargetBind
trigger1 = 1
pos = 32*const(size.xscale), 0

[Statedef 2105]
type    = A
movetype= H
physics = N
velset = 0,0

[State 2105, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 2105

[State 2105, ScreenBound]
type = ScreenBound
trigger1 = animtime = 0
value = 0
movecamera = 0, 0

[State 2105, 1]
type = SelfState
Trigger1 = time > 60
value = 5050

[Statedef 2107]
type    = A
movetype= H
physics = N
velset = 0,0

[State 2107, 3]
type = ChangeAnim2
trigger1 = Time = 0
value = 1207

[State 2107, 4]
type = ChangeAnim
trigger1 = gethitvar(isbound)
trigger1 = pos y >= 0
trigger1 = anim != 5080
value = 5080

[State 2107, ScreenBound]
type = ScreenBound
trigger1 = gethitvar(isbound)
value = 0
movecamera = 0, 0

[State 2107, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

;---------------------------------------------------------------------------
; Jupiter Rave
; CNS difficulty: easy
[Statedef 2200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
;Commonly-used controllers:
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 200 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
poweradd = 20			;Power to add (Def: 0)
sprpriority = (var(13) := 2) + 1			;Set layering priority to 2 (in front)

[State 2200, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 45

[State 2200, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 45
anim = -1
sound = S2000,0
darken = 0
movetime = 45
poweradd = -2000
p2defmul = 1.2 ;not quite as efficient in combos as lv 1s

[State 2200, SuperPause]
type = SuperPause
trigger1 = moveguarded = 1
trigger1 = time < 45
time = 1
anim = -1
sound = -1
darken = 0
movetime = 1
poweradd = 0
p2defmul = 1
persistent = 0
ignorehitpause = 1

[State 2200, VarSet]
type = VarSet
trigger1 = 1
fvar(6) = 1.4

[State 2200, Helper]
type = Helper
trigger1 = time = 0
name = "jupiter bg"
id = 2240
stateno = 2240
persistent = 0
pos = 0, 0
ownpal = 1
supermovetime = 99999

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 200, 1
channel = 0

[State 2200, Explod]
type = Explod
trigger1 = time = 7
postype = p1
anim = 7300
pos = floor(-20*const(size.xscale)), floor(-105*const(size.yscale))
bindtime = -1
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
scale = 1.5, 1.5
persistent = 0
ownpal = 1

[State 2200, anim pause]
type = ChangeAnim
trigger1 = animelemno(0) = 5
trigger1 = time < 35
value = anim
elem = 5

[State 2200, anim pause]
type = ChangeAnim
trigger1 = animelemno(0) = 9
trigger1 = !movehit
trigger1 = time < 50
value = anim
elem = 9

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6, = -1
value = 20, 4

[State 2200, VarSet]
type = VarSet
trigger1 = time = 0
var(18) = 0

[State 2200, TargetState]
type = TargetState
trigger1 = movehit = 1
id = stateno + id%10
value = 2211
ignorehitpause = 1
persistent = 0

[State 2200, 1]
type = HitDef
triggerall = var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, HA
damage = ceil(fvar(6)*56), ceil(fvar(7)*fvar(6)*64)
getpower = 0
kill = 0
animtype = Medium
guardflag = MA
hitflag = MAF
pausetime = 14, 15
sparkno = s17001
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = ifelse(p2bodydist x < 10, ifelse(p2bodydist x < 0, -30, ceil(p2bodydist x - 30)), -20), floor(-68.5*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = 0
ground.hittime  = 36
ground.slidetime  = 36
guard.hittime = 15
air.type = High
air.velocity = 0, 0
air.hittime = 36
airguard.ctrltime = 999
fall.animtype = Medium
fall.recovertime = 36
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
forcestand = 1
p2facing = 1
mindist = floor((96 - 16*ifelse(var(9) = 1 || var(9) = 9, 3, ifelse((var(9) = [3,4]), 1, ifelse(var(9) = 5, 0, 2))))*const(size.xscale)), -9999
maxdist = floor(128*const(size.xscale)), 9999
envshake.time = 10
envshake.freq = 50
envshake.ampl = 8

[State 2200, 1]
type = HitDef
triggerall = !var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, HA
damage = ceil(fvar(6)*56), ceil(fvar(7)*fvar(6)*64)
getpower = 0
kill = 0
animtype = Medium
guardflag = MA
hitflag = MAF
pausetime = 14, 15
sparkno = 3
sparkxy = ifelse(p2bodydist x < 10, ifelse(p2bodydist x < 0, -30, ceil(p2bodydist x - 30)), -20), floor(-68.5*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = 0
ground.hittime  = 36
ground.slidetime  = 36
guard.hittime = 15
air.type = High
air.velocity = 0, 0
air.hittime = 36
airguard.ctrltime = 999
fall.animtype = Medium
fall.recovertime = 36
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
forcestand = 1
p2facing = 1
mindist = floor(96*const(size.xscale)), -9999
maxdist = floor(128*const(size.xscale)), 9999
envshake.time = 10
envshake.freq = 50
envshake.ampl = 8

[State 2200, Screenbounder]
type = Helper
trigger1 = animelem = 6, = -1
name = "screenbounder"
id = 1040
stateno = 1040
persistent = 0
supermovetime = 99

[State 2200, PosAdd]
type = PosAdd
trigger1 = animelem = 6
x = 32*const(size.xscale)

[State 2200, 5]
type = ChangeState
trigger1 = animelem = 14
trigger1 = movehit
value = 2210

[State 2200, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 12
trigger1 = !movehit
value = 1

[State XP Add]
type = VarAdd
trigger1 = var(20)
trigger1 = var(26)
var(19) = 600
ignorehitpause = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 7
trigger2 = !movehit
movetype = I

[State Idle Anim Cancel]
type = ChangeState
triggerall = ctrl
trigger1 = var(59) < 1
trigger1 = command != "holddown" && (command = "holdfwd" || command = "holdback")
trigger1 = var(0) := 0 || 1
trigger2 = var(59) < 1
trigger2 = command = "holddown"
trigger2 = var(0) := 1
trigger3 = var(59) < 1
trigger3 = command = "holdup"
trigger3 = var(0) := 2
value = ifelse(var(0) = 2, 40, ifelse(var(0) = 1, 10, 20))
ctrl = 1

[State 2200, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

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

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
trigger1 = movehit
value = 700, 0
channel = 0

[State Weapon Layer]
type = Null
trigger1 = animelemno(0) = [4,5]
trigger1 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = animelemno(0) = [10, 11]
trigger1 = var(12) := 1

[State Delay Dampening]
type = VarSet
trigger1 = time
var(33) = 1
ignorehitpause = 1

[Statedef 2210]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 2210 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
sprpriority = (var(13) := 2) + 1

[State 2210, VarSet]
type = VarSet
trigger1 = 1
fvar(6) = 1.4

[State 2210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 26
value = 1000, 0
channel = 0

[State 2210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 37
value = 1000, 1
channel = 0

[State 2210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
trigger2 = animelem = 11
trigger3 = animelem = 28
trigger4 = animelem = 48, = -1
value = 20, 5

[State 2210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 17
trigger2 = animelem = 21
value = 20, 4

[State 2210, Width]
type = Width
trigger1 = animelemno(0) = 5 || animelemno(0) = 10
player = floor(16*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 2210, Width]
type = Width
trigger1 = animelemno(0) = [6, 9]
player = floor(32*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 2210, PosAdd]
type = PosAdd
trigger1 = animelem = 38
x = -8*const(size.xscale)

[State 2210, PosAdd]
type = PosAdd
trigger1 = animelem = 10
trigger2 = animelem = 46
x = 16*const(size.xscale)

[State 2210, PosAdd]
type = PosAdd
trigger1 = animelem = 18
trigger2 = animelem = 47
trigger3 = animelem = 48
x = 32*const(size.xscale)

[State 2210, PosAdd]
type = PosAdd
trigger1 = animelem = 59
trigger2 = animelem = 60
x = -32*const(size.xscale)

[State 2210, PosAdd]
type = PosAdd
trigger1 = animelem = 61
x = -16*const(size.xscale)

[State 2210, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 50
trigger1 = hitpausetime
value = anim
elem = 52
ignorehitpause = 1
persistent = 0

[State 2210, ChangeAnim]
type = ChangeAnim
trigger1 = animelemno(0) = 48
trigger1 = hitpausetime
value = anim
elem = 49
ignorehitpause = 1
persistent = 0

[State 2210, TargetState]
type = TargetState
trigger1 = animelem = 49 || animelem = 50 || animelem = 51
trigger1 = movehit = 1
id = var(0)
value = 2212
ignorehitpause = 1
persistent = 0

[State 2210, Explod]
type = Explod
triggerall = var(22)
trigger1 = animelem = 49 || animelem = 50 || animelem = 51
trigger1 = movehit = 1
postype = p1
anim = 17005
facing = -facing
bindtime = 1
pos = floor(ifelse(115*const(size.xscale) < frontedgedist, 160*const(size.xscale), frontedgedist + 45*const(size.xscale))), 5
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 2210, Explod]
type = Explod
triggerall = !var(22)
trigger1 = animelem = 49 || animelem = 50 || animelem = 51
trigger1 = movehit = 1
postype = p1
anim = F62
facing = -facing
bindtime = 1
pos = floor(ifelse(115*const(size.xscale) < frontedgedist, 160*const(size.xscale), frontedgedist + 45*const(size.xscale))), 0
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 2210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 49 || animelem = 50 || animelem = 51
trigger1 = movehit = 1
pan = floor(160*const(size.xscale))
value = 8, 2
ignorehitpause = 1
persistent = 0

[State 2210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 49 || animelem = 50 || animelem = 51
trigger1 = movehit = 1
pan = floor(160*const(size.xscale))
value = 5, 2
ignorehitpause = 1
persistent = 0

[State 2210, EnvShake]
type = EnvShake
trigger1 = animelem = 49 || animelem = 50 || animelem = 51
trigger1 = movehit = 1
time = 15
freq = 50
ampl = 15
phase = 270
ignorehitpause = 1
persistent = 0

[State 2210, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 49
value = anim
elem = 50
ignorehitpause = 1

[State 2210, VarSet]
type = VarSet
trigger1 = time = 0
var(18) = 0

[State 2210, Hit Tracking]
type = VarSet
trigger1 = movecontact = 1
trigger2 = movereversed = 1
var(18) = animelemno(-1)

[State 2210, 1]
type = HitDef
triggerall = var(22)
trigger1 = animelemno(0) = 7
trigger1 = var(18) < 7
trigger1 = var(6) := floor(fvar(12)*fvar(8)*400) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*80), ceil(fvar(7)*fvar(6)*80)
getpower = 0
kill = 0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 2
ground.cornerpush.veloff = -7.5
guard.hittime = 19
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8

[State 2210, 2]
type = HitDef
triggerall = var(22)
trigger1 = animelemno(0) = 12
trigger1 = var(18) < 12
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*64), ceil(fvar(7)*fvar(6)*64)
getpower = 0
kill = 0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-38*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 2
ground.cornerpush.veloff = -7.5
guard.hittime = 19
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8

[State 2210, 3]
type = HitDef
triggerall = var(22)
trigger1 = animelemno(0) = 18
trigger1 = var(18) < 18
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, HA
damage = ceil(fvar(6)*48), ceil(fvar(7)*fvar(6)*48)
getpower = 0
kill = 0
animtype = Medium
guardflag = MA
hitflag = MAF
pausetime = 6, 6
sparkno = s17001
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor(-37.5*const(size.yscale))
hitsound   = s5,5
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -2.5
ground.hittime  = 11
ground.slidetime  = 2
ground.cornerpush.veloff = -1.25
guard.hittime = 10
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 6

[State 2210, 4]
type = HitDef
triggerall = var(22)
trigger1 = animelemno(0) = 22
trigger1 = var(18) < 22
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, HA
damage = ceil(fvar(6)*32), ceil(fvar(7)*fvar(6)*32)
getpower = 0
kill = 0
animtype = Back
guardflag = LA
hitflag = MAF
pausetime = 10, 11
guard.pausetime = 9, 9
sparkno = s17001
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-12*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
ground.velocity = 1.25, -7.5
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = 0
guard.velocity = -2.5
guard.hittime = 19
guard.cornerpush.veloff = -3.25
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Trip
air.velocity = 1.25, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8

[State 2210, 5]
type = HitDef
triggerall = var(22)
triggerall = var(18) < 29
trigger1 = animelemno(0) = 29
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*80), ceil(fvar(7)*fvar(6)*80)
getpower = 0
kill = 0
animtype = Back
guardflag = MA
hitflag = MAFD
pausetime = 11, 10
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor(-75*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -20
ground.hittime  = 16
ground.slidetime  = 16
ground.cornerpush.veloff = 0
guard.velocity = -10
guard.hittime = 15
guard.cornerpush.veloff = -13
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -0.83, -16.25
fall = 1
fall.recover = 0
fall.yvelocity = -4
fall.animtype = Heavy
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 10
maxdist = 9999, -24

[State 2210, 6]
type = HitDef
triggerall = var(22)
triggerall = var(18) < 30
trigger1 = animelemno(0) = 30
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*64), ceil(fvar(7)*fvar(6)*64)
getpower = 0
kill = 0
animtype = Up
guardflag = MA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor(-128.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -15
ground.hittime  = 16
ground.slidetime  = 16
ground.cornerpush.veloff = 0
guard.velocity = -10
guard.hittime = 15
guard.cornerpush.veloff = -13
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -0.83, -15
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8
maxdist = 9999, -72

[State 2210, 7]
type = HitDef
triggerall = var(22)
trigger1 = animelemno(0) = [48, 50]
trigger1 = var(18) < 48
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(200 + var(0)*50)) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10)*(var(0) := var(14)) + var(14)
attr = S, HA
damage = ceil(fvar(6)*256), ceil(fvar(7)*fvar(6)*256)
animtype = Back
getpower = 0
guardflag = 
hitflag = MAFD
pausetime = 14, 15
sparkno = -1
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
;sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -70, ceil(p2bodydist x - 70)), -50), 5
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-100*const(size.yscale))
;sparkxy = -25, floor(-30*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = 0, 7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
;air.hittime = 999
airguard.ctrltime = 999
air.velocity = 0, 7.5
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0
mindist = floor(160*const(size.xscale)), -9999
maxdist = floor(192*const(size.xscale)), 9999
envshake.time = 15
envshake.freq = 50
envshake.ampl = 15

[State 2210, defspark1]
type = HitDef
triggerall = !var(22)
trigger1 = animelemno(0) = 7
trigger1 = var(18) < 7
trigger1 = var(6) := floor(fvar(12)*fvar(8)*400) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*80), ceil(fvar(7)*fvar(6)*80)
getpower = 0
kill = 0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 13, 13
sparkno = 2
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-55.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 2
ground.cornerpush.veloff = -7.5
guard.hittime = 19
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8

[State 2210, defspark2]
type = HitDef
triggerall = !var(22)
trigger1 = animelemno(0) = 12
trigger1 = var(18) < 12
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*64), ceil(fvar(7)*fvar(6)*64)
getpower = 0
kill = 0
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 13, 13
sparkno = 2
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-38*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 2
ground.cornerpush.veloff = -7.5
guard.hittime = 19
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8

[State 2210, defspark3]
type = HitDef
triggerall = !var(22)
trigger1 = animelemno(0) = 18
trigger1 = var(18) < 18
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, HA
damage = ceil(fvar(6)*48), ceil(fvar(7)*fvar(6)*48)
getpower = 0
kill = 0
animtype = Medium
guardflag = MA
hitflag = MAF
pausetime = 6, 6
sparkno = 1
sparkxy = -20, floor(-37.5*const(size.yscale))
hitsound   = s5,5
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -2.5
ground.hittime  = 11
ground.slidetime  = 2
ground.cornerpush.veloff = -1.25
guard.hittime = 10
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 6

[State 2210, defspark4]
type = HitDef
triggerall = !var(22)
trigger1 = animelemno(0) = 22
trigger1 = var(18) < 22
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, HA
damage = ceil(fvar(6)*32), ceil(fvar(7)*fvar(6)*32)
getpower = 0
kill = 0
animtype = Back
guardflag = LA
hitflag = MAF
pausetime = 10, 11
guard.pausetime = 9, 9
sparkno = 1
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-12*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
ground.velocity = 1.25, -7.5
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = 0
guard.velocity = -2.5
guard.hittime = 19
guard.cornerpush.veloff = -3.25
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Trip
air.velocity = 1.25, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8

[State 2210, defspark5]
type = HitDef
triggerall = !var(22)
triggerall = var(18) < 29
trigger1 = animelemno(0) = 29
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*80), ceil(fvar(7)*fvar(6)*80)
getpower = 0
kill = 0
animtype = Back
guardflag = MA
hitflag = MAFD
pausetime = 11, 10
sparkno = 2
sparkxy = -20, floor(-75*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -20
ground.hittime  = 16
ground.slidetime  = 16
ground.cornerpush.veloff = 0
guard.velocity = -10
guard.hittime = 15
guard.cornerpush.veloff = -13
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -0.83, -16.25
fall = 1
fall.recover = 0
fall.yvelocity = -4
fall.animtype = Heavy
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 10
maxdist = 9999, -24

[State 2210, defspark6]
type = HitDef
triggerall = !var(22)
triggerall = var(18) < 30
trigger1 = animelemno(0) = 30
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, HA
damage = ceil(fvar(6)*64), ceil(fvar(7)*fvar(6)*64)
getpower = 0
kill = 0
animtype = Up
guardflag = MA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -20, floor(-128.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -15
ground.hittime  = 16
ground.slidetime  = 16
ground.cornerpush.veloff = 0
guard.velocity = -10
guard.hittime = 15
guard.cornerpush.veloff = -13
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -0.83, -15
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
envshake.time = 5
envshake.freq = 50
envshake.ampl = 8
maxdist = 9999, -72

[State 2210, defspark7]
type = HitDef
triggerall = !var(22)
trigger1 = animelemno(0) = [48, 50]
trigger1 = var(18) < 48
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(200 + var(0)*50)) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10)*(var(0) := var(14)) + var(14)
attr = S, HA
damage = ceil(fvar(6)*256), ceil(fvar(7)*fvar(6)*256)
animtype = Back
getpower = 0
guardflag = 
hitflag = MAFD
pausetime = 14, 15
sparkno = -1
;sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -70, ceil(p2bodydist x - 70)), -50), 5
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-100*const(size.yscale))
;sparkxy = -25, floor(-30*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = 0, 7.5
ground.hittime  = 24
ground.slidetime  = 24
ground.cornerpush.veloff = 0
guard.velocity = -12.5
guard.hittime = 23
guard.cornerpush.veloff = -16.25
;air.hittime = 999
airguard.ctrltime = 999
air.velocity = 0, 7.5
airguard.velocity = -5, -6.43
yaccel = .536
fall = 1
fall.recover = 0
mindist = floor(160*const(size.xscale)), -9999
maxdist = floor(192*const(size.xscale)), 9999
envshake.time = 15
envshake.freq = 50
envshake.ampl = 15

[State 2210, Screenbounder]
type = Helper
trigger1 = time = 28
name = "screenbounder"
id = 2250
stateno = 2250
persistent = 0

[State 2210, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 62
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 55
movetype = I

[State Idle Anim Cancel]
type = ChangeState
triggerall = ctrl
trigger1 = var(59) < 1
trigger1 = command != "holddown" && (command = "holdfwd" || command = "holdback")
trigger1 = var(0) := 0 || 1
trigger2 = var(59) < 1
trigger2 = command = "holddown"
trigger2 = var(0) := 1
trigger3 = var(59) < 1
trigger3 = command = "holdup"
trigger3 = var(0) := 2
value = ifelse(var(0) = 2, 40, ifelse(var(0) = 1, 10, 20))
ctrl = 1

[State 2210, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

[State 2210, NotHitBy]
type = NotHitBy
trigger1 = var(26)
trigger1 = animelemno(0) < 38
value = SCA
time = 60
ignorehitpause = 1

[State 2210, NotHitBy]
type = NotHitBy
trigger1 = animelemno(0) = [38, 48]
value = SCA
time = 15
ignorehitpause = 1

[State XP Add]
type = VarAdd
trigger1 = var(20)
trigger1 = var(26)
var(19) = 600
ignorehitpause = 1

[State Weapon Layer]
type = VarSet
trigger1 = animelemno(0) = [3, 11]
trigger2 = animelemno(0) = [18, 22]
trigger3 = animelemno(0) = [24, 26]
trigger4 = animelemno(0) = [32, 34]
trigger5 = animelemno(0) = 37
trigger6 = animelemno(0) = [44, 45]
trigger7 = animelemno(0) = [48, 56]
trigger8 = animelemno(0) = 59
var(11) = 0

[State Shield Layer]
type = VarSet
trigger1 = animelemno(0) = [1, 2]
trigger2 = animelemno(0) = [13, 16]
trigger3 = animelemno(0) = [23, 27]
trigger4 = animelemno(0) = [41, 46]
trigger5 = animelemno(0) = [59, 61]
var(12) = 1

[State Shield Layer]
type = VarSet
trigger1 = animelemno(0) = 60
var(12) = 2

[State Weapon Trail]
type = Null
trigger1 = animelemno(0) > 40
trigger1 = var(17) := 2230

[State Delay Dampening]
type = VarSet
trigger1 = 1
var(33) = 1
ignorehitpause = 1
