;================================================================================
; SPECIALS
;================================================================================
;Psycho Ball
[Statedef 1000]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
anim = ifElse((helper(10371), var(0) = [1,3]),1000,1010)

;Statetype

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1000 && animelem = 15
trigger2 = anim = 1010 && animelem = 16
movetype = I  

;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),4,7)

;Sounds and Effects
[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 200,3
channel = 0
persistent = 0
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1000 && animelem = 14
trigger2 = anim = 1010 && animelem = 15
value = 1000,0

;Helpers 

[State 1000: Helper]
type = helper
trigger1 = anim = 1000 && animelem = 14
trigger2 = anim = 1010 && animelem = 15
helpertype = Normal
id = 1005
pos = 32, 0 ;50
postype = p1
facing = 1
stateno = 1005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

;End

[State 1000, 6]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1

;Psycho Ball 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) = 1007
;=======================================;

;Variables

[State 1050, VelSet];Projectile Strength
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet];Projectile Speed
type = VelSet
trigger1 = time = 1
x = var(15)

[State 3000000] ; POS X SAVER 
type = VarSet
trigger1 = 1
var(4) = ceil(pos x)
ignorehitpause = 1
[State 3000000] ; POS Y SAVER 
type = VarSet
trigger1 = 1
var(5) = ceil(pos y)

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 0
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];Cornerpush
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

;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
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, HP
ignorehitpause = 1

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

;Sounds and Effects

[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 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,3,13)
persistent = 0


[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 < 14, ceil(p2dist x), 14)),-60
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Hitdef

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, NP
damage = floor((ifelse(root,var(15)=4,75,100))*ifelse(root,var(56),1.25,1)),10
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 3, Hit
sparkno = -1
sparkxy = -10, -40
hitsound = -1
guardsound = 3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
pausetime = 1,12
guard.pausetime = 0,11
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity =  -11.1796875
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
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5

[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

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

;Recovery
[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 1006]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1006 
sprpriority = 4

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

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 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 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

[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

;Psycho Ball Projectile (Reflected)
[Statedef 1007]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1

[State 1005, VarSet]
type = VarSet
trigger1 = !time 
var(54) = 0
persistent = 0

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

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

; 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)

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 1005 
ignorehitpause = 1

[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 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 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,3,13)
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 0
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 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 < 14, ceil(p2dist x), 14)),-60
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 210, 1]
type = HitDef
affectteam = F
guard.dist = 0
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, NP
damage = floor((ifelse(root,var(15)=4,75,100))*ifelse(root,var(56),1.25,1)),10
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 3, Hit
sparkno = -1
sparkxy = -10, -40
hitsound = -1
guardsound = 3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
pausetime = 1,12
guard.pausetime = 0,11
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity =  -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity =-4.5, -7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
;=======================================;
;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

[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

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

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

[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

;Psycho Sword (Ground)
[Statedef 1100]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 10              
velset = 0,0                    
ctrl = 0                       
poweradd= 100                                
sprpriority = 2
facep2 = 1
anim = ifElse((helper(10371), var(0) = [1,3]),1100,1110)

;=============Anims and StateType
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 
trigger2 = anim = 1111
StateType = A
ignoreHitPause = 1
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 && animelem = 32
movetype = I
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1112 && animelemtime(1) = 1
movetype = I
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1100 && animtime = 0
trigger2 = anim = 1110 && animtime = 0
value = anim+1
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1101 && animtime = 0
trigger2 = anim = 1111 && animtime = 0
value = anim+1

[State 1251, NotHitBy]
type = NotHitBy
trigger1 = anim = 1100
trigger1 = animelemtime(3) < 0
trigger2 = anim = 1110
trigger2 = animelemtime(6) < 0
value = , NA, SA, HA, NP, SP, HP
time = 1

;============== Vels && Movement
[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1100 && animelem = 7
x = 8
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1101 && animelem = 1
x = 1.75
y = -6
[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1101 && animelemtime(1)> 0
trigger2 = anim = 1102 && animelemtime(1)> 0
y = 0.3125
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1101 && animelemtime(1)> 0
x = 0.899998
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1102 && animelem = 1
trigger2 = anim = 1112 && animelem = 1
x = 0
y = 0

[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1110 && animelem = 8
x = 8
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1111 && animelem = 1
x = 1.75
y = -8.5
[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1111 && animelemtime(1)> 0
trigger2 = anim = 1112 && animelemtime(1)> 0
y = 0.375
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1111 && animelemtime(1)> 0
x = 0.899998
;==============Effects
[State 1000: Helper]
type = Helper
trigger1 = anim = 1100
trigger1 = animelem = 1
helpertype = Normal
id = 1105
pos = 96,-68 ;50
postype = p1
facing = 1
stateno = 1105
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper]
type = Helper
trigger1 = anim = 1110
trigger1 = animelem = 1
helpertype = Normal
id = 1106
pos = 96,-68 ;50
postype = p1
facing = 1
stateno = 1106
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1100 || anim = 1110
trigger1 = animelem = 1
value = 200,4
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1101 || anim = 1111
trigger1 = animelem = 1
value = 1000,1
persistent = 0
;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1100
trigger1 = animelemtime(3)>=0 && animelemtime(5) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1100
trigger1 = animelemtime(5)>=0 && animelemtime(7) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-50
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1100
trigger1 = animelemtime(7)>=0 
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-68
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1101
trigger1 = animelemtime(1)>=0 && animelemtime(5) < 0
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1101
trigger1 = animelemtime(5)>=0 && animelemtime(10) < 0
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1101
trigger1 = animelemtime(10)>=0 && animelemtime(15) < 0
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1101
trigger1 = animelemtime(15)>=0 
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-102
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  = 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
persistent = 0
p2stateno = 10030


[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1110
trigger1 = animelemtime(4)>=0 && animelemtime(6) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1110
trigger1 = animelemtime(6)>=0 && animelemtime(8) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-50
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1110
trigger1 = animelemtime(8)>=0 
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-68
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1111
trigger1 = animelemtime(1)>=0 && animelemtime(5) < 0
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1111
trigger1 = animelemtime(5)>=0 && animelemtime(10) < 0
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1111
trigger1 = animelemtime(10)>=0 && animelemtime(15) < 0
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1111
trigger1 = animelemtime(15)>=0 
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-102
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  = 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
persistent = 0
p2stateno = 10030

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

;---------------------------
;Land
[Statedef 1101]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1103+(cond(anim=1112,10,0))

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

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

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

;Psycho Sword A FX
[Statedef 1105]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1104
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Anims
[State 1415, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1104
trigger1 = root,anim = 1101
trigger1 = root,animelemtime(1)= 0
trigger2 = anim = 1105
trigger2 = root,anim = 1102
trigger2 = root,animelemtime(1)= 0
value = anim+1

;Effects
[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

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(1)>= 0) && (root,animelemtime(3)<0)
time = 1
pos = -24,-94
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(3)>= 0) && (root,animelemtime(5)<0)
time = 1
pos = 40,-24
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(5)>= 0) && (root,animelemtime(7)<0)
time = 1
pos = 38,-32
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(7)>= 0) 
time = 1
pos = 40,-114

[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1105
triggerall = root,anim = 1101
trigger1 = (root,animelemtime(1)>= 0) 
time = 1
pos = 0,0

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = anim = 1104 || anim = 1105
trigger1 = root,stateno != 1100
trigger2 = anim = 1106
trigger2 = animtime = 0

;Psycho Sword C FX
[Statedef 1106]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1104
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Anims
[State 1415, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1104
trigger1 = root,anim = 1111
trigger1 = root,animelemtime(1)= 0
trigger2 = anim = 1105
trigger2 = root,anim = 1112
trigger2 = root,animelemtime(1)= 0
value = anim+1

;Effects
[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

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(1)>= 0) && (root,animelemtime(2)<0)
time = 1
pos = -16,-94
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(2)>= 0) && (root,animelemtime(4)<0)
time = 1
pos = -24,-94
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(4)>= 0) && (root,animelemtime(6)<0)
time = 1
pos = 40,-24
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(6)>= 0) && (root,animelemtime(8)<0)
time = 1
pos = 38,-32
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(8)>= 0) 
time = 1
pos = 40,-114

[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1105
triggerall = root,anim = 1111
trigger1 = (root,animelemtime(1)>= 0) 
time = 1
pos = 0,0

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = anim = 1104 || anim = 1105
trigger1 = root,stateno != 1100
trigger2 = anim = 1106
trigger2 = animtime = 0

;Psycho Sword (Air)
[Statedef 1120]
type    = A                     
movetype= A                    
physics = N                     
juggle  = 10              
velset = 0,0                    
ctrl = 0                       
poweradd= 100                                
sprpriority = 2
facep2 = 1
anim = ifElse((helper(10371), var(0) = [1,3]),1100,1110)

;=============Anims and StateType
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 && animelem = 32
movetype = I
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1112 && animelemtime(1) = 1
movetype = I
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1100 && animtime = 0
trigger2 = anim = 1110 && animtime = 0
value = anim+1
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1101 && animtime = 0
trigger2 = anim = 1111 && animtime = 0
value = anim+1

[State 1251, NotHitBy]
type = NotHitBy
trigger1 = anim = 1100
trigger1 = animelemtime(3) < 0
trigger2 = anim = 1110
trigger2 = animelemtime(6) < 0
value = , NA, SA, HA, NP, SP, HP
time = 1

;============== Vels && Movement
[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1100 && animelem = 7
x = 8
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1101 && animelem = 1
x = 1.75
y = -6
[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1101 && animelemtime(1)> 0
trigger2 = anim = 1102 && animelemtime(1)> 0
y = 0.3125
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1101 && animelemtime(1)> 0
x = 0.899998
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1102 && animelem = 1
trigger2 = anim = 1112 && animelem = 1
x = 0
y = 0

[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1110 && animelem = 8
x = 8
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1111 && animelem = 1
x = 1.75
y = -8.5
[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1111 && animelemtime(1)> 0
trigger2 = anim = 1112 && animelemtime(1)> 0
y = 0.375
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1111 && animelemtime(1)> 0
x = 0.899998
;==============Effects
[State 1000: Helper]
type = Helper
trigger1 = anim = 1100
trigger1 = animelem = 1
helpertype = Normal
id = 1125
pos = 96,-68 ;50
postype = p1
facing = 1
stateno = 1125
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper]
type = Helper
trigger1 = anim = 1110
trigger1 = animelem = 1
helpertype = Normal
id = 1126
pos = 96,-68 ;50
postype = p1
facing = 1
stateno = 1126
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1100 || anim = 1110
trigger1 = animelem = 1
value = 200,4
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1100 || anim = 1110
trigger1 = animelem = 1
value = 1000,1
persistent = 0
;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1100
trigger1 = animelemtime(3)>=0 && animelemtime(5) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1100
trigger1 = animelemtime(5)>=0 && animelemtime(7) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1100
trigger1 = animelemtime(7)>=0 
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1101
trigger1 = animelemtime(1)>=0 && animelemtime(5) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1101
trigger1 = animelemtime(5)>=0 && animelemtime(10) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1101
trigger1 = animelemtime(10)>=0 && animelemtime(15) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1101
trigger1 = animelemtime(15)>=0 
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-102
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  = 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
persistent = 0
p2stateno = 10030


[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1110
trigger1 = animelemtime(4)>=0 && animelemtime(6) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
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
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 = 1110
trigger1 = animelemtime(6)>=0 && animelemtime(8) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1110
trigger1 = animelemtime(8)>=0 
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1111
trigger1 = animelemtime(1)>=0 && animelemtime(5) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1111
trigger1 = animelemtime(5)>=0 && animelemtime(10) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1111
trigger1 = animelemtime(10)>=0 && animelemtime(15) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
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  = 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
persistent = 0
p2stateno = 10030
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1111
trigger1 = animelemtime(15)>=0 
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 3, 5
guard.pausetime = 3,5
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-102
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  = 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
persistent = 0
p2stateno = 10030

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

;Psycho Sword A FX
[Statedef 1125]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1104
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Anims
[State 1415, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1104
trigger1 = root,anim = 1101
trigger1 = root,animelemtime(1)= 0
trigger2 = anim = 1105
trigger2 = root,anim = 1102
trigger2 = root,animelemtime(1)= 0
value = anim+1

;Effects
[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

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(1)>= 0) && (root,animelemtime(3)<0)
time = 1
pos = -24,-94
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(3)>= 0) && (root,animelemtime(5)<0)
time = 1
pos = 40,-24
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(5)>= 0) && (root,animelemtime(7)<0)
time = 1
pos = 38,-32
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1100
trigger1 = (root,animelemtime(7)>= 0) 
time = 1
pos = 40,-114

[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1105
triggerall = root,anim = 1101
trigger1 = (root,animelemtime(1)>= 0) 
time = 1
pos = 0,0

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = anim = 1104 || anim = 1105
trigger1 = root,stateno != 1120
trigger2 = anim = 1106
trigger2 = animtime = 0

;Psycho Sword C FX
[Statedef 1126]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1104
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Anims
[State 1415, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1104
trigger1 = root,anim = 1111
trigger1 = root,animelemtime(1)= 0
trigger2 = anim = 1105
trigger2 = root,anim = 1112
trigger2 = root,animelemtime(1)= 0
value = anim+1

;Effects
[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

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(1)>= 0) && (root,animelemtime(2)<0)
time = 1
pos = -16,-94
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(2)>= 0) && (root,animelemtime(4)<0)
time = 1
pos = -24,-94
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(4)>= 0) && (root,animelemtime(6)<0)
time = 1
pos = 40,-24
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(6)>= 0) && (root,animelemtime(8)<0)
time = 1
pos = 38,-32
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1104
triggerall = root,anim = 1110
trigger1 = (root,animelemtime(8)>= 0) 
time = 1
pos = 40,-114

[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1105
triggerall = root,anim = 1111
trigger1 = (root,animelemtime(1)>= 0) 
time = 1
pos = 0,0

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = anim = 1104 || anim = 1105
trigger1 = root,stateno != 1120
trigger2 = anim = 1106
trigger2 = animtime = 0

;Psycho Reflector
[Statedef 1200]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 10              
velset = 0,0                    
ctrl = 0                       
poweradd= 100                                
sprpriority = 2
facep2 = 1
anim = 1200

;=============Variables
[State 800, VarSet];This resets the check that flags a successful reflect to Athena
type = VarSet
trigger1 = !time
var(22) = 0

[State 1000, Projectile Speed]
type = VarSet
triggerall = !numhelper(1206)
triggerall = Numhelper(1200) = 1
trigger1 = helper(1200),stateno = 1206
trigger1 = helper(1200),time = 2
v = 15
value = 7
;=============Anims and StateType
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1200
trigger2 = anim = 1201
value = anim+1

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1202
trigger1 = animelemtime(1) = 0 
Movetype = I
;==============Effects 
[State 1000, 1]
type = PlaySnd
triggerall = anim = 1200
trigger1 = animelem = 1
value = 200,5
channel = 0

;==============Helpers
[State 1000: Helper]
type = Helper
trigger1 = anim = 1200
trigger1 = animelemtime(3) = 0
helpertype = Normal
id = 1200
pos = 32, -72 
postype = p1
facing = 1
stateno = 1205
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 1000: Helper]
type = helper
triggerall = !numhelper(1206)
triggerall = Numhelper(1200) = 1
trigger1 = helper(1200),stateno = 1206
trigger1 = helper(1200),time = 2
helpertype = Normal
id = 1005
pos = 32, 0 ;50
postype = p1
facing = 1
stateno = 1005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

;==============Hitdef
[State 210, 1]
type = HitDef
triggerall = numtarget(1020) = 0
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1201
trigger1 = animelemtime(6) >= 0
attr = , SA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -70
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  = 17
ground.velocity = -4.5,-7
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1020
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
persistent = 0

[State 1000, 7]
type = ChangeAnim
triggerall = anim = 1201
trigger1 = movecontact && numtarget(1020)
trigger2 = var(22) = 1
value = 1202
ignorehitpause = 0

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


;Light Psycho Reflector helper
[Statedef 1205]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0, 0
anim = 1205
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                  	;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time && !prevstateno
sysvar(0) = 262144
;=======================================;

;Helper Projectiles are reflected by this Reversaldef
[State 1301, REFLECTOR]
type = ReversalDef
trigger1 = time = 0
reversal.attr = SCA,NP,SP,HP
pausetime = 0,0
sparkno = -1
sparkxy = 0,0
p1stateno = stateno+1
p2stateno = stateno+2
id = 1201
numhits = 0

;This is to ensure that only projectiles can hit this helper
[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

;The hitoverride is for projectile type projectiles. The attr in theory could override any attack, 
;but since it can only be hit by projectiles, it naturally only overrides projectiles 
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno+1
time = -1
ignorehitpause = 1

[State 10005]
type = BindToParent
trigger1 = 1
pos = 32,-72
ignorehitpause = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, Punch Attempt Sound]
type = Playsnd
trigger1 = animelem = 1
value = 1000,2
persistent = 0

;By Misamu K.
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999
length = 12
palbright = 12,12,12;,136
palcontrast = 60,60,60;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = add1

[State 1000, DestroySelf]
type = ChangeState
trigger1 = root,stateno =1200
trigger1 = root,movecontact
trigger2 = root,stateno = 1200
trigger2 = root,anim = 1202
trigger3 = root,stateno != 1200
value = 1208

;---------------------------
;Successful Reflection
[Statedef 1206]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0, 0
anim = 1
sprpriority = 4

[State 1005, PROJECTILE ACTIVE]
type = ParentVarSet
trigger1 = !time 
var(22) = 1

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = time = 2
var(20) = 0

[State 1000: Helper]
type = helper
trigger1 = 1
id = 1208
pos = 0,0 ;50
postype = p1;p1
facing = 1
stateno = 1208
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1205, VarSet]
type = VarSet
trigger1 = numtarget
var(0) = target,ID
persistent = 0
ignorehitpause = 1

[State -2, DEBUG]
type = DisplayToClipboard
trigger1 = 1
text = "var(0) = %d proj = %d ID = %d";Buff = %d GNDTYPE = %d"
params = var(0),numprojid(262144),gethitvar(chainid)
ignorehitpause = 1

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;sysvar(1) = SPECIAL                    ;
;=======================================;
[State 106, VarSet]
type = VarSet
;RETURNING YOUR OWN PROJECTILE
;?????????????
trigger1 = Gethitvar(chainid)&2**17
sysvar(1) = sysvar(0)
[State 1206, ChangeState]
type = ChangeState
trigger1 = PlayerIDExist(var(0))
trigger1 = (PlayerID(var(0)),sysvar(0)=131072) 
;RETURNING YOUR OWN PROJECTILE
;?????????????
trigger2 = Gethitvar(chainid)&2**17
value = 1211
ctrl = 0
;=======================================;

[State 200, Punch Attempt Sound]
type = Playsnd
trigger1 = !time
value = 1000,3
channel = 3
persistent = 0

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 30

;---------------------------
;Reflecting A Helper projectile
[Statedef 1207]
physics = N
movetype = I
ctrl = 0

[State -2, DEBUG]
type = DisplayToClipboard
trigger1 = 1
text = "sysvar(0) = %d pao pao cafe = %d";Buff = %d GNDTYPE = %d"
params = sysvar(0),sysvar(0)&2**17
ignorehitpause = 1

[State 1580]
type = SelfState
trigger1 = sysvar(0)&2**17
value = sysvar(1)
ctrl = 0

[State 1580]
type = DestroySelf 
trigger1 = IsHelper
trigger1 = time = 5
ignorehitpause = 1

[State 1580]
type = SelfState
trigger1 = !IsHelper
value = 0
ctrl = 1

[State 811, Anim]
Type = ChangeAnim2
Trigger1 = !Time
Value = 1

[Statedef 1208]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0, 0
anim = 1206
sprpriority = 4
juggle = 10

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;By Misamu K.
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999
length = 12
palbright = 12,12,12;,136
palcontrast = 60,60,60;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = add1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = !animtime
trigger2 = root,stateno = 1210
;---------------------------

;---------------------------
;Special Reflection
[Statedef 1211]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0, 0
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                  	;
;=======================================;
[State 1000, INFORMATION SHARING] 	;
type = Projectile 			;
trigger1 = sysvar(1)&2**18 		;
projid = sysvar(0)			;
projanim = 1			;
projhitanim = -1			;
projremanim = -1			;
projremovetime = 2			;
projscale = 0,0			;
projpriority = 0			;
velocity = 0,0			;
postype = p1			;
offset = 0,0			;
persistent = 0			;
ignorehitpause = 1			;
;=======================================;

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1

[State 1211, StateTypeSet]
type = StateTypeSet
trigger1 = root,movetype = H
trigger2 = cond(PlayerIDExist(var(0)),(PlayerID(var(0)),movetype=I),0)
movetype = I        ;I,A,H

[State 200, Punch Attempt Sound]
type = Playsnd
trigger1 = !time
value = 1000,3
channel = 3
persistent = 0

[State 1211, PosSet]
type = PosSet
trigger1 = !time || time
trigger1 = PlayerIDExist(var(0))
x = PlayerID(var(0)),Pos X
y = PlayerID(var(0)),Pos Y

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time > 2
trigger1 = !PlayerIDExist(var(0))

;New Psycho Reflector
[Statedef 1210]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 10              
velset = 0,0                    
ctrl = 0                       
poweradd= 100                                
sprpriority = 2
facep2 = 1
anim = 1210

;=======================================;Variables
[State 1000, Projectile Speed]
type = VarSet
trigger1 = !time
v = 15
value = 7
;=============Anims and StateType
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1210
trigger2 = anim = 1211
value = anim+1

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1212
trigger1 = animelemtime(1) = 0 
Movetype = I
;==============Effects 
[State 1000, 1]
type = PlaySnd
triggerall = anim = 1210
trigger1 = animelem = 1
value = 200,5
channel = 0

;==============Helpers
[State 1000: Helper]
type = Helper
trigger1 = anim = 1210
trigger1 = animelem = 1
helpertype = Normal
id = 1213
pos = 96,-68 ;50
postype = p1
facing = 1
stateno = 1213
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper]
type = Helper
trigger1 = anim = 1210
trigger1 = animelem = 18
helpertype = Normal
id = 1214
pos = 96,-68 ;50
postype = p1
facing = 1
stateno = 1214
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper]
type = Helper
trigger1 = anim = 1210
trigger1 = animelemtime(19) = 0
helpertype = Normal
id = 1210
pos = 64, -64
postype = p1
facing = 1
stateno = 1215
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
[State 1000: Helper]
type = Helper
trigger1 = anim = 1210
trigger1 = animelemtime(19) = 0
helpertype = Normal
id = 1217
pos = 64, -64
postype = p1
facing = 1
stateno = 1217
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 1000: Helper]
type = helper
triggerall = !numhelper(1206)
triggerall = Numhelper(1217) = 1
trigger1 = helper(1217),stateno = 1206
trigger1 = helper(1217),time = 2
helpertype = Normal
id = 1005
pos = 80, 0 ;50
postype = p1
facing = 1
stateno = 1005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;==============Hitdef

[State 1000, 7]
type = ChangeAnim
triggerall = anim = 1211
trigger1 = numhelper(1210)
trigger1 = helper(1210),stateno = 1216
value = 1212
ignorehitpause = 0


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

;New Psycho Reflector FX 1
[Statedef 1213]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1213
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Effects
[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

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
trigger1 = (root,animelemtime(1)>= 0) && (root,animelemtime(3)<0)
time = 1
pos = 24,-62
[State 1415, BindToRoot]
type = BindToRoot
trigger1 = (root,animelemtime(3)>= 0) && (root,animelemtime(6)<0)
time = 1
pos = 18,-48
[State 1415, BindToRoot]
type = BindToRoot
trigger1 = (root,animelemtime(6)>= 0) && (root,animelemtime(9)<0)
time = 1
pos = 22,-84
[State 1415, BindToRoot]
type = BindToRoot
trigger1 = (root,animelemtime(9)>= 0) && (root,animelemtime(18)<0)
time = 1
pos = -20,-100

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1210
trigger2 = animtime = 0

;New Psycho Reflector FX 2
[Statedef 1214]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1214
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Effects
[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

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
trigger1 = (root,animelemtime(18)>= 0) && (root,animelemtime(19)<0)
time = 1
pos = 0,0

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;New Psycho Reflector Helper
[Statedef 1215]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
ownpal = 1
sprpriority = 3 

[State 200, snd]
type=playsnd
trigger1= !time && !prevstateno
value=1000,2

[State -2, Scaling Check]
type = VarSet
trigger1 = 1
var(36) = 1
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
triggerall = var(36)
trigger1= numenemy
trigger1 = enemynear, gethitvar(hitcount) >= 1 
value= 0.38*ifelse(root,var(51),0.63,1)
ignorehitpause= 1
[State -2, Damage Dampener]; Full damage
type= attackmulset
triggerall= numenemy
trigger1= enemynear,movetype!=H || (enemynear,stateno=[120,155])
trigger2 = enemynear, gethitvar(hitcount) < 1
trigger3 = !var(36) && root,var(51)=0
value= 1.0*ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 811, Anim]
Type = ChangeAnim
trigger1 = !time && !prevstateno
Value = 1215

[State 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(5) = 3
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(5) = -1
ignorehitpause = 1
persistent = 0

[State 1015, VarSet]
type = VarSet
trigger1 = root,stateno != 1210
var(5) = 0
ignorehitpause = 1
persistent = 0

;By Misamu K.
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999
length = 12
palbright = 12,12,12;,136
palcontrast = 60,60,60;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = add1

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

[State 10012, override]
type = null;HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
ignorehitpause = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 210, 1]
type = HitDef
triggerall = var(5) = 3
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [10,41])
attr = , SA
damage = floor(67*ifelse(root,var(56),1.25,1)),5
animtype = Hard
air.animtype = back
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 16, 16
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
hitonce = 1
id = 1025

[State 210, 1]
type = HitDef
triggerall = var(5) = 2
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [10,41])
attr = , SA
damage = floor(42*ifelse(root,var(56),1.25,1)),5
animtype = Hard
air.animtype = back
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 16, 16
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
hitonce = 1
id = 1025

[State 210, 1]
type = HitDef
triggerall = var(5) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [10,41])
attr = , SA
damage = floor(16*ifelse(root,var(56),1.25,1)),5
animtype = Hard
air.animtype = back
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 16, 16
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
hitonce = 1
id = 1010

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(1025) && movehit
trigger2 = numtarget(1010) && movehit
value = 10400
persistent = 0

[State 1000, Sound]
type = PlaySnd
trigger1 = Movehit && NumTarget
value = 3+(root,var(32)*2), 3
persistent = 0
channel = 2

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

[State 1411, VarSet]
type = ParentVarSet
trigger1 = numtarget(1010) && movehit
var(18) = 12
persistent = 0
[State 1411, VarSet]
type = ParentVarSet
trigger1 = numtarget(1010) && movehit
trigger2 = numtarget(1025) && movehit
var(16) = 40
persistent = 0

[State 1005, End]
type=changestate
trigger1= movecontact
value= 1215
ignorehitpause = 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 10002, DestroySelf]
type = DestroySelf
trigger1 = root,movetype = H

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(5) <= 0
trigger3 = animtime = 0
value= ifelse(var(5)=0,stateno+1,stateno)
ignorehitpause = 0

[Statedef 1216]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1216
sprpriority = 4

;By Misamu K.
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999
length = 12
palbright = 12,12,12;,136
palcontrast = 60,60,60;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = add1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;New Psycho Reflector helper
[Statedef 1217]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0, 0
anim = 1217
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                  	;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time && !prevstateno
sysvar(0) = 262144
;=======================================;

;Helper Projectiles are reflected by this Reversaldef
[State 1301, REFLECTOR]
type = ReversalDef
trigger1 = time = 0
reversal.attr = SCA,NP,SP,HP
pausetime = 0,0
sparkno = -1
sparkxy = 0,0
p1stateno = 1206
p2stateno = 1207
id = 1201
numhits = 0

;This is to ensure that only projectiles can hit this helper
[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

;The hitoverride is for projectile type projectiles. The attr in theory could override any attack, 
;but since it can only be hit by projectiles, it naturally only overrides projectiles 
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno+1
time = -1
ignorehitpause = 1

[State 10005]
type = BindToParent
trigger1 = 1
pos = 64,-64
ignorehitpause = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, Punch Attempt Sound]
type = Playsnd
trigger1 = animelem = 1
value = 1000,3
persistent = 0

;By Misamu K.
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999
length = 12
palbright = 12,12,12;,136
palcontrast = 60,60,60;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = add1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = !animtime
trigger2 = root,stateno != 1210

[Statedef 1218]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1
sprpriority = 4

[State 1205, VarSet]
type = VarSet
trigger1 = numtarget
var(0) = target,ID
persistent = 0
ignorehitpause = 1

[State -2, DEBUG]
type = DisplayToClipboard
trigger1 = 1
text = "var(0) = %d proj = %d ID = %d";Buff = %d GNDTYPE = %d"
params = var(0),numprojid(262144),gethitvar(chainid)
ignorehitpause = 1

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;sysvar(1) = SPECIAL                    ;
;=======================================;
[State 106, VarSet]
type = VarSet
;RETURNING YOUR OWN PROJECTILE
;?????????????
trigger1 = Gethitvar(chainid)&2**17
sysvar(1) = sysvar(0)
[State 1206, ChangeState]
type = ChangeState
trigger1 = PlayerIDExist(var(0))
trigger1 = (PlayerID(var(0)),sysvar(0)=131072) 
;RETURNING YOUR OWN PROJECTILE
;?????????????
trigger2 = Gethitvar(chainid)&2**17
value = 1211
ctrl = 0
;=======================================;

[State 200, Punch Attempt Sound]
type = Playsnd
trigger1 = !time
value = 1000,3
channel = 3
persistent = 0

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 30

;Phoenix Arrow
[Statedef 1300]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 10              
velset = 0,0                    
ctrl = 0                       
poweradd= 100                                
sprpriority = 2
anim = ifElse((helper(10371), var(3) = [1,3]),1300,1310)

;=============Anims and StateType
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1300 && animtime = 0
trigger2 = anim = 1310 && animtime = 0
value = anim+1

;============== Vels && Movement
[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1301 && animelem = 1
trigger2 = anim = 1311 && animelem = 1
y = -32
[State 1500, VelSet] ;67.5 degree angle
type = VelSet
trigger1 = anim = 1301 && animelem = 1
x = 9*cos(1.178097)
y = 9*sin(1.178097)
;x = 3.4442138671875
;y = 8.3148651123046875

[State 1500, VelSet] ;45 degree angle
type = VelSet
trigger1 = anim = 1311 && animelem = 1
x = 9*cos(0.785398)
y = 9*sin(0.785398)
;x = 6.3639678955078125
;y = 6.3639678955078125
;==============Effects
[State 1000: Helper]
type = Helper
trigger1 = anim = 1301 || anim = 1311
trigger1 = animelem = 1
helpertype = Normal
id = 1305
pos = 0,0 ;50
postype = p1
facing = 1
stateno = 1305
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1300 || anim = 1310
trigger1 = animelem = 1
value = 200,6
channel = 0

[State 200, Punch Attempt Sound]
type = Playsnd
triggerall = anim = 1301 || anim = 1311
trigger1 = animelem = 1
value = 1000,4
persistent = 0
;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = anim = 1301
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 0
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1301
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 0 && animelemtime(6) < 0
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1301
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(8) >= 0 && animelemtime(10) < 0
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1301
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(12) >= 0 && animelemtime(14) < 0
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1301
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(16) >= 0 
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1311
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 0
attr = A, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1311
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 0 && animelemtime(6) < 0
attr = A, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1311
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(8) >= 0 && animelemtime(10) < 0
attr = A, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1311
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(12) >= 0 && animelemtime(14) < 0
attr = A, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 = 1311
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(16) >= 0
attr = A, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
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 = 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 = 1300
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 1000, 6]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

;---------------------------
;Land
[Statedef 1301]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
facep2 = 1 

;=============Anims and StateType
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1302+(cond(anim=1311,10,0))

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1302
trigger1 = animelemtime(1) = 0 
trigger2 = anim = 1312
trigger2 = animelemtime(25) = 0 
Movetype = I

;============== Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1302 && animelem = 1
x = 2.879150390625
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1302 && animelemtime(1)> 0
x = 0.835935
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1312 && animelem = 1
x = 5.3198852539062505
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1312 && animelemtime(1)> 0
x = 0.835938

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

;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1312
trigger1 = animelemtime(14) >= 0 && animelemtime(25) < 0
attr = S, SA
damage = floor(83*ifelse(var(56),1.25,1))
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 12, 13
guard.pausetime = 12,13
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -74
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13-(var(32));s2, 6
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -4.5,-7
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1300
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

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

;Phoenix Arrow FX
[Statedef 1305]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1305
sprpriority = 1
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Anims
[State 1415, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1305
trigger1 = root,stateno = 1301
value = anim+1

;Effects
[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

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
triggerall = anim = 1305
trigger1 = root,stateno = 1300
time = 1
pos = 0,0

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = anim = 1305
trigger1 = root,movetype = H || root,stateno != 1300
trigger2 = anim = 1306
trigger2 = animtime = 0

;Psychic Teleport
[Statedef 1400]
type = S
movetype = I
physics = N
anim = ifElse((helper(10371), var(3) = [1,3]),1400,1410)
velset = 0,0
ctrl = 0
juggle = 0
facep2 = 1
sprpriority = 0
poweradd= 109 

;=============Anims and StateType
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1400 && animtime = 0
trigger2 = anim = 1410 && animtime = 0
value = anim+5
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1405 && animtime = 0
trigger2 = anim = 1415 && animtime = 0
value = anim-3

[State 1000: Helper]
type = Helper
triggerall = anim = 1405 || anim = 1415
trigger1 = animelemtime(1) = 0
helpertype = Normal
id = 1407
pos = 0, 0 ;50
postype = p1
facing = 1
name = "VANS"
stateno = 1407
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 750, Push]
type = PlayerPush
triggerall = anim = 1405 || anim = 1415
trigger1 = AnimElemTime(2) >= 0 
value = 0
[State 750, ScreenBound]
type = ScreenBound
triggerall = anim = 1405 || anim = 1415
trigger1 = AnimElemTime(2) >= 0 
value = 1
movecamera = 0,1

[State 3201, VelSet]
type = VelSet
triggerall = anim = 1405 || anim = 1415
trigger1 = animelem = 2
x = 11

[State 750, VelSet]
type = VelSet
trigger1 = anim = 1405
trigger1 = animelem = 13
trigger2 = anim = 1415
trigger2 = animelem = 22
x = 0

[State 1000, fx]
type = Explod
triggerall = anim = 1405
trigger1 = animelemtime(7) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(11) = 0
anim = 1406
sprpriority = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -11 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1405
trigger1 = animelemtime(7) = 0
anim = 1406
sprpriority = 0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -22 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1405
trigger1 = animelemtime(7) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(11) = 0
anim = 1406
sprpriority = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -33 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1405
trigger1 = animelemtime(9) = 0
anim = 1406
sprpriority = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -44 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1405
trigger1 = animelemtime(11) = 0
anim = 1406
sprpriority = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -55 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1405
trigger1 = animelemtime(1) = 0
trigger2 = animelemtime(3) = 0
anim = 1406
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -22 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1405
trigger1 = animelemtime(1) = 0
anim = 1406
sprpriority = 2
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -44 ,0

[State 1000, fx]
type = Explod
triggerall = anim = 1415
trigger1 = animelemtime(7) = 0
anim = 1406
sprpriority = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -11 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1415
trigger1 = animelemtime(7) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(11) = 0
trigger4 = animelemtime(13) = 0
trigger5 = animelemtime(15) = 0
trigger6 = animelemtime(17) = 0
trigger7 = animelemtime(19) = 0
trigger8 = animelemtime(21) = 0
anim = 1406
sprpriority = 0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -22 ,0
[State 1000, fx]
type = Explod
triggerall = anim = 1415
trigger1 = animelemtime(9) = 0
anim = 1406
sprpriority = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -33 ,0

[State 1000, fx]
type = Explod
triggerall = anim = 1415
trigger1 = animelemtime(11) = 0
trigger2 = animelemtime(13) = 0
trigger3 = animelemtime(15) = 0
trigger4 = animelemtime(17) = 0
trigger5 = animelemtime(19) = 0
trigger6 = animelemtime(21) = 0
anim = 1406
sprpriority = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -44 ,0

[State 1000, fx]
type = Explod
triggerall = anim = 1415
trigger1 = animelemtime(11) = 0
anim = 1406
sprpriority = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0
pos = -55 ,0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1400 || anim = 1410
trigger1 = animelem = 1
value = 200,7
channel = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1405 || anim = 1415
trigger1 = animelem = 1
value = 1000,5

[State 210,2]
type = ChangeState
triggerall = anim = 1402 || anim = 1412
trigger1 = !AnimTime
value = 0
ctrl =1

;Idle 
[Statedef 1407]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0, 0
sprpriority = 2
juggle = 10
[State 1045, ScreenBound]
type = ScreenBound
trigger1 = root,anim = 1405 || root,anim = 1415
value = 0
movecamera = 1,0
[State 1045, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
[State 1405, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(root,anim = 1405,1401,1411)
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = !animtime

[State 1000: Helper]
type = Helper
trigger1 = anim = 1401
trigger1 = animelemtime(32) = 0
trigger2 = anim = 1411
trigger2 = animelemtime(42) = 0
helpertype = Normal
id = 1409
pos = 0, 0 ;50
postype = p1
facing = 1
name = "Warp Effect"
stateno = 1409
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1045, ChangeState]
type = ChangeState
trigger1 = root,movetype = H 
value = 1408

;Death
[Statedef 1408]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = -1
sprpriority = 4
juggle = 10
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;Idle Warp Effect
[Statedef 1409]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1407
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Effects
[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 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;Super Psychic Throw
[Statedef 1500]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 10              
velset = 0,0                    
ctrl = 0                       
poweradd= 100                                
sprpriority = 2
facep2 = 1
anim = ifelse(prevstateno=1301,1504,1500)

;=============Variables


;=============Anims and StateType
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1500
trigger2 = anim = 1504
value = 1501

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1501
trigger1 = animelemtime(2) = 0 
Movetype = I
;==============Effects 
[State 1000, 1]
type = PlaySnd
triggerall = anim = 1500 || anim = 1504
trigger1 = animelem = 1
value = 200,8
channel = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1500
trigger1 = animelem = 4
value = 1000,5
;==============Helpers
[State 1000: Helper]
type = Helper
trigger1 = anim = 1500
trigger1 = animelemtime(4) = 0
trigger2 = anim = 1504
trigger2 = animelemtime(1) = 0
helpertype = Normal
id = 1510
pos = 32, -72 
postype = p1
facing = 1
stateno = 1510
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

;==============Hitdef
[State 11040, 1]
type = HitDef
triggerall = p2stateno != 40 && p2stateno !=52 ; Cannot grab during jump start / jump land
triggerall = var(19) = 0 ; Opponent isn't in guarding state
triggerall = anim = 1500
Trigger1 = animelem = 7
attr = S, ST          
hitflag = M         
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 1501
p2stateno = 1502
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 1500
numhits=0
air.animtype = back
fall.xvelocity = -2.5
fall.yvelocity = -4
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5

[State 11040, 1]
type = HitDef
triggerall = p2stateno != 40 && p2stateno !=52 ; Cannot grab during jump start / jump land
triggerall = var(19) = 0 ; Opponent isn't in guarding state
triggerall = anim = 1504
Trigger1 = animelem = 1
attr = S, ST          
hitflag = M         
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 1501
p2stateno = 1502
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 1500
numhits=0
air.animtype = back
fall.xvelocity = -2.5
fall.yvelocity = -4
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5

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

[StateDef 1501]
MoveType = A
VelSet = 0,0
Anim = 1502
SprPriority = 2
ctrl = 0

[State 810, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(59) < 0
pos = 48, 0

[State 100, 1]
type = varset
trigger1 = animelem = 59
var(16) = 53
ignorehitpause = 1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 58
value = 200,8
channel = 0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 58
value = 1000,6

[State 801, 10]
type = ChangeState
Trigger1 = animtime = 0
value = 0
ctrl = 1 

[StateDef 1502]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0

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

[State 811, Anim]
Type = ChangeAnim2
Trigger1 = !Time
Value = 1503

[State 820, 2]
type = ChangeState
triggerall = time > 1
Trigger1 = animtime = 0
value = stateno+1

[StateDef 1503]
Type = A
MoveType =  H
VelSet = -1.5, -13
sprpriority = -1 
Ctrl = 0

[State 1040, go]
type = VelAdd
trigger1 = time > 0
y = 0.5

[State 1040, go]
type = PosAdd
trigger1 = time = 26
x = vel x

[State 811, Anim]
Type = ChangeAnim
Trigger1 = time < 9
Value = 5030

[State 811, Anim]
Type = ChangeAnim
Trigger1 = time = 9
value = ifelse(SelfAnimExist(5062),5062,ifelse(SelfAnimExist(5061),5061,5050))

[State 811, 2]
type = ChangeState
Trigger1 = vel y > 0 && pos y >= 0
value = stateno+1

[Statedef 1504]
type = L
physics = N
movetype = H
ctrl = 0
velset = 0,0

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

[State 801, Damage]
Type = LifeAdd
trigger1 = Time = 1
value = -100

[State 1107, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = 1
time = 14
freq = 180
ampl = -4

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

[State 1812, HitGroundAnim]
type = ChangeAnim
trigger1 = !Time
value = ifelse(SelfAnimExist(5102),5102,ifelse(SelfAnimExist(5101),5101,5100))

[State 964, GoToBounce]
type = ChangeState
trigger1 = time = 4
value = stateno+1

[Statedef 1505]
type = A
physics = N
movetype = H
velset = 0,0
ctrl = 0

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

[State 1812, HitGroundAnim]
type = ChangeAnim
trigger1 = !Time
value = ifelse(SelfAnimExist(5162),5162,ifelse(SelfAnimExist(5161),5161,5160))

[State 0, StartVels]
type = VelSet
trigger1 = !Time 
x = -1.5
y = -7

[State 0, Gravity]
type = Veladd
trigger1 = Time
y = .625

[State 0, GoToBounce]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Vel Y + Pos y >= 0
value = 5110

;Hand FX
[Statedef 1510]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
anim = 914
sprpriority = 4
juggle = 10

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = -1
pos = 52,-66

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != [1500,1501]
trigger2 = root,stateno = 1500 && root,anim = 1501
trigger2 = root,animelemtime(23) >= 0
trigger3 = root,stateno = 1501 && root,anim = 1502
trigger3 = root,animelemtime(34) >= 0