;================================================================================
; SPECIALS
;================================================================================
;Hishou Ken/Geki Hishou Ken
[Statedef 1000]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
;=======================================;Variables
[State 1000, Projectile Strength]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),0,10)
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1000,1010)
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 1000
trigger1 = animelem = 1
value = 200,6
channel = 0

[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 1010
trigger1 = animelem = 1
value = 200,16
channel = 0

[State 1000, Sound]
type = PlaySnd
trigger1 = Anim = 1000
trigger1 = animelem = 5
trigger2 = Anim = 1010
trigger2 = animelem = 8
value = 1001,3
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = Anim = 1000
trigger1 = animelemtime(5) = 1
helpertype = Normal
id = 1005
pos = 0, 0
postype = p1
facing = 1
stateno = 1005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000: Helper]
type = helper
trigger1 = anim = 1010
trigger1 = animelemtime(2) = 0
helpertype = Normal
id = 1000
pos = 0,0
postype = p1
facing = 1
stateno = 1011
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper]
type = helper
trigger1 = anim = 1010
trigger1 = animelemtime(2) = 0
helpertype = Normal
id = 1000
pos = 0,0
postype = p1
facing = 1
stateno = 1012
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000: Helper]
type = helper
trigger1 = Anim = 1010
trigger1 = animelemtime(12) = 2
helpertype = Normal
id = 1005
pos = 0, 0
postype = p1
facing = 1
stateno = 1015
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000: Helper]
type = helper
trigger1 = Anim = 1010
trigger1 = animelemtime(12) = 0
helpertype = Normal
id = 1005
pos = 0, 0
postype = p1
facing = 1
stateno = 1016
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Geki Hishou Ken Right Hand FX
;================================================================================
[Statedef 1011]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1011
sprpriority = 3
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1000
trigger2 = !animtime
;================================================================================
;Geki Hishou Ken Left Hand FX
;================================================================================
[Statedef 1012]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1012
sprpriority = 3
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1000
trigger2 = !animtime
;================================================================================
;Hishou Ken Projectile
;================================================================================
[Statedef 1005]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 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
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 1005
time = -1
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,35)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1
[State 1411, VarSet]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(18) = 12
persistent = 0
;=======================================;Effects
[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, 44, ifelse(p2dist x < 10, ceil(p2dist x), 88))),-88
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0

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

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

[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
[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
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = anim = 1005
trigger1 = animelemtime(2) >= 0 && animelemtime(5) < 0
attr = , SA
damage = floor(75*ifelse(root,var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;=======================================;Projectile Properties
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0
;================================================================================
;Geki Hishou Ken Projectile
;================================================================================
[Statedef 1015]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 1015
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1
[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 1015
time = -1
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,35)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1
[State 1411, VarSet]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(18) = 12
persistent = 0
;=======================================;Effects
[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
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 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
[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
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
attr = , SA
damage = floor(42*ifelse(root,var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 4
guard.pausetime = 1,4
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-88
hitsound = s3+(root,var(32)*2), 3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = s17502+(root,var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4

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

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

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


[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = animelemtime(20) >= 0 && animelemtime(21) < 0
attr = , SA
damage = floor(16*ifelse(root,var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-80
hitsound = s3+(root,var(32)*2), 3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = s17502+(root,var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;=======================================;Projectile Properties
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0
;================================================================================
;Geki Hishou Ken Wave FX
;================================================================================
[Statedef 1016]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1016
sprpriority = 3
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1000
trigger2 = !animtime

;================================================================================
; Hishou Ken EX
;================================================================================
[Statedef 1050]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(15) = ifelse((helper(10371), var(0) = [1,3]),4,7)
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1050,1060)
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 7
movetype = I  
;=======================================;Effects
[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 1001,2

[State 1000, Sound]
type = PlaySnd
trigger1 = animelem = 1
value = 200,6
channel = 0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = animelemtime(5) = 1
helpertype = Normal
id = 1005
pos = 44, 0;50
postype = p1
facing = 1
stateno = 1055
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000, 6]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1
;================================================================================
; Hishou Ken EX Projectile
;================================================================================
[Statedef 1055]
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) = 1057
;=======================================;

[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 = 1055 
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 = 1056
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,6])
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

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

[State 1005, End]
type=changeState
trigger1= movecontact
value=1056
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 1056]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1056 
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

;Hishou Ken EX Projectile (Reflected)
[Statedef 1057]
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) = 1055
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
;=======================================;

[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 = 1056
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,6])
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
value=1056
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

;================================================================================
;Shoryu Dan
;================================================================================
[Statedef 1100]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1100,1110)
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1100 || anim = 1110 
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 || anim = 1111
Statetype = A 
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 && animelem = 6
trigger2 = anim = 1111 && animelem = 6
movetype = I 

[State 710: NotHitBy]
type = NotHitBy
trigger1 = anim = 1100 
trigger2 = anim = 1100 && animelemtime(4) < 0
trigger3 = anim = 1110 
trigger4 = anim = 1110 && animelemtime(4) < 0
value = , NA, SA, HA, NP, SP, HP
;=======================================; Vels && Movement
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1100 && animelem = 4
trigger2 = anim = 1110 && animelem = 4
x = 4
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1101 && animelem = 1
x = 4
y = -7
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1101 && animelemtime(1) > 0 
y =0.53125

[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1101 && (animelemtime(1) > 0 && animelemtime(5) <0)
x = 0.854156494140625

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1111 && animelem = 1
x = 6
y = -9
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1111 && animelemtime(1) > 0
y = 0.4375

[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1111 && (animelemtime(1) > 0 && animelemtime(6) <0)
x = 0.854156494140625
;=======================================;Effects
[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1100 || anim = 1110
value=200,7
channel=0 

[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1100 || anim = 1110
value=1000,0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = Anim = 1101 || Anim = 1111
trigger1 = animelemtime(2) = 1
helpertype = Normal
id = 1105
pos = 0, 0
postype = p1
facing = 1
stateno = 1105
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1100 && animelemtime(4)>= 0
attr = S, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
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  = 16
ground.velocity = 0
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 = 1101
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 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 = 1, 4
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -76
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1101
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(2) >= 0 && animelemtime(3) < 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -86
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1101
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0 && animelemtime(3) < 2
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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1101
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 2 && animelemtime(4) < 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1101
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1101
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(5) >= 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1110 && 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,-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  = 16
ground.velocity = 0
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 = 1111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -76
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(2) >= 0 && animelemtime(3) < 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -86
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0 && animelemtime(3) < 2
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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 2 && animelemtime(4) < 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(5) >= 0 && animelemtime(6) < 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 = 1, 3
guard.pausetime = 1,4
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Shoryu Dan Landing
;================================================================================
[Statedef 1101]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = anim+1
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Shoryu Dan A FX
;================================================================================
[Statedef 1105]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1105
sprpriority = 3
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1100
trigger2 = !animtime
;================================================================================
;Shoryu Dan EX
;================================================================================
[Statedef 1150]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1150,1160)
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1150 || anim = 1160 
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1151 || anim = 1161
Statetype = A 
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1151 && animelem = 6
trigger2 = anim = 1161 && animelem = 6
movetype = I 

[State 710: NotHitBy]
type = NotHitBy
trigger1 = anim = 1150 
trigger2 = anim = 1150 && animelemtime(3) < 0
trigger3 = anim = 1160 
trigger4 = anim = 116
0 && animelemtime(4) < 0
value = , NA, SA, HA, NP, SP, HP
;=======================================; Vels && Movement
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1150 && animelem = 3
trigger2 = anim = 1160 && animelem = 3
x = 8
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1151 && animelem = 1
x = 4
y = -7
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1151 && animelemtime(1) > 0 
y =0.53125

[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1151 && (animelemtime(1) > 0 && animelemtime(6) <0)
x = 0.854156494140625

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1161 && animelem = 1
x = 6
y = -9
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1161 && animelemtime(1) > 0
y = 0.4375

[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1161 && (animelemtime(1) > 0 && animelemtime(6) <0)
x = 0.854156494140625
;=======================================;Effects
[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1150 || anim = 1160
value=200,7
channel=0 

[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1150 || anim = 1160
value=1000,0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = Anim = 1151 || Anim = 1161
trigger1 = animelemtime(1) = 0
helpertype = Normal
id = 1155
pos = 0, 0
postype = p1
facing = 1
stateno = 1155
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
Triggerall = Anim = 1150
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 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 = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -76
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1151
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 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 = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -76
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1151
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(2) >= 0 && animelemtime(3) < 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 = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -86
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1151
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0 && animelemtime(4) < 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 = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0


[State 210, 1]
type = HitDef
Triggerall = Anim = 1160
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -76
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1161
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 = M
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -76
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1161
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(2) >= 0 && animelemtime(3) < 0
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -86
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = Anim = 1161
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0 && animelemtime(4) < 0
attr = A, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -84
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Shoryu Dan Landing
;================================================================================
[Statedef 1151]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = anim+1
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Shoryu Dan EX FX
;================================================================================
[Statedef 1155]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1155
sprpriority = 3
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1150
trigger2 = !animtime
;================================================================================
;EVIL MOVE THAT I CAN'T REMEMBER WHAT IT'S CALLED
;================================================================================
[Statedef 1170]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1170
;=======================================; Vels && Movement
[State 105, Locked on]
type = PosSet
trigger1 = !animtime
x = ifelse((enemynear,facing = 1),((enemynear, pos x) - 40),((enemynear, pos x) + 40))
y = 0

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1170 && animelem = 11
x = 8

[State 750, Width]
type = Width
trigger1 = animelemtime(11)>=0 && animelemtime(11) < 7 
edge = 16,16


;=======================================;End
[State 1300, ChangeAnim]
type = ChangeState
trigger1 = !animtime
value = 1171

[Statedef 1171]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================; Vels && Movement
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1171
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1171  
trigger1 = animelemtime(21)>= 0 && animelemtime(30) < 0
attr = S, SA
damage = floor(75*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 13
guard.pausetime = 1,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-44
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
id = 1400
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, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 30
movetype = I 
;=======================================;End
[State 220,2]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = anim = 1171
value = 0
ctrl = 1
;================================================================================
;Zan'ei Ken
;================================================================================
[Statedef 1200]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1200,1210)
;=======================================;Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(24):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
triggerall = anim = 1203 || anim = 1213
triggerall = numhelper(10371)
triggerall = helper(10371), var(20)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
var(4) = 1

[State 210, 7]
type = ChangeState
triggerall = var(4) = 1
trigger1 = anim = 1203 && MoveContact = 1
trigger2 = anim = 1213 && MoveContact = 1
value = 1205
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1200 || anim = 1210 
trigger2 = anim = 1201 || anim = 1211 
trigger3 = anim = 1203 || anim = 1213 
value = anim+1

[State 1020,attack in distance]
type = ChangeAnim
triggerall = P2bodydist X <= 32 
trigger1 = anim = 1201 || anim = 1211 
value = anim+2

[State 1000, StateTypeSet]
type = StateTypeSet
triggerall = animelem = 1
trigger1 = anim = 1202 || anim = 1204
trigger2 = anim = 1212 || anim = 1214
movetype = I 
;=======================================;Effects
[State 310, AfterImage]
type = AfterImage
trigger1 = anim = 1201 && animelem = 1
trigger2 = anim = 1211 && animelem = 1
time = 10
length = 9
framegap = 3
palcontrast = 256,256,256
paladd = 0,0,0
palmul = 1,1,1

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

[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1200 || anim = 1210
value=200,5
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1200 && animelem = 1
trigger2 = anim = 1210 && animelem = 1
value=1000,1
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1201 && animelem = 1
trigger2 = anim = 1211 && animelem = 1
trigger3 = (anim = 1203 && animelem = 1) && vel x = 0
trigger4 = (anim = 1213 && animelem = 1) && vel x = 0
x = 10

[State 1300, VelSet]
type = VelSet
trigger1 = (anim = 1202 && animelem = 1) || (anim = 1204 && animelem = 1)
trigger2 = (anim = 1212 && animelem = 1) || (anim = 1214 && animelem = 1)
x = 0

[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1203 && animelemtime(1)> 0
trigger2 = anim = 1213 && animelemtime(1)> 0
x = 0.920822143554688
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1203 && animelemtime(1)>= 0 
attr = S, SA
damage = floor(83*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,-44
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -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 = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1213 && animelemtime(1)>= 0 
attr = S, SA
damage = floor(92*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,-44
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -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
;=======================================;End
[State 220,2]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = anim = 1202 || anim = 1204
trigger2 = anim = 1212 || anim = 1214
value = 0
ctrl = 1
;================================================================================
;Zan'ei Ken BUT EVIL
;================================================================================
[Statedef 1250]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1200,1210)
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1200 || anim = 1210 
trigger2 = anim = 1201 || anim = 1211 
trigger3 = anim = 1203 || anim = 1213 
value = anim+1

[State 1020,attack in distance]
type = ChangeAnim
triggerall = P2bodydist X <= 32 
trigger1 = anim = 1201 || anim = 1211 
value = anim+2

[State 1000, StateTypeSet]
type = StateTypeSet
triggerall = animelem = 1
trigger1 = anim = 1202 || anim = 1204
trigger2 = anim = 1212 || anim = 1214
movetype = I 
;=======================================;Effects
[State 310, AfterImage]
type = AfterImage
trigger1 = anim = 1201 && animelem = 1
trigger2 = anim = 1211 && animelem = 1
time = 10
length = 9
framegap = 3
palcontrast = 256,256,256
paladd = 0,0,0
palmul = 1,1,1

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

[State 200, snd]
type=null;playsnd
triggerall = animelem = 1
trigger1 = anim = 1200 || anim = 1210
value=200,5
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1200 && animelem = 1
trigger2 = anim = 1210 && animelem = 1
value=1000,1
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1201 && animelem = 1
trigger2 = anim = 1211 && animelem = 1
trigger3 = (anim = 1203 && animelem = 1) && vel x = 0
trigger4 = (anim = 1213 && animelem = 1) && vel x = 0
x = 10

[State 1300, VelSet]
type = VelSet
trigger1 = (anim = 1202 && animelem = 1) || (anim = 1204 && animelem = 1)
trigger2 = (anim = 1212 && animelem = 1) || (anim = 1214 && animelem = 1)
x = 0

[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1203 && animelemtime(1)> 0
trigger2 = anim = 1213 && animelemtime(1)> 0
x = 0.920822143554688
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1203 && animelemtime(1)>= 0 
attr = S, SA
damage = floor(83*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,-44
hitsound = s2,6
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
id = 1400
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 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1213 && animelemtime(1)>= 0 
attr = S, SA
damage = floor(92*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,-44
hitsound = s2,6
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
id = 1400
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
;=======================================;End
[State 220,2]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = anim = 1202 || anim = 1204
trigger2 = anim = 1212 || anim = 1214
value = 0
ctrl = 1
;================================================================================
;Gadankou
;================================================================================
[Statedef 1205]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1205

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 6
movetype = I 
;=======================================;Effects
[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 1

[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=200,10
channel=0 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 5.61344909667969

[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 6
x = 0
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = animelemtime(3)>= 0 && animelemtime(6) < 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 = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-60
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
id = 1400
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Kuuha Dan
;================================================================================
[Statedef 1300]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(3) = [1,3]),0,1) 

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1300,1310)
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1300 || anim = 1310 
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1301 || anim = 1311
Statetype = A 
[State 710: NotHitBy]
type = NotHitBy
trigger1 = anim = 1300 && animelemtime(2) < 0
value = , NA, SA, HA, NP, SP, HP
;=======================================; Vels && Movement
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1300 && animelem = 1
trigger2 = anim = 1301 && animelem = 1
x = 6
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1300 && animelem = 2
x = 16
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1300 && animelem = 3
trigger2 = anim = 1300 && animelem = 4
trigger3 = anim = 1300 && animelem = 5
x = 8
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1301 && animelem = 1
x = 3.5
y = -5.5
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1301 && animelemtime(1) > 0 
y = 0.34375

[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1310 && animelem = 2
trigger2 = anim = 1310 && animelem = 3
trigger3 = anim = 1310 && animelem = 4
x = 8
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1311 && animelem = 1
x = 5
y = -6.5
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1311 && animelemtime(1) > 0 
y = 0.34375
;=======================================;Effects
[State 3303, Explod]
type = Explod
trigger1 = anim = 1300 && animelem = 1
trigger2 = anim = 1310 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
facing = 1
persistent = 0
persistent = 0

[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1300 || anim = 1310
value=200,8
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1301 && animelem = 1
trigger2 = anim = 1311 && animelem = 1
value=1000,0
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = anim = 1300
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(5) >= 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 = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-92
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 = 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(1) >= 0 && animelemtime(2) < 0
attr = A, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-80
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 = 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(2) >= 0 && animelemtime(3) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-54
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 = 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(3) >= 0 && animelemtime(4) < 0
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-40
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 = 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 
attr = A, SA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-40
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 = 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 = 1310
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 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 = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-92
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 = 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(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-80
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 = 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(2) >= 0 && animelemtime(3) < 0
attr = A, SA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-54
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 = 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(3) >= 0 && animelemtime(4) < 0
attr = A, SA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-40
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 = 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 
attr = A, SA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 9
guard.pausetime = 8,9
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-40
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 = 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
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Kuuha Dan Landing
;================================================================================
[Statedef 1301]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = anim+1
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Yami Abisegeri
;================================================================================
[Statedef 1320]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
anim = 1320
;=======================================;Animations and Statetype
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 4
movetype = I 
;=======================================;Effects
[State 310, AfterImage]
type = AfterImage
trigger1 =  animelem = 1
time = 10
length = 9
framegap = 3
palcontrast = 256,256,256
paladd = 0,0,0
palmul = 1,1,1

[State 200, snd]
type=playsnd
trigger1= animelem=1 
value= 4,4
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 3
x = -8.77734375
[State 1300, VelSet]
type = VelMul
trigger1 = animelemtime(3) > 0
x = 0.8359375
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 8
x = 0
;=======================================;Helper
[State 1000: Helper]
type = helper
trigger1 = animelemtime(2) = 0
helpertype = Normal
id = 1325
pos = -24,24
postype = p1
facing = 1
stateno = 1325
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 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,-44
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
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
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
Palfx.time       = 28
Palfx.add       = 152,104,248
Palfx.sinadd   = 0,30,40,10
Palfx.color     = 64
Palfx.invertall = 0
id = 1320

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0 && animelemtime(4) < 0
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -62
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0
Palfx.time       = 48
Palfx.add       = 152,104,248
Palfx.sinadd   = 0,30,40,10
Palfx.color     = 64
Palfx.invertall = 0
id = 1320
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Yami Abisegeri FX
;================================================================================
[Statedef 1325]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1325
sprpriority = 3
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1320
trigger2 = !animtime
;================================================================================
;Gekiheki Haisui Shou
;================================================================================
[Statedef 1400]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
anim = 1400
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1400 || anim = 1401 || anim = 1402 || anim = 1403
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1404 && animelem = 1
movetype = I 
;=======================================;Vels & Movements
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1400 && animelem = 1
trigger2 = anim = 1401 && animelem = 1
trigger3 = anim = 1402 && animelem = 1
trigger4 = anim = 1403 && animelem = 1
x = 8.77734375
[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1400 && animelemtime(1) > 0
trigger2 = anim = 1401 && animelemtime(1) > 0
trigger3 = anim = 1402 && animelemtime(1) > 0
trigger4 = anim = 1403 && animelemtime(1) > 0
x = 0.8359375
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1404 && animelem = 1
x = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1400 && animelem = 1
value=200,0
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1403 && animelem = 1
value=200,9
channel=0 
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1400 && (animelemtime(3)>= 0 && 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 = 7, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-82
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
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 = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1401 && (animelemtime(3)>= 0 && 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 = 7, 13
guard.pausetime = 11,12
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  = 16
ground.velocity = 0
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 = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1402 && (animelemtime(1)>= 0 && animelemtime(2) < 0)
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
;guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-80
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
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 = 1403
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0 
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -44
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Gekiheki Haisui Shou EX Part 1
;================================================================================
[Statedef 1450]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
anim = 1450
;=======================================;Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(21):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = Vel Y + Pos Y >= 0
triggerall = numhelper(10371)
triggerall = helper(10371), var(21)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
var(4) = 1

[State 210, 7]
type = ChangeState
triggerall = var(4) = 1
trigger1 = anim = 1450 && animelemtime(4)>=0
value = 1451
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1450
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1451 && animelem = 1
movetype = I 
;=======================================;Vels & Movements
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1450 && animelem = 1
x = 8.25
[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1450 && animelemtime(1) > 0
x = 0.8359375
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1451 && animelem = 1
x = 0
;=======================================;Effects
[State 3303, Explod]
type = Explod
trigger1 = anim = 1450 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
facing = 1
persistent = 0
persistent = 0

[State 200, snd]
type=playsnd
trigger1 = anim = 1450 && animelem = 1
value=200,0
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1450 && animelem = 1
value=200,15
channel = 4
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1450 && (animelemtime(3)>= 0 && animelemtime(4) < 0)
attr = S, SA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
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),3
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 = -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
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Gekiheki Haisui Shou EX Part 2
;================================================================================
[Statedef 1451]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
anim = 1452
;=======================================;Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(21):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = Vel Y + Pos Y >= 0
triggerall = numhelper(10371)
triggerall = helper(10371), var(21)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
var(4) = 1

[State 210, 7]
type = ChangeState
triggerall = var(4) = 1
trigger1 = anim = 1452 && animelemtime(4)>=0
value = 1452
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1452
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1453 && animelem = 1
movetype = I 
;=======================================;Vels & Movements
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1452 && animelem = 1
x = 8.25
[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1452 && animelemtime(1) > 0
x = 0.8359375
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1453 && animelem = 1
x = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1452 && animelem = 1
value=200,15
channel = 4
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1452 && (animelemtime(3)>= 0 && animelemtime(4) < 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 = 11, 13
guard.pausetime = 11,12
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  = 16
ground.velocity = 0
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
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Gekiheki Haisui Shou EX Part 3
;================================================================================
[Statedef 1452]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
anim = 1454
;=======================================;Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(21):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = Vel Y + Pos Y >= 0
triggerall = numhelper(10371)
triggerall = helper(10371), var(21)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
var(4) = 1

[State 210, 7]
type = ChangeState
triggerall = var(4) = 1
trigger1 = anim = 1454 && animelemtime(3)>=0
value = 1453
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1454
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1455 && animelem = 1
movetype = I 
;=======================================;Vels & Movements
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1454 && animelem = 1
x = 8.25
[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1454 && animelemtime(1) > 0
x = 0.8359375
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1455 && animelem = 1
x = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1454 && animelem = 1
value=200,15
channel = 4
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1454 && (animelemtime(1)>= 0 && animelemtime(2) < 0)
attr = S, SA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-80
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
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
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Gekiheki Haisui Shou EX Part 4
;================================================================================
[Statedef 1453]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
anim = 1456
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1456
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1457 && animelem = 1
movetype = I 
;=======================================;Vels & Movements
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1456 && animelem = 1
x = 8.25
[State 1300, VelSet]
type = VelMul
trigger1 = anim = 1456 && animelemtime(1) > 0
x = 0.8359375
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1457 && animelem = 1
x = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1456 && animelem = 1
value=200,9
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1456 && animelem = 1
value=200,15
channel = 4
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1456 && animelemtime(3)>= 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 = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -20,-44
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
id = 1405
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Gen'ei Shiranui
;================================================================================
[Statedef 1500]
type    = A
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0,0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(3) = [1,3]),0,1) 
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1500,1510)
;=======================================;Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(20):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = Vel Y + Pos Y >= 0
triggerall = numhelper(10371)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
var(4) = 1

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = Vel Y + Pos Y >= 0
triggerall = numhelper(10371)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
var(4) = 2

[State 210, 7]
type = ChangeState
triggerall = var(4) = 1
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1505

[State 210, 7]
type = ChangeState
triggerall = var(4) = 2
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1506
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 6
y = 7
;=======================================;Effects
[State 310, AfterImage]
type = AfterImage
trigger1 = animelem = 3
time = 10
length = 9
framegap = 3
palcontrast = 256,256,256
paladd = 0,0,0
palmul = 1,1,1

[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=200,0
channel=0 

[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=1000,5
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 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 = 11, 12
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-36
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = high
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -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 = 1500
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Gen'ei Shiranui Landing
;================================================================================
[Statedef 1501]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = anim = 1501
trigger1 = time > 0
triggerall = numhelper(10371)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
var(4) = 1

[State 1600, VarSet]
type = VarSet
trigger1 = anim = 1501
trigger1 = time > 0
triggerall = numhelper(10371)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
var(4) = 2

[State 210, 7]
type = ChangeState
triggerall = var(4) = 1
trigger1 = anim = 1501
value = 1505

[State 210, 7]
type = ChangeState
triggerall = var(4) = 2
trigger1 = anim = 1501
value = 1506
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1501

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1501 && animtime = 0
value = 1502
;=======================================; Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1501 && animelem = 1
x = 9.75

[State 1300, VelSet]
type = VelSet
trigger1 = (anim = 1502 && animelem = 1) 
x = 0

[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1501 && animelemtime(1)> 0
x = 0.8125
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = anim = 1502
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Gen'ei Shiranui -> Uwa Agito
;================================================================================
[Statedef 1505]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
facep2 = 1
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1505
;=======================================; Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 200, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = I
;=======================================;Effects
[State -3, land]
type = PlaySnd
triggerall = prevstateno = 1500
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=200,9
channel=0 

[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=1000,2
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(3) >= 0 && animelemtime(4) < 0
attr = S, SA
damage = floor(75*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 = -18, -44
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(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 = 1505
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Gen'ei Shiranui -> Shimo Agito
;================================================================================
[Statedef 1506]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
facep2 = 1
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1506

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

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1507
StateType = A

[State 200, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1507
trigger1 = AnimElem = 4
movetype = I
;=======================================; Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1507 && animelem = 1
y = -4.5
x = 5
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1507 && animelemtime(1) > 0
y = 0.40625  
;=======================================;Effects
[State -3, land]
type = PlaySnd
triggerall = prevstateno = 1500
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 200, snd]
type=playsnd
trigger1 = anim = 1506 && animelem = 1
value=200,9
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1507 && animelem = 1
value=1000,4
;=======================================;End
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1507
trigger1 = AnimElemtime(2) >= 0 && animelemtime(4) < 0
attr = A, SA
damage = floor(92*ifelse(var(56),1.25,1)),8
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -44
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13-(var(32));s2, 7
guard.sparkno = s17501+(var(31)*10000)
animtype = Hard
air.animtype = back
guardflag = H
hitflag = MAF
priority = 5, Hit
ground.type = low
pausetime = 11,13
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -8.6953125
air.type = High
air.velocity = -4.5,-7;.25
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 = 0.5
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Gen'ei Shiranui -> Shimo Agito Landing
;================================================================================
[Statedef 1507]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1508
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Bakushin
;================================================================================
[Statedef 1550]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1550

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

[State 1020,attack in distance]
type = ChangeAnim
triggerall = P2bodydist X <= 16
trigger1 = anim = 1551 
value = anim+2

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1552 && animelem = 1
trigger2 = anim = 1553 && animelem = 2
movetype = I 
;=======================================;Effects
[State 3035, 1]
type = AfterImage
trigger1 = anim = 1551 && animelem = 1
trigger2 = anim = 1553 && animelem = 1
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

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

[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1550 
value=200,10
channel=0 

[State 200, snd]
type=playsnd
trigger1 = anim = 1551 && animelem = 1
value=1000,1
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1551 && animelem = 1
x = 6.5

[State 1300, VelSet]
type = VelSet
trigger1 = (anim = 1552 && animelem = 1) 
trigger2 = (anim = 1553 && animelem = 1) 
x = 0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = anim = 1550
trigger1 = animelem = 2
helpertype = Normal
id = 1550
pos = 0,0
postype = p1
facing = 1
stateno = 1565
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000: Helper]
type = helper
trigger1 = anim = 1551
trigger1 = animelem = 1
helpertype = Normal
id = 1550
pos = 0,0
postype = p1
facing = 1
stateno = 1566
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 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
trigger1 = anim = 1553
Trigger1 = animelem = 1
attr = S, ST          
hitflag = M -        
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 1555
p2stateno = 1557
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 1550
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
ground.velocity = 0,0

;=======================================;End
[State 220,2]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = anim = 1552 || anim = 1553
value = 0
ctrl = 1
;================================================================================
;Bakushin Success
;================================================================================
[Statedef 1555]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1554
sprpriority = 2
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1554 || anim = 1555 || anim = 1556 || anim = 1557
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = [1555,1558]
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1555 && animelem = 1
x = 5
y = -4.6875
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1555 && animelemtime(1) > 0 
y = 0.3125
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1556 && animelem = 1
x = 0
y = 0
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1558 && animelem = 1
x = -6
y = -4.125
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1558 && animelemtime(1) > 0 
y = 0.875
;=======================================;Throw Mechanics
[State 801, Width]
type = Width
trigger1 = !Time
edge = 64,
[State -2, WinKO]
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
;=======================================;Binds
[State 810, bind]
type = TargetBind
triggerall = anim = 1554
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
ID = 1550
pos = 36, 0

[State 810, target]
type = bindtotarget
trigger1 = anim = 1556
trigger1 = animelemtime(1) >= 0 
trigger2 = anim = 1557
trigger2 = animelemtime(1) >= 0 
pos = (target, const(size.head.pos.x))-6,((target, const(size.head.pos.y))+80),f ;52
ID = 1550
;=======================================;Damage/TargetStates
[State 801, fly p2]
type = TargetState
trigger1 = anim = 1556
trigger1 = animelem = 1
value = 1559
ignorehitpause = 1
ID = 1550

[State 801, fly p2]
type = TargetState
trigger1 = anim = 1557
trigger1 = animelem = 6
value = 1560
ignorehitpause = 1
ID = 1550
;=======================================;Effects
[State 1000: Helper]
type = helper
trigger1 = anim = 1554
trigger1 = animelem = 1
helpertype = Normal
id = 1550
pos = 0,0
postype = p1
facing = 1
stateno = 1567
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 220, Explod]
type = Explod
triggerall = anim = 1554
Trigger1 = animelem = 1 
anim = 17002+(var(31)*10000)
pos = 52, -72
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1
[State 5100, 10]
type = PlaySnd
triggerl = anim = 1554
trigger1 = animelem = 1
value = 3+(var(32)*2),3
persistent = 0

[State 200, snd]
type=playsnd
triggerall = anim = 1555
Trigger1 = animelem = 1 
value=2+(var(32)*10),4

[State 5100, 10]
type = PlaySnd
triggerall = anim = 1556
trigger1 = animelem = 1
value = 2+(var(32)*10), 1
[State 805, hitspark]
type = Explod
triggerall = anim = 1556
trigger1 = animelem = 1
anim = 20001
pos = 8, -80
postype = p1
SprPriority = 1
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State 200, Sound]
type = Playsnd
Triggerall = anim = 1556
Trigger1 = animelem = 1
Trigger2 = animelem = 3
value = 1000,18

[State 5100, 10]
type = PlaySnd
trigger1 = anim = 1557
trigger1 = animelem = 5
value = 3+(var(32)*2),3
persistent = 0
[State 220, Explod]
type = Explod
triggerall = anim = 1557
Trigger1 = animelem = 5 
anim = 17002+(var(31)*10000)
pos = 8, -80
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1
;=======================================;End
[State 1000, 6]
type = ChangeState
Triggerall = Anim = 1558
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
;================================================================================
;Bakushin Landing and finish
;================================================================================
[Statedef 1556]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1559
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 1
x = -3
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 19
x = 0
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 300, Slideland]
type = PlaySnd
trigger1 = !time
value = 2+(var(32)*10),11
persistent = 0

[State 1411, VarSet]
type = VarSet
trigger1 = animelem = 21
var(18) = 20
persistent = 0

[State -3, land]
type = PlaySnd
trigger1 = animelem = 21
value =  2,6

[State -3, land]
type = PlaySnd
trigger1 = animelem = 21
value =  4,3

[State 200, snd]
type=playsnd
trigger1 = animelem = 21
value=200,11
channel=0 

[State 3000, EnvShake]
type = EnvShake
trigger1 = animelem = 21
time = 22
freq = 180
ampl = -4
persistent = 0

[State 13000, EnvColor]
type = EnvColor
trigger1 = animelem = 21
value = 248,248,248
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 200, Flame 1]
type = Explod
trigger1 = animelem = 21
anim = 1562
ID = 1562
pos = -16,0
postype = p2  ;p2,front,back,left,right
bindtime = 1
removetime = -2
sprpriority = 5
removeongethit = 1
ignorehitpause = 1
facing = -1

[State 1000: Helper]
type = helper
triggerall = !NumHelper(12506)
trigger1 = numtarget(1550)
trigger1 = target(1550),stateno = 1561
helpertype = Normal
name = "Normal Expl"
id = 12506
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12506
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
[State 1000: Helper]
type = helper
triggerall = !NumHelper(12507)
triggerall = numhelper(247)
trigger1 = numtarget(1550)
trigger1 = target(1550),stateno = 1561
helpertype = Normal
name = "Pyro Expl"
id = 12507
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12507
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
[State 1000: Helper]
type = helper
triggerall = !NumHelper(12508)
triggerall = numhelper(247)
trigger1 = numtarget(1550)
trigger1 = target(1550),stateno = 1561
helpertype = Normal
name = "Multi Small Expl"
id = 12508
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12508
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
[State 1000: Helper]
type = helper
triggerall = !NumHelper(12509)
triggerall = numhelper(247)
trigger1 = numtarget(1550)
trigger1 = target(1550),stateno = 1561
helpertype = Normal
name = "Small Expl"
id = 12509
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12509
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
;=======================================;Damage/TargetStates
[State 801, fly p2]
type = TargetState
trigger1 = animelem = 21
value = 1561
ignorehitpause = 1
ID = 1550

[State 801, Damage]
Type = TargetLifeAdd
Trigger1 = animelem = 21 
value = ifelse(var(51),-200,-258)
ID = 1550
absolute = 1
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Bakushin Get Hits
;================================================================================
[StateDef 1557]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = 0 
Ctrl = 0

[State 245]
type = Nothitby
trigger1 = 1
value = SCA

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

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

[State 820, 2]
type = Changestate
trigger1 = animtime = 0
value = 1558

[Statedef 1558]
type    = S
movetype= H
physics = N

[State 245]
type = Nothitby
trigger1 = 1
value = SCA

[State 1402, VelSet]
type = VelSet
trigger1 = time >=0 && time < 20
x = (-11.1796875*exp((-0.162809929)*(time)))

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = time = 0
value = 5002
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 5002 && !animtime
value = 5017

[State 5001, 4]
type = VelSet
trigger1 = time = 20
x = 0

[State 5001, 6]
type = SelfState
trigger1 = time = 600
value = 5050

[StateDef 1559]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = 0 
Ctrl = 0

[State 245]
type = Nothitby
trigger1 = 1
value = SCA

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

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

[State 5001, 6]
type = SelfState
trigger1 = time = 600
value = 5050

[Statedef 1560]
type    = S
movetype= H
physics = N

[State 245]
type = Nothitby
trigger1 = 1
value = SCA

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = time = 0
value = 5002
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 5002 && !animtime
value = 5017

[State 5001, 6]
type = SelfState
trigger1 = time = 600
value = 5050

[StateDef 1561]
Type = A
MoveType =  H
physics = N
VelSet = 0, -7
sprpriority = 0 
Ctrl = 0

[State 903, VelSet]
type = VelSet
trigger1 = time < 6
x = (-11.375*exp((-0.20763936477824450161544104426739)*(time-1)));

[State 245]
type = Nothitby
trigger1 = 1
value = SCA

[State 1040, go]
type = PosAdd
Trigger1 = !time
y = -1

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

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

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

[State -2, PalFX]
type = PalFX
trigger1 = !time 
time = 28
add = 231,79,0
sinadd = 40,30,0,10
invertall = 0
color = 64 
ignorehitpause = 1
persistent = 2

[State 811, 2]
type = SelfState
Trigger1 = vel y > 0 && pos y >= 0
value = 5100
;================================================================================
;Bakushin Dash FX
;================================================================================
[Statedef 1565]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1565
sprpriority = 3
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,anim != 1550
[Statedef 1566]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1566
sprpriority = 3
;=======================================;Bind
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,anim != 1551
[Statedef 1567]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1567
sprpriority = 3
;=======================================;FX
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = !animtime
