;---------------------------------------------------------------------------
; Rush
[Statedef 1000]
type    = S
movetype= A
physics = S
poweradd= 70 + (var(0)%3)*10
ctrl = 0
velset = 0,0
anim = 1000 + (var(0)%3)*10 + 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 1000, VarAdd]
type = VarAdd
trigger1 = !time
trigger1 = var(20) = [1, 7]
trigger1 = var(0) = [3, 5]
var(0) = -3

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

[State 1000, 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 1000, VarSet]
type = VarSet
trigger1 = var(10) < 5
fvar(9) = 1.05 - var(10)*0.05

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

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

[State 1000, 1]
type = HitDef
triggerall = var(22)
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
trigger1 = var(6) := floor(fvar(12)*300) || 1
trigger2 = anim > 1019
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, SA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*hitcount)), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*hitcount))
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) = 7), floor((-59*(animelemno(0) = 5) - 48*(animelemno(0) = 7))*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
ground.cornerpush.veloff = -6 - 3*(var(0)%3)
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 1000, 2]
type = HitDef
triggerall = var(22)
trigger1 = anim > 1009
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, SA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*hitcount)), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*hitcount))
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
ground.cornerpush.veloff = -6 - 3*(var(0)%3)
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 1000, 1]
type = HitDef
triggerall = !var(22)
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
trigger1 = var(6) := floor(fvar(12)*300) || 1
trigger2 = anim > 1019
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, SA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*hitcount)), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*hitcount))
animtype = Heavy
guardflag = MA
hitflag = MAF
pausetime = 11, 11
sparkno = 3
sparkxy = -20 - 5*(animelemno(0) = 7), floor((-59*(animelemno(0) = 5) - 48*(animelemno(0) = 7))*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
ground.cornerpush.veloff = -6 - 3*(var(0)%3)
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 1000, 2]
type = HitDef
triggerall = !var(22)
trigger1 = anim > 1009
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*300) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
nochainid = 810 + id%10
attr = S, SA
damage = ceil(96.0*(2 - fvar(9))/(1.0 + 0.4*hitcount)), ceil(16.0*(2 - fvar(9))/(1.0 + 0.4*hitcount))
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
ground.cornerpush.veloff = -6 - 3*(var(0)%3)
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 1000, Screenbounder]
type = Helper
trigger1 = animelem = 5, = 1
name = "screenbounder"
id = 1040
stateno = 1040
persistent = 0

[State 1000, ChangeState]
type = ChangeState
trigger1 = animelem = 11
value = ifelse(var(0) < 3, 1001, 1050)

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

[State 1000, VelSet]
type = VelSet
trigger1 = animelemno(-1) = 6
trigger2 = animelemno(0) = [7, 9]
x = 5 + 2.5*(var(0)%3)

[State 1000, VelMul]
type = VelMul
trigger1 = animelemno(0) = 10
x = 0.87

;[State 1000, TargetVelAdd]
;type = TargetVelAdd
;trigger1 = movecontact = [1, 20]
;x = -0.5

[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, 6]
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) := 1030

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

;---------------------------------------------------------------------------
; Chronos
[Statedef 1001]
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
triggerall = anim = [1000, 1009]
trigger1 = animelem = 14, = 2
trigger2 = animelem = 15, = 4
trigger3 = animelem = 16, = 6
trigger4 = animelem = 17, = 3
trigger4 = animelem = 18, = 2
value = anim
elem = animelemno(0) + 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1010, 1019]
trigger1 = animelem = 14, = 2
trigger2 = animelem = 15, = 6
trigger3 = animelem = 16, = 8
trigger4 = animelem = 17, = 3
trigger4 = animelem = 18, = 2
value = anim
elem = animelemno(0) + 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1020, 1029]
trigger1 = animelem = 14, = 2
trigger2 = animelem = 15, = 8
trigger3 = animelem = 16, = 10
trigger4 = animelem = 17, = 5
trigger4 = animelem = 18, = 2
value = anim
elem = animelemno(0) + 1

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

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

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

[State 1001, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = 20, 5

[State 1001, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
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
fall = 1
fall.recover = 0
airguard.velocity = -5, -6.43
yaccel = .536

[State 1001, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
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
fall = 1
fall.recover = 0
airguard.velocity = -5, -6.43
yaccel = .536
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 1001, 1c]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 7
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
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
fall = 1
fall.recover = 0
airguard.velocity = -5, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1001, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
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
fall = 1
fall.recover = 0
airguard.velocity = -5, -6.43
yaccel = .536

[State 1001, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Back
guardflag = MA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 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
fall = 1
fall.recover = 0
airguard.velocity = -5, -6.43
yaccel = .536
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 1001, 1c]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 7
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
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
fall = 1
fall.recover = 0
airguard.velocity = -5, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

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

[State 1001, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 23
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 15
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 1001, 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) = [12, 17]
trigger1 = var(11) := 0

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

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

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

;---------------------------------------------------------------------------
; Achilles
[Statedef 1050]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 1050 + (var(0)%3)*10 + 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
hitcountpersist = 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1050, 1059]
trigger1 = animelem = 4, = 2
trigger2 = animelem = 5, = 2
trigger3 = animelem = 6, = 6
value = anim
elem = animelemno(0) + 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1060, 1069]
trigger1 = animelem = 4, = 2
trigger2 = animelem = 5, = 3
trigger3 = animelem = 6, = 9
value = anim
elem = animelemno(0) + 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1070, 1079]
trigger1 = animelem = 4, = 2
trigger2 = animelem = 5, = 4
trigger3 = animelem = 6, = 10
value = anim
elem = animelemno(0) + 1

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

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

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

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 20, 5

[State 1050, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Back
guardflag = LA
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 < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-11.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
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.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 1050, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Back
guardflag = LA
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 < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-11.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
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.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -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 1050, 1c]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 7
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Back
guardflag = LA
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 < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-11.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, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
palfx.add = 256, 256, 256
palfx.time = 1

[State 1050, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Back
guardflag = LA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-11.5*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
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.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 1050, 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, SA
damage = ceil(fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Back
guardflag = LA
hitflag = MAF
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2 + (var(9) = 6)
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-11.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
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.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -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 1050, 1c]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 7
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*300) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Back
guardflag = LA
hitflag = MAF
pausetime = 14, 24
guard.pausetime = 13, 13
sparkno = 2
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-11.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, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
palfx.add = 256, 256, 256
palfx.time = 1

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

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

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 5
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 1050, 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) = 4 || animelemno(0) = 8
trigger1 = var(11) := 0

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

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

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

;---------------------------------------------------------------------------
; Mars Slash
[Statedef 1100]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
poweradd = 70 + var(0)*10
anim = 1100 + var(0)*10 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1100, 1109]
trigger1 = animelem = 12, = 2
trigger2 = animelem = 13, = 2
trigger3 = animelem = 14, = 2
trigger4 = animelem = 15, = 2
trigger5 = animelem = 16, = 2
trigger6 = animelem = 17, = 2
value = anim
elem = animelemno(0) + 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1110, 1119]
trigger1 = animelem = 12, = 2
trigger2 = animelem = 13, = 2
trigger3 = animelem = 17, = 2
trigger4 = animelem = 18, = 2
trigger5 = animelem = 19, = 2
trigger6 = animelem = 20, = 2
value = anim
elem = animelemno(0) + 1

[State Thunder Sword Speedup]
type = ChangeAnim
triggerall = var(9) = 8
triggerall = anim = [1120, 1129]
trigger1 = animelem = 9, = 3
trigger2 = animelem = 10, = 3
trigger3 = animelem = 11, = 2
trigger4 = animelem = 17, = 3
trigger5 = animelem = 18, = 3
trigger6 = animelem = 19, = 3
trigger7 = animelem = 20, = 2
value = anim
elem = animelemno(0) + 1

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

[State 1100, VarSet]
type = VarSet
trigger1 = time = 0
trigger2 = p2movetype != A
trigger2 = !movehit
var(1) = 0

[State 1100, VarSet]
type = VarSet
trigger1 = p2movetype = A
var(1) = 1

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

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12, = -1
trigger2 = var(9) = 8
trigger2 = anim = [1120, 1129]
trigger2 = animelem = 11, = 1
value = 180, 0
channel = 0

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12, = -1
trigger2 = var(9) = 8
trigger2 = anim = [1120, 1129]
trigger2 = animelem = 11, = 1
value = 20, 5

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

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

[State 1100, 1]
type = HitDef
triggerall = var(22)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 12
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*(104 + 8*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 2*var(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 14, 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(-100*const(size.yscale))
;sparkxy = -25, floor(-100*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = -10
guard.hittime = 19
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
air.cornerpush.veloff = 0
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536

[State 1100, 1b]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 12
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*(104 + 8*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 2*var(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 14, 13
sparkno = s17002 + 2*(var(9) = 6)
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(-100*const(size.yscale))
;sparkxy = -25, floor(-100*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = -10
guard.hittime = 19
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
air.cornerpush.veloff = 0
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
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 1100, 1c]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 7
trigger1 = animelemno(0) = 12
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(200 + var(0)*50)) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*var(1))*fvar(6)*(104 + 8*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 2*var(0))))
animtype = Medium
guardflag = MA
hitflag = MA
pausetime = 14, 13
guard.pausetime = 14, 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(-100*const(size.yscale))
;sparkxy = -25, floor(-100*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = -10
guard.hittime = 19
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
air.cornerpush.veloff = 0
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1100, 2]
type = HitDef
triggerall = var(22)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 13
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*ifelse(movehit, 64 + 8*var(0), 112 + 16*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(movecontact, 8 + 2*var(0), 16 + 4*var(0))))
animtype = Back
guardflag = MA
hitflag = MA
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(-30*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 = -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 1100, 2b]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 13
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*ifelse(movehit, 64 + 8*var(0), 112 + 16*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(movecontact, 8 + 2*var(0), 16 + 4*var(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
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(-30*const(size.yscale))
;sparkxy = -25, floor(-30*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -6.67, -4.23
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 1100, 2c]
type = HitDef
triggerall = var(22)
trigger1 = var(9) = 7
trigger1 = animelemno(0) = 13
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(200 + var(0)*50)) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*var(1))*fvar(6)*ifelse(movehit, 64 + 8*var(0), 112 + 16*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(movecontact, 8 + 2*var(0), 16 + 4*var(0))))
animtype = Back
guardflag = MA
hitflag = MA
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(-30*const(size.yscale))
;sparkxy = -25, floor(-30*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.add = 256, 256, 256
palfx.time = 1

[State 1100, 1]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 12
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*(104 + 8*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 2*var(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 14, 13
sparkno = 3
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-100*const(size.yscale))
;sparkxy = -25, floor(-100*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = -10
guard.hittime = 19
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
air.cornerpush.veloff = 0
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536

[State 1100, 1b]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 12
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*(104 + 8*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 2*var(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 14, 13
sparkno = 3
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-100*const(size.yscale))
;sparkxy = -25, floor(-100*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = -10
guard.hittime = 19
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
air.cornerpush.veloff = 0
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
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 1100, 1c]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 7
trigger1 = animelemno(0) = 12
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(200 + var(0)*50)) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*var(1))*fvar(6)*(104 + 8*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 2*var(0))))
animtype = Medium
guardflag = MA
hitflag = MA
pausetime = 14, 13
guard.pausetime = 14, 13
sparkno = 3
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-100*const(size.yscale))
;sparkxy = -25, floor(-100*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -10
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = -10
guard.hittime = 19
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
air.cornerpush.veloff = 0
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1100, 2]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 13
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*ifelse(movehit, 64 + 8*var(0), 112 + 16*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(movecontact, 8 + 2*var(0), 16 + 4*var(0))))
animtype = Back
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 3
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-30*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 = -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 1100, 2b]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 13
trigger1 = var(18) < animelemno(0)
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(14)
attr = S, SA
damage = ceil(fvar(6)*ifelse(movehit, 64 + 8*var(0), 112 + 16*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(movecontact, 8 + 2*var(0), 16 + 4*var(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 3
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-30*const(size.yscale))
;sparkxy = -25, floor(-30*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -6.67, -4.23
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 1100, 2c]
type = HitDef
triggerall = !var(22)
trigger1 = var(9) = 7
trigger1 = animelemno(0) = 13
trigger1 = var(18) < animelemno(0)
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(200 + var(0)*50)) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil((1+.3*var(1))*fvar(6)*ifelse(movehit, 64 + 8*var(0), 112 + 16*var(0))), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(movecontact, 8 + 2*var(0), 16 + 4*var(0))))
animtype = Back
guardflag = MA
hitflag = MA
pausetime = 14, 24
guard.pausetime = 13, 13
sparkno = 3
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-30*const(size.yscale))
;sparkxy = -25, floor(-30*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.add = 256, 256, 256
palfx.time = 1

[State 1100, Elemental FX]
type = VarSet
trigger1 = var(9) = [6, 8]
trigger1 = animelemno(0) = [12, 13]
var(27) = var(9) - 5
ignorehitpause = 1

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

[State 1100, PosAdd]
type = PosAdd
trigger1 = animelem = 11
trigger2 = animelem = 12
x = 32*const(size.xscale)

[State 1100, PosAdd]
type = PosAdd
trigger1 = animelem = 21
trigger2 = animelem = 22
x = -32*const(size.xscale)

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

[State 1100, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 24
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 14
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 1100, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

[State 1100, HitBy]
type = HitBy
trigger1 = animelemno(0) = [6, 11]
trigger1 = !var(16)
trigger1 = !var(42)
value = SCA, AT

[State 1100, NotHitBy]
type = NotHitBy
trigger1 = animelemno(0) = [6, 11]
trigger1 = var(16)
trigger1 = !var(42)
value = , NA, SA, NP, SP

[State 1100, SprPriority]
type = SprPriority
triggerall = animelem = 1
trigger1 = !var(16)
trigger2 = var(42)
value = (var(13) := 2) + 1

[State 1100, SprPriority]
type = SprPriority
trigger1 = animelem = 6
trigger1 = var(16)
trigger1 = !var(42)
value = (var(13) := 0)

[State 1100, SprPriority]
type = SprPriority
trigger1 = animelem = 12
trigger1 = var(16)
trigger1 = !var(42)
value = (var(13) := 2) + 1

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

[State Weapon Layer]
type = Null
trigger1 = animelemno(0) = 21 || (animelemno(0) = [8, 9]) || animelemno(0) = [12, 19]
trigger1 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = (animelemno(0) = [3, 10]) || animelemno(0) = [21, 23]
trigger1 = var(12) := 1

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

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

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

;---------------------------------------------------------------------------
; Gaia Driver
[Statedef 1200]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1200 + var(0)*10
sprpriority = (var(13) := 2) + 1

[State 1200, 1]
type = HitDef
trigger1 = animelem = 3, -1
trigger1 = p2bodydist x < const(size.xscale)*(75 + 10*var(0) - const(size.ground.front))
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, ST          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
;getpower = 70 + var(0)*10 + ceil(0.7*(192.0 + 16*var(0))*const(data.attack)/100.0)
;givepower = ceil(0.6*(192.0 + 16*var(0))*const(data.attack)/100.0)
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 = 1201       ;On success, player changes to state 810
p2stateno = 1205       ;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
yaccel = .536

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

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

[State 1200, 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 1201]
type    = S
movetype= A
physics = N
anim = 1201
ctrl = 0

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

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

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

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

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

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

[State 1201, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 1202

[Statedef 1202] ;freeze at 25, changestate time = 33 + 6 = 39 ticks
type    = A ;freeze at 29, changestate time = 45 + 6 = 51 ticks
movetype= A ;freeze at 30, changestate time = 49 + 5 = 54 ticks
physics = N
anim = 1202
ctrl = 0
velset = 0,0

[State 1202, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = var(0) = 0
x = (-pos x*facing - 48*const(size.xscale))*0.04
y = -14

[State 1202, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = var(0) = 1
x = (-pos x*facing - 48*const(size.xscale))/29.0
y = -18

[State 1202, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = var(0) = 2
x = (-pos x*facing - 48*const(size.xscale))/30.0
y = -19

[State 1202, PosAdd]
type = PosAdd
trigger1 = time = 0
x = 48*const(size.xscale)

[State 1202, ChangeState]
type = ChangeState
trigger1 = var(0) = 0
trigger1 = time = 33
trigger2 = var(0) = 1
trigger2 = time = 45
trigger3 = var(0) = 2
trigger3 = time = 49
value = 1203

[State 1202, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.536

[State 1202, VelAdd]
type = VelAdd
trigger1 = vel y > 0
y = 1.0714

[State 1202, VelMul]
type = VelMul
trigger1 = time > 21
trigger1 = var(0) = 0
trigger2 = time > 25
trigger2 = var(0) = 1
trigger3 = time > 26
trigger3 = var(0) = 2
x = 0.8

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

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

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

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

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

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

[State 1202, 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 1203]
type    = A
movetype= A
physics = N
anim = 1203
sprpriority = (var(13) := 2) + 1
ctrl = 0

[State 1203, TargetState]
type = TargetState
trigger1 = time = 0
id = var(14)
value = 1207

[State 1203, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = pos y >= 0
value = ceil(-(168.0 + 16*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 1203, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = pos y >= 0
value = ceil(0.6*(168.0 + 16*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 1203, PowerAdd]
type = PowerAdd
trigger1 = pos y >= 0
value = 70 + var(0)*10 + ceil(0.7*(192.0 + 16*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 XP Add]
type = VarAdd
trigger1 = pos y >= 0
var(19) = ifelse(!var(0), 700, ifelse(var(0) = 1, 900, 1000))
persistent = 0

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

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

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

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

[State 1203, ChangeState]
type = ChangeState
trigger1 = animelem = 4
value = 1204

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

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

[State 1203, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 1, < 2
trigger1 = pos y + vel y < 0
value = 1203

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

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

[State 1203, 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 1204]
type    = A
movetype= I
physics = N
velset = -4.12, -10
ctrl = 0

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

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

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

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

[State 1204, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 1204
trigger1 = vel y = 0
trigger1 = pos y = 0
value = 1204

[State Idle Anim]
type = StateTypeSet
trigger1 = anim = 1204
trigger1 = animelem = 1
statetype = S

[State 1204, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = anim = 1204
trigger1 = animelem = 6
value = 1

[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 1204, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

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

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

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

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

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

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

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

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

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

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

[State 1207, 2]
type = SelfState
trigger1 = animtime = 0
trigger1 = anim = 5100
trigger2 = time > 60
value = 5101

[State 1207, 1]
type = ChangeAnim
trigger1 = !gethitvar(isbound)
trigger1 = anim != 5100
value = 5100

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

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

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

[State 1207, NotHitBy]
type = NotHitBy
trigger1 = gethitvar(isbound)
value = SCA

;---------------------------------------------------------------------------
; Weapon Switch
[Statedef 1300]
type    = S
movetype= I
physics = S
ctrl = 0
velset = 0,0
anim = 1300
sprpriority = (var(13) := 0)

[State 1300, VarSet]
type = VarSet
trigger1 = time = 0
var(1) = ifelse(var(9) < 0, 1, 0)

[State 1300, 1]
type = NotHitBy
trigger1 = var(1)
value = SCA
time = 6

[State 1300, Change Weap]
type = Null
triggerall = animelem = 4
triggerall = var(9) > 0
triggerall = !var(0)
trigger1 = (var(21)%100)/10
trigger1 = var(9) < 6
trigger1 = var(9) := 6
trigger2 = (var(21)%1000)/100
trigger2 = var(9) < 7
trigger2 = var(9) := 7
trigger3 = (var(21)%10000)/1000
trigger3 = var(9) < 8
trigger3 = var(9) := 8
trigger4 = (var(21)%100000)/10000
trigger4 = var(9) < 9
trigger4 = var(9) := 9
trigger5 = var(9) := var(21)%10

[State 1300, Change Weap Shortcut Command]
type = Null
triggerall = animelem = 4
triggerall = var(9) > 0
triggerall = var(0)
trigger1 = var(0) = 1
trigger1 = var(9) := var(21)%10
trigger2 = var(0) = 2
trigger2 = var(9) := ifelse((var(21)%100000)/10000, 9, var(21)%10)
trigger3 = var(0) = 3
trigger3 = var(9) := ifelse((var(21)%100)/10, 6, var(21)%10)
trigger4 = var(0) = 4
trigger4 = var(9) := ifelse((var(21)%1000)/100, 7, var(21)%10)
trigger5 = var(0) = 5
trigger5 = var(9) := ifelse((var(21)%10000)/1000, 8, var(21)%10)

[State 1300, VarSet]
type = VarSet
trigger1 = animelem = 5
trigger1 = var(9) < 0
var(9) = -var(9)

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 8, 0

[State 1300, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 8
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
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 1300, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

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

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

;---------------------------------------------------------------------------
; Weapon Switch Legendary
[Statedef 1310]
type    = S
movetype= I
physics = S
ctrl = 0
velset = 0,0
anim = 1300
sprpriority = (var(13) := 0)

[State 1310, VarSet]
type = VarSet
trigger1 = time = 0
var(1) = ifelse(var(9) = 5 || (var(9) < 0 && var(9) != 5), 1, 0)

[State 1310, Change Weap]
type = Null
triggerall = animelem = 4
trigger1 = !var(1)
trigger1 = var(34) := abs(var(9)) || 1
trigger1 = var(35) := abs(var(10)) || 1
trigger1 = var(9) := 5
trigger1 = var(10) := 5
trigger2 = var(9) := var(34) || 1
trigger2 = var(10) := var(35) || 1

[State 1310, PowerAdd]
type = PowerAdd
trigger1 = animelem = 4
trigger1 = !var(1)
value = -153 ; 180 power for 1 sec use minimum

[State 1310, Explod]
type = Explod
trigger1 = animelem = 4
trigger1 = !var(1)
postype = p1
anim = 21310 + (var(23) != 0)
pos = floor(24*const(size.xscale)), floor(-52*const(size.yscale))
bindtime = -1
sprpriority = 2
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
scale = 0.67*const(size.xscale), 0.67*const(size.yscale)

[State 1310, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 8, 0

[State 1310, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
trigger1 = !var(1)
value = 1310, 0

[State 1310, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 8
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
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 1310, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

[State 1310, Null]
type = Null
trigger1 = time
trigger1 = animelemno(0) < 4
trigger1 = var(1)
trigger1 = var(9) := -4
trigger1 = var(10) := -4

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

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

;---------------------------------------------------------------------------
; Apollo
[Statedef 1400]
type    = U
movetype= A
physics = S
poweradd= 70 + (var(0)%3)*10
ctrl = 0
sprpriority = (var(13) := -1)*0 - 1
velset = 0, 0

[State 1400, NotHitBy]
type = NotHitBy
trigger1 = !var(42)
value = A
time = 2

[State 1400, NotHitBy]
type = NotHitBy
trigger1 = !var(42)
value2 = , AP
time = 4

[State 1400, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40
trigger1 = anim != 10
trigger1 = anim != 12
value = ifelse(statetype = C, 12, 40)

[State 1400, 1]
type = HitDef
trigger1 = !time
id = 1400 + id%10
attr = A, ST          ;Attributes: Standing, Normal Throw
hitflag = AF
guard.pausetime = 9,9
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
guard.pausetime = 9,9
numhits = 0
nochainid = 810 + id%10
sparkno = -1          ;No spark
guard.sparkno = -1
hitsound = s8, 0
sprpriority = 2       ;Draw in front of p2
p2facing = 1          ;Force p2 to face player
p1stateno = 1402       ;On success, player changes to state 810
p2stateno = 1405       ;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
airguard.velocity = -3, -6.43
fall = 1              ;Force p2 into falling down
fall.recover = 0
yaccel = .536

[State 1400, Screenbounder]
type = Helper
trigger1 = !time
name = "screenbounder"
id = 1450
stateno = 1450
persistent = 0

[State 1400, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0 || (anim = 10 && animelemno(0) > 3) || (anim = 12 && animelem = 3)
value = 1401

[State 1400, ChangeAnim]
type = ChangeAnim
triggerall = anim != 40
triggerall = anim = 10
triggerall = animelemno(0) < 4
trigger1 = animelemno(-1) != animelemno(0)
value = 40
elem = animelemno(0)

[State 1400, ChangeAnim]
type = ChangeAnim
triggerall = anim != 40
triggerall = anim = 12
triggerall = animelemno(0) > 2
trigger1 = animelem = 4
trigger2 = animelemno(0) != 4
value = 40
elem = ifelse(animelemno(0) < 5, 3, ifelse(animelemno(-1) < 5, 2, 1))

[State Shield Layer]
type = VarSet
trigger1 = anim = 40 && animelemno(0) != 1
trigger2 = anim = 10 && animelemno(0) != 1
trigger3 = anim = 12 && animelemno(0) < 4
var(12) = 1

; Jump
[Statedef 1401]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 1400
sprpriority = (var(13) := -1)*0 - 1
velset = 5, -10.7
hitdefpersist = 1

[State 1401, PosSet]
type = PosSet
trigger1 = time = 0
y = const(size.yscale)*10

[State 1401, PosAdd]
type = PosAdd
trigger1 = time = 0
trigger1 = var(0) = 1
x = const(size.xscale)*16

[State 1401, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 200, 0
channel = 0

[State 1401, VelMul]
type = VelMul
trigger1 = !time
x = ifelse(var(0) = 0, 0.45, ifelse(var(0) = 1, 1.05, 1.1))
y = ifelse(var(0) = 0, 0.8, ifelse(var(0) = 1, 0.85, 1.1))

[State 1401, Gravity]
type = Gravity
trigger1 = 1

[State 1401, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1400
value = 1400
elem = animelemno(0)

[State 1401, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1400
trigger1 = p2dist x < 32*const(size.xscale)
value = 1400
elem = 4

[State 1401, ChangeAnim]
type = ChangeAnim
triggerall = anim = 1400
trigger1 = animelemno(0) = 1
trigger2 = animelemno(0) = 4
trigger2 = p2dist x >= 64*const(size.xscale)
value = 1400
elem = ifelse(p2dist y - vel y + enemynear, vel y < const(size.xscale)*-64 && enemynear, pos y < 0, 2, 3)

[State 1401, ChangeAnim]
type = ChangeAnim
triggerall = anim = 1400
trigger1 = animelemno(0) = 2
trigger1 = p2dist y - vel y + enemynear, vel y  >= const(size.xscale)*-64 || enemynear, pos y >= 0
trigger2 = animelemno(0) = 3
trigger2 = p2dist y - vel y + enemynear, vel y  < const(size.xscale)*-64 && enemynear, pos y < 0
value = 1400
elem = 1

[State 1401, ChangeAnim]
type = ChangeAnim
trigger1 = var(0) = 0
trigger1 = time = 8
trigger2 = var(0) = 1
trigger2 = time = 10
trigger3 = var(0) = 2
trigger3 = time = 13
value = 42
elem = 3

[State 1401, VelMul]
type = VelMul
trigger1 = vel y > -1
x = 0.98

[State 1401, 1]
type = HitDef
trigger1 = !movereversed
trigger1 = !moveguarded
trigger1 = p2movetype != H
id = 1400 + id%10
attr = A, ST          ;Attributes: Standing, Normal Throw
hitflag = AF
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
guard.pausetime = 9,9
numhits = 0
nochainid = 810 + id%10
sparkno = -1          ;No spark
guard.sparkno = -1
hitsound = s8, 0
guardsound = s6, 0
sprpriority = 2       ;Draw in front of p2
p2facing = 1          ;Force p2 to face player
p1stateno = 1402       ;On success, player changes to state 810
p2stateno = 1405       ;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
airguard.velocity = -3, -6.43
fall = 1              ;Force p2 into falling down
fall.recover = 0
yaccel = .536

[State 1401, 1]
type = HitDef
trigger1 = !movereversed
trigger1 = !moveguarded
trigger1 = p2movetype = H
trigger1 = enemynear, gethitvar(guarded)
id = 1400 + id%10
attr = A, ST          ;Attributes: Standing, Normal Throw
hitflag = AF
guardflag = A
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
guard.pausetime = 9,9
numhits = 0
nochainid = 810 + id%10
sparkno = -1          ;No spark
guard.sparkno = -1
hitsound = s8, 0
guardsound = s6, 0
sprpriority = 2       ;Draw in front of p2
p2facing = 1          ;Force p2 to face player
p1stateno = 1402       ;On success, player changes to state 810
p2stateno = 1405       ;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
airguard.velocity = -3, -6.43
fall = 1              ;Force p2 into falling down
fall.recover = 0
yaccel = .536

[State 1401, Explod]
type = Explod
triggerall = !var(22)
trigger1 = moveguarded = 1
postype = p1
anim = 17006
bindtime = 1
pos = floor(72*const(size.xscale)), floor(-128*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1401, Explod]
type = Explod
triggerall = var(22)
trigger1 = moveguarded = 1
postype = p1
anim = F40
bindtime = 1
pos = floor(72*const(size.xscale)), floor(-128*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
persistent = 0
ignorehitpause = 1
ownpal = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = anim = 42
movetype = I

[State 1401, ChangeState]
type = ChangeState
trigger1 = vel y > 0
trigger1 = pos y > 0
value = 1410

[State Shield Layer]
type = VarSet
trigger1 = anim = 42
trigger1 = animelemno(0) = 5 || animelemno(0) = 9
var(11) = 1

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

; Throw
[Statedef 1402]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 1401
sprpriority = (var(13) := 0)

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

[State 1402, VarSet]
type = VarSet
trigger1 = animtime = 0
sysvar(1) = -1

[State 1402, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 50
ctrl = 0

[State 1402, VarSet]
type = VarSet
trigger1 = !time
trigger1 = numtarget
fvar(0) = target, pos y - pos y

[State 1402, Gravity]
type = Gravity
trigger1 = 1

[State 1402, VelMul]
type = VelMul
trigger1 = !movehit
x = 0.98
y = 0.98

[State 1402, VelMul]
type = VelMul
trigger1 = !movehit
trigger1 = vel y > -3
x = 0.92

[State 1402, VelSet]
type = VelSet
trigger1 = movehit = 1
x = -1.2 - 0.2*var(0)
y = -6 - var(0)

[State 1402, ChangeAnim]
type = ChangeAnim
trigger1 = animelemno(0) = 2
trigger1 = vel y < -1
value = 1401
elem = 2

[State 1402, Bind 1]
type = TargetBind
trigger
trigger1 = animelemno(0) = 1
pos = 64*const(size.xscale), -128*const(size.yscale)

[State 1402, Bind 2]
type = TargetBind
trigger1 = animelemno(0) = 2
pos = 72*const(size.xscale), -104*const(size.yscale)

[State 1402, Bind 3]
type = TargetBind
trigger1 = animelem = 3
pos = 72*const(size.xscale), -104*const(size.yscale)

[State 1402, TargetState]
type = TargetState
trigger1 = animelem = 3
value = 1406

[State 1402, TargetVelSet]
type = TargetVelSet
trigger1 = animelem = 3, = 1
trigger1 = numtarget
x = -vel x + target, const(size.head.pos.y)*0.04
y = vel y + 6 ; - target, const(size.head.pos.y)*0.05

[State 1402, TargetVelAdd]
type = TargetVelAdd
trigger1 = animelemno(0) = [3, 5]
y = const(movement.yaccel)

[State 1402, Bind 4]
type = TargetBind
trigger1 = animelemno(0) > 5
trigger1 = movehit = 1
pos = 88*const(size.xscale), -48*const(size.yscale)
ignorehitpause = 1
persistent = 0

[State 1402, 1]
type = HitDef
trigger1 = var(22)
trigger1 = animelem = 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 1402 + id%10
chainid = 1400 + id%10
attr = A, SA
damage = ceil((104.0 + 12*var(0))*(ifelse(var(21)%10 = 5 || var(9) = 5, ifelse(var(20), 1.25, 1.4), 0.95 + 0.05*(var(21)%10))))
animtype = Heavy
guardflag = HA
hitflag = AF
pausetime = 11, 10
sparkno = -1
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(-70*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -7.5
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 19
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -2.5, 12.5 + 2.5*var(0)
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
fall.recovertime = 90
fall.damage = 12 + 2*var(0)
fall.xvelocity = -1
fall.yvelocity = -6 - 0.5*var(0)
fall.envshake.time = 5 + var(0)
fall.envshake.freq = 50
fall.envshake.ampl = 4 + var(0)
fall.envshake.phase = 270
p2stateno = 1407

[State 1402, 1]
type = HitDef
trigger1 = !var(22)
trigger1 = animelem = 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 1402 + id%10
chainid = 1400 + id%10
attr = A, SA
damage = ceil((104.0 + 12*var(0))*(ifelse(var(21)%10 = 5 || var(9) = 5, ifelse(var(20), 1.25, 1.4), 0.95 + 0.05*(var(21)%10))))
animtype = Heavy
guardflag = HA
hitflag = AF
pausetime = 11, 10
sparkno = -1
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-70*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -7.5
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 19
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -2.5, 12.5 + 2.5*var(0)
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
fall.recovertime = 90
fall.damage = 12 + 2*var(0)
fall.xvelocity = -1
fall.yvelocity = -6 - 0.5*var(0)
fall.envshake.time = 5 + var(0)
fall.envshake.freq = 50
fall.envshake.ampl = 4 + var(0)
fall.envshake.phase = 270
p2stateno = 1407

[State 1402, Explod]
type = Explod
triggerall = var(22)
trigger1 = movehit = 1
postype = p1
anim = 17002
bindtime = 1
pos = floor(98*const(size.xscale)), floor(-70*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1402, Explod]
type = Explod
triggerall = !var(22)
trigger1 = movehit = 1
postype = p1
anim = F2
bindtime = 1
pos = floor(98*const(size.xscale)), floor(-70*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1402, PosAdd]
type = PosAdd
trigger1 = animelemno(0) < 7
trigger1 = frontedgedist - 57*const(size.xscale) - 8 < 0
x = frontedgedist - 57*const(size.xscale) - 8

[State XP Add]
type = VarAdd
trigger1 = var(20)
trigger1 = var(26)
var(19) = 400 + 100*var(0)
ignorehitpause = 1

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

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

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

; Held
[Statedef 1405]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

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

[State 1405, SelfState]
type = SelfState
trigger1 = !gethitvar(isbound)
trigger2 = time = 30
value = 5050

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

; Released
[Statedef 1406]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

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

[State 1406, HitBy]
type = HitBy
trigger1 = 1
value = A, SA

[State 1406, SelfState]
type = SelfState
Trigger1 = time = 9
value = 5050

[State 1402, PosAdd]
type = PosAdd
trigger1 = backedgedist < 0
x = -backedgedist

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

; Shake
[Statedef 1407]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1407, 1]
type = ChangeAnim2
trigger1 = 1
value = 1407

[State 1407, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 1408

[State 1407, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 1407, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 1407, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

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

; Fall
[Statedef 1408]
type    = A
movetype= H
physics = N
ctrl = 0

[State 1408, 1]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 1408, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1408, 5]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y + vel y >= 0
value = 5100 ;HIT_BOUNCE

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

; Land
[Statedef 1410]
type    = S
physics = S
movetype = I
ctrl = 0
anim = 47
velset = 0,0

[State 1410, ChangeAnim]
type = ChangeAnim
trigger1 = !time
trigger1 = prevstateno = 1402
value = 1012
elem = 17

[State 1410, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 1410, Landing Sound]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0

[State 1410, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1410, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = anim = 47
trigger1 = animelem = 6
trigger2 = anim = 1012
trigger2 = animelem = 23
value = 1

[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 1410, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

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

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

;---------------------------------------------------------------------------
; Perseus Charge
[Statedef 1500]
type    = S
movetype= A
physics = N
ctrl = 0
sprpriority = (var(13) := 2) + 1
poweradd= 70 + (var(0)%3)*10

[State 1500, VarSet]
type = VarSet
trigger1 = !time
fvar(0) = (anim = 1500)

[State 1500, VarSet]
type = VarSet
trigger1 = !time
trigger1 = !fvar(0)
var(1) = 0

[State 1500, VarSet]
type = VarSet
trigger1 = !time
trigger1 = !fvar(0)
fvar(1) = 0

[State 1500, VelSet]
type = VelSet
trigger1 = !time
trigger1 = !fvar(0)
x = 0
y = 0

[State 1500, PowerAdd]
type = PowerAdd
trigger1 = !time
trigger1 = !fvar(0)
value = 70 + (var(0)%3)*10

[State 1500, ChangeAnim]
type = ChangeAnim
trigger1 = !time
trigger1 = !fvar(0)
value = 1500

[State 1500, NotHitBy]
type = NotHitBy
trigger1 = !time
trigger1 = fvar(0)
trigger2 = numhelper(1510)
trigger2 = helper(1510), prevstateno
trigger2 = helper(1510), time < 1
trigger2 = fvar(0) := 1
value = , NA, SA, NP, SP
time = 3
ignorehitpause = 1

[State 1500, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger1 = fvar(0)
trigger2 = numhelper(1510)
trigger2 = helper(1510), prevstateno
trigger2 = helper(1510), time < 1
trigger2 = fvar(0) := 1
value = 6, 1
channel = 1

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

[State 1500, ChangeAnim]
type = ChangeAnim
trigger1 = var(0) = 0
trigger1 = animelem = 4, = 2
trigger2 = var(0) = 1
trigger2 = animelem = 4, = 3
value = 1500
elem = 5

[State 1500, NotHitBy]
type = NotHitBy
trigger1 = animelem = 6, < 1
trigger1 = !var(42)
value2 = , AP
time = 3
ignorehitpause = 1

[State 1500, NotHitBy]
type = NotHitBy
trigger1 = fvar(0)
trigger1 = !var(42)
value2 = , NP, SP
time = 1
ignorehitpause = 1

[State 1500, Screenbounder]
type = Helper
trigger1 = animelem = 5
trigger1 = !numhelper(1520)
name = "screenbounder"
id = 1520
stateno = 1040
persistent = 0

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

[State 1500, ReversalDef]
type = ReversalDef
triggerall = animelemno(0) = 6
trigger1 = !fvar(0)
trigger2 = time > 2
reversal.attr = SCA, NA, SA, NP, SP
hitsound = -1
sparkno = S17006
pausetime = 0, 15
p1stateno = 1500
ignorehitpause = 1

[State 1500, VelMul]
type = VelMul
triggerall = animelemno(0) = 6
triggerall = !fvar(0) || time != [1, 8]
trigger1 = !numhelper(1510)
trigger2 = !helper(1510), prevstateno
trigger3 = helper(1510), time != [1, 8]
x = .85

[State 1500, VelSet]
type = VelSet
triggerall = animelemno(-1) = 6 || (animelem = 6 && fvar(0))
trigger1 = var(0) = 0
trigger1 = var(1) < 4
trigger2 = var(0) = 1
trigger2 = var(1) < 6
trigger3 = var(0) = 2
trigger3 = var(1) < 8
x = 7.5 + 1.25*(var(0)%3)

[State 1500, VarSet]
type = VarSet
trigger1 = 1
fvar(1) = 0

[State 1500, VarSet]
type = VarSet
trigger1 = numhelper(1510)
trigger1 = helper(1510), prevstateno
trigger1 = helper(1510), time < 9
trigger2 = fvar(0)
trigger2 = time < 9
fvar(1) = 1

[State 1500, ChangeState]
type = ChangeState
triggerall = animelemno(-1) = 6
triggerall = !fvar(1)
trigger1 = var(0) = 0
trigger1 = var(1) > 6
trigger2 = var(0) = 1
trigger2 = var(1) > 8
trigger3 = var(0) = 2
trigger3 = var(1) > 10
trigger4 = fvar(0) || var(1) > 2 + 2*var(0)
trigger4 = p2bodydist x < 16*const(size.xscale)
value = 1505

[State 1500, Helper]
type = Helper
trigger1 = !numhelper(1510)
name = "projblocker"
id = 1510
stateno = 1510
pausemovetime = 99999
supermovetime = 99999
ignorehitpause = 1

[State 1500, PosFreeze]
type = PosFreeze
trigger1 = numhelper(1510)
trigger1 = helper(1510), prevstateno
trigger1 = helper(1510), time = [1, 8]
trigger2 = fvar(0)
trigger2 = time = [1, 8]

[State 1500, VarAdd]
type = VarAdd
triggerall = animelemno(0) = 6
triggerall = !fvar(0) || time != [1, 8]
trigger1 = !numhelper(1510)
trigger2 = !helper(1510), prevstateno
trigger3 = helper(1510), time != [1, 8]
var(1) = 1

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

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

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

[State 1505, NotHitBy]
type = NotHitBy
triggerall = fvar(0)
triggerall = !var(42)
trigger1 = anim = 1505
trigger2 = anim = [420, 423]
trigger2 = animelem = 5, < 1
value = , NA, SA, NP, SP
ignorehitpausetime = 1

[State 1505, Screenbounder]
type = Helper
triggerall = anim = 1505
trigger1 = animelem = 5
name = "screenbounder"
id = 1040
stateno = 1040
persistent = 0

[State 1505, PosAdd]
type = PosAdd
triggerall = anim = 1505
trigger1 = animtime = 0
x = 24*const(size.xscale)
persistent = 0

[State 1505, StateTypeSet]
type = StateTypeSet
triggerall = anim = 1505
trigger1 = animtime = 0
statetype = C

[State 1505, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1505
trigger1 = animtime = 0
value = 420 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
elem = 5

[State 1505, Width]
type = Width
trigger1 = anim != 1505
trigger1 = animelem = 5, = 0
player = floor(-20*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 1505, Width]
type = Width
trigger1 = anim != 1505
trigger1 = animelem = 5, = 1
player = floor(-16*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 1505, Width]
type = Width
trigger1 = anim != 1505
trigger1 = animelem = 5, = 2
player = floor(-12*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 1505, Width]
type = Width
trigger1 = anim != 1505
trigger1 = animelem = 5, = 3
player = floor(-8*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 1505, Width]
type = Width
trigger1 = anim != 1505
trigger1 = animelem = 5, = 4
player = floor(-4*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 1505, VarSet]
type = VarSet
trigger1 = !time
var(1) = 0

[State 1505, VarSet]
type = VarSet
trigger1 = movecontact
trigger1 = p2movetype = H
trigger2 = movereversed = 1
var(1) = 1

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

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

[State 1505, PlaySnd]
type = PlaySnd
triggerall = anim = 1505
trigger1 = animelem = 5
value = 1000, 1
channel = 0

[State 1505, PlaySnd]
type = PlaySnd
triggerall = anim = 1505
trigger1 = animelem = 5
value = 20, 5

[State 1505, 1]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -10, floor(-10.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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1505, 1b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
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 = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1505, 1c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1505, 2]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
triggerall = var(9) != [6, 8]
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor((-75 - 53.5*(animelemno(0) = 7))*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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1505, 2b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
triggerall = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
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 = -20, floor((-75 - 53.5*(animelemno(0) = 7))*const(size.yscale))
hitsound   = s5,2
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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1505, 2c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor((-75 - 53.5*(animelem = 7))*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1505, 1]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -10, floor(-10.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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1505, 1b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2 + (var(9) = 6)
sparkxy = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1505, 1c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1505, 2]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
triggerall = var(9) != [6, 8]
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -20, floor((-75 - 53.5*(animelemno(0) = 7))*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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1505, 2b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
triggerall = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2 + (var(9) = 6)
sparkxy = -20, floor((-75 - 53.5*(animelemno(0) = 7))*const(size.yscale))
hitsound   = s5,2
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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1505, 2c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -20, floor((-75 - 53.5*(animelem = 7))*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

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

[State 1505, StateTypeSet]
type = StateTypeSet
triggerall = anim = [420, 423]
trigger1 = animelem = 6
statetype = S

[State 1505, ChangeAnim]
type = ChangeAnim
trigger1 = anim = [420, 423]
trigger1 = animelem = 15
value = 1506

[State 1505, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
triggerall = anim = 1506
trigger1 = animelem = 4
value = 1

;[State 1505, PosAdd]
;type = PosAdd
;trigger1 = anim = 1506
;trigger1 = animelem = 1
;x = -8*const(size.xscale)
;persistent = 0

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = anim = [420, 423]
trigger2 = animelem = 8
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 1505, 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 Trail]
type = Null
trigger1 = anim != 1506
trigger1 = var(17) := 1530

[State Weapon Layer]
type = Null
trigger1 = anim = [420, 423]
trigger1 = (animelemno(0) = [2,3]) || animelemno(0) = [8, 14]
trigger1 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = anim = 1505
trigger1 = animelemno(0) < 5
trigger1 = var(12) := 1
trigger2 = anim = [420, 423]
trigger2 = animelemno(0) < 5 || animelemno(0) > 14
trigger2 = var(12) := 1

[State Shield Layer]
type = VarSet
trigger1 = anim = [420, 423]
trigger1 = animelemno(0) < 5
var(12) = 2

; projblocker
[Statedef 1510]
type    = S
movetype= I
anim = 9999

[State 1510, DestroySelf]
type = DestroySelf
trigger1 = root, stateno != 1500
trigger2 = root, movetype != A
trigger3 = root, statetype != S

[State 1510, PosAdd]
type = PosAdd
trigger1 = 1
x = rootdist x
y = rootdist y

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = prevstateno
trigger1 = time < 3
value = SCA
ignorehitpause = 1

[State 1510, HitBy]
type = HitBy
trigger1 = !prevstateno
trigger2 = time > 2
value = SCA, NP, SP
ignorehitpause = 1

[State 1510, HitOveridde]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 1510
ignorehitpause = 1

[State 1510, ChangeAnim]
type = ChangeAnim
trigger1 = root, animelemno(0) = 6
value = 1501


;---------------------------------------------------------------------------
; Perseus Tackle
[Statedef 1550]
type    = S
movetype= A
physics = N
ctrl = 0
sprpriority = (var(13) := 2) + 1
poweradd= 70 + (var(0)%3)*10

[State 1550, VarSet]
type = VarSet
trigger1 = !time
fvar(0) = (anim = 1550)

[State 1550, VarSet]
type = VarSet
trigger1 = !time
trigger1 = !fvar(0)
var(1) = 0

[State 1550, VarSet]
type = VarSet
trigger1 = !time
trigger1 = !fvar(0)
fvar(1) = 0

[State 1550, VelSet]
type = VelSet
trigger1 = !time
trigger1 = !fvar(0)
x = 0
y = 0

[State 1550, PowerAdd]
type = PowerAdd
trigger1 = !time
trigger1 = !fvar(0)
value = 70 + (var(0)%3)*10

[State 1550, ChangeAnim]
type = ChangeAnim
trigger1 = !time
trigger1 = !fvar(0)
value = 1550

[State 1550, NotHitBy]
type = NotHitBy
trigger1 = !time
trigger1 = fvar(0)
trigger2 = numhelper(1560)
trigger2 = helper(1560), prevstateno
trigger2 = helper(1560), time < 1
trigger2 = fvar(0) := 1
value = , NA, SA, NP, SP
time = 3
ignorehitpause = 1

[State 1500, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger1 = fvar(0)
trigger2 = numhelper(1510)
trigger2 = helper(1510), prevstateno
trigger2 = helper(1510), time < 1
trigger2 = fvar(0) := 1
value = 6, 1
channel = 1

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

[State 1550, ChangeAnim]
type = ChangeAnim
trigger1 = var(0) = 0
trigger1 = animelem = 4, = 2
trigger2 = var(0) = 1
trigger2 = animelem = 4, = 3
value = 1550
elem = 5

[State 1550, NotHitBy]
type = NotHitBy
trigger1 = animelem = 6, < 1
trigger1 = !var(42)
value = , AP
time = 3
ignorehitpause = 1

[State 1550, NotHitBy]
type = NotHitBy
trigger1 = fvar(0)
trigger1 = !var(42)
value2 = , NP, SP
time = 1
ignorehitpause = 1

[State 1550, Screenbounder]
type = Helper
trigger1 = animelem = 5, = 1
trigger1 = !numhelper(1540)
name = "screenbounder"
id = 1540
stateno = 1040
persistent = 0

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

[State 1550, ReversalDef]
type = ReversalDef
triggerall = animelemno(0) = [5, 6]
trigger1 = !fvar(0)
trigger2 = time > 2
reversal.attr = SC, NA, SA, NP, SP
hitsound = -1
sparkno = S17006
pausetime = 0, 15
p1stateno = 1550
ignorehitpause = 0;1

[State 1550, VelMul]
type = VelMul
triggerall = animelemno(0) = 6
triggerall = !fvar(0) || time != [1, 8]
trigger1 = !numhelper(1560)
trigger2 = !helper(1560), prevstateno
trigger3 = helper(1560), time != [1, 8]
x = .85

[State 1550, VelSet]
type = VelSet
triggerall = animelemno(-1) = 6 || (animelem = 6 && fvar(0))
trigger1 = var(0) = 0
trigger1 = var(1) < 5
trigger2 = var(0) = 1
trigger2 = var(1) < 7
trigger3 = var(0) = 2
trigger3 = var(1) < 9
x = 7.5 + 1.25*(var(0)%3)

[State 1550, VarSet]
type = VarSet
trigger1 = 1
fvar(1) = 0

[State 1550, VarSet]
type = VarSet
trigger1 = numhelper(1560)
trigger1 = helper(1560), prevstateno
trigger1 = helper(1560), time < 9
trigger2 = fvar(0)
trigger2 = time < 9
fvar(1) = 1

[State 1550, ChangeState]
type = ChangeState
triggerall = animelemno(-1) = 6
triggerall = !fvar(1)
trigger1 = var(0) = 0
trigger1 = var(1) > 8
trigger2 = var(0) = 1
trigger2 = var(1) > 10
trigger3 = var(0) = 2
trigger3 = var(1) > 12
trigger4 = fvar(0) || var(1) > 2 + 2*var(0)
trigger4 = p2bodydist x < 16*const(size.xscale)
value = 1555

[State 1550, Helper]
type = Helper
trigger1 = !numhelper(1560)
name = "projblocker"
id = 1560
stateno = 1560
pausemovetime = 99999
supermovetime = 99999
ignorehitpause = 1

[State 1550, PosFreeze]
type = PosFreeze
trigger1 = numhelper(1560)
trigger1 = helper(1560), prevstateno
trigger1 = helper(1560), time = [1, 8]
trigger2 = fvar(0)
trigger2 = time = [1, 8]

[State 1550, VarAdd]
type = VarAdd
triggerall = animelemno(0) = 6
triggerall = !fvar(0) || time != [1, 8]
trigger1 = !numhelper(1560)
trigger2 = !helper(1560), prevstateno
trigger3 = helper(1560), time != [1, 8]
var(1) = 1

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

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

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

[State 1555, NotHitBy]
type = NotHitBy
triggerall = fvar(0)
triggerall = !var(42)
trigger1 = anim = 1555
trigger2 = anim = [420, 423]
trigger2 = animelem = 5, < 1
value = , NA, SA, NP, SP
ignorehitpausetime = 1

[State 1555, StateTypeSet]
type = StateTypeSet
triggerall = anim = 1555
trigger1 = animelem = 3
statetype = C

[State 1555, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1555
trigger1 = animtime = 0
value = 420 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
elem = 4

[State 1555, VarSet]
type = VarSet
trigger1 = !time
var(1) = 0

[State 1555, VarSet]
type = VarSet
trigger1 = movecontact
trigger1 = p2movetype = H
trigger2 = movereversed = 1
var(1) = 1

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

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

[State 1555, PlaySnd]
type = PlaySnd
triggerall = anim = [420, 423]
trigger1 = animelem = 4
value = 1000, 1
channel = 0

[State 1555, PlaySnd]
type = PlaySnd
triggerall = anim = [420, 423]
trigger1 = animelem = 4
value = 20, 5

[State 1555, 1]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -10, floor(-10.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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1555, 1b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
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 = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1555, 1c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1555, 2]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
triggerall = var(9) != [6, 8]
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor((-75 - 53.5*(animelemno(0) = 7))*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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1555, 2b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = !var(1)
triggerall = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
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 = -20, floor((-75 - 53.5*(animelemno(0) = 7))*const(size.yscale))
hitsound   = s5,2
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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1555, 2c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor((-75 - 53.5*(animelem = 7))*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1555, 1]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -10, floor(-10.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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1555, 1b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
trigger1 = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
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, SA
damage = ceil(fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2 + (var(9) = 6)
sparkxy = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
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, -13.75
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1555, 1c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 5
trigger1 = var(18) < 5
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, SA
damage = ceil((1+.3*p2movetype = A)*fvar(6)*120), ceil((1 + fvar(7)*5)*(fvar(6)*16))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -10, floor(-10.5*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

[State 1555, 2]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
triggerall = var(9) != [6, 8]
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -20, floor((-75 - 53.5*(animelemno(0) = 7))*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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536

[State 1555, 2b]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = !var(1)
triggerall = var(9) = 6 || var(9) = 8
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil(fvar(6)*96), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 14, 15
guard.pausetime = 13, 13
sparkno = 2 + (var(9) = 6)
sparkxy = -20, floor((-75 - 53.5*(animelemno(0) = 7))*const(size.yscale))
hitsound   = s5,2
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, -13.75 + 1.75*(animelemno(0) = 7)
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
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 1555, 2c]
type = HitDef
triggerall = anim = [420, 423]
triggerall = !var(22)
triggerall = var(9) = 7
triggerall = !var(1)
trigger1 = animelemno(0) = 6
trigger1 = var(18) < 6
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger1 = var(27) := 2
trigger2 = animelemno(0) = 7
trigger2 = var(18) < 7
trigger2 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
trigger2 = var(27) := 2
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA ;looks better against parries/reversals due to posture
damage = ceil((1+.3*p2movetype = A)*fvar(6)*112), ceil((1 + fvar(7)*5)*(fvar(6)*14))
animtype = Up
guardflag = MA
hitflag = MA
pausetime = 13, 16
guard.pausetime = 13, 13
sparkno = 2
sparkxy = -20, floor((-75 - 53.5*(animelem = 7))*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -0.83, -13.75
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, -12.5
fall = 1
fall.recover = 0
fall.yvelocity = -4
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1

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

[State 1555, StateTypeSet]
type = StateTypeSet
triggerall = anim = [420, 423]
trigger1 = animelem = 6
statetype = S

[State 1555, ChangeAnim]
type = ChangeAnim
trigger1 = anim = [420, 423]
trigger1 = animelem = 15
value = 1506

[State 1555, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
triggerall = anim = 1506
trigger1 = animelem = 4
value = 1

;[State 1555, PosAdd]
;type = PosAdd
;trigger1 = anim = 1506
;trigger1 = animelem = 1
;x = -8*const(size.xscale)
;persistent = 0

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = anim = [420, 423]
trigger2 = animelem = 8
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 1555, 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 Trail]
type = Null
trigger1 = anim != 1506
trigger1 = var(17) := 1580

[State Weapon Layer]
type = Null
trigger1 = anim = 1555
trigger1 = animelemno(0) != 2
trigger1 = var(11) := 0
trigger2 = anim = [420, 423]
trigger2 = (animelemno(0) = [2,3]) || animelemno(0) = [8, 14]
trigger2 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = anim = 1555
trigger1 = var(12) := 1
trigger2 = anim = [420, 423]
trigger2 = animelemno(0) < 5 || animelemno(0) > 14
trigger2 = var(12) := 1

[State Shield Layer]
type = VarSet
trigger1 = anim = [420, 423]
trigger1 = animelemno(0) < 5
var(12) = 2

; projblocker
[Statedef 1560]
type    = S
movetype= I
anim = 9999

[State 1560, DestroySelf]
type = DestroySelf
trigger1 = root, stateno != 1550
trigger2 = root, movetype != A
trigger3 = root, statetype != S

[State 1560, PosAdd]
type = PosAdd
trigger1 = 1
x = rootdist x
y = rootdist y

[State 1560, NotHitBy]
type = NotHitBy
trigger1 = prevstateno
trigger1 = time < 3
value = SCA
ignorehitpause = 1

[State 1560, HitBy]
type = HitBy
trigger1 = !prevstateno
trigger2 = time > 2
value = SCA, NP, SP
ignorehitpause = 1

[State 1560, HitOveridde]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 1560
ignorehitpause = 1

[State 1560, ChangeAnim]
type = ChangeAnim
trigger1 = root, animelemno(0) = 6
value = 1551

;---------------------------------------------------------------------------
; Weapon Special State Decider
[Statedef 1600]
type    = S
movetype= A
physics = S
ctrl = 0

[State 1600, ChangeState]
type = ChangeState
trigger1 = var(9) = [1, 5]
value = 1610

[State 1600, ChangeState]
type = ChangeState
trigger1 = var(9) = 6
value = 1650

[State 1600, ChangeState]
type = ChangeState
trigger1 = var(9) = 7
value = 1700

[State 1600, ChangeState]
type = ChangeState
trigger1 = var(9) = 8
value = 1750

[State 1600, ChangeState]
type = ChangeState
trigger1 = var(9) = 9
value = 1800

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

;---------------------------------------------------------------------------
; Ulysses Vault
[Statedef 1610]
type    = S
movetype= A
physics = S
poweradd= 70 + (var(0)%3)*10
ctrl = 0
velset = 0,0
anim = 1600 + 10*var(0)
sprpriority = (var(13) := 2) + 1

[State 1610, ChangeAnim]
type = ChangeAnim
trigger1 = !time
trigger1 = var(0) = 1
value = 1610 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))

[State 1610, VarSet]
type = VarSet
trigger1 = !time
var(1) = 0

[State 1610, VarSet]
type = VarSet
trigger1 = !time
fvar(0) = 0

[State 1610, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 0

[State 1610, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger1 = var(0) = 0
value = 200, 1
channel = 0

[State 1610, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger1 = var(0) = 2
value = 700, 0
channel = 0

[State 1610, NotHitBy]
type = NotHitBy
triggerall = !var(42)
trigger1 = var(0) = 0
trigger2 = var(0) = 2
trigger2 = animelem = 4
value = , NA, SA, NP, SP, NT, ST

[State 1610, ChangeState]
type = ChangeState
trigger1 = var(0) = 0
trigger1 = animelem = 3
value = 1620

[State 1610, ChangeState]
type = ChangeState
trigger1 = animelem = 5
value = 1620 + 5*var(0)

[Statedef 1620]
type    = A
movetype= A
physics = N
ctrl = 0
velset = -2,-8.3

[State 1620, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1600
trigger1 = animelem = 11
value = 650 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
elem = 4
persistent = 0

[State 1620, ChangeAnim]
type = ChangeAnim
trigger1 = anim = [650, 659]
trigger1 = animelem = 6
value = 1600
elem = 13
persistent = 0

[State 1620, VarSet]
type = VarSet
trigger1 = pos y + vel y > 25
var(1) = 1
persistent = 0

[State 1620, VarSet]
type = VarSet
trigger1 = p2movetype != A
fvar(0) = 1

[State 1620, VarSet]
type = VarSet
trigger1 = p2movetype != A
trigger1 = !inguarddist
fvar(1) = 1

[State 1620, NotHitBy]
type = NotHitBy
triggerall = anim = 1600
triggerall = animelemno(0) < 10
triggerall = !var(42)
trigger1 = !fvar(0)
trigger2 = time < 3
value = , NA, SA, NT, ST

[State 1620, NotHitBy]
type = NotHitBy
triggerall = anim = 1600
triggerall = animelemno(0) < 10
triggerall = !var(42)
trigger1 = !fvar(1)
trigger2 = time < 6
value2 = , NP, SP

[State 1620, VelAdd]
type = VelAdd
trigger1 = !var(1)
y = 0.536

[State 1620, PlaySnd]
type = PlaySnd
triggerall = !var(1)
trigger1 = animelem = 10
value = 20, 4

[State 1620, 1]
type = HitDef
triggerall = anim = [650, 659]
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)
attr = A, SA
damage = ceil(fvar(6)*88), ceil((1 + fvar(7)*5)*(fvar(6)*8))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 9, 9
sparkno = s17001
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(-40.5*const(size.yscale))
hitsound   = s5,5
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5
ground.hittime  = 20
ground.slidetime  = 20
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

[State 1620, 2]
type = HitDef
triggerall = anim = [650, 659]
triggerall = var(22)
trigger1 = animelemno(0) = 5
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 = A, SA
damage = ceil(fvar(6)*88), ceil((1 + fvar(7)*5)*(fvar(6)*8))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 9, 9
sparkno = s17001
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -20, floor(-136.5*const(size.yscale))
hitsound   = s5,5
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5
ground.hittime  = 20
ground.slidetime  = 20
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

[State 1620, 1]
type = HitDef
triggerall = anim = [650, 659]
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)
attr = A, SA
damage = ceil(fvar(6)*88), ceil((1 + fvar(7)*5)*(fvar(6)*8))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 9, 9
sparkno = 1
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-40.5*const(size.yscale))
hitsound   = s5,5
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5
ground.hittime  = 20
ground.slidetime  = 20
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

[State 1620, 2]
type = HitDef
triggerall = anim = [650, 659]
triggerall = !var(22)
trigger1 = animelemno(0) = 5
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 = A, SA
damage = ceil(fvar(6)*88), ceil((1 + fvar(7)*5)*(fvar(6)*8))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 9, 9
sparkno = 1
sparkxy = -20, floor(-136.5*const(size.yscale))
hitsound   = s5,5
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = High
ground.velocity = -5
ground.hittime  = 20
ground.slidetime  = 20
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

[State 1620, StateTypeSet]
type = StateTypeSet
trigger1 = var(1)
statetype = C
physics = C
persistent = 0

[State 1620, VelSet]
type = VelSet
trigger1 = var(1)
x = 0
y = 0

[State 1621, PosSet]
type = PosSet
trigger1 = var(1)
y = 0
persistent = 0

[State 1621, MoveHitReset]
type = MoveHitReset
trigger1 = var(1)
persistent = 0

[State 1621, ChangeAnim]
type = ChangeAnim
trigger1 = var(1)
value = 450 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
elem = 4
persistent = 0

[State 1621 ChangeAnim]
type = ChangeAnim
triggerall = var(1)
trigger1 = animelem = 5, = 2
value = anim
elem = animelemno(0) + 1

[State 1621, Landing Sound]
type = PlaySnd
trigger1 = var(1)
value = 52, 0
persistent = 0

[State 1621, PlaySnd]
type = PlaySnd
trigger1 = var(1)
value = 200, 0
persistent = 0

[State 1621, PlaySnd]
type = PlaySnd
triggerall = var(1)
trigger1 = animelem = 4
value = 20, 4

[State 1621, 1]
type = HitDef
triggerall = var(1)
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)
attr = C, SA
damage = ceil(fvar(6)*ifelse(hitcount, 48, 96)), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(hitcount, 4, 8)))
animtype = Medium
guardflag = LA
hitflag = MA
pausetime = 12, 13
guard.pausetime = 11, 11
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(-3*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
ground.velocity = 0, -7.5
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = 0
guard.velocity = -10
guard.hittime = 19
guard.cornerpush.veloff = -13
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 1621, 1]
type = HitDef
triggerall = var(1)
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)
attr = C, SA
damage = ceil(fvar(6)*ifelse(hitcount, 48, 96)), ceil((1 + fvar(7)*5)*(fvar(6)*ifelse(hitcount, 4, 8)))
animtype = Medium
guardflag = LA
hitflag = MA
pausetime = 12, 13
guard.pausetime = 11, 11
sparkno = 1
sparkxy = ifelse(p2bodydist x < 40, ifelse(p2bodydist x < 0, -60, ceil(p2bodydist x - 60)), -20), floor(-3*const(size.yscale))
hitsound   = s5,7
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
ground.velocity = 0, -7.5
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = 0
guard.velocity = -10
guard.hittime = 19
guard.cornerpush.veloff = -13
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 1621, CtrlSet]
type = CtrlSet
triggerall = var(1)
triggerall = roundstate < 3
trigger1 = animelem = 10
value = 1

[State Idle Anim]
type = StateTypeSet
triggerall = var(1)
trigger1 = ctrl
trigger2 = animelem = 6
movetype = I

[State Idle Anim Cancel]
type = ChangeState
triggerall = var(1)
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, 12, 20))
ctrl = 1

[State 1621, 5]
type = ChangeState
triggerall = var(1)
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 11
ctrl = 1

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

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

[State Weapon Layer]
type = Null
trigger1 = anim = 1600
trigger1 = animelemno(0) > 11
trigger1 = var(11) := 0
trigger2 = anim = [650, 659]
trigger2 = animelemno(0) = [5, 9]
trigger2 = var(11) := 0

[State Shield Layer]
type = Null
trigger1 = anim = 1600
trigger1 = animelemno(0) = 7 || animelemno(0) > 8
trigger1 = var(12) := 1
trigger2 = anim = [650, 659]
trigger2 = var(12) := 1

[State Weapon Layer]
type = Null
triggerall = var(1)
trigger1 = (animelemno(0) = [2,5]) || animelemno(0) = [7, 8]
trigger1 = var(11) := 0

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

[State Shield Layer]
type = VarSet
triggerall = var(1)
trigger1 = animelemno(0) = [7, 9]
var(12) = 2

[Statedef 1625]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 4.17, -10.7

[State 1625, PosSet]
type = PosSet
trigger1 = !time
y = 25

[State 1625, VarSet]
type = VarSet
trigger1 = animelem = 9
var(1) = 1
persistent = 0

[State 1625, VelAdd]
type = VelAdd
trigger1 = !var(1)
y = 1.0714

[State 1625, PlaySnd]
type = PlaySnd
trigger1 = !var(1)
trigger1 = animelem = 6
value = 20, 5
persistent = 0

[State 1625, 1]
type = HitDef
triggerall = var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = A, SA
damage = ceil(fvar(6)*104), ceil((1 + fvar(7)*5)*(fvar(6)*8))
animtype = Heavy
guardflag = HA
hitflag = MA
pausetime = 11, 11
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(-65*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -7.5
ground.hittime  = 20
ground.slidetime  = 20
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

[State 1625, 1]
type = HitDef
triggerall = !var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*500) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = A, SA
damage = ceil(fvar(6)*104), ceil((1 + fvar(7)*5)*(fvar(6)*8))
animtype = Heavy
guardflag = HA
hitflag = MA
pausetime = 11, 11
sparkno = 2
sparkxy = ifelse(p2bodydist x < 20, ifelse(p2bodydist x < 0, -40, ceil(p2bodydist x - 40)), -20), floor(-65*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = -7.5
ground.hittime  = 20
ground.slidetime  = 20
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

[State 1625, StateTypeSet]
type = StateTypeSet
trigger1 = var(1)
statetype = S
physics = S
persistent = 0

[State 1625, VelSet]
type = VelSet
trigger1 = var(1)
x = 0
y = 0
persistent = 0

[State 1625, PosSet]
type = PosSet
trigger1 = var(1)
y = 0
persistent = 0

[State 1625, Landing Sound]
type = PlaySnd
trigger1 = var(1)
value = 52, 0
persistent = 0

[State 1625, CtrlSet]
type = CtrlSet
triggerall = var(1)
triggerall = roundstate < 3
trigger1 = animelem = 12
value = 1

[State Idle Anim]
type = StateTypeSet
triggerall = var(1)
trigger1 = ctrl
trigger2 = animelem = 8
movetype = I

[State Idle Anim Cancel]
type = ChangeState
triggerall = var(1)
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 1625, 5]
type = ChangeState
triggerall = var(1)
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) = 500
ignorehitpause = 1

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

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

[Statedef 1630]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0,-12

[State 1630, NotHitBy]
type = NotHitBy
trigger1 = !time
trigger1 = !var(42)
Value = , NA, SA, NP, SP, NT, ST
time = 4

[State 1630, NotHitBy]
type = NotHitBy
trigger1 = !time
trigger1 = !var(42)
Value2 = , NP, SP
time = 10

[State 1630, VelSet]
type = VelSet
trigger1 = time
x = 7.5
persistent = 0

[State 1630, VarSet]
type = VarSet
trigger1 = pos y + vel y > 20
var(1) = 1
persistent = 0

[State 1630, VelAdd]
type = VelAdd
trigger1 = !var(1)
y = 1.0714

[State 1630, PlaySnd]
type = PlaySnd
trigger1 = !var(1)
trigger1 = animelem = 11, = 2
value = 20, 5
persistent = 0

[State 1630 ChangeAnim]
type = ChangeAnim
trigger1 = var(1)
value = 1120 + ifelse(var(9) = 1 || var(9) = 9, 1, ifelse((var(9) = [3,4]), 2, ifelse(var(9) = 5, 3, 0)))
persistent = 0
elem = 12

[State 1630, Width]
type = Width
trigger1 = var(1)
trigger1 = animelemno(0) = [13, 17]
player = floor(16*const(size.xscale) + const(size.ground.front)*(const(size.xscale) - 1)), floor(const(size.ground.back)*(const(size.xscale) - 1))

[State 1630, StateTypeSet]
type = StateTypeSet
trigger1 = var(1)
statetype = A
physics = S
persistent = 0

[State 1630, StateTypeSet]
type = StateTypeSet
trigger1 = var(1)
trigger1 = animelem = 13
statetype = S
physics = S
persistent = 0

[State 1630, VelSet]
type = VelSet
trigger1 = var(1)
x = 0
y = 0
persistent = 0

[State 1630, PosSet]
type = PosSet
trigger1 = var(1)
y = 0
persistent = 0

[State 1630, Landing Sound]
type = PlaySnd
trigger1 = var(1)
value = 5100, 0
persistent = 0

[State 1630, 7]
type = GameMakeAnim
trigger1 = var(1)
value = 61
under = 1
pos = floor(48*const(size.xscale)), floor(4*const(size.yscale))
persistent = 0

[State 1630, PosAdd]
type = PosAdd
triggerall = var(1)
trigger1 = animelem = 21
trigger2 = animelem = 22
x = -32*const(size.xscale)

[State 1630, PosAdd]
type = PosAdd
triggerall = var(1)
trigger1 = animelem = 23
x = -16*const(size.xscale)

[State 1630, EnvShake]
type = EnvShake
trigger1 = var(1)
time = 5
freq = 60
ampl = 3
phase = 270
persistent = 0

[State 1630, 2]
type = HitDef
triggerall = var(1)
triggerall = var(22)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 13
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*700) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil(fvar(6)*144), ceil((1 + fvar(7)*5)*(fvar(6)*24))
animtype = Back
guardflag = HA
hitflag = MA
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(-30*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 = Trip
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, 12.5
air.type = Trip
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 1630, 2]
type = HitDef
triggerall = var(1)
triggerall = !var(22)
trigger1 = var(9) != [6, 8]
trigger1 = animelemno(0) = 13
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*700) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil(fvar(6)*144), ceil((1 + fvar(7)*5)*(fvar(6)*24))
animtype = Back
guardflag = HA
hitflag = MA
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(-30*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 = Trip
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, 12.5
air.type = Trip
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0

[State 1630, CtrlSet]
type = CtrlSet
triggerall = var(1)
triggerall = roundstate < 3
trigger1 = animelem = 24
value = 1

[State Idle Anim]
type = StateTypeSet
triggerall = var(1)
trigger1 = ctrl
trigger2 = animelem = 14
movetype = I

[State Idle Anim Cancel]
type = ChangeState
triggerall = var(1)
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 1630, 5]
type = ChangeState
triggerall = var(1)
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) = 800
ignorehitpause = 1

[State Weapon Layer]
type = Null
trigger1 = var(1)
trigger1 = animelemno(0) = 21 || (animelemno(0) = [8, 9]) || animelemno(0) = [12, 19]
trigger1 = var(11) := 0
trigger2 = !var(1)
trigger2 = var(11) := 0

[State Shield Layer]
type = Null
triggerall = var(1)
trigger1 = (animelemno(0) = [3, 10]) || animelemno(0) = [21, 23]
trigger1 = var(12) := 1

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

;---------------------------------------------------------------------------
; Hades Scorcher
[Statedef 1650]
type    = S
movetype= A
physics = S
poweradd= 70 + (var(0)%3)*10
ctrl = 0
velset = 0,0
anim = 1650 + var(0)
sprpriority = (var(13) := 1)

[State 1650, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 180, 0
channel = 0

[State 1650, Explod]
type = Explod
trigger1 = animelem = 7
postype = p1
anim = 1660 + var(0)*2 + (var(23) != 0)
bindtime = -1
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = const(size.xscale), const(size.yscale)

[State 1650, Helper]
type = Helper
trigger1 = animelem = 10
name = "scorcher"
id = 1660
stateno = 1660
pos = floor(100*const(size.xscale)), 0
ownpal = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = animelem = 10
statetype = C

[State 1650, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 18
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 11
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, 12, 20))
ctrl = 1

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

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

[State Shield Layer]
type = Null
trigger1 = animelemno(0) = [10, 13]
trigger1 = var(12) := -1
trigger2 = animelemno(0) > 16
trigger2 = var(12) := 1

; wave appear
[Statedef 1660]
type    = C
movetype= A
anim = 9999

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

[State 1660, VarSet]
type = VarSet
trigger1 = !time
var(0) = parent, var(0)

[State 1660, PosAdd]
type = PosAdd
trigger1 = !time
y = 2*const(size.yscale)

[State 1660, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 1660, 0

[State 1660, 5]
type = ChangeState
trigger1 = time = 2 + var(0)
value = 1661

; wave attack
[Statedef 1661]
type    = C
movetype= A
sprpriority = 3

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

[State 1661, DestroySelf]
type = DestroySelf
triggerall = !animtime
trigger1 = var(2)
trigger2 = var(1) = var(0)

[State 1661, ChangeAnim]
type = ChangeAnim
trigger1 = !time
trigger1 = anim = 9999
value = 1670 + root, var(0)*2 + (root, var(23) != 0)

[State 1661, NotHitBy]
type = NotHitBy
trigger1 = var(2)
value = SCA
ignorehitpause = 1

[State 1661, HitBy]
type = HitBy
trigger1 = !var(2)
value = SCA, AP
ignorehitpause = 1

[State 1661, HitOveridde]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 1661
ignorehitpause = 1

[State 1661, VarSet]
type = VarSet
trigger1 = var(2) = 1
var(2) = 2

[State 1661, VarSet]
type = VarSet
triggerall = !var(2)
trigger1 = (anim != [1676, 1677]) && animelem = 5
trigger1 = !root, numprojid(1675)
trigger2 = !time
trigger2 = prevstateno != 1660
trigger3 = root, projcanceltime(1675) = 1
trigger4 = movereversed = 1
var(2) = 1

[State 1661, PosAdd]
type = PosAdd
trigger1 = !var(2)
trigger1 = !animtime
trigger1 = var(1) := var(1) + 1
x = 80*const(size.xscale)

[State 1661, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = root, fvar(13)

[State 1661, 1]
type = HitDef
trigger1 = !var(2)
trigger1 = anim != [1676, 1677]
trigger1 = animelem = 2
id = 1675
attr = C, SP
numhits = 0
damage = 112/(var(3) + 1), 16
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 0, 9
sparkno = -1
guard.sparkno = -1
hitsound   = s5,2
guardsound = s6,0
ground.type = Low
ground.velocity = -12.5
ground.hittime  = 16
ground.slidetime  = 16
guard.hittime = 15
ground.cornerpush.veloff = 0
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
palfx.time = 26
palfx.color = 0
palfx.mul = 256, 64, 0
palfx.sinadd = -64, -64, 0, 20
airguard.velocity = -3, -6.43
yaccel = .536

[State 1661, 2]
type = Projectile
trigger1 = !var(2)
trigger1 = anim != [1676, 1677]
trigger1 = animelem = 2
projanim = 1678
projid = 1675
projhits = 2
projmisstime = 18
projremovetime = 18
projedgebound = 320
projstagebound = 320
projheightbound = -480, 240
projremove = 0
id = 1675
attr = C, SP
damage = 0,0
getpower = 0
givepower = 0
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 0, 9
sparkno = -1
guard.sparkno = -1
hitsound   = -1
guardsound = -1
ground.type = Low
ground.velocity = -12.5
ground.hittime  = 16
ground.slidetime  = 16
guard.hittime = 15
air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
palfx.time = 26
palfx.color = 0
palfx.mul = 256, 64, 0
palfx.sinadd = -64, -64, 0, 20
airguard.velocity = -3, -6.43
yaccel = .536

[State 1661, PlaySnd]
type = PlaySnd
trigger1 = anim != [1676, 1677]
trigger1 = animelem = 2
value = 4100, 0
channel = 1

[State 1661, Explod]
type = Explod
triggerall = root, var(22)
triggerall = animelemno(-1) = 2
trigger1 = movehit = 1 || movereversed = 1
trigger2 = !time
trigger2 = prevstateno != 1660
trigger3 = var(2) = 1
postype = p1
anim = 17004
facing = -1
bindtime = 1
pos = floor(27*const(size.xscale)), floor(-46*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = root, var(22)
triggerall = animelemno(-1) = 3
trigger1 = movehit = 1 || movereversed = 1
trigger2 = !time
trigger2 = prevstateno != 1660
trigger3 = var(2) = 1
postype = p1
anim = 17004
facing = -1
bindtime = 1
pos = floor(71*const(size.xscale)), floor(-53*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = root, var(22)
triggerall = animelemno(-1) = 4
trigger1 = movehit = 1 || movereversed = 1
trigger2 = !time
trigger2 = prevstateno != 1660
trigger3 = var(2) = 1
postype = p1
anim = 17004
facing = -1
bindtime = 1
pos = floor(95*const(size.xscale)), floor(-19*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = root, var(22)
triggerall = animelemno(-1) = 2
trigger1 = moveguarded = 1
postype = p1
anim = 17006
facing = -1
bindtime = 1
pos = floor(27*const(size.xscale)), floor(-46*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = root, var(22)
triggerall = animelemno(-1) = 3
trigger1 = moveguarded = 1
postype = p1
anim = 17006
facing = -1
bindtime = 1
pos = floor(71*const(size.xscale)), floor(-53*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = root, var(22)
triggerall = animelemno(-1) = 4
trigger1 = moveguarded = 1
postype = p1
anim = 17006
facing = -1
bindtime = 1
pos = floor(95*const(size.xscale)), floor(-19*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = !root, var(22)
triggerall = animelemno(-1) = 2
trigger1 = movehit = 1 || movereversed = 1
trigger2 = !time
trigger2 = prevstateno != 1660
trigger3 = var(2) = 1
postype = p1
anim = F3
facing = -1
bindtime = 1
pos = floor(27*const(size.xscale)), floor(-46*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = !root, var(22)
triggerall = animelemno(-1) = 3
trigger1 = movehit = 1 || movereversed = 1
trigger2 = !time
trigger2 = prevstateno != 1660
trigger3 = var(2) = 1
postype = p1
anim = F3
facing = -1
bindtime = 1
pos = floor(71*const(size.xscale)), floor(-53*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = !root, var(22)
triggerall = animelemno(-1) = 4
trigger1 = movehit = 1 || movereversed = 1
trigger2 = !time
trigger2 = prevstateno != 1660
trigger3 = var(2) = 1
postype = p1
anim = F3
facing = -1
bindtime = 1
pos = floor(95*const(size.xscale)), floor(-19*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = !root, var(22)
triggerall = animelemno(-1) = 2
trigger1 = moveguarded = 1
postype = p1
anim = F40
facing = -1
bindtime = 1
pos = floor(27*const(size.xscale)), floor(-46*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = !root, var(22)
triggerall = animelemno(-1) = 3
trigger1 = moveguarded = 1
postype = p1
anim = F40
facing = -1
bindtime = 1
pos = floor(71*const(size.xscale)), floor(-53*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, Explod]
type = Explod
triggerall = !root, var(22)
triggerall = animelemno(-1) = 4
trigger1 = moveguarded = 1
postype = p1
anim = F40
facing = -1
bindtime = 1
pos = floor(95*const(size.xscale)), floor(-19*const(size.yscale))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1

[State 1661, FX Sound]
type = PlaySnd
trigger1 = movehit = 1
trigger1 = numtarget(1675)
value = 5, 8
ignorehitpause = 1
channel = 3

[State 1661, Fire FX]
type = Explod
trigger1 = movehit = 1
trigger1 = numtarget(1675)
id = 7050
anim = 7050 + random%3
sprpriority = 2
postype = p2
bindtime = 45 
pos = 0, floor(enemynear, const(size.mid.pos.y))
random = floor((enemynear, const(size.ground.front)+enemynear, const(size.ground.back))*(hitcount != 0)*0.4), floor((enemynear, const(size.mid.pos.y)-enemynear, const(size.head.pos.y))*(hitcount != 0)*0.8)
ignorehitpause = 1

[State 1661, ParentVarAdd]
type = ParentVarAdd
triggerall = movehit = 1
trigger1 = numtarget(1675)
trigger1 = var(3) := var(3) + 1
trigger2 = var(2) = 1
trigger2 = p2movetype = H
trigger2 = enemynear, time < 1
trigger2 = var(3) := var(3) + 1
var(38) = 1

[State 1661, ParentVarAdd]
type = ParentVarAdd
triggerall = movehit = 1
trigger1 = numtarget(1675)
trigger2 = var(2) = 1
trigger2 = p2movetype = H
trigger2 = enemynear, time < 1
var(19) = 300

[State 1661, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 5
trigger1 = var(1) = var(0)
trigger1 = anim != [1676, 1677]
value = 1676 + (root, var(23) != 0)

;---------------------------------------------------------------------------
; Neptune Spike
[Statedef 1700]
type    = S
movetype= A
physics = S
poweradd= 70 + (var(0)%3)*10
ctrl = 0
velset = 0,0
anim = 1700 + 1*var(0)
sprpriority = (var(13) := 1)

[State 1700, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1

[State 1700, Helper]
type = Helper
trigger1 = animelem = 6
name = "frost"
id = 1710
stateno = 1710
pos = floor(122*const(size.xscale)), floor(-202*const(size.yscale))
ownpal = 1

[State 1700, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 13
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 9
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 1700, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

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

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

; frost up
[Statedef 1710]
type    = A
movetype= A
anim = 1720 + 2*root, var(0) + (root, var(23) != 0)
sprpriority = 3
velset = 0,0 ;0.25*(root, var(0)), -4.33*(root, var(0))

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

[State 1710, VarSet]
type = VarSet
trigger1 = !time
var(0) = parent, var(0)

[State 1710, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 1710, 0

[State Interupted]
type = VarSet
triggerall = root, movetype = H
trigger1 = root, stateno != [161, 162]
trigger2 = root, anim != 161
trigger2 = root, statetype != S
var(1) = 1
ignorehitpause = 1

[State 1710, 2] ;For combo count
type = Projectile
triggerall = root, var(22)
trigger1 = time = 5
projid = 1710
projanim = 1726
projremovetime = ifelse(var(0) = 0, 10, ifelse(var(0) = 1, 16, 18))
projedgebound = 320
projstagebound = 320
projheightbound = -480, 240
projpriority = 9999
velocity = vel x + 2.4*const(size.xscale)/(1 + 0.2*var(0)), vel y - 3.237*const(size.yscale)/(1 + 0.2*var(0))
accel = 0.3*(var(0) - 0.1)*const(size.xscale), -0.405*(var(0) - 0.1)*const(size.yscale)
supermovetime = 99999
offset = -36*const(size.xscale), 50*const(size.yscale)
id = 1710
attr = S, SP
damage = ceil(root, fvar(6)*48), ceil((1 + root, fvar(7)*5)*(root, fvar(6)*4))
animtype = Light
guardflag = MA
hitflag = A
pausetime = 0, 10
guard.pausetime = 5, 5
sparkno = s17000
guard.sparkno = s17006
hitsound   = s5,4
guardsound = s6,0
ground.type = High
ground.velocity = -5
ground.hittime  = 11
ground.slidetime  = 11
guard.hittime = 10
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1
p2stateno = 5706
ignorehitpause = 1

[State 1710, 2] ;For combo count
type = Projectile
triggerall = !root, var(22)
trigger1 = time = 5
projid = 1710
projanim = 1726
projremovetime = ifelse(var(0) = 0, 10, ifelse(var(0) = 1, 16, 18))
projedgebound = 320
projstagebound = 320
projheightbound = -480, 240
projpriority = 9999
velocity = vel x + 2.4*const(size.xscale)/(1 + 0.2*var(0)), vel y - 3.237*const(size.yscale)/(1 + 0.2*var(0))
accel = 0.3*(var(0) - 0.1)*const(size.xscale), -0.405*(var(0) - 0.1)*const(size.yscale)
supermovetime = 99999
offset = -36*const(size.xscale), 50*const(size.yscale)
id = 1710
attr = S, SP
damage = ceil(root, fvar(6)*48), ceil((1 + root, fvar(7)*5)*(root, fvar(6)*4))
animtype = Light
guardflag = MA
hitflag = A
pausetime = 0, 10
guard.pausetime = 5, 5
sparkno = 0
guard.sparkno = s17006
hitsound   = s5,4
guardsound = s6,0
ground.type = High
ground.velocity = -5
ground.hittime  = 11
ground.slidetime  = 11
guard.hittime = 10
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1
p2stateno = 5706
ignorehitpause = 1

[State 1710, FX Sound]
type = PlaySnd
trigger1 = root, numtarget(1710)
trigger1 = root, projhittime(0) = [0, 1]
trigger1 = enemynear, stateno = [5706, 5708]
trigger1 = enemynear, time = 0
trigger1 = !enemynear, gethitvar(guarded)
value = 5, 9
ignorehitpause = 1
persistent = 0

[State 1710, Ice FX]
type = Helper
trigger1 = root, numtarget(1710)
trigger1 = root, projhittime(0) = [0, 1]
trigger1 = enemynear, stateno = [5706, 5708]
trigger1 = enemynear, time = 0
trigger1 = !enemynear, gethitvar(guarded)
name = "ice"
id = 7060
stateno = 7060
postype = left
pos = floor(enemynear, pos x - enemynear, facing*10), floor(enemynear, pos y + enemynear, const(size.mid.pos.y))
facing = enemynear, facing
ownpal = 1
random = floor((enemynear, const(size.ground.front)+enemynear, const(size.ground.back))*0.2), floor((enemynear, const(size.mid.pos.y)-enemynear, const(size.head.pos.y))*(movehit != 0)*0.2)
ignorehitpause = 1
persistent = 0

[State 1710, VelAdd]
type = VelAdd
trigger1 = var(0)
x = 0.3*(var(0) - 0.1)*const(size.xscale)
y = -0.405*(var(0) - 0.1)*const(size.yscale)

[State 1710, DestroySelf]
type = DestroySelf
trigger1 = var(3)

[State 1710, VarSet]
type = VarSet
triggerall = time > 5
triggerall = animtime
trigger1 = !root, numprojid(1710)
trigger1 = var(1) := 1
var(3) = 1
ignorehitpause = 1

[State 1710, ChangeState]
type = ChangeState
trigger1 = !animtime
trigger1 = !var(1)
value = 1720

[State 1710, DestroySelf]
type = DestroySelf
trigger1 = !animtime

; spike down
[Statedef 1720]
type    = A
movetype= A
anim = 1730
sprpriority = 3
velset = 0,0
movehitpersist = 1

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

[State 1720, PosSet]
type = PosSet
trigger1 = !var(2)
trigger1 = pos x != floor(pos x)
x = floor(pos x)

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

[State 1720, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 1720
time = -1
ignorehitpause = 1

[State 1720, ChangeState]
type = ChangeState
triggerall = movehit = 1
triggerall = numtarget || p2movetype = H
trigger1 = numtarget != 1
trigger2 = numtarget = 1
trigger2 = !target, ishelper
value = 1730
ignorehitpause = 1

[State 1720, ChangeState]
type = ChangeState
trigger1 = movecontact = 1
trigger2 = movereversed = 1
trigger3 = prevstateno != 1710
value = 1731
ignorehitpause = 1

[State Interupted]
type = ChangeState
triggerall = root, movetype = H
trigger1 = root, stateno != [161, 162]
trigger2 = root, anim != 161
trigger2 = root, statetype != S
value = 1731
ignorehitpause = 1

[State 1720, PlaySnd]
type = PlaySnd
trigger1 = !var(2)
value = 1720, 0

[State 1720, VelAdd]
type = VelAdd
trigger1 = var(2) > 12 + 3*var(0)
y = 1.0714

[State 1720, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = root, fvar(13)

[State 1720, 1]
type = HitDef
trigger1 = var(2) > 21 + 3*var(0)
id = 1720
attr = A, SP
damage = ceil(96.0 + 16*var(0)), ceil(8 + 2*var(0))
getpower = 0
numhits = 1
animtype = Medium
guardflag = HA
hitflag = MAF
pausetime = 0, 22
guard.pausetime = 0, 11
sparkno = -1
guard.sparkno = -1
hitsound   = s5,7
guardsound = s6,0
ground.type = Low
ground.velocity = -7.5
ground.hittime  = 16
ground.slidetime  = 16
ground.cornerpush.veloff = 0
guard.hittime = 15
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1
ignorehitpause = 1

[State 1720, 2] ;For combo count
type = Projectile
trigger1 = var(2) > 21 + 3*var(0)
trigger1 = !movecontact
projid = 1720
projanim = 1740
projremovetime = 1
projedgebound = 320
projstagebound = 320
projheightbound = -480, 240
projpriority = 9999
supermovetime = 99999
offset = floor(pos x + vel x - floor(pos x)), floor(pos y + vel y - floor(pos y))
id = 1720
attr = A, SP
getpower = 0
numhits = 0
animtype = Medium
guardflag = HA
hitflag = MAF
pausetime = 0, 22
guard.pausetime = 0, 11
sparkno = -1
guard.sparkno = -1
hitsound   = -1
guardsound = -1
ground.type = Low
ground.velocity = -7.5
ground.hittime  = 16
ground.slidetime  = 16
ground.cornerpush.veloff = 0
guard.hittime = 15
;air.hittime = 999
airguard.ctrltime = 999
air.type = Low
air.velocity = -3, -6.43
air.fall = 1
airguard.velocity = -3, -6.43
yaccel = .536
palfx.add = 256, 256, 256
palfx.time = 1
ignorehitpause = 1

[State 1720, PosSet]
type = PosSet
trigger1 = pos y + vel y >= -64
y = -64

[State 1720, ChangeState]
type = ChangeState
trigger1 = pos y + vel y >= -64
value = 1731

[State 1720, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.071/(const(size.xscale)), 0.833/(const(size.yscale))
ignorehitpause = 1

[State 1720, VarAdd]
type = VarAdd
trigger1 = 1
var(2) = 1

; spike impact
[Statedef 1730]
type    = A
movetype= A
anim = 9999
sprpriority = 3
movehitpersist = 1

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

[State 1730, Explod]
type = Explod
trigger1 = root, var(22)
postype = p1
anim = ifelse(moveguarded, 17006, 17002)
bindtime = 1
pos = 0, 32
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 1730, Explod]
type = Explod
trigger1 = !root, var(22)
postype = p1
anim = Fifelse(moveguarded, 40, 1)
bindtime = 1
pos = 0, 32
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 1730, Ice TargetState]
type = TargetState
trigger1 = numtarget
trigger1 = numtarget > 1 || !target, gethitvar(guarded)
value = 5706
ignorehitpause = 1
persistent = 0

[State 1730, FX Sound]
type = PlaySnd
trigger1 = numtarget
trigger1 = target, stateno = [5706, 5708]
trigger1 = target, time = 0
trigger1 = !target, gethitvar(guarded)
value = 5, 9
ignorehitpause = 1
persistent = 0

[State 1730, Ice FX]
type = Helper
trigger1 = numtarget
trigger1 = target, stateno = [5706, 5708]
trigger1 = target, time = 0
trigger1 = !target, gethitvar(guarded)
name = "ice"
id = 7060
stateno = 7060
postype = left
pos = floor(target, pos x - target, facing*10), floor(target, pos y + target, const(size.mid.pos.y))
facing = target, facing
ownpal = 1
random = floor((target, const(size.ground.front)+target, const(size.ground.back))*0.2), floor((target, const(size.mid.pos.y)-target, const(size.head.pos.y))*(movehit != 0)*0.2)
ignorehitpause = 1
persistent = 0

[State 1730, ParentVarAdd]
type = ParentVarAdd
trigger1 = numtarget
trigger2 = p2movetype = H
trigger2 = enemynear, time < 1
var(38) = 1
ignorehitpause = 1
persistent = 0

[State 1730, ParentVarAdd]
type = ParentVarAdd
trigger1 = numtarget
trigger2 = p2movetype = H
trigger2 = enemynear, time < 1
var(19) = 400 + 200*var(0)
ignorehitpause = 1
persistent = 0

[State 1730, DestroySelf]
type = DestroySelf
trigger1 = time
ignorehitpause = 1

; spike shatter
[Statedef 1731]
type    = A
movetype= A
anim = 9999
sprpriority = 3
velset = 0,0
movehitpersist = 1

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

[State 1731, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0

[State 1731, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 7060, 0

[State 1731, Explod]
type = Explod
trigger1 = !time
anim = 7064 + random%3
id = 7064
pos = 0, 40
vel = 3, 4
sprpriority = 2

[State 1731, Explod]
type = Explod
trigger1 = !time
anim = 7064 + random%3
id = 7064
pos = 0, 40
bindtime = 1
vel = 4, -3
sprpriority = 2

[State 1731, Explod]
type = Explod
trigger1 = !time
anim = 7067 + random%3
id = 7064
pos = 0, 40
vel = -3, 4
sprpriority = 2

[State 1731, Explod]
type = Explod
trigger1 = !time
anim = 7067 + random%3
id = 7064
pos = 0, 40
bindtime = 1
vel = -4, -3
sprpriority = 2

[State 1731, Explod]
type = Explod
trigger1 = root, var(22)
trigger1 = moveguarded
postype = p1
anim = 17006
bindtime = 1
pos = 0, 40
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 1731, Explod]
type = Explod
trigger1 = !root, var(22)
trigger1 = moveguarded
postype = p1
anim = F40
bindtime = 1
pos = 0, 40
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 1731, DestroySelf]
type = DestroySelf
trigger1 = time

;---------------------------------------------------------------------------
; Mercury Stride
[Statedef 1750]
type    = S
movetype= A
physics = S
poweradd= 70 + (var(0)%3)*10
ctrl = 0
velset = 0,0
anim = 1750
sprpriority = (var(13) := -2) - 2

[State 1750, VarSet]
type = VarSet
trigger1 = !time
var(1) = 0

[State 1750, VarSet]
type = VarSet
trigger1 = !time
fvar(0) = 30

[State 1750, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = random%45

[State 1750, VarSet]
type = VarSet
triggerall = var(59) < 1
trigger1 = var(0) = 0 && command != "holdx"
trigger2 = var(0) = 1 && command != "holdy"
trigger3 = var(0) = 2 && command != "holdz"
var(1) = 1

[State 1750, VarSet]
type = VarSet
triggerall = var(59) > 0
triggerall = p2statetype != L
triggerall = p2stateno != [5120, 5205]
triggerall = enemynear, pos y + enemynear, vel y*(p2dist x/10) > -1 - 32*const(size.yscale)*(var(0) = 2)
trigger1 = fvar(0) > 134 + fvar(1)
trigger2 = random/fvar(10) < (100 - time*(enemynear, vel x*var(52)*facing*enemynear, facing - 0.5) - p2bodydist x*2)*(1 + var(53)*0.005)
trigger3 = p2dist x < 32
trigger3 = random/fvar(10) < 1000
var(1) = 1

[State 1750, VarSet]
type = VarSet
triggerall = var(59) > 0
trigger1 = inguarddist || (p2movetype = A && enemynear, animtime < -1 - p2dist x/15)
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < (50 + enemynear, time*3)*(1 + var(53)*0.005)
var(1) = 1

[State 1750, VarAdd]
type = VarAdd
trigger1 = !var(1)
trigger1 = animelem = 3, > 12
fvar(0) = 1

[State 1750, PlaySnd]
type = PlaySnd
trigger1 = !var(1)
trigger1 = fvar(0) < 180
trigger1 = floor(fvar(0))%45 = 0
trigger1 = animelem = 3, > 12
value = 5, 10
channel = 2

[State 1750, PlaySnd]
type = PlaySnd
trigger1 = var(1)
trigger1 = animelem = 3, > 12
trigger1 = fvar(0) < 45
value = 5, 10
channel = 2
persistent = 0

[State 1750, PalFX]
type = PalFX
trigger1 = var(1)
trigger1 = animelem = 3, = 13
invertall = 1
add = -64, -96, -160
sinadd = 64, 96, 128, 10
color = 0
time = 10

[State 1750, PalFX]
type = PalFX
triggerall = !var(1)
triggerall = fvar(0) < 180
triggerall = animelem = 3, > 12
trigger1 = floor(fvar(0))%45 = 0
trigger2 = fvar(0) = 100
trigger3 = fvar(0) = 145
trigger4 = fvar(0) = 155
trigger5 = fvar(0) = 165
trigger6 = fvar(0) = 175
invertall = 1
add = -64, -96, -160
sinadd = 64, 96, 128, 10
color = 0
time = 10 - 2*(fvar(0) = 100)

[State 1750, PalFX]
type = PalFX
trigger1 = var(1)
trigger1 = animelem = 3, > 12
trigger1 = fvar(0) < 45
invertall = 1
add = -64, -96, -160
sinadd = 64, 96, 128, 10
color = 0
time = 10
persistent = 0

[State 1750, Explod]
type = Explod
trigger1 = !var(1)
trigger1 = fvar(0) < 180
trigger1 = floor(fvar(0))%45 = 0
trigger1 = animelem = 3, > 12
trigger2 = var(1)
trigger2 = animelem = 3, = 13
postype = p1
anim = 1755 + (var(23) != 0)
bindtime = 1
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = const(size.xscale), const(size.yscale)
pos = floor(-22*const(size.xscale)), floor(-96*const(size.yscale))

[State 1750, Explod]
type = Explod
trigger1 = var(1)
trigger1 = animelem = 3, > 12
trigger1 = fvar(0) < 45
postype = p1
anim = 1755 + (var(23) != 0)
bindtime = 1
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = const(size.xscale), const(size.yscale)
pos = floor(-22*const(size.xscale)), floor(-96*const(size.yscale))
persistent = 0

[State 1750, ChangeAnim]
type = ChangeAnim
triggerall = var(1)
trigger1 = animelem = 2, > 2
trigger1 = animelem = 3, < 0
trigger2 = animelem = 3, > 4
trigger2 = animelem = 4, < 0
value = 1750
elem = animelemno(0) + 1

[State 1750, ChangeState]
type = ChangeState
trigger1 = var(1)
trigger1 = animelem = 4, > 6
trigger2 = fvar(0) > 179
value = 1760 + 10*var(0)

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

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

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

[State 1760, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1760
trigger1 = animelem = 2, = 1
trigger1 = p2dist x > 48
trigger1 = time < 60
trigger1 = frontedgebodydist > floor(const(size.ground.front)*const(size.xscale))
value = 1760
elem = 2

[State 1760, VelSet]
type = VelSet
trigger1 = anim = 1760
trigger1 = animelemno(0) = 2
x = 16

[State 1760, Explod]
type = Explod
trigger1 = animelemno(0) = 2
trigger1 = (time+2)%4 = 0
anim = F120
pos = floor(80*const(size.xscale)), 1
facing = -1

[State 1760, Explod]
type = Explod
trigger1 = animelemno(0) = 2
trigger1 = time%4 = 0
anim = F120
pos = floor(-20*const(size.xscale)), floor(15*const(size.yscale))
facing = -1
sprpriority = 1

[State 1760, PalFX]
type = PalFX
trigger1 = animtime
trigger1 = animelemno(0) < 3
trigger1 = time%10 = 0
invertall = 1
add = -64, -96, -160
sinadd = 64, 96, 128, 10
color = 0
time = 10

[State 1760, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 20, 5

[State 1760, PalFX]
type = PalFX
trigger1 = anim = 1760
trigger1 = animelem = 3
add = 0, 0, 0
time = 1

[State 1760, ChangeAnim]
type = ChangeAnim
triggerall = animelem = 4, < 1
trigger1 = fvar(0) > 134
trigger1 = animelem = 3, = 4
trigger2 = fvar(0) > 89
trigger2 = animelem = 3, = 6
trigger3 = fvar(0) > 44
trigger3 = animelem = 3, = 8
value = 1760
elem = 4

[State 1760, ChangeAnim]
type = ChangeAnim
triggerall = fvar(0) > 44
trigger1 = animelem = 7, = 2
trigger2 = animelem = 8, = 2
value = 1760
elem = animelemno(0) + 1

[State 1760, ChangeAnim]
type = ChangeAnim
triggerall = fvar(0) > 89
trigger1 = animelem = 5, = 3
trigger2 = animelem = 6, = 3
value = 1760
elem = animelemno(0) + 1

[State 1760, ChangeAnim]
type = ChangeAnim
trigger1 = fvar(0) > 134
trigger1 = animelem = 4, = 4
value = 1760
elem = 5

[State 1760, Turn]
type = Turn
trigger1 = anim = 1760
trigger1 = animelem = 7
trigger1 = p2dist x < 0

[State 1760, NotHitBy]
type = NotHitBy
trigger1 = animtime
trigger1 = animelemno(0) < 4
trigger1 = !var(42)
value = , NA, NP, SP, NT

[State 1760, NotHitBy]
type = NotHitBy
trigger1 = animtime
trigger1 = animelemno(0) < 4
trigger1 = fvar(0) > 89
trigger1 = !var(42)
value = , NA, SA, NP, SP, NT, ST

[State 1760, PlayerPush]
type = PlayerPush
trigger1 = anim = 1760
trigger1 = animelemno(0) < 9
value = 0

[State 1760, VelMul]
type = VelMul
trigger1 = anim = 1760
trigger1 = animelem = 3, > 3
trigger1 = time > 8
x = 0.80

[State 1760, Width]
type = Width
trigger1 = anim = 1760
trigger1 = animelemno(0) < 3
trigger1 = animtime
edge = floor(const(size.ground.front)*const(size.xscale)), 0

[State 1760, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 9
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 3
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 1760, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

[State Weapon Layer]
type = VarSet
trigger1 = animelemno(0) = 5
var(11) = 0

[State Shield Layer]
type = VarSet
trigger1 = animelemno(0) = [1, 3]
trigger2 = animelemno(0) = [5, 8]
var(12) = 2

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

[State 1770, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 1000, 0
channel = 0

[State 1770, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1770
trigger1 = animelem = 2, = 1
trigger1 = p2dist x > 48
trigger1 = time < 60
trigger1 = frontedgebodydist > floor(const(size.ground.front)*const(size.xscale))
value = 1770
elem = 2

[State 1770, VarSet]
type = VarSet
trigger1 = !time
trigger1 = fvar(0) > 135
fvar(0) = 135

[State 1770, VelSet]
type = VelSet
trigger1 = anim = 1770
trigger1 = animelemno(0) = 2
x = 16

[State 1770, Explod]
type = Explod
trigger1 = animelemno(0) = 2
trigger1 = (time+2)%4 = 0
anim = F120
pos = floor(80*const(size.xscale)), 1
facing = -1

[State 1770, Explod]
type = Explod
trigger1 = animelemno(0) = 2
trigger1 = time%4 = 0
anim = F120
pos = floor(-20*const(size.xscale)), floor(15*const(size.yscale))
facing = -1
sprpriority = 1

[State 1770, VelSet]
type = VelSet
trigger1 = anim = 1770
trigger1 = animelem = 3
x = 12

[State 1770, PalFX]
type = PalFX
trigger1 = animtime
trigger1 = animelemno(0) < 3
trigger1 = time%10 = 0
invertall = 1
add = -64, -96, -160
sinadd = 64, 96, 128, 10
color = 0
time = 10

[State 1770, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 20, 5

[State 1770, PalFX]
type = PalFX
trigger1 = anim = 1770
trigger1 = animelem = 3
add = 0, 0, 0
time = 1

[State 1770, NotHitBy]
type = NotHitBy
trigger1 = animtime
trigger1 = animelemno(0) < 4
trigger1 = !var(42)
value = , NA, NP, SP, NT

[State 1770, NotHitBy]
type = NotHitBy
trigger1 = animtime
trigger1 = animelemno(0) < 4
trigger1 = fvar(0) > 89
trigger1 = !var(42)
value = , NA, SA, NP, SP, NT, ST

[State 1770, PlayerPush]
type = PlayerPush
trigger1 = anim = 1770
trigger1 = animelemno(0) < 5
value = 0

[State 1770, VelMul]
type = VelMul
trigger1 = anim = 1770
trigger1 = animelem = 3, > 3
trigger1 = time > 8
x = 0.8

[State 1770, 1]
type = HitDef
triggerall = var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(400 + 1.5*fvar(0) + 100000*(fvar(0) = 135))) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, SA
damage = ceil(fvar(6)*(80 + 1.2*fvar(0))),  ceil((1 + fvar(7)*5)*(fvar(6)*(8 + 0.1*fvar(0))))
animtype = Back
guardflag = LA
hitflag = MA
pausetime = 2, 15
guard.pausetime = 9, 9
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -24, floor(-38*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
ground.velocity = 0, -7.5
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = 0
guard.velocity = -2.5
guard.hittime = 19
guard.cornerpush.veloff = 0
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
p2facing = -1
palfx.invertall = 1
palfx.time = 50
palfx.color = 0
palfx.add = -64, -96, -160
palfx.sinadd = 64, 96, 128, 10

[State 1770, 1]
type = HitDef
triggerall = !var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(400 + 1.5*fvar(0) + 100000*(fvar(0) = 135))) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = C, SA
damage = ceil(fvar(6)*(80 + 1.2*fvar(0))),  ceil((1 + fvar(7)*5)*(fvar(6)*(8 + 0.1*fvar(0))))
animtype = Back
guardflag = LA
hitflag = MA
pausetime = 2, 15
guard.pausetime = 9, 9
sparkno = 2
sparkxy = -24, floor(-38*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Trip
ground.velocity = 0, -7.5
ground.hittime  = 20
ground.slidetime  = 20
ground.cornerpush.veloff = 0
guard.velocity = -2.5
guard.hittime = 19
guard.cornerpush.veloff = 0
guard.kill = 0
;air.hittime = 999
airguard.ctrltime = 999
air.type = Trip
air.velocity = 0, -7.5
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
airguard.velocity = -3, -6.43
yaccel = .536
p2facing = -1
palfx.invertall = 1
palfx.time = 50
palfx.color = 0
palfx.add = -64, -96, -160
palfx.sinadd = 64, 96, 128, 10

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

[State 1770, ChangeAnim]
type = ChangeAnim
triggerall = animelem = 6, < 1
trigger1 = fvar(0) > 134
trigger1 = animelem = 5, = 8
trigger2 = fvar(0) > 89
trigger2 = animelem = 5, = 16
trigger3 = fvar(0) > 44
trigger3 = animelem = 5, = 20
value = 1770
elem = 6

[State 1770, ChangeAnim]
type = ChangeAnim
triggerall = fvar(0) > 134
trigger1 = animelem = 6, = 3
trigger2 = animelem = 7, = 3
value = 1770
elem = animelemno(0) + 1
[State 1770, VarSet]
type = VarSet
trigger1 = 1
var(0) = var(14)

[State 1770, Width]
type = Width
trigger1 = anim = 1780
trigger1 = animelemno(0) < 8
trigger1 = animtime
edge = floor(const(size.ground.front)*const(size.xscale)), 0

[State 1770, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 8
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = animelem = 3
statetype = C

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 4
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, 12, 20))
ctrl = 1

[State 1770, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 11
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) = [3, 5]
trigger1 = var(11) := 0

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

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

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

[State 1780, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 1000, 0
channel = 0

[State 1780, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1780
trigger1 = animelem = 2, = 1
trigger1 = p2dist x > 48
trigger1 = time < 60
trigger1 = frontedgebodydist > floor(const(size.ground.front)*const(size.xscale))
value = 1780
elem = 2

[State 1780, VarSet]
type = VarSet
trigger1 = !time
trigger1 = fvar(0) > 135
fvar(0) = 135

[State 1780, VelSet]
type = VelSet
trigger1 = anim = 1780
trigger1 = animelemno(0) = 2
x = 16

[State 1780, Explod]
type = Explod
trigger1 = animelemno(0) = 2
trigger1 = (time+2)%4 = 0
anim = F120
pos = floor(80*const(size.xscale)), 1
facing = -1

[State 1780, Explod]
type = Explod
trigger1 = animelemno(0) = 2
trigger1 = time%4 = 0
anim = F120
pos = floor(-20*const(size.xscale)), floor(15*const(size.yscale))
facing = -1
sprpriority = 1

[State 1780, VelSet]
type = VelSet
trigger1 = anim = 1780
trigger1 = animelem = 3
x = 12

[State 1780, PalFX]
type = PalFX
trigger1 = animtime
trigger1 = animelemno(0) < 3
trigger1 = time%10 = 0
invertall = 1
add = -64, -96, -160
sinadd = 64, 96, 128, 10
color = 0
time = 10

[State 1780, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 20, 5

[State 1780, PalFX]
type = PalFX
trigger1 = anim = 1780
trigger1 = animelem = 3
add = 0, 0, 0
time = 1

[State 1780, NotHitBy]
type = NotHitBy
trigger1 = animtime
trigger1 = animelemno(0) < 4
trigger1 = !var(42)
value = , NA, NP, SP, NT

[State 1780, NotHitBy]
type = NotHitBy
trigger1 = animtime
trigger1 = animelemno(0) < 4
trigger1 = fvar(0) > 89
trigger1 = !var(42)
value = , NA, SA, NP, SP, NT, ST

[State 1780, PlayerPush]
type = PlayerPush
trigger1 = anim = 1780
trigger1 = animelemno(0) < 5
value = 0

[State 1780, VelMul]
type = VelMul
trigger1 = anim = 1780
trigger1 = animelem = 3, > 3
trigger1 = time > 8
x = 0.85

[State 1780, 1]
type = HitDef
triggerall = var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(400 + 0.75*fvar(0) + 100000*(fvar(0) = 135))) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil(fvar(6)*(112 + 1.3*fvar(0))),  ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 0.15*fvar(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 2, 15
guard.pausetime = 9, 9
sparkno = s17002
guard.sparkno = s17006 + 2*(numenemy = 1 && var(8) - var(6) < 1)
sparkxy = -24, floor(-48*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = 0, 0
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 19
guard.velocity = -5
;air.hittime = 999
airguard.ctrltime = 999
air.velocity = -0, -7.5
air.fall = 1
;fall = 1
fall.recover = 0
fall.animtype = Heavy
airguard.velocity = -3, -6.43
yaccel = .536
forcestand = 1
p2facing = 1
palfx.invertall = 1
palfx.time = 50
palfx.color = 0
palfx.add = -64, -96, -160
palfx.sinadd = 64, 96, 128, 10

[State 1780, 1]
type = HitDef
triggerall = !var(22)
trigger1 = !movecontact && !movereversed
trigger1 = var(6) := floor(fvar(12)*fvar(8)*(400 + 1.5*fvar(0) + 100000*(fvar(0) = 135))) || 1
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil(fvar(6)*(112 + 1.3*fvar(0))),  ceil((1 + fvar(7)*5)*(fvar(6)*(16 + 0.15*fvar(0))))
animtype = Heavy
guardflag = MA
hitflag = MA
pausetime = 2, 15
guard.pausetime = 9, 9
sparkno = 2
sparkxy = -24, floor(-48*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0 + 2*(numenemy = 1 && var(8) - var(6) < 1)
ground.type = Low
ground.velocity = 0, 0
ground.hittime  = 20
ground.slidetime  = 20
guard.hittime = 19
guard.velocity = -5
;air.hittime = 999
airguard.ctrltime = 999
air.velocity = -0, -7.5
;fall = 1
;fall.recover = 0
;fall.animtype = Heavy
airguard.velocity = -3, -6.43
yaccel = .536
forcestand = 1
p2facing = 1
palfx.invertall = 1
palfx.time = 50
palfx.color = 0
palfx.add = -64, -96, -160
palfx.sinadd = 64, 96, 128, 10

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

[State 1780, TargetState]
type = TargetState
trigger1 = movehit = 1
trigger1 = numtarget(var(0))
value = 5800

[State 1780, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 3, = 4
trigger1 = !movecontact
value = 1780
elem = 4

[State 1780, ChangeAnim]
type = ChangeAnim
triggerall = animelem = 6, < 1
trigger1 = fvar(0) > 134
trigger1 = animelem = 5, = 10
trigger2 = fvar(0) > 89
trigger2 = animelem = 5, = 16
trigger3 = fvar(0) > 44
trigger3 = animelem = 5, = 20
value = 1780
elem = 6

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

[State 1780, Width]
type = Width
trigger1 = anim = 1780
trigger1 = animelemno(0) < 8
trigger1 = animtime
edge = floor(const(size.ground.front)*const(size.xscale)), 0

[State 1780, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 8
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 4
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 1780, 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) = 900
ignorehitpause = 1

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

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

;---------------------------------------------------------------------------
; Atlas Quake
[Statedef 1800]
type    = S
movetype= A
physics = S
poweradd= 70 + (var(0)%3)*10
ctrl = 0
velset = 0,0
anim = 1800 + 1*var(0)
sprpriority = (var(13) := 2) + 1

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

[State 1800, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 5
statetype = A
physics = N

[State 1800, VelSet]
type = VelSet
trigger1 = animelem = 5
trigger1 = var(0) = 0
x = 0.417
y = -7

[State 1800, VelSet]
type = VelSet
trigger1 = animelem = 5
trigger1 = var(0) = 1
x = 0.833
y = -8

[State 1800, VelSet]
type = VelSet
trigger1 = animelem = 5
trigger1 = var(0) = 2
x = 0.833
y = -9

[State 1800, VelAdd]
type = VelAdd
trigger1 = animelemno(0) = [5, 7]
y = 0.714

[State 1800, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 20, 5

[State 1800, VelSet]
type = VelSet
trigger1 = animelem = 8
x = 0
y = 0

[State 1800, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 8
statetype = S
physics = S

[State 1800, VelSet]
type = PosSet
trigger1 = animelem = 8
y = 0

[State 1800, 1]
type = Projectile
trigger1 = animelem = 8
projanim = 1810
projid = 1810
projremovetime = 1
projedgebound = 320
projstagebound = 320
projheightbound = -480, 240
projremove = 1
id = 1800
attr = S, ST
hitonce = 0
damage = ceil(fvar(6)*(96 + 16*var(0))), 0
animtype = Back
guardflag =
hitflag = H
pausetime = 0, 9 + var(0)
sparkno = -1
guard.sparkno = -1
hitsound   = -1
guardsound = -1
ground.type = Trip
ground.velocity = 0, -7.5 - 1.25*var(0)
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.type = Trip
air.velocity = 0, -7.5 - 1.25*var(0)
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
persistent = 0

[State 1800, Helper]
type = Helper
trigger1 = animelem = 8
name = "projblocker"
id = 1810
stateno = 1810
pausemovetime = 99999
supermovetime = 99999
ignorehitpause = 1

[State 1800, EnvShake]
type = EnvShake
trigger1 = animelem = 8
time = 10 + var(0)
freq = 60
ampl = 7 + 2*var(0)
phase = 270

[State 1800, Explod]
type = Explod
trigger1 = animelem = 8
postype = p1
anim = F62
bindtime = 1
facing = -1
pos = floor(56*const(size.xscale)), 0
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ownpal = 1

[State 1800, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
pan = floor(56*const(size.xscale))
value = 1800, 0

[State 1800, 1]
type = HitDef
triggerall = var(22)
triggerall = !movecontact && !movereversed
triggerall = animelemno(0) = 8
trigger1 = p2movetype = H
trigger1 = enemynear, pos y + enemynear, vel y >= 0
trigger1 = p2statetype = L
trigger2 = numtarget
trigger2 = target, pos y + target, vel y >= 0
trigger2 = target, statetype = L
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil(fvar(6)*(96 + 16*var(0))), 0
animtype = Back
guardflag = HA
hitflag = FD
pausetime = 0, 9 + var(0)
sparkno = -1
guard.sparkno = s17006
sparkxy = -20, floor(18*const(size.yscale))
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.velocity = 0
ground.hittime  = 11
ground.slidetime  = 11
guard.hittime = 10
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.velocity = 0, vel y
fall.recovery = 0
fall.yvelocity = 0
down.velocity = 0, 0
airguard.velocity = -3, -6.43
yaccel = .536

[State 1800, 1]
type = HitDef
triggerall = !var(22)
triggerall = !movecontact && !movereversed
triggerall = animelemno(0) = 8
trigger1 = p2movetype = H
trigger1 = enemynear, pos y + enemynear, vel y >= 0
trigger1 = p2statetype = L
trigger2 = numtarget
trigger2 = target, pos y + target, vel y >= 0
trigger2 = target, statetype = L
id = 0*(var(14) := stateno + (var(18)%1000)*10000 + id%10) + var(14)
attr = S, SA
damage = ceil(fvar(6)*(96 + 16*var(0))), 0
animtype = Back
guardflag = HA
hitflag = FD
pausetime = 0, 9 + var(0)
sparkno = -1
sparkxy = -20, floor(18*const(size.yscale))
hitsound   = s5,6
guardsound = s6,0
ground.type = High
ground.velocity = 0
ground.hittime  = 11
ground.slidetime  = 11
guard.hittime = 10
guard.kill = 0
air.hittime = 999
airguard.ctrltime = 999
air.velocity = 0, vel y
fall.recovery = 0
fall.yvelocity = 0
down.velocity = 0, 0
airguard.velocity = -3, -6.43
yaccel = .536

[State 1800, Explod]
type = Explod
triggerall = var(22)
trigger1 = movehit = 1
postype = p1
anim = 17002
bindtime = 1
postype = p2
pos = floor(56*const(size.xscale)), floor(ifelse(pos y + vel y  < -64*const(size.yscale), 64*const(size.yscale) - 12,-pos y - vel y - 12))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ignorehitpause = 1
ownpal = 1

[State 1800, Explod]
type = Explod
triggerall = !var(22)
trigger1 = movehit = 1
postype = p1
anim = F2
bindtime = 1
postype = p2
pos = floor(56*const(size.xscale)), floor(ifelse(pos y + vel y  < -64*const(size.yscale), 64*const(size.yscale) - 12,-pos y - vel y - 12))
sprpriority = 5
pausemovetime = 99999
supermovetime = 99999
ignorehitpause = 1
ownpal = 1

[State 1800, PlayerPush]
type = PlayerPush
triggerall = animelemno(0) = [5, 10]
trigger1 = p2movetype = H
trigger1 = p2statetype = L || p2statetype = A
value = 0

[State 1800, CtrlSet]
type = CtrlSet
triggerall = roundstate < 3
trigger1 = animelem = 14
value = 1

[State Idle Anim]
type = StateTypeSet
trigger1 = ctrl
trigger2 = animelem = 9
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 1800, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = ctrl
trigger2 = p2dist x < 0
value = 0
ctrl = 1

[State XP Add]
type = VarAdd
triggerall = projhittime(1810) = 1
trigger1 = numtarget(1800)
trigger1 = var(38) := var(38) + 1
trigger2 = var(2) = 1
trigger2 = p2movetype = H
trigger2 = enemynear, time < 1
trigger2 = var(38) := var(38) + 1
var(19) = 300 + 100*var(0)
ignorehitpause = 1

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

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

[Statedef 1810]
type    = S
movetype= I
anim = 1811

[State 1810, DestroySelf]
type = DestroySelf
trigger1 = time
trigger2 = prevstateno

[State 1810, 1]
type = HitDef
trigger1 = 1
attr = S, SP
damage = 0, 0
animtype = Back
guardflag =
hitflag = P
pausetime = 0, 0
sparkno = -1
guard.sparkno = -1
hitsound   = -1
guardsound = -1
ground.type = Trip
ground.velocity = 0, -7.5 - 1.25*var(0)
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.type = Trip
air.velocity = 0, -7.5 - 1.25*var(0)
airguard.velocity = -3, -6.43
yaccel = .536
fall = 1
fall.recover = 0
persistent = 0

[State 1810, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1

[State 1810, HitOveridde]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP, AT
stateno = 1810
ignorehitpause = 1
