;================================================================================
; SPECIALS
;================================================================================
;Gadou 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 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 200,8
channel = 0
[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(5) = 1
value = 1000,0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = animelemtime(5) = 1
helpertype = Normal
id = 1005
pos = 57+3, -90 ;50
postype = p1
facing = 1
stateno = 1005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Gadou Ken Projectile
;================================================================================
[Statedef 1005]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1015
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = !time
x = 3
; POS X SAVER 
[State 3000000]
type = VarSet
trigger1 = 1
var(4) = ceil(pos x)
ignorehitpause = 1
; POS Y SAVER 
[State 3000000]
type = VarSet
trigger1 = 1
var(5) = ceil(pos y)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 1005+var(15) 
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1
[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 1006
time = -1
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,35)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1
[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, 0, ifelse(p2dist x < 10, ceil(p2dist x), 10))),0
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 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 = (animelemno(0) = [1,5])
trigger2 = anim = 1015
trigger2 = (animelemno(0) = [1,8])
attr = S, SP
damage = floor(50*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1005
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

[State 1005, End]
type=changeState
trigger1= movecontact
trigger2= animtime = 0
value=1006
ignorehitpause = 0
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Gadou Ken Projectile Disperse
;================================================================================
[Statedef 1006]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1006+var(15) 
sprpriority = 4
;=======================================;Projectile Properties
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
;=======================================;Effects
[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
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0
;=======================================;Recovery for Target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Gadou Ken Projectile Reflected
;================================================================================
[Statedef 1015]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1005
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = !time
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)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 1005+var(15) 
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1
[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 1006
time = -1
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,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
;=======================================;Effects
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

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

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

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
affectteam = F
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = anim = 1005
trigger1 = (animelemno(0) = [1,5])
trigger2 = anim = 1015
trigger2 = (animelemno(0) = [1,8])
attr = S, SP
damage = floor(50*ifelse(var(56),1.25,1)),0
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 12
guard.pausetime = 1,11
sparkno = -1
sparkxy = -10, -44
hitsound = -1
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -11.1796875
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
persistent = 0
p1sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1

[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
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

[State 1005, End]
type=changeState
trigger1= movecontact
value=1006
ignorehitpause = 0
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Kouryu Ken 
;================================================================================
[Statedef 1100]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet];Flash
type = VarSet
trigger1 = !time
var(15) = ifelse(random<500,1,ifelse(var(51),1,0))

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

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = var(15) = 0
trigger1 = !time
value = ifelse(var(5)=0,1100,1110)
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = var(15)
trigger1 = !time
value = ifelse(var(5)=0,1105,1115)

[State -2, Moves That Always Juggle]
type = AssertSpecial
trigger1 = var(15) = 1
flag = NoJuggleCheck
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1100 || anim = 1101 || anim = 1105 || anim = 1106
trigger2 = anim = 1110 || anim = 1111 || anim = 1115 || anim = 1116
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 || anim = 1106
trigger2 = anim = 1111 || anim = 1116
Statetype = A 
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1102 && animelem = 1
trigger2 = anim = 1107 && animelem = 1
trigger3 = anim = 1102 && animelem = 1
trigger4 = anim = 1117 && animelem = 1
movetype = I 

[State 710: NotHitBy]
type = NotHitBy
trigger1 = anim = 1105 
trigger2 = anim = 1106 && animelemtime(2) < 0
trigger3 = anim = 1115 
trigger4 = anim = 1116 && animelemtime(2) < 0
value = , NA, SA, HA, NP, SP, HP
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1101 && animelem = 1
trigger2 = anim = 1106 && animelem = 1
x = 1.75
y = -6
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1101 && animelemtime(1) > 0
trigger2 = anim = 1106 && animelemtime(1) > 0
y = 0.5

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

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

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

[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1100 || anim = 1105
trigger2 = anim = 1110 || anim = 1115
value=1000,5
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
;triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1105 && animelem = 3
attr = S, SA
damage = floor(90*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 16, 16
guard.pausetime = 16,16
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-92
hitsound = s2, 13
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
envshake.ampl = -4      
envshake.freq = 180
envshake.time = 14 
id = 1100
persistent = 0
[State 210, 1]
type = HitDef
;triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1106 && animelem = 1
attr = A, SA
damage = floor(125*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,-108
hitsound = s2, 13
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 1101
nochainid = 1100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1100 && animelem = 2
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,-92
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 1100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1101 && animelem = 1
attr = A, 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,-108
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 1101
nochainid = 1100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0


[State 210, 1]
type = HitDef
;triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1115 && animelem = 3
attr = S, SA
damage = floor(90*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 16, 16
guard.pausetime = 16,16
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-92
hitsound = s2, 13
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
envshake.ampl = -4      
envshake.freq = 180
envshake.time = 14 
id = 1100
persistent = 0
[State 210, 1]
type = HitDef
;triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1116 && animelem = 1
attr = A, SA
damage = floor(125*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,-108
hitsound = s2, 13
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
id = 1101
nochainid = 1100
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1110 && animelem = 2
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,-92
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 1100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1111 && animelem = 1
attr = A, 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,-108
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 1101
nochainid = 1100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Kouryu Ken 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
;================================================================================
;Dankuu Kyaku
;================================================================================
[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(3) = [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 
trigger2 = anim = 1210 
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1201 
trigger2 = anim = 1211
Statetype = A 
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1201 && animelem = 5
trigger2 = anim = 1211 && animelem = 12
movetype = I 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1201 && animelem = 1
x = 3.5
y = -5.5
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1201 && animelemtime(1) > 0
y = 0.625

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1211 && animelem = 1
x = 3.5
y = -3.5
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1211 && animelemtime(1) > 0 && animelemtime(12) < 0
y = 0.1875
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1211 && animelemtime(12) > 0 
y = 0.5
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1201 && animelem = 3
trigger2 = anim = 1211 && animelem = 4
trigger3 = anim = 1211 && animelem = 7
value=200,10
channel=0
[State 200, snd]
type=playsnd
trigger1 = anim = 1211 && animelem = 11
value=200,11
channel=0
[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1200 || anim = 1210
value=1000,6
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1201 && (animelemtime(3)>= 0 && animelemtime(5) < 0)
attr = A, SA
damage = floor(66*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,-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 = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1200
nochainid = 1200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1211 && (animelemtime(4)>= 0 && animelemtime(5) < 0)
attr = S, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-62
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
animtype = Hard
air.animtype = back
ground.type = high
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = h
pausetime = 11,13
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -11.1796875
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
id = 1200
nochainid = 1200

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1211 && (animelemtime(7)>= 0 && animelemtime(8) < 0)
attr = S, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-50
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
animtype = Hard
air.animtype = back
ground.type = high
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = h
pausetime = 11,13
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -11.1796875
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

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1211 && (animelemtime(11)>= 0 && animelemtime(12) < 0)
attr = A, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-50
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Dankuu Kyaku Landing
;================================================================================
[Statedef 1201]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 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
;================================================================================
;Kuuchu Dankuu Kyaku
;================================================================================
[Statedef 1220]
type    = A
movetype= A
physics = N
poweradd= 109
ctrl = 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,1220,1230)
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1220 
trigger2 = anim = 1230 
value = anim+1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1221 && animelem = 1
trigger2 = anim = 1231 && animelem = 1
movetype = I 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1220 && animelem = 1
trigger2 = anim = 1230 && animelem = 1
x = (ifelse((Vel X >= 0),2.5,-2.5))
y = -2.875
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1220 && animelemtime(1) > 0
trigger2 = anim = 1230 && animelemtime(1) > 0
y = 0.125

[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1221 && animelemtime(1) > 0
trigger2 = anim = 1231 && animelemtime(1) > 0
y = 0.6171875
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1220 && animelem = 4
trigger2 = anim = 1230 && animelem = 4
value=200,12
channel=0
[State 200, snd]
type=playsnd
trigger1 = anim = 1230 && animelem = 7
value=200,13
channel=0
[State 200, snd]
type=playsnd
trigger1 = anim = 1230 && animelem = 11
value=200,14
channel=0

[State 200, snd]
type=playsnd
triggerall = animelem = 1
trigger1 = anim = 1220 || anim = 1230
value=1000,6
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1220 && (animelemtime(2)>= 0 && animelemtime(5) < 0)
attr = A, 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,-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 = -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 = 1100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1230 && (animelemtime(4)>= 0 && animelemtime(5) < 0)
attr = S, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-62
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
animtype = Hard
air.animtype = back
ground.type = high
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = h
pausetime = 11,13
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -11.1796875
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

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1230 && (animelemtime(7)>= 0 && animelemtime(8) < 0)
attr = S, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-50
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
animtype = Hard
air.animtype = back
ground.type = high
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = h
pausetime = 11,13
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -11.1796875
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

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1230 && (animelemtime(11)>= 0 && animelemtime(12) < 0)
attr = A, SA
damage = floor(42*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-50
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
id = 1100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Kuuchuu Dankuu Kyaku Landing
;================================================================================
[Statedef 1221]
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
;================================================================================
;Kyuukyoku Tenchi Gadou Zuki
;================================================================================
[Statedef 1300]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
anim = 1300
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1300 
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1301 
value = anim+2

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1301 
trigger1 = movehit = 1
value = anim+1
ignorehitpause = 0

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1302 || anim = 1303 
movetype = I 
;=======================================;Vels & Movements
[State 1300, PosAdd]
type = PosAdd
triggerall = anim = 1301 
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 4
x = 4
[State 1300, PosAdd]
type = PosAdd
triggerall = anim = 1301 
trigger1 = animelem = 3
x = 16
;=======================================;Effects
[State 0, EnvShake]
type = EnvShake
triggerall = anim = 1301 
trigger1 = animelem = 5
time = 14
ampl = -4
freq = 180
[State 3303, Explod]
type = Explod
triggerall = anim = 1301 
trigger1 = animelem = 5
anim = 12000
pos = 44,0
id = 12000
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0
[State 3303, Explod]
type = Explod
triggerall = anim = 1301 
trigger1 = animelem = 5
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 300, Land]
type = PlaySnd
triggerall = anim = 1301 
trigger1 = animelem = 5
value = 2+(var(32)*10),9
[State 300, 0]
type = PlaySnd
triggerall = anim = 1301 
trigger1 = animelem = 1
value = 4,8
[State 300, 0]
type = PlaySnd
triggerall = anim = 1302 
trigger1 = animelem = 1
value = 1000,7
[State 200, snd]
type=playsnd
trigger1 = anim = 1300  && animelem = 1
value=200,36
channel=0
[State 200, snd]
type=playsnd
trigger1 = anim = 1301  && animelem = 1
value=200,37
channel=0
;=======================================;Helpers
[State 1000: Helper]
type = helper
trigger1 = anim = 1300
trigger1 = animelemtime(3) = 1
helpertype = Normal
id = 1304
pos = 0,0
postype = p1
facing = 1
stateno = 1304
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper]
type = helper
trigger1 = anim = 1300
trigger1 = animelem = 3
helpertype = Normal
id = 1305
pos = 0,0
postype = p1
facing = 1
stateno = 1305
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;Hitdef
[State 0, ReversalDef]
type = ReversalDef
triggerall = numenemy
triggerall = enemynear, movetype = A
trigger1 = anim = 1300
trigger1 = AnimElem = 3
reversal.attr = SCA,NA,SA,HA
hitflag = MAF
pausetime = 7,7
sparkno = s17502+(var(31)*10000)
sparkxy = 0,-10
hitsound = s3+(var(32)*2),13
persistent = 1
guard.dist = 0 
Numhits = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1301
trigger1 = AnimElemtime(5) >= 0 && animelemtime(8) < 0
attr = S, SA
damage = floor(180*ifelse(var(56),1.25,1)),8
animtype = d
air.animtype = d
;guardflag = MA (NO)
hitflag = MAF
priority = 4, Hit
pausetime = 24, 24
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -83
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 = -19,-9
guard.velocity = -11.1796875
air.type = High
air.velocity = -19,-9
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
fall = 1
id = 1200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
persistent = 0
envshake.time = 14
envshake.freq = 180
envshake.ampl = -4
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
p2stateno = 10200
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;================================================================================
;Kyuukyoku Tenchi Gadou Zuki FX
;================================================================================
[Statedef 1304]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1304
sprpriority = 4
;=======================================;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 != 1300
trigger2 = !animtime
;================================================================================
;Kyuukyoku Tenchi Gadou Zuki Helper
;================================================================================
[Statedef 1305]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 0
anim = 1305

[State 1000, Anim]
Type = PlaySnd
Trigger1 = !Time && prevstateno 
Value = 3+(root,var(32)*2), 13
ignorehitpause = 1

[State 3000, ContactSpark]
type = Explod
Trigger1 = !Time && prevstateno 
anim = 17502+(root,var(31)*10000)
ID = 1000
pos = 32,-82
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 5
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = -1

[State 9100,BindToRoot]
type = BindToRoot
trigger1 = 1
pos = 0,0

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

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

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1300
trigger2 = root,anim != 1300
;================================================================================
;Zenten Chouhatsu
;================================================================================
[Statedef 1500]
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 = 1500
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1500 || anim = 1501
value = anim+1
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1501 && animelem = 1
x = 4
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1502 && animelem = 1
x = 0

[State 1300, Turn]
type = Turn
triggerall = p2dist X < 0
triggerall = (enemynear,facing = 1 && facing = 1) || (enemynear,facing = -1 && facing = -1)
trigger1 = anim = 1502 && animelem = 1

[State 750, Push]
type = PlayerPush
trigger1 = anim = 1501 
value = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1502 && animelem = 3
value=200,15
channel=0
[State 300, 0]
type = PlaySnd
triggerall = anim = 1500
trigger1 = animelem = 1
value = 1000,9
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = anim = 1502 && AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Kouten Chouhatsu
;================================================================================
[Statedef 1510]
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 = 1510
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1510 || anim = 1511
value = anim+1
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1511 && animelem = 1
x = -4
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1512 && animelem = 1
x = 0
[State 1300, Turn]
type = Turn
triggerall = p2dist X < 0
triggerall = (enemynear,facing = 1 && facing = 1) || (enemynear,facing = -1 && facing = -1)
trigger1 = anim = 1512 && animelem = 1

[State 750, Push]
type = PlayerPush
trigger1 = anim = 1511 
value = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 1512 && animelem = 3
value=200,16
channel=0
[State 300, 0]
type = PlaySnd
triggerall = anim = 1510
trigger1 = animelem = 1
value = 1000,9
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = anim = 1512 && AnimTime = 0
value = 0
ctrl = 1