;================================================================================
; DESPERATION MOVES
;================================================================================
[Statedef 3000]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = ifelse((helper(10371), var(0) = [1,3]),3000,3001)
poweradd=  ifelse(var(51),0,-1000)                         
sprpriority = 2 
velset=0,0
facep2 = 1

[State 1000, VarAdd]
type = PowerAdd
triggerall = !time
triggerall = !var(51)
trigger1 = prevstateno = [1000,1999]
value = -1000
persistent = 0
ignorehitpause = 1

[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) = 29

[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 = [2,29]
flag = noBG
flag2 = noFG

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

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 2
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 = 2
anim = 15200-(var(31)*200)
pos = 12,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 2
anim = 15201-(var(31)*200)
pos = 12,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3000
trigger1 = animelemtime(4) < 0
trigger2 = anim = 3001
trigger2 = animelemtime(5) < 0
value = SCA

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 4, =4
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

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

[State 200, snd]
type= playsnd
trigger1= animelem=4
value=1000,24

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 4
statetype = A

[State 2010, 6]
type = VelSet
trigger1 = animelem =4
x = 10
y = ifelse(anim=3000,-1,-2)

[State 2010, 6]
type = VelAdd
trigger1 = animelemtime(4) > 0
y = 0.15625

[State 210, 1]
type = HitDef
trigger1 = animelemtime(4) >= 0
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 30
attr = S, HA
damage = 0,0
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -82
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
id = 3000

[State 1000, 7]
type = ChangeState
trigger1 = movehit && numtarget(3000)
value = ifelse(var(1)=0,3005,3015)
ignorehitpause = 1

[State 1000, 7]
type = ChangeState
Triggerall = animelemtime(4) > 0 
trigger1 = Vel Y + Pos Y >= 0
value = 3002

[StateDef 3002]
type = s
MoveType = I
physics = N     
VelSet = 0, 0
Anim = 3002
SprPriority = 2 
ctrl=0

[State 1402, VelSet]
type = VelSet
trigger1 = animelemtime(4) < 0
x = (8.541564941*exp((-0.157640273)*(time-1)))

[State 2010, 6]
type = VelSet
trigger1 = animelem =4
x = 0

[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 1

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1 

[StateDef 3005]
type = s
MoveType = A
physics = N
VelSet = 0, 0
Anim = 3005
SprPriority = 2 
ctrl=0

[State 1011, 0]
type = PosSet
trigger1 = !time
trigger2 = animelem = 51
y = 0

[State -2, Accel]
type = PosAdd
trigger1 = animelem = 51
x = -14

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 47
statetype = A

[State 1402, VelSet]
type = VelSet
trigger1 = animelemtime(47) >= 0 && animelemtime(51) < 0
x = (-8.068359375*exp((-0.048531191)*(time-127)))

[State -2, Accel]
type = VelSet
trigger1 = animelem = 47
y = -5.28125
[State -2, VelAdd]
type = VelAdd
trigger1 = animelemtime(47) > 0 && animelemtime(51) < 0
y = 0.7734375

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 51
statetype = S
[State 1402, VelSet]
type = VelSet
trigger1 = animelem = 51
x = 0
y = 0

[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
trigger2 = animelem = 52
time = 1

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 47
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 801, fat]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(46) < 0
edge = 80

[State 3020, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(46) < 0
pos = 70, 0
ignorehitpause = 1

[State 801, fly p2]
type = TargetState
trigger1 = animelem = 1
value = 4101
ignorehitpause = 1

[State 801, high]
type = TargetState
trigger1 = animelemtime(3) = 3
trigger2 = animelemtime(8) = 3
trigger3 = animelemtime(16) = 3
trigger4 = animelemtime(25) = 3
trigger5 = animelemtime(37) = 3
value = 4100
ignorehitpause = 1

[State 801, low]
type = TargetState
trigger1 = animelemtime(21) = 3
trigger2 = animelemtime(31) = 3
value = 4101
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = animelemtime(3) = 0
trigger2 = animelemtime(8) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(21) = 0
trigger5 = animelemtime(25) = 0
trigger6 = animelemtime(31) = 0
trigger7 = animelemtime(37) = 0
anim = 17002+(var(31)*10001)
pos = 70,-64
postype = p1  
facing = 1
sprpriority = 3

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

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

[State 200, snd]
type= playsnd
trigger1= animelem=47
value=1000,24

[State 5100, 10]
type = PlaySnd
trigger1 = animelemtime(3) = 0
trigger2 = animelemtime(8) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(21) = 0
trigger5 = animelemtime(25) = 0
trigger6 = animelemtime(31) = 0
trigger7 = animelemtime(37) = 0
value = 3+(var(32)*2),1+((random%4)*2)
channel = 4

[State 13000, EnvColor]
type = EnvColor
trigger1 = animelemtime(3) = 2
trigger2 = animelemtime(8) = 2
trigger3 = animelemtime(16) = 2
trigger4 = animelemtime(21) = 2
trigger5 = animelemtime(25) = 2
trigger6 = animelemtime(31) = 2
trigger7 = animelemtime(37) = 2
value = 248,248,248
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numhelper
trigger1 = helper(247), var(1)=1
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 1201, HitAdd]
type = TargetLifeAdd
trigger1 = animelemtime(3) = 1
trigger2 = animelemtime(8) = 1
trigger3 = animelemtime(16) = 1
trigger4 = animelemtime(21) = 1
trigger5 = animelemtime(25) = 1
trigger6 = animelemtime(31) = 1
trigger7 = animelemtime(37) = 1
value = -13
kill = 0

[State 1201, HitAdd]
type = HitAdd
trigger1 = animelemtime(3) = 0
trigger2 = animelemtime(8) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(21) = 0
trigger5 = animelemtime(25) = 0
trigger6 = animelemtime(31) = 0
trigger7 = animelemtime(37) = 0
value = 1

[State 210, 1]
type = HitDef
trigger1 = animelemtime(41)>= 0 && animelemtime(42) < 0
attr = S, HA
damage = floor(17*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -64
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
pausetime = 1,13
guard.pausetime = 0,13
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 16
guard.ctrltime = 24
ground.velocity = -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 3006
kill = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(55) >= 0 && animelemtime(56) < 0
attr = S, HA
damage = floor(116*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
ground.type = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-64
hitsound = s2, 13
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = ifelse(var(56),-15.75,-7.3828125),-4.5
guard.velocity = -11.1796875
air.type = High
air.velocity = ifelse(var(56),-15.75,-7.3828125),-4.5
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
air.fall = 1
p2stateno = 10070
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 50
persistent = 0

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

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1 

[Statedef 4100]
type = S
physics = N
movetype = H
ctrl = 0
velset = 0,0
facep2 = 1

[State 2000, 0]
type = HitBy
trigger1 = 1
value = SCA,HA

[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 0, PosSet]
type = posset
trigger1 = time = 0
y = 0

[State 3100, 2]
type = Velset
trigger1 = 1;!gethitvar(isbound)
x = 0

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

[State 0, ChangeAnim2]
type = SelfState
trigger1 = time = 100
value = 0
ctrl = 1

[Statedef 4101]
type = S
physics = N
movetype = H
ctrl = 0
velset = 0,0
facep2 = 1

[State 2000, 0]
type = HitBy
trigger1 = 1
value = SCA,HA

[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 0, PosSet]
type = posset
trigger1 = time = 0
y = 0

[State 3100, 2]
type = Velset
trigger1 = 1;!gethitvar(isbound)
x = 0

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

[State 0, ChangeAnim2]
type = SelfState
trigger1 = time = 100
value = 0
ctrl = 1

; Stand get-hit (shaking)
[Statedef 3006]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 3007
;---------------------------------------------------------------------------
; Stand get-hit (knocked back)
[Statedef 3007]
type    = S
movetype= H
physics = S

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

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

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 3008

[StateDef 3008]
type = s
MoveType = H
VelSet = 0, 0
Anim = 5300
SprPriority = 2 
ctrl=0

[State 1001, end]
type = SelfState
trigger1 = time = 400
value = 0
ctrl = 1 

[StateDef 3015]
type = s
MoveType = A
physics = N
VelSet = 0, 0
Anim = 3006
SprPriority = 2 
ctrl=0

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(22) = 125

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(15) = 16

[State 1011, 0]
type = PosSet
trigger1 = !time
trigger2 = animelem = 51
y = 0

[State -2, Accel]
type = PosAdd
trigger1 = animelem = 51
x = -14

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 47
statetype = A

[State 1402, VelSet]
type = VelSet
trigger1 = animelemtime(47) >= 0 && animelemtime(51) < 0
x = (-8.068359375*exp((-0.048531191)*(time-127)))

[State -2, Accel]
type = VelSet
trigger1 = animelem = 47
y = -5.28125
[State -2, VelAdd]
type = VelAdd
trigger1 = animelemtime(47) > 0 && animelemtime(51) < 0
y = 0.7734375

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 51
statetype = S
[State 1402, VelSet]
type = VelSet
trigger1 = animelem = 51
x = 0
y = 0

[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
trigger2 = animelem = 52
time = 1

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 47
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 801, fat]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(46) < 0
edge = 80

[State 3020, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(46) < 0
pos = 70, 0
ignorehitpause = 1

[State 801, fly p2]
type = TargetState
trigger1 = animelem = 1
value = 4101
ignorehitpause = 1

[State 801, high]
type = TargetState
trigger1 = animelemtime(3) = 3
trigger2 = animelemtime(8) = 3
trigger3 = animelemtime(16) = 3
trigger4 = animelemtime(25) = 3
trigger5 = animelemtime(37) = 3
value = 4100
ignorehitpause = 1

[State 801, low]
type = TargetState
trigger1 = animelemtime(21) = 3
trigger2 = animelemtime(31) = 3
value = 4101
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = animelemtime(3) = 0
trigger2 = animelemtime(8) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(21) = 0
trigger5 = animelemtime(25) = 0
trigger6 = animelemtime(31) = 0
trigger7 = animelemtime(37) = 0
anim = 17002+(var(31)*10001)
pos = 70,-64
postype = p1  
facing = 1
sprpriority = 3

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

[State 200, snd]
type= playsnd
trigger1= animelem=47
value=1000,24

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

[State 5100, 10]
type = PlaySnd
trigger1 = animelemtime(3) = 0
trigger2 = animelemtime(8) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(21) = 0
trigger5 = animelemtime(25) = 0
trigger6 = animelemtime(31) = 0
trigger7 = animelemtime(37) = 0
value = 3+(var(32)*2),1+((random%4)*2)
channel = 4

[State 13000, EnvColor]
type = EnvColor
trigger1 = animelemtime(3) = 2
trigger2 = animelemtime(8) = 2
trigger3 = animelemtime(16) = 2
trigger4 = animelemtime(21) = 2
trigger5 = animelemtime(25) = 2
trigger6 = animelemtime(31) = 2
trigger7 = animelemtime(37) = 2
value = 248,248,248
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numhelper
trigger1 = helper(247), var(1)=1
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 1201, HitAdd]
type = TargetLifeAdd
trigger1 = animelemtime(3) = 1
trigger2 = animelemtime(8) = 1
trigger3 = animelemtime(16) = 1
trigger4 = animelemtime(21) = 1
trigger5 = animelemtime(25) = 1
trigger6 = animelemtime(31) = 1
trigger7 = animelemtime(37) = 1
value = -12
kill = 0

[State 1201, HitAdd]
type = HitAdd
trigger1 = animelemtime(3) = 0
trigger2 = animelemtime(8) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(21) = 0
trigger5 = animelemtime(25) = 0
trigger6 = animelemtime(31) = 0
trigger7 = animelemtime(37) = 0
value = 1

[State 210, 1]
type = HitDef
trigger1 = animelemtime(41)>= 0 && animelemtime(42) < 0
attr = S, HA
damage = floor(17*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -64
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
pausetime = 1,13
guard.pausetime = 0,13
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 16
guard.ctrltime = 24
ground.velocity = -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 3006
kill = 0

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

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(54) = 1
value = 1000,3

[State 1000: Helper]
type = Helper
trigger1 = animelemtime(54) = 1
helpertype = Normal
name = "Haoh Shi Ko'ou Ken"
id = 3016
pos = 48, 0 ;50
postype = p1
facing = 1
stateno = 3155
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0 

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1 

;DM Projectile
[Statedef 3016]
type = A
movetype = A
physics = N
ctrl = 0
velset = parent,var(15), 0
ownpal = 1
sprpriority = 4
juggle = 10

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3007
[State 200, snd]
type=null;playsnd
trigger1= animelem=1 && !prevstateno 
value=1000,5
[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 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,6])
attr = S, HP
damage = floor(116*ifelse(root,var(56),1.25,1)),8 ;225
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,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 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 = 3155
p1sprpriority = 4

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

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

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

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 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 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(5) = 2
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(5) = -1
ignorehitpause = 1
persistent = 0

[State -2, FlagHit]
type = VarSet
trigger1 = Movecontact && NumTarget
var(5) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = NumHelper(247)
text = "MoveHit = %d"
params = Var(5)

[State -2, Counter Check]
type = VarSet
trigger1 = 1
var(56) = root,var(56)
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 0
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = parentvarSet
triggerall = root,var(56) = 0
triggerall = NumEnemy
trigger1 = enemynear,StateType = A 
trigger1 = enemynear,movetype = H 
trigger2 = enemynear,StateNo = [120,155]  
var(40) = 1
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

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

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse(var(5)=0,stateno+1,stateno)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movecontact && NumTarget
trigger2 = var(5) <= 0
value= 3156
ignorehitpause = 0

[Statedef 3050]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3001
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

[State 1000, VarAdd]
type = PowerAdd
triggerall = !time
triggerall = !var(51)
trigger1 = prevstateno = [1000,1999]
value = -1000
persistent = 0
ignorehitpause = 1

[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) = 29

[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 = [2,29]
flag = noBG
flag2 = noFG

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

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 2
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 = 2
anim = 15300-(var(31)*200)
pos = 12,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 2
anim = 15301-(var(31)*200)
pos = 12,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

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

[State 200, snd]
type= playsnd
trigger1= animelem=4
value=1000,24

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

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 4, =4
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

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

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 4
statetype = A

[State 2010, 6]
type = VelSet
trigger1 = animelem =4
x = 10
y = ifelse(anim=3000,-1,-2)

[State 2010, 6]
type = VelAdd
trigger1 = animelemtime(4) > 0
y = 0.15625

[State 210, 1]
type = HitDef
trigger1 = animelemtime(4) >= 0
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 30
attr = S, HA
damage = 0,0
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -82
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
id = 3050

[State 1000, 7]
type = ChangeState
trigger1 = movehit && numtarget(3050)
value = ifelse(var(1)=0,3055,3056)
ignorehitpause = 1

[State 1000, 7]
type = ChangeState
Triggerall = animelemtime(4) > 0 
trigger1 = Vel Y + Pos Y >= 0
value = 3002

[StateDef 3055]
type = s
MoveType = A
physics = N
VelSet = 0, 0
Anim = 3055
SprPriority = 2 
ctrl=0

[State 1011, 0]
type = PosSet
trigger1 = !time
trigger2 = animelem = 73
y = 0

[State -2, Accel]
type = PosAdd
trigger1 = animelem = 73
x = -14

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 70
statetype = A

[State 1402, VelSet]
type = VelSet
trigger1 = animelemtime(70) >= 0 && animelemtime(73) < 0
x = (-8.068359375*exp((-0.048531191)*(time-165)))

[State -2, Accel]
type = VelSet
trigger1 = animelem = 70
y = -5.28125
[State -2, VelAdd]
type = VelAdd
trigger1 = animelemtime(70) > 0 && animelemtime(73) < 0
y = 0.7734375

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 73
statetype = S
[State 1402, VelSet]
type = VelSet
trigger1 = animelem = 73
x = 0
y = 0

[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
trigger2 = animelem = 73
time = 1

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 71
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 801, fat]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(70) < 0
edge = 80

[State 3020, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(70) < 0
pos = 70, 0
ignorehitpause = 1

[State 801, fly p2]
type = TargetState
trigger1 = animelem = 1
value = 4101
ignorehitpause = 1

[State 801, high]
type = TargetState
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(24) = 0 
trigger5 = animelemtime(40) = 0
trigger6 = animelemtime(56) = 0
value = 4100
ignorehitpause = 1

[State 801, low]
type = TargetState
trigger1 = animelemtime(17) = 0
trigger2 = animelemtime(37) = 0
trigger3 = animelemtime(46) = 0
value = 4101
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(17) = 0
trigger5 = animelemtime(24) = 0 
trigger6 = animelemtime(37) = 0
trigger7 = animelemtime(40) = 0
trigger8 = animelemtime(46) = 0
trigger9 = animelemtime(56) = 0
anim = 17002+(var(31)*10001)
pos = 70,-64
postype = p1  
facing = 1
sprpriority = 3

[State 3303, Explod]
type = Explod
trigger1 = animelem = 84
anim = 3210
pos = -12,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 5100, 10]
type = PlaySnd
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(17) = 0
trigger5 = animelemtime(24) = 0 
trigger6 = animelemtime(37) = 0
trigger7 = animelemtime(40) = 0
trigger8 = animelemtime(46) = 0
trigger9 = animelemtime(56) = 0
value = 3+(var(32)*2),1+((random%4)*2)
channel = 4

[State 13000, EnvColor]
type = EnvColor
trigger1 = animelemtime(5) = 2
trigger2 = animelemtime(7) = 2
trigger3 = animelemtime(12) = 2
trigger4 = animelemtime(17) = 2
trigger5 = animelemtime(24) = 2 
trigger6 = animelemtime(37) = 2
trigger7 = animelemtime(40) = 2
trigger8 = animelemtime(46) = 2
trigger9 = animelemtime(56) = 2
value = 248,248,248
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numhelper
trigger1 = helper(247), var(1)=1
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 1201, HitAdd]
type = TargetLifeAdd
trigger1 = animelemtime(5) = 1
trigger2 = animelemtime(7) = 1
trigger3 = animelemtime(12) = 1
trigger4 = animelemtime(17) = 1
trigger5 = animelemtime(24) = 1 
trigger6 = animelemtime(37) = 1
trigger7 = animelemtime(40) = 1
trigger8 = animelemtime(46) = 1
trigger9 = animelemtime(56) = 1
value = -12
kill = 0

[State 1201, HitAdd]
type = HitAdd
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(17) = 0
trigger5 = animelemtime(24) = 0 
trigger6 = animelemtime(37) = 0
trigger7 = animelemtime(40) = 0
trigger8 = animelemtime(46) = 0
trigger9 = animelemtime(56) = 0
value = 1

[State 210, 1]
type = HitDef
trigger1 = animelemtime(64)>= 0 && animelemtime(65) < 0
attr = S, HA
damage = floor(17*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -64
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
pausetime = 1,13
guard.pausetime = 0,13
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 16
guard.ctrltime = 24
ground.velocity = -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 3006
kill = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(84) >= 0 && animelemtime(85) < 0
attr = S, HA
damage = floor(216*ifelse(var(56),1.25,1)),8
animtype = up
air.animtype = up
ground.type = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-64
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
pausetime = 1,47
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = ifelse(var(56),-15.75,-7.3828125),-4.5
guard.velocity = -11.1796875
air.type = High
air.velocity = ifelse(var(56),-15.75,-7.3828125),-4.5
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
air.fall = 1
p2stateno = 10070
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 50
persistent = 0
envshake.ampl = -4       
envshake.freq = 180
envshake.time = 14 

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

[State 200, snd]
type= playsnd
trigger1= animelem=70
value=1000,24 

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 72
value = 200,17
channel = 0
persistent = 0
[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 82
value = 200,18
channel = 0
persistent = 0

;super pause stuff
[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 190
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 = 190
anim = 15300-(var(31)*200)
pos = 25,-60
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 190
anim = 15301-(var(31)*200)
pos = 25,-60
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1  
[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [190,219]
flag = noBG
flag2 = noFG
[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 190
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0 
[State 2000, VarSet]
type = VarSet
trigger1 = time = 190
var(6) = 29

[State 0, Explod]
type = Explod
trigger1 = animelem = 73
anim = 14130+var(31)
pos = -5,-71
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
sprpriority = -2
ownpal = 1
bindtime = -1

[State 40002, PlaySnd]
type = PlaySnd
trigger1 = animelem = 73
value = S0,0
volume = 200

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

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1 

[StateDef 3056]
type = s
MoveType = A
physics = N
VelSet = 0, 0
Anim = 3056
SprPriority = 2 
ctrl=0

[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = 16

[State 1011, 0]
type = PosSet
trigger1 = !time
trigger2 = animelem = 75
y = 0

[State -2, Accel]
type = PosAdd
trigger1 = animelem = 75
x = -14

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 70
statetype = A

[State 1402, VelSet]
type = VelSet
trigger1 = animelemtime(70) >= 0 && animelemtime(75) < 0
x = (-8.068359375*exp((-0.048531191)*(time-165)))

[State -2, Accel]
type = VelSet
trigger1 = animelem = 70
y = -5.28125
[State -2, VelAdd]
type = VelAdd
trigger1 = animelemtime(70) > 0 && animelemtime(75) < 0
y = 0.7734375

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 75
statetype = S
[State 1402, VelSet]
type = VelSet
trigger1 = animelem = 75
x = 0
y = 0

[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
trigger2 = animelem = 75
time = 1

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 70
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 801, fat]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(70) < 0
edge = 80

[State 3020, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(70) < 0
pos = 70, 0
ignorehitpause = 1

[State 801, fly p2]
type = TargetState
trigger1 = animelem = 1
value = 4101
ignorehitpause = 1

[State 801, high]
type = TargetState
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(24) = 0 
trigger5 = animelemtime(40) = 0
trigger6 = animelemtime(56) = 0
value = 4100
ignorehitpause = 1

[State 801, low]
type = TargetState
trigger1 = animelemtime(17) = 0
trigger2 = animelemtime(37) = 0
trigger3 = animelemtime(46) = 0
value = 4101
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(17) = 0
trigger5 = animelemtime(24) = 0 
trigger6 = animelemtime(37) = 0
trigger7 = animelemtime(40) = 0
trigger8 = animelemtime(46) = 0
trigger9 = animelemtime(56) = 0
anim = 17002+(var(31)*10001)
pos = 70,-64
postype = p1  
facing = 1
sprpriority = 3

[State 3303, Explod]
type = Explod
trigger1 = animelem = 77
trigger2 = animelem = 82
trigger3 = animelem = 88
anim = 3210
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
ignorehitpause = 1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 72
value = 200,17
channel = 0
persistent = 0
[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 76
value = 200,18
channel = 0
persistent = 0

[State 200, snd]
type= playsnd
trigger1= animelem=70
value=1000,24

[State 5100, 10]
type = PlaySnd
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(17) = 0
trigger5 = animelemtime(24) = 0 
trigger6 = animelemtime(37) = 0
trigger7 = animelemtime(40) = 0
trigger8 = animelemtime(46) = 0
trigger9 = animelemtime(56) = 0
value = 3+(var(32)*2),1+((random%4)*2)
channel = 4

[State 13000, EnvColor]
type = EnvColor
trigger1 = animelemtime(5) = 2
trigger2 = animelemtime(7) = 2
trigger3 = animelemtime(12) = 2
trigger4 = animelemtime(17) = 2
trigger5 = animelemtime(24) = 2 
trigger6 = animelemtime(37) = 2
trigger7 = animelemtime(40) = 2
trigger8 = animelemtime(46) = 2
trigger9 = animelemtime(56) = 2
value = 248,248,248
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numhelper
trigger1 = helper(247), var(1)=1
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 1201, HitAdd]
type = TargetLifeAdd
trigger1 = animelemtime(5) = 1
trigger2 = animelemtime(7) = 1
trigger3 = animelemtime(12) = 1
trigger4 = animelemtime(17) = 1
trigger5 = animelemtime(24) = 1 
trigger6 = animelemtime(37) = 1
trigger7 = animelemtime(40) = 1
trigger8 = animelemtime(46) = 1
trigger9 = animelemtime(56) = 1
value = -16
kill = 0

[State 1201, HitAdd]
type = HitAdd
trigger1 = animelemtime(5) = 0
trigger2 = animelemtime(7) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(17) = 0
trigger5 = animelemtime(24) = 0 
trigger6 = animelemtime(37) = 0
trigger7 = animelemtime(40) = 0
trigger8 = animelemtime(46) = 0
trigger9 = animelemtime(56) = 0
value = 1

[State 210, 1]
type = HitDef
trigger1 = animelemtime(64)>= 0 && animelemtime(65) < 0
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -64
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
pausetime = 1,13
guard.pausetime = 0,13
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 16
guard.ctrltime = 24
ground.velocity = -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 3006
kill = 0

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

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(77) = 1
trigger2 = animelemtime(82) = 1
trigger3 = animelemtime(88) = 1
value = 1000,3
channel = 4

[State 1000: Helper]
type = Helper
trigger1 = animelemtime(77) = 1
trigger2 = animelemtime(82) = 1
helpertype = Normal
name = "Haoh Shi Ko'ou Ken"
id = 3056
pos = 48, 0 ;50
postype = p1
facing = 1
stateno = 3057
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0  

[State 1000: Helper]
type = Helper
trigger1 = animelemtime(88) = 1
helpertype = Normal
name = "Haoh Shi Ko'ou Ken"
id = 3058
pos = 48, 0 ;50
postype = p1
facing = 1
stateno = 3058
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0 

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;DM Projectile
[Statedef 3057]
type = A
movetype = A
physics = N
ctrl = 0
velset = parent,var(15), 0
ownpal = 1
sprpriority = 4
juggle = 10

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3007
[State 200, snd]
type=null;playsnd
trigger1= animelem=1 && !prevstateno 
value=1000,5
[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 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,6])
attr = S, HP
damage = floor(100*ifelse(root,var(56),1.25,1)),8 ;225
animtype = b
air.animtype = U
ground.type = high
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = 0,0
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
air.fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3155
p1sprpriority = 4

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

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

[State 3303, Explod]
type = Explod
trigger1 = MoveContact && NumTarget
anim = 12005
pos = -16,0
postype = p2  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
facing = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 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 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(5) = 2
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(5) = -1
ignorehitpause = 1
persistent = 0

[State -2, FlagHit]
type = VarSet
trigger1 = Movecontact && NumTarget
var(5) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = NumHelper(247)
text = "MoveHit = %d"
params = Var(5)

[State -2, Counter Check]
type = VarSet
trigger1 = 1
var(56) = root,var(56)
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 0
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = parentvarSet
triggerall = root,var(56) = 0
triggerall = NumEnemy
trigger1 = enemynear,StateType = A 
trigger1 = enemynear,movetype = H 
trigger2 = enemynear,StateNo = [120,155]  
var(40) = 1
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

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

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse(var(5)=0,stateno+1,stateno)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movecontact && NumTarget
trigger2 = var(5) <= 0
value= 3156
ignorehitpause = 0 

;DM Projectile
[Statedef 3058]
type = A
movetype = A
physics = N
ctrl = 0
velset = parent,var(15), 0
ownpal = 1
sprpriority = 4
juggle = 10

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3007
[State 200, snd]
type=null;playsnd
trigger1= animelem=1 && !prevstateno 
value=1000,5
[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 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,6])
attr = A, HP
damage = floor(75*ifelse(root,var(56),1.25,1)),8
animtype = D
air.animtype = D
ground.type = low
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,13
guard.pausetime = 1,13
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 28
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
fall = 1
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 120
hitonce = 1
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
id=3155

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3155) && movehit
value = 10200
persistent = 0

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

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

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

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 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 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(5) = 2
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(5) = -1
ignorehitpause = 1
persistent = 0

[State -2, FlagHit]
type = VarSet
trigger1 = Movecontact && NumTarget
var(5) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = NumHelper(247)
text = "MoveHit = %d"
params = Var(5)

[State -2, Counter Check]
type = VarSet
trigger1 = 1
var(56) = root,var(56)
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 0
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = parentvarSet
triggerall = root,var(56) = 0
triggerall = NumEnemy
trigger1 = enemynear,StateType = A 
trigger1 = enemynear,movetype = H 
trigger2 = enemynear,StateNo = [120,155]  
var(40) = 1
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

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

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse(var(5)=0,stateno+1,stateno)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movecontact && NumTarget
trigger2 = var(5) <= 0
value= 3156
ignorehitpause = 0 

[Statedef 3100]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3100
poweradd=  ifelse(var(51),0,-1000)                         
sprpriority = 2 
velset=0,0
facep2 = 1

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

[State 1000, VarAdd]
type = PowerAdd
triggerall = !time
triggerall = !var(51)
trigger1 = prevstateno = [1000,1999]
value = -1000
persistent = 0
ignorehitpause = 1

[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) = 29

[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 = [2,29]
flag = noBG
flag2 = noFG

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

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 2
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 = 2
anim = 15200-(var(31)*200)
pos = 29,-59
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 2
anim = 15201-(var(31)*200)
pos = 29,-59
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

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

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 4, =4
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 2021, go x]
type = PosAdd
trigger1 = animelem = 17
trigger2 = animelem = 18
trigger3 = animelem = 19
trigger4 = animelem = 20
trigger5 = animelem = 21
trigger6 = animelem = 22
trigger7 = animelem = 23
trigger8 = animelem = 24
trigger9 = animelem = 25
trigger10 = animelem = 26
trigger11 = animelem = 27
trigger12 = animelem = 28
trigger13 = animelem = 29
trigger14 = animelem = 30
trigger15 = animelem = 31
x = 8

[State 2021, go x]
type = PosAdd
trigger1 = animelem = 32
x = 10

[State 5100, 10]
type = PlaySnd
trigger1 = animelem = 6
trigger2 = animelem = 13
trigger3 = animelem = 21
value = 3+(var(32)*2),8-(var(32)*2)

[State 205, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(7) >= 0 && animelemtime(8) < 0
damage = floor(100*ifelse(var(56),1.25,1))
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -92
hitsound = s1000,10
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
attr = S, HA
animtype = hard
air.animtype = up
ground.type = high
;guardflag = M HAH
hitflag = MAF
priority = 6, Hit
pausetime = 27,28
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 16
ground.velocity = 0
air.velocity = -4.5,-7
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 = .5
persistent = 0
envshake.time = 14
envshake.freq = 180
envshake.ampl = -4
id = 3100

[State 205, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(14) >= 0 && animelemtime(15) < 0
damage = floor(92*ifelse(var(56),1.25,1))
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -70
hitsound = s1000,10
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
attr = S, HA
animtype = hard
air.animtype = up
ground.type = low
guardflag = M
hitflag = MAF
priority = 6, Hit
pausetime = 27,28
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 16
ground.velocity = 0
air.velocity = -4.5,-7
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 = .5
persistent = 0
envshake.time = 14
envshake.freq = 180
envshake.ampl = -4
id = 3100

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(22) >= 0 && animelemtime(23) < 0
attr = S, HA
damage = floor(100*ifelse(var(56),1.25,1)),0
animtype = up
air.animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 44, 45
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -76
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 = 0,0
givepower = 16,16
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
id = 3100

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 23
movetype = I

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1 

[Statedef 3105]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3105
poweradd=  ifelse(var(51),0,-1000)                         
sprpriority = 2 
velset=0,0
facep2 = 1

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

[State 1000, VarAdd]
type = PowerAdd
triggerall = !time
triggerall = !var(51)
trigger1 = prevstateno = [1000,1999]
value = -1000
persistent = 0
ignorehitpause = 1

[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 = [3,30]
flag = noBG
flag2 = noFG

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

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 3
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 = 3
anim = 15200-(var(31)*200)
pos = 29,-59
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 3
anim = 15201-(var(31)*200)
pos = 29,-59
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

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

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 2
movetype = I

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1 

[Statedef 3106]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3106
poweradd=  ifelse(var(51),0,-1000)                         
sprpriority = 2 
velset=0,0
facep2 = 1

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

[State 1031, bind]
type = TargetBind
trigger1 = animelem = 1
trigger2 = animelemtime(1) >= 0 && animelemtime(2) < 0
ID = 3100
pos = 40, 0

[State 1000, VarAdd]
type = PowerAdd
triggerall = !time
triggerall = !var(51)
trigger1 = prevstateno = [1000,1999]
value = -1000
persistent = 0
ignorehitpause = 1

[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) = 29

[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 = [2,29]
flag = noBG
flag2 = noFG

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

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 2
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 = 2
anim = 15200-(var(31)*200)
pos = 29,-59
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 2
anim = 15201-(var(31)*200)
pos = 29,-59
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3035, 1]
type = AfterImage
trigger1 = AnimElem = 4, =4
time = -1
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 2021, go x]
type = PosAdd
trigger1 = animelem = 17
trigger2 = animelem = 18
trigger3 = animelem = 19
trigger4 = animelem = 20
trigger5 = animelem = 21
trigger6 = animelem = 22
trigger7 = animelem = 23
trigger8 = animelem = 24
trigger9 = animelem = 25
trigger10 = animelem = 26
trigger11 = animelem = 27
trigger12 = animelem = 28
trigger13 = animelem = 29
trigger14 = animelem = 30
trigger15 = animelem = 31
x = 8

[State 2021, go x]
type = PosAdd
trigger1 = animelem = 32
x = 10

[State 5100, 10]
type = PlaySnd
trigger1 = animelem = 6
trigger2 = animelem = 13
trigger3 = animelem = 21
value = 3+(var(32)*2),8-(var(32)*2)

[State 205, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(7) >= 0 && animelemtime(8) < 0
damage = floor(100*ifelse(var(56),1.25,1))
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -92
hitsound = s1000,10
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
attr = S, HA
animtype = hard
air.animtype = up
ground.type = high
;guardflag = M HAH
hitflag = MAF
priority = 6, Hit
pausetime = 27,28
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 16
ground.velocity = 0
air.velocity = -4.5,-7
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 = .5
persistent = 0
envshake.time = 14
envshake.freq = 180
envshake.ampl = -4
id = 3100

[State 205, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(14) >= 0 && animelemtime(15) < 0
damage = floor(92*ifelse(var(56),1.25,1))
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -70
hitsound = s1000,10
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
attr = S, HA
animtype = hard
air.animtype = up
ground.type = low
guardflag = M
hitflag = MAF
priority = 6, Hit
pausetime = 27,28
guard.pausetime = 11,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 16
ground.velocity = 0
air.velocity = -4.5,-7
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 = .5
persistent = 0
envshake.time = 14
envshake.freq = 180
envshake.ampl = -4
id = 3100

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(22) >= 0 && animelemtime(23) < 0
attr = S, HA
damage = floor(100*ifelse(var(56),1.25,1)),0
animtype = up
air.animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 44, 45
guard.pausetime = 11,12
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -76
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 = 0,0
givepower = 16,16
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
id = 3100

[State 1030, 1]
type = StateTypeSet
trigger1 = animelem = 23
movetype = I

[State 1011, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1 

[StateDef 3107]
Type = S
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0

[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 0, PosSet]
type = posset
trigger1 = time = 0
y = 0

[State 3100, 2]
type = Velset
trigger1 = 1;!gethitvar(isbound)
x = 0

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

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

[State 820, 2]
type = SelfState
trigger1 = time = 200
value = 0

[Statedef 3150]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd=  ifelse(var(51),0,-1000)     
ctrl = 0
anim = 3150
sprpriority = 2

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

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(22) = 225

[State -2, juggle set specials]
type = varSet
trigger1 = prevstateno=1255
trigger1 = !Time
var(16) = 60

[State 1000, VarAdd]
type = PowerAdd
triggerall = !time
triggerall = !var(51)
triggerall = numtarget(1100) != 0
trigger1 = prevstateno = [1000,1500]
value = -1000
persistent = 0
ignorehitpause = 1

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

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
triggerall = numtarget(1100) != 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
triggerall = numtarget(1100) != 0
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 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [2,30]
flag = noBG
flag2 = noFG

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

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

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

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1 
value = 200,17
channel = 0

[State 1001, end]
type = ChangeState
trigger1 = !var(5) && command = "hold_x"  
trigger2 = var(5) && command = "hold_y"
triggerall = AnimTime = 0
value = 3151

[State 1001, end]
type = ChangeState
triggerall = command != "hold_x" || command != "hold_y"
trigger1 = AnimTime = 0
value = 3152

[StateDef 3151]
type = s
MoveType = I
VelSet = 0, 0
Anim = 3151
SprPriority = 2 
ctrl=0

[State 1000: Helper]
type = Helper
trigger1 = animelem = 1
helpertype = Normal
name = "Charge"
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 3157
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 1000, VarSet]
type = VarSet
trigger1 = animelem = 16
var(22) = 283
[State 1000, VarSet]
type = VarSet
trigger1 = animelem = 31
var(22) = 358

[State 1001, end]
type = ChangeState
trigger1 = !var(5) && command != "hold_x"
trigger2 = var(5) && command != "hold_y"
trigger3 = animtime = 0
value = 3152

[StateDef 3152]
type = s
MoveType = A
VelSet = 0, 0
Anim = 3152+var(5)
SprPriority = 2 
ctrl=0

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1 
value = 200,12
channel = 0

[State 3303, Explod]
type = Explod
trigger1 = animelem = 3
anim = 3210
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
ignorehitpause = 1

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(3) = 1
value = 1000,3

[State 1000: Helper]
type = Helper
trigger1 = animelemtime(3) = 1
helpertype = Normal
name = "Haoh Shi Ko'ou Ken"
id = 3155
pos = 48, 0 ;50
postype = p1
facing = 1
stateno = 3155
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 1001, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;DM Projectile
[Statedef 3155]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
juggle = 10

[State 1000: Helper]
type = Helper
trigger1 = numhelper(3165) = 0
trigger1 = !time 
helpertype = Normal
name = "Projectile Guard"
id = 3165
pos = 50, 0 ;50
postype = p1
facing = 1
stateno = 3165
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

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

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

[State -2, Damage]
type = VarSet
trigger1 = !time && !prevstateno 
var(22) = root,var(22)
ignorehitpause = 1

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3155
[State 200, snd]
type=null;playsnd
trigger1= animelem=1 && !prevstateno 
value=1000,5
[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 1, Hitpoints];Gosh darn it
type = VarSet
trigger1 = !time && prevstateno != 3155
var(25) = 3
[State 1, Hitpoints];Decrease only when state loops back
type = VarAdd
trigger1 = !time && prevstateno = 3155
var(25) = -1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,6])
attr = S, HP
damage = floor((var(22))*ifelse(root,var(56),1.25,1)),8 ;225
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,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 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 = 3155
p1sprpriority = 4

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

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

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

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

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

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

[State -2, Counter Check]
type = VarSet
trigger1 = 1
var(56) = root,var(56)
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 0
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = parentvarSet
triggerall = root,var(56) = 0
triggerall = NumEnemy
trigger1 = enemynear,StateType = A 
trigger1 = enemynear,movetype = H 
trigger2 = enemynear,StateNo = [120,155]  
var(40) = 1
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

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

[State 1005, End]
type=changeState
trigger1 = movereversed
value= 3156
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movehit && !NumTarget
trigger2 = moveguarded && !NumTarget
value= ifelse(var(25)<=1,3156,3155)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movehit && NumTarget
trigger2 = moveguarded && NumTarget
value= 3156
ignorehitpause = 0



[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

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

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

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
[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 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;Haoh Charge FX
[Statedef 3157]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3157
sprpriority = 1
juggle = 10
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
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 1415, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,0

[State 1000, DestroySelf]
type = DestroySelf
Trigger1 = root,stateno != 3151

;DM Projectile
[Statedef 3158]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
juggle = 10

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

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

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

[State -2, Damage]
type = VarSet
trigger1 = !time && !prevstateno 
var(22) = root,var(22)
ignorehitpause = 1

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3155
[State 200, snd]
type=null;playsnd
trigger1= animelem=1 && !prevstateno 
value=1000,5
[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 210, 1]
type = HitDef
affectteam = F
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,6])
attr = S, HP
damage = floor((var(22))*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAFP
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 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
p1sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;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 && prevstateno != stateno
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;

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

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

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

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

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

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

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


[State -2, Counter Check]
type = VarSet
trigger1 = 1
var(56) = root,var(56)
ignorehitpause = 1
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = 0
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = parentvarSet
triggerall = root,var(56) = 0
triggerall = NumEnemy
trigger1 = enemynear,StateType = A 
trigger1 = enemynear,movetype = H 
trigger2 = enemynear,StateNo = [120,155]  
var(40) = 1
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

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

[State 1005, End]
type=changeState
trigger1 = movecontact && NumTarget
value= 3156
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse((numhelper(1055)=1),stateno,3156)
ignorehitpause = 0


;trigger1 = Alive
;trigger1 = StateNo = 5000 || StateNo = 5020 || StateNo = 5070 || StateNo = 10030 || StateNo = 10060 || StateNo = 10070 || StateNo = 10200
;trigger1 = !Time 
;var(34) = , 1, ifelse((Enemy, hitdefattr = SCA, SA, SP),2,0))

[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;DM Projectile Shield
[Statedef 3165]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,0
ownpal = 1
anim = 3165

[State 100, 1]
type = bindtoparent
trigger1 = parent,stateno = 3155
ignorehitpause = 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
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 = numhelper(3155) = 0
trigger2 = helper(3155),stateno != 3155

;
[Statedef 3200]
type    = S                      
movetype= A                    
physics = S                    
juggle  = 0                                 
ctrl = 0                       
anim = 3200
poweradd=  ifelse(var(51),-1000,-3000)  
sprpriority = 2 
velset = 0,0
facep2 = 1

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

[State 0, ReversalDef]
type = ReversalDef
triggerall = numenemy
triggerall = enemynear, movetype = A
trigger1 = animelemtime(2) >= 0 && animelemtime(7) < 0
reversal.attr = SCA,NA,SA,HA
hitflag = MAF
pausetime = 12,0
sparkno = s17501+(var(31)*10000)
sparkxy = 0,-10
hitsound = s2+(var(32)*10), 1
persistent = 1
guard.dist = 0 
p2stateno = 700
getpower = 0,0
Numhits = 0
id = 3200

[State 1000, 7]
type = ChangeState
trigger1 = movecontact && numtarget
value = 3201

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

[Statedef 3201]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd=  0   
ctrl = 0
anim = 3201
sprpriority = 1

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [8,37]
flag = noBG
flag2 = noFG

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

[State 2010, Pause]
Type = SuperPause
trigger1 = time = 8
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 = 8
anim = 15400+(var(31)*100)
pos = 26,-82
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 8
anim = 15401+(var(31)*100)
pos = 26,-82
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 38
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 = 13
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 = 13
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 801, fat]
type = Width
trigger1 = !time
edge = 64,64

[State 801, fly p2]
type = TargetState
trigger1 = animelem = 1
value = 3202
ignorehitpause = 1
ID = 3200

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

[State 801, fly p2]
type = TargetState
trigger1 = anim = 3201
trigger1 = animelem = 6
value = 3203
ignorehitpause = 1
ID = 3200
[State 801, fly p2]
type = TargetState
trigger1 = anim = 3201
trigger1 = animelem = 8
value = 3204
ignorehitpause = 1
ID = 3200

[State 810, bind]
type = TargetBind
trigger1 = anim = 3201
trigger1 = animelem = 1
trigger2 = animelemtime(1) >= 0 && animelemtime(2) < 0
trigger3 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3200
pos = 40, 0

[State 810, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3200
pos = 44, 0

[State 810, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 3200
pos = 48, 0

[State 810, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
ID = 3200
pos = 56, 0

[State 810, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
ID = 3200
pos = 64, 0

[State 810, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
ID = 3200
pos = 80, 20

[State 801, Damage]
Type = TargetLifeAdd
Trigger1 = animelem =6 
value = -375
ID = 3200
absolute = 1

[State 5100, Explod]
type = Explod
trigger1 = animelemtime(6) = 0
anim = 17002+(var(31)*10001)
pos = 40,-12
postype = p1  ;p2,front,back,left,right
sprpriority = 5
ownpal = 1

[State 5100, Explod]
type = Explod
trigger1 = animelemtime(6) = 1
anim = 3210
pos = 26,0
postype = p1  ;p2,front,back,left,right
sprpriority = 4
ownpal = 1
facing = -1


[State 5100, Explod]
type = Explod
trigger1 = animelemtime(6) = 1
anim = 3205
pos = 28,-28
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1

[State 5100, 10]
type = PlaySnd
Trigger1 = animelem = 6 
value = 3+(var(32)*2),9
[State 300, Crash Sound]
type = PlaySnd
Trigger1 = animelem = 6 
value = 2+(var(32)*10),5
persistent = 0

[State 0, EnvShake]
type = EnvShake
Trigger1 = animelem = 6 
time = 20
ampl = -4
freq = 180

[State 3303, Explod]
type = Explod
Trigger1 = animelem = 6 
anim = 12000
pos = 0,0
id = 12000
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0

[State 3303, Explod]
type = Explod
Trigger1 = animelem = 6
anim = 12002+(var(31)*10000)
pos = 0,0
id = 12000
postype = p1  ;p2,front,back,left,right
sprpriority = -1
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 801, 10]
type = ChangeState
Trigger1 = animtime = 0
value = 0
ctrl = 1 


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

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

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

[State 811, Anim]
Type = ChangeAnim
Trigger1 = anim = 3202
Trigger1 =animtime = 0
Value = ifelse(selfanimexist(5420)=1,5420,5012)
elem = 1

[State 820, 2]
type = SelfState
triggerall = time > 1
trigger1 = !gethitvar(isbound)
value = 5050

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

[State 811, Anim]
Type = ChangeAnim
Trigger1 = !time
value = ifelse(SelfAnimExist(5102),5102,ifelse(SelfAnimExist(5101),5101,5100))

[State 811, Anim]
Type = ChangeAnim
trigger1 = Anim = [5100,5102]
Trigger1 = time = 5
value = ifelse(SelfAnimExist(5162),5162,ifelse(SelfAnimExist(5161),5161,5160))

[State 1812, SelectBounceFrame]
type = ChangeAnim
trigger1 = Anim = [5161,5162]
value = Anim
elem = ifelse((AnimElem=4,<0),4,ifelse((AnimElem=3,<0),3,ifelse((AnimElem=2,<0),2,1)))
persistent = 0

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

[State 811, 2]
type = SelfState
Trigger1 = time = 200
value = 5050

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

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

[State 811, Anim]
Type = ChangeAnim
Trigger1 = !time
value = ifelse(SelfAnimExist(5052),5052,5050)

[State 811, Anim]
Type = ChangeAnim
Trigger1 = anim = 902
Trigger1 = time = 57
value = ifelse(SelfAnimExist(5162),5162,ifelse(SelfAnimExist(5161),5161,5160))

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = time = 24
value = ifelse(SelfAnimExist(5062),5062,ifelse(SelfAnimExist(5061),5061,5050))
persistent = 0

[State 0, StartVels]
type = VelSet
trigger1 = time = 1
y = -25

;[State 1402, VelSet]
;type = VelAdd
;trigger1 = time > 0 && time < 24
;y = (2.341064453125)*exp((-0.13800)*(time-1))

[State 1402, VelSet]
type = VelMul
trigger1 = time > 0 && time < 24
y = 0.86426783794678849771566783122816

[State 1402, VelSet]
type = VelAdd
trigger1 = time > 24
y = 0.625

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

[Statedef 3205]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 0

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 7]
type = SelfState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;Downed get-hit (lying down)

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = time = 4
value = 3206

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;================================================================================
; DIAGUP HIT HIT_BOUNCE (bounce into air)
[Statedef 3206]
type    = L
movetype= H
physics = N

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 4]
type = VelSet
trigger1 = Time = 0
y = -3.5

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = time > 0
y = .625

[State 5101, 6] ;Hit ground
trigger1 = Pos Y + Vel Y >= 0
type = ChangeState
value = 3207

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

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

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
triggerall = SelfAnimExist(5171)
trigger1 = anim = [5101,5102]
trigger2 = anim = [5161,5163]
trigger3 = anim = [5111,5112]
trigger4 = anim = [5171,5172]
trigger5 = anim = [5422,5424]
value = 5171

[State 964, HitGroundAnim]
type = ChangeAnim2
trigger1 = !Time && anim != 5171
value = 10302

[State 964, GoToBounce]
type = ChangeState
trigger1 = time = 4
value = 3208

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

[State 966, PosToGround]
type = PosSet
trigger1 = !Time
y = -1

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = !time
trigger1 = SelfAnimExist(5424)
value = 5424

[State 6123, BounceAnim]
type = ChangeAnim
trigger1 = !time
trigger1 = !SelfAnimExist(5424)
value = ifelse(SelfAnimExist(5162),5162,ifelse(SelfAnimExist(5161),5161,5160))
 
[State 6123, SelectBounceFrame]
type = ChangeAnim
trigger1 = Anim = [5161,5162]
value = Anim
elem = ifelse((AnimElem=5,<0),5,ifelse((AnimElem=4,<0),4,ifelse((AnimElem=3,<0),3,ifelse((AnimElem=2,<0),2,1))))
persistent = 0

[State 966, StartVels]
type = VelSet
trigger1 = !Time 
y = -2

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

[State 6123, SelectBounceFrame]
type = ChangeAnim
trigger1 = Anim = 5424
trigger1 = Vel Y > 0
trigger1 = Vel Y + Pos y - 20 >= 0
value = ifelse(SelfAnimExist(5162),5162,ifelse(SelfAnimExist(5161),5161,5160))
 
[State 966, PosAdd]
type = PosAdd
trigger1 = !Time
y = 20
[State 966, GoToBounce]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Vel Y + Pos y - 20 >= 0
value = 5110

[Statedef 3300]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd=  ifelse(var(51),-1000,-3000)    
ctrl = 0
anim = 3300
sprpriority = 2

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

[State 1000, VarAdd]
type = PowerAdd
triggerall = !time
triggerall = !var(51)
triggerall = numtarget(1100) != 0
trigger1 = prevstateno = [1000,1500]
value = -1000
persistent = 0
ignorehitpause = 1

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

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
triggerall = numtarget(1100) != 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
triggerall = numtarget(1100) != 0
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 2000, 0]
type = NotHitBy
triggerall = anim = 3300
trigger1 = animelemtime(8) < 0
value = SCA

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

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [2,30]
flag = noBG
flag2 = noFG

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

[State 2010, Pause]
Type = SuperPause
trigger1 = time = 2
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 = 2
anim = 15400+(var(31)*100)
pos = -46,-56
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 2
anim = 15401+(var(31)*100)
pos = -46,-56
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 30
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 = 2
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 = 2
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 1050, PlaySnd]
type = PlaySnd
triggerall = anim = 3300
trigger1 = animelem = 1 
value = 200,17
channel = 0
[State 1050, PlaySnd]
type = PlaySnd
triggerall = anim = 3300
trigger1 = animelem = 17 
value = 200,12
channel = 0
[State 200, snd]
type=playsnd
triggerall = anim = 3300
trigger1= animelem=9
value=1000,4

[State 1000: Helper]
type = Helper
triggerall = anim = 3300
trigger1 = animelem = 8
helpertype = Normal
name = "Lion Head"
id = 3320
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 3321
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
[State 1000: Helper]
type = Helper
triggerall = anim = 3300
trigger1 = animelem = 8
helpertype = Normal
name = "Lion Beam"
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 3324
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 3303, Explod]
type = Explod
trigger1 = animelemtime(17) = 2
anim = 3305
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 1000: Helper]
type = Helper
triggerall = anim = 3300
trigger1 = animelemtime(17) = 2
helpertype = Normal
name = "Attack"
id = 3330
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 3330
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, EnvShake]
type = EnvShake
Triggerall = anim =3301
Trigger1 = animelemtime(1) = 1
time = 14
freq = 180
ampl = -4
persistent = 0

[State 1001, end]
type = ChangeAnim
triggerall = numhelper(3330) = 1
triggerall = anim = 3300 && animelemtime(18) >=0
trigger1 = helper(3330),stateno = 3331
value = 3301

[State 1001, end]
type = ChangeState
trigger1 = anim = 3301
trigger1 = animtime = 0
value = 0
ctrl = 1

;LION FX
[Statedef 3321]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3321
sprpriority = 1
juggle = 10
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
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

[State 1415, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(15) < 0
time = 1
pos = 60,0

[State 1415, BindToRoot]
type = BindToRoot
trigger1 = animelemtime(15) >= 0
time = 1
pos = 120,0
[State 300, behind]
type = sprpriority
trigger1 = animelemtime(15) >= 0
value = 4

[State 1000, Anim]
Type = ChangeAnim
Triggerall = anim = 3321
Trigger1 = root,anim = 3301
Trigger1 = root,animelem = 1
Value = 3322

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = anim = 3322
trigger1 = !animtime
trigger2 = root,stateno != 3300

;LION Beam length 1
[Statedef 3324]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3324
sprpriority = 4
juggle = 10
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
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

[State 1415, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 120,0

[State 1000, Anim]
Type = ChangeAnim
Triggerall = anim = 3324
Trigger1 = root,anim = 3301
Trigger1 = root,animelem = 1
Value = 3325

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = anim = 3325
trigger1 = !animtime
trigger2 = root,stateno != 3300

;SDM Projectile
[Statedef 3330]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,0
ownpal = 1
sprpriority = 4
juggle = 0

[State -2, ground combos]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3330
[State 200, snd]
type=playsnd
trigger1= animelem=1 && !prevstateno 
value=1000,3

[State 210, 1]
type = HitDef
triggerall = var(5) = 10
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(117*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
envshake.time = 14
envshake.freq = 180
envshake.ampl = -4
id= 3110
nochainid = 3110
[State 210, 1]
type = HitDef
triggerall = var(5) = 9
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(92*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3111
nochainid = 3111
[State 210, 1]
type = HitDef
triggerall = var(5) = 8
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(67*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3112
nochainid = 3112
[State 210, 1]
type = HitDef
triggerall = var(5) = 7
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(25*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3113
nochainid = 3113
[State 210, 1]
type = HitDef
triggerall = var(5) = 6
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(25*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3114
nochainid = 3114
[State 210, 1]
type = HitDef
triggerall = var(5) = 5
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(16*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3115
nochainid = 3115
[State 210, 1]
type = HitDef
triggerall = var(5) = 4
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(16*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3116
nochainid = 3116
[State 210, 1]
type = HitDef
triggerall = var(5) = 3
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(16*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3117
nochainid = 3117
[State 210, 1]
type = HitDef
triggerall = var(5) = 2
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(16*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = Hard
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3118
nochainid = 3118
[State 210, 1]
type = HitDef
triggerall = var(5) = 1
trigger1 = (animelemno(0) = [2,26])
attr = , HP
damage = floor(16*ifelse(root,var(56),1.25,1)),8
sparkno = s17002+(root,var(31)*10000)
sparkxy = -10,-60
hitsound = -1
guardsound = -1
guard.sparkno = s17502+(root,var(31)*10000)
animtype = up
air.animtype = Up
guardflag = M
hitflag = MAFD
priority = 5, Hit
ground.type = high
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
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
hitonce = 1
id= 3119
nochainid = 3119

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

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

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

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 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 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(5) = 10
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(5) = -1
ignorehitpause = 1
persistent = 0
[State 1015, VarSet]
type = VarAdd
trigger1 = animelem = 25
var(5) = 1
ignorehitpause = 1
persistent = 0

[State -2, DTC]
type = DisplayToClipboard
trigger1 = NumHelper(247)
text = "MoveHit = %d"
params = Var(5)

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


[State 1000, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 3300

[State 1005, End]
type=changeState
trigger1 = animtime = 0 
value= 3331
ignorehitpause = 0

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

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