;================================================================================
; SPECIALS
;================================================================================
;Venom Strike
[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(3) = [1,3]),1000,1010)

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

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 200,3
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 13
value = 1000,0

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 15
movetype = I        

[State 1000: Helper]
type = helper
trigger1 = animelem = 13
helpertype = Normal
id = 1005
pos = 58, -56 ;50
postype = p1
facing = 1
stateno = 1005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

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

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

[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) = ifelse(root,var(51),60,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 < 10, ceil(p2dist x), 10)),-68
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
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, SP
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

[State 1005, End]
type=changeState
trigger1= movecontact
trigger2 = time = 26
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

[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

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

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1005
;=======================================;

[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) = ifelse(root,var(51),60,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 < 10, ceil(p2dist x), 10)),-68
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
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, SP
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
;=======================================;
;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 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
trigger2 = time = 26
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

;Double Strike
[Statedef 1100]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
anim = ifElse((helper(10371), var(3) = [1,3]),1100,1110)

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

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 200,4
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 13
trigger2 = animelem = 39
value = 1000,0

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 44
movetype = I        

[State 1000: Helper]
type = helper
trigger1 = animelem = 13
helpertype = Normal
id = 1105
pos = 58, -56 ;50
postype = p1
facing = 1
stateno = 1105
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000: Helper]
type = helper
trigger1 = animelem = 39
helpertype = Normal
id = 1115
pos = 58, -56 ;50
postype = p1
facing = 1
stateno = 1115
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

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

;Double Strike Projectile 1
[Statedef 1105]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1107
;=======================================;

[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 = 1106
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) = ifelse(root,var(51),60,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 < 10, ceil(p2dist x), 10)),-68
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
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, SP
damage = floor((ifelse(root,var(15)=4,50,58))*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

[State 1005, End]
type=changeState
trigger1= movecontact
trigger2 = time = 26
value=1106
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

[Statedef 1106]
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

;Double Strike Projectile 1 (Reflected)
[Statedef 1107]
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) = 1105
;=======================================;

[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 = 1106
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) = ifelse(root,var(51),60,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 < 10, ceil(p2dist x), 10)),-68
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
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, SP
damage = floor((ifelse(root,var(15)=4,50,58))*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
;=======================================;
;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 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
trigger2 = time = 26
value=1106
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

;Double Strike Projectile 2
[Statedef 1115]
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) = 1117
;=======================================;

[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 = 1116
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) = ifelse(root,var(51),60,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 < 10, ceil(p2dist x), 10)),-68
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
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, SP
damage = floor((ifelse(root,var(15)=4,50,58))*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

[State 1005, End]
type=changeState
trigger1= movecontact
trigger2 = time = 50
value=1116
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

[Statedef 1116]
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

;Double Strike Projectile 2 (Reflected)
[Statedef 1117]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

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

[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 = 1116
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) = ifelse(root,var(51),60,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 < 10, ceil(p2dist x), 10)),-68
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
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,4])
attr = S, SP
damage = floor((ifelse(root,var(15)=4,75,75))*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
;=======================================;
;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 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
trigger2 = time = 50
value=1116
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

;Surprise Rose
[Statedef 1200]
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]),1200,1210)

;=============Anims and StateType

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1201
trigger2 = anim = 1211 
statetype = A
persistent = 0

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1200
trigger2 = anim = 1210
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1201
trigger2 = anim = 1211
value = anim+1

;============== Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1201 && animelem = 1
x = 3
y = -8.5
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1211 && animelem = 1
x = 4
y = -8.5
[State 1300, VelAdd]
type = VelAdd
triggerall = animelemtime(1) > 0
trigger1 = anim = 1201
trigger2 = anim = 1211
y = 0.375

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1202 && animelem = 1
x = 9*cos(1.17808967) ;67.5 degree angle
y = 9*sin(1.17808967)

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1212 && animelem = 1
x = 9*cos(pi/4) ;45 degre angle
y = 9*cos(pi/4)

;==============Effects 
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1200
trigger1 = animelem = 1
trigger2 = anim = 1210
trigger2 = animelem = 1
value = 200,5
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1201
trigger1 = animelem = 1
trigger2 = anim = 1211
trigger2 = animelem = 1
value = 2+(var(32)*10),4

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1202
trigger1 = animelem = 1
trigger2 = anim = 1212
trigger2 = animelem = 1
value = 1000,1


;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = anim = 1200 || anim = 1210
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 0 
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-82
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -5.796875
fall.yvelocity = -2.5
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1201 || anim = 1211
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(4) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-66
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1202 || anim = 1212
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 0 && animelemtime(7) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-24
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1202 || anim = 1212
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(7) >= 0 
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7, 9
guard.pausetime = 7,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-24
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

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

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

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1203+(cond(anim=1212,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

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

;=============Anims and StateType

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1301 && animelem = 1
movetype = I
persistent = 0

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

;============== Vels && Movement

[State 1100, PosAdd]
type = PosAdd
trigger1 = anim = 1300 && animelem = 6
trigger2 = anim = 1300 && animelem = 11
x = -8

[State 1100, PosAdd]
type = PosAdd
trigger1 = anim = 1301 && animelem = 7
trigger2 = anim = 1301 && animelem = 10
trigger3 = anim = 1301 && animelem = 13
trigger4 = anim = 1301 && animelem = 19
x = -8

;==============Effects 
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1300
trigger1 = animelem = 1
value = 200,6
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1300
trigger1 = animelem = 9
value = 1000,2

[State 200, Slash]
type = Explod
trigger1 = anim = 1300 && animelem = 9
anim = 1302
ID = 1302
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 3
removeongethit = 1
;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 1300
trigger1 = AnimElemtime(11) >= 0 
attr = S, SA
damage = 0,0
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10000)
sparkxy = 0, -82
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 1,3
guard.pausetime = 1,3
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
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 47,47
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
id = 1300
persistent = 0

[State 1000, 7]
type = ChangeState
trigger1 = movehit && numtarget(1300)
value = 1305
ignorehitpause = 0

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

[Statedef 1305]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0
sprpriority = 2
anim = 1305

[State -2, Moves That Always Juggle]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

[State 801, fly p2]
type = TargetState
trigger1 = anim = 1305
trigger1 = animelem = 1
value = 1310
ignorehitpause = 1
ID = 1300

[State 1201, TargetBind]
type = TargetBind
trigger1 = !time
time = 1
pos = 64,-16
[State 1201, TargetState]
type = TargetState
triggerall = NumTarget(1300)
trigger1 = animelem = 27
trigger2 = animelem = 33
trigger3 = animelem = 39
trigger4 = animelem = 45
trigger5 = animelem = 51
trigger6 = animelem = 57
trigger7 = animelem = 63
trigger8 = animelem = 69
trigger9 = animelem = 75
trigger10 = animelem = 81
value = 1311

[State 1201, PlaySnd]
type = PlaySnd
trigger1 = animelem = 27
trigger2 = animelem = 33
trigger3 = animelem = 39
trigger4 = animelem = 45
trigger5 = animelem = 51
trigger6 = animelem = 57
trigger7 = animelem = 63
trigger8 = animelem = 69
trigger9 = animelem = 75
trigger10 = animelem = 81
value = 3+(var(32)*2),3
channel = 4

[State 1201, HitAdd]
type = HitAdd
trigger1 = animelem = 27
trigger2 = animelem = 33
trigger3 = animelem = 39
trigger4 = animelem = 45
trigger5 = animelem = 51
trigger6 = animelem = 57
trigger7 = animelem = 63
trigger8 = animelem = 69
trigger9 = animelem = 75
trigger10 = animelem = 81
value = 1

[State 1201, HitAdd]
type = targetlifeadd
trigger1 = animelem = 27
trigger2 = animelem = 33
trigger3 = animelem = 39
trigger4 = animelem = 45
trigger5 = animelem = 51
trigger6 = animelem = 57
trigger7 = animelem = 63
trigger8 = animelem = 69
trigger9 = animelem = 75
trigger10 = animelem = 81
value = ifelse(var(51),-4,-8)
kill = 0
[State 300, HitAdd]
type = Targetpoweradd
trigger1 = animelem = 27
trigger2 = animelem = 33
trigger3 = animelem = 39
trigger4 = animelem = 45
trigger5 = animelem = 51
trigger6 = animelem = 57
trigger7 = animelem = 63
trigger8 = animelem = 69
trigger9 = animelem = 75
trigger10 = animelem = 81
value = 16
[State 300, HitAdd]
type = poweradd
trigger1 = animelem = 27
trigger2 = animelem = 33
trigger3 = animelem = 39
trigger4 = animelem = 45
trigger5 = animelem = 51
trigger6 = animelem = 57
trigger7 = animelem = 63
trigger8 = animelem = 69
trigger9 = animelem = 75
trigger10 = animelem = 81
value = ifelse(var(51),0,16)
[State 1200, Explod]
type = Explod
trigger1 = animelem = 27
trigger2 = animelem = 33
trigger3 = animelem = 39
anim = 17002+(var(31)*10000)
pos = 64,-66
postype = p1  ;p2,front,back,left,right
sprpriority = 6
[State 1200, Explod]
type = Explod
trigger1 = animelem = 45
anim = 17002+(var(31)*10000)
pos = 64,-70
postype = p1  ;p2,front,back,left,right
sprpriority = 6
[State 1200, Explod]
type = Explod
trigger1 = animelem = 51
trigger2 = animelem = 57
anim = 17002+(var(31)*10000)
pos = 64,-40
postype = p1  ;p2,front,back,left,right
sprpriority = 6
[State 1200, Explod]
type = Explod
trigger1 = animelem = 63
trigger2 = animelem = 69
trigger3 = animelem = 75
trigger4 = animelem = 81
anim = 17002+(var(31)*10000)
pos = 64,-75
postype = p1  ;p2,front,back,left,right
sprpriority = 6

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

[State 210, 1]
type = HitDef
trigger1 = animelemtime(105) >= 0 && animelemtime(113) < 0
attr = S, SA
damage = floor(58*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 27,30
guard.pausetime = 27,30
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-75
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
envshake.time = 14
envshake.freq = 180
envshake.ampl = -4

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

;Custom state for ZanrestuKen moves.
[Statedef 1310]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
facep2=1
[State 1000, ChangeAnim]
type = ChangeAnim2
trigger1 = !time
value = 1310
[State 1045, PosAdd]
type = PosAdd
trigger1 = !time
y = 1
[State 1045, PosAdd]
type = PosAdd
triggerall = time < 70
;triggerall = pos y <= 0
trigger1 = time > 0 && (time%2) = 0
y = 1
[State 1045
[State 1045, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(4) < 0
value = SCA
time = 1
[State 820, 2]
type = SelfState
trigger1 = time = 100
value = 5050

[Statedef 1311]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
facep2=1
[State 1000, ChangeAnim]
type = ChangeAnim2
trigger1 = !time
value = 1310
[State 1045, PosAdd]
type = PosAdd
trigger1 = !time
y = -1
[State 1045, PosAdd]
type = PosAdd
triggerall = time < 70
triggerall = pos y >= -15
triggerall = animelemtime(4) < 0
trigger1 = time > 0 && (time%2) = 0
y = -1
[State 1045, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(4) < 0
value = SCA
time = 1
[State 820, 2]
type = SelfState
trigger1 = time = 100
value = 5050

;Mirage Kick
[Statedef 1400]
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]),1400,1410)

;=============Anims and StateType
[State 1400, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1402 && animelem = 22
trigger2 = anim = 1412 && animelem = 22
movetype = I
persistent = 0

[State 1400, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1400 && animtime = 0
trigger2 = anim = 1410 && animtime = 0
value = anim+1

[State 1400, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1400 && P2bodydist X <= 8
trigger1 = animelemtime(1) > 0
trigger2 = anim = 1410 && P2bodydist X <= 8
trigger2 = animelemtime(1) > 0
value = anim+1

[State 1400, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1401 && animtime = 0
trigger2 = anim = 1411 && animtime = 0
value = anim+1

[State 1400, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1402 && animtime = 0
trigger2 = anim = 1412 && animtime = 0
value = anim+1

;============== Vels && Movement
[State 1400, VelSet]
type = VelSet
trigger1 = anim = 1400 && animelem = 1
trigger2 = anim = 1410 && animelem = 1
x = 5
[State 1400, PosAdd]
type = PosAdd
trigger1 = anim = 1401 && animelem = 1
trigger2 = anim = 1411 && animelem = 1
x = vel x
[State 1400, VelMul] 
type = VelMul
trigger1 = anim = 1401 && animelemtime(1)>= 0
trigger2 = anim = 1411 && animelemtime(1)>= 0
x = 0.858322;1435546875
[State 1400, PosAdd]
type = PosAdd
trigger1 = anim = 1401 && animelem = 10
trigger2 = anim = 1401 && animelem = 13
trigger3 = anim = 1401 && animelem = 16
trigger4 = anim = 1411 && animelem = 10
trigger5 = anim = 1411 && animelem = 13
trigger6 = anim = 1411 && animelem = 16
x = 8
[State 1400, PosAdd]
type = PosAdd
trigger1 = anim = 1403 && animelem = 11
trigger2 = anim = 1413 && animelem = 11
x = 4
[State 1400, VelSet]
type = VelSet
trigger1 = anim = 1403 && animelem = 1
trigger2 = anim = 1413 && animelem = 1
x = 0


;==============Effects 
[State 3303, Explod]
type = Explod
trigger1 = anim = 1400
trigger1 = animelem = 1
trigger2 = anim = 1410
trigger2 = animelem = 1
anim = 12005
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1400
trigger1 = animelem = 1
trigger2 = anim = 1410
trigger2 = animelem = 1
value = 200,0
channel = 0
persistent = 0
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1401
trigger1 = animelem = 4
trigger2 = anim = 1411
trigger2 = animelem = 4
value = 200,2
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1401
trigger1 = animelem = 4
trigger2 = anim = 1411
trigger2 = animelem = 4
value = 4,8
channel = 4

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1402 || anim = 1412
trigger1 = animelem = 2
trigger2 = animelem = 9
trigger3 = animelem = 17
value = 4,8
channel = 4

[State 200, Slash]
type = Explod
trigger1 = anim = 1300 && animelem = 9
anim = 1302
ID = 1302
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 3
removeongethit = 1

;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = anim = 1401
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(6) >= 0 && animelemtime(10)
attr = S, SA
damage = floor(50*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-68
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = high
ground.slidetime = 33
ground.hittime = 32
guard.hittime = 32
guard.slidetime = 33
guard.ctrltime = 24
ground.velocity = -5.796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
id = 1400
p2stateno = 10150
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1402
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
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 = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1400
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 = 1402
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(12) >= 0 && animelemtime(14) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-60
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 = 1400
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 = 1402
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(20) >= 0 && animelemtime(22) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 14
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -24,-84
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 = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1400
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 = 1411
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(6) >= 0 && animelemtime(10) < 0
attr = S, SA
damage = floor(67*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-68
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = high
ground.slidetime = 33
ground.hittime = 32
guard.hittime = 32
guard.slidetime = 33
guard.ctrltime = 24
ground.velocity = -5.796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
id = 1400
p2stateno = 10150
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1412
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
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 = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1400
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 = 1412
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(12) >= 0 && animelemtime(14) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-60
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 = 1400
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 = 1412
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(20) >= 0 && animelemtime(22) < 0
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 14
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -24,-84
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 = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1400
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 220,2]
type = ChangeState
trigger1 = anim = 1403 && AnimTime = 0
trigger2 = anim = 1413 && AnimTime = 0
value = 0
ctrl = 1

;Tornado Kick
[Statedef 1500]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 10              
velset = 0,0                    
ctrl = 0                       
poweradd= 100                                
sprpriority = 2
facep2 = 1
anim = ifElse((helper(10371), var(3) = [1,3]),1500,1510)

;=============Anims and StateType
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1501 
trigger2 = anim = 1511
StateType = A
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1501 && animelem = 32
movetype = I
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1512 && animelemtime(1) = 1
movetype = I
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1500 && animtime = 0
trigger2 = anim = 1510 && animtime = 0
value = anim+1
[State 1500, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1501 && animtime = 0
trigger2 = anim = 1511 && animtime = 0
value = anim+1

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

;============== Vels && Movement
[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1500 && animelem = 6
x = 16
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1501 && animelem = 1
x = 5.71875
y = -4
[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1501 && animelemtime(1)> 0
y = 0.09375
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1501 && animelemtime(1)> 0
x = 0.953125

[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1502 && animelem = 1
trigger2 = anim = 1512 && animelem = 1
x = vel x
y = vel y
[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1502 && animelemtime(1)> 0
y = 0.59375
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1502 && animelemtime(1)> 0
x = 0.953125

[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1510 && animelem = 6
x = 16
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 1511 && animelem = 1
x = 9.53125
y = -4
[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1511 && animelemtime(1)> 0
y = 0.09375
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1511 && animelemtime(1)> 0
x = 0.953125
[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 1512 && animelem = 1
x = 1

[State 1500, VelAdd] 
type = VelAdd
trigger1 = anim = 1512 && animelemtime(1)> 0
y = 0.34375
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1512 && animelemtime(1)> 0
x = 0.953125
;==============Effects
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1500 && animelem = 1
trigger2 = anim = 1510 && animelem = 1
value = 200,7
channel = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1501
trigger1 = animelem = 1
trigger2 = anim = 1511
trigger2 = animelem = 1
value = 2+(var(32)*10),4

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1501 
trigger1 = animelem = 6
trigger2 = animelem = 15
trigger3 = animelem = 24
value = 4,8
channel = 4

[State 1000, 1]
type = PlaySnd
triggerall = anim = 1511 
trigger1 = animelem = 2
trigger2 = animelem = 10
trigger3 = animelem = 19
trigger4 = animelem = 28
trigger5 = animelem = 37
value = 4,8
channel = 4
;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = anim = 1500 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(6) >= 0 
attr = S, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1501 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(9) >= 0 && AnimElemtime(12) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1501 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(18) >= 0 && AnimElemtime(21) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1501 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(27) >= 0 && AnimElemtime(32) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1510 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(6) >= 0 
attr = S, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1511 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 0 && AnimElemtime(7) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1511 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(13) >= 0 && AnimElemtime(16) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1511 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(22) >= 0 && AnimElemtime(25) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1511 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(31) >= 0 && AnimElemtime(34) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 13
guard.pausetime = 8,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = anim = 1511 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(40) >= 0 
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-70
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0


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

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

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1503+(cond(anim=1502,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