;Prestate
[StateDef 15003]
type = A
moveType = A
ctrl = 0
sprPriority = 5
anim = 1501

[State 1210, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1210, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 1

[State 1210, HitOverride]
type = HitOverride
trigger1 = Time <= 0
time = -1
attr = SCA, NP, SP, HP
slot = 0
stateno = 15001

[State 3050, hitvar]
type=varset
trigger1 = time = 0
var(14)=0

[state 10000]
type = changestate
trigger1 = time = 0
value = 15000
ctrl = 0

;Disc
[StateDef 15000]
type = A
moveType = A
physics = N
ctrl = 0
sprPriority = 5
juggle = 10
velset = 0,0
anim = 1501

[State 1210, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1210, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 1

[State 1210, HitOverride]
type = HitOverride
trigger1 = Time <= 0
time = -1
attr = SCA, NP, SP, HP
slot = 0
stateno = 15001

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

[state 1000]
type = velset
trigger1 = time = 0
x = 12
y = 0

[state 1000]
type = velset
trigger1 = time = 12
trigger2 = FrontEdgeBodyDist <= 0
trigger3 = movecontact
x = 0
y = 0

[State 3050, hitvar]
type=varset
trigger1 = anim!=1501
;trigger2= anim = 1015 && animtime = 0
;trigger2 = anim = 1015 && hitcount <= 5
;trigger2 = anim =1015 && animelemtime(15)<0
var(14)=0

[State 3050, hitvar]
type=varadd
trigger1=anim=1501&&(movehit=1||moveguarded=1||movereversed=1)
var(14)=1

[State 3050, hit]
type=hitdef
trigger1=anim=1501
trigger1= timemod = 2,0 && var(14)<5
attr = S, SP
hitFlag = MAF
guardFlag = MA
;priority = 4,Hit
damage = 25, 1
getPower = 0, 0
givePower = 36, 36
pauseTime = 3, 3
sparkxy = -1,-3
sparkno = 1
guard.sparkno = 40
hitsound = 5,1
guardsound = 6,0
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = High
ground.hitTime = 30
ground.slideTime = 30
guard.hitTime = 15
air.hitTime = 60
down.hittime = 30
ground.velocity = 6,-0.5
ground.cornerPush.velOff = 0
guard.velocity = -3.5
guard.cornerPush.velOff = 0
;air.velocity = -3,-0.5
air.velocity = ifElse(P2Dist x < 15, -4, 6),-0.5
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
fall.recover = 0
sprPriority = 3
p2Facing = ifElse(P2Dist x < -15, -1, 1)

[state 10000]
type = changestate
trigger1 = time = 50
trigger2 = hitcount = 5
trigger3 = moveguarded && time >20
value = 15001
ctrl = 0

;Disc Done
[StateDef 15001]
type = A
moveType = A
ctrl = 0
sprPriority = 5
velset = 0,0
anim = 1504

[State 1310, 1]
type = VelAdd
triggerall = Time > 1
triggerall = Vel X < 10
trigger1 = RootDist X > 10
x = 1

[State 3050, hit]
type=hitdef
trigger1= time = 0
attr = S, SP
hitFlag = MAFP-
guardFlag = M
priority = 4,Hit
damage = 100,1
getPower = 0, 0
givePower = 36, 36
pauseTime = 3, 3
sparkxy = -1,-3
sparkno = 2
guard.sparkno = 40
hitsound = 5,2
guardsound = 6,0
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = High
ground.hitTime = 15
ground.slideTime = 15
guard.hitTime = 15
air.hitTime = 60
ground.velocity = -5,-4.5
ground.cornerPush.velOff = 0
guard.velocity = -3.5
guard.cornerPush.velOff = 0
air.velocity = -5,-3.5
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
fall.recover = 0
forceStand = 1
hitSound = -1
guardSound = -1
sparkNo = -1
guard.sparkNo = -1
sparkXY = -10, -48
sprPriority = 3

[State 1310, 1]
type = VelAdd
triggerall = Time > 1
triggerall = Vel X > -10
trigger1 = RootDist X < -10
x = -1

[State 1310, 2]
type = VelAdd
triggerall = Time > 1
triggerall = Vel Y < 5
trigger1 = RootDist Y > 50
y = 1

[State 1310, 2]
type = VelAdd
triggerall = Time > 1
triggerall = Vel Y > -1
trigger1 = RootDist Y < 35
y = -1

[State 1310, VarSet]
type = ParentVarSet
triggerall = Time > 1
trigger1 = RootDist X < 40
trigger1 = RootDist X > -40
trigger1 = RootDist Y > 20
trigger1 = RootDist Y < 80
v = 5
value = 5

[State 1310, 4]
type = changestate
triggerall = Time > 1
trigger1 = RootDist X < 30
trigger1 = RootDist X > -30
trigger1 = RootDist Y > 20
trigger1 = RootDist Y < 80
value = 15004
ctrl = 0

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

[state 1000]
type = explod
trigger1 = !time
anim = 1502
ontop = 1
pos = 0,0
postype = p1
bindtime = -1
removeongethit = 1
ownpal = 1
sprpriority = -1

[State 3050, hitvar]
type=varset
trigger1 = time = 0
var(14)=0

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

;Disc Done
[StateDef 15005]
type = A
moveType = A
ctrl = 0
sprPriority = 5
velset = 0,0
anim = 1503

[State 1310, 1]
type = VelAdd
triggerall = Time > 1
triggerall = Vel X < 10
trigger1 = RootDist X > 10
x = 2

[State 3050, hit]
type=hitdef
trigger1= time = 0
attr = S, SP
hitFlag = MAFP-
guardFlag = M
priority = 4,Hit
damage = 50,1
getPower = 0, 0
givePower = 36, 36
pauseTime = 3, 3
sparkxy = 0,0
sparkno = 1
guard.sparkno = 40
hitsound = 5,1
guardsound = 6,0
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = High
ground.hitTime = 15
ground.slideTime = 15
guard.hitTime = 15
air.hitTime = 60
ground.velocity = -5,-3.5
ground.cornerPush.velOff = 0
guard.velocity = -3.5
guard.cornerPush.velOff = 0
air.velocity = -5,-3.5
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
fall.recover = 0
forceStand = 1
hitSound = -1
guardSound = -1
sparkNo = -1
guard.sparkNo = -1
sparkXY = -10, -48
sprPriority = 3

[State 1310, 1]
type = VelAdd
triggerall = Time > 1
triggerall = Vel X > -10
trigger1 = RootDist X < -10
x = -2

[State 1310, 2]
type = VelAdd
triggerall = Time > 1
triggerall = Vel Y < 5
trigger1 = RootDist Y > 50
y = 2

[State 1310, 2]
type = VelAdd
triggerall = Time > 1
triggerall = Vel Y > -1
trigger1 = RootDist Y < 35
y = -2

[State 1310, VarSet]
type = ParentVarSet
triggerall = Time > 1
trigger1 = RootDist X < 40
trigger1 = RootDist X > -40
trigger1 = RootDist Y > 20
trigger1 = RootDist Y < 80
v = 5
value = 5

[State 1310, 4]
type = changestate
triggerall = Time > 1
trigger1 = RootDist X < 30
trigger1 = RootDist X > -30
trigger1 = RootDist Y > 20
trigger1 = RootDist Y < 80
value = 15004
ctrl = 0

;Prestate
[StateDef 15006]
type = A
moveType = A
ctrl = 0
sprPriority = 5
anim = 4450

[State 3050, hitvar]
type=varset
trigger1 = time = 0
var(14)=0

[state 10000]
type = changestate
trigger1 = time = 0
value = 15007
ctrl = 0

;Bike
[StateDef 15007]
type = A
moveType = A
physics = N
ctrl = 0
sprPriority = 5
juggle = 10
velset = 0,0

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1

[state 1000]
type = velset
trigger1 = time = 0
x = 10
y = 0

[state 1000]
type = velset
trigger1 = time = 30
trigger2 = FrontEdgeBodyDist <= 0
x = 0
y = 0

[State 3050, hitvar]
type=varset
trigger1 = anim!=4450
;trigger2= anim = 1015 && animtime = 0
;trigger2 = anim = 1015 && hitcount <= 5
;trigger2 = anim =1015 && animelemtime(15)<0
var(14)=0

[State 3050, hitvar]
type=varadd
trigger1=anim=4450&&(movehit=1||moveguarded=1||movereversed=1)
var(14)=1

[State 3050, hit]
type=hitdef
trigger1=anim=4450
trigger1= timemod = 2,0 && var(14)<5
attr = S, SP
hitFlag = MAF
guardFlag = MA
;priority = 4,Hit
damage = 40, 1
getPower = 0, 0
givePower = 36, 36
pauseTime = 3, 3
sparkxy = -3,0
sparkno = 2
guard.sparkno = 40
hitsound = 5,2
guardsound = 6,0
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = High
ground.hitTime = 30
ground.slideTime = 30
guard.hitTime = 15
air.hitTime = 60
down.hittime = 30
ground.velocity = -4,0
ground.cornerPush.velOff = 0
guard.velocity = -3.5
guard.cornerPush.velOff = 0
air.velocity = -4,-2.5
;air.velocity = ifElse(P2Dist x < 15, -4, 4),-0.5
air.cornerPush.velOff = 0
yAccel = 0.50
fall = 1
fall.recover = 0
sprPriority = 3
;p2Facing = ifElse(P2Dist x < -15, -1, 1)

[state 10000]
type = changestate
trigger1 = time = 60
trigger2 = hitcount = 5
value = 15005
ctrl = 0

;Spark
[StateDef 15010]
type = A
moveType = A
ctrl = 0
sprPriority = 5
anim = 7001
velset = -8,-8

[state 1000]
type = destroyself
trigger1 = time = 5

[StateDef 15011]
type = A
moveType = A
ctrl = 0
sprPriority = 5
anim = 7000
velset = -8,0

[state 1000]
type = angledraw
trigger1 = 1
value = -50
ignorehitpause = 1

[state 1000]
type = destroyself
trigger1 = time = 5

[StateDef 15012]
type = A
moveType = A
ctrl = 0
sprPriority = 5
anim = 7000
velset = -8,8

[state 1000]
type = destroyself
trigger1 = time = 5

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

[state 1000]
type = gamemakeAnim
trigger1 = !time
value = 40
ignorehitpause = 1

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

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

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

;Special Move Hit Spark
[StateDef 7501]
type = A
physics = N
moveType = I
anim = 19999
velSet = 0,0
sprPriority = 5

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

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

[state 1000]
type = gamemakeAnim
trigger1 = !time
value = 1
ignorehitpause = 1

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