;================================================================================
; SPECIALS
;================================================================================
;DISBAW/BASEBALL/DEATH BOUND
[Statedef 1000]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[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,1000,1010)
;=======================================;Variables
[State 1000, Projectile Strength]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),4,7)
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1000
trigger2 = anim = 1010
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animelemtime(2) >= 3
triggerall = numhelper(1001)
triggerall = helper(1001),rootdist x != 40
trigger1 = anim = 1000
trigger2 = anim = 1010
value = 1015
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1001 && animelem = 5
trigger2 = anim = 1011 && animelem = 5
trigger3 = anim = 1015 && animelem = 6
movetype = I 
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1000 && animelem = 1
trigger2 = anim = 1010 && animelem = 1
value=200,3
channel=0 
[State 5100, snd]
type = PlaySnd
trigger1 = anim = 1001 && animelem = 1
trigger2 = anim = 1011 && animelem = 1
value = 2+(var(32)*10), 0
[State 5100, snd]
type = PlaySnd
trigger1 = anim = 1001 && animelem = 3
trigger2 = anim = 1011 && animelem = 3
value = 1000,4

[State 3303, Explod]
type = Explod
trigger1 = anim = 1001 && animelem = 3
trigger2 = anim = 1011 && animelem = 3
anim = 12000
pos = 56,0
postype = p1  
sprpriority = 0
ownpal = 1
persistent = 0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = anim = 1000
trigger1 = animelem = 2
trigger2 = anim = 1010
trigger2 = animelem = 2
helpertype = Normal
id = 1001
pos = -40, -240 ;50
postype = p1
facing = 1
stateno = 1001
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Basketball"

[State 1000: Helper]
type = helper
trigger1 = anim = 1001 || anim = 1011
trigger1 = animelemtime(3) = 1
helpertype = Normal
id = 1005
pos = 56, -8 ;50
postype = p1
facing = 1
stateno = 1005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "DB Basketball"
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = Anim = 1015
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(5) >= 0 && animelemtime(6) < 0
attr = S, SA
damage = floor(100*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-72
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 980
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = !animtime
trigger1 = anim = 1001
trigger2 = anim = 1011
trigger3 = anim = 1015
value = 0
ctrl = 1

;Falling Basketball
[Statedef 1001]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1002
sprpriority = 4
;=======================================;Vels
[State 1300, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 4
[State 1300, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.125
;=======================================;Effects
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = time = 20
trigger1 = root,stateno = 1000
trigger1 = rootdist x = 40

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

;Rebounding Basketball 1
[Statedef 1002]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
;=======================================;Vels
[State 1300, VelSet]
type = VelSet
trigger1 = time = 0
x = -1
y = -5
[State 1300, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375
;=======================================;Effects
[State 5100, snd]
type = PlaySnd
trigger1 = !time
value = 1000,5
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = !animtime

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

;Rebounding Basketball 2
[Statedef 1003]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
;=======================================;Vels
[State 1300, VelSet]
type = VelSet
trigger1 = time = 0
x = -1
y = -2
[State 1300, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;================================================================================
;Death Bound Projectile
;================================================================================
[Statedef 1005]
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) = 1015
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time 
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 4
trigger1 = time = 4
x = 4.94975280761719
y = -4.94975280761719
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 7
trigger1 = time = 4
x = 5.82026672363281
y = -3.88900756835938
; 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 = 1003 
ignorehitpause = 1
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = anim = 1003 && !animtime
Value = 1005 
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
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
;=======================================;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

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
trigger1 = anim = 1003
trigger1 = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,2])
trigger2 = anim = 1005
trigger2 = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger2 = (animelemno(0) = [1,8])
attr = S, SP
damage = floor(67*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;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
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;Projectile Rebound 1
[Statedef 1006]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1006
sprpriority = 4
;=======================================;Projectile Properties
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Vels
[State 1300, VelSet]
type = VelSet
trigger1 = time = 0
x = -1
y = 0
[State 1300, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;Projectile Rebound 2
[Statedef 1007]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
;=======================================;Vels
[State 1300, VelSet]
type = VelSet
trigger1 = time = 0
x = -1
y = -5
[State 1300, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375
;=======================================;Effects
[State 5100, snd]
type = PlaySnd
trigger1 = !time
value = 1000,5
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = !animtime

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

;Rebounding Basketball 2
[Statedef 1008]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
;=======================================;Vels
[State 1300, VelSet]
type = VelSet
trigger1 = time = 0
x = -1
y = -3
[State 1300, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;================================================================================
;Reflected Projectiles
;================================================================================
[Statedef 1015]
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) = 1005
;=======================================;Movement
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 4
trigger1 = !time 
x = -4.94975280761719
y = -4.94975280761719
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 7
trigger1 = !time
x = -5.82026672363281
y = -3.88900756835938
; 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
Value = 1005 
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
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
;=======================================;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

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
affectteam = F
guard.dist = 0
trigger1 = anim = 1005
trigger1 = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,8])
attr = S, SP
damage = floor(67*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;
[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time
[State 1007, Turn]
type = Turn
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
persistent = 0
ignorehitpause = 1 
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 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
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
; SPECIALS
;================================================================================
;DISDAN/DEATH DUNK
[Statedef 1100]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[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,1100,1110)
;=======================================;Variables
[State 1000, Projectile Strength]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),4,7)
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1100 || anim = 1110
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 
trigger2 = anim = 1111 
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1101 && animelem = 1
x = 0.5
y = -6
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(1) > 0
trigger1 = anim = 1101
y = 0.3125

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1111 && animelem = 1
x = 1
y = -7
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(1) > 0
trigger1 = anim = 1111
y = 0.3125
;=======================================;Effects
[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1101 && animelem = 1
trigger2 = anim = 1111 && animelem = 1
value = 2+(var(32)*10),4 
[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1101 && animelem = 8
trigger2 = anim = 1111 && animelem = 9
value = 4,8
[State 200, snd]
type=playsnd
trigger1 = anim = 1100 && animelem = 1
trigger2 = anim = 1110 && animelem = 1
value=200,4
channel=0 
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = anim = 1101
trigger1 = animelemtime(8) = 1
helpertype = Normal
id = 1105
pos = 114, -80 ;50
postype = p1
facing = 1
stateno = 1105
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "DD Basketball"

[State 1000: Helper]
type = helper
trigger1 = anim = 1111
trigger1 = animelemtime(9) = 1
helpertype = Normal
id = 1105
pos = 97, -53 ;50
postype = p1
facing = 1
stateno = 1105
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "DD Basketball"
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;================================================================================
;Death Dunk Landing
;================================================================================
[Statedef 1101]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2

;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1102+(cond(anim=1101,10,0))
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[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

;================================================================================
;Death Dunk Projectile
;================================================================================
[Statedef 1105]
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) = 1015
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 4
trigger1 = !time
x = 2.6788330078125
y = 6.46711730957031 
persistent = 0
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 7
trigger1 = !time
x = 3.88900756835938
y = 5.82026672363281
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 = 1103 
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
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
;=======================================;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

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
trigger1 = anim = 1103
trigger1 = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,8])
attr = S, SP
damage = floor(75*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;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 = stateno+1
ctrl = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;================================================================================
;Death Dunk Projectile
;================================================================================
[Statedef 1106]
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) = 1015
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time 
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 4
trigger1 = time = 2
x = 2.6788330078125
y = -6.46711730957031
[State 1050, VelSet]
type = VelSet
triggerall = var(15) = 7
trigger1 = time = 2
x = 3.88900756835938
y = -5.82026672363281
; 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 
Value = 1104 
ignorehitpause = 1
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = anim = 1104 && !animtime
Value = 1103
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
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
;=======================================;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

[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 40, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 1000,4
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,3,13)
persistent = 0

[State 3303, Explod]
type = Explod
trigger1 = !time
anim = 12000
pos = 0,0
postype = p1  
sprpriority = 0
ownpal = 1
persistent = 0
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
trigger1 = anim = 1104
trigger1 = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = animelem = 1
trigger2 = anim = 1103
trigger2 = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger2 = (animelemno(0) = [1,8])
attr = S, SP
damage = floor(75*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;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
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;Cyclone Break
[Statedef 1200]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[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 = ifelse(var(5)=0,1200,1210)
;=======================================;Variables
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1200 || anim = 1210
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1201 
trigger2 = anim = 1211 
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1201 && animelem = 1
x = 7
y = -8.75
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(1) > 0
trigger1 = anim = 1201
y = 1.1875

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1211 && animelem = 1
x = 9
y = -8.75
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(1) > 0
trigger1 = anim = 1211
y = 1.1875
;=======================================;Effects
[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1201 && animelem = 1
trigger2 = anim = 1211 && animelem = 1
value = 4,5
[State 200, snd]
type=playsnd
trigger1 = anim = 1200 && animelem = 1
trigger2 = anim = 1210 && animelem = 1
value=200,5
channel=0 
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = anim = 1201
trigger1 = animelem = 1
trigger2 = anim = 1211
trigger2 = animelem = 1
helpertype = Normal
id = 1202
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 1202
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "CB FX"
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = anim = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 1
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-134
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 2
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-134
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 3
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-80
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 4
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-52
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 5
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-34
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 6
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-134
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 7
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-80
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1201
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 8
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-50
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 1
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-134
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 2
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-134
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 3
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-80
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 4
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-52
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 5
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-34
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 6
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-134
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 7
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-80
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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 = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElem = 8
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-50
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = h
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 = 94,94
givepower = 16,16
id = 1200
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
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;================================================================================
;Cyclone Break Landing
;================================================================================
[Statedef 1201]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2

;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1202+(cond(anim=1201,10,0))
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[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
;================================================================================
;Cyclone Break FX
;================================================================================
[Statedef 1202]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1203
sprpriority = 4
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = !time
time = 11
facing = 1
pos = 0,0
;=======================================;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
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = time < 12
trigger1 = root,stateno != 1200
trigger2 = !animtime

;Lucky Vision
[Statedef 1300]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[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 = ifelse(var(5)=0,1300,1310)
;=======================================;Variables
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1300 || anim = 1310
trigger2 = anim = 1301 || anim = 1311
value = anim+1
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1302 && animelem = 1
trigger2 = anim = 1312 && animelem = 1
movetype = I
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1301 && animelem = 1
trigger2 = anim = 1311 && animelem = 1
x = 11

[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1302 && animelem = 1
trigger2 = anim = 1312 && animelem = 1
x = 11

[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1302 && animelemtime(1)> 0
trigger2 = anim = 1312 && animelemtime(1)> 0
x = 0.8671875

[State 750, Push]
type = PlayerPush
trigger1 = anim = 1301 
trigger2 = anim = 1311 
value = 0
[State 750, Push]
type = PlayerPush
trigger1 = anim = 1302 && animelem = 1
trigger2 = anim = 1312 && animelem = 1
value = 1
;=======================================;Effects
[State 310, AfterImageNotGC]
type = AfterImage
trigger1 = anim = 1301 && animelem = 1
trigger2 = anim = 1311 && animelem = 1
time = 10
length = 9
framegap = 3
palcontrast = 256,256,256
paladd = 0,0,0
palmul = 1,1,1

[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1301 && animelem = 1
trigger2 = anim = 1311 && animelem = 1
value = 1000,6
[State 200, snd]
type=playsnd
trigger1 = anim = 1300 && animelem = 1
trigger2 = anim = 1310 && animelem = 1
value=200,6
channel=0 

[State 3303, Explod]
type = Explod
trigger1 = anim = 1301 && animelem = 1
trigger2 = anim = 1311 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
facing = 1
persistent = 0
persistent = 0
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Death Shoot
[Statedef 1400]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[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 = 1400
;=======================================;Variables
[State 1000, Projectile Strength]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),46,ifelse((helper(10371), var(3) = [1,3]),110,ifelse((helper(10371), var(1) = [1,3]),174,238)))
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1400 
trigger2 = anim = 1401 
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animelemtime(2) >= 3
triggerall = numhelper(1402)
triggerall = helper(1402),rootdist x != 0
trigger1 = anim = 1401
value = 1404
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1401 
trigger2 = anim = 1402
trigger3 = anim = 1404
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1401 && animelem = 1
y = -4 

[State 1500, VelMul] 
type = VelAdd
trigger1 = anim = 1401 && animelemtime(1)> 0
trigger2 = anim = 1402 && animelemtime(1)> 0
trigger3 = anim = 1404 && animelemtime(1)> 0
y = 0.25

;=======================================;Effects
[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1401 && animelem = 1
value = 2+(var(32)*10),4 
[State 200, snd]
type=playsnd
trigger1 = anim = 1402 && animelem = 1
trigger2 = anim = 1404 && animelem = 1
value=200,7
channel=0 
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = anim = 1400
trigger1 = animelem = 1
helpertype = Normal
id = 1402
pos = 0, -290 ;50
postype = p1
facing = 1
stateno = 1402
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "Basketball"

[State 1000: Helper]
type = helper
trigger1 = anim = 1402 
trigger1 = animelemtime(2) = 1
helpertype = Normal
id = 1405
pos = 16, -177 ;50
postype = p1
facing = 1
stateno = 1405
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
name = "DS Basketball"
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = Anim = 1404
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(5) >= 0 && animelemtime(6) < 0
attr = S, SA
damage = floor(100*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-72
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  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 980
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;================================================================================
;Death Shoot Landing
;================================================================================
[Statedef 1401]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2

;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1403
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[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

;Falling Basketball
[Statedef 1402]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1002
sprpriority = 4
;=======================================;Vels
[State 1300, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 4
[State 1300, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.125
;=======================================;Effects
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = time = 17
trigger1 = root,stateno = 1400
trigger1 = rootdist x = 0

[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1002
ctrl = 0
;================================================================================
;Death Shoot Projectile
;================================================================================
[Statedef 1405]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)

[State 1050, VelSet]
type = VelSet
trigger1 = !time
x = 0
y = -10
[State -2, VelAdd]
type = VelAdd
trigger1 = time > 0
y = 0.375
[State 1050, PosAdd]
type = PosAdd
trigger1 = animelemtime(1)=0
trigger2 = animelemtime(1)=1
x = 1
[State 1050, PosAdd]
type = PosAdd
trigger1 = animelemtime(1)=2
x = var(15)
y = -71
[State 1050, VelSet]
type = VelSet
trigger1 = animelemtime(1)=2
x = 0
y = 3

[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 = 1405
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
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
;=======================================;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

[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

;=======================================;Hitdefs
[State 210, 1]
type = HitDef
trigger1 = anim = 1405
trigger1 = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,8])
attr = , SA
damage = floor(83*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;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 = ChangeAnim
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1002

[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1002
ctrl = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

[Statedef 1500]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[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 = ifelse(var(5)=0,1500,1520)
;=======================================;Variables
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1500 || anim = 1520 || anim = 1521
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1501 
trigger2 = anim = 1522
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1501 && animelem = 1
x = 2.5
y = -8
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(1) > 0
trigger1 = anim = 1501
y = .5

[State 1017, PosAdd]
type = PosAdd
trigger1 = anim = 1520 && animelem = 2
trigger2 = anim = 1520 && animelem = 3
x = 8

[State 1017, PosAdd]
type = PosAdd
triggerall = anim = 1521 
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 8
x = 12
ignoreHitPause = 1

[State 1017, PosAdd]
type = PosAdd
triggerall = anim = 1521 
trigger1 = animelem = 7
trigger2 = animelem = 9
x = 8
ignoreHitPause = 1

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

[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(1) > 0
trigger1 = anim = 1522
y = .5
;=======================================;Effects
[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1501 && animelem = 1
trigger2 = anim = 1522 && animelem = 1
value = 1000,0
channel = 4
[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 1521
trigger1 = Animelem = 1
value = 1000,3
channel = 4
[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1501 && animelem = 6
trigger2 = anim = 1522 && animelem = 6
value = 4,8
channel = 4
[State 200, snd]
type=playsnd
trigger1 = anim = 1500 && animelem = 1
trigger2 = anim = 1520 && animelem = 1
value=200,8
channel=0 

[State 3303, Explod]
type = Explod
trigger1 = anim = 1521 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1501
trigger1 = animelemtime(1)>= 0 && animelemtime(2) < 0
attr = S, SA
damage = floor(58*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 10, 11
guard.pausetime = 11,11
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-94
hitsound = s3+(var(32)*2),9
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 = 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
p2stateno = 10030
id = 1500
persistent = 0

[State 1035, 9]
type = HitDef
triggerall = anim = 1501
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(7) >= 0 && Animelemtime(8) < 0
attr = A, SA    
animtype = hard 
damage = floor(58*ifelse(var(56),1.25,1)),8
guardflag = H   
hitflag = MAF  
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 12              
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -106    
guard.sparkno = s17502+(var(31)*10000)   
priority = 5, Hit                                          
pausetime = 10, 11
guard.pausetime = 11,11
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24                                                                  
ground.velocity = 0
guard.velocity = -11.1796875
ground.type = low
air.type = High
air.velocity = -6,10
air.hittime = 2
air.juggle = 0
getpower = 47,47
givepower = 16,16
p2stateno = 10060
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
persistent = 0
fall.xvelocity = -2*(p2statetype=A)
fall.yvelocity = -2-(p2statetype=A)*4
id = 1500
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1521
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = animelemtime(1)>= 0 && animelemtime(2) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7, 8
guard.pausetime = 7,7
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-64
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
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 = 94,94
givepower = 16,16
id = 1500
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 = 1521
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = animelemtime(7)>= 0 && animelemtime(8) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7, 12
guard.pausetime = 7,7
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-64
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
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 = 94,94
givepower = 16,16
id = 1500
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 = 1522
trigger1 = animelemtime(1)>= 0 && animelemtime(2) < 0
attr = A, SA
damage = floor(66*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 10, 11
guard.pausetime = 11,11
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-94
hitsound = s3+(var(32)*2),9
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 = 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
p2stateno = 10030
id = 1500
persistent = 0

[State 1035, 9]
type = HitDef
triggerall = anim = 1522
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(7) >= 0 && Animelemtime(8) < 0
attr = A, SA    
animtype = hard 
damage = floor(66*ifelse(var(56),1.25,1)),8
guardflag = H   
hitflag = MAF  
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 12              
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -106    
guard.sparkno = s17502+(var(31)*10000)   
priority = 5, Hit                                          
pausetime = 10, 11
guard.pausetime = 11,11
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24                                                                  
ground.velocity = 0
guard.velocity = -11.1796875
ground.type = low
air.type = High
air.velocity = -6,10
air.hittime = 2
air.juggle = 0
getpower = 47,47
givepower = 16,16
p2stateno = 10060
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
persistent = 0
fall.xvelocity = -2*(p2statetype=A)
fall.yvelocity = -2-(p2statetype=A)*4
id = 1500
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Death Heel Landing
;================================================================================
[Statedef 1501]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1502+(cond(anim=1501,21,0))
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[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
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1