;================================================================================
; DESPERATION MOVES
;================================================================================
;Hell Bound
[Statedef 3000]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),0,-1000)                       
sprpriority = 2 
velset=0,0
facep2 = 1
;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = -36,-136
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = -36,-136
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3000
trigger2 = anim = 3010
value = SCA
;=======================================; Vels && Movement
[State 1300, PosAdd]
type = PosAdd
triggerall = anim = 3010 
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(5) = 0
x = 8
[State 1300, PosAdd]
type = PosAdd
triggerall = anim = 3010 
trigger1 = animelemtime(5) = 1
x = 6
[State 1300, PosAdd]
type = PosAdd
triggerall = anim = 3010 
trigger1 = animelemtime(5) = 2
x = 4
;============== Animations and Statetype
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,3000,3010)

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 7
movetype = I 
;==============Sounds and FX
[State 1000, Sound]
type = PlaySnd
trigger1 = Animelem = 1
value = 200,23
channel = 0

[State 3000, EnvShake]
type = EnvShake
trigger1 = animelemtime(5) = 1
time = 14
freq = 180
ampl = -6
persistent = 0

[State 1000, Sound]
type = PlaySnd
trigger1 = Animelem = 5
value = 1000,1

[State 3303, Explod]
type = Explod
trigger1 = animelem = 5
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
;==============Helpers
[State 1000: Helper]
type = Helper
trigger1 = animelemtime(5) = 1
helpertype = Normal
name = "Hell Bound"
id = 3005
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 3005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

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

;Hell Bound Projectile 
[Statedef 3005]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
juggle = 0

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP , HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3303, Explod]
type = Explod
trigger1 = animelem = 1
anim = 12000
pos = 80,0
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0

[State 1411, VarSet]
type = ParentVarSet
triggerall = IsHelper(3005) || IsHelper(3052) || IsHelper(3105)
trigger1 = numtarget(3000) && movehit
trigger2 = numtarget(3005) && movehit
var(16) = 0
persistent = 0

[State 1411, VarSet]
type = ParentVarSet
triggerall = IsHelper(3050) || IsHelper(3051) 
trigger1 = numtarget(3000) && movehit
var(16) = 60
persistent = 0

[State 1411, VarSet]
type = ParentVarSet
triggerall = !IsHelper(3050)
trigger1 = numtarget(3000) && movehit
var(18) = 10
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1
channel = 4

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = Const(size.mid.pos.x),Const(size.mid.pos.y)+10
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = animelemtime(3)>= 0 && animelemtime(13) < 0
attr = A, HP
damage = floor(300*ifelse(root,var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 1, 13
guard.pausetime = 1,12
sparkno = -1
sparkxy = 0, 0
hitsound = -1
guardsound = -1
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
id = 3005
p1sprpriority = 4
persistent = 0

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3005) && movehit
value = 10030
persistent = 0

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

;Hell Bound MAX
[Statedef 3200]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
poweradd = 0
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15300-(var(31)*200)
pos = -36,-136
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15301-(var(31)*200)
pos = -36,-136
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3000
trigger2 = anim = 3010
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3200

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 7
movetype = I 
;==============Sounds and FX
[State 1000, Sound]
type = PlaySnd
trigger1 = Animelem = 1
value = 200,23
channel = 0

[State 3000, EnvShake]
type = EnvShake
trigger1 = animelemtime(5) = 1
time = 14
freq = 180
ampl = -6
persistent = 0

[State 3303, Explod]
type = Explod
trigger1 = animelem = 5
anim = 12006
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 3303, Explod]
type = Explod
trigger1 = animelem = 5
anim = 12000
pos = 56,0
postype = p1  
sprpriority = 0
ownpal = 1
persistent = 0
[State 3303, Explod]
type = Explod
trigger1 = animelem = 6
anim = 12000
pos = 88,0
postype = p1  
sprpriority = 0
ownpal = 1
persistent = 0
[State 3303, Explod]
type = Explod
trigger1 = animelemtime(6) = 6
anim = 12000
pos = 120,0
postype = p1  
sprpriority = 0
ownpal = 1
persistent = 0
;==============Helpers
[State 1000: Helper]
type = Helper
trigger1 = animelemtime(5) = 1
helpertype = Normal
name = "Hell Bound FX"
id = 3201
pos = 48, 0 ;50
postype = p1
facing = 1
stateno = 3201
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
[State 1000: Helper]
type = Helper
trigger1 = animelemtime(6) = 1
helpertype = Normal
name = "Hell Bound FX"
id = 3201
pos = 80, 0 ;50
postype = p1
facing = 1
stateno = 3201
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
[State 1000: Helper]
type = Helper
trigger1 = animelemtime(6) = 7
helpertype = Normal
name = "Hell Bound FX"
id = 3201
pos = 112, 0 ;50
postype = p1
facing = 1
stateno = 3201
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 1000: Helper]
type = Helper
trigger1 = animelemtime(5) = 4
helpertype = Normal
name = "Hell Bound MAX 1"
id = 3205
pos = 48, -112 ;50
postype = p1
facing = 1
stateno = 3205
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
[State 1000: Helper]
type = Helper
trigger1 = animelemtime(6) = 4
helpertype = Normal
name = "Hell Bound MAX 2"
id = 3206
pos = 80, -112 ;50
postype = p1
facing = 1
stateno = 3205
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
[State 1000: Helper]
type = Helper
trigger1 = animelemtime(6) = 10
helpertype = Normal
name = "Hell Bound MAX 3"
id = 3207
pos = 112, -112 ;50
postype = p1
facing = 1
stateno = 3205
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

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

;================================================================================
;Hell Bound MAX FX
;================================================================================
[Statedef 3201]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3201
sprpriority = 5
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = animelem = 1
value = 1000,1
channel = 5
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = !animtime

;Hell Bound MAX Projectile 
[Statedef 3205]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
juggle = 0

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3202

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP , HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1411, VarSet]
type = ParentVarSet
triggerall = !IsHelper(3050)
trigger1 = numtarget(3000) && movehit
var(18) = 10
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,60)
[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1
channel = 4

[State 3000, ContactSpark]
type = Explod
trigger1 = IsHelper(3205)
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 0,Const(size.mid.pos.y)+10
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
trigger1 = IsHelper(3206)
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = -20,Const(size.mid.pos.y)+10
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
trigger1 = IsHelper(3207)
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = -40,Const(size.mid.pos.y)+10
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = IsHelper(3205)
trigger1 = animelemtime(1)>= 0 && animelemtime(4) < 0
attr = A, HP
damage = floor(125*ifelse(root,var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 1, 13
guard.pausetime = 1,12
sparkno = -1
sparkxy = 0, 0
hitsound = -1
guardsound = -1
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
id = 3205
p1sprpriority = 4
persistent = 0
[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = IsHelper(3206)
trigger1 = animelemtime(1)>= 0 && animelemtime(4) < 0
attr = A, HP
damage = floor(117*ifelse(root,var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 1, 13
guard.pausetime = 1,12
sparkno = -1
sparkxy = 0, 0
hitsound = -1
guardsound = -1
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
id = 3205
p1sprpriority = 4
persistent = 0
[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = IsHelper(3207)
trigger1 = animelemtime(1)>= 0 && animelemtime(4) < 0
attr = A, HP
damage = floor(125*ifelse(root,var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 1, 13
guard.pausetime = 1,12
sparkno = -1
sparkxy = 0, 0
hitsound = -1
guardsound = -1
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
id = 3205
p1sprpriority = 4
persistent = 0

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3205) && movehit
value = 10030
persistent = 0

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

[Statedef 3100]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),0,-1000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = 30,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = 30,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3100
trigger2 = anim = 3101
trigger2 = animelemtime(2) < 0
value = SCA

;============== Animations and Statetype
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(3) = [1,3]),0,1) 
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3100

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3100 
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3101
Statetype = A 
;============== Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3101 && animelem = 1
x = 6
y = -3

[State 1300, VelAdd]
type = VelAdd
triggerall = animelemtime(1) > 0
trigger1 = anim = 3101
y = 0.5
;============== 

;==============Sounds and FX
[State 3035, 1]
type = AfterImage
trigger1 = anim = 3101
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 3101
trigger1 = Animelem = 1
value = 1000,3

[State 3303, Explod]
type = Explod
trigger1 = anim = 3101 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;---------------------------
;Land and Rise
[Statedef 3101]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2

[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3102

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3102
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3103
Statetype = A 
;============== Vels && Movement
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 3102 && animelem = 1
x = 14
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 3102 && animelem = 2
trigger2 = anim = 3102 && animelem = 3
x = 8
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 3103 && animelem = 19
x = 4

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 1
x = 4
y = -10

[State 1300, VelAdd]
type = VelAdd
triggerall = animelemtime(1) > 0
trigger1 = anim = 3103
y = 0.5
;==============Sounds and FX
[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 3103
trigger1 = Animelem = 1
value = 1000,4
ignorehitpause = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 3103
trigger1 = Animelem = 1
value = 200,24
channel = 0
ignorehitpause = 1


[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 19
x = 1
y = vel y
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3102
trigger1 = animelem = 3
attr = S, HA
damage = floor(117*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 12, 12
guard.pausetime = 12,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3103
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3103
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
attr = A, HA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3103
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3103
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3103
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3103
trigger1 = animelemtime(11) >= 0 && animelemtime(12) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3103
trigger1 = animelemtime(13) >= 0 && animelemtime(14) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 3103
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(15) >= 0 && animelemtime(16) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
ground.type = High
guardflag = M 
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -74
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
pausetime = 7,9
guard.pausetime = 8,8
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -19,-9
guard.velocity = -11.1796875
air.type = High
air.velocity = -19,-9
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
air.fall = 1
p2stateno = 10200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 50
persistent = 0
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
id = 3100
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Landing
;================================================================================
[Statedef 3102]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3104
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, AfterImage Persist]
type = AfterImageTime
trigger1 = !time
time = 1
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Lucky Driver MAX
;================================================================================
[Statedef 3300]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15300-(var(31)*200)
pos = 30,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15301-(var(31)*200)
pos = 30,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3300
trigger2 = anim = 3301
trigger2 = animelemtime(2) < 0
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3300

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3300 
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3301
Statetype = A 
;============== Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3301 && animelem = 1
x = 7
y = -3

[State 1300, VelAdd]
type = VelAdd
triggerall = animelemtime(1) > 0
trigger1 = anim = 3301
y = 0.5
;============== 

;==============Sounds and FX
[State 3035, 1]
type = AfterImage
trigger1 = anim = 3301
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 3301
trigger1 = Animelem = 1
value = 1000,3

[State 3303, Explod]
type = Explod
trigger1 = anim = 3301 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;---------------------------
;Land and Rise
[Statedef 3301]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2

[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3302

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3302
trigger2 = anim = 3303
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3303
Statetype = A 
;============== Vels && Movement
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 3302 && animelem = 1
x = 15
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 3302 && animelem = 2
trigger2 = anim = 3302 && animelem = 3
x = 8
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 3303 && animelem = 6
x = 4

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3303 && animelem = 1
x = 4
y = -11.5

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3304 && animelem = 6
x = 1
y = vel y + 0.5

[State 1300, VelAdd]
type = VelAdd
trigger1= animelemtime(1) > 0
trigger1 = anim = 3303
trigger2= animelemtime(1) >= 0
trigger2 = anim = 3304
y = 0.5

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3304 && animelem = 6
x = 1
y = vel y
;==============Sounds and FX
[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 3303
trigger1 = Animelem = 1
value = 1000,4
ignorehitpause = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 3303
trigger1 = Animelem = 1
value = 200,24
channel = 0
ignorehitpause = 1

;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = anim = 3302
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 1
attr = S, HA
damage = floor(167*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3300
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = anim = 3302
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 2
attr = S, HA
damage = floor(67*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3300
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3302
trigger1 = animelem = 3
attr = S, HA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 8
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
attr = A, HA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(10) >= 0 && animelemtime(11) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(11) >= 0 && animelemtime(12) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(12) >= 0 && animelemtime(13) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(13) >= 0 && animelemtime(14) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3303
trigger1 = animelemtime(14) >= 0 
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3304
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3304
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 10030
id = 3300
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3304
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
attr = A, HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7, 8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-74
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover =0
p2stateno = 10030
id = 3300
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
trigger1 = numtarget(3300) = 0
value = stateno+1
ctrl = 0

[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
trigger1 = movehit && numtarget(3300)
value = stateno+2
ctrl = 0
ignorehitpause = 1
;================================================================================
;Landing
;================================================================================
[Statedef 3302]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3305
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, AfterImage Persist]
type = AfterImageTime
trigger1 = !time
time = 1
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Landing and DUNK
;================================================================================
[Statedef 3303]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3306
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, AfterImage Persist]
type = AfterImageTime
trigger1 = !time
time = 1
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
[State -3, Aha~]
type = PlaySnd
trigger1 = animelem = 5
value =  195,0
channel = 0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = animelemtime(5) = 1
helpertype = Normal
id = 3307
pos = 0, -224 ;50
postype = p2
facing = 1
stateno = 3307
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "LD Basketball"
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Lucky Driver Projectile
;================================================================================
[Statedef 3307]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1115
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)

[State 1050, VelSet]
type = VelSet
trigger1 = !time
x = 0
y = 3.375
[State -2, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375

[State -2, DTC]
trigger1 = 1
type = DisplayToClipboard
ignorehitpause = 1
text = "X = %f Y = %f" 
params = Vel X, Vel Y

persistent = 0
; POS X SAVER 
[State 3000000]
type = VarSet
trigger1 = 1
var(4) = ceil(pos x)
ignorehitpause = 1
; POS Y SAVER 
[State 3000000]
type = VarSet
trigger1 = 1
var(5) = ceil(pos y)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3307
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1
[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 1006
time = -1
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,35)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1
[State -2, Moves That Hit When Juggle is possible]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck
;=======================================;Effects
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10000)),(17502+(root,var(31)*10000))))
ID = 1000
pos = (ifelse(p2dist x < 0, 0, ifelse(p2dist x < 10, ceil(p2dist x), 10))),0
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50000
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,3,13)
persistent = 0
ignorehitpause = 1
;=======================================;Hitdefs
[State 1035, 9]
type = HitDef
trigger1 = anim = 3307
trigger1 = (animelemno(0) = [1,8])
attr = A, HP   
animtype = hard 
damage = floor(58*ifelse(var(56),1.25,1)),8
guardflag = L   
hitflag = MAFD  
hitsound = -1
guardsound = s3+(var(32)*2), 13              
sparkno = -1
sparkxy = -10, -14    
guard.sparkno = -1
guard.sparkxy = 0, -14   
priority = 5, Hit                                          
pausetime = 1,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24                                                                  
ground.velocity = 0
guard.velocity = -11.1796875
air.type = High
air.velocity = -6,10
air.hittime = 2
air.juggle = 0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.xvelocity = -2*(p2statetype=A)
fall.yvelocity = -2-(p2statetype=A)*4
persistent = 0
down.velocity = -4,-7.75341796875
id = 3307
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
p1sprpriority = 4

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3307) && movehit
value = 10060
persistent = 0
ignorehitpause = 1
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

[State 1005, End]
type=changeState
trigger1= movecontact
value=1006
ignorehitpause = 0
persistent = 0

[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1002
;================================================================================
;DEATH OR HELL 
;================================================================================
[Statedef 3400]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1
;================================================================================;Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*4)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15400+(var(31)*100)
pos = 30,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15401+(var(31)*100)
pos = 30,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 29
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 13
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1
ignorehitpause = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3400
trigger1 = animelemtime(3) < 0
value = SCA
;================================================================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3400

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 23
Movetype = I 
;=======================================;Effects
[State -3, Aha~]
type = PlaySnd
trigger1 = animelem = 5
value =  195,0
channel = 0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = animelemtime(5) = 1
helpertype = Normal
id = 3401
pos = -8, -224 ;50
postype = p2
facing = 1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(7) = 1
helpertype = Normal
id = 3401
pos = 0, -224 ;50
postype = p2
facing = -1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(9) = 1
helpertype = Normal
id = 3401
pos = 8, -224 ;50
postype = p2
facing = 1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(11) = 1
helpertype = Normal
id = 3401
pos = 16, -224 ;50
postype = p2
facing = -1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(13) = 1
helpertype = Normal
id = 3401
pos = -8, -224 ;50
postype = p2
facing = 1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(15) = 1
helpertype = Normal
id = 3401
pos = 0, -224 ;50
postype = p2
facing = -1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(17) = 1
helpertype = Normal
id = 3401
pos = 8, -224 ;50
postype = p2
facing = 1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(19) = 1
helpertype = Normal
id = 3401
pos = 16, -224 ;50
postype = p2
facing = -1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(5) = 1
helpertype = Normal
id = 3401
pos = -8, -224 ;50
postype = p2
facing = 1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(7) = 1
helpertype = Normal
id = 3401
pos = 0, -224 ;50
postype = p2
facing = -1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(9) = 1
helpertype = Normal
id = 3401
pos = 8, -224 ;50
postype = p2
facing = 1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
[State 1000: Helper]
type = helper
trigger1 = animelemtime(21) = 1
helpertype = Normal
id = 3401
pos = 0, -224 ;50
postype = p2
facing = -1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Death or Hell Basketball"
;================================================================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Death or Hell Projectile
;================================================================================
[Statedef 3401]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1115
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)

[State 1050, VelSet]
type = VelSet
trigger1 = !time
x = 0
y = 3.375
[State -2, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375

[State -2, DTC]
trigger1 = 1
type = DisplayToClipboard
ignorehitpause = 1
text = "X = %f Y = %f" 
params = Vel X, Vel Y

persistent = 0
; POS X SAVER 
[State 3000000]
type = VarSet
trigger1 = 1
var(4) = ceil(pos x)
ignorehitpause = 1
; POS Y SAVER 
[State 3000000]
type = VarSet
trigger1 = 1
var(5) = ceil(pos y)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3307
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1
[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 1006
time = -1
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,35)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1
[State -2, Moves That Hit When Juggle is possible]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck
;=======================================;Effects
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10000)),(17502+(root,var(31)*10000))))
ID = 1000
pos = (ifelse(p2dist x < 0, 0, ifelse(p2dist x < 10, ceil(p2dist x), 10))),0
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50000
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,3,13)
persistent = 0
ignorehitpause = 1
;=======================================;Hitdefs
[State 1035, 9]
type = HitDef
trigger1 = anim = 3307
trigger1 = (animelemno(0) = [1,8])
attr = A, HP   
animtype = hard 
damage = floor(25*ifelse(var(56),1.25,1)),8
guardflag = M   
hitflag = MAFD  
hitsound = -1
guardsound = s3+(var(32)*2), 13              
sparkno = -1
sparkxy = -10, -14    
guard.sparkno = -1
guard.sparkxy = 0, -14   
priority = 5, Hit                                          
pausetime = 1,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24                                                                  
ground.velocity = 0
guard.velocity = -11.1796875
air.type = High
air.velocity = -6,10
air.hittime = 2
air.juggle = 0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.xvelocity = -2*(p2statetype=A)
fall.yvelocity = -2-(p2statetype=A)*4
persistent = 0
down.velocity = -4,-7.75341796875
id = 3307
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
p1sprpriority = 4

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3307) && movehit
value = 10060
persistent = 0
ignorehitpause = 1
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

[State 1005, End]
type=changeState
trigger1= movecontact
value=1006
ignorehitpause = 0
persistent = 0

[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1002