;======================<SOUL PHOENIX>===================
[Statedef 3000]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3000
poweradd = ifelse(var(20) > 0, 0, -1000)
sprpriority = 2
facep2 = 1

[State 3000, VarSet: Soul Phoenix Hit Detect Reset]
type = VarSet
trigger1 = !Time
var(12) = 0
ignorehitpause = 1

[State 3000, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(5) < 0
time = 1
value = SCA

[State 3000, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3000, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 45

[State 3000, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3000, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3000, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3000, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3000, SuperPause FX]
type = Helper
trigger1 = Time = 3
helperType = Normal
stateNo = 8500
ID = 8500
name = "Superpause FX"
posType = P1
pos = -39,-88
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = Time = 3
time = 45
moveTime = 45
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8500,0
darken = 0
poweradd = 0

[State 3000, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 3000, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3000, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3000,0
channel = 0

[State 3000, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1000, 1
channel = 2

[State 3000, Width: Player]
type = Width
trigger1 = AnimElemTime(6) = 0
player = 15,0

[State 3000, Projectile]
type = Helper
trigger1 = AnimElem = 6
helperType = Normal
stateNo = 3010
ID = 3010
name = "Soul Phoenix"
posType = P1
pos = 10,-56
size.xScale = 0.625
size.yScale = 0.625
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3000, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;======================<AIR SOUL PHOENIX>===================
[Statedef 3020]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3020
poweradd = ifelse(var(20) > 0, 0, -1000)
sprpriority = 2
facep2 = PrevStateNo=100 && p2dist x<0

[State 3020, VarSet: Soul Phoenix Hit Detect Reset]
type = VarSet
trigger1 = !Time
var(12) = 0
ignorehitpause = 1

[State 3020, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(6) < 0
time = 1
value = SCA

[State 3020, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3020, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 48

[State 3020, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3020, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3020, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3020, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3020, SuperPause FX]
type = Helper
trigger1 = Time = 3
helperType = Normal
stateNo = 8500
ID = 8500
name = "Superpause FX"
posType = P1
pos = -1,-60
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3020, SuperPause]
type = SuperPause
trigger1 = Time = 3
time = 48
moveTime = 48
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8500,0
darken = 0
poweradd = 0

[State 3020, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3020, Voice]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3000,0
channel = 0

[State 3020, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1000, 1
channel = 2

[State 3020, Width: Edge]
type = Width
trigger1 = 1
edge = 10,0

[State 3020, Width: Player]
type = Width
trigger1 = AnimElemTime(6) = 0
player = 15,0

[State 3020, Velocity]
type = VelSet
trigger1 = AnimElem = 6
x = -3
y = -6

[State 3020, Gravity]
type = VelAdd
trigger1 = AnimElemTime(6) >= 0
y = 0.42

[State 3020, Projectile]
type = Helper
trigger1 = AnimElem = 6
helperType = Normal
stateNo = 3030
ID = 3010
name = "Soul Phoenix"
posType = P1
pos = 44,-62
size.xScale = 0.625
size.yScale = 0.625
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3020, End]
type = ChangeState
trigger1 = AnimElemTime(6) > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1135

;======================<MAX SOUL PHOENIX>===================
[Statedef 3050]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3000
poweradd = ifelse(var(20) > 0, -1000, -2000)
sprpriority = 2
facep2 = 1

[State 3050, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(5) < 0
time = 1
value = SCA

[State 3050, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3050, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 45

[State 3050, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3050, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3050, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3050, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3050, SuperPause FX]
type = Helper
trigger1 = Time = 3
helperType = Normal
stateNo = 8510
ID = 8500
name = "Superpause FX"
posType = P1
pos = -39,-88
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3050, SuperPause]
type = SuperPause
trigger1 = Time = 3
time = 45
moveTime = 45
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8510,0
darken = 0
poweradd = 0

[State 3050, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 3050, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3050, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3000,0
channel = 0

[State 3050, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1000, 1
channel = 2

[State 3050, Width: Player]
type = Width
trigger1 = AnimElemTime(6) = 0
player = 15,0

[State 3050, Projectile]
type = Helper
trigger1 = AnimElem = 6
helperType = Normal
stateNo = 3055
ID = 3055
name = "Soul Phoenix"
posType = P1
pos = 10,-56
size.xScale = 0.625
size.yScale = 0.625
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3050, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;======================<AIR MAX SOUL PHOENIX>===================
[Statedef 3060]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3020
poweradd = ifelse(var(20) > 0, -1000, -2000)
sprpriority = 2
facep2 = PrevStateNo=100 && p2dist x<0

[State 3060, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(6) < 0
time = 1
value = SCA

[State 3060, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3060, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 48

[State 3060, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3060, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3060, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3060, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3060, SuperPause FX]
type = Helper
trigger1 = Time = 3
helperType = Normal
stateNo = 8510
ID = 8500
name = "Superpause FX"
posType = P1
pos = -1,-60
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3060, SuperPause]
type = SuperPause
trigger1 = Time = 3
time = 48
moveTime = 48
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8510,0
darken = 0
poweradd = 0

[State 3060, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3060, Voice]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3000,0
channel = 0

[State 3060, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1000, 1
channel = 2

[State 3060, Width: Edge]
type = Width
trigger1 = 1
edge = 10,0

[State 3060, Width: Player]
type = Width
trigger1 = AnimElemTime(6) = 0
player = 15,0

[State 3060, Velocity]
type = VelSet
trigger1 = AnimElem = 6
x = -3
y = -6

[State 3060, Gravity]
type = VelAdd
trigger1 = AnimElemTime(6) >= 0
y = 0.42

[State 3060, Projectile]
type = Helper
trigger1 = AnimElem = 6
helperType = Normal
stateNo = 3056
ID = 3055
name = "Soul Phoenix"
posType = P1
pos = 44,-62
size.xScale = 0.625
size.yScale = 0.625
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3060, End]
type = ChangeState
trigger1 = AnimElemTime(6) > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1135

;======================<CARDINAL BLADE>===================
[Statedef 3100]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3100
poweradd = ifelse(var(20) > 0, 0, -1000)
sprpriority = 2
facep2 = 1

[State 3100, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(5) < 0
time = 1
value = SCA

[State 3100, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3100, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 47

[State 3100, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3100, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3100, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3100, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3100, SuperPause FX]
type = Helper
trigger1 = Time = 3
helperType = Normal
stateNo = 8500
ID = 8500
name = "Superpause FX"
posType = P1
pos = 21,-84
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3100, SuperPause]
type = SuperPause
trigger1 = Time = 3
time = 47
moveTime = 47
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8500,0
darken = 0
poweradd = 0

[State 3100, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 3100, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3100, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3100,0
channel = 0

[State 3100, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 2
channel = 2

[State 3100, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 41,0
channel = 3

[State 3100, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 3100, Dust Helper]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 3100, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 5

[State 3100, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 3100, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 8
x = 12
y = -11.85

[State 3100, Friction]
type = VelAdd
trigger1 = AnimElemTime(8) > 0
x = ifelse(Vel X <= 0, 0, -.125)

[State 3100, VelStop]
type = VelSet
trigger1 = AnimElem = 12
x = 0
y = 0

[State 3100, Gravity]
type = VelAdd
trigger1 = AnimElemTime(12) > 0
y = .5

[State 3100, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2   
attr = S, HA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 4,5
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 34), var(36) := -48
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5,-10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .42
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3100, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 3   
attr = S, HA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 4,5
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 41), var(36) := -77
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5,-10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .42
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 3100, Hit 3+]
type = HitDef
trigger1 = !var(16) && var(15) < 8
trigger1 = AnimElem = 4 || AnimElem = 5 || AnimElem = 6 || AnimElem = 7 || AnimElem = 8
attr = A, HA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 4
priority = 4, hit
animtype = Up
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 4,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 9), var(36) := -132
air.animtype = Up
fall.animtype = Up
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5, -10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .42
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3100, Hit 3+]
type = HitDef
trigger1 = !var(16) && var(15) < 8
trigger1 = AnimElem = 9
attr = A, HA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 4
priority = 4, hit
animtype = Up
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 6,6
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 9), var(36) := -132
air.animtype = Up
fall.animtype = Up
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5, -10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .42
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3100, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(12) >= 0
moveType = I

[State 3100, End]
type = ChangeState
trigger1 = AnimElemTime(8) > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1205

;======================<MAX CARDINAL BLADE(NORMAL)>===================
[Statedef 3110]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3100
poweradd = ifelse(var(20) > 0, -1000, -2000)
sprpriority = 2
facep2 = 1

[State 3110, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(5) < 0
time = 1
value = SCA

[State 3110, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3110, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 47

[State 3110, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3110, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3110, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3110, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3110, SuperPause FX]
type = Helper
trigger1 = Time = 3
helperType = Normal
stateNo = 8510
ID = 8500
name = "Superpause FX"
posType = P1
pos = 21,-84
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3110, SuperPause]
type = SuperPause
trigger1 = Time = 3
time = 47
moveTime = 47
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8510,0
darken = 0
poweradd = 0

[State 3110, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 3110, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3110, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3100,0
channel = 0

[State 3110, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 2
channel = 2

[State 3110, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 41,0
channel = 3

[State 3110, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 3110, Dust Helper]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 3110, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 5

[State 3110, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 3110, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 8
x = 12
y = -11.85

[State 3110, Friction]
type = VelAdd
trigger1 = AnimElemTime(8) > 0
x = ifelse(Vel X <= 0, 0, -.125)

[State 3110, VelStop]
type = VelSet
trigger1 = AnimElem = 12
x = 0
y = 0

[State 3110, Gravity]
type = VelAdd
trigger1 = AnimElemTime(12) > 0
y = .5

[State 3110, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 2   
attr = S, HA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 4,5
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 34), var(36) := -48
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5,-10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .45
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3110, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 3   
attr = S, HA
damage = ceil(ifElse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 4,5
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 41), var(36) := -77
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5,-10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .45
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 3110, Hit 3+]
type = HitDef
trigger1 = !var(16) && var(15) < 9
trigger1 = AnimElem = 4 || AnimElem = 5 || AnimElem = 6 || AnimElem = 7 || AnimElem = 8
attr = A, HA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 4
priority = 4, hit
animtype = Up
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 4,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 9), var(36) := -132
air.animtype = Up
fall.animtype = Up
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5, -10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .45
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3110, Hit 3+]
type = HitDef
trigger1 = !var(16) && var(15) < 9
trigger1 = AnimElem = 9
attr = A, HA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 4
priority = 4, hit
animtype = Up
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 6,6
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 9), var(36) := -132
air.animtype = Up
fall.animtype = Up
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -3.5, -10
air.velocity = -3.5, -10
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .45
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3110, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(12) >= 0
moveType = I

[State 3110, End]
type = ChangeState
trigger1 = AnimElemTime(8) > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1205

;======================<SILHOUETTE BLADE(ARRANGED)>===================
[Statedef 3150]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3150
poweradd = ifelse(var(20) > 0, -1000, -2000)
sprpriority = 2
facep2 = 1

[State 3150, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(7) < 0
time = 1
value = SCA

[State 3150, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3150, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 48

[State 3150, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3150, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3150, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3150, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3150, SuperPause FX]
type = Helper
trigger1 = AnimElemTime(4)=0
helperType = Normal
stateNo = 8510
ID = 8500
name = "Superpause FX"
posType = P1
pos = 10,-70
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3150, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(4)=0
time = 48
moveTime = 48
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8510,0
darken = 0
poweradd = 0

[State 3150, Width]
type = Width
trigger1 = 1 
edge = 10,0

[State 3150, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 3150, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3150, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3100,1
channel = 0

[State 3150, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1, 2
channel = 1

[State 3150, Width: Player]
type = Width
trigger1 = AnimElemTime(5) = 0
player = 30,0

[State 3150, Projectile]
type = Helper
trigger1 = AnimElemTime(5) = 0
helperType = Normal
stateNo = 3155
ID = 3155
name = "Lilith"
posType = P1
pos = 44,0
keyctrl = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3150, Projectile]
type = Helper
trigger1 = AnimElem = 5, = 8
helperType = Normal
stateNo = 3155
ID = 3155
name = "Lilith"
posType = P1
pos = 86,0
keyctrl = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3150, Projectile]
type = Helper
trigger1 = AnimElem = 5, = 16
helperType = Normal
stateNo = 3155
ID = 3155
name = "Lilith"
posType = P1
pos = 128,0
keyctrl = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3150, Projectile]
type = Helper
trigger1 = AnimElem = 5, = 24
helperType = Normal
stateNo = 3155
ID = 3155
name = "Lilith"
posType = P1
pos = 170,0
keyctrl = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3150, Projectile]
type = Helper
trigger1 = AnimElem = 5, = 32
helperType = Normal
stateNo = 3155
ID = 3155
name = "Lilith"
posType = P1
pos = 212,0
keyctrl = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 3150, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(14) > 30
moveType = I

[State 3150, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;======================<VALKYRIE TURN>===================
[Statedef 3200]
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 3200
poweradd = ifelse(var(20) > 0, 0, -1000)
sprpriority = 2
facep2 = 1

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

[State 3200, No Corner Push]
type = VarSet
trigger1 = !Time
fvar(5) = 0

[State 3200, Unguardable]
type = VarSet
trigger1 = !Time && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 45

[State 3200, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3200, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3200, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3200, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3200, SuperPause FX]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 8500
ID = 8500
name = "Superpause FX"
posType = P1
pos = -34,-69
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3200, SuperPause]
type = SuperPause
trigger1 = !Time
time = 45
moveTime = 45
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8500,0
darken = 0
poweradd = 0

[State 3200, No Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 3200, ScreenBound]
type = ScreenBound
trigger1 = Time>58
value = 0
movecamera = 0,0

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

[State 3200, Velocity]
type = VelSet
trigger1 = Time=46
x = (-80-(pos x*facing))/5.0
y = -pos y/5.0

[State 3200, Velocity]
type = VelSet
trigger1 = Time=[51,58]
x = 0
y = 0

[State 3200, Velocity]
type = VelSet
trigger1 = Time=58
x = 16
y = 0

[State 3200, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3200, 2
channel = 0
persistent = 0

[State 3200, Jet Booster FX]
type = Helper
trigger1 = AnimElem=2 && !NumHelper(6020)
helpertype = normal
stateno = 6020
ID = 6020
name = "Jets"
postype = p1
ownpal = 1

[State 3200, Jet Streak FX]
type = Helper
trigger1 = Time>=58 && !NumHelper(6028)
helpertype = normal
stateno = 6028
ID = 6028
name = "Jet Trail"
postype = p1
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5

[State 3200, Return Trip]
type = ChangeState
trigger1 = Time>58 && FrontEdgeDist<=-60
trigger2 = Time>105
value = 3201

;Return Trip
[Statedef 3201]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3200
poweradd = 0
sprpriority = 2

[State 3201, NotHitBy]
type = NotHitBy
trigger1 = Anim = 3200
time = 1
value = SCA

[State 3201, No Push]
type = PlayerPush
trigger1 = Anim = 3200
value = 0

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

[State 3201, Turn]
type = Turn
trigger1 = !Time

[State 3201, PosSet]
type = PosSet
trigger1 = Time<=10
x = (-200-50*sin(time/3.33))*facing

[State 3201, Y Velocity]
type = VelSet
trigger1 = !Time
y = ifelse(Command="holdup",-10,ifelse(Command="holddown",-3.25,-6))

[State 3201, Velocity]
type = VelSet
trigger1 = Time = 10
x = 6
y = -1.5

[State 3201, Gravity]
type = VelAdd
trigger1 = Time>=10
y = .18

[State 3201, Drill Attack]
type = ChangeAnim
trigger1 = Time>=10 && Anim!=3202
trigger1 = Command="hold_x" || Command="hold_y" || Command="hold_z" || Command="hold_a" || Command="hold_b" || Command="hold_c"
value = 3202

[State 3201, Drill FX]
type = Helper
trigger1 = Anim=3202 && AnimElemTime(3)>=0 && !NumHelper(3205)
helpertype = normal
stateno = 3205
ID = 3205
name = "Drill FX"
postype = p1
pos = 0,0
size.xscale = 0.5
size.yscale = 0.5
ownpal = 1

[State 3201, Voice]
type = PlaySnd
trigger1 = Anim = 3202
value = 3200,3
channel = 0
persistent = 0

[State 3201, Hits]
type = HitDef
;trigger1 = !var(16) && var(15) < 15
trigger1 = Anim=3202 && !(Time%3)
attr = A, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = HA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 6,6
guard.pausetime = 6,6
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 74), var(36) := -35
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 16;18
ground.hittime  = 16
guard.hittime = 16
ground.velocity = -4.5, 0
air.velocity = -2, -1.89
guard.velocity = -4.5
airguard.velocity = -2, -1.89
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3201, End]
type = ChangeState
trigger1 = vel y>0 && pos y>=10
value = 1135

;======================<MAX VALKYRIE TURN>===================
[Statedef 3250]
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 3200
poweradd = ifelse(var(20) > 0, -1000, -2000)
sprpriority = 2
facep2 = 1

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

[State 3250, No Corner Push]
type = VarSet
trigger1 = !Time
fvar(5) = 0

[State 3250, Unguardable]
type = VarSet
trigger1 = !Time && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 45

[State 3250, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3250, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3250, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3250, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3250, SuperPause FX]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 8510
ID = 8500
name = "Superpause FX"
posType = P1
pos = -34,-69
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3250, SuperPause]
type = SuperPause
trigger1 = !Time
time = 45
moveTime = 45
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8510,0
darken = 0
poweradd = 0

[State 3250, No Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 3250, ScreenBound]
type = ScreenBound
trigger1 = Time>58
value = 0
movecamera = 0,0

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

[State 3250, Velocity]
type = VelSet
trigger1 = Time=46
x = (-80-(pos x*facing))/5.0
y = -pos y/5.0

[State 3250, Velocity]
type = VelSet
trigger1 = Time=[51,58]
x = 0
y = 0

[State 3250, Velocity]
type = VelSet
trigger1 = Time=58
x = 19
y = 0

[State 3250, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3200, 2
channel = 0
persistent = 0

[State 3250, Jet Booster FX]
type = Helper
trigger1 = AnimElem=2 && !NumHelper(6020)
helpertype = normal
stateno = 6020
ID = 6020
name = "Jets"
postype = p1
ownpal = 1

[State 3250, Jet Streak FX]
type = Helper
trigger1 = Time>=58 && !NumHelper(6028)
helpertype = normal
stateno = 6028
ID = 6028
name = "Jet Trail"
postype = p1
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5

[State 3250, Return Trip]
type = ChangeState
trigger1 = Time>58 && FrontEdgeDist<=-60
trigger2 = Time>105
value = 3251

;MAX Return Trip
[Statedef 3251]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3200
poweradd = 0
sprpriority = 2

[State 3251, NotHitBy]
type = NotHitBy
trigger1 = Anim = 3200
time = 1
value = SCA

[State 3251, No Push]
type = PlayerPush
trigger1 = Anim = 3200
value = 0

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

[State 3251, Turn]
type = Turn
trigger1 = !Time

[State 3251, PosSet]
type = PosSet
trigger1 = Time<=10
x = (-200-50*sin(time/3.33))*facing

[State 3251, Y Velocity]
type = VelSet
trigger1 = !Time
y = ifelse(Command="holdup",-10,ifelse(Command="holddown",-3.35,-6))

[State 3251, Velocity]
type = VelSet
trigger1 = Time = 10
x = 6
y = -1.5

[State 3251, Gravity]
type = VelAdd
trigger1 = Time>=10
y = .15

[State 3251, Drill Attack]
type = ChangeAnim
trigger1 = Time>=10 && Anim!=3202
trigger1 = Command="hold_x" || Command="hold_y" || Command="hold_z" || Command="hold_a" || Command="hold_b" || Command="hold_c"
value = 3202

[State 3251, Drill FX]
type = Helper
trigger1 = Anim=3202 && AnimElemTime(3)>=0 && !NumHelper(3205)
helpertype = normal
stateno = 3205
ID = 3205
name = "Drill FX"
postype = p1
pos = 0,0
size.xscale = 0.5
size.yscale = 0.5
ownpal = 1

[State 3251, Voice]
type = PlaySnd
trigger1 = Anim = 3202
value = 3200,3
channel = 0
persistent = 0

[State 3251, Hits]
type = HitDef
;trigger1 = !var(16) && var(15) < 15
trigger1 = Anim=3202 && !(Time%3)
attr = A, HA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = HA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 6,6
guard.pausetime = 6,6
sparkNo = -1 + 0 * (var(33) := 8017)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 74), var(36) := -35
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 16;18
ground.hittime  = 16
guard.hittime = 16
ground.velocity = -4.5, 0
air.velocity = -2, -1.89
guard.velocity = -4.5
airguard.velocity = -2, -1.89
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3251, End]
type = ChangeState
trigger1 = vel y>0 && pos y>=10
value = 1135

;======================<FINISHING SHOWER>===================
[Statedef 3300]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3300
poweradd = ifelse(var(20) > 0, -1000, -2000)
sprpriority = 1
facep2 = PrevStateNo=100 && p2dist x<0

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

[State 3300, No Corner Push]
type = VarSet
trigger1 = !Time
fvar(5) = 0

[State 3300, Unguardable]
type = VarSet
trigger1 = AnimElemTime(4)=0 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 48

[State 3300, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3300, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3300, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3300, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3300, SuperPause FX]
type = Helper
trigger1 = AnimElemTime(4)=0
helperType = Normal
stateNo = 8510
ID = 8500
name = "Superpause FX"
posType = P1
pos = -5,-71
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3300, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(4)=0
time = 48
moveTime = 48
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8510,0
darken = 0
poweradd = 0

[State 3300, Width]
type = Width
trigger1 = 1 
edge = 10,10

[State 3300, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3300, Voice]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = 3300,0
channel = 0

[State 3300, End]
type = ChangeState
trigger1 = !AnimTime
value = 3301

;Firing Missles
[Statedef 3301]
type = A
physics = N
movetype = A
anim = 3301
ctrl = 0
velset = 0,0
sprpriority = 1

[State 3301, NotHitBy]
type = NotHitBy
trigger1 = Time <= 5
time = 1
value = SCA

[State 3301, Width]
type = Width
trigger1 = 1 
edge = 10,10

[State 3301, VelSet]
type = VelSet
trigger1 = !Time 
x = -1
y = -0.5
persistent = 0 

[State 3301, Flutter]
type = VelSet
trigger1 = Anim = 3301
y = -1.65*sin(time/6.0)

[State 3301, Gravity]
type = VelAdd
trigger1 = Anim = 3302 && AnimElemTime(1)>=3
y = 0.5

[State 3301, Missiles]
type = Helper
trigger1 = Anim=3301 && !(Time%6)
helpertype = Normal
stateno = 3310
ID = 3310
name = "Missile"
postype = p1
;pos = 0,0
size.xscale = 0.75;1
size.yscale = 0.75;1
keyctrl = 1
ownpal = 1

[State 3301, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 107
value = 3302
persistent = 0

[State 3301, End]
type = ChangeState
trigger1 = Anim = 3302
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 3302

;Landing
[Statedef 3302]
type = S
movetype = I
physics = S
ctrl = 0
anim = 3303
velset = 0, 0

[State 3302, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 3302, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 3302, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 3302, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;======================<DARKNESS ILLUSION>===================
[Statedef 3400]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3400
poweradd = ifelse(var(20) > 0, -1000, -3000)
sprpriority = 1
facep2 = PrevStateNo=100 && p2dist x<0

[State 3400, NotHitBy]
type = NotHitBy
trigger1 = Time < 60
time = 1
value = SCA

[State 3400, No Corner Push]
type = VarSet
trigger1 = Time = 3
fvar(5) = 0

[State 3400, Unguardable]
type = VarSet
trigger1 = Time = 3 && NumEnemy
trigger1 = (EnemyNear, StateNo != [120,155])
var(17) = 50

[State 3400, Super Cancel Flag]
type = VarSet
trigger1 = !Time
var(21) = (PrevStateNo = [1000,2999]) && var(6)

[State 3400, Hyper Cancel Flag]
type = VarSet
trigger1 = !Time
var(22) = (PrevStateNo = [3000,4999]) && var(7)

[State 3400, Super Cancel Flash]
type = PalFX
trigger1 = var(21) || var(22)
trigger1 = !(Time % 2) && Time <= 12
time = 1
add = 255,255,255
ignoreHitPause = 1

[State 3400, Super Cancel Juggle Reset]
type = VarSet
trigger1 = !Time
trigger1 = var(21) || var(22)
var(15) = 0
ignoreHitPause = 1

[State 3400, SuperPause FX]
type = Helper
trigger1 = Time = 3
helperType = Normal
stateNo = 8520
ID = 8500
name = "Superpause FX"
posType = P1
pos = 1,-68
superMoveTime = 255
size.xScale = 1
size.yScale = 1
ownPal = 1

[State 3400, SuperPause]
type = SuperPause
trigger1 = Time = 3
time = 50
moveTime = 50
p2DefMul = 1
unHittable = 1
anim = -1
sound = s8520,0
darken = 0
poweradd = 0

[State 3400, Width]
type = Width
trigger1 = 1 
edge = 10,0

[State 3400, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 0

[State 3400, Voice]
type = PlaySnd
trigger1 = AnimElemTime(3) = -1
value = 3400,0
channel = 0

[State 3400, Velocity]
type = VelSet
trigger1 = AnimElemTime(4) = 0
x = 7.5

[State 3400, Jet Booster FX]
type = Helper
trigger1 = AnimElemTime(4) >= 0 && !NumHelper(6020)
helpertype = normal
stateno = 6020
ID = 6020
name = "Jets"
postype = p1
ownpal = 1

[State 3400, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4  
attr = A, HA
damage = 0, 0
ID = 1113401
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 28), var(36) := -54
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -10, 0
air.velocity = -5,-5
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
;air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = 0
;snap = 60,0

[State 3400, P2 Custom State]
type = TargetState
trigger1= MoveHit =1 && NumTarget(1113401)
trigger1= Target(1113401),MoveType=H
ID = 1113401
value = 1113401
ignorehitpause=1

[State 3400, Success State]
type = ChangeState
trigger1 = MoveHit =1 && NumTarget(1113401)
trigger1 = Target(1113401),MoveType=H
trigger2 = MoveReversed
value = 3401
ignorehitpause = 1

[State 3400, End(Guarded)]
type = ChangeState
trigger1 = MoveGuarded
value = 3404
ignorehitpause = 1

[State 3400, End(Miss)]
type = ChangeState
trigger1 = Time > 85
value = 3403

;Darkness Illusion Success
[Statedef 3401]
type = S
physics = N
movetype = A
anim = 3401
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 3401, PosSet]
type = PosSet
trigger1 = !Time
y = 0
ignorehitpause = 1

[State 3401, TargetState]
type = TargetState
trigger1 = !Time
value = 1113401

[State 3401, Target Facing]
type = TargetFacing
trigger1 = !Time
value = -1

[State 3401, Lilith]
type = helper
trigger1 = Anim = 3401 || (Anim = 3402 && AnimElemTime(30) < 0)
trigger1 = !NumHelper(3500)
helpertype = normal
stateno = 3500
ID = 3500
name = "Lilith"
postype = p1
persistent = 0
keyctrl = 1

[State 3401, No Push]
type = PlayerPush
trigger1 = Anim = 3401
trigger2 = Anim = 3402 && AnimElemTime(32) < 0
value = 0

[State 3401, Muteki]
type = NotHitBy
trigger1 = Anim = 3401
value = SCA
time = 1

[State 3401, Muteki]
type = NotHitBy
trigger1 = Anim = 3402 && AnimElemTime(36) < 0
value = SCA
time = 1

[State 3401, Width];*
type = Width
trigger1 = !Time
edge = 125,30

[State 3401, Bind: Ground]
type = TargetBind
trigger1 = Anim = 3401 && AnimElemTime(41) < 0
pos = 60, 0

[State 3401, Bind: Air]
type = targetbind
trigger1 = Anim = 3402 && NumTarget && AnimElemTime(25) < 0
pos = 60, -55 -(target,const(size.mid.pos.y))
ID = 3402

[State 3401, Voice]
type = PlaySnd
trigger1 = Anim = 3401 && AnimElem = 47
value = 0, 3
channel = 0
persistent = 0

[State 3401, Voice 2]
type = PlaySnd
trigger1 = Anim = 3402 && AnimElem = 30
value = 195, 0
channel = 0
persistent = 0

[State 3401, Swing Snd]
type = PlaySnd
trigger1 = Anim = 3401 && (AnimElem = 8 || AnimElem = 14)
trigger2 = Anim = 3402 && AnimElem = 9
value = 1, 1
channel = 1

[State 3401, Swing Snd]
type = PlaySnd
trigger1 = Anim = 3401 && AnimElem = 18
value = 1, 2
channel = 1

[State 3401, Swing Snd]
type = PlaySnd
trigger1 = Anim = 3401 && AnimElem = 11
trigger2 = Anim = 3402 && AnimElem = 4
value = 1, 3
channel = 1

[State 3401, Swing Snd]
type = PlaySnd
trigger1 = Anim = 3401 && (AnimElem = 27 || AnimElem = 36)
trigger2 = Anim = 3402 && (AnimElem = 15 || AnimElem = 24)
channel = 1
value = 1, 5

[State 3401, Swing Snd]
type = PlaySnd
trigger1 = Anim = 3402 && AnimElem = 20
channel = 1
value = 1, 7

[State 3401, Swing Snd]
type = playsnd
trigger1 = Anim = 3402 && AnimElem = 20
value = 1, 8
channel = 1

[State 3401, Swing Snd]
type = playsnd
trigger1 = Anim = 3401 && (AnimElem = 47)
trigger2 = Anim = 3402 && (AnimElem = 31)
value = 1, 6
channel = 1

[State 3401, Hit 1+3]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 8 || AnimElem = 14  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 7 < 7, 7, fvar(11) * 7)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 58), var(36) := -88
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = ifelse((AnimElem=8), 0, (NumTarget!=NumEnemy))

[State 3401, Hit 2]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 11  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 56), var(36) := -14
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 4]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 19  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 103), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 5]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 28  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 99), var(36) := -53
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 6]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 36  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -106
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 7]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 37  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 113), var(36) := -59
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 8]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 38  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 35), var(36) := -106
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 9]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 39  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 93), var(36) := -82
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 0
air.velocity = 0,-1.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 10]
type = HitDef
trigger1 = Anim = 3401
trigger1 = AnimElem = 48  
attr = S, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Up
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 46), var(36) := -59
air.animtype = Up
fall.animtype = Up
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, -13.5
air.velocity = 0,-12.5
guard.velocity = -1;-12.95
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
;yaccel = .5
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 11]
type = HitDef
trigger1 = Anim = 3402
trigger1 = AnimElem = 4  
attr = A, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 56), var(36) := -44
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, -5
air.velocity = 0,-2.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 12]
type = HitDef
trigger1 = Anim = 3402
trigger1 = AnimElem = 9  
attr = A, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -35
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, -5
air.velocity = 0,-2.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 13]
type = HitDef
trigger1 = Anim = 3402
trigger1 = AnimElem = 15  
attr = A, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 70), var(36) := -42
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, -5
air.velocity = 0,-2.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 14]
type = HitDef
trigger1 = Anim = 3402
trigger1 = AnimElem = 20  
attr = A, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 57), var(36) := -43
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, -5
air.velocity = 0,-2.5
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit 15]
type = HitDef
trigger1 = Anim = 3402
trigger1 = AnimElem = 25  
attr = A, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -49
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, -5
air.velocity = 0,-4
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120
kill = (NumTarget!=NumEnemy)

[State 3401, Hit Final]
type = HitDef
trigger1 = Anim = 3402
trigger1 = AnimElem = 32  
attr = A, HA
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,4
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -65
air.animtype = Back
fall.animtype = Back
ground.type = Trip
air.type = Trip
ground.slidetime = 32
ground.hittime  = 32
guard.hittime = 18
ground.velocity = 0, 4
air.velocity = 0,8.75
guard.velocity = 0
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 18
envshake.ampl = 6
envShake.freq = 120

[State 3401, Rising Velocity]
type = VelSet
trigger1 = Anim = 3401 && AnimElem = 56
y = -9

[State 3401, Jet Booster FX]
type = Helper
trigger1 = Anim = 3401 && AnimElemTime(56) >= 0 && !NumHelper(6020)
helpertype = normal
stateno = 6020
ID = 6020
name = "Jets"
postype = p1
ownpal = 1

[State 3401, Jump Snd]
type = PlaySnd
trigger1 = Anim = 3401 && AnimElem = 56
value = 41, 0
persistent = 0

[State 3401, Dust Helper]
type = Helper
trigger1 = Anim = 3401 && AnimElem = 56
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 3401, Slash Kick FX]
type = Explod
trigger1 = !NumExplod(3410)
trigger1 = Anim = 3401 && AnimElem = 46
anim = 3410
ID = 3410
pos = -5, -55
postype = P1
sprpriority = 3
ignorehitpause = 0
bindtime = -1
scale = 0.375, 0.375
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 3401, Slash Kick FX]
type = Explod
trigger1 = !NumExplod(3410)
trigger1 = Anim = 3402 && AnimElem = 31
anim = 3410
ID = 3410
pos = -5, -55
postype = P1
sprpriority = 3
ignorehitpause = 0
bindtime = -1
scale = 0.375, 0.375
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 3401, ChangeAnim: Air Combo]
type = ChangeAnim
trigger1 = Anim = 3401 && AnimElemTime(56) >= 0 && NumTarget
trigger1 = pos y <= -60 && (pos y -(target, pos y) = [-50, 50])
value = 3402

[State 3401, VelMul]
type = VelMul
trigger1 = Anim = 3402 && AnimElemTime(3) < 0
y = 0.75

[State 3401, Velocity]
type = VelSet
trigger1 = Anim = 3402 && AnimElemTime(3)>=0 && AnimElemTime(36)<0
y = ifelse(pos y <= -20, 0.1, 0)

[State 3401, Turn]
type = Turn
trigger1 = Anim = 3402 && AnimElem = 29
persistent = 0

[State 3401, Velocity]
type = VelSet
trigger1 = Anim = 3402 && AnimElem = 29
x = 2

[State 3401, StateTypeSet: Standing, Stand Physics]
type = StateTypeSet
triggerall = Anim = 3401
trigger1 = AnimElemTime(36)<0
trigger1 = AnimElemTime(40)>=0 && AnimElemTime(46)<0
trigger2 = AnimElemTime(53)>=0 && AnimElemTime(56)<0
statetype = S
physics = S

[State 3401, StateTypeSet: Air, No Physics]
type = statetypeset
triggerall = Anim = 3401
trigger1 = AnimElemTime(36)>=0 && AnimElemTime(40)<0
trigger2 = AnimElemTime(46)>=0 && AnimElemTime(53)<0
trigger3 = AnimElemTime(56)>=0
statetype = A
physics = N

[State 3401, StateTypeSet: Air, Air Physics]
type = statetypeset
trigger1 = Anim = 3402 && AnimElemTime(36) >= 0
statetype = A
physics = A

[State 3401, No Target]
type = ChangeState
trigger1 = (Anim=3401 && AnimElemTime(56)>=0) && pos y < -120 && !NumTarget
value = 3403

;Darkness Illusion Miss
[Statedef 3403]
type = A
physics = A
movetype = I
anim = 3403
ctrl = 0

[State 3403, No Afterimages]
type = AfterImageTime
trigger1 = !Time
time = 0

;Darkness Illusion Guarded
[Statedef 3404]
type = A
physics = A
movetype = I
anim = 43
ctrl = 0
velset = const(velocity.jump.back.x), const(velocity.jump.y)

[State 3403, Jump Snd]
type = PlaySnd
trigger1 = !Time
value = 40, 0

;---DIZZY TARGET---
[Statedef 1113401]
type=S
physics=N
movetype=H
velset=0,0
ctrl=0

[State 1113401, ChangeAnim: Dizzy]
type = ChangeAnim
trigger1 = !Time
value = 5300

[State 1113401, No Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 1113401, HitBy]
type = HitBy
trigger1 = 1
value = S,HA
time = 1
ignorehitpause = 1

[State 1113401, On Ground]
type = PosSet
trigger1 = !Time
y = 0
ignorehitpause = 1

[State 1113401, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 1113401, Safety]
type = SelfState
trigger1 = Time>=180
value = 0
ctrl = 1