;================================================================================
; DESPERATION MOVES
;================================================================================
;Kagerou
[Statedef 3000]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),0,-1000)                       
sprpriority = 2 
velset=0,0
facep2 = 1
;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,29]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = -20,-52
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = -20,-52
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = animelemtime(6) < 0
value = SCA
;=======================================; Vels && Movement

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3000

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 7
movetype = I 
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = animelem = 5
value=200,8
channel=0 
[State 200, snd]
type=playsnd
trigger1 = animelem = 5
value=1000,15
;==============Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
attr = S, HA
damage = floor(133*ifelse(var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -92
hitsound = s3+(var(32)*2),7
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 10,11
guard.pausetime = 10,11
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = 0,-21
guard.velocity = -11.1796875
air.type = High
air.velocity = 0,-21
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
p2stateno = 10230
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
id = 3000
;==============End
[State 1000, 7]
type = ChangeState
trigger1 = movehit && numtarget(3000)
trigger1 = target(3000),alive = 1
value = 3001
ignorehitpause = 0

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Kagerou Success
;================================================================================
[Statedef 3001]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 10          
ctrl = 0                       
poweradd= 0                           
sprpriority = 2 
velset = 0,0
;=======================================;Button Check
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3001
;=======================================;Animations/Statetypes
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1= anim = 3001 && animelem = 6
Statetype = A 
;=======================================;Movements
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 6
x = -10
y = -3
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(6) > 0
y = 0.830078125
;=======================================;Effects
[State -3, hop]
type = PlaySnd
trigger1 = animelem = 6
value = 2+(var(32)*10),12
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Kagerou Landing
;================================================================================
[Statedef 3002]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3002
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = animelem = 13
value=200,9
channel=0 

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

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [16,49]
flag = noBG
flag2 = noFG

[State 2010, Pause]
Type = SuperPause
Trigger1 = animelem = 7
Time = 25
movetime = 25
anim = -1
sound = -1
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1
;=======================================;Helper
[State 1000: Helper];Projectile C
type = helper
trigger1 = animelem = 14
helpertype = Normal
id = 3003
pos = 70, -110 ;50
postype = p1
facing = 1
stateno = 3003
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Kagerou Projectile
;================================================================================
[Statedef 3003]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;Movement
[State 1050, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 10
y = -10
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3003
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 = 3004
time = -1
ignorehitpause = 1

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
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 -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)

;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(18) = 5
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,stateno+1,stateno)
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
triggerall = var(18) > 1
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),20
persistent = 0
ignorehitpause = 1
channel = 4
[State 1000, Sound]
type = PlaySnd
trigger1 = var(18) = 1
trigger1 = MoveContact && NumTarget
value = 1000,10
persistent = 0
ignorehitpause = 1

;99 221
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 5
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 0, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 4
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 7, -40
postype = p2
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 3
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 13, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 2
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 18, -40
postype = p2
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 1
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 23, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(18) = 5
trigger1 = (animelemno(0) = [1,4])
attr = S, HP
damage = floor(58*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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3003
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
[State 210, 1]
type = HitDef
triggerall = var(18) = 4
trigger1 = (animelemno(0) = [1,4])
attr = S, HP
damage = floor(33*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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3003
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
[State 210, 1]
type = HitDef
triggerall = var(18) = 3
trigger1 = (animelemno(0) = [1,4])
attr = S, HP
damage = floor(16*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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3003
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
[State 210, 1]
type = HitDef
triggerall = var(18) = 2
trigger1 = (animelemno(0) = [1,4])
attr = S, HP
damage = floor(33*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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3003
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
[State 210, 1]
type = HitDef
triggerall = var(18) = 1
trigger1 = (animelemno(0) = [1,4])
attr = S, HP
damage = floor(16*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 = -19,-9
guard.velocity = -11.1796875
air.type = High
air.velocity = -19,-9
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3004
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
[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3004) && movehit
value = 10200
persistent = 0
ignorehitpause = 1
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
value=3004
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
;================================================================================
;Kagerou Projectile Disperse
;================================================================================
[Statedef 3004]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3004 
sprpriority = 4
;=======================================;Projectile Properties
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 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
;================================================================================
;Jo'Ou Bachi
[Statedef 3100]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),0,-1000)                       
sprpriority = 2 
velset=0,0
facep2 = 1
anim = 3100
;============== Superpause and Effects
[State 105, 1];Malin Super Cancel Adjust
type = PosAdd
trigger1 = prevstateno = 1200
trigger1 = !time
y = -20

[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,29]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = 0,-60
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = 0,-60
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3100
value = SCA
;=======================================;Button Check
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3100 && animelem = 5
x = ifelse(var(5)=0,4,11)
y = ifelse(var(5)=0,12,10)
;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3100 && !animtime
value = 3101

;==============Sounds and FX
[State 200, snd]
type=playsnd
trigger1 = anim = 3100
trigger1 = animelem = 1
value=200,10
channel=0 
[State 200, snd]
type=playsnd
trigger1 = anim = 3100
trigger1 = animelem = 4
value=200,11
channel=0 
[State 200, snd]
type=playsnd
trigger1 = anim = 3100
trigger1 = animelem = 4
value=1000,11
;==============Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 3100
trigger1 = animelem = 5
trigger2 = anim = 3101
trigger2 = (animelemno(0) = [1,4])
attr = A, HA
damage = 0,0
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17005+(var(31)*10001)
sparkxy = -10, -8
hitsound = s3+(var(32)*2),20
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 9,9
guard.pausetime = 9,9
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = 0,-16
guard.velocity = -11.1796875
air.type = High
air.velocity = 0,-16
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
p2stateno = 10235
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
id = 3100
[State 1000, 7]
type = ChangeState
trigger1 = movehit && numtarget(3100)
value = 3103
ignorehitpause = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Jo'Ou Bachi Landing
;================================================================================
[Statedef 3101]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 8.38188171386719,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3102
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
[State 852, VelMul]
type = VelMul
trigger1 = animelemtime(1) > 0
x = 0.91552734375
;=======================================;Effects
[State 300, Slideland]
type = PlaySnd
trigger1 = !time
value = 2+(var(32)*10),11
persistent = 0

[State 3303, Explod]
type = Explod
trigger1 = !time
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
;=======================================;Helper

;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Jo'Ou Bachi Success
;================================================================================
[Statedef 3103]
type = A
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3103

[State 1000, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3103
trigger2 = anim = 3104
trigger3 = anim = 3105
value = anim+1
;=======================================;Movements
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 1
x = 8.51171875
y = 8.51171875
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 2
x = 7.0234375
y = 7.0234375
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 3
x = 5.53515625
y = 5.53515625
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 4
x = 4.046875
y = 4.046875
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 5
x = 0
y = -3
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3103 && animelem = 6
x = 0
y = -8
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3104 && animelem = 1
x = 0
y = -6
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3105 && animelem = 1
x = 0
y = 0

[State 105, 1]
type = PosAdd
trigger1 = anim = 3103 && animelem = 5
x = (P2dist X)-7
y = (P2dist Y)+82

[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 3105
trigger1 = animelemtime(12) > 0
trigger2 = anim = 3106
trigger2 = animelemtime(1) > 0
y = 0.64453125
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 3103
trigger1 = animelem = 2
value=1000,11
[State 200, snd]
type=playsnd
trigger1 = anim = 3105
trigger1 = animelem = 8
value=1000,10
channel = 4
ignorehitpause = 1
;=======================================;Helper
[State 1000: Helper];Left and Up Projectile 
type = helper
trigger1 = anim = 3103
trigger1 = animelem = 7
helpertype = Normal
id = 3000
pos = -116, -13 ;50
postype = p1
facing = 1
stateno = 3115
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper];Right and Up Projectile 
type = helper
trigger1 = anim = 3103
trigger1 = animelem = 7
helpertype = Normal
id = 3001
pos = 116, -13 ;50
postype = p1
facing = -1
stateno = 3115
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper];Left and Down Projectile 
type = helper
trigger1 = anim = 3104 
trigger1 = animelem = 1
helpertype = Normal
id = 3002
pos = -116, 12 ;50
postype = p1
facing = 1
stateno = 3116
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
[State 1000: Helper];Right and Down Projectile 
type = helper
trigger1 = anim = 3104 
trigger1 = animelem = 1
helpertype = Normal
id = 3003
pos = 116, 12 ;50
postype = p1
facing = -1
stateno = 3116
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = anim = 3105
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
attr = A, HA
damage = floor(25*ifelse(var(56),1.25,1)),10
animtype = UP
air.animtype = UP
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17005+(var(31)*10001)
sparkxy = -10, 20
hitsound = -1
guardsound = 3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 16,16
guard.pausetime = 16,16
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = 0
guard.velocity = -11.1796875
air.type = High
air.velocity = 0,12
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.recover = 0
persistent = 0
p2stateno = 10500
fall.xvelocity = -2
fall.yvelocity = -6
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
persistent = 0
envshake.ampl = 7       
envshake.freq = 50
envshake.time = 20 
id = 3101
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = anim = 3106
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Jo'Ou Bachi Success Landing
;================================================================================
[Statedef 3104]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3107
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
[State 852, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 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
;================================================================================
;Jo'Ou Bachi Up Projectile
;================================================================================
[Statedef 3115]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;Movement
[State 1050, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 12
y = -12
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3115
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 = 3004
time = -1
ignorehitpause = 1

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 999
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 1000, Sound]
type = PlaySnd
trigger1 = !time
value = 1000,13
[State 1000, Sound]
type = PlaySnd
trigger1 = IsHelper(3000)
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,21,13)
persistent = 0
ignorehitpause = 1
channel = 4
[State 1000, Sound]
type = PlaySnd
trigger1 = IsHelper(3001)
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,20,13)
persistent = 0
ignorehitpause = 1
channel = 4
;99 221
[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 24, -60
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
trigger1 = (animelemno(0) = [1,2])
attr = A, HP
damage = floor(58*ifelse(var(56),1.25,1)),0
animtype = UP
air.animtype = UP
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 18
guard.pausetime = 1,18
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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = 0,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
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
kill = 0
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
value=3004
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
;================================================================================
;Jo'Ou Bachi Down Projectile
;================================================================================
[Statedef 3116]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;Movement
[State 1050, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 12
y = 12
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3116
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 = 3004
time = -1
ignorehitpause = 1

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 999
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 1000, Sound]
type = PlaySnd
trigger1 = !time
value = 1000,13
[State 1000, Sound]
type = PlaySnd
trigger1 = IsHelper(3002)
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,21,13)
persistent = 0
ignorehitpause = 1
channel = 4
[State 1000, Sound]
type = PlaySnd
trigger1 = IsHelper(3003)
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,20,13)
persistent = 0
ignorehitpause = 1
channel = 4
[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 24, -60
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
trigger1 = (animelemno(0) = [1,2])
attr = A, HP
damage = floor(58*ifelse(var(56),1.25,1)),0
animtype = UP
air.animtype = UP
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 18
guard.pausetime = 1,18
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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = 0,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
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
kill = 0
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
value=3004
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

;Mizuchi
[Statedef 3200]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),-1000,-3000)                    
sprpriority = 2 
velset=0,0
facep2 = 1
;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,29]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
poweradd = 0
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15300-(var(31)*200)
pos = 0,-64
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15301-(var(31)*200)
pos = 0,-64
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = animelemtime(14) < 0
value = SCA
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3200

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1= animelem = 16
Statetype = A 

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 15
movetype = I 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 16
x = 3.91796875
y = -13.5625
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(16) > 0
y = 0.64453125



;=======================================; Sounds and FX
[State 200, snd]
type=playsnd
trigger1 = animelem = 12
value=200,12
channel=0 

[State 200, snd]
type=playsnd
trigger1 = Animelem = 14
value=1000,14

[State 3000, EnvShake]
type = EnvShake
trigger1 = Animelem = 14
time = 14
freq = 180
ampl = -6
persistent = 0
ignorehitpause = 1

[State 3303, Explod]
type = Explod
trigger1 = Animelem = 14
anim = 12001+(var(31)*10000)
pos = 48,0
postype = p1  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 3303, Explod]
type = Explod
trigger1 = Animelem = 14
anim = 12002+(var(31)*10000)
pos = 48,0
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
;=======================================; Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = animelemtime(14) >= 0 && animelemtime(15) < 0
attr = S, HA
damage = floor(300*ifelse(var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -40
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 34,34
guard.pausetime = 34,34
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -2,-21
guard.velocity = -11.1796875
air.type = High
air.velocity = -2,-21
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
p2stateno = 10230
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
id = 3200
envshake.ampl = -4       
envshake.freq = 180
envshake.time = 14 

[State 210, 1]
type = HitDef
triggerall = numenemy
triggerall = enemynear, stateno = [5110,5119]
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = animelemtime(14) >= 0 && animelemtime(15) < 0
attr = S, HA
damage = floor(200*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = H
hitflag = MAFD
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -40
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 34,34
guard.pausetime = 34,34
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = 0
guard.velocity = -11.1796875
air.type = High
air.velocity = -6,10
air.hittime = 13
air.juggle = 0
down.velocity = 0,0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
fall.recover = 0
persistent = 0
p2stateno = 10060
fall.xvelocity = -2*(p2statetype=A)
fall.yvelocity = -2-(p2statetype=A)*4
persistent = 0
id = 3200
envshake.ampl = -4       
envshake.freq = 180
envshake.time = 14 
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Mizuchi Landing
;================================================================================
[Statedef 3201]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3201
;=======================================;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


;XI LAUNCHER(1) HIT SHAKE
[Statedef 10230]
type    = A
movetype= H
physics = N
velset = 0,0

[State 10200, Anim];Custom animation
type = ChangeAnim
trigger1 = selfanimexist(5051)
trigger1 = !time
value = 5051
[State 10200, Anim];No Custom animation
type = ChangeAnim
trigger1 = !selfanimexist(5051)
trigger1 = !time
value = 5030
[State 10200, Anim];loop
type = ChangeAnim
triggerall = anim = [5030,5051]
trigger1 = HitShakeOver != 1
value = anim

[State 10900, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 10231

;================================================================================
;XI LAUNCHER FLYING 
[Statedef 10231]
type    = A
movetype= H
physics = N

[State 10100, Anim]
type = ChangeAnim
triggerall = anim = 5030
trigger1 = !time 
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5051
trigger1 = (GetHitVar(animtype) = [0,3]) && time = 13 
value = 5050
persistent = 0

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5051
trigger1 = (GetHitVar(animtype) = [4,5]) && animtime = 0
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 10900, 1]
type = HitVelSet
trigger1 = !time
y = 1
x = 1

[State 10900, VelMul]
type = VelAdd
trigger1 = time > 0 && time < 8
y = 1.625

[State 10900, VelMul]
type = VelAdd
trigger1 = time > 0 && time >= 8
y = .625

[State 5050, 4] ;Recover near ground
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -30
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

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

[State 10900, Hit ground]
type = SelfState
trigger1 = time
trigger1 = Vel Y + Pos Y >= 0
value = 5100

;XI LAUNCHER(2) HIT SHAKE
[Statedef 10235]
type    = A
movetype= H
physics = N
velset = 0,0

[State 10200, Anim];Custom animation
type = ChangeAnim
trigger1 = selfanimexist(5051)
trigger1 = !time
value = 5051
[State 10200, Anim];No Custom animation
type = ChangeAnim
trigger1 = !selfanimexist(5051)
trigger1 = !time
value = 5030
[State 10200, Anim];loop
type = ChangeAnim
triggerall = anim = [5030,5051]
trigger1 = HitShakeOver != 1
value = anim

[State 10900, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 10237

;================================================================================
;XI LAUNCHER FLYING 
[Statedef 10237]
type    = A
movetype= H
physics = N

[State 10100, Anim]
type = ChangeAnim
triggerall = anim = 5030
trigger1 = !time 
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5051
trigger1 = (GetHitVar(animtype) = [0,3]) && time = 13 
value = 5050
persistent = 0

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5051
trigger1 = (GetHitVar(animtype) = [4,5]) && animtime = 0
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 10900, 1]
type = HitVelSet
trigger1 = !time
y = 1
x = 1

[State 10900, VelMul]
type = VelAdd
trigger1 = time > 0 && time < 8
y = 1.625

[State 10900, VelMul]
type = VelAdd
trigger1 = time > 0 && time >= 8
y = .25

[State 5050, 4] ;Recover near ground
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -30
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

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

[State 10900, Hit ground]
type = SelfState
trigger1 = time
trigger1 = Vel Y + Pos Y >= 0
value = 5100
;================================================================================
;Z.Onigumo
;================================================================================
[Statedef 3300]
type    = S                     
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3300
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
;=======================================;Variables
[State 1000, Projectile Strength]
type = VarSet
trigger1 = !time
v = 15
value = 7
;=======================================;Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,28]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
trigger1 = !time 
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*4)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = !time
anim = 15400+(var(31)*100)
pos = -18,-84
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = !time 
anim = 15401+(var(31)*100)
pos = -18,-84
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 29
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = !time
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1
ignorehitpause = 1
[State -2, Helper]
type = Helper
triggerall = !numhelper(40004) 
trigger1 = !time 
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 2000, 0]
type = NotHitBy
trigger1 = animelemtime(5) < 0
value = SCA

;=======================================;Animations and Statetype
;=======================================;Movement
[State 1300, PosAdd]
type = PosAdd
trigger1= animelem = 2
x = 8
[State 1300, PosAdd]
type = PosAdd
trigger1= animelem = 3
x = -8
;=======================================;Helpers 
[State 1000: Helper];Projectile 
type = helper
trigger1 = animelem = 8
helpertype = Normal
id = 3300
pos = 64, -42 ;50
postype = p1
facing = 1
stateno = 3301
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;Sounds and FX
[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 7
value = 200,1
channel = 0
[State 200, snd]
type=playsnd
trigger1 = animelem = 6
value=1000,7
;=======================================;
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Z.Onigumo Projectile Startup
;================================================================================
[Statedef 3301]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = animelem =1
x = var(15)
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(5) = root,var(5)
[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time 
value = 3301
ignorehitpause = 1
;=======================================;End
[State 1005, End]
type=changeState
trigger1= !animtime
value=3305
;================================================================================
;Z.Onigumo Projectile
;================================================================================
[Statedef 3305]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
velset = 0,0
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && prevstateno = 3301
Value = 3305
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 = 3305
time = -1
ignorehitpause = 1

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
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 -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)

;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && prevstateno = 3301
var(18) = 7
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno = 3305
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,stateno+1,stateno)
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
triggerall = var(18) > 1
trigger1 = MoveHit && NumTarget
value = 3+(root,var(32)*2),20
persistent = 0
ignorehitpause = 1
channel = 4
[State 1000, Sound]
type = PlaySnd
trigger1 = var(18) = 1
trigger1 = MoveHit && NumTarget
value = 1000,10
persistent = 0
ignorehitpause = 1
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveGuarded && NumTarget
value = 3+(root,var(32)*2), 13
persistent = 0
ignorehitpause = 1
channel = 4

[State 200, snd]
type=playsnd
trigger1 = !time && prevstateno = 3301
value=1000,8
channel = 5

;=======================================;Helpers
[State 1000: Helper]
type = helper
Trigger1 = !Time 
trigger1 = numhelper(3307) = 0
helpertype = Normal
id = 3307
pos = 0, 0
postype = p1
facing = 1
stateno = 3307
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0


;99 221
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 7
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 0, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 6
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 7, -40
postype = p2
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 5
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 13, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 4
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 13, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 3
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 13, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 2
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 18, -40
postype = p2
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1
[State 3000, ContactSpark]
type = Explod
triggerall = var(18) = 1
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17005+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 23, -40
postype = p2
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[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
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(18) = 7
trigger1 = (animelemno(0) = [1,138])
attr = S, HP
damage = floor(66*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3305
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
p2facing = 1   
[State 210, 1]
type = HitDef
triggerall = var(18) = 6
trigger1 = (animelemno(0) = [1,138])
attr = S, HP
damage = floor(58*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3305
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
p2facing = 1   
[State 210, 1]
type = HitDef
triggerall = var(18) = 5
trigger1 = (animelemno(0) = [1,138])
attr = S, HP
damage = floor(50*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3305
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
p2facing = 1   
[State 210, 1]
type = HitDef
triggerall = var(18) = 4
trigger1 = (animelemno(0) = [1,138])
attr = S, HP
damage = floor(41*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3305
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
p2facing = 1   
[State 210, 1]
type = HitDef
triggerall = var(18) = 3
trigger1 = (animelemno(0) = [1,138])
attr = S, HP
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3305
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
p2facing = 1   
[State 210, 1]
type = HitDef
triggerall = var(18) = 2
trigger1 = (animelemno(0) = [1,138])
attr = S, HP
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 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 = 0
fall.yvelocity = -2.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3305
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
p2facing = 1   
[State 210, 1]
type = HitDef
triggerall = var(18) = 1
trigger1 = (animelemno(0) = [1,138])
attr = S, HP
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,16
guard.pausetime = 1,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3306
p1sprpriority = 4
p2facing = 1   

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3306) && movehit
value = 10400
persistent = 0
ignorehitpause = 1
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2= !animtime
value=3306
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

[Statedef 3306]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3306 
sprpriority = 4
;=======================================;Movements
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 1
x = -3
y = -1.462890625
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(1) > 0 && animelemtime(16) < 0
y = 0.537109375
[State 1300, VelSet]
type = VelSet
trigger1 = animelem = 16
x = 0
y = 0
;=======================================;Projectile Properties
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
;=======================================;Effects
[State 200, snd]
type=StopSND
trigger1 = !time
channel = 5
[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

;BZZZZZZZZZZZZZ
[Statedef 3307]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 2

[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, Anim]
Type = ChangeAnim
Trigger1 = !Time 
Value = 3307
ignorehitpause = 1

[State 0,BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = parent,stateno != 3305
ignorehitpause = 1