;=========================================
;Catnip full of hitsparkz and shit
;=========================================

;Wait
[StateDef 1008]
type = A
physics = N
moveType = I
anim = 6999
ctrl = 0
velSet = 0,0

[State 1008, End]
type = DestroySelf
trigger1 = !NumTarget
trigger2 = NumTarget
trigger2 = Target, Time <= 1 && !(Target,HitShakeOver)

;Dust Stuff
[Statedef 7100]
physics = N
velset = 0, 0
anim = 6999

[State 7100, Bind]
type = bindtoroot
trigger1 = time

[State 7100, Dust]
type = explod
trigger1 = !time
anim = 9100
ID = 9100
sprpriority = 3
postype = p1
pos = 0, ceil(pos y)
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1

[State 7100, Dust]
type = explod
trigger1 = !time || time = 2 || time = 6
anim = 9101
ID = 9100
sprpriority = 3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1

[State 7100, Assert]
type = assertspecial
trigger1 = 1
flag = invisible

[State 7100, End]
type = destroyself
trigger1 = time >= 7

;Guard Spark (Normal)
[StateDef 8000]
type = A
physics = N
moveType = I
anim = 8055
velset = 0,0
sprPriority = 5

[state 1000]
type = playsnd
trigger1 = time = 0
value = S6,0

[State 8000, Assert: No Shadow]
type = AssertSpecial
trigger1= 1
flag = NoShadow

[State 8000, Transparency]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256, 256

[State 8000, End]
type = DestroySelf
trigger1 = Time >= 9

;Weak Hit Spark
[StateDef 8010]
type = A
physics = N
moveType = I
anim = 8050
velSet = 0,0
sprPriority = 5

[State 8010, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8010, Transparency]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256,256

[State 8010, End]
type = DestroySelf
trigger1 = Time >= 15



;Weak Hit Spark
[StateDef 8010]
type = A
physics = N
moveType = I
anim = 8050
velSet = 0,0
sprPriority = 5

[State 8010, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8010, Transparency]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256,256

[State 8010, End]
type = DestroySelf
trigger1 = Time >= 15


;Medium Hit Spark
[StateDef 8011]
type = A
physics = N
moveType = I
anim = 8051
velSet = 0,0
sprPriority = 5

[State 8010, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8010, Transparency]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256,256

[State 8011, End]
type = DestroySelf
trigger1 = Time >= 15

;Strong Hit Spark
[StateDef 8012]
type = A
physics = N
moveType = I
anim = 8052
velSet = 0,0
sprPriority = 5

[State 8010, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8010, Transparency]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256,256

[State 8011, End]
type = DestroySelf
trigger1 = Time >= 15

;Super Hit Spark
[StateDef 8014]
type = A
physics = N
moveType = I
anim = 8053
velSet = 0,0
sprPriority = 5

[State 8010, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8010, Transparency]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256,256

[State 8011, End]
type = DestroySelf
trigger1 = Time >= 15

;Sum dust
[StateDef 8103]
type = A
anim = 6999
velSet = 0,0
sprPriority = 5

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

[State 8103, Dash Dust]
type = Explod
trigger1 = Time = 0 || Time = 3 || Time = 6
anim = 9104
ID = ifElse((Time = 6), 3, ifElse((Time = 3), 2, 1))
posType = P1
pos = 0,-4
random = 8,8
vel = -3 - (Random / 1000.0), -2 - (Random / 2000.0)
facing = ifElse(Random < 500,-1,1)
vFacing = ifElse(Random < 500,-1,1)
removeTime = 16
sprPriority = 3
pauseMoveTime = -1
superMoveTime = -1

[State 8103, Scale Explod 1]
type = ModifyExplod
trigger1 = NumExplod(1)
ID = 1
scale = 0.1 + (0.025 * Time), 0.1 + (0.025 * Time)
trans = AddAlpha
alpha = 256 - (16 * Time), 256

[State 8103, Scale Explod 2]
type = ModifyExplod
trigger1 = NumExplod(2)
ID = 2
scale = 0.1 + (0.025 * (Time - 3)), 0.1 + (0.025 * (Time - 3))
trans = AddAlpha
alpha = 256 - (16 * (Time - 3)), 256

[State 8103, Scale Explod 3]
type = ModifyExplod
trigger1 = NumExplod(3)
ID = 3
scale = 0.1 + (0.025 * (Time - 6)), 0.1 + (0.025 * (Time - 6))
trans = AddAlpha
alpha = 256 - (16 * (Time - 6)), 256

[State 8103, Remove Explods]
type = RemoveExplod
trigger1 = Time >= 22

[State 8103, End]
type = DestroySelf
trigger1 = !NumExplod

;Level 1 Super FX
[StateDef 8500]
type = A
physics = N
velSet = 0,0
anim = 8100
sprPriority = 5

[State 8500, Lv1]
type = bgpalfx
trigger1 = time <= 10; && root, var(10) = 5
time = 1
add = 256 -ceil(25.6 * time), 256 -ceil(25.6 * time), 256 -ceil(25.6 * time)
mul = 256 -floor(25.6 * time), 256 -floor(25.6 * time), 256 
color = 256 -floor(25.6 * time)

[State 8500, Lv1]
type = bgpalfx
trigger1 = (time = [11, 47]); && root, var(10) = 5
time = 1
mul = 0, 0, 256
color = 0

[State 8500, Lv1]
type = bgpalfx
trigger1 = time >= 48; && root, var(10) = 5
time = 1
mul = ceil(51.2 * (time -48)), ceil(51.2 * (time -48)), 256 
color = floor(51.2 * (time -48))

[State 8500, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 8500, End]
type = DestroySelf
trigger1 = Time >= 52

;Level 1 Super FX ALT
[StateDef 8501]
type = A
physics = N
velSet = 0,0
anim = 8100
sprPriority = 5

[State 8500, Lv1]
type = bgpalfx
trigger1 = time <= 10; && root, var(10) = 5
time = 1
add = 256 -ceil(25.6 * time), 256 -ceil(25.6 * time), 256 -ceil(25.6 * time)
mul = 256 -floor(25.6 * time), 256 -floor(25.6 * time), 256 
color = 256 -floor(25.6 * time)

[State 8500, Lv1]
type = bgpalfx
trigger1 = (time = [11, 27]); && root, var(10) = 5
time = 1
mul = 0, 0, 256
color = 0

[State 8500, Lv1]
type = bgpalfx
trigger1 = time >= 28; && root, var(10) = 5
time = 1
mul = ceil(51.2 * (time -28)), ceil(51.2 * (time -28)), 256 
color = floor(51.2 * (time -28))

[State 8500, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 8500, End]
type = DestroySelf
trigger1 = Time >= 32

;Level 2 Super FX
[StateDef 8502]
type = A
physics = N
velSet = 0,0
anim = 8101
sprPriority = 5

[State 8500, Lv1]
type = bgpalfx
trigger1 = time <= 10; && root, var(10) = 5
time = 1
add = 256 -ceil(25.6 * time), 256 -ceil(25.6 * time), 256 -ceil(25.6 * time)
mul = 256 -floor(25.6 * time), 256, 256 -floor(25.6 * time)
color = 256 -floor(25.6 * time)

[State 8500, Lv1]
type = bgpalfx
trigger1 = (time = [11, 47]); && root, var(10) = 5
time = 1
mul = 0, 256, 0
color = 0

[State 8500, Lv1]
type = bgpalfx
trigger1 = time >= 48; && root, var(10) = 5
time = 1
mul = ceil(51.2 * (time -48)), 256, ceil(51.2 * (time -48))
color = floor(51.2 * (time -48))

[State 8500, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 8500, End]
type = DestroySelf
trigger1 = Time >= 52

;Level 2 Super FX ALT
[StateDef 8503]
type = A
physics = N
velSet = 0,0
anim = 8101
sprPriority = 5

[State 8500, Lv1]
type = bgpalfx
trigger1 = time <= 10; && root, var(10) = 5
time = 1
add = 256 -ceil(25.6 * time), 256 -ceil(25.6 * time), 256 -ceil(25.6 * time)
mul = 192, 256 -floor(25.6 * time), 256 
color = 256 -floor(25.6 * time)

[State 8500, Lv1]
type = bgpalfx
trigger1 = (time = [11, 27]); && root, var(10) = 5
time = 1
mul = 0,256,0
color = 0

[State 8500, Lv1]
type = bgpalfx
trigger1 = time >= 28; && root, var(10) = 5
time = 1
mul = 192, ceil(51.2 * (time -28)), 256 
color = floor(51.2 * (time -28))

[State 8500, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 8500, End]
type = DestroySelf
trigger1 = Time >= 32

;Level 3 Super FX
[StateDef 8504]
type = A
physics = N
velSet = 0,0
anim = 8102
sprPriority = 5

[State 8500, Lv1]
type = bgpalfx
trigger1 = time <= 10; && root, var(10) = 5
time = 1
add = 256 -ceil(25.6 * time), 256 -ceil(25.6 * time), 256 -ceil(25.6 * time)
mul = 256, 256 -floor(25.6 * time), 256 -floor(25.6 * time)
color = 256 -floor(25.6 * time)

[State 8500, Lv1]
type = bgpalfx
trigger1 = (time = [11, 94]); && root, var(10) = 5
time = 1
mul = 256, 0, 0
color = 0

[State 8500, Lv1]
type = bgpalfx
trigger1 = time >= 95; && root, var(10) = 5
time = 1
mul = 256, ceil(51.2 * (time -95)), ceil(51.2 * (time -95))
color = floor(51.2 * (time -95))

[State 8500, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 8500, End]
type = DestroySelf
trigger1 = Time >= 99
