[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1          
yscale = 1       
ground.back = 17   
ground.front = 17  
air.back = 17     
air.front = 17     
height = 60         
attack.dist = 160    
proj.attack.dist = 90
proj.doscale = 0    
head.pos = -5, -90   
mid.pos = -5, -60   
shadowoffset = 0    
draw.offset = 0,0  

[Velocity]
walk.fwd  = 3.1875   
walk.back = -2.125  
run.fwd  = 5.5,0   
run.back = -6.5,-3.625
jump.neu = 0,-7.125
jump.back = -4
jump.fwd = 3.5
runjump.back = -6
runjump.fwd = 5.25

[Movement]
yaccel = 0.48828125         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

[Quotes]
victory1 = "I'm in the pink today! Wubba wubba!"

;---------------------------------------------------------------------------
; Variable usage:
; This is a record of the variables that KFM uses. Keeping a record of your
; variable usage helps you avoid careless mistakes later.
; var(1)  - Used in kfm.cmd for combo condition (updated every tick)
; var(2)  - Used in Kung Fu Throw (state 800) to remember if fwd was being
;           held (remembered from state 800 through state 810).


;====================< WALKING >====================
[Statedef 20]
type = S
physics = S
movetype = I
sprpriority = 0

[State 20, Vel]
type = velset
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)*Const(Size.XScale)*(5.0/4.0)

[State 20, Vel]
type = velset
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)*Const(Size.XScale)*(5.0/4.0)

[State 20, Anim]
type = changeanim
triggerall = vel x > 0
trigger1 = anim != 20 && anim != 5
trigger2 = anim = 5 && animelemtime(1) >= 1
value = 20

[State 20, Anim]
type = changeanim
triggerall = vel x < 0
trigger1 = anim != 21 && anim != 5
trigger2 = anim = 5 && animelemtime(1) >= 1
value = 21

;====================< JUMPING >====================
[Statedef 40]
type = S
physics = S
movetype = I
anim = 40
ctrl = 0
velset = 0, 0
sprpriority = 1
facep2 = 1

[State 40, Direction]
type = varset
trigger1 = !AIlevel
sysvar(1) = ifelse(!time, 0, ifelse(command = "holdfwd", 1, ifelse(command = "holdback", -1, sysvar(1))))
[State 40, Direction]
type = varset
trigger1 = AIlevel
sysvar(1) = ifelse((enemynear, movetype != A || backedgebodydist <= 10), 1, ifelse((enemynear, movetype = A), -1, 0))

[State 40, High Jump]
type = varset
trigger1 = !time && !AIlevel
var(3) = ifelse(command = "highjump", 3, 0)
[State 40, High Jump]
type = varset
trigger1 = !time && AIlevel
var(3) = ifelse((p2bodydist x >= 160 || random < (125 * (AIlevel ** 2 / 64.0))), 3, 0)
[State 40, High Jump]
type = varset
trigger1 = !time && prevstateno = 100
var(3) = 3

[State 40, Low Jump]
type = varset
trigger1 = !AIlevel && command != "holdup" && (var(3) != [1, 2])
var(3) = ifelse((var(3) = 3 && sysvar(1)), 2, 1)
[State 40, Low Jump]
type = varset
trigger1 = AIlevel && (var(3) != [1, 2])
trigger1 = (enemynear, statetype = C) && random < 500
var(3) = ifelse((var(3) = 3 && sysvar(1)), 2, 1)

[State 40, Snd]
type = playsnd
trigger1 = !animtime
value = 0, ifelse((var(3) = [2, 3]), 41, 40)
[State 40, Dust]
type = helper
trigger1 = !animtime
helpertype = normal
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1

[State 40, Vel Normal]
type = velset
trigger1 = !animtime
x = ifelse(!sysvar(1), const(velocity.jump.neu.x), ifelse(sysvar(1) = 1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))*(5.0/4.0)
y = const(velocity.jump.y)*(5.0/4.0)

[State 40, Vel Short]
type = velset
trigger1 = !animtime && var(3) = 1
x = ifelse(!sysvar(1), const(velocity.jump.neu.x), ifelse(sysvar(1) = 1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))*(5.0/4.0)
y = 0.75*const(velocity.jump.y)*(5.0/4.0)

[State 40, Vel Medium]
type = velset
trigger1 = !animtime && var(3) = 2
x = ifelse(!sysvar(1), const(velocity.jump.neu.x), ifelse(sysvar(1) = 1, const(velocity.runjump.fwd.x), const(velocity.runjump.back.x)))*(5.0/4.0)
y = 0.75*const(velocity.jump.y)*(5.0/4.0)

[State 40, Vel Long]
type = velset
trigger1 = !animtime && var(3) = 3
x = ifelse(!sysvar(1), const(velocity.jump.neu.x), ifelse(sysvar(1) = 1, const(velocity.runjump.fwd.x), const(velocity.runjump.back.x)))*(5.0/4.0)
y = ifelse(!sysvar(1), 0, ifelse(sysvar(1) = 1, -7.0, -7.25))*(5.0/4.0)

[State 40, End]
type = changestate
trigger1 = !animtime
value = 50
ctrl = 1


[Statedef 50]
type = A
physics = N
movetype = I
sprpriority = 1

[State 50, Anim]
type = changeanim
trigger1 = !time
value = ifelse(!vel x, 41, ifelse(vel x > 0, 42, 43)) + 10 * (var(3) = [1, 2])
persistent = 0

[State 50, No Guard]
type = assertspecial
trigger1 = var(3) = [1, 2]
flag = noairguard

[State 50, VelAdd]
type = VelAdd
trigger1 = SysVar(1) = 1
x = -ifElse(Vel X <= 0,0,ifElse(Var(3)=3,0.029296875,0.01953125))*(25.0/16.0)
[State 50, VelAdd]
type = VelAdd
trigger1 = SysVar(1) = -1
x = ifElse(Vel X >= 0,0,ifElse(Var(3)=3,0.029296875,0.01953125))*(25.0/16.0)

[State 920, 0]
type = Gravity
trigger1 = Time

[State 50, ChangeState]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = 52


[Statedef 51]
type = A
physics = N
movetype = I
sprpriority = 1
[State 51, Accel]
type = gravity
trigger1 = 1
[State 51, Land]
type = changestate
trigger1 = pos y > -vel y
value = 52


[Statedef 52]
type = S
physics = S
movetype = I
anim = 47
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 52, anim 57]
type = changeanim
trigger1 = !time && (var(3) = 1 || var(3) = 2)
trigger1 = (prevstateno = [600, 699])
value = 57

[State 52, Pos]
type = posset
trigger1 = 1
y = 0

[State 52, Ctrl]
type = ctrlset
trigger1 = !time && (prevstateno != [600, 699])
trigger2 = time = 1 && anim != 57
value = 1
[State 52, Guard]
type = changestate
trigger1 = ctrl && command = "holdback"
trigger1 = inguarddist && (prevstateno != [600, 699])
value = 120

[State 52, No Walk]
type = assertspecial
trigger1 = anim != 5
flag = nowalk

[State 52, Snd]
type = playsnd
trigger1 = !time
value = 0, 52
[State 52, Dust]
type = explod
trigger1 = !time
anim = 8102
sprpriority = -3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 52, Turn]
type = changeanim
trigger1 = ctrl && p2dist x < 0
trigger1 = anim != 5
value = 5
[State 52, Turn]
type = turn
trigger1 = anim = 5 && animelem = 1

[State 52, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;======================< RUN >===========================
[Statedef 100]
type = S
physics = N
movetype = I
anim = 100
ctrl = 0
sprpriority = 1

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
[State 100, Vel]
type = velset
trigger1 = 1
x = const(velocity.run.fwd.x)*(5.0/4.0)
y = 0

[State 100, step]
type = playsnd
trigger1 = (animelem = 3 || animelem = 6)
value = 0, ifelse((animelem = 3), 103, 106)

[State 100, jump]
type = changestate
trigger1 = !AIlevel
trigger1 = command = "holdfwd" && command = "holdup"
value = 40
[State 100, jump]
type = changestate
trigger1 = AIlevel && random < 25
value = 40

[State 100, End]
type = changestate
trigger1 = !AIlevel && command != "holdfwd"
trigger2 = AIlevel && p2bodydist x <= 90
value = 101


;--- STOP ---
[Statedef 101]
type = S
physics = N
movetype = I
anim = 101
ctrl = 0
sprpriority = 1

[State 101, Snd]
type = playsnd
trigger1 = !time
value = 0, 101

[State 101, Dust]
type = explod
trigger1 = !time
anim = 8104
sprpriority = 3
postype = p1
pos = 0, 0
vel = 0, 0
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 101, Accel]
type = VelAdd
trigger1 = 1
x = ifElse(Vel X <= 0, 0, -0.4583282470703125)*(25.0/16.0)
[State 101, Vel]
type = VelSet
trigger1 = AnimTime = 0
trigger2 = vel x <= 0
x = 0

[State 101, jump]
type = changestate
trigger1 = !AIlevel && command = "holdup"
value = 40
[State 101, End]
type = changestate
trigger1 = !animtime
value = ifelse(command = "holddown", 10, 0)
ctrl = 1


;======================< DASH >===========================
[Statedef 102]
type = S
physics = N
movetype = I
anim = 102
ctrl = 0
sprpriority = 1

[State 102, Snd]
type = playsnd
trigger1 = !time
value = 0, 102
[State 102, Dust]
type = helper
trigger1 = animelem = 2
helpertype = normal
stateno = 8103
ID = 8100
name = "Dash Dust"
postype = p1
pausemovetime = 255
supermovetime = 255
ownpal = 1

[State 102, Run]
type = varset
trigger1 = !time
sysvar(1) = 1
[State 102, Run]
type = varset
triggerall = time <= 5
trigger1 = !AIlevel && command != "holdfwd"
sysvar(1) = 0
[State 102, Run]
type = changestate
trigger1 = animelemtime(2) = 0 && sysvar(1) && helper(9999),var(50)=2
trigger2 = animelemtime(2) = 0 && helper(9999),var(50)=0
value = 100

[State 102, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(2) = 0
statetype = A 
physics = N
[State 102, Vel]
type = velset
trigger1 = AnimElemTime(2) = 0
x = 6.5*(5.0/4.0)
y = -3.625*(5.0/4.0)

[State 102, Accel]
type = VelAdd
trigger1 = AnimElemTime(2) > 0
x = ifElse(Vel X <= 0, 0, -0.0625)*(25.0/16.0)
[State 102, Accel]
type = VelAdd
trigger1 = AnimElemTime(2) > 0
y = .5*(25.0/16.0)

[State 102, 3]
type = ChangeState
triggerall = AnimElemTime(2) > 0
trigger1 = Pos Y + Vel Y >= 0
value = 103


;--- STOP ---
[Statedef 103]
type = S
physics = S
ctrl = 1
anim = 103
velset = 0, 0

[State 106, Pos]
type = posset
trigger1 = 1
y = 0

[State 103, Snd]
type = playsnd
trigger1 = !time
value = 0, 103
[State 103, Dust]
type = explod
trigger1 = !time
anim = 8102
sprpriority = -3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 103, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1


;========================< BACK DASH >==========================
[Statedef 105]
type = A
physics = N
movetype = I
velset = 0, 0
anim = 105
ctrl = 0
sprpriority = 1

[State 105, Snd]
type = playsnd
trigger1 = animelem = 2
value = 0, 105
[State 105, Dust]
type = helper
trigger1 = animelem = 2
helpertype = normal
stateno = 8103
ID = 8100
name = "Dash Dust"
postype = p1
facing = -1
pausemovetime = 255
supermovetime = 255
ownpal = 1

[State 102, Type]
type=statetypeset
trigger1= animelemtime(2)>=0
statetype=A
physics=N
[State 105, Vel]
type = velset
trigger1 = animelem = 2
x = const(velocity.run.back.x)*(5.0/4.0)
y = const(velocity.run.back.y)*(5.0/4.0)
[State 102, Accel]
type = VelAdd
trigger1 = AnimElemTime(2) > 0
x = ifElse(Vel X >= 0, 0, 0.0625)*(25.0/16.0)
[State 102, Accel]
type = VelAdd
trigger1 = AnimElemTime(2) > 0
y = .5*(25.0/16.0)

[State 102, 3]
type = ChangeState
triggerall = AnimElemTime(2) > 0
trigger1 = Pos Y + Vel Y >= 0
value = 106


;--- LAND ---
[Statedef 106]
type = S
physics = S
ctrl = 0
anim = 106
velset = 0, 0

[State 106, Pos]
type = posset
trigger1 = 1
y = 0

[State 106, Snd]
type = playsnd
trigger1 = !time
value = 0, 106
[State 106, Dust]
type = explod
trigger1 = !time
anim = 8102
sprpriority = -3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 106, Ctrl]
type = ctrlset
trigger1 = time >= 2
value = 1
[State 106, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 180, Quote]
type = victoryquote
trigger1 = 1
value = 1

[State 180, Win]
type = changestate
trigger1 = command = "holdx" || command = "holdy" || command = "holdz"
value = ifelse(command = "holdx", 183, ifelse(command = "holdy", 182, 181))

[State 180, Win]
type = changestate
trigger1 = command = "holda" || command = "holdb" || command = "holdc"
value = ifelse(command = "holda", 183, ifelse(command = "holdb", 182, 181))

[State 180, Win]
type = changestate
trigger1 = 1
value = 181 + (random % 3)

;---------------------------------------------------------------------------
; Win pose 1
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 6,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 7,4

[State 191, Hat]
type = Helper
trigger1 = AnimElem = 5
ID = 6000
stateno = 6000
postype = p1
pos = 28,-112
name = "Hat"

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

;---------------------------------------------------------------------------
;Hat
[Statedef 6000]
type = A
physics = N
ctrl = 0
anim = 6000
sprpriority = 2
velset = 2,-5.5

[State 6000, Accel]
type = VelAdd
trigger1 = 1
y = .25

[State 6000, ChangeState]
type = ChangeState
trigger1 = Pos Y >= -5 && Vel Y > 0
value = 6001

;---------------------------------------------------------------------------
;Hat Land
[Statedef 6001]
type = S
physics = S
ctrl = 0
anim = 6001
sprpriority = 2
velset = 0,0

[State 6000, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

;---------------------------------------------------------------------------
; Win pose 1
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 20
value = 6,1
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
trigger2 = animelem = 11
value = 7,4

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

;---------------------------------------------------------------------------
; Win pose 3
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = 6,0
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 7,4

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

;---------------------------------------------------------------------------
;Initialize
[Statedef 5900]
type = S

[State 5900, Varreset]
type = varrangeset
trigger1 = !roundsexisted
value = 0
[State 5900, Varreset]
type = varrangeset
trigger1 = !roundsexisted
fvalue = 0

[State 5900, Palette]
type = remappal
trigger1 = 1
source = 1, 1
dest = 1, palno

[State 5900, Intro VS Geese]
type = changestate
triggerall = numenemy
triggerall = roundno = 1 || (!(enemy, roundsexisted) && !(teammode = simul) && !(enemy, teammode = simul))
trigger1 = enemy, name = "Geese" || enemy, name = "Geese Howard" || enemy, name = "cvsgeese" ||  enemy,name = "cvsgeese_normal" ||  enemy,name = "cvsgeese_ex"
value = 191

[State 5900, Intro VS Ken]
type = changestate
triggerall = numenemy
triggerall = roundno = 1 || (!(enemy, roundsexisted) && !(teammode = simul) && !(enemy, teammode = simul))
trigger1 = enemy, name = "cvsken" && enemy,authorname = "Warusaki3"
trigger2 = enemy,name = "Ken Masters" && enemy,authorname = "Phantom.of.the.Server&Jmorphman"
value = 192

[State 5900, Intro VS Rock]
type = changestate
triggerall = numenemy
triggerall = roundno = 1 || (!(enemy, roundsexisted) && !(teammode = simul) && !(enemy, teammode = simul))
trigger1 = enemy, name = "Rock" || enemy,name = "Rock Howard" || enemy,name = "cvsrock"
value = 193

[State 5900, Intro VS Rock]
type = changestate
triggerall = numenemy
triggerall = roundno = 1 || (!(enemy, roundsexisted) && !(teammode = simul) && !(enemy, teammode = simul))
trigger1 = enemy, name = "cvsyamazaki" && enemy,authorname = "Warusaki3"
value = 193

[State 5900, Intro vs Ken (new)]
type = ChangeState
triggerAll = NumEnemy && !(Enemy, TeamMode = Simul)
triggerAll = RoundNo = 1 || ((!(Enemy, RoundsExisted) || !RoundsExisted) && !(TeamMode = Simul))
trigger1 = Enemy, AuthorName = "Jmorphman" && Enemy, Name = "Ken Masters" && Enemy, var(40) != 1
value = 196

[State 5900, Intro]
type = changestate
trigger1 = roundno = 1
value = 190
[State 5900, End]
type = changestate
trigger1 = 1
value = 0

;---------------------------------------------------------------------------
; Introduction
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySND]
type = PlaySND
trigger1 = animelem = 2
value = s6,5

[State 191, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Intro VS Geese
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySND]
type = PlaySND
trigger1 = animelem = 2
value = s6,6

[State 191, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;Intro VS Ken
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 192, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192, Hat]
type = Helper
trigger1 = time = 1
ID = 6002
stateno = 6002
postype = p2
pos = 0,0
name = "Hat"

[State 190, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;Hat
[Statedef 6002]
type = A
physics = N
ctrl = 0
anim = ifElse(Root, StateNo = 196, 6006, 6002)
sprpriority = 2
velset = 0,0

[State 6801, PosAdd]
type = PosAdd
trigger1 = !Time
;320x240
;x = P2Dist x
;640x480
x = P2Dist x + .5
;1280x720
;x = P2Dist x + .75

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = 7, 4

[State 8200, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 6003

[State 8200, DestroySelf]
type = DestroySelf
trigger1 = Root, StateNo != 192 && Root, StateNo != 196

;---------------------------------------------------------------------------
;Hat
[Statedef 6003]
type = A
physics = N
ctrl = 0
anim = 6000
sprpriority = 2

[State 220, Position]
type = PosAdd
trigger1 = Time = 0
x = 58
y = -102

[State 105, 1]
type = VelSet
trigger1 = time = 0
x = (ParentDist X-68)*.03125
y = -4.5

[State 105, 1]
type = VelAdd
trigger1 = 1
y = .3

[State 8200, DestroySelf]
type = DestroySelf
trigger1 = parent,animelem = 4

;---------------------------------------------------------------------------
;Intro VS Rock
[Statedef 193]
type = S
physics = N
ctrl = 0
anim = 193
velset = 0,0

[State 193, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 193, PlaySND]
type = PlaySnd
trigger1 = AnimElemTime(1) = 180
value = 6, 1
channel = 0

[State 193, PlaySND]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 1

[State 193, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;Intro VS Yamazaki
[Statedef 194]
type = S
physics = N
ctrl = 0
anim = 194
velset = 0,0

[State 190, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1, 1

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 8
value = 4, 1

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 11
value = 7, 2

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;Intro VS Ken (new)
[Statedef 196]
type = S
ctrl = 0
anim = 196
velset = 0,0

[State 196, Change to Regular Intro]
type = ChangeState
trigger1 = Enemy, var(40) = 1
value = 5900

[State 196, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 196, Hat]
type = Helper
trigger1 = time = 1
ID = 6002
stateno = 6002
postype = p2
pos = 0,0
name = "Hat"

[State 196, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
physics = S
movetype = I
anim = 195
velset = 0, 0
ctrl = 0
sprpriority = 1

[State 195, Snd]
type = playsnd
trigger1 = !time
value = 6, 3
channel = 0

[State 195, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;LP
[Statedef 200]
type    = S                    
movetype= A                   
physics = S                     
juggle  = 0       
velset = 0,0              
ctrl = 0      
anim = 200        
poweradd = 0          
sprpriority = 1
facep2 = 1        

[State 200, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 200
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 200, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 0
channel = 1

[State 200, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 22 < 7, 7, fvar(11) * 22)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.36
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 0)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 68), var(36) := -89
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

;[State 200, Anim]
;type = changeanim
;trigger1 = movecontact = 1 && hitpausetime
;trigger1 = animelemtime(2) >= 0 && animelemtime(3) <= 0
;trigger1 = hitpausetime <= ifelse(var(20), 2, 6)
;value = 200
;elem = 3
;ignorehitpause = 1

[State 200, Type]
type = statetypeset
trigger1 = animelemtime(4) >= 0
movetype = I
[State 200, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;c.LP
[Statedef 201]
type    = S 
movetype= A
physics = S 
juggle  = 0 
velset = 0,0 
ctrl = 0          
anim = 201                
poweradd = 0           
sprpriority = 1             
facep2 = 1        

[State 200, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 200
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 200, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 0
channel = 1

[State 200, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.36
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 0)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 68), var(36) := -89
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

;[State 200, Anim]
;type = changeanim
;trigger1 = movecontact = 1 && hitpausetime
;trigger1 = animelemtime(2) >= 0 && animelemtime(3) <= 0
;trigger1 = hitpausetime <= ifelse(var(20), 2, 6)
;value = 200
;elem = 3
;ignorehitpause = 1

[State 200, Type]
type = statetypeset
trigger1 = animelemtime(3) >= 0
movetype = I
[State 200, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;MP
[Statedef 210]
type = S
physics = S
movetype = A
anim = 210
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 210, Snd]
type = playsnd
trigger1 = animelem = 2 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 210, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 1
channel = 1

[State 210, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 73 < 7, 7, fvar(11) * 73)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 15 + 3 * var(9)
ground.slidetime = 15 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -7.66*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -7.66*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -3.24, -7.73
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 1)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 70), var(36) := -75
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 210, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 3, 8)
value = 210
elem = 4
ignorehitpause = 1

[State 210, Type]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I
[State 210, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;c.MP
[Statedef 211]
type = S
physics = S
movetype = A
anim = 211
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 210, Snd]
type = playsnd
trigger1 = animelem = 2 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 210, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 1
channel = 1

[State 210, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 58 < 7, 7, fvar(11) * 58)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 15 + 3 * var(9)
ground.slidetime = 15 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -7.66*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -7.66*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -3.24, -7.73
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 1)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 70), var(36) := -72
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 210, Type]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I
[State 210, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;HP
[Statedef 220]
type = S
physics = S
movetype = A
anim = 220
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 220, Snd]
type = playsnd
trigger1 = animelem = 2 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 220, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 2
channel = 1

[State 220, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 4
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 102 < 7, 7, fvar(11) * 102)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18 + 4 * var(9)
ground.slidetime = 18 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -5.39, -5.65
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 86), var(36) := -80
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 220, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(4) >= 0 && animelemtime(5) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 4, 10)
value = 220
elem = 5
ignorehitpause = 1

[State 220, Type]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I
[State 220, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;c.HP
[Statedef 221]
type = S
physics = S
movetype = A
anim = 221
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 221, Snd]
type = playsnd
trigger1 = animelem = 2 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 221, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 2
channel = 1

[State 221, Hit]
type = hitdef
triggerall = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
trigger2 = animelem = 4
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(animelemtime(4)>=0,58,29) < 7, 7, fvar(11) * ifelse(animelemtime(4)>=0,58,29))), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18 + 4 * var(9)
ground.slidetime = 18 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -3.24, -7.73
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 71), var(36) := -55
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 221, Type]
type = statetypeset
trigger1 = animelemtime(7) >= 0
movetype = I
[State 221, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;LK
[Statedef 230]
type = S
physics = S
movetype = A
anim = 230
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0
facep2 = 1

[State 230, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 200
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 230, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 3
channel = 1

[State 230, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 3)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 100), var(36) := -70
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 230, Type]
type = statetypeset
trigger1 = animelemtime(4) >= 0
movetype = I
[State 230, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;c.LK
[Statedef 231]
type = S
physics = S
movetype = A
anim = 231
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0
facep2 = 1

[State 231, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 231
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 231, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 3
channel = 1

[State 231, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 36 < 7, 7, fvar(11) * 36)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 3)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 39), var(36) := -69
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

;[State 231, Anim]
;type = changeanim
;trigger1 = movecontact = 1 && hitpausetime
;trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0
;trigger1 = hitpausetime <= ifelse(var(20), 2, 6)
;value = 231
;elem = 4
;ignorehitpause = 1

[State 231, Type]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I
[State 231, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;MK
[Statedef 240]
type = S
physics = S
movetype = A
anim = 240
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 240, PosAdd]
type = PosAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
x = 8

[State 240, Snd]
type = playsnd
trigger1 = animelem = 3 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 240, Snd]
type = playsnd
trigger1 = animelem = 4
value = 1, 4
channel = 1

[State 240, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 4
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 69 < 7, 7, fvar(11) * 69)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 15 + 3 * var(9)
ground.slidetime = 15 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -7.66*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -7.66*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 4)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 70), var(36) := -66
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

;[State 240, Anim]
;type = changeanim
;trigger1 = movecontact = 1 && hitpausetime
;trigger1 = animelemtime(4) >= 0 && animelemtime(5) <= 0
;trigger1 = hitpausetime <= ifelse(var(20), 3, 8)
;value = 240
;elem = 5
;ignorehitpause = 1

[State 240, Type]
type = statetypeset
trigger1 = animelemtime(7) >= 0
movetype = I
[State 240, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;c.MK
[Statedef 241]
type = S
physics = S
movetype = A
anim = 241
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 241, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 241, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 4
channel = 1

[State 241, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 66 < 7, 7, fvar(11) * 66)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 15 + 3 * var(9)
ground.slidetime = 15 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -7.66*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -7.66*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 4)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 97), var(36) := -55
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 241, Type]
type = statetypeset
trigger1 = animelemtime(4) >= 0
movetype = I
[State 241, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;HK
[Statedef 250]
type = S
physics = S
movetype = A
anim = 250
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 250, Snd]
type = playsnd
trigger1 = animelem = 5 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 250, Snd]
type = playsnd
trigger1 = animelem = 6
value = 1, 5
channel = 1

[State 250, Pos]
type = posadd
trigger1 = animelem = 2
x = 8
[State 250, Pos]
type = posadd
trigger1 = animelem = 3
x = 12
[State 250, Pos]
type = posadd
trigger1 = animelem = 4
x = 2
[State 250, Pos]
type = posadd
trigger1 = animelem = 5
x = 4
[State 250, Pos]
type = posadd
trigger1 = animelem = 6
x = 2
[State 250, Pos]
type = posadd
trigger1 = animelem = 7
x = 10
[State 250, Pos]
type = posadd
trigger1 = animelem = 8
x = 2
[State 250, Pos]
type = posadd
trigger1 = animelem = 9
x = 2
[State 250, Pos]
type = posadd
trigger1 = animelem = 10
x = 2

[State 250, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 6
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 95 < 7, 7, fvar(11) * 95)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18 + 4 * var(9)
ground.slidetime = 18 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 72), var(36) := -66
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 250, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(8) >= 0 && animelemtime(9) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 4, 10)
value = 250
elem = 9
ignorehitpause = 1

[State 250, Type]
type = statetypeset
trigger1 = animelemtime(7) >= 0
movetype = I
[State 250, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;c.HK
[Statedef 251]
type = S
physics = S
movetype = A
anim = 251
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 251, Snd]
type = playsnd
trigger1 = animelem = 2 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 251, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 5
channel = 1

[State 251, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 88 < 7, 7, fvar(11) * 88)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18 + 4 * var(9)
ground.slidetime = 18 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -5.39, -5.65
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 40), var(36) := -110
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 251, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(7) >= 0 && animelemtime(8) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 4, 10)
value = 251
elem = 8
ignorehitpause = 1

[State 251, Type]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I
[State 251, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;2LP
[Statedef 400]
type = C
physics = C
movetype = A
anim = 400
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0
facep2 = 1

[State 400, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 200
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 400, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 0
channel = 1

[State 400, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = C, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 22 < 7, 7, fvar(11) * 22)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 0)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 76), var(36) := -56
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 400, Type]
type = statetypeset
trigger1 = animelemtime(4) >= 0
movetype = I
[State 400, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;2MP
[Statedef 410]
type = C
physics = C
movetype = A
anim = 410
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 410, Snd]
type = playsnd
trigger1 = animelem = 3 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 410, Snd]
type = playsnd
trigger1 = animelem = 4
value = 1, 1
channel = 1

[State 410, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 4
forcenofall = !var(20)
attr = C, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 66 < 7, 7, fvar(11) * 66)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 15 + 3 * var(9)
ground.slidetime = 15 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -7.66*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -7.66*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 1)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 87), var(36) := -56
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 410, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 3, 8)
value = 410
elem = 4
ignorehitpause = 1


[State 410, Type]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I
[State 410, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1


;---------------------------------------------------------------------------
;2HP
[Statedef 420]
type = C
physics = C
movetype = A
anim = 420
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 420, Snd]
type = playsnd
trigger1 = animelem = 3 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 420, Snd]
type = playsnd
trigger1 = animelem = 4
value = 1, 2
channel = 1

[State 420, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 4
forcenofall = !var(20)
attr = C, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 95 < 7, 7, fvar(11) * 95)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18 + 4 * var(9)
ground.slidetime = 18 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -3.23, -7.73
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 80), var(36) := -56
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 420, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 4, 10)
value = 420
elem = 4
ignorehitpause = 1

[State 420, Type]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I
[State 420, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;23HP
[Statedef 425]
type = C
physics = C
movetype = A
anim = 425
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 420, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 420, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 2
channel = 1

[State 420, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
forcenofall = !var(20)
attr = C, NA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 86 < 7, 7, fvar(11) * 86)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18 + 4 * var(9)
ground.slidetime = 18 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -3.23, -7.73
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := ifelse(animelemtime(4)>=0,10,55)), var(36) := ifelse(animelemtime(4)>=0,103,-80)
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 420, Type]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I
[State 420, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;2LK
[Statedef 430]
type = C
physics = C
movetype = A
anim = 430
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0
facep2 = 1

[State 430, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 200
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 430, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 3
channel = 1

[State 430, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = C, NA
hitflag = MAF
guardflag = L
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 15 < 7, 7, fvar(11) * 15)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 3)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 68), var(36) := -8
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 430, Type]
type = statetypeset
trigger1 = animelemtime(4) >= 0
movetype = I
[State 430, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;2MK
[Statedef 440]
type = C
physics = C
movetype = A
anim = 440
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 440, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 440, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 4
channel = 1

[State 440, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
forcenofall = !var(20)
attr = C, NA
hitflag = MAF
guardflag = L
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 58 < 7, 7, fvar(11) * 58)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 15 + 3 * var(9)
ground.slidetime = 15 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -7.66*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -7.66*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 4)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 76), var(36) := -8
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 440, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 3, 8)
value = 440
elem = 4
ignorehitpause = 1

[State 440, Type]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I
[State 440, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;2HK
[Statedef 450]
type = C
physics = C
movetype = A
anim = 450
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 18 * !var(20)
facep2 = 1

[State 450, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 450, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 5
channel = 1

[State 450, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 3
attr = C, NA
hitflag = MAF
guardflag = L
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 88 < 7, 7, fvar(11) * 88)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Trip
air.type = Trip
ground.hittime = 18 + 4 * var(9)
ground.slidetime = 18 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
ground.velocity = -1, -8.24
ground.cornerpush.veloff = 0
guard.velocity = -8.125*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -1, -8.24
air.cornerpush.veloff = 0
yaccel = 0.677
fall = 1
fall.recover = 1
fall.recovertime = 120;33
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 100), var(36) := -54
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 450, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(4) >= 0 && animelemtime(5) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 4, 10)
value = 450
elem = 5
ignorehitpause = 1

[State 450, Type]
type = statetypeset
trigger1 = animelemtime(7) >= 0
movetype = I
[State 450, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;j.LP
[Statedef 600]
type = A
physics = N
movetype = A
anim = 600
ctrl = 0
sprpriority = 1
poweradd = 0

[State 600, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 200
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 600, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 0
channel = 1

[State 600, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = A, NA
hitflag = MAF
guardflag = HA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 36 < 7, 7, fvar(11) * 36)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
airguard.ctrltime = 16
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.36
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;16 + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 0)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 53), var(36) := -67
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 600, Type]
type = statetypeset
trigger1 = animelemtime(9) >= 0
movetype = I

[State 600, Accel]
type = gravity
trigger1 = time >= 0
[State 600, End]
type = changestate
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
;j.MP
[Statedef 610]
type = A
physics = N
movetype = A
anim = 610
ctrl = 0
sprpriority = 1
poweradd = 18 * !var(20)

[State 610, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 610, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 1
channel = 1

[State 610, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = A, NA
hitflag = MAF
guardflag = HA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 66 < 7, 7, fvar(11) * 66)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.hittime = 12 + 3 * var(9)
ground.slidetime = 12 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
airguard.ctrltime = 16
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;16 + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 4)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 52), var(36) := -44
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 610, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(4) >= 0 && animelemtime(5) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 3, 8)
value = 610
elem = 5
ignorehitpause = 1

[State 610, Type]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I

[State 610, Accel]
type = gravity
trigger1 = time >= 0
[State 610, End]
type = changestate
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
;j.HP
[Statedef 620]
type = A
physics = N
movetype = A
anim = 620
ctrl = 0
sprpriority = 1
poweradd = 18 * !var(20)

[State 620, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 620, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 2
channel = 1

[State 620, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = A, NA
hitflag = MAF
guardflag = HA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 88 < 7, 7, fvar(11) * 88)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 4 * var(9)
ground.slidetime = 12 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
airguard.ctrltime = 16
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;16 + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 52), var(36) := -44
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 620, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(4) >= 0 && animelemtime(5) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 4, 10)
value = 620
elem = 5
ignorehitpause = 1

[State 620, Type]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I

[State 620, Accel]
type = gravity
trigger1 = time >= 0
[State 620, End]
type = changestate
trigger1 = pos y > -vel y
value = 52
;---------------------------------------------------------------------------
;j.LK
[Statedef 630]
type = A
physics = N
movetype = A
anim = 630
ctrl = 0
sprpriority = 1
poweradd = 0

[State 630, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 200
value = 4, ifelse(random < 500, 0, 1)
channel = 0
[State 630, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 3
channel = 1

[State 630, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = A, NA
hitflag = MAF
guardflag = HA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 44 < 7, 7, fvar(11) * 44)), 0
getpower = 72 * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 2 * var(9)
ground.slidetime = 12 + 2 * var(9)
guard.hittime = 12
air.hittime = 120
airguard.ctrltime = 16
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -3.23, -7.73
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;16 + ifelse(var(20), 4, 8)
hitsound = -1 + 0 * (var(31) := 3)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 56), var(36) := -112
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 630, Type]
type = statetypeset
trigger1 = animelemtime(8) >= 0
movetype = I

[State 630, Accel]
type = gravity
trigger1 = time >= 0
[State 630, End]
type = changestate
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
;j.MK
[Statedef 640]
type = A
physics = N
movetype = A
anim = 640
ctrl = 0
sprpriority = 1
poweradd = 18 * !var(20)

[State 640, Snd]
type = playsnd
trigger1 = animelem = 1 && random < 350
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 640, Snd]
type = playsnd
trigger1 = animelem = 2
value = 1, 4
channel = 1

[State 640, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 2
forcenofall = !var(20)
attr = A, NA
hitflag = MAF
guardflag = HA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 58 < 7, 7, fvar(11) * 58)), 0
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 3 * var(9)
ground.slidetime = 12 + 3 * var(9)
guard.hittime = 15
air.hittime = 120
airguard.ctrltime = 16
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -3.23, -7.73
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;16 + ifelse(var(20), 5, 10)
hitsound = -1 + 0 * (var(31) := 4)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8011)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 75), var(36) := -55
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 640, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(4) >= 0 && animelemtime(5) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 3, 8)
value = 640
elem = 5
ignorehitpause = 1

[State 640, Type]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I

[State 640, Accel]
type = gravity
trigger1 = time >= 0
[State 640, End]
type = changestate
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
;j.HK
[Statedef 650]
type = A
physics = N
movetype = A
anim = 650
ctrl = 0
sprpriority = 1
poweradd = 18 * !var(20)

[State 650, Snd]
type = playsnd
trigger1 = animelem = 4 && random < 500
value = 4, ifelse(random < 500, 1, 2)
channel = 0
[State 650, Snd]
type = playsnd
trigger1 = animelem = 5
value = 1, 5
channel = 1

[State 650, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 5
forcenofall = !var(20)
attr = A, NA
hitflag = MAF
guardflag = HA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 88 < 7, 7, fvar(11) * 88)), 0
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 4 * var(9)
ground.slidetime = 12 + 4 * var(9)
guard.hittime = 18
air.hittime = 120
airguard.ctrltime = 16
ground.velocity = -5.77*(ifelse(var(20),.5,1)), 0
ground.cornerpush.veloff = 0
guard.velocity = -5.77*(ifelse(var(20),.5,1))
guard.cornerpush.veloff = 0
air.velocity = -6.46, -5.25
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;16 + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 76), var(36) := -33
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48

[State 650, Anim]
type = changeanim
trigger1 = movecontact = 1 && hitpausetime
trigger1 = animelemtime(5) >= 0 && animelemtime(6) <= 0
trigger1 = hitpausetime <= ifelse(var(20), 4, 10)
value = 650
elem = 6
ignorehitpause = 1

[State 650, Type]
type = statetypeset
trigger1 = animelemtime(7) >= 0
movetype = I

[State 650, Accel]
type = gravity
trigger1 = time >= 0
[State 650, End]
type = changestate
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
;Dodge
[Statedef 700]
type = S
physics = S
movetype = I
anim = 700
ctrl = 0
velset = 0, 0
sprpriority = -2

[State 700, Snd]
type = playsnd
trigger1 = animelem = 1
value = 4, 0
channel = 0
[State 700, Snd]
type = playsnd
trigger1 = animelem = 1
value = 1, 3

[State 700, Push]
type = playerpush
trigger1 = 1
value = 0
[State 700, HB]
type = hitby
trigger1 = 1
value = SCA, AT
time = 1

[State 700, Attack]
type = changestate
trigger1 = !AIlevel && (time = [15, 25])
trigger1 = command = "x" || command = "y" || command = "z" || command = "a" || command = "b" || command = "c"
value = ifelse((command = "x" || command = "y" || command = "z"), 425, 250)
[State 700, Attack]
type = changestate
trigger1 = AIlevel && (time = [15, 25]) && numenemy
trigger1 = (enemynear, movetype != A) && (p2bodydist x = [ -60, 60]) && (p2dist y >= -60)
value = ifelse(random < 666, 211, 240)

[State 700, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Roll Forward
[Statedef 710]
type = S
physics = N
movetype = I
anim = 710
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 710, Push]
type = playerpush
trigger1 = 1
value = 0
[State 710, HB]
type = hitby
trigger1 = animelemtime(7) < 0
value = SCA, AT
time = 1

[State 710, Snd]
type = playsnd
trigger1 = animelem = 1
value = 4, ifelse(random < 500, 1, 3)
channel = 0
[State 710, Snd]
type = playsnd
trigger1 = animelem = 2
value = 0, 102

[State 710, Vel]
type = velset
trigger1 = animelem = 2
x = 4.76
[State 710, Vel]
type = velset
trigger1 = animelem = 8
x = 0

[State 710, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Roll Backward
[Statedef 715]
type = S
physics = N
movetype = I
anim = 715
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 715, Push]
type = playerpush
trigger1 = 1
value = 0
[State 715, HB]
type = hitby
trigger1 = animelemtime(7) < 0
value = SCA, AT
time = 1

[State 715, Snd]
type = playsnd
trigger1 = animelem = 1
value = 4, ifelse(random < 500, 1, 3)
channel = 0
[State 715, Snd]
type = playsnd
trigger1 = animelem = 2
value = 0, 102

[State 715, Vel]
type = velset
trigger1 = animelem = 2
x = -4.76
[State 715, Vel]
type = velset
trigger1 = animelem = 8
x = 0

[State 715, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Power Charge
[Statedef 730]
type = S
physics = S
movetype = I
anim = 730
velset = 0, 0
ctrl = 0

[State 730, Power]
type = poweradd
triggerall = power < const(data.power) && power < powermax
trigger1 = !AIlevel && (command = "holdb" && command = "holdy")
trigger2 = AIlevel
value = 2 + ifelse(time < 60, 0, (time -60) / 12)

[State 730, Snd]
type = playsnd
trigger1 = !time
value = 4, 5
channel = 0
[State 730, Flash]
type = palfx
trigger1 = 1
time = 1
add = 75 + ceil(sin(time / 6.0 * pi) * 75), 25 + ceil(sin(time / 6.0 * pi) * 25), 0

[State 730, FX]
type = helper
trigger1 = !numhelper(8330)
helpertype = normal
stateno = 8330
ID = 8330
name = "Power Charge"
postype = p1
pausemovetime = 65535
supermovetime = 65535
ownpal = 1
[State 730, FX]
type = helper
trigger1 = !numhelper(8331)
helpertype = normal
stateno = 8331
ID = 8331
name = "Particles"
postype = p1
pausemovetime = 65535
supermovetime = 65535
ownpal = 1

[State 730, End]
type = changestate
trigger1 = power >= const(data.power) || power >= powermax || roundstate != 2
trigger2 = !AIlevel && (command != "holdb" || command != "holdy")
trigger3 = AIlevel && (inguarddist || p2bodydist x <= 120)
value = 731
ctrl = 1


;--- END ---
[Statedef 731]
type = S
physics = S
movetype = I
anim = 731
velset = 0, 0
ctrl = 1
[State 731, Snd]
type = stopsnd
trigger1 = !time
channel = 0
[State 730, Snd]
type = playsnd
trigger1 = !time && power >= const(data.power)
value = 6, 7
channel = 0
persistent = 0
[State 730, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Zero Counter
[Statedef 750]
type = S
physics = S
movetype = I
anim = 750
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = -1000
facep2 = 1

[State 750, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = (command = "412k")
ignorehitpause = 1
[State 750, Button AI]
type = varset
trigger1 = !time && AIlevel
var(10) = ifelse((p2statetype = A), 0, ifelse((p2statetype = C), 1, ifelse(random < 500, 0, 1)))
ignorehitpause = 1

[State 750, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 750, Stop]
type = posfreeze
trigger1 = 1
value = 1

[State 750, Snd]
type = playsnd
trigger1 = !time
value = 4, 0
channel = 0

[State 750, SuperPause FX]
type = helper
trigger1 = !time
helpertype = normal
stateno = 8350
ID = 8350
name = "Zero Counter"
postype = p1
pos = 25, -63
supermovetime = 255
ownpal = 1
[State 750, Super Pause]
type = superpause
trigger1 = !time
time = 15
movetime = 15
p2defmul = 1
anim = -1
sound = s0, 750
darken = 0

[State 750, End]
type = changestate
trigger1 = time >= 15
value = ifelse(var(10) = 1, 2910, 2900)


;====================< PARRY >====================
;--- STANDING ---
[Statedef 760]
type = S
physics = S
movetype = I
anim = 760
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = 78
facep2 = 1

[State 760, HB]
type = hitby
trigger1 = 1
value = SCA, AT
time = 1
[State 760, Pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15
pausebg = 0

[State 760, Stop]
type = posfreeze
trigger1 = 1
value = 1
[State 760, No walking]
type = varset
trigger1 = 1
var(26) = 7

[State 760, Snd]
type = playsnd
trigger1 = !time
value = 4, 6
channel = 0
[State 760, Snd]
type = playsnd
trigger1 = !time
value = 0, 760

[State 760, Flash]
type = palfx
trigger1 = !time
add = 0, 64, 255
sinadd = 0, -64, -255, 60
time = 15
[State 760, FX]
type = explod
trigger1 = !time
anim = 8360
sprpriority = 5
postype = p1
pos = ceil(23 * const(size.xscale)), ceil(-76 * const(size.yscale))
pausemovetime = -1
supermovetime = -1
scale = 0.5, 0.5
ownpal = 1
[State 760, Shake]
type = envshake
trigger1 = !time
time = 0
ampl = 0

[State 760, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1


;--- CROUCHING ---
[Statedef 761]
type = C
physics = C
movetype = I
anim = 761
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = 78
facep2 = 1

[State 761, HB]
type = hitby
trigger1 = 1
value = SCA, AT
time = 1
[State 761, Pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15
pausebg = 0

[State 761, Stop]
type = posfreeze
trigger1 = 1
value = 1
[State 761, No walking]
type = varset
trigger1 = 1
var(26) = 7

[State 761, Snd]
type = playsnd
trigger1 = !time
value = 4, 6
channel = 0
[State 761, Snd]
type = playsnd
trigger1 = !time
value = 0, 760

[State 761, Flash]
type = palfx
trigger1 = !time
add = 0, 64, 255
sinadd = 0, -64, -255, 60
time = 15
[State 761, FX]
type = explod
trigger1 = !time
anim = 8360
sprpriority = 5
postype = p1
pos = ceil(23 * const(size.xscale)), ceil(-48 * const(size.yscale))
pausemovetime = -1
supermovetime = -1
scale = 0.5, 0.5
ownpal = 1
[State 761, Shake]
type = envshake
trigger1 = !time
time = 0
ampl = 0

[State 761, End]
type = changestate
trigger1 = !animtime
value = 11
ctrl = 1


;--- JUMPING ---
[Statedef 762]
type = A
physics = N
movetype = I
anim = 762
ctrl = 0
sprpriority = 2
poweradd = 78
facep2 = 1

[State 762, HB]
type = hitby
trigger1 = 1
value = SCA, AT
time = 1
[State 762, Pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15
pausebg = 0
[State 762, Stop]
type = posfreeze
trigger1 = 1
value = 1

[State 762, Snd]
type = playsnd
trigger1 = !time
value = 4, 6
channel = 0
[State 762, Snd]
type = playsnd
trigger1 = !time
value = 0, 760

[State 762, Flash]
type = palfx
trigger1 = !time
add = 0, 64, 255
sinadd = 0, -64, -255, 60
time = 15
[State 762, FX]
type = explod
trigger1 = !time
anim = 8360
sprpriority = 5
postype = p1
pos = ceil(16 * const(size.xscale)), ceil(-84 * const(size.yscale))
pausemovetime = -1
supermovetime = -1
scale = 0.5, 0.5
ownpal = 1
[State 762, Shake]
type = envshake
trigger1 = !time
time = 0
ampl = 0

[State 762, End]
type = changestate
trigger1 = !animtime
value = 763
ctrl = 1

[Statedef 763]
type = A
physics = N
movetype = I
anim = 763
ctrl = 1
[State 763, Vel]
type = velset
trigger1 = !time
x = ifelse(vel x > 2, 2, ifelse(vel x < -2, -2, vel x))
y = ifelse(vel y < -2, vel y, -2)
[State 763, Accel]
type = gravity
trigger1 = 1
[State 763, Land]
type = changestate
trigger1 = pos y > -vel y
value = 52


;--- HELPER ---
[Statedef 765]
type = A
physics = N
movetype = I
anim = ifelse(root, statetype = C, 766, ifelse(root, statetype = A, 767, 765))
velset = 0, 0
ctrl = 0
[State 765, NHB]
type = nothitby
trigger1 = 1
value = SCA
[State 765, Bind]
type = bindtoroot
trigger1 = 1
time = -1

[State 765, Anim]
type = changeanim
triggerall = !time
trigger1 = !(root, AIlevel) && root, command = "down"
trigger2 = root, AIlevel && (root, statetype != A) && p2statetype = C
value = 766
[State 765, Anim]
type = changeanim
triggerall = !time
trigger1 = !(root, AIlevel) && root, command = "fwd"
trigger2 = root, AIlevel && anim != 766
value = ifelse((root, statetype = A), 767, 765)
[State 765, Anim]
type = changeanim
trigger1 = anim = 765 || anim = 767
value = ifelse((root, statetype = A), 767, 765)

[State 765, Disable]
type = varset
trigger1 = time >= ifelse((root, statetype = A), 7, 8)
trigger2 = facing != (root, facing)
trigger3 = !(root, ctrl)
trigger3 = (root, stateno != [760, 762]) && (root, stateno != 5120)
var(0) = 1
[State 765, Disable]
type = varset
triggerall = !(root, AIlevel)
trigger1 = (root, command = "holdback")
trigger2 = time < 4 && (root, command = "holdfwd" + root, command = "holddown") > 1
trigger3 = time >= 4 && (root, command = "holdfwd" || root, command = "holddown")
trigger4 = time >= 1 && (((anim = 765 || anim = 767) && root, command = "fwd") || (anim = 766 && root, command = "down"))
var(0) = 1
[State 765, Disable]
type = changeanim
trigger1 = var(0) = 1
value = 9741

[State 765, Standing /air]
type = reversaldef
trigger1 = !var(0) && (anim = 765 || anim = 767)
trigger1 = (root, stateno != 5120) || !(root, animtime)
reversal.attr = SCA, AA
p1stateno = 766
pausetime = 0, 0
sparkno = -1
numhits = 0

[State 765, Crouching]
type = reversaldef
trigger1 = !var(0) && anim = 766
reversal.attr = SC, AA
p1stateno = 766
pausetime = 0, 0
sparkno = -1
numhits = 0

[State 765, Disable]
type = reversaldef
trigger1 = var(0) = 1
reversal.attr = 
pausetime = 0, 0
sparkno = -1
numhits = 0

[State 765, End]
type = destroyself
trigger1 = time >= 18
trigger2 = (root, movetype != I)
trigger3 = !(root, ctrl) && (root, stateno != [760, 762]) && (root, stateno != 5120)
trigger4 = (root, stateno = [760, 762]) && (root, time <= 1)


;--- Success ---
[Statedef 766]
movetype = I
ctrl = 0
[State 766, Disable]
type = varset
trigger1 = 1
var(0) = 1
[State 766, End]
type = destroyself
trigger1 = root, stateno = [760, 762]
trigger2 = time >= 2

;---------------------------------------------------------------------------
;Throw Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = (command = "kk")
[State 800, Button AI]
type = varset
trigger1 = !time && AIlevel
var(10) = (random < 500)

[State 800, Tech Hit]
type = varset
trigger1 = 1
var(19) = 0
[State 800, Tech Hit]
type = varset
trigger1 = numenemy
trigger1 = enemynear, statetype != A
trigger1 = (enemynear, stateno = [0, 999]) && (enemynear, stateno != [100, 119]) && (enemynear, stateno != [200, 799])
var(19) = 7

[State 800, Do not guard]
type = attackdist
trigger1 = 1
value = 0

[State 800, Hit]
type = hitdef
trigger1 = animelem = 2
trigger1 = !var(38)
attr = S, NT
hitflag = M-
priority = 1, Miss
getpower = 0, 0
givepower = 0, 0
sparkno = -1 + 0 * (var(33) := 0)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 40), var(36) := -50
hitsound = -1 + 0 * (var(31) := 800)
guardsound = -1 + 0 * (var(32) := 0)
fall = 1
fall.recover = 1
numhits = 0
p1stateno = ifelse(command = "holdback", 805, 820)

[State 800, Hit]
type = hitdef
trigger1 = animelem = 2 && var(10)
trigger1 = !var(38)
attr = S, NT
hitflag = M-
priority = 1, Miss
getpower = 0, 0
givepower = 0, 0
sparkno = -1 + 0 * (var(33) := 0)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 40), var(36) := -50
hitsound = -1 + 0 * (var(31) := 800)
guardsound = -1 + 0 * (var(32) := 0)
fall = 1
fall.recover = 1
numhits = 0
p1stateno = ifelse(command = "holdback", 810, 805)

[State 800, Snd]
type = playsnd
trigger1 = animelem = 3
value = 4, 800
channel = 0
[State 800, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 0
channel = 1

[State 800, Type]
type = statetypeset
trigger1 = animelemtime(3) >= 0
movetype = I
[State 800, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;--- PLAYER TURNS ---
[Statedef 805]
type = S
movetype = A
physics = S
anim = 805
ctrl = 0
sprpriority = 0

[State 805, Throw]
type = targetstate
trigger1 = !time && numtarget
value = 806
[State 805, Throw]
type = targetfacing
trigger1 = !time && numtarget
value = -1

[State 805, Width]
type = width
trigger1 = 1
edge = 24, 24

[State 805, Turn]
type = turn
trigger1 = animelem = 3
[State 805, facing]
type = targetfacing
trigger1 = 1
value = -1

[State 805, Tech Hit]
type = changestate
trigger1 = numtarget && var(19)
trigger1 = (target, command = "holdfwd" || target, command = "holdback") && target, command != "holdup" && target, command != "holddown"
trigger1 = (target, command = "b" || target, command = "c" || target, command = "y" || target, command = "z")
value = 890
[State 805, Tech Hit]
type = varadd
trigger1 = var(19) > 0
var(19) = -1

[State 805, Bind 1]
type = targetbind
trigger1 = animelemtime(2) < 0 || animelemtime(4) >= 0
pos = ceil(34 * const(size.xscale)), 0
[State 805, Bind 2]
type = targetbind
trigger1 = animelemtime(2) >= 0 && animelemtime(4) < 0
pos = ceil(11 * const(size.xscale)), 0

[State 805, Spr]
type = sprpriority
trigger1 = animelemtime(2) < 0 || animelemtime(4) >= 0
value = 1
[State 805, spr]
type = sprpriority
trigger1 = animelemtime(2) >= 0 && animelemtime(4) < 0
value = -1

[State 805, End]
type = changestate
trigger1 = !numtarget
value = 0
ctrl = 1
[State 805, End]
type = changestate
trigger1 = animelemtime(4) >= 0
value = ifelse(var(10), 810, 820)


;--- TARGET ---
[Statedef 806]
type = A
movetype = H
physics = N
velset = 0, 0
sprpriority = 0
[State 806, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 806, Anim]
type = changeanim2
trigger1 = !time
value = 806
[State 806, Camera]
type = screenbound
trigger1 = 1
value = 0
movecamera = 1, 1
[State 806, Safety]
type = selfstate
trigger1 = time >= 60
value = ifelse(pos y < 0, 5040, 0)
ctrl = 1

;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 0

[State 810, Safety]
type = changestate
trigger1 = !time && !numtarget
value = 0
ctrl = 1

[State 810, Tech Hit]
type = changestate
trigger1 = numtarget && var(19)
trigger1 = (target, command = "holdfwd" || target, command = "holdback") && target, command != "holdup" && target, command != "holddown"
trigger1 = (target, command = "b" || target, command = "c" || target, command = "y" || target, command = "z")
value = 890
[State 810, Tech Hit]
type = varadd
trigger1 = var(19) > 0
var(19) = -1

[State 0, Turn]
type = Turn
trigger1 = !time
[State 0, TargetFacing]
type = TargetFacing
trigger1 = !time
value = -1

[State 810, Throw]
type = targetstate
trigger1 = !time && numtarget
value = 815

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = -30, -73

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 10, -87

[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 37, -79

[State 810, Damage]
type = targetlifeadd
trigger1 = numtarget && animelem = 5
value = floor(ifelse(139 * fvar(11) < 7, -7, -139 * fvar(11)))

[State 810, Power]
type = targetpoweradd
trigger1 = numtarget && animelem = 5
value = 36
[State 810, Power]
type = poweradd
trigger1 = numtarget && animelem = 5 && !var(20)
value = 72

[State 810, Hit]
type = hitadd
trigger1 = numtarget && animelem = 5
value = 1
[State 810, Hitcount]
type = varadd
trigger1 = numtarget && animelem = 5
var(13) = 1

[State 810, TargetState]
type = TargetState
trigger1 = AnimElem = 4
value = 816

[State 810, SND]
type = PlaySnd
trigger1 = AnimElem = 3
value = 4, 3
channel = 0

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




;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 815]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 815

;[State 820, 2]
;type = SelfState
;trigger1 = !gethitvar(isbound)
;value = 5050

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw - thrown into the air
[Statedef 816]
type    = A
movetype= H
physics = N
velset = -4.5,-7
poweradd = 40

[State 816, Turn]
type = Turn
trigger1 = !time

[State 816, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = 5160

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .49

[State 816, Shake]
type = envshake
trigger1 = vel y > 0 && pos y >= -24
time = 14
ampl = -4
freq = 120

[State 816, Recover]
type = selfstate
trigger1 = alive
trigger1 = command = "recovery"
trigger1 = vel y > 0 && pos y >= const(movement.air.gethit.groundrecover.ground.threshold)
value = 5200

[State 816, End]
type = selfstate
trigger1 = vel y > 0 && pos y >= -24
value = 5100

;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent
[Statedef 820]
type    = S
movetype= A
physics = N
anim = 820
poweradd = 0

[State 810, Safety]
type = changestate
trigger1 = !time && !numtarget
value = 0
ctrl = 1

[State 810, Tech Hit]
type = changestate
trigger1 = numtarget && var(19)
trigger1 = (target, command = "holdfwd" || target, command = "holdback") && target, command != "holdup" && target, command != "holddown"
trigger1 = (target, command = "b" || target, command = "c" || target, command = "y" || target, command = "z")
value = 890
[State 810, Tech Hit]
type = varadd
trigger1 = var(19) > 0
var(19) = -1

[State 820, Throw]
type = targetstate
trigger1 = !time && numtarget
value = 825

[State 820, TargetBind]
type = TargetBind
trigger1 = animelem = 1
pos = 42,0
time = -1

[State 820, TargetBind]
type = TargetBind
trigger1 = animelem = 3
pos = 42,-16
time = -1

[State 0, TargetState]
type = TargetState
trigger1 = animelem = 4
value = 826

[State 820, TargetBind]
type = TargetBind
trigger1 = animelem = 4
pos = 58, -53
time = 1

[State 810, Sparks]
type = helper
trigger1 = AnimElem = 4
helpertype = normal
stateno = 8012
ID = 8000
name = "Spark"
postype = p1
pos = 42,-75
facing = -1
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1
[State 810, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2,2

[State 820, Damage]
type = targetlifeadd
trigger1 = numtarget && animelem = 4
value = floor(ifelse(139 * fvar(11) < 7, -7, -139 * fvar(11)))

[State 820, Power]
type = targetpoweradd
trigger1 = numtarget && animelem = 4
value = 36
[State 820, Power]
type = poweradd
trigger1 = numtarget && animelem = 4 && !var(20)
value = 72

[State 820, Hit]
type = hitadd
trigger1 = numtarget && animelem = 4
value = 1
[State 820, Hitcount]
type = varadd
trigger1 = numtarget && animelem = 4
var(13) = 1

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

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 825]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 825

;---------------------------------------------------------------------------
;P2 Throw State 2
[Statedef 826]
type    = A
movetype = H
physics = N
sprpriority = -1
velset = -5,-6.5

[State 902, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 5160

[State 903, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 903, Vel]
type = veladd
trigger1 = 1
y = .49

[State 903, EnvShake]
type = EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 20

[State 903, 2]
type = SelfState
trigger1 = time > 1
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;===========< Target Escaped >==========
[Statedef 890]
type = S
physics = N
movetype = I
anim = 5945
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 890, Bind]
type = targetbind
trigger1 = !time && numtarget
pos = 0, 0
[State 890, p2state]
type = targetstate
trigger1 = !time && numtarget
value = 895
[State 890, Throw]
type = targetfacing
trigger1 = !time && numtarget
value = -1

[State 890, Pos]
type = posadd
trigger1 = !time
x = 24

[State 890, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 890, Push]
type = playerpush
trigger1 = 1
value = 0

[State 890, Pos]
type = posset
trigger1 = !time
y = 0
[State 890, Vel]
type = velset
trigger1 = 1
x = -1.425
y = 0

[State 890, Snd]
type = playsnd
trigger1 = animelem = 2
value = 5000, 2
channel = 0

[State 890, FX]
type = playsnd
trigger1 = !time
value = 0, 760

[State 890, FX]
type = helper
trigger1 = !time
helpertype = normal
stateno = 8000
ID = 8000
name = "Spark"
postype = p1
pos = 0, -48
facing = -1
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
pausemovetime = 65535
supermovetime = 65535

[State 890, End]
type = changestate
trigger1 = time >= 27
value = 0
ctrl = 1


;--- TARGET ---
[Statedef 895]
type = S
physics = N
movetype = I
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 895, Anim]
type = changeanim
trigger1 = !time
value = ifelse(selfanimexist(5945), 5945, 130)
[State 895, Anim]
type = changeanim
trigger1 = !time && !selfanimexist(5945) && selfanimexist(5910)
value = 5910
[State 895, Anim]
type = changeanim
trigger1 = time >= 20 && anim = 130
value = 140

[State 895, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 895, Push]
type = playerpush
trigger1 = 1
value = 0

[State 895, Pos]
type = posset
trigger1 = !time
y = 0
[State 895, Vel]
type = velset
trigger1 = 1
x = -1.425
y = 0

[State 895, End]
type = selfstate
trigger1 = time >= 27
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Ground Custom Combo
[Statedef 900]
type = S
physics = S
movetype = A
anim = 900
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = -1000

[State 900, Corner Push]
type = varset
trigger1 = time = 4
fvar(5) = 0
[State 900, Unguardable]
type = varset
trigger1 = time = 4 && numenemy
trigger1 = (enemynear, stateno != [120, 155])
var(17) = 30

[State 900, NHB]
type = nothitby
trigger1 = !time
value = SCA
time = 38
[State 900, Stop]
type = posfreeze
trigger1 = 1
value = 1
[State 900, Var]
type = varset
trigger1 = time >= 4
var(20) = 180

[State 900, Snd]
type = playsnd
trigger1 = time = 4
value = 4, 1
channel = 0

[State 900, SuperPause FX]
type = helper
trigger1 = time = 4
helpertype = normal
stateno = 8400
ID = 8400
name = "Custom Combo Startup"
postype = p1
pos = -20, -69
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 900, Super Pause]
type = superpause
trigger1 = time = 4
time = 30
movetime = 30
anim = -1
sound = s0, 900
p2defmul = 1
darken = 0

[State 900, AfterImage]
type = afterimage
trigger1 = !animtime
time = 2
timegap = 1
framegap = 4
length = 13
palbright = 0, 0, 0
palcontrast = 64, 128, 192
palpostbright = 0, 0, 0
paladd = 0, 0, 0
palmul = 0.75, 0.75, 0.75
trans = add1

[State 900, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Air Custom Combo
[Statedef 905]
type = A
physics = N
movetype = A
anim = 905
ctrl = 0
sprpriority = 2
poweradd = -1000

[State 905, Corner Push]
type = varset
trigger1 = time = 4
fvar(5) = 0
[State 905, Unguardable]
type = varset
trigger1 = time = 4 && numenemy
trigger1 = (enemynear, stateno != [120, 155])
var(17) = 30

[State 905, NHB]
type = nothitby
trigger1 = !time
value = SCA
time = 38
[State 905, Stop]
type = posfreeze
trigger1 = 1
value = 1
[State 905, Var]
type = varset
trigger1 = time >= 4
var(20) = 180

[State 905, Snd]
type = playsnd
trigger1 = time = 4
value = 6, 4
channel = 0

[State 905, SuperPause FX]
type = helper
trigger1 = time = 4
helpertype = normal
stateno = 8400
ID = 8400
name = "Custom Combo Startup"
postype = p1
pos = 5, -80
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 905, Super Pause]
type = superpause
trigger1 = time = 4
time = 30
movetime = 30
anim = -1
sound = s0, 900
p2defmul = 1
darken = 0

[State 905, AfterImage]
type = afterimage
trigger1 = !animtime
time = 2
timegap = 1
framegap = 4
length = 13
palbright = 0, 0, 0
palcontrast = 64, 128, 192
palpostbright = 0, 0, 0
paladd = 0, 0, 0
palmul = 0.75, 0.75, 0.75
trans = add1

[State 905, End]
type = changestate
trigger1 = !animtime
value = 906
ctrl = 1


[Statedef 906]
type = A
physics = N
movetype = I
anim = 906
ctrl = 1
[State 906, Accel]
type = gravity
trigger1 = 1
[State 906, Land]
type = changestate
trigger1 = pos y > -vel y
value = 52

;---------------------------------------------------------------------------
;Power Wave
[Statedef 1000]
type    = S
movetype= A
physics = N
poweradd = 72 * !var(20)
facep2 = 1
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 1

[State 1000, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = ifelse((command = "z" || command = "rlsz"), 2, ifelse((command = "y" || command = "rlsy"), 1, 0))
[State 1000, Button AI]
type = varset
trigger1 = !time && AIlevel
var(10) = ifelse(random < 500, 1, 0)
[State 1000, Anim]
type = changeanim
trigger1 = !time
value = anim + var(10)

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

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S7,0

[State 1000, FX]
type = helper
trigger1 = animelem = 4
helpertype = normal
stateno = 1010
name = "Power Wave FX"
postype = p1
size.xscale = 1 * const(size.xscale)
size.yscale = 1 * const(size.yscale)
ownpal = 1

[State 1000, Power Wave]
type = helper
trigger1 = animelem = 7
helpertype = normal
stateno = 1015
ID = 1015
name = "Power Wave"
postype = p1
pos = 50, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

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

;---------------------------------------------------------------------------
;Power Wave FX
[Statedef 1010]
type = A
physics = N
movetype = I
anim = 1010
velset = 0, 0
sprpriority = 2

[State 1010, Bind]
type = bindtoroot
trigger1 = 1
facing = 1
[State 1003, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 1003, End]
type = destroyself
trigger1 = !animtime || root, movetype = H
trigger2 = root, stateno != 1000 && root,stateno != 1050 && root,stateno != 3000 && root,stateno != 3050

;---------------------------------------------------------------------------
;Power Wave Projectile
[Statedef 1015]
type = S
physics = N
movetype = A
ctrl = 0
anim = 1015
sprpriority = 3

[State 1015, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA, AA, AP, AT
time = -1
stateno = 1017
ignorehitpause = 1
[State 1015, HB]
type = hitby
trigger1 = 1
value = SCA, NP, SP, HP
time = -1
ignorehitpause = 1

[State 1015, Anim]
type = changeanim
trigger1 = anim != 1015
value = 1015

[State 1005, Button]
type = varset
trigger1 = !time && !prevstateno
var(10) = root, var(10)

[State 1015, Vel]
type = velset
trigger1 = 1
x = ifelse(var(10) = 2, 8, ifelse(var(10) = 1, 6, 4))
y = 0

[State 1015, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 1015, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)

[State 1015, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1015, Miss]
type = hitdef
trigger1 = 1
attr = S, SP
hitflag = 
sparkxy = -10, 0

[State 1015, Hit]
type = hitdef
trigger1 = !(root, var(16)) && (root, var(15) < 1 || root, var(20))
attr = S, SP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10)=2,66,ifelse(var(10)=1, 58, 51)) < 7, 7, fvar(11) * ifelse(var(10)=2,66,ifelse(var(10)=1, 58, 51)))), 7
getpower = ifelse(!(root, var(13)), 144, 72) * !(root, var(20)), 36 * !(root, var(20))
givepower = 36, 36
pausetime = 0, ifelse((root, var(20)), 6, 12)
guard.pausetime = 0, ifelse((root, var(20)), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -10.52, 0
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.36
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
air.fall = 1
fall.recover = 1
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
sprpriority = 3

[State 1015, End]
type = changestate
trigger1 = movecontact
value = 1016
ignorehitpause = 1
[State 1015, End]
type = destroyself
trigger1 = pos x != [ -200, 200]


;--- Hitpause ---
[Statedef 1016]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3
movehitpersist = 1

[State 1006, Freeze]
type = posfreeze
trigger1 = 1
value = 1

[State 1006, HitSound]
type = playsnd
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
value = ifelse(moveguarded, 3, 2), ifelse(moveguarded, 0, 6)
channel = 2
ignorehitpause = 1

[State 1006, Spark]
type = helper
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = ifelse(moveguarded, 8001, 8013)
ID = 8000
name = "Spark"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), -8
facing = -1
ownpal = 1
size.xscale = 1
size.yscale = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, Counter FX]
type = helper
trigger1 = movecontact = 1 && numtarget && var(9)
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = 8290
ID = 8290
name = "Counter FX"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), -8
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, HitCount]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(13) = 1
[State 1006, Juggle]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(15) = 1

[State 1006, ProjContact]
type = varset
trigger1 = movecontact && numtarget
var(18) = 1
[State 1006, ProjContact]
type = parentvarset
trigger1 = movecontact && numtarget
trigger1 = root, stateno = 1000
var(18) = 1

[State 1006, End]
type = changestate
trigger1 = time >= 0
value = 1017


;--- Disappear ---
[Statedef 1017]
type = A
physics = N
movetype = A
anim = 1017
ctrl = 0
velset = 0, 0
sprpriority = 3
movehitpersist = 1

[State 1007, Sound]
type = playsnd
trigger1 = !time
value = 2, 6
channel = 2
volue = -128
lowpriority = 1

[State 1007, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1007, End]
type = changestate
trigger1 = !animtime
value = 1018


;--- Wait ---
[Statedef 1018]
type = A
physics = N
movetype = I
anim = 9741
ctrl = 0
velset = 0, 0

[State 1008, End]
type = destroyself
trigger1 = !numtarget
trigger2 = numtarget
trigger2 = target, time <= 1 && !(target, hitshakeover)

;---------------------------------------------------------------------------
;EX Power Wave
[Statedef 1050]
type    = S
movetype= A
physics = S
poweradd= -500
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 1
facep2 = 1

[State 1030, CC Juggle]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1
[State 1030, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 1030, ExFX]
type = varset
trigger1 = !time
var(25) = 30
[State 1030, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
[State 1030, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = -20, -92
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

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

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S7,0

[State 1000, FX]
type = helper
trigger1 = animelem = 4
helpertype = normal
stateno = 1010
name = "Power Wave FX"
postype = p1
size.xscale = 1 * const(size.xscale)
size.yscale = 1 * const(size.yscale)
ownpal = 1

[State 1000, Power Wave]
type = helper
trigger1 = animelem = 7
helpertype = normal
stateno = 1065
ID = 1065
name = "Power Wave"
postype = p1
pos = 50, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

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

;---------------------------------------------------------------------------
;Power Wave Projectile
[Statedef 1065]
type = S
physics = N
movetype = A
ctrl = 0
anim = 1015
sprpriority = 3
hitcountpersist = 1
velset = 0,0

[State 1015, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA, AA, AP, AT
time = -1
stateno = 1017
ignorehitpause = 1
[State 1015, HB]
type = hitby
trigger1 = 1
value = SCA, NP, SP, HP
time = -1
ignorehitpause = 1

[State 1015, Anim]
type = changeanim
trigger1 = anim != 1015
value = 1015

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = ifelse(vel x > 6,0,.33)

[State 1015, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 1015, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)

[State 1015, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1015, Miss]
type = hitdef
trigger1 = 1
attr = S, SP
hitflag = 
sparkxy = -10, 0

[State 1015, Hit]
type = hitdef
triggerall = !(root, var(16)) && (root, var(15) < 1 + hitcount)
trigger1 = !movecontact && !var(18)
trigger2 = var(18) < 3 && time = 11
attr = S, SP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 8
guard.pausetime = 0, 8
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = High
air.type = High
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -7.66, 0
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -7.66, 0
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
air.fall = 0
fall.recover = 1
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
forcestand = 1
sprpriority = 3
p2stateno = 1070

[State 1015, End]
type = changestate
trigger1 = movecontact
value = 1066
ignorehitpause = 1
[State 1015, End]
type = destroyself
trigger1 = pos x != [ -200, 200]


;Hitpause
[Statedef 1066]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3
movehitpersist = 1
hitcountpersist = 1

[State 1006, Freeze]
type = posfreeze
trigger1 = 1
value = 1

[State 1006, HitSound]
type = playsnd
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
value = ifelse(moveguarded, 3, 2), ifelse(moveguarded, 0, 6)
channel = 2
ignorehitpause = 1

[State 1006, Spark]
type = helper
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = ifelse(moveguarded, 8001, 8013)
ID = 8000
name = "Spark"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), -8
facing = -1
ownpal = 1
size.xscale = 1
size.yscale = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, Counter FX]
type = helper
trigger1 = movecontact = 1 && numtarget && var(9)
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = 8290
ID = 8290
name = "Counter FX"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), -8
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, HitCount]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(13) = 1
[State 1006, Juggle]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(15) = 1

[State 1006, ProjContact]
type = varadd
trigger1 = movecontact && numtarget
var(18) = 1
[State 1006, ProjContact]
type = parentvarset
trigger1 = movecontact && numtarget
trigger1 = root, stateno = 1000
var(18) = 1

[State 1006, End]
type = changestate
trigger1 = time >= 0
value = ifelse(var(18) > 2, 1067, 1065)


;Disappear
[Statedef 1067]
type = A
physics = N
movetype = A
anim = 1017
ctrl = 0
velset = 0, 0
sprpriority = 3
movehitpersist = 1

[State 1007, Sound]
type = playsnd
trigger1 = !time
value = 2, 6
channel = 2
volume = -128
lowpriority = 1

[State 1007, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1007, End]
type = changestate
trigger1 = !animtime
value = 1018

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

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

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
value = 5002

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

[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
value = 1071 ;Stand get-hit (knocked back)

;---------------------------------------------------------------------------
; Stand get-hit (knocked back)
[Statedef 1071]
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 = 5007

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= 18
x = .6

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

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

[State 5001, 6]
type = SelfState
trigger1 = time = 18
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Burn Knuckle
[Statedef 1100]
type    = S
movetype= A
physics = N
poweradd = 72 * !var(20)
facep2 = 1
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 1

[State 1000, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = ifelse((command = "z" || command = "rlsz"), 2, ifelse((command = "y" || command = "rlsy"), 1, 0))
[State 1000, Button AI]
type = varset
trigger1 = !time && AIlevel
var(10) = ifelse(random < 500, 1, 0)
[State 1000, Anim]
type = changeanim
trigger1 = !time
value = anim + var(10)

[State 1100, FX]
type = helper
trigger1 = animelem = 8
helpertype = normal
stateno = 1110
name = "Burn Knuckle FX"
postype = p1
size.xscale = .5 * const(size.xscale)
size.yscale = .5 * const(size.yscale)
ownpal = 1

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S5,1
channel = 0
[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S7,1

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(8) >= 0 
statetype = A       ;S,A,C,L
[State 1100, VelSet]
type = VelSet
trigger1 = animelemtime(8) = 0
x = 12*(5.0/4.0)
y = ifelse(var(10)=2,-0.625,ifelse(var(10)=1,-0.46875,-0.3125))*(5.0/4.0)

[State 1100, VelAdd]
type = VelAdd
trigger1 = animelemtime(8) > 0
y = 0.0625*(25.0/16.0)

[State 1100, Hit]
type = hitdef
trigger1 = animelemtime(8) >= 0 && !movecontact
trigger1 = !var(16) && (var(15) < 1 || var(20))
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10) = 2, 131, ifelse(var(10) = 1, 117, 102)) < 7, 7, fvar(11) * ifelse(var(10) = 2, 131, ifelse(var(10) = 1, 117, 102)))), 7
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -6, -3.671875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -6, -3.671875*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.328125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 87), var(36) := -78
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1100, Land]
type = changestate
trigger1 = animelemtime(8) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 1105

;---------------------------------------------------------------------------
;Land
[Statedef 1105]
type    = S
movetype= I
physics = N
velset = 0,0
anim = prevstateno + 5
ctrl = 0
sprpriority = 2

[State 1105, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1105, Snd]
type = playsnd
trigger1 = !time
value = 0, 52
[State 1105, Dust]
type = explod
trigger1 = !time
anim = 8102
sprpriority = -3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

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

;---------------------------------------------------------------------------
;Burn Knuckle FX
[Statedef 1110]
type = A
physics = N
movetype = I
anim = 1110
velset = 0, 0
sprpriority = 2

[State 1010, Bind]
type = bindtoroot
trigger1 = 1
facing = 1
[State 1003, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 1100, Explod]
type = Explod
trigger1 = !time
anim = 1111
pos = 0,0
postype = p1
ownpal = 1
bindtime = 1
removeongethit = 1
ID = 1111
sprpriority = 2
scale = .5,.5

[State 1003, End]
type = destroyself
trigger1 = root, movetype = H
trigger2 = root, stateno != 1150 && root,stateno != 1100

;---------------------------------------------------------------------------
;EX Burn Knuckle
[Statedef 1150]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= -500
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 1
facep2 = 1

[State 1030, CC Juggle]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1
[State 1030, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 1030, ExFX]
type = varset
trigger1 = !time
var(25) = 30
[State 1030, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
[State 1030, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = -20, -92
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1100, FX]
type = helper
trigger1 = animelem = 5
helpertype = normal
stateno = 1110
name = "Burn Knuckle FX"
postype = p1
size.xscale = .5 * const(size.xscale)
size.yscale = .5 * const(size.yscale)
ownpal = 1

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S5,1
channel = 0
[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S7,1

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(5) >= 0 
statetype = A       ;S,A,C,L
[State 1100, VelSet]
type = VelSet
trigger1 = animelemtime(5) = 0
x = 12*(5.0/4.0)
y = -0.78125*(5.0/4.0)

[State 1100, VelAdd]
type = VelAdd
trigger1 = animelemtime(5) > 0
y = 0.0625*(25.0/16.0)

[State 1100, Hit]
type = hitdef
trigger1 = animelemtime(5) >= 0 && !movecontact
trigger1 = !var(16) && (var(15) < 1)
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 160 < 7, 7, fvar(11) * 160)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 12,12
guard.pausetime = 12,12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -6, -4.0625*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -6, -4.0625*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.328125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 87), var(36) := -78
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1100, Land]
type = changestate
trigger1 = animelemtime(5) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 1105

;---------------------------------------------------------------------------
;Rising Tackle
[Statedef 1200]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd = 72 * !var(20)
facep2 = 1
velset = 0,0
anim = 1200
ctrl = 0
sprpriority = 2

[State 1200, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = ifelse((command = "z" || command = "rlsz"), 2, ifelse((command = "y" || command = "rlsy"), 1, 0))
[State 1200, Button AI]
type = varset
trigger1 = !time && AIlevel
var(10) = ifelse(random < 500, 1, 0)
[State 1200, Anim]
type = changeanim
trigger1 = !time
value = anim + var(10)

[State 0, PosAdd]
type = PosAdd
trigger1 = time < 1 && var(10) = 0
x = 8
[State 0, PosAdd]
type = PosAdd
trigger1 = time < 1 && var(10) = 1
x = ifelse(time = 0,10,8)
[State 0, PosAdd]
type = PosAdd
trigger1 = time < 2 && var(10) = 2
x = 8

[State 1200, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(6) >= 0 
statetype = A
[State 1200, VelSet]
type = VelSet
trigger1 = animelemtime(6) = 0
x = ifelse(var(10)=2,1,ifelse(var(10)=1,.5,0))*(5.0/4.0)
y = (-5-(var(10)*2))*(5.0/4.0)

[State 1200, VelAdd]
type = VelAdd
trigger1 = animelemtime(6) > 0
y = 0.375*(25.0/16.0)

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S5,2
channel = 0
[State 1200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 7
trigger3 = AnimElem = 9
trigger4 = AnimElem = 11 && var(10)
trigger5 = AnimElem = 13 && var(10)
trigger6 = AnimElem = 15 && var(10)
trigger7 = AnimElem = 17 && var(10) = 2
value = s1, 1

[State 1200, Dust]
type = helper
trigger1 = animelemtime(6) = 0
helpertype = normal
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1

[State 1100, Hit]
type = hitdef
trigger1 = animelem = 5
trigger1 = !var(16) && (var(15) < 1 || var(20))
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10), 58, 109) < 7, 7, fvar(11) * ifelse(var(10), 58, 109))), 7
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = ifelse(var(10),.5,-4), ifelse(var(10),-6.21875,-4.921875)*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = ifelse(var(10),.5,-4), ifelse(var(10),-6.21875,-4.59375)*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel =  0.328125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 87), var(36) := -78
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1100, Hit]
type = hitdef
triggerall = !var(16) && (var(15) < hitcount + 1 || var(20))
triggerall = var(10)
trigger1 = animelem = 6
trigger2 = animelem = 8
trigger3 = animelem = 10
trigger4 = animelem = 12
trigger5 = animelem = 14
trigger6 = animelem = 16 && var(10) = 2
attr = A, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 15 < 7, 7, fvar(11) * 15)), 7
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 1, 2), ifelse(var(20), 1, 2)
guard.pausetime = ifelse(var(20), 1, 2), ifelse(var(20), 1, 2)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -.5, -6.21875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -.5, -6.21875*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 87), var(36) := -78
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1200, Land]
type = changestate
trigger1 = animelemtime(6) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;EX Rising Tackle
[Statedef 1250]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd = -500
facep2 = 1
velset = 0,0
anim = 1250
ctrl = 0
sprpriority = 2

[State 1030, CC Juggle]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1
[State 1030, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = time < 2
x = 8

[State 1030, ExFX]
type = varset
trigger1 = !time
var(25) = 30
[State 1030, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
[State 1030, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = 20, -65
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1200, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(5) >= 0 
statetype = A
[State 1200, VelSet]
type = VelSet
trigger1 = animelemtime(5) = 0
x = 1*(5.0/4.0)
y = -9*(5.0/4.0)

[State 1200, VelAdd]
type = VelAdd
trigger1 = animelemtime(5) > 0
y = 0.375*(25.0/16.0)

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S5,2
channel = 0
[State 1200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 7
trigger3 = AnimElem = 9
trigger4 = AnimElem = 11 && var(10)
trigger5 = AnimElem = 13 && var(10)
trigger6 = AnimElem = 15 && var(10)
trigger7 = AnimElem = 17 && var(10) = 2
value = s1, 1

[State 1200, Dust]
type = helper
trigger1 = animelemtime(5) = 0
helpertype = normal
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1

[State 1100, Hit]
type = hitdef
triggerall = !var(16) && (var(15) < hitcount + 1 || var(20))
trigger1 = animelemtime(5)>=0
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 10 < 7, 7, fvar(11) * 10)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0,0
guard.pausetime = 0,0
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -.5, -6.21875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -.5, -6.21875*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 87), var(36) := -78
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1200, Land]
type = changestate
trigger1 = animelemtime(5) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Crack Shoot
[Statedef 1300]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd = 72 * !var(20)
facep2 = 1
velset = 0,0
anim = 1300
ctrl = 0
sprpriority = 1

[State 1300, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = ifelse((command = "c" || command = "rlsc"), 2, ifelse((command = "b" || command = "rlsb"), 1, 0))

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(1)=0
value = 5,3
channel = 0

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(3)=0
value = 0, 41

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(3)=0
value = 1, 5

[State 1300, FX]
type = helper
trigger1 = animelem = 3
helpertype = normal
stateno = 1310
name = "Crack Shoot FX"
postype = p1
size.xscale = .5 * const(size.xscale)
size.yscale = .5 * const(size.yscale)
ownpal = 1
pausemovetime = 0
supermovetime = 0
ignorehitpause = 0

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(3) >= 0 
statetype = A
[State 1300, VelSet]
type = VelSet
trigger1 = animelemtime(3) = 0
x = 4*(5.0/4.0)
y = (-6-var(10))*(5.0/4.0)
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(3) > 0
y = .5*(25.0/16.0)

[State 1100, Hit]
type = hitdef
trigger1 = animelemtime(3) >= 0 && !movecontact
trigger1 = !var(16) && (var(15) < 1 || var(20))
attr = A, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10) = 2, 88, ifelse(var(10) = 1, 80, 73)) < 7, 7, fvar(11) * ifelse(var(10) = 2, 88, ifelse(var(10) = 1, 80, 73)))), 7
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125, 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.24
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 63), var(36) := -63
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1300, ChangeState]
type = ChangeState
triggerall = animelemtime(3) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 1305

;---------------------------------------------------------------------------
;Crack Shoot Land
[Statedef 1305]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1305
ctrl = 0
sprpriority = 1

[State 1305, PosSet]
type = PosSet
trigger1 = !time
y = 0

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

;---------------------------------------------------------------------------
;Crack Shoot FX
[Statedef 1310]
type = A
physics = N
movetype = I
anim = 1310
velset = 0, 0
sprpriority = 2

[State 1310, Bind]
type = bindtoroot
trigger1 = 1
facing = 1
[State 1310, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 1310, End]
type = destroyself
trigger1 = root, movetype = H || !animtime
trigger2 = root, stateno != [1300,1350]

;---------------------------------------------------------------------------
;EX Crack Shoot
[Statedef 1350]
type    = S
movetype= A
physics = N
poweradd = -500
facep2 = 1
velset = 0,0
anim = 1300
ctrl = 0
sprpriority = 1

[State 1030, CC Juggle]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1
[State 1030, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 1030, ExFX]
type = varset
trigger1 = !time
var(25) = 30
[State 1030, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
[State 1030, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = 41, -72
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(1)=0
value = 5,3
channel = 0

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(3)=0
value = 0, 41

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(3)=0
value = 1, 5

[State 1300, FX]
type = helper
trigger1 = animelem = 3
helpertype = normal
stateno = 1310
name = "Crack Shoot FX"
postype = p1
size.xscale = .5 * const(size.xscale)
size.yscale = .5 * const(size.yscale)
ownpal = 1
pausemovetime = 0
supermovetime = 0
ignorehitpause = 0

[State 1300, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(3) >= 0 
statetype = A
[State 1300, VelSet]
type = VelSet
trigger1 = animelemtime(3) = 0
x = 5*(5.0/4.0)
y = -5*(5.0/4.0)
[State 1300, VelAdd]
type = VelAdd
trigger1 = animelemtime(3) > 0
y = .5*(25.0/16.0)

[State 1100, Hit]
type = hitdef
trigger1 = animelemtime(3) >= 0 && !movecontact
trigger1 = !var(16) && (var(15) < 1 || var(20))
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 88 < 7, 7, fvar(11) * 88)), 7
getpower = 0,0
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -.5, 3.5*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -.5, 3.5*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 120;37
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 63), var(36) := -63
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1300, ChangeState]
type = ChangeState
triggerall = animelemtime(3) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 1305

;---------------------------------------------------------------------------
;Power Dunk
[Statedef 1400]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd = 72 * !var(20)
facep2 = 1
velset = 0,0
anim = 1400
ctrl = 0
sprpriority = 1

[State 1400, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = ifelse((command = "c" || command = "rlsc"), 2, ifelse((command = "b" || command = "rlsb"), 1, 0))

[State 1400, Snd]
type = playsnd
trigger1 = animelem=1
value = 5, 4
channel = 0

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(4)=0
value = 0, 41
[State 1400, Dust]
type = helper
trigger1 = animelemtime(4)=0
helpertype = normal
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1

[State 1400, FX]
type = helper
trigger1 = animelemtime(9)=0
helpertype = normal
stateno = 1410
name = "Power Dunk FX"
postype = p1
size.xscale = .5 * const(size.xscale)
size.yscale = .5 * const(size.yscale)
ownpal = 1

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(9)=0
value = 7, 1

[State 1400, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(4) >= 0 
statetype = A
[State 1400, VelSet]
type = VelSet
trigger1 = animelemtime(4) = 0
x = 4*(5.0/4.0)
y = (-6-(var(10)*.75))*(5.0/4.0)
[State 1400, VelAdd]
type = VelAdd
trigger1 = animelemtime(4) > 0
y = ifelse(animelemtime(8)>0,.5,.25)*(25.0/16.0)
[State 1400, VelSet]
type = VelSet
trigger1 = animelemtime(8) = 0
x = 5*(5.0/4.0)

[State 1400, Hit]
type = hitdef
trigger1 = animelem = 3
trigger1 = !var(16) && (var(15) < 1 || var(20))
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 7
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -2*(5.0/4.0), ifelse(var(10)=2,-7.65625,-6.15625)*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), ifelse(var(10)=2,-7.65625,-6.15625)*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.34375*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 40), var(36) := -55
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1400, Hit]
type = hitdef
trigger1 = animelem = 11
trigger1 = !var(16) && (var(15) < 1 + hitcount || var(20))
attr = A, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10) = 2, 102, ifelse(var(10) = 1, 95, 88)) < 7, 7, fvar(11) * ifelse(var(10) = 2, 102, ifelse(var(10) = 1, 95, 88)))), 7
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -5*(5.0/4.0), 3.5*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -5*(5.0/4.0), 3.5*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.5*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 65), var(36) := -22
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1400, ChangeState]
type = ChangeState
triggerall = animelemtime(4) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 1405

;---------------------------------------------------------------------------
;Power Dunk Land
[Statedef 1405]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1405
ctrl = 0
sprpriority = 1

[State 1405, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1405, Snd]
type = playsnd
trigger1 = !time
value = 0, 52
[State 1405, Dust]
type = explod
trigger1 = !time
anim = 8102
sprpriority = -3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

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

;---------------------------------------------------------------------------
;Power Dunk FX
[Statedef 1410]
type = A
physics = N
movetype = I
anim = 1410
velset = 0, 0
sprpriority = 2

[State 1010, Bind]
type = bindtoroot
trigger1 = 1
facing = 1
[State 1003, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 1100, Explod]
type = Explod
trigger1 = !time
anim = 1411
pos = 0,0
postype = p1
ownpal = 1
bindtime = 1
removeongethit = 1
ID = 1411
sprpriority = 2
scale = .5,.5

[State 1411, End]
type = destroyself
trigger1 = root, movetype = H
trigger2 = root, stateno != 1400 && root,stateno != 1450

;---------------------------------------------------------------------------
;EX Power Dunk
[Statedef 1450]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= -500
velset = 0,0
anim = 1400
ctrl = 0
sprpriority = 1
facep2 = 1

[State 1030, CC Juggle]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1
[State 1030, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 1030, ExFX]
type = varset
trigger1 = !time
var(25) = 30
[State 1030, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
[State 1030, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = 18, -65
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1400, Snd]
type = playsnd
trigger1 = animelem=1
value = 5, 4
channel = 0

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(4)=0
value = 0, 41
[State 1400, Dust]
type = helper
trigger1 = animelemtime(4)=0
helpertype = normal
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1

[State 1400, FX]
type = helper
trigger1 = animelemtime(9)=0
helpertype = normal
stateno = 1410
name = "Power Dunk FX"
postype = p1
size.xscale = .5 * const(size.xscale)
size.yscale = .5 * const(size.yscale)
ownpal = 1

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(9)=0
value = 7, 1

[State 1400, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(4) >= 0 
statetype = A
[State 1400, VelSet]
type = VelSet
trigger1 = animelemtime(4) = 0
x = 4*(5.0/4.0)
y = -7.5*(5.0/4.0)
[State 1400, VelAdd]
type = VelAdd
trigger1 = animelemtime(4) > 0
y = ifelse(animelemtime(8)>0,.5,.25)*(25.0/16.0)
[State 1400, VelSet]
type = VelSet
trigger1 = animelemtime(8) = 0
x = 5*(5.0/4.0)

[State 1400, Hit]
type = hitdef
trigger1 = animelem = 3
trigger1 = !var(16) && (var(15) < 1 || var(20))
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 7
getpower = 0,0
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -2*(5.0/4.0), -7.65625*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -7.65625*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.34375*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 40), var(36) := -55
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1400, Hit]
type = hitdef
trigger1 = animelem = 11
trigger1 = !var(16) && (var(15) < 1 + hitcount || var(20))
id = 1450
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 102 < 7, 7, fvar(11) * 102)), 7
getpower = 0,0
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -5*(5.0/4.0), 3.5*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -5*(5.0/4.0), 3.5*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.5*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 120;37
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 65), var(36) := -22
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 0, TargetState]
type = TargetState
triggerall = NumTarget && !var(2)
trigger1 = Animelemtime(11) >= 0 && MoveHit
Value = 1455
[State 0, VarSet]
type = VarSet
trigger1 = Animelemtime(11) >= 0 && MoveHit
var(15)=0

[State 1400, ChangeState]
type = ChangeState
triggerall = animelemtime(4) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 1405

;---------------------------------------------------------------------------
;P2 State
[Statedef 1455]
type    = A
movetype= H
physics = N
velset = -5*(5.0/4.0),7*(5.0/4.0)

[State 1455, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5030

[State 1455, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.5*(25.0/16.0)

[State 1400, ChangeState]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1456

[Statedef 1456]
type    = A
movetype= H
physics = N

[State 1455, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5160

[State 1455, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1455, Vel]
type = veladd
trigger1 = 1
y = 0.3125*(25.0/16.0)
[State 1455, Vel]
type = velset
trigger1 = !time
x = -3.25*(5.0/4.0)
y = -6.25*(5.0/4.0)

[State 1455, End]
type = selfstate
trigger1 = vel y > 0
trigger1 = pos y > -vel y
value = 5100

;---------------------------------------------------------------------------
;Fire Kick
[Statedef 1500]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd = 72 * !var(20)
facep2 = 1
velset = 0,0
anim = 1500
ctrl = 0
sprpriority = 1

[State 1500, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = ifelse((command = "c" || command = "rlsc"), 2, ifelse((command = "b" || command = "rlsb"), 1, 0))
[State 1500, Anim]
type = changeanim
trigger1 = !time
value = anim + var(10)

[State 102, Snd]
type = playsnd
trigger1 = !time
value = 4,1
channel = 0

[State 102, Snd]
type = playsnd
trigger1 = animelem = 4
value = 0, 101
[State 102, Dust]
type = helper
trigger1 = animelem = 4
helpertype = normal
stateno = 8103
ID = 8100
name = "Dash Dust"
postype = p1
pausemovetime = 255
supermovetime = 255
ownpal = 1

[State 1500, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 9.625*(5.0/4.0)
[State 1500, VelAdd]
type = VelAdd
trigger1 = animelemtime(4) > 0
x = ifelse(vel x >=0,-0.4375,0)*(25.0/16.0)

[State 1500, VelSet]
type = VelSet
trigger1 = animelemtime(6) >= 0
x = 0

[State 1500, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 5
attr = S, SA
hitflag = MAF
guardflag = L
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10) = 2, 58,ifelse(var(10)=1,44, 22)) < 7, 7, ifelse(var(10) = 2, 58,ifelse(var(10)=1,40, 22)))), 11
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -4.32, 0
ground.cornerpush.veloff = 0
guard.velocity = -12.64
guard.cornerpush.veloff = 0
air.velocity = -4.32, -6.91
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120
forcestand = 1
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 60), var(36) := -8
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1500, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 1505
ctrl = 0

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

;---------------------------------------------------------------------------
;Fire Kick Hit
[Statedef 1505]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1505
ctrl = 0
sprpriority = 1

[State 102, Snd]
type = playsnd
trigger1 = !time
value = 4,2
channel = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
x = 12

[State 102, Snd]
type = playsnd
trigger1 = animelem = 4
value = 1,5

[State 1500, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 5
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 11
getpower = ifelse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -2.16, -11.36
ground.cornerpush.veloff = 0
guard.velocity = -12.64
guard.cornerpush.veloff = 0
air.velocity = -4.32, -6.91
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 85), var(36) := -100
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
[State 0, VarSet]
type = VarSet
trigger1 = movehit
var(15) = 0


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

;---------------------------------------------------------------------------
;EX Fire Kick
[Statedef 1550]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd = -500
facep2 = 1
velset = 0,0
anim = 1550
ctrl = 0
sprpriority = 1

[State 1030, CC Juggle]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1
[State 1030, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 1030, ExFX]
type = varset
trigger1 = !time
var(25) = 30
[State 1030, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
[State 1030, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = 7, -92
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 102, Snd]
type = playsnd
trigger1 = !time
value = 4,1
channel = 0

[State 102, Snd]
type = playsnd
trigger1 = animelem = 4
value = 0, 101
[State 102, Dust]
type = helper
trigger1 = animelem = 4
helpertype = normal
stateno = 8103
ID = 8100
name = "Dash Dust"
postype = p1
pausemovetime = 255
supermovetime = 255
ownpal = 1

[State 1500, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 9.625*(5.0/4.0)
[State 1500, VelAdd]
type = VelAdd
trigger1 = animelemtime(4) > 0
x = ifelse(vel x >=0,-0.4375,0)*(25.0/16.0)

[State 1500, VelSet]
type = VelSet
trigger1 = animelemtime(6) >= 0
x = 0

[State 1500, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 5
attr = S, SA
hitflag = MAF
guardflag = L
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 11
getpower = 0,0
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -4.32, 0
ground.cornerpush.veloff = 0
guard.velocity = -12.64
guard.cornerpush.veloff = 0
air.velocity = -4.32, -6.91
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120
forcestand = 1
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 60), var(36) := -8
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1500, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 1555
ctrl = 0

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

;---------------------------------------------------------------------------
;EX Fire Kick Hit
[Statedef 1555]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1505
ctrl = 0
sprpriority = 1

[State 102, Snd]
type = playsnd
trigger1 = !time
value = 4,2
channel = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
x = 12

[State 102, Snd]
type = playsnd
trigger1 = animelem = 4
value = 1,5

[State 1500, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 5
id = 1550
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 50 < 7, 7, fvar(11) * 50)), 11
getpower = 0,0
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -12, -8
ground.cornerpush.veloff = 0
guard.velocity = -12.64
guard.cornerpush.veloff = 0
ground.velocity = -12, -8
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 85), var(36) := -100
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1310, p2state]
type = targetstate
trigger1 = movehit && numtarget(1550) && !var(11)
trigger1 = (target(1550), stateno = 5000) || (target(1550), stateno = 5010) || (target(1550), stateno = 5020)
value = 1560
ID = 1550
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = movehit
var(15) = 0

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

;---------------------------------------------------------------------------
;EX Fire Kick P2
[Statedef 1560]
type = A
movetype = H
physics = N
velset = 0, 0
[State 1111300, Anim]
type = changeanim
trigger1 = 1
value = 5002
[State 1111300, End]
type = changestate
trigger1 = hitshakeover
value = 1561


;--- Falling ---
[Statedef 1561]
type = A
movetype = H
physics = N

[State 1111301, Vel]
type = hitvelset
trigger1 = !time
x = 1
y = 1
[State 1111301, Accel]
type = veladd
trigger1 = 1
y = gethitvar(yaccel)

[State 1111301, screen]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0, 1
[State 1111301, Push]
type = playerpush
trigger1 = 1
value = 0

[State 1111301, Anim]
type = changeanim
trigger1 = !time
value = 5030

[State 1111301, bounce]
type = changestate
trigger1 = backedgebodydist <= 10 || frontedgebodydist <= 10
value = 1562
[State 1111301, End]
type = selfstate
trigger1 = vel y > 0 && pos y >= 0
value = 5100


;--- Hitting Wall ---
[Statedef 1562]
type = A
movetype = H
physics = N

[State 1111302, turn]
type = turn
trigger1 = !time
trigger1 = frontedgedist < backedgedist

[State 1111302, Pos]
type = posset
trigger1 = 1
x = -160 * facing
[State 1111302, Pos]
type = posfreeze
trigger1 = 1
x = 1
y = 1

[State 1111302, screen]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0, 1
[State 1111302, Push]
type = playerpush
trigger1 = 1
value = 1

[State 1111302, Anim]
type = changeanim
trigger1 = 1
value = 5000

[State 1111302, End]
type = changestate
trigger1 = time >= 4
value = 1563


;--- Falling ---
[Statedef 1563]
type = A
movetype = H
physics = N

;[State 1111303, turn]
;type = turn
;trigger1 = !time

[State 1111303, Accel]
type = veladd
trigger1 = 1
y = 0.5
[State 1111303, Vel]
type = velset
trigger1 = !time
x = 2.5
y = -9

[State 1111303, Anim]
type = changeanim
trigger1 = !time
value = ifelse(selfanimexist(5051), 5051, 5030)
[State 1111303, Anim]
type = changeanim
trigger1 = anim = 5030 && !animtime
value = 5050
[State 1111303, Anim]
type = changeanim
trigger1 = vel y > -3 && anim = 5051
value = 5061

[State 1111303, screen]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0, 0
[State 1111303, Push]
type = playerpush
trigger1 = 1
value = 0

[State 1111303, Recover]
type = selfstate
trigger1 = alive
trigger1 = command = "recovery"
trigger1 = vel y > 0 && pos y >= const(movement.air.gethit.groundrecover.ground.threshold)
value = 5200

[State 1111303, End]
type = selfstate
trigger1 = vel y > 0 && pos y >= 0
value = 5100

;---------------------------------------------------------------------------
;Power Charge
[Statedef 1600]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd = 72 * !var(20)
facep2 = 1
velset = 0,0
anim = 1600
ctrl = 0
sprpriority = 1

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

[State 1000, Button]
type = varset
trigger1 = !time && !AIlevel
var(10) = ifelse((command = "z" || command = "rlsz"), 2, ifelse((command = "y" || command = "rlsy"), 1, 0))
[State 1000, Button AI]
type = varset
trigger1 = !time && AIlevel
var(10) = ifelse(random < 500, 1, 0)
[State 1000, Anim]
type = changeanim
trigger1 = !time
value = 1600 + var(10)*10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 4,1
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 1,2

[State 220, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 7
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10)=2,53,ifelse(var(10)=1,43,33)) < 7, 7, fvar(11) * ifelse(var(10)=2,53,ifelse(var(10)=1,43,33)))), 7
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = 12,12
guard.pausetime = 12,12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = ifelse(var(10)=2,25,18)
ground.slidetime = ifelse(var(10)=2,25,18)
guard.hittime = ifelse(var(10)=2,25,18)
air.hittime = 120
ground.velocity = -8.125, 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -5.39, -5.65
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 53), var(36) := -69
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 0, ChangeState]
type = ChangeState
triggerall = command = "66p" && animelemtime(7) > 0
trigger1 = var(10) = 2 && (command = "z" || command = "rlsz")
trigger2 = var(10) = 1 && (command = "y" || command = "rlsy")
trigger3 = var(10) = 0 && (command = "x" || command = "rlsx")
value =1601
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = ifelse(var(10)=2,5,ifelse(var(10)=1,4.5,4))*(5.0/4.0)

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2) > 0
x = -ifelse(vel x >= 0,0.1875,0)*(25.0/16.0)

[State 0, VelSet]
type = VelSet
trigger1 = vel x <= 0
x = 0

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

;---------------------------------------------------------------------------
;Power Charge
[Statedef 1601]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd = 0
facep2 = 1
velset = 0,0
anim = 1601
ctrl = 0
sprpriority = 1

[State 1000, Anim]
type = changeanim
trigger1 = !time
value = 1601 + var(10)*10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 4,0
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = 1,2

[State 220, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 6
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10)=2,53,ifelse(var(10)=1,43,33)) < 7, 7, fvar(11) * ifelse(var(10)=2,53,ifelse(var(10)=1,43,33)))), 7
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = 12,12
guard.pausetime = 12,12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -8.125, 0
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -5.39, -5.65
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 1
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 68), var(36) := -83
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 0, ChangeState]
type = ChangeState
triggerall = command = "66p" && animelemtime(6)>0
trigger1 = var(10) = 2 && (command = "z" || command = "rlsz")
trigger2 = var(10) = 1 && (command = "y" || command = "rlsy")
trigger3 = var(10) = 0 && (command = "x" || command = "rlsx")
value =1602
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = ifelse(var(10)=2,5,ifelse(var(10)=1,4.5,4))*(5.0/4.0)

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2) > 0
x = -ifelse(vel x >= 0,0.1875,0)*(25.0/16.0)
[State 0, VelSet]
type = VelSet
trigger1 = vel x <= 0
x = 0

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

;---------------------------------------------------------------------------
;Power Charge
[Statedef 1602]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd = 0
facep2 = 1
velset = 0,0
anim = 1602
ctrl = 0
sprpriority = 1

[State 1000, Anim]
type = changeanim
trigger1 = !time
value = 1602 + var(10)*10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 5,13
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 1,2

[State 220, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 4
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(10)=2,53,ifelse(var(10)=1,43,33)) < 7, 7, fvar(11) * ifelse(var(10)=2,53,ifelse(var(10)=1,43,33)))), 7
getpower = ifelse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givepower = 36, 36
pausetime = 12,12
guard.pausetime = 12,12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 21
ground.slidetime = 21
guard.hittime = 21
air.hittime = 120
ground.velocity = -5.625*(5.0/4.0),-3.1875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -5.625*(5.0/4.0),-3.1875*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 1
fall.recover = 0
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 30), var(36) := -55
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = ifelse(var(10)=2,5,ifelse(var(10)=1,4.5,4))*(5.0/4.0)

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2) > 0
x = -ifelse(vel x >= 0,0.1875,0)*(25.0/16.0)
[State 0, VelSet]
type = VelSet
trigger1 = vel x <= 0
x = 0

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

;---------------------------------------------------------------------------
;EX Power Charge
[Statedef 1650]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd = -500
facep2 = 1
velset = 0,0
anim = 1650
ctrl = 0
sprpriority = 1

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

[State 1030, CC Juggle]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1
[State 1030, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 1030, ExFX]
type = varset
trigger1 = !time
var(25) = 30
[State 1030, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
[State 1030, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = 13, -70
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 5,14
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 1,2

[State 220, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = animelem = 4
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 108 < 7, 7, fvar(11) * 108)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 12,12
guard.pausetime = 12,12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 21
ground.slidetime = 21
guard.hittime = 21
air.hittime = 120
ground.velocity = -1.40625*(5.0/4.0),-10.9375*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -8.125
guard.cornerpush.veloff = 0
air.velocity = -1.40625*(5.0/4.0),-10.9375*(5.0/4.0)
air.cornerpush.veloff = 0
yaccel = 0.425*(25.0/16.0)
fall = 1
fall.recover = 0
fall.recovertime = 120;-animtime + ifelse(var(20), 6, 12)
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8012)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 30), var(36) := -55
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
[State 0, VarSet]
type = VarSet
trigger1 = movehit
var(15) = 0


[State 0, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 11 * (5.0/4.0)

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(4) > 0
x = -ifelse(vel x >= 0,0.75,0)*(25.0/16.0)
[State 0, VelSet]
type = VelSet
trigger1 = vel x <= 0
x = 0

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




;---------------------------------------------------------------------------
;Power Geyser
[Statedef 3000]
type = S
physics = N
movetype = A
anim = 3000
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = -1000
facep2 = 1

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 48

[State 3000, Super Cancel Flag]
type = varset
trigger1 = !time
var(21) = ((prevstateno = [1000, 2999]) && var(7)) || var(20)
[State 3000, Hyper Cancel Flag]
type = varset
trigger1 = !time
var(22) = (prevstateno = [3000, 4999]) && var(8)
[State 3000, CC Reset]
type = palfx
trigger1 = !time
trigger1 = !(var(20) := 0)
time = 1

[State 3000, Corner Push]
type = varset
trigger1 = time = 3
fvar(5) = 0
[State 3000, Unguardable]
type = varset
trigger1 = time = 3 && numenemy
trigger1 = (enemynear, stateno != [120, 155])
var(17) = 43

[State 3000, Super Cancel Flash]
type = palfx
trigger1 = var(21) || var(22)
trigger1 = !(time % 2) && time <= 12
time = 1
add = 255, 255, 255
ignorehitpause = 1
[State 3000, Super Cancel Juggle]
type = varset
trigger1 = !time
trigger1 = var(21) || var(22)
var(15) = 0
ignorehitpause = 1

[State 3000, Snd]
type = playsnd
trigger1 = time = 3
value = 5, 5
channel = 0
[State 3000, Snd]
type = playsnd
trigger1 = time = 46
value = 5, 6
channel = 0

[State 3000, Superpause FX]
type = helper
trigger1 = time = 3
helpertype = normal
stateno = 8500
ID = 8500
name = "Superpause FX"
postype = p1
pos = ceil(-4 * const(size.xscale)), ceil(-107 * const(size.yscale))
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 3000, Superpause]
type = superpause
trigger1 = time = 3
time = 43
movetime = 43
p2defmul = 1
unhittable = 1
anim = -1
sound = s0, 8500
darken = 0

[State 3010, Power Geyser]
type = helper
trigger1 = animelemtime(4) = 0
helpertype = normal
stateno = 3015
ID = 3015
name = "Power Geyser FX"
postype = p1
pos = 0, 0
size.xscale = 1
size.yscale = 1
ownpal = 1

[State 3010, Snd]
type = playsnd
trigger1 = animelem = 7
value = 7, 2
[State 3010, Snd]
type = playsnd
trigger1 = animelem = 7
value = 7, 0
[State 3010, FX]
type = envshake
trigger1 = animelem = 7
time = 14
ampl = -4
[State 3010, Explod]
type = Explod
trigger1 = animelem = 7
anim = 3011
ID = 3011
pos = 70,0
postype = p1
ownpal = 1
bindtime = 1
removeongethit = 1
sprpriority = 3
scale = .5, .5
[state 3010, FX]
type=helper
trigger1 = animelem = 7
helpertype=normal
name="Spark"
ID=8110
stateno=8110
postype=p1
pos=0,0
facing=1
ownpal=1
size.xscale=.5
size.yscale=.5


[State 3010, Power Geyser]
type = helper
trigger1 = animelem = 7
helpertype = normal
stateno = 3010
ID = 3010
name = "Power Geyser"
postype = p1
pos = 70, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

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

;---------------------------------------------------------------------------
;Power Geysers
[Statedef 3010]
type = A
physics = N
movetype = A
anim = 3010
velset = 0, 0
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3005, Counter Flag]
type = varset
trigger1 = !time
var(1) = root,stateno

[State 3005, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 3005, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)

[State 1015, Hit]
type = hitdef
trigger1 = ishelper(3010)
trigger1 = !(root, var(16)) && (root, var(15) < 1)
attr = S, HP
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3

[State 1015, Hit]
type = hitdef
trigger1 = ishelper(3050)
trigger1 = !(root, var(16)) && (root, var(15) < 1)
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3
[State 1015, Hit]
type = hitdef
triggerall = ishelper(3051) 
trigger1 = numhelper(3050)
trigger1 = !(root, var(16)) && (root, var(15) < 1 + helper(3050),var(13))
trigger2 = !numhelper(3050)
trigger2 = !(root, var(16)) && (root, var(15) < 1)
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3
[State 1015, Hit]
type = hitdef
triggerall = ishelper(3052)
trigger1 = numhelper(3050) && numhelper(3051)
trigger1 = !(root, var(16)) && (root, var(15) < 1 + helper(3050),var(13) + helper(3051),var(13))
trigger2 = !numhelper(3050) && numhelper(3051)
trigger2 = !(root, var(16)) && (root, var(15) < 1 + helper(3051),var(13))
trigger3 = numhelper(3050) && !numhelper(3051)
trigger3 = !(root, var(16)) && (root, var(15) < 1 + helper(3050),var(13))
trigger4 = !numhelper(3050) && !numhelper(3051)
trigger4 = !(root, var(16)) && (root, var(15) < 1)
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3

[State 1015, Hit]
type = hitdef
trigger1 = ishelper(3310)
trigger1 = !(root, var(16)) && (root, var(15) < root,hitcount + 1)
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3
[State 1015, Hit]
type = hitdef
triggerall = ishelper(3311)
trigger1 = !numhelper(3310)
trigger1 = !(root, var(16)) && (root, var(15) < root,hitcount + 1)
trigger2 = numhelper(3310)
trigger2 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3310),var(13))
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3
[State 1015, Hit]
type = hitdef
triggerall = ishelper(3312)
trigger1 = !numhelper(3310) && !numhelper(3311)
trigger1 = !(root, var(16)) && (root, var(15) < root,hitcount + 1)
trigger2 = numhelper(3310) && !numhelper(3311)
trigger2 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3310),var(13))
trigger3 = numhelper(3310) && numhelper(3311)
trigger3 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3310),var(13) + helper(3311),var(13))
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3
[State 1015, Hit]
type = hitdef
triggerall = ishelper(3313)
trigger1 = !numhelper(3310) && !numhelper(3311) && !numhelper(3312)
trigger1 = !(root, var(16)) && (root, var(15) < root,hitcount + 1)
trigger2 = numhelper(3310) && !numhelper(3311) && !numhelper(3312)
trigger2 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3310),var(13))
trigger3 = numhelper(3310) && numhelper(3311) && !numhelper(3312)
trigger3 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3310),var(13) + helper(3311),var(13))
trigger4 = numhelper(3310) && numhelper(3311) && numhelper(3312)
trigger4 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3310),var(13) + helper(3311),var(13) + helper(3312),var(13))
trigger5 = !numhelper(3310) && numhelper(3311) && numhelper(3312)
trigger5 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3311),var(13) + helper(3312),var(13))
trigger6 = !numhelper(3310) && !numhelper(3311) && numhelper(3312)
trigger6 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3312),var(13))
trigger7 = numhelper(3310) && !numhelper(3311) && numhelper(3312)
trigger7 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3310),var(13) + helper(3312),var(13))
trigger8 = !numhelper(3310) && numhelper(3311) && !numhelper(3312)
trigger8 = !(root, var(16)) && (root, var(15) < 1 + root,hitcount + helper(3311),var(13))
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)) < 7, 7, fvar(11) * ifelse(var(1)=3301,44,ifelse(var(1)=3050,92,183)))), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3


[State 3011, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 3011
ignorehitpause = 1

[State 3010, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 1018

;--- Hitpause ---
[Statedef 3011]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3
movehitpersist = 1

[State 1006, Freeze]
type = posfreeze
trigger1 = 1
value = 1

[State 1006, HitSound]
type = playsnd
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
value = ifelse(moveguarded, 3, 2), ifelse(moveguarded, 0, 6)
channel = 2
ignorehitpause = 1

[State 1006, Spark]
type = helper
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = ifelse(moveguarded, 8001, 8014)
ID = 8000
name = "Spark"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), ceil(enemy,Pos Y)-30
facing = -1
ownpal = 1
size.xscale = 1
size.yscale = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, Counter FX]
type = helper
trigger1 = movecontact = 1 && numtarget && var(9)
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = 8290
ID = 8290
name = "Counter FX"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), ceil(enemy,Pos Y)-30
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 3050, Flame Particles]
type = helper
trigger1 = !numhelper(8150)
trigger1 = movehit = 1 && numtarget
trigger1 = !(target, hitshakeover)
trigger1 = var(40) := (target, ID)
helpertype = normal
stateno = 8150
ID = 8150
name = "Flame Particles"
postype = p2
ownpal = 1
ignorehitpause = 1

[State 1006, HitCount]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(13) = 1
[State 1006, Juggle]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(15) = 1

[State 1006, HitCount]
type = varset
trigger1 = !time
trigger1 = movecontact && numtarget
var(13) = 1

[State 1006, ProjContact]
type = varset
trigger1 = movecontact && numtarget
var(18) = 1
[State 1006, ProjContact]
type = parentvarset
trigger1 = movecontact && numtarget
trigger1 = (root, stateno = [3000,3050]) || root,stateno = 3301
var(18) = 1

[State 1006, End]
type = changestate
trigger1 = time >= 0
value = 3012

[Statedef 3012]
type = A
physics = N
movetype = A
velset = 0, 0
sprpriority = 2

[State 1007, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1007, End]
type = changestate
trigger1 = !animtime
value = 3013

;--- Wait ---
[Statedef 3013]
type = A
physics = N
movetype = I
anim = 9741
ctrl = 0
velset = 0, 0

[State 1008, End]
type = destroyself
trigger1 = !numtarget

[Statedef 3015]
type = A
physics = N
movetype = I
velset = 0, 0
anim = 3015
sprpriority = 2

[State 1007, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1003, End]
type = destroyself
trigger1 = !animtime || root, movetype = H
trigger2 = root, stateno != [3000,3050]
;---------------------------------------------------------------------------
;Triple Geyser
[Statedef 3050]
type = S
physics = N
movetype = A
anim = 3050
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = -2000
facep2 = 1

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 48

[State 3000, Super Cancel Flag]
type = varset
trigger1 = !time
var(21) = ((prevstateno = [1000, 2999]) && var(7)) || var(20)
[State 3000, Hyper Cancel Flag]
type = varset
trigger1 = !time
var(22) = (prevstateno = [3000, 4999]) && var(8)
[State 3000, CC Reset]
type = palfx
trigger1 = !time
trigger1 = !(var(20) := 0)
time = 1

[State 3000, Corner Push]
type = varset
trigger1 = time = 3
fvar(5) = 0
[State 3000, Unguardable]
type = varset
trigger1 = time = 3 && numenemy
trigger1 = (enemynear, stateno != [120, 155])
var(17) = 43

[State 3000, Super Cancel Flash]
type = palfx
trigger1 = var(21) || var(22)
trigger1 = !(time % 2) && time <= 12
time = 1
add = 255, 255, 255
ignorehitpause = 1
[State 3000, Super Cancel Juggle]
type = varset
trigger1 = !time
trigger1 = var(21) || var(22)
var(15) = 0
ignorehitpause = 1

[State 3000, Snd]
type = playsnd
trigger1 = time = 3
value = 5, 12
channel = 0
[State 3000, Snd]
type = playsnd
trigger1 = animelem = 25
value = 5, 10
channel = 0

[State 3000, Superpause FX]
type = helper
trigger1 = time = 3
helpertype = normal
stateno = 8510
ID = 8510
name = "Superpause FX"
postype = p1
pos = ceil(-4 * const(size.xscale)), ceil(-107 * const(size.yscale))
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 3000, Superpause]
type = superpause
trigger1 = time = 3
time = 43
movetime = 43
p2defmul = 1
unhittable = 1
anim = -1
sound = s0, 8500
darken = 0

[State 3010, Snd]
type = playsnd
trigger1 = animelem = 7
trigger2 = animelem = 17
trigger3 = animelem = 28
value = 7, 2
[State 3010, Snd]
type = playsnd
trigger1 = animelem = 7
trigger2 = animelem = 17
trigger3 = animelem = 28
value = 7, 0
[State 3010, FX]
type = envshake
trigger1 = animelem = 7
trigger2 = animelem = 17
trigger3 = animelem = 28
time = 14
ampl = -4
[State 3010, Explod]
type = Explod
trigger1 = animelem = 7
trigger2 = animelem = 28
anim = 3011
pos = 70,0
postype = p1
ownpal = 1
bindtime = 1
removeongethit = 1
ID = 3011
sprpriority = 3
scale = .5, .5
[State 3010, Explod]
type = Explod
trigger1 = animelem = 17
anim = 3011
pos = 15,0
postype = p1
ownpal = 1
bindtime = 1
removeongethit = 1
ID = 3011
sprpriority = 3
scale = .5, .5
[state 3010, FX]
type=helper
trigger1 = animelem = 7
trigger2 = animelem = 17
trigger3 = animelem = 28
helpertype=normal
name="Spark"
ID=8110
stateno=8110
postype=p1
pos=0,0
facing=1
ownpal=1
size.xscale=.5
size.yscale=.5

[State 3010, Power Geyser]
type = helper
trigger1 = animelem = 4
trigger2 = animelem = 25
helpertype = normal
stateno = 3015
ID = 3060
name = "Power Geyser"
postype = p1
pos = 0, 0
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 3010, FX]
type=helper
trigger1 = animelem = 14
helpertype=normal
name="Power Geyser FX"
ID=3060
stateno=3061
postype=p1
pos=0,0
facing=1
ownpal=1
size.xscale=1
size.yscale=1
[State 3010, FX]
type=helper
trigger1 = animelem = 25
helpertype=normal
name="Power Geyser FX"
ID=3060
stateno=1010
postype=p1
pos=0,0
facing=1
ownpal=1
size.xscale=1
size.yscale=1

[State 3010, Power Geyser]
type = helper
trigger1 = animelem = 7
helpertype = normal
stateno = 3010
ID = 3050
name = "Power Geyser"
postype = p1
pos = 70, 0
size.xscale = .5
size.yscale = .5
ownpal = 1
[State 3010, Power Geyser]
type = helper
trigger1 = animelem = 17
helpertype = normal
stateno = 3010
ID = 3051
name = "Power Geyser"
postype = p1
pos = 100, 0
size.xscale = .5
size.yscale = .5
ownpal = 1
[State 3010, Power Geyser]
type = helper
trigger1 = animelem = 28
helpertype = normal
stateno = 3010
ID = 3052
name = "Power Geyser"
postype = p1
pos = 130, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

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

;---------------------------------------------------------------------------
;Triple Geyser
[Statedef 3061]
type = A
physics = N
movetype = I
anim = 3060
velset = 0, 0
sprpriority = 2

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime || root,movetype = H
trigger2 = root,stateno != 3050

;---------------------------------------------------------------------------
;Buster Wolf
[Statedef 3100]
type = S
physics = N
movetype = A
anim = 3100
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = -1000
facep2 = 1

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 48

[State 3000, Super Cancel Flag]
type = varset
trigger1 = !time
var(21) = ((prevstateno = [1000, 2999]) && var(7)) || var(20)
[State 3000, Hyper Cancel Flag]
type = varset
trigger1 = !time
var(22) = (prevstateno = [3000, 4999]) && var(8)
[State 3000, CC Reset]
type = palfx
trigger1 = !time
trigger1 = !(var(20) := 0)
time = 1

[State 3000, Corner Push]
type = varset
trigger1 = time = 3
fvar(5) = 0
[State 3000, Unguardable]
type = varset
trigger1 = time = 3 && numenemy
trigger1 = (enemynear, stateno != [120, 155])
var(17) = 43

[State 3000, Super Cancel Flash]
type = palfx
trigger1 = var(21) || var(22)
trigger1 = !(time % 2) && time <= 12
time = 1
add = 255, 255, 255
ignorehitpause = 1
[State 3000, Super Cancel Juggle]
type = varset
trigger1 = !time
trigger1 = var(21) || var(22)
var(15) = 0
ignorehitpause = 1

[State 3000, Snd]
type = playsnd
trigger1 = time = 3
value = 5, 7
channel = 0

[State 3000, Snd]
type = playsnd
trigger1 = animelem = 8
value = 7,1

[State 3000, Superpause FX]
type = helper
trigger1 = time = 3
helpertype = normal
stateno = 8500
ID = 8500
name = "Superpause FX"
postype = p1
pos = ceil(-15 * const(size.xscale)), ceil(-80 * const(size.yscale))
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 3000, Superpause]
type = superpause
trigger1 = time = 3
time = 43
movetime = 43
p2defmul = 1
unhittable = 1
anim = -1
sound = s0, 8500
darken = 0

[State 3010, Power Geyser]
type = helper
trigger1 = animelemtime(7) = 0
helpertype = normal
stateno = 3110
ID = 3110
name = "Buster Wolf FX"
postype = p1
pos = 0, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

[State 3000, Hit]
type = hitdef
trigger1 = !var(16) && var(15) < 1
trigger1 = animelemtime(9) >= 0
attr = S, HA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 43 < 7, 7, fvar(11) * 43)), 7
getpower = 0, 0
givepower = 36, 36
pausetime = 12, 12
guard.pausetime = 12, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -5.41, 0
ground.cornerpush.veloff = 0
guard.velocity = -5.41
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.24
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8014)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 73), var(36) := -73
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
kill = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 3105

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(9)=0
x = 12*(5.0/4.0)
y = -0.5*(5.0/4.0)

[State 0, Accel]
type = VelAdd
trigger1 = animelemtime(9)>0
y = 0.0625*(25.0/16.0)

[State 1400, ChangeState]
type = ChangeState
triggerall = animelemtime(9) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 3101

;---------------------------------------------------------------------------
;Buster Wolf Miss
[Statedef 3101]
type = S
physics = N
movetype = I
anim = 3101
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 52, Snd]
type = playsnd
trigger1 = !time
value = 0, 52
[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

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

;---------------------------------------------------------------------------
;Buster Wolf Hit
[Statedef 3105]
type = S
physics = N
movetype = A
anim = 3105
ctrl = 0
sprpriority = 1
velset = 0,0

[State 3000, Snd]
type = playsnd
trigger1 = animelem = 5
value = 5, 8
channel = 0

[State 3000, Snd]
type = playsnd
trigger1 = animelem = 4
value = 7, 0

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 2 * (5.0/4.0)
[State 0, VelSet]
type = VelSet
trigger1 = vel x <= 0
trigger2 = animelem = 4
x = 0
[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = ifelse(vel x <= 0,0,-0.0625)*(25.0/16.0)
[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 52, Snd]
type = playsnd
trigger1 = animelem = 3
value = 0, 52

[State 3010, Power Geyser]
type = helper
trigger1 = animelem = 4
helpertype = normal
stateno = 3115
ID = 3115
name = "Buster Wolf FX"
postype = p1
pos = 0, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

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

;---------------------------------------------------------------------------
;Buster Wolf FX
[Statedef 3110]
type = A
physics = N
movetype = I
velset = 0, 0
anim = 3110
sprpriority = 2

[State 3010, Explod]
type = Explod
trigger1 = time = 3
anim = 3111
ID = 3111
pos = 0,0
postype = p1
ownpal = 1
bindtime = 1
removeongethit = 1
sprpriority = 3
scale = .5,.5

[State 3110, Bind]
type = bindtoroot
trigger1 = 1
facing = 1
[State 3110, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 1003, End]
type = destroyself
trigger1 = root, movetype = H
trigger2 = root, stateno != 3100

;---------------------------------------------------------------------------
;Buster Wolf FX-2
[Statedef 3115]
type = A
physics = N
movetype = A
velset = 0, 0
sprpriority = 2
hitcountpersist = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 3115
value = 3115


[State 3005, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 3005, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)

[State 1015, Hit]
type = hitdef
trigger1 = !(root, var(16)) && (root, var(15) < 1 + hitcount)
trigger1 = time%3 = 2 && hitcount < 4
attr = S, HP
hitflag = MAF
guardflag = MA
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 22 < 7, 7, fvar(11) * 22)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 2
guard.pausetime = 0, 2
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = -2*(5.0/4.0), -5.46875*(5.0/4.0)
ground.cornerpush.veloff = 0
guard.velocity = -7.66
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.36
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.28125*(25.0/16.0)
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 22 + ifelse(var(20), 6, 12)
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -32
palfx.time = 38
palfx.mul = 128, 128, 128
palfx.sinadd = 96, 96, 96, 4
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3

[State 3110, Bind]
type = bindtoroot
trigger1 = 1
facing = 1
[State 1007, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 3116
ignorehitpause = 1

[State 1003, End]
type = destroyself
trigger1 = !animtime || root, movetype = H
trigger2 = root, stateno != 3105

;--- Hitpause ---
[Statedef 3116]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3
movehitpersist = 1
hitcountpersist = 1

[State 1006, Freeze]
type = posfreeze
trigger1 = 1
value = 1

[State 1006, HitSound]
type = playsnd
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
value = ifelse(moveguarded, 3, 2), ifelse(moveguarded, 0, 6)
channel = 2
ignorehitpause = 1

[State 1006, Spark]
type = helper
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = ifelse(moveguarded, 8001, 8014)
ID = 8000
name = "Spark"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 180, ceil(p2dist x), 180)), ceil(enemy,Pos Y)-30
facing = -1
ownpal = 1
size.xscale = 1
size.yscale = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, Counter FX]
type = helper
trigger1 = movecontact = 1 && numtarget && var(9)
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = 8290
ID = 8290
name = "Counter FX"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < -20, ceil(p2dist x), -20)), ceil(enemy,Pos Y)-30
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 3050, Flame Particles]
type = helper
trigger1 = !numhelper(8150)
trigger1 = movehit = 1 && numtarget
trigger1 = !(target, hitshakeover)
trigger1 = var(40) := (target, ID)
helpertype = normal
stateno = 8150
ID = 8150
name = "Flame Particles"
postype = p2
ownpal = 1
ignorehitpause = 1

[State 1006, HitCount]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(13) = 1
[State 1006, Juggle]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(15) = 1

[State 1006, ProjContact]
type = varset
trigger1 = movecontact && numtarget
var(18) = 1
[State 1006, ProjContact]
type = parentvarset
trigger1 = movecontact && numtarget
trigger1 = root, stateno = 1000
var(18) = 1

[State 1006, End]
type = changestate
trigger1 = time >= 0
value = 3115

;---------------------------------------------------------------------------
;Power Stream
[Statedef 3200]
type = S
physics = N
movetype = A
anim = 3200
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = -3000
facep2 = 1

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 65

[State 3000, Super Cancel Flag]
type = varset
trigger1 = !time
var(21) = ((prevstateno = [1000, 2999]) && var(7)) || var(20)
[State 3000, Hyper Cancel Flag]
type = varset
trigger1 = !time
var(22) = (prevstateno = [3000, 4999]) && var(8)
[State 3000, CC Reset]
type = palfx
trigger1 = !time
trigger1 = !(var(20) := 0)
time = 1

[State 3000, Corner Push]
type = varset
trigger1 = time = 3
fvar(5) = 0
[State 3000, Unguardable]
type = varset
trigger1 = time = 3 && numenemy
trigger1 = (enemynear, stateno != [120, 155])
var(17) = 43

[State 3000, Super Cancel Flash]
type = palfx
trigger1 = var(21) || var(22)
trigger1 = !(time % 2) && time <= 12
time = 1
add = 255, 255, 255
ignorehitpause = 1
[State 3000, Super Cancel Juggle]
type = varset
trigger1 = !time
trigger1 = var(21) || var(22)
var(15) = 0
ignorehitpause = 1

[State 3000, Snd]
type = playsnd
trigger1 = time = 3
value = 5, 9
channel = 0

[State 3000, Superpause FX]
type = helper
trigger1 = time = 3
helpertype = normal
stateno = 8520
ID = 8520
name = "Superpause FX"
postype = p1
pos = ceil(-32 * const(size.xscale)), ceil(-94 * const(size.yscale))
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 3000, Superpause]
type = superpause
trigger1 = time = 3
time = 43
movetime = 43
p2defmul = 1
unhittable = 1
anim = -1
sound = s0, 8500
darken = 0

[State 3000, Snd]
type = playsnd
trigger1 = animelemtime(8)=43
value = 5, 10
channel = 0

[State 3231, Shake]
type = envshake
trigger1 = animelem = 8
trigger2 = animelemtime(8)=43
time = 14
ampl = -4
freq = 120
[State 3000, Snd]
type = playsnd
trigger1 = animelem = 8
value = 7, 3
[State 3000, Snd]
type = playsnd
trigger1 = animelem = 8
value = 7, 5

[State 3000, Snd]
type = playsnd
trigger1 = animelemtime(8)=43
value = 7, 2

[State 3010, Power Geyser]
type = helper
trigger1 = animelem = 8
helpertype = normal
stateno = 3210
ID = 3210
name = "Power Stream FX"
postype = p1
pos = 0, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

[State 3010, Power Geyser]
type = helper
trigger1 = animelemtime(8)=35
helpertype = normal
stateno = 3211
ID = 3211
name = "Power Stream FX"
postype = p1
pos = 0, 0
size.xscale = .5
size.yscale = .5
ownpal = 1

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


;---------------------------------------------------------------------------
;Power Stream FX
[Statedef 3210]
type = A
physics = N
movetype = A
velset = 0, 0
sprpriority = 2
hitcountpersist = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 3210
value = 3210

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 3005, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 3005, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)

[State 3005, Hit]
type = hitdef
trigger1 = !movecontact && hitcount < 1 && !var(18)
attr = S, HP
hitflag = MAFP
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 59 < 7, 7, fvar(11) * 59)), 7
getpower = 0, 0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 10
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = Low
air.type = Low
ground.hittime = 15
ground.slidetime = 15
guard.hittime = 15
air.hittime = 60
ground.velocity = 0, -15
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = 0
ground.velocity = 0, -15
air.cornerpush.veloff = 0
yaccel = 0.625
fall = 1
fall.recover = 0
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -48
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 3213
ctrl = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime || root,movetype = H
trigger2 = root,stateno != 3200

;---------------------------------------------------------------------------
;Power Stream FX
[Statedef 3211]
type = A
physics = N
movetype = A
velset = 0, 0
sprpriority = 2
hitcountpersist = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 3211
value = 3211

[State 0, VarAdd]
type = VarAdd
trigger1 = time
var(1) = 1

[State 3005, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 3005, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)

[State 3005, Hit]
type = hitdef
trigger1 = var(1)%3=2 && var(1)<=35
attr = S, HP
hitflag = MAFP
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 33 < 7, 7, fvar(11) * 33)), 7
getpower = 0, 0
givepower = 36, 36
pausetime = 0, 3
guard.pausetime = 0, 3
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = Low
air.type = Low
ground.hittime = 15
ground.slidetime = 15
guard.hittime = 15
air.hittime = 60
ground.velocity = -2,-15
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = 0
air.velocity = -2,-15
air.cornerpush.veloff = 0
yaccel = 0.625
fall = 1
fall.recover = 0
forcestand = 1
hitsound = -1
guardsound = -1
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -48
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
sprpriority = 3

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 3213
ctrl = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime || root,movetype = H

;--- Hitpause ---
[Statedef 3213]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 2
movehitpersist = 1
hitcountpersist = 1

[State 1006, Freeze]
type = posfreeze
trigger1 = 1
value = 1

[State 1006, HitSound]
type = playsnd
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
value = ifelse(moveguarded, 3, 2), ifelse(moveguarded, 0, 6)
channel = 2
ignorehitpause = 1

[State 1006, Spark]
type = helper
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = ifelse(moveguarded, 8001, 8014)
ID = 8000
name = "Spark"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), ceil(p2dist y -64)
facing = -1
ownpal = 1
size.xscale = 1
size.yscale = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, Counter FX]
type = helper
trigger1 = movecontact = 1 && numtarget && var(9)
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = 8290
ID = 8290
name = "Counter FX"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), ceil(p2dist y -64)
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 1006, HitCount]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(13) = 1
[State 1006, Juggle]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(15) = 1

[State 1006, ProjContact]
type = varset
trigger1 = movecontact && numtarget
var(18) = 1
[State 1006, ProjContact]
type = parentvarset
trigger1 = movecontact && numtarget
trigger1 = root, stateno = 1000
var(18) = 1

[State 1006, End]
type = changestate
trigger1 = time >= 0
value = prevstateno

;---------------------------------------------------------------------------
;High-Angle Geyser
[Statedef 3300]
type = S
physics = N
movetype = A
anim = 3300
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = -2000
facep2 = 1

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 59

[State 3000, Super Cancel Flag]
type = varset
trigger1 = !time
var(21) = ((prevstateno = [1000, 2999]) && var(7)) || var(20)
[State 3000, Hyper Cancel Flag]
type = varset
trigger1 = !time
var(22) = (prevstateno = [3000, 4999]) && var(8)
[State 3000, CC Reset]
type = palfx
trigger1 = !time
trigger1 = !(var(20) := 0)
time = 1

[State 3000, Corner Push]
type = varset
trigger1 = time = 3
fvar(5) = 0
[State 3000, Unguardable]
type = varset
trigger1 = time = 3 && numenemy
trigger1 = (enemynear, stateno != [120, 155])
var(17) = 43

[State 3000, Super Cancel Flash]
type = palfx
trigger1 = var(21) || var(22)
trigger1 = !(time % 2) && time <= 12
time = 1
add = 255, 255, 255
ignorehitpause = 1
[State 3000, Super Cancel Juggle]
type = varset
trigger1 = !time
trigger1 = var(21) || var(22)
var(15) = 0
ignorehitpause = 1

[State 3000, Snd]
type = playsnd
trigger1 = time = 3
value = 5, 11
channel = 0

[State 3000, Superpause FX]
type = helper
trigger1 = time = 3
helpertype = normal
stateno = 8510
ID = 8510
name = "Superpause FX"
postype = p1
pos = ceil(20 * const(size.xscale)), ceil(-45 * const(size.yscale))
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1
[State 3000, Superpause]
type = superpause
trigger1 = time = 3
time = 43
movetime = 43
p2defmul = 1
unhittable = 1
anim = -1
sound = s0, 8500
darken = 0

[State 1400, Snd]
type = playsnd
trigger1 = animelemtime(10)=0
value = 0, 41
[State 1400, Dust]
type = helper
trigger1 = animelemtime(10)=0
helpertype = normal
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1

[State 3000, Snd]
type = playsnd
trigger1 = AnimElem = 5
value = 0,101
[State 3000, Snd]
type = playsnd
trigger1 = AnimElem = 5
value = 0,41
[State 3000, Snd]
type = playsnd
trigger1 = AnimElem = 5
value = 1,2
[State 102, Dust]
type = helper
trigger1 = AnimElem = 5
helpertype = normal
stateno = 8103
ID = 8100
name = "Dash Dust"
postype = p1
pausemovetime = 255
supermovetime = 255
ownpal = 1

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 5
x = 16
[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 7
x = 0
[State 105, 1]
type = VelMul
trigger1 = AnimElemTime(7) < 0
x = .88
[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 10
x = 4
y = -10
[State 105, 1]
type = VelAdd
trigger1 = AnimElemTime(10) > 0
y = .75

[State 3000, Hit]
type = hitdef
triggerall = !var(16) && var(15) < 1
trigger1 = animelem=5
attr = S, HA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 24 < 7, 7, fvar(11) * 24)), 7
getpower = 0, 0
givepower = 36, 36
pausetime = 12, 12
guard.pausetime = 12, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -5.41, 0
ground.cornerpush.veloff = 0
guard.velocity = -5.41
guard.cornerpush.veloff = 0
air.velocity = -4.31, -7.24
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8014)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 73), var(36) := -73
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120

[State 3000, Hit]
type = hitdef
triggerall = !var(16) && var(15) < 1 + hitcount
trigger1 = animelem = 9
trigger2 = animelem = 10
attr = S, HA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 24 < 7, 7, fvar(11) * 24)), 7
getpower = 0, 0
givepower = 36, 36
pausetime = 12, 12
guard.pausetime = 12, 12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -3.5,-8.5
ground.cornerpush.veloff = 0
guard.velocity = -5.41
guard.cornerpush.veloff = 0
air.velocity = -3.5,-8.5
air.cornerpush.veloff = 0
yaccel = 0.49
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8014)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 73), var(36) := -73
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120

[State 1400, ChangeState]
type = ChangeState
triggerall = animelemtime(10) > 0
trigger1 = Vel Y + Pos Y >= 0
value = 3301

;---------------------------------------------------------------------------
;High-Angle Land
[Statedef 3301]
type = S
physics = N
movetype = A
anim = 3301
ctrl = 0
velset = 0, 0
sprpriority = 1
hitcountpersist = 1

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

[State 52, Snd]
type = playsnd
trigger1 = !time
value = 0, 52
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 5,6
channel = 0

[State 3010, Snd]
type = playsnd
trigger1 = animelemtime(2)%5=0 && animelemtime(2)<=15
value = 7, 2
[State 3010, Snd]
type = playsnd
trigger1 = animelem=2
value = 7, 0
[State 3010, FX]
type = envshake
trigger1 = animelemtime(2)%5=0 && animelemtime(2)<=15
time = 14
ampl = -4
[State 3010, Explod]
type = Explod
trigger1 = animelem = 2
anim = 3011
ID = 3011
pos = 70,0
postype = p1
ownpal = 1
bindtime = 1
removeongethit = 1
sprpriority = 3
scale = .5, .5
[state 3010, FX]
type=helper
trigger1 = animelem = 2
helpertype=normal
name="Spark"
ID=8110
stateno=8110
postype=p1
pos=0,0
facing=1
ownpal=1
size.xscale=.5
size.yscale=.5

[State 3010, Power Geyser]
type = helper
trigger1 = animelemtime(2) = 0
helpertype = normal
stateno = 3010
ID = 3310
name = "Power Geyser"
postype = p1
pos = 70
size.xscale = .5
size.yscale = .5
ownpal = 1
[State 3010, Power Geyser]
type = helper
trigger1 = animelemtime(2) = 5
helpertype = normal
stateno = 3010
ID = 3311
name = "Power Geyser"
postype = p1
pos = 90
size.xscale = .5
size.yscale = .5
ownpal = 1
[State 3010, Power Geyser]
type = helper
trigger1 = animelemtime(2) = 10
helpertype = normal
stateno = 3010
ID = 3312
name = "Power Geyser"
postype = p1
pos = 110
size.xscale = .5
size.yscale = .5
ownpal = 1
[State 3010, Power Geyser]
type = helper
trigger1 = animelemtime(2) = 15
helpertype = normal
stateno = 3010
ID = 3313
name = "Power Geyser"
postype = p1
pos = 130
size.xscale = .5
size.yscale = .5
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = !animtime 
value = 0 
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 





;---------------------------------------------------------------------------
;Punch Zero Counter
[Statedef 2900]
type = S
physics = N
movetype = A
anim = 2900
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0

[State 2900, NHB]
type = nothitby
trigger1 = animelemtime(3) < 0
value = SCA
time = 1
ignorehitpause = 1

[State 2900, Snd]
type = playsnd
trigger1 = animelem = 2
value = 4, 2
channel = 0
[State 2900, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 2
channel = 1

[State 2900, Hit]
type = hitdef
trigger1 = !var(16) && var(15) < 1
trigger1 = animelem = 3
attr = S, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 7
getpower = 0, 0
givepower = 36, 36
pausetime = 12, 12
guard.pausetime = 12, 12
animtype = Diagup
air.animtype = Diagup
fall.animtype = Diagup
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -5.54, -5.25
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = 0
air.velocity = -5.54, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 1
fall.recover = 1
fall.recovertime = 120;24
forcestand = 1
hitsound = -1 + 0 * (var(31) := 2)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 46), var(36) := -99
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
kill = 0

[State 2900, Type]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I
[State 2900, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Kick Zero Counter
[Statedef 2910]
type = S
physics = N
movetype = A
anim = 2910
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0

[State 2910, NHB]
type = nothitby
trigger1 = animelemtime(3) < 0
value = SCA
time = 1
ignorehitpause = 1

[State 2910, Snd]
type = playsnd
trigger1 = animelem = 1
value = 4, 2
channel = 0
[State 2910, Snd]
type = playsnd
trigger1 = animelem = 3
value = 1, 5
channel = 1

[State 2910, Hit]
type = hitdef
trigger1 = !var(16) && var(15) < 1
trigger1 = animelem = 3
attr = C, SA
hitflag = MAF
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 7
getpower = 0, 0
givepower = 36, 36
pausetime = 12, 12
guard.pausetime = 12, 12
animtype = Diagup
air.animtype = Diagup
fall.animtype = Diagup
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = -5.54, -5.25
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = 0
air.velocity = -5.54, -5.25
air.cornerpush.veloff = 0
yaccel = 0.58
fall = 1
fall.recover = 1
fall.recovertime = 120;24
forcestand = 1
hitsound = -1 + 0 * (var(31) := 5)
guardsound = -1 + 0 * (var(32) := 0)
sparkno = -1 + 0 * (var(33) := 8013)
guard.sparkno = -1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 100), var(36) := -29
palfx.time = 12 * var(9)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
kill = 0

[State 2910, Type]
type = statetypeset
trigger1 = animelemtime(4) >= 0
movetype = I
[State 2910, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Target Safe Fall
[Statedef 5205]
type = A
physics = N
movetype = H

[State 5205, Anim]
type = changeanim
trigger1 = !animtime
trigger1 = anim = 5035
value = 5050

[State 5205, Accel]
type = veladd
trigger1 = 1
y = gethitvar(yaccel)

[State 5205, Ground]
type = selfstate
trigger1 = vel y > 0
trigger1 = pos y >= const(movement.air.gethit.groundrecover.ground.threshold)
value = 5200

[State 5205, Air]
type = selfstate
trigger1 = time >= 60
value = 5210


;---------------------------------------------------------------------------
;Fall Recovery
[Statedef 5200]
type = A
movetype = H
physics = N
[State 5200, Anim]
type = changeanim
trigger1 = anim = 5035 && !animtime
value = 5050
[State 5200, Vel]
type = veladd
trigger1 = 1
y = gethitvar(yaccel)
[State 5200, End]
type = selfstate
trigger1 = vel y > 0 && pos y >= 10
value = 5201

[Statedef 5201]
type = S
movetype = I
physics = N
anim = 5200
ctrl = 0
facep2 = 1

[State 5201, Pos]
type = posset
trigger1 = 1
y = 0
[State 5201, Vel]
type = velset
trigger1 = !time
x = -8
y = 0
[State 5201, Vel]
type = velmul
trigger1 = 1
x = 0.9

[State 5201, Snd]
type = playsnd
trigger1 = !time
value = 4, 6
channel = 0
[State 5201, Snd]
type = playsnd
trigger1 = !time
value = 0, 5200

[State 5201, Flash]
type = palfx
trigger1 = !time
add = 255, 255, 255
sinadd = -255, -255, -255, 40
time = 10
[State 5201, FX]
type = helper
trigger1 = !time
helpertype = normal
stateno = 8200
ID = 8200
name = "Recover FX"
postype = p1
pos = 0, ceil(-18 * const(size.yscale))
size.xscale = 1
size.yscale = 1
ownpal = 1

[State 5201, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 5201, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1


;--- AIR ---
[Statedef 5210]
type = A
movetype = I
physics = N
anim = 5210
ctrl = 0

[State 5210, Accel]
type = veladd
trigger1 = 1
y = 0.6

[State 5210, Vel]
type = velset
trigger1 = !time
x = ifelse((command = "holdfwd" && command != "holdback"), 4, ifelse((command != "holdfwd" && command = "holdback"), -4, 0))
y = -7.55

[State 5210, Turn]
type = turn
trigger1 = !time
trigger1 = p2dist x < 0

[State 5210, Snd]
type = playsnd
trigger1 = !time
value = 4, 6
channel = 0

[State 5210, Snd]
type = playsnd
trigger1 = !time
value = 0, 5200

[State 5210, Flash]
type = palfx
trigger1 = !time
add = 255, 255, 255
sinadd = -255, -255, -255, 40
time = 10

[State 5210, FX]
type = helper
trigger1 = !time
helpertype = normal
stateno = 8200
ID = 8200
name = "Recover FX"
postype = p1
pos = 0, ceil(-66 * const(size.yscale))
size.xscale = 1
size.yscale = 1
ownpal = 1

[State 5210, NHB]
type = nothitby
trigger1 = time < 14
value = SCA
time = 1

[State 5210, Ctrl]
type = ctrlset
trigger1 = time >= 14
value = 1

[State 5210, Land]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y > -vel y
value = 52

;========================< SPARKS >=============================
;--- Guard Normal ---
[Statedef 8000]
type = A
physics = N
movetype = I
anim = 8000
velset = 0, 0
sprpriority = 5

[State 8000, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8000, Scale]
type = angledraw
trigger1 = 1
scale = 0.125 + (0.046875 * time), 0.125 + (0.046875 * time)
[State 8000, Trans]
type = trans
trigger1 = time < 4
trans = addalpha
alpha = 256, 256
[State 8000, Trans]
type = trans
trigger1 = time >= 4
trans = addalpha
alpha = 256 - 64 * (time -4), 256

[State 8000, End]
type = destroyself
trigger1 = time >= 8


;--- Guard Special ---
[Statedef 8001]
type = A
physics = N
movetype = I
anim = 8001
velset = 0, 0
sprpriority = 5

[State 8001, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8001, Scale]
type = angledraw
trigger1 = 1
scale = 0.25 + (0.03125 * time), 0.25 + (0.03125 * time)
[State 8001, Trans]
type = trans
trigger1 = time < 4
trans = addalpha
alpha = 256, 256
[State 8001, Trans]
type = trans
trigger1 = time >= 4
trans = addalpha
alpha = 256 - 64 * (time -4), 256

[State 8001, End]
type = destroyself
trigger1 = time >= 8


;--- Weak ---
[Statedef 8010]
type = A
physics = N
movetype = I
anim = 8010
velset = 0, 0
sprpriority = 5

[State 8010, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8010, Angle]
type = angleset
trigger1 = !time
value = 30 * (random % 12)
[State 8010, Angle]
type = angleadd
trigger1 = 1
value = 30
[State 8010, Scale]
type = angledraw
trigger1 = time < 10
scale = 0.3 -(time * 0.03), 0.3 -(time * 0.03)
[State 8010, Scale]
type = angledraw
trigger1 = time >= 10
scale = 0, 0
[State 8010, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8010, Center]
type = explod
trigger1 = !time
anim = 8011
ID = 1
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8010, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 0.15 + (0.009375 * time), 0.15 + (0.009375 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8010, Streaks]
type = explod
trigger1 = !time
anim = 8012
ID = 2
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8010, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 0.15 + (0.009375 * time), 0.15 + (0.009375 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8010, Impact]
type = explod
trigger1 = !time
anim = 8014
ID = 4
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1
[State 8010, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 0.3 -(0.0375 * time), 0.3 -(0.0375 * time)
trans = addalpha
alpha = 128 -(16 * time), 256

[State 8010, End]
type = removeexplod
trigger1 = time >= 16
[State 8010, End]
type = destroyself
trigger1 = time >= 16


;--- Medium ---
[Statedef 8011]
type = A
physics = N
movetype = I
anim = 8010
velset = 0, 0
sprpriority = 5

[State 8011, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8011, Angle]
type = angleset
trigger1 = !time
value = 30 * (random % 12)
[State 8011, Angle]
type = angleadd
trigger1 = 1
value = 30
[State 8011, Scale]
type = angledraw
trigger1 = time < 10
scale = 0.35 -(time * 0.035), 0.35 -(time * 0.035)
[State 8011, Scale]
type = angledraw
trigger1 = time >= 10
scale = 0, 0
[State 8011, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8011, Center]
type = explod
trigger1 = !time
anim = 8011
ID = 1
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8011, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 0.175 + (0.0109375 * time), 0.175 + (0.0109375 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8011, Streaks]
type = explod
trigger1 = !time
anim = 8012
ID = 2
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8011, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 0.175 + (0.0109375 * time), 0.175 + (0.0109375 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8011, Impact]
type = explod
trigger1 = !time
anim = 8014
ID = 4
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1
[State 8011, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 0.35 -(0.04375 * time), 0.35 -(0.04375 * time)
trans = addalpha
alpha = 128 -(16 * time), 256

[State 8011, End]
type = removeexplod
trigger1 = time >= 16
[State 8011, End]
type = destroyself
trigger1 = time >= 16


;--- Strong ---
[Statedef 8012]
type = A
physics = N
movetype = I
anim = 8010
velset = 0, 0
sprpriority = 5

[State 8012, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8012, Angle]
type = angleset
trigger1 = !time
value = 30 * (random % 12)
[State 8012, Angle]
type = angleadd
trigger1 = 1
value = 30
[State 8012, Scale]
type = angledraw
trigger1 = time < 10
scale = 0.4 -(time * 0.04), 0.4 -(time * 0.04)
[State 8012, Scale]
type = angledraw
trigger1 = time >= 10
scale = 0, 0
[State 8012, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8012, Center]
type = explod
trigger1 = !time
anim = 8011
ID = 1
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8012, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 0.2 + (0.0125 * time), 0.2 + (0.0125 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8012, Streaks]
type = explod
trigger1 = !time
anim = 8012
ID = 2
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8012, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 0.2 + (0.0125 * time), 0.2 + (0.0125 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8012, Impact]
type = explod
trigger1 = !time
anim = 8014
ID = 4
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1
[State 8012, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 0.4 -(0.05 * time), 0.4 -(0.05 * time)
trans = addalpha
alpha = 128 -(16 * time), 256

[State 8012, End]
type = removeexplod
trigger1 = time >= 16
[State 8012, End]
type = destroyself
trigger1 = time >= 16


;--- Special ---
[Statedef 8013]
type = A
physics = N
movetype = I
anim = 8010
velset = 0, 0
sprpriority = 5

[State 8013, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8013, Angle]
type = angleset
trigger1 = !time
value = 30 * (random % 12)
[State 8013, Angle]
type = angleadd
trigger1 = 1
value = 30
[State 8013, Scale]
type = angledraw
trigger1 = time < 10
scale = 0.45 -(time * 0.045), 0.45 -(time * 0.045)
[State 8012, Scale]
type = angledraw
trigger1 = time >= 10
scale = 0, 0
[State 8013, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8013, Center]
type = explod
trigger1 = !time
anim = 8011
ID = 1
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8013, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 0.225 + (0.0140625 * time), 0.225 + (0.0140625 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8013, Streaks]
type = explod
trigger1 = !time
anim = 8012
ID = 2
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8013, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 0.225 + (0.0140625 * time), 0.225 + (0.0140625 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8013, P2 Back]
type = explod
trigger1 = !time
anim = 8013
ID = 3
postype = p1
vfacing = ifelse(random < 500, -1, 1)
sprpriority = -3
removetime = 8
pausemovetime = -1
supermovetime = -1
[State 8013, Scale]
type = modifyexplod
trigger1 = numexplod(3)
ID = 3
scale = 0.4, 0.4
trans = addalpha
alpha = 256 -(32 * time), 256

[State 8013, Impact]
type = explod
trigger1 = !time
anim = 8014
ID = 4
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1
[State 8013, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 0.45 -(0.05625 * time), 0.45 -(0.05625 * time)
trans = addalpha
alpha = 192 -(24 * time), 256

[State 8013, End]
type = removeexplod
trigger1 = time >= 16
[State 8013, End]
type = destroyself
trigger1 = time >= 16


;--- Super ---
[Statedef 8014]
type = A
physics = N
movetype = I
anim = 8010
velset = 0, 0
sprpriority = 5

[State 8014, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8014, Angle]
type = angleset
trigger1 = !time
value = 30 * (random % 12)
[State 8014, Angle]
type = angleadd
trigger1 = 1
value = 30
[State 8014, Scale]
type = angledraw
trigger1 = time < 10
scale = 0.5 -(time * 0.05), 0.5 -(time * 0.05)
[State 8012, Scale]
type = angledraw
trigger1 = time >= 10
scale = 0, 0
[State 8014, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8014, Center]
type = explod
trigger1 = !time
anim = 8011
ID = 1
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8014, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 0.25 + (0.015625 * time), 0.25 + (0.015625 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8014, Streaks]
type = explod
trigger1 = !time
anim = 8012
ID = 2
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1
[State 8014, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 0.25 + (0.015625 * time), 0.25 + (0.015625 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8014, P2 Back]
type = explod
trigger1 = !time
anim = 8013
ID = 3
postype = p1
vfacing = ifelse(random < 500, -1, 1)
sprpriority = -3
removetime = 8
pausemovetime = -1
supermovetime = -1
[State 8014, Scale]
type = modifyexplod
trigger1 = numexplod(3)
ID = 3
scale = 0.5, 0.5
trans = addalpha
alpha = 256 -(32 * time), 256

[State 8014, Impact]
type = explod
trigger1 = !time
anim = 8014
ID = 4
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1
[State 8014, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 0.5 -(0.0625 * time), 0.5 -(0.0625 * time)
trans = addalpha
alpha = 256 -(32 * time), 256

[State 8014, End]
type = removeexplod
trigger1 = time >= 16
[State 8014, End]
type = destroyself
trigger1 = time >= 16


;--- Reversal ---
[Statedef 8020]
type = A
physics = N
movetype = I
anim = 8020
velset = 0, 0
sprpriority = 5

[State 8020, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8020, Scale]
type = angledraw
trigger1 = 1
scale = 0.25 + (0.09375 * time), 0.25 + (0.09375 * time)
[State 8020, Trans]
type = trans
trigger1 = time < 4
trans = addalpha
alpha = 256, 256
[State 8020, Trans]
type = trans
trigger1 = time >= 4
trans = addalpha
alpha = 256 - 64 * (time -4), 256

[State 8020, End]
type = destroyself
trigger1 = time >= 8


;========================< DUSTS >=============================
;--- Jump ---
[Statedef 8100]
type = S
anim = 9741
velset = 0, 0

[State 8100, Bind]
type = bindtoroot
trigger1 = time

[State 8100, Dust]
type = explod
trigger1 = !time
anim = 8100
sprpriority = 3
postype = p1
pos = 0, ceil(pos y)
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1
[State 8100, Dust]
type = explod
trigger1 = !time || time = 2 || time = 6
anim = 8101
sprpriority = 3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 8100, End]
type = destroyself
trigger1 = time >= 7


;--- Dash ---
[Statedef 8103]
type = A
anim = 9741
velset = 0, 0
sprpriority = 5

[State 8103, Pos]
type = posset
trigger1 = !time = 0
y = 0

[State 8103, Dust]
type = explod
trigger1 = time = 0 || time = 3 || time = 6
anim = 8103
ID = ifelse((time = 6), 3, ifelse((time = 3), 2, 1))
postype = p1
pos = 0, -4
random = 8, 8
vel = -3 -(random / 1000.0), -2 -(random / 2000.0)
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 16
sprpriority = 3
pausemovetime = -1
supermovetime = -1

[State 8103, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 0.1 + (0.025 * time), 0.1 + (0.025 * time)
trans = addalpha
alpha = 256 -(16 * time), 256
[State 8103, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 0.1 + (0.025 * (time -3)), 0.1 + (0.025 * (time -3))
trans = addalpha
alpha = 256 -(16 * (time -3)), 256
[State 8103, Scale]
type = modifyexplod
trigger1 = numexplod(3)
ID = 3
scale = 0.1 + (0.025 * (time -6)), 0.1 + (0.025 * (time -6))
trans = addalpha
alpha = 256 -(16 * (time -6)), 256

[State 8103, End]
type = removeexplod
trigger1 = time >= 22
[State 8103, End]
type = destroyself
trigger1 = !numexplod


;--- Impact ---
[Statedef 8110]
type = A
anim = 9741
velset = 0, 0
sprpriority = 5

[State 8110, FX]
type = explod
trigger1 = !time
anim = 8110
ID = ifelse(time = 8, 3, ifelse(time = 4, 2, 1))
postype = p1
removetime = 8
sprpriority = -4
pausemovetime = -1
supermovetime = -1
[State 8110, FX]
type = explod
trigger1 = !time
anim = 8111
ID = 2
postype = p1
removetime = 8
sprpriority = -4
pausemovetime = -1
supermovetime = -1

[State 8110, Scale]
type = modifyexplod
trigger1 = 1
scale = 0.25 + (0.03125 * time), 0.25 + (0.03125 * time)
trans = addalpha
alpha = ifelse(time < 4, 256, 256 -(64 * (time -4))), 256

[State 8110, End]
type = removeexplod
trigger1 = time >= 8
[State 8110, End]
type = destroyself
trigger1 = !numexplod

;--- Wall Impact ---
[Statedef 8120]
type = A
anim = 9741
velset = 0, 0
sprpriority = 5

[State 8110, FX]
type = explod
trigger1 = !time
anim = 8120
ID = ifelse(time = 8, 3, ifelse(time = 4, 2, 1))
postype = p1
removetime = 8
sprpriority = -4
pausemovetime = -1
supermovetime = -1
[State 8110, FX]
type = explod
trigger1 = !time
anim = 8121
ID = 2
postype = p1
removetime = 8
sprpriority = -4
pausemovetime = -1
supermovetime = -1

[State 8110, Scale]
type = modifyexplod
trigger1 = 1
scale = 0.25 + (0.03125 * time), 0.25 + (0.03125 * time)
trans = addalpha
alpha = ifelse(time < 4, 256, 256 -(64 * (time -4))), 256

[State 8110, End]
type = removeexplod
trigger1 = time >= 8
[State 8110, End]
type = destroyself
trigger1 = !numexplod


;========================< FLAMES >=============================
[Statedef 8150]
type = A
velset = 0, 0
anim = 9741

[State 8150, player]
type = varset
trigger1 = !time
var(0) = parent, var(40)

[State 8150, Pos]
type = posset
trigger1 = playerIDexist(var(0))
x = ceil(playerID(var(0)), pos x)
y = ceil(playerID(var(0)), pos y) + (playerID(var(0)), const(size.mid.pos.y))
[State 8150, Pos]
type = posset
trigger1 = playerIDexist(var(0))
trigger1 = playerID(var(0)), statetype = L
x = ceil(playerID(var(0)), pos x)
y = ceil(playerID(var(0)), pos y) - 20

[State 8150, facing]
type = turn
trigger1 = playerIDexist(var(0))
trigger1 = facing != (playerID(var(0)), facing)

[State 8150, flames]
type = explod
trigger1 = playerIDexist(var(0))
anim = 8150
sprpriority = 3
postype = p1
random = 40, 40
vel = (random / 2000.0), -.5 -(random / 2000.0)
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
scale = 0.5, 0.5
ownpal = 1
[State 8150, flames]
type = explod
trigger1 = playerIDexist(var(0))
anim = 8150
sprpriority = 3
postype = p1
random = 60, 60
vel = (random / 2000.0), -.5 -(random / 2000.0)
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
scale = 0.5, 0.5
ownpal = 1

[State 8150, End]
type = destroyself
trigger1 = time >= 600
trigger2 = !playerIDexist(var(0))
[State 8150, End]
type = destroyself
triggerall = playerIDexist(var(0))
trigger1 = playerID(var(0)), ctrl
trigger2 = playerID(var(0)), movetype != H || playerID(var(0)), stateno = 5300
trigger3 = playerID(var(0)), statetype = L && (playerID(var(0)), stateno != [5080, 5081])


;========================< SHOCK >=============================
[Statedef 8155]
type = A
velset = 0, 0
anim = 9741

[State 8155, player]
type = varset
trigger1 = !time
var(0) = parent, var(40)

[State 8155, Pos]
type = posset
trigger1 = playerIDexist(var(0))
x = ceil(playerID(var(0)), pos x)
y = ceil(playerID(var(0)), pos y) + (playerID(var(0)), const(size.mid.pos.y))
[State 8155, Pos]
type = posset
trigger1 = playerIDexist(var(0))
trigger1 = playerID(var(0)), statetype = L
x = ceil(playerID(var(0)), pos x)
y = ceil(playerID(var(0)), pos y) - 20

[State 8155, facing]
type = turn
trigger1 = playerIDexist(var(0))
trigger1 = facing != (playerID(var(0)), facing)

[State 8155, flames]
type = explod
trigger1 = playerIDexist(var(0))
anim = 8155
sprpriority = 3
postype = p1
random = 40, 40
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
;bindtime = -1
scale = 0.15, 0.15
ownpal = 1

[State 8155, End]
type = destroyself
trigger1 = time >= 600
trigger2 = !playerIDexist(var(0))
[State 8155, End]
type = destroyself
triggerall = playerIDexist(var(0))
trigger1 = playerID(var(0)), ctrl
trigger2 = playerID(var(0)), movetype != H || playerID(var(0)), stateno = 5300
trigger3 = playerID(var(0)), statetype = L && (playerID(var(0)), stateno != [5080, 5081])


;========================< RECOVER FX >=============================
[Statedef 8200]
type = A
velset = 0, 0
anim = 8200
sprpriority = 5
[State 8200, No Shadow]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8200, Scale]
type = angledraw
trigger1 = 1
scale = 0.25 + (0.017 * time), 0.25 + (0.017 * time)
[State 8200, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = ceil(256 -17.1 * time), 256

[State 8200, End]
type = destroyself
trigger1 = time >= 15


;========================< COUNTER FX >=============================
[Statedef 8290]
type = A
physics = N
velset = 0, 0
anim = 9741

[State 8290, Circle]
type = explod
trigger1 = !numexplod(8290)
anim = 8290
ID = 8290
sprpriority = 64
postype = p1
facing = facing
removetime = 32
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 8290, Scale]
type = modifyexplod
trigger1 = time < 8
ID = 8290
scale = 0.5, 0.5
trans = addalpha
alpha = 256, 0
[State 8290, Scale]
type = modifyexplod
trigger1 = time >= 8
ID = 8290
scale = 0.5 + .0625 * (time -8), 0.5 + .0625 * (time -8)
trans = addalpha
alpha = 256 -32 * (time -8), 32 * (time -8)

[State 8290, Safety]
type = removeexplod
trigger1 = time >= 16
[State 8290, End]
type = destroyself
trigger1 = time >= 16


;====================< POWER CHARGE >====================
;--- MAIN FX ---
[Statedef 8330]
type = A
physics = N
movetype = I
anim = 9741
ctrl = 0
velset = 0, 0

[State 8330, Bind]
type = bindtoroot
trigger1 = (root, stateno = 730)
pos = -7, 0
[State 8330, Snd]
type = playsnd
trigger1 = !time
value = 0, 730
channel = 0

[State 8330, Aura]
type = explod
trigger1 = !numexplod(8330)
ID = 8330
anim = 8330
sprpriority = 3
postype = p1
bindtime = -1
removetime = -1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1
[State 8330, Dust]
type = explod
trigger1 = !(time % 6)
anim = 8105
sprpriority = -3
postype = p1
pos = 0, -ceil(pos y)
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 8330, FX]
type = modifyexplod
trigger1 = numexplod(8330) && root, power < 3000
ID = 8330
scale = 0.5, 0.1 + 0.4 * (root, power / 3000.0)
[State 8330, FX]
type = modifyexplod
trigger1 = numexplod(8330) && root, power >= 3000
ID = 8330
scale = 0.5, 0.5

[State 8330, End]
type = stopsnd
trigger1 = root, stateno != 730
channel = 0
[State 8330, End]
type = removeexplod
trigger1 = root, stateno != 730
[State 8330, End]
type = destroyself
trigger1 = root, stateno != 730


;--- Particles ---
[Statedef 8331]
type = A
physics = N
movetype = I
anim = 9741
ctrl = 0
velset = 0, 0

[State 8331, Bind]
type = bindtoroot
trigger1 = !(time % 8)
pos = ceil(-169 + (random / 3.125)), ceil(98 -(random / 3.125))

[State 8331, Particle]
type = explod
trigger1 = (time % 8) = 1
anim = 8331
sprpriority = ifelse(random < 750, 5, -1)
postype = p1
vel = ((rootdist x + -9) / 32.0), ((rootdist y -62) / 32.0)
scale = ifelse(random < 500, 0.5, -.5), ifelse(random < 500, 0.5, -.5)
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 8331, End]
type = removeexplod
trigger1 = root, stateno != 730
[State 8331, End]
type = destroyself
trigger1 = root, stateno != 730


;====================< ZERO COUNTER PAUSE >====================
[Statedef 8350]
type = A
physics = N
movetype = I
anim = 9741
ctrl = 0
velset = 0, 0

[State 8350, BG PalFX]
type = bgpalfx
trigger1 = 1
time = 1
color = 16 * time
mul = 16 * time, 16 * time, 16 * time

[State 8350, Circle]
type = explod
trigger1 = !time
anim = 8350
ID = 1
sprpriority = 3
postype = p1
removetime = 16
supermovetime = -1
ownpal = 1

[State 8350, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = (0.0625 * time), (0.0625 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8350, Lightning]
type = explod
trigger1 = !time
anim = 8351
ID = 2
sprpriority = -2
postype = p1
pos = 0, -ceil(pos y)
supermovetime = -1
ownpal = 1

[State 8350, End]
type = destroyself
trigger1 = time >= 16


;========================< CUSTOM COMBO >=============================
[Statedef 8400]
type = A
physics = N
movetype = I
anim = 8400
ctrl = 0
velset = 0, 0
sprpriority = 5

[State 8400, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8400, BG PalFX]
type = bgpalfx
trigger1 = time < 25
time = 1
mul = 128, 128, 128

[State 8400, Rotate]
type = angleset
trigger1 = !time
value = 6 * (random % 60)
[State 8400, Rotate]
type = angleadd
trigger1 = 1
value = -6

[State 8400, Scale]
type = angledraw
trigger1 = time < 8
scale = (0.0625 * time), (0.0625 * time)
[State 8400, Scale]
type = angledraw
trigger1 = time >= 8
scale = 0.5, 0.5
[State 8400, Trans]
type = trans
trigger1 = time < 16
trans = addalpha
alpha = 256, 256
[State 8400, Trans]
type = trans
trigger1 = time >= 16
trans = addalpha
alpha = ceil(256 - 25.6 * (time -16)), 256

[State 8400, Lines]
type = explod
trigger1 = !time
anim = 8401
ID = 1
sprpriority = 5
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 16
supermovetime = -1

[State 8400, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 2 -(0.125 * time), 2 -(0.125 * time)
trans = addalpha
alpha = ifelse(time < 4, 64 * time, 256), 256

[State 8400, Circle]
type = explod
trigger1 = time = 16
anim = 8402
ID = 2
sprpriority = 5
postype = p1
removetime = 32
supermovetime = -1

[State 8400, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = (0.1 * (time -16)), (0.1 * (time -16))
trans = addalpha
alpha = ceil(256 - 25.6 * (time -16)), 256

[State 8400, Safety]
type = removeexplod
trigger1 = time >= 26
[State 8400, End]
type = destroyself
trigger1 = time >= 26


;========================< SUPERPAUSE FX >=============================
;--- --Level 1 -----
[Statedef 8500]
type = A
velset = 0, 0
anim = 8500
sprpriority = 5

[State 8500, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8500, BG PalFX]
type = bgpalfx
trigger1 = time < 39
time = 1
color = 0
mul = 0, 0, 256

[State 8500, Rotate]
type = angleset
trigger1 = !time
value = 6 * (random % 60)
[State 8500, Rotate]
type = angleadd
trigger1 = 1
value = -6

[State 8500, Scale]
type = angledraw
trigger1 = time < 16
scale = (0.03125 * time), (0.03125 * time)
[State 8500, Scale]
type = angledraw
trigger1 = time >= 16
scale = 0.5, 0.5
[State 8500, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8500, Lines]
type = explod
trigger1 = time = 0 || time = 8 || time = 16 || time = 24
anim = 8501
ID = ifelse(time = 24, 4, ifelse(time = 16, 3, ifelse(time = 8, 2, 1)))
sprpriority = 5
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 16
supermovetime = -1

[State 8500, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 1 -(0.0625 * time), 1 -(0.0625 * time)
trans = addalpha
alpha = ifelse(time < 4, 64 * time, 256), 256
[State 8500, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 1 -(0.0625 * (time -8)), 1 -(0.0625 * (time -8))
trans = addalpha
alpha = ifelse((time -8) < 4, 64 * (time -8), 256), 256
[State 8500, Scale]
type = modifyexplod
trigger1 = numexplod(3)
ID = 3
scale = 1 -(0.0625 * (time -16)), 1 -(0.0625 * (time -16))
trans = addalpha
alpha = ifelse((time -16) < 4, 64 * (time -16), 256), 256
[State 8500, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 1 -(0.0625 * (time -24)), 1 -(0.0625 * (time -24))
trans = addalpha
alpha = ifelse((time -24) < 4, 64 * (time -24), 256), 256

[State 8500, Circle]
type = explod
trigger1 = time = 24
anim = 8502
ID = 10
sprpriority = 5
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 32
supermovetime = -1

[State 8500, Scale]
type = modifyexplod
trigger1 = numexplod(10)
ID = 10
scale = 2 -(0.125 * (time -24)), 2 -(0.125 * (time -24))
trans = addalpha
alpha = ifelse((time -24) < 4, 64 * (time -24), 256), 256

[State 8500, Safety]
type = removeexplod
trigger1 = time >= 40
[State 8500, End]
type = destroyself
trigger1 = time >= 40


;--- --Level 2 -----
[Statedef 8510]
type = A
velset = 0, 0
anim = 8510
sprpriority = 5

[State 8510, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8510, BG PalFX]
type = bgpalfx
trigger1 = time < 39
time = 1
color = 0
mul = 192, 0, 256

[State 8510, Rotate]
type = angleset
trigger1 = !time
value = 6 * (random % 60)
[State 8510, Rotate]
type = angleadd
trigger1 = 1
value = -6

[State 8510, Scale]
type = angledraw
trigger1 = time < 16
scale = (0.03125 * time), (0.03125 * time)
[State 8510, Scale]
type = angledraw
trigger1 = time >= 16
scale = 0.5, 0.5
[State 8510, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8510, Lines]
type = explod
trigger1 = time = 0 || time = 8 || time = 16 || time = 24
anim = 8511
ID = ifelse(time = 24, 4, ifelse(time = 16, 3, ifelse(time = 8, 2, 1)))
sprpriority = 5
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 16
supermovetime = -1

[State 8510, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 1 -(0.0625 * time), 1 -(0.0625 * time)
trans = addalpha
alpha = ifelse(time < 4, 64 * time, 256), 256
[State 8510, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 1 -(0.0625 * (time -8)), 1 -(0.0625 * (time -8))
trans = addalpha
alpha = ifelse((time -8) < 4, 64 * (time -8), 256), 256
[State 8510, Scale]
type = modifyexplod
trigger1 = numexplod(3)
ID = 3
scale = 1 -(0.0625 * (time -16)), 1 -(0.0625 * (time -16))
trans = addalpha
alpha = ifelse((time -16) < 4, 64 * (time -16), 256), 256
[State 8510, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 1 -(0.0625 * (time -24)), 1 -(0.0625 * (time -24))
trans = addalpha
alpha = ifelse((time -24) < 4, 64 * (time -24), 256), 256

[State 8510, Circle]
type = explod
trigger1 = time = 24
anim = 8512
ID = 10
sprpriority = 5
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 32
supermovetime = -1

[State 8510, Scale]
type = modifyexplod
trigger1 = numexplod(10)
ID = 10
scale = 2 -(0.125 * (time -24)), 2 -(0.125 * (time -24))
trans = addalpha
alpha = ifelse((time -24) < 4, 64 * (time -24), 256), 256

[State 8510, Safety]
type = removeexplod
trigger1 = time >= 40
[State 8510, End]
type = destroyself
trigger1 = time >= 40


;--- --Level 3 -----
[Statedef 8520]
type = A
velset = 0, 0
anim = 8520
sprpriority = 5

[State 8520, Assert]
type = assertspecial
trigger1 = 1
flag = noshadow
[State 8520, Assert]
type = assertspecial
trigger1 = time < 40
flag = nobardisplay
flag2 = noBG
flag3 = noFG

[State 8520, Rotate]
type = angleset
trigger1 = !time
value = 6 * (random % 60)
[State 8520, Rotate]
type = angleadd
trigger1 = 1
value = -6

[State 8520, Scale]
type = angledraw
trigger1 = time < 16
scale = (0.03125 * time), (0.03125 * time)
[State 8520, Scale]
type = angledraw
trigger1 = time >= 16
scale = 0.5, 0.5
[State 8520, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 8520, Portrait]
type = explod
trigger1 = !time
anim = 8525
ID = 20
sprpriority = -16
postype = back
removetime = 40
supermovetime = -1
[State 8520, Portrait]
type = explod
trigger1 = !time
anim = 8525
ID = 21
sprpriority = -16
postype = back
removetime = 40
supermovetime = -1

[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(20) && time < 16
ID = 20
postype = back
pos = floor(gamewidth/2), floor(gameheight/2)
scale = (1 - (0.03125 * time))*floor(gameheight/240), (1 - (0.03125 * time))*floor(gameheight/240)
trans = addalpha
alpha = (8 * time), 256
[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(21) && time < 16
ID = 21
postype = back
pos = floor(gamewidth/2), floor(gameheight/2)
scale = (2 - (0.09375 * time))*floor(gameheight/240), (2 - (0.09375 * time))*floor(gameheight/240)
trans = addalpha
alpha = (8 * time), 256

[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(20) && (time = [16, 32])
ID = 20
postype = back
pos = floor(gamewidth/2), floor(gameheight/2)
scale = 0.5*floor(gameheight/240), 0.5*floor(gameheight/240)
trans = addalpha
alpha = 256, 256
[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(21) && (time = [16, 32])
ID = 21
scale = 0, 0

[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(20) && time >= 32
ID = 20
postype = back
pos = floor(gamewidth/2) + (8 * (time -32)), floor(gameheight/2)
scale = 0.5*floor(gameheight/240), 0.5*floor(gameheight/240)
trans = addalpha
alpha = 128 - 16 * (time -32), 256
[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(21) && time >= 32
ID = 21
postype = back
pos = floor(gamewidth/2) - (8 * (time -32)), floor(gameheight/2)
scale = 0.5*floor(gameheight/240), 0.5*floor(gameheight/240)
trans = addalpha
alpha = 128 - 16 * (time -32), 256

[State 8520, Lines]
type = explod
trigger1 = time = 0 || time = 8 || time = 16 || time = 24
anim = 8521
ID = ifelse(time = 24, 4, ifelse(time = 16, 3, ifelse(time = 8, 2, 1)))
sprpriority = 5
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 16
supermovetime = -1

[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(1)
ID = 1
scale = 1 -(0.0625 * time), 1 -(0.0625 * time)
trans = addalpha
alpha = ifelse(time < 4, 64 * time, 256), 256
[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(2)
ID = 2
scale = 1 -(0.0625 * (time -8)), 1 -(0.0625 * (time -8))
trans = addalpha
alpha = ifelse((time -8) < 4, 64 * (time -8), 256), 256
[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(3)
ID = 3
scale = 1 -(0.0625 * (time -16)), 1 -(0.0625 * (time -16))
trans = addalpha
alpha = ifelse((time -16) < 4, 64 * (time -16), 256), 256
[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(4)
ID = 4
scale = 1 -(0.0625 * (time -24)), 1 -(0.0625 * (time -24))
trans = addalpha
alpha = ifelse((time -24) < 4, 64 * (time -24), 256), 256

[State 8520, Circle]
type = explod
trigger1 = time = 24
anim = 8522
ID = 10
sprpriority = 5
postype = p1
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 32
supermovetime = -1

[State 8520, Scale]
type = modifyexplod
trigger1 = numexplod(10)
ID = 10
scale = 2 -(0.125 * (time -24)), 2 -(0.125 * (time -24))
trans = addalpha
alpha = ifelse((time -24) < 4, 64 * (time -24), 256), 256

[State 8520, Safety]
type = removeexplod
trigger1 = time >= 40
[State 8520, End]
type = destroyself
trigger1 = time >= 40


;========================< SUPER FINISH >=============================
[Statedef 8600]
type = A
velset = 0, 0
anim = 9741

[State 8600, Sound]
type = playsnd
trigger1 = !time
value = 0, 8600
channel = 1

[State 8600, Snd]
type = sndpan
trigger1 = time <= 80
channel = 1
abspan = ceil(sin(gametime / 20.0 * pi) * 160)

[State 8600, Snd]
type = assertspecial
trigger1 = time <= 80
flag = nomusic

[State 8600, BG PalFX]
type = bgpalfx
trigger1 = time < 16
time = 1
mul = 0, 0, 0
[State 8600, BG PalFX]
type = bgpalfx
trigger1 = time = [16, 24)
time = 1
mul = 32 * (time -16), 32 * (time -16), 32 * (time -16)

[State 8600, Move Name]
type = varset
trigger1 = !time && root, var(23) = 900
var(0) = 1
[State 8600, Move Name]
type = varset
trigger1 = !time && root, var(23) = 3000
var(0) = 2
[State 8600, Move Name]
type = varset
trigger1 = !time && root, var(23) = 3050
var(0) = 3
[State 8600, Move Name]
type = varset
trigger1 = !time && (root, var(23) = 3100)
var(0) = 4
[State 8600, Move Name]
type = varset
trigger1 = !time && root, var(23) = 3200
var(0) = 6
[State 8600, Move Name]
type = varset
trigger1 = !time && (root, var(23) = [3300, 3350])
var(0) = 5
[State 8600, Move Name]
type = varset
trigger1 = !time && root, var(23) = 3351
var(0) = 7
[State 8600, Move Name]
type = varset
trigger1 = !time && root, var(23) = 3400
var(0) = 8

[State 8600, MvC]
type = explod
trigger1 = !time
anim = 8600
ID = 8600
ontop = 1
postype = left
pos = 160, floor((1.3333333 * gameheight / gamewidth) * 120)
scale = 0.5, 0.5 * (1.3333333 * gameheight / gamewidth)
bindtime = -1
removetime = 32
pausemovetime = -1
supermovetime = -1

[State 8600, Fade]
type = modifyexplod
trigger1 = numexplod(8600)
ID = 8600
trans = addalpha
alpha = ifelse(time < 16, 256, 256 -32 * (time -16)), 256

[State 8600, Text]
type = explod
trigger1 = !time && var(0)
anim = 8610 + var(0)
ID = 10
ontop = 1
postype = left
pos = 160, floor((1.3333333 * gameheight / gamewidth) * 120)
scale = 0.5, 0.5 * (1.3333333 * gameheight / gamewidth)
bindtime = -1
removetime = 32
pausemovetime = -1
supermovetime = -1
[State 8600, Text]
type = explod
trigger1 = !time && var(0)
anim = 8610 + var(0)
ID = 11
ontop = 1
postype = left
pos = 160, floor((1.3333333 * gameheight / gamewidth) * 120)
scale = 0.5, 0.5 * (1.3333333 * gameheight / gamewidth)
bindtime = -1
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8600, Fade]
type = modifyexplod
trigger1 = numexplod(10)
ID = 10
trans = addalpha
alpha = ifelse(time < 16, 256, 256 -32 * (time -16)), ifelse(time < 16, 0, 32 * (time -16))
[State 8600, Fade]
type = modifyexplod
trigger1 = numexplod(11)
ID = 11
scale = 0.5 + (0.0625 * time), 0.5 + (0.0625 * time)
trans = addalpha
alpha = 256 - (32 * time), 32 * time

[State 8600, Circle]
type = explod
trigger1 = !time
anim = 8601
ID = 8601
under = 1
postype = left
pos = 160, floor((1.3333333 * gameheight / gamewidth) * 120)
bindtime = -1
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8600, Fade]
type = modifyexplod
trigger1 = numexplod(8601)
ID = 8601
scale = (0.25 * time) * (1.3333333 * gameheight / gamewidth), (0.25 * time) * (1.3333333 * gameheight / gamewidth)
trans = addalpha
alpha = 256 - (16 * time), 256

[State 8600, Assert]
type = assertspecial
trigger1 = time < 16
flag = noFG
[State 8600, Assert]
type = assertspecial
trigger1 = time < 24
flag = nobardisplay

[State 8600, End]
type = removeexplod
trigger1 = time >= 24
trigger2 = roundstate < 3
[State 8600, End]
type = destroyself
trigger1 = roundstate < 3


;========================< CAMERA CONTROL >=============================
[Statedef 8999]
type = S
velset = 0, 0
anim = 9741
[State 8999, bound]
type = screenbound
trigger1 = 1
value = 0
movecamera = 1, 1
[State 8999, End]
type = destroyself
trigger1 = roundstate = 2



;===========================================================================
;===============================< -2 STATES >=================================
;===========================================================================
[Statedef -2]

[State 0, VarSet]
type = VarSet
trigger1 = numtarget(1550)
trigger1 = target(1550),stateno=1561
trigger1 = target(1550),backedgebodydist <= 10 || target(1550),frontedgebodydist <= 10
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = !numtarget
var(1) = 0
[State 871, Sound]
type = playsnd
trigger1=numtarget(1550)
trigger1=target(1550),stateno=1561
trigger1 = target(1550),backedgebodydist <= 10 || target(1550),frontedgebodydist <= 10
value = 0, 5100
[State 871, Shake]
type = envshake
trigger1=numtarget(1550)
trigger1=target(1550),stateno=1561
trigger1 = target(1550),backedgebodydist <= 10 || target(1550),frontedgebodydist <= 10
time = 14
ampl = -4
freq = 120
[state -2,Helper]
type=helper
trigger1=numtarget(1550)  && !numhelper(8120)
trigger1=target(1550),stateno=1561
trigger1 = target(1550),backedgebodydist <= 10 || target(1550),frontedgebodydist <= 10
helpertype=normal
name="Spark"
ID=8120
stateno=8120
postype=p2
pos=0,target(1550),const(size.mid.pos.y)
facing=-1
ownpal=1
size.xscale=.5
size.yscale=.5

[State 871, Sound]
type = playsnd
trigger1=numtarget(1450)
trigger1=target(1450),stateno=1455
trigger1 = target(1450),Vel Y > 0
trigger1 = target(1450),Pos Y >= 5
value = 0, 5100
[State 871, Shake]
type = envshake
trigger1=numtarget(1450)
trigger1=target(1450),stateno=1455
trigger1 = target(1450),Vel Y > 0
trigger1 = target(1450),Pos Y >= 0
time = 14
ampl = -4
freq = 120
[state -2,Helper]
type=helper
trigger1 = numtarget(1450) && !numhelper(8111)
trigger1 = target(1450),stateno=1455
trigger1 = target(1450),Vel Y > 0
trigger1 = target(1450),Pos Y >= 0
helpertype=normal
name="Spark"
ID=8111
stateno=8110
postype=p2
pos=0,-floor(target(1450),pos y)
facing=1
ownpal=1
size.xscale=.5
size.yscale=.5
[State 0, VarSet]
type = VarSet
trigger1 = numtarget(1450)
trigger1 = target(1450),stateno=1455
trigger1 = target(1450),Vel Y > 0
trigger1 = target(1450),Pos Y >= 0
var(2) = 1
[State 0, VarSet]
type = VarSet
trigger1 = !numtarget
var(2) = 0

[State -2, Hit Detection]
type = varset
trigger1 = movecontact = 1 && var(30) < 0
var(30) = hitpausetime
ignorehitpause = 1

[State -2, HitSound]
type = playsnd
trigger1 = movecontact = 1 && var(30) = hitpausetime
trigger1 = movehit = 1 && var(31) >= 0
value = 2, var(31)
channel = 2
ignorehitpause = 1
[State -2, GuardSound]
type = playsnd
trigger1 = movecontact = 1 && var(30) = hitpausetime
trigger1 = moveguarded = 1 && var(32) >= 0
value = 3, var(32)
channel = 2
ignorehitpause = 1

[State -2, Sparks]
type = helper
triggerall = movecontact = 1 && var(30) = hitpausetime
trigger1 = movehit = 1 && numenemy
trigger1 = var(33) = 8010 || var(33) = 8011 || var(33) = 8012 || var(33) = 8013 || var(33) = 8014
trigger2 = moveguarded = 1 && numenemy
trigger2 = var(34) = 8000 || var(34) = 8001
helpertype = normal
stateno = ifelse(moveguarded, var(34), var(33))
ID = 8000
name = "Spark"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < var(35), ceil(p2dist x), var(35))), var(36)
facing = -1
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State -2, Counter FX]
type = helper
trigger1 = movehit = 1 && var(30) = hitpausetime
trigger1 = numenemy && var(9)
trigger1 = !(hitdefattr = SCA, AT) && (stateno != [1200, 1299]) && (stateno != [3400, 3499])
helpertype = normal
stateno = 8290
ID = 8290
name = "Counter FX"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < var(35), ceil(p2dist x), var(35))), var(36)
facing = -1
ownpal = 1
pausemovetime = 255
supermovetime = 255
ignorehitpause = 1
[State -2, Counter Flag]
type = varset
trigger1 = numenemy
var(9) = (enemynear, movetype = A)
ignorehitpause = 1

[State -2, Hit Detection]
type = varset
trigger1 = 1
var(30) = -1
[State -2, Hit Detection]
type = varrangeset
trigger1 = movetype = I 
trigger2 = movetype = H && time
first = 30
last = 36
value = -1
ignorehitpause = 1

[State -2, P2 Facing]
type = targetfacing
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover) && !(target, hitfall) && (target, time <= 1)
value = ifelse(p2dist x >= 0, -1, 1)
ignorehitpause = 1

[State -2, P2 Safe Fall]
type = targetstate
trigger1 = numtarget = 1
trigger1 = target, command = "recovery"
trigger1 = target, pos y >= -48 && 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

[State -2, Prevent Guard]
type = assertspecial
trigger1 = var(17) > 0
trigger1 = var(17) := (var(17) -1)
flag = unguardable
ignorehitpause = 1

[State -2, Hitcount]
type = varadd
trigger1 = movehit = 1
trigger1 = !(hitdefattr = SCA, AT)
var(13) = 1
[State -2, Hitcount Reset]
type = varset
trigger1 = numenemy && var(13)
trigger1 = (enemynear, movetype != H) && (enemynear, stateno != 5300)
var(13) = 0
ignorehitpause = 1

[State -2, Juggle Count]
type = varadd
trigger1 = movehit = 1
trigger1 = !(hitdefattr = SCA, AT)
var(15) = 1
[State -2, Juggle Reset Single]
type = varset
triggerall = numenemy = 1 && var(15)
trigger1 = (enemy, statetype != A) && (enemy, stateno != [5100, 5109]) && (enemy, time >= 1)
trigger2 = (enemy, movetype != H) || (enemy, stateno = [120, 155]) || (enemy, ctrl)
var(15) = 0
ignorehitpause = 1
[State -2, Juggle Reset Simul]
type = varset
triggerall = numenemy >= 2 && var(15)
trigger1 = (enemynear(0), statetype != A) && (enemynear(0), time >= 1)
trigger2 = (enemynear(0), movetype != H) || (enemynear(0), stateno = [120, 155]) || (enemynear(0), ctrl)
trigger3 = (enemynear(1), statetype != A) && (enemynear(0), time >= 1)
trigger4 = (enemynear(1), movetype != H) || (enemynear(0), stateno = [120, 155]) || (enemynear(0), ctrl)
var(15) = 0
ignorehitpause = 1
[State -2, Free Juggling]
type = varset
trigger1 = roundstate != 2
var(15) = 0
ignorehitpause = 1

[State -2, Juggle Flag]
type = varset
trigger1 = numenemy && !var(16)
trigger1 = (enemynear, stateno = 5040) && !(enemynear, ctrl)
var(16) = 1
ignorehitpause = 1
[State -2, Juggle Flag Reset Single]
type = varset
triggerall = numenemy = 1 && var(16)
trigger1 = (enemy, movetype != H) && (enemy, stateno != 5040)
trigger2 = !(enemy, hitshakeover) || (enemy, statetype = L) || (enemy, ctrl)
var(16) = 0
ignorehitpause = 1
[State -2, Juggle Flag Reset Simul]
type = varset
triggerall = numenemy >= 2 && var(16)
trigger1 = (enemynear(0), movetype != H) && (enemynear(0), stateno != 5040)
trigger2 = !(enemynear(0), hitshakeover) || (enemynear(0), statetype = L) || (enemynear(0), ctrl)
trigger3 = (enemynear(1), movetype != H) && (enemynear(1), stateno != 5040)
trigger4 = !(enemynear(1), hitshakeover) || (enemynear(1), statetype = L) || (enemynear(1), ctrl)
var(16) = 0
ignorehitpause = 1

[State -2, Custom Combo End]
type = varset
trigger1 = var(20) < 0
trigger2 = movetype = H
trigger3 = roundstate != 2
trigger4 = (stateno = [3000, 4999])
var(20) = 0
ignorehitpause = 1
[State -2, Custom Combo Time]
type = varadd
trigger1 = var(20) > 0
var(20) = -1
ignorehitpause = 1

[State -2, Custom Combo Asserts]
type = assertspecial
trigger1 = var(20) > 0
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State -2, Custom Combo PalFX]
type = palfx
trigger1 = var(20) > 60
time = 2
add = 32 + ceil(sin(var(20) / 16.0 * pi) * 32), 32 + ceil(sin(var(20) / 16.0 * pi) * 32), 32 + ceil(sin(var(20) / 16.0 * pi) * 32)
ignorehitpause = 1
[State -2, Custom Combo PalFX]
type = palfx
trigger1 = var(20) = [1, 60]
time = 2
add = 64 + ceil(sin(var(20) / 8.0 * pi) * 64), 64 + ceil(sin(var(20) / 8.0 * pi) * 64), 64 + ceil(sin(var(20) / 8.0 * pi) * 64)
ignorehitpause = 1

[State -2, Throws Disallowed]
type = varset
triggerall = numenemy
trigger1 = enemynear, movetype != H
trigger1 = enemynear, stateno != 140
trigger1 = (enemynear, ctrl && enemynear, time >= 1) || (enemynear, time >= 8)
trigger2 = enemynear, movetype = A
trigger3 = (enemynear, stateno != [0, 52]) && (enemynear, stateno != [120, 155]) && (enemynear, stateno != [5000, 5120])
trigger4 = var(20) || var(21) || var(22)
var(38) = 0
[State -2, Throws Disallowed]
type = varset
triggerall = numenemy
trigger1 = enemynear, stateno = [150, 155]
trigger2 = (enemynear, stateno = 51 || enemynear, stateno = 140) && (enemynear, prevstateno = [150, 155])
trigger3 = enemynear, movetype = H && enemynear, statetype != A && !var(20) && !var(21) && !var(22)
trigger4 = (enemynear, stateno = [5020, 5040]) && enemynear, hitfall = 0
trigger5 = enemynear, stateno = 40 && enemynear, prevstateno != 52 && (enemynear, anim != [0, 29])
var(38) = 1
ignorehitpause = 1

[State -2, Dampener]
type = varset
trigger1 = 1
fvar(10) = ifelse(var(13) < 6, 24, ifelse(var(13) >= 23, 1, 29 -var(13))) / 24.0
ignorehitpause = 1
[State -2, Dampener - Custom Combo]
type = varset
trigger1 = var(20)
fvar(10) = 0.72 * (10 - ifelse(var(13) >= 10, 10, var(13))) / 10.0
ignorehitpause = 1
[State -2, Dampener - Custom Combo Limiter]
type = varset
trigger1 = var(20)
trigger1 = stateno = 225 || stateno = 255
fvar(10) = ifelse(var(13), 0, 0.72)
ignorehitpause = 1
[State -2, Dampener - Supers]
type = varset
trigger1 = (stateno = [3000, 4999])
fvar(10) = ifelse(var(22), 0.6, ifelse(var(21), 0.8, 1.0))
ignorehitpause = 1

[State -2, Dampener Limit]
type = varset
trigger1 = fvar(10) < 0
fvar(10) = 0
ignorehitpause = 1
[State -2, Root Dampener]
type = varset
trigger1 = 1
fvar(11) = fvar(10) * ifelse(var(9), 1.2, 1)
ignorehitpause = 1

[State -2, Down Charge]
type = varadd
trigger1 = !AIlevel
trigger1 = command = "holddown"
trigger2 = AIlevel
var(49) = 1
[State -2, Down Charge]
type = varset
trigger1 = !AIlevel
trigger1 = command != "holddown"
trigger3 = AIlevel
trigger3 = stateno = 0 || stateno = 20 || (stateno = 40 && time = 1) || stateno = 760
trigger4 = AIlevel
trigger4 = (stateno = [1000, 4999]) && time = 1
trigger5 = AIlevel
trigger5 = (stateno = [120, 155]) && statetype != C
var(49) = 0

[State -2, Down Charge Buffer]
type = varset
trigger1 = var(49) >= 45
var(50) = 32
[State -2, Down Charge Buffer]
type = varadd
trigger1 = var(49) < 45 && var(50) > 0
var(50) = -1

[State -2, Voice Pos]
type = sndpan
trigger1 = 1
channel = 0
pan = 0
ignorehitpause = 1

[State -2, Debug]
type = displaytoclipboard
trigger1 = 1
text = "AI = %d Attack = %f Hits = %d Juggle = %d"
params = AIlevel, fvar(11), var(13), pos x
ignorehitpause = 1

[State -2, Debug]
type = appendtoclipboard
trigger1 = 1
text = "\ni hate you all"
ignorehitpause = 1


;===========================================================================
;===============================< -3 STATES >=================================
;===========================================================================
[Statedef -3]


[State 5900, Helper]
type = Helper
trigger1 = !numhelper(9999)
helpertype = normal ;player
name = "Options"
ID = 9999
stateno = 9999
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State -3, Gametime Var]
type = varset
trigger1 = 1
var(58) = gametime
ignorehitpause = 1

[State -3, ProjContact Reset]
type = varset
triggerall = var(18)
trigger1 = (stateno != [1000, 1030]) && (stateno != [1300, 1301]) && (stateno != [3001, 3002])
trigger1 = (stateno != [3051, 3052]) && stateno != 3300 && (stateno != [3350, 3351]) && stateno != 3420
trigger2 = (stateno = [1000, 1030]) && animelemtime(4) < 0
trigger3 = stateno = 1300 && animelemtime(5) < 0
trigger4 = (stateno = 1320 || stateno = 1321) && animelemtime(3) < 0
trigger5 = stateno = 3300 && animelemtime(3) < 0
trigger6 = stateno = 3350 && animelemtime(3) < 0
trigger7 = stateno = 3420 && animelemtime(7) < 0
var(18) = 0

[State -3, Projectile Flag]
type = varset
trigger1 = 1
var(39) = 0
ignorehitpause = 1
[State -3, Projectile Flag]
type = varset
triggerall = var(20) <= 0
trigger1 = numhelper(1015)
trigger1 = helper(1015), stateno = 1015
trigger2 = numhelper(1065)
trigger2 = helper(1065), stateno = 1065
trigger3 = numhelper(3010)
trigger3 = helper(3010), stateno = 3010
trigger4 = numhelper(3060);|| numhelper(3061) || numhelper(3062)
trigger4 = helper(3060), stateno = 3010
trigger5 = numhelper(3061)
trigger5 = helper(3061), stateno = 3010
trigger5 = numhelper(3062)
trigger5 = helper(3062), stateno = 3010
trigger6 = numhelper(3425)
trigger6 = helper(3425), stateno = 3425
var(39) = 1
ignorehitpause = 1

[State -3, Chain Reset]
type = varset
trigger1 = 1
var(4) = 0
ignorehitpause = 1
[State -3, Chain Check]
type = varset
trigger1 = var(20) && (stateno = [200, 699]) && movecontact
trigger2 = var(20) && (stateno = [1000, 2999]) && statetype != A && (movecontact || var(18))
trigger3 = var(20) && stateno = 1210 && animelemtime(8) >= 0
trigger4 = var(20) && stateno = 1230 && animelemtime(12) >= 0
trigger5 = var(20) && stateno = 1250 && animelemtime(9) >= 0
var(4) = 1
ignorehitpause = 1

[State -3, Command Cancel Reset]
type = varset
trigger1 = 1
var(5) = 0
ignorehitpause = 1
[State -3, Command Cancel Check]
type = varset
triggerall = !var(20)
trigger1 = stateno = 221 && movecontact && animelemtime(7) < 0
var(5) = 1
ignorehitpause = 1

[State -3, Cancel Reset]
type = varset
trigger1 = 1
var(6) = 0
ignorehitpause = 1
[State -3, Cancel Check]
type = varset
trigger1 = var(20) && (stateno = [200, 699])
trigger2 = var(20) && (stateno = [1000, 2999]) && (movecontact || var(18))
trigger3 = (stateno = [200, 699]) && time <= 2
trigger4 = stateno = 200
trigger5 = stateno = 210 && animelemtime(5) < 0
trigger6 = stateno = 211 && animelemtime(5) < 0
trigger7 = stateno = 221 && animelemtime(7) < 0
trigger8 = stateno = 226 && animelemtime(7) < 0
trigger9 = stateno = 231
trigger10 = stateno = 241 && animelemtime(4) < 0
trigger11 = stateno = 251 && animelemtime(6) < 0
trigger12 = stateno = 400
trigger13 = stateno = 410 && animelemtime(5) < 0
trigger14 = stateno = 430
trigger15 = stateno = 440 && animelemtime(5) < 0
trigger16 = stateno = 425 && animelemtime(6) < 0
var(6) = 1
ignorehitpause = 1

[State -3, Super Cancel Reset]
type = varset
trigger1 = 1
var(7) = 0
ignorehitpause = 1
[State -3, Super Cancel Check]
type = varset
trigger1 = var(20) && (stateno = [200, 699])
trigger2 = var(20) && (stateno = [1000, 2999]) && (movecontact || var(18))
trigger3 = (stateno = [200, 699]) && time <= 2
trigger4 = stateno = 200
trigger5 = stateno = 210 && animelemtime(5) < 0
trigger6 = stateno = 211 && animelemtime(5) < 0
trigger7 = stateno = 221 && animelemtime(6) < 0
trigger8 = stateno = 226 && animelemtime(7) < 0
trigger9 = stateno = 231
trigger10 = stateno = 241 && animelemtime(4) < 0
trigger11 = stateno = 251 && animelemtime(6) < 0
trigger12 = stateno = 400
trigger13 = stateno = 410 && animelemtime(5) < 0
trigger14 = stateno = 430
trigger15 = stateno = 440 && animelemtime(5) < 0
trigger16 = stateno = 1601 && var(10) = 2 && animelemtime(7) < 0
var(7) = 1
ignorehitpause = 1

[State -3, Hyper Cancel Reset]
type = varset
trigger1 = 1
var(8) = 0
ignorehitpause = 1
[State -3, Hyper Cancel Reset]
type = varset
trigger1 = stateno = 3105 && animelemtime(8) >= 0
trigger2 = stateno = 3000 && animelemtime(4) >= 0
var(8) = 1
ignorehitpause = 1

[State -3, Super Cancel Flag Reset]
type = varset
trigger1 = var(21)
trigger1 = (stateno != [3000, 4999]) || movetype = H
var(21) = 0
ignorehitpause = 1
[State -3, Hyper Cancel Flag Reset]
type = varset
trigger1 = var(22)
trigger1 = (stateno != [3000, 4999]) || movetype = H
var(22) = 0
ignorehitpause = 1

[State -3, Parry Detection]
type = helper
triggerall= helper(9999),var(56)
triggerall = roundstate = 2 && !numhelper(765) && !var(20)
triggerall = (movetype = I && ctrl) || (stateno = [760, 762]) || stateno = 5120
triggerall = (command != "rlsfwd" && command != "rlsback" && command != "rlsup" && command != "rlsdown") || AIlevel
trigger1 = !AIlevel && (statetype = S || statetype = C || stateno = 5120) && (command = "fwd" || command = "down")
trigger2 = !AIlevel && statetype = A && (var(3) != 1 && var(3) != 2) && command = "fwd"
trigger3 = AIlevel && (stateno != [760, 762]) && inguarddist && random < 50
trigger4 = AIlevel && (stateno = [760, 762]) && time = 14 && random < 667
helpertype = normal
stateno = 765
ID = 765
name = "Parry Detection"
postype = p1
pausemovetime = 65535
supermovetime = 65535
[State -3, Parry Attacks]
type = changestate
triggerall= helper(9999),var(56)
trigger1 = (stateno != [760, 762]) && numhelper(765)
trigger1 = helper(765), stateno = 766
value = ifelse((helper(765), anim = 767), 762, ifelse((helper(765), anim = 766), 761, 760))
ignorehitpause = 1
[State -3, Parry Projectiles]
type = hitoverride
triggerall= helper(9999),var(56)
trigger1 = (stateno != [760, 762]) && numhelper(765)
trigger1 = !(helper(765), var(0)) && (helper(765), anim = 765)
attr = SA, AP
stateno = 760
slot = 0
time = 1
ignorehitpause = 1
[State -3, Parry Projectiles]
type = hitoverride
triggerall= helper(9999),var(56)
trigger1 = (stateno != [760, 762]) && numhelper(765)
trigger1 = !(helper(765), var(0)) && (helper(765), anim = 766)
attr = C, AP
stateno = 761
slot = 0
time = 1
ignorehitpause = 1
[State -3, Parry Projectiles]
type = hitoverride
triggerall= helper(9999),var(56)
trigger1 = (stateno != [760, 762]) && numhelper(765)
trigger1 = !(helper(765), var(0)) && (helper(765), anim = 767)
attr = SCA, AP
stateno = 762
slot = 0
time = 1
ignorehitpause = 1

[State -3, NoWalk after Parry]
type = assertspecial
trigger1 = var(26) > 0
trigger1 = var(26) := (var(26) -1)
flag = nowalk

[State -3, Corner Push]
type = varset
trigger1 = fvar(5)
trigger1 = numtarget
trigger1 = target, hitover || (target, gethitvar(hitshaketime) > 0 && target, time <= 0)
fvar(5) = 0
[State -3, Corner Push]
type = varset
trigger1 = movecontact = 1 && numtarget
fvar(5) = target, gethitvar(xvel)
ignorehitpause = 1
[State -3, Corner Push]
type = posadd
triggerall = fvar(5)
triggerall = (statetype = S || statetype = C) && numtarget
triggerall = !hitpausetime && target, gethitvar(hitshaketime) <= 0
triggerall = (target, statetype = S || target, statetype = C) && !(target, gethitvar(yvel)) && !(target, hitfall)
trigger1 = target, frontedgebodydist <= abs(target, vel x)
trigger1 = (target, gethitvar(xvel) * target, facing) > 0
trigger2 = target, backedgebodydist <= abs(target, vel x)
trigger2 = (target, gethitvar(xvel) * target, facing) < 0
x = ifelse(target, frontedgebodydist <= 0, -1, 1) * (target, facing) * fvar(5)
[State -3, Corner Push]
type = varset
trigger1 = fvar(5)
trigger1 = abs(fvar(5)) < 1.0
fvar(5) = 0
[State -3, Corner Push]
type = varset
trigger1 = numtarget
trigger1 = target, gethitvar(hitshaketime) <= 0
fvar(5) = fvar(5) * 0.85

[State -3, ExFX]
type = varadd
trigger1 = var(25) > 0
var(25) = -1
[State -3, ExFX]
type = varset
trigger1 = (stateno != [1000, 2999]) || movetype = H
var(25) = 0
[State -3, Ex Flash]
type = palfx
trigger1 = !(gametime % 2) && var(25)
time = 1
color = 0
mul = 256, 224, 0
add = 128, 128, 128
ignorehitpause = 1

[State -3, Movement Afterimage]
type = afterimage
triggerall = time = 1 && !var(20)
trigger1 = stateno = 50 && (var(3) = 2 || var(3) = 3)
trigger2 = (stateno = [700, 715])
time = 2
timegap = 1
framegap = 4
length = 9
palbright = 0, 0, 0
palcontrast = 128, 128, 128
palpostbright = 0, 0, 0
paladd = 0, 0, 0
palmul = 0.9, 0.9, 0.9
trans = add1
[State -3, Lv1 Super Afterimage]
type = afterimage
trigger1 = stateno = 3000 && time = 3
trigger2 = stateno = 3100 && time = 3
trigger3 = stateno = 3300 && time = 4
time = 2
timegap = 1
framegap = 10
length = 21
palbright = 0, 0, 0
palcontrast = 128, 128, 128
palpostbright = 0, 0, 0
paladd = 0, 0, 0
palmul = 0.75, 0.75, 0.75
trans = add1
[State -3, Lv2 Super Afterimage]
type = afterimage
trigger1 = stateno = 3050 && time = 3
trigger2 = stateno = 3250 && time = 3
trigger3 = stateno = 3350 && time = 4
time = 2
timegap = 1
framegap = 10
length = 21
palbright = 0, 0, 0
palcontrast = 32, 32, 160
palpostbright = 0, 0, 0
paladd = 0, 0, 0
palmul = 0.75, 0.75, 0.75
trans = add1
[State -3, Lv3 Super Afterimage]
type = afterimage
trigger1 = stateno = 3400 && time = 3
time = 2
timegap = 1
framegap = 10
length = 21
palbright = 0, 0, 0
palcontrast = 160, 32, 32
palpostbright = 0, 0, 0
paladd = 0, 0, 0
palmul = 0.75, 0.75, 0.75
trans = add1

[State -3, Afterimage Persist]
type = afterimagetime
trigger1 = stateno = 50 || (stateno = [600, 699])
trigger1 = (var(3) = 2 || var(3) = 3) && vel y < -1
trigger2 = var(20)
trigger3 = stateno = [700, 715]
trigger4 = (stateno = [3000, 4999])
time = 2
[State -3, Afterimage Off]
type = afterimagetime
triggerall = time <= 1
trigger1 = stateno = 3000 || stateno = 3050 || stateno = 3100 || stateno = 3200 || stateno = 3250
trigger2 = stateno = 3300 || stateno = 3350 || stateno = 3400
time = 0

[State -3, Underground Juggle Prevention]
type = targetbind
trigger1 = movecontact = 1
trigger1 = numtarget && numenemy
trigger1 = (target, time = 0) && (target, ID = enemynear, ID)
trigger1 = !(target, hitshakeover) && (target, pos y > 0)
pos = ceil(p2dist x), ceil(-pos y)
ignorehitpause = 1

[State -3, Prevent Crossup]
type = width
trigger1 = movetype != H
edge = 8, 0
ignorehitpause = 1

[State -3, Variable Height]
type = playerpush
triggerall = statetype = A && movetype != H && numenemy
triggerall = p2bodydist x = [ -(enemynear, const(size.ground.back) + enemynear, const(size.ground.front)), 0]
trigger1 = p2statetype = S
trigger1 = p2dist y >= (enemynear, const(size.height) - 12)
trigger2 = p2statetype = C
trigger2 = p2dist y >= (enemynear, const(size.height) - 28)
trigger3 = p2statetype = L
trigger3 = p2dist y >= 12
value = 0
ignorehitpause = 1

[State -3, GetHit Snd]
type = playsnd
triggerall = alive && time = 1
triggerall = stateno = 5000 || stateno = 5010
trigger1 = gethitvar(animtype) >= 2 && random < 500
trigger2 = gethitvar(animtype) = 1 && random < 375
trigger3 = gethitvar(animtype) = 0 && random < (250 * (AIlevel ** 2 / 64.0))
value = 5000, (random % 3)
channel = 0
ignorehitpause = 1
[State -3, GetHit Snd]
type = playsnd
triggerall = alive && time = 1
trigger1 = (stateno = 5000 || stateno = 5010) && numenemy
trigger1 = gethitvar(fall) || (enemynear, hitdefattr = SCA, SA, HA)
trigger2 = (stateno = 5020 || stateno = 5070 || stateno = 5080)
trigger3 = (stateno = 5050 || stateno = 5100) && (prevstateno != [5000, 5199])
value = 5000, (random % 3)
channel = 0
ignorehitpause = 1

[State -3, Cheap KO]
type = changestate
trigger1 = !alive && (stateno = [5000, 5010])
trigger1 = (prevstateno = [130, 131]) || (prevstateno = [140, 141]) || (prevstateno = [150, 153])
value = 5950
ignorehitpause = 1
[State -3, Cheap KO]
type = assertspecial
trigger1 = (stateno = [5000, 5010])
trigger1 = (prevstateno = [130, 131]) || (prevstateno = [140, 141]) || (prevstateno = [150, 153])
flag = nokosnd
ignorehitpause = 1

[State -3, CC Finish]
type = helper
triggerall = winKO && var(20)
triggerall = roundstate = 3 && !numhelper(8600)
trigger1 = movehit = [1, 4]
trigger2 = numhelper(1005)
trigger2 = (helper(1005), stateno = [1005, 1007]) && (helper(1005), var(18))
trigger3 = numhelper(1015)
trigger3 = helper(1015), var(18)
trigger4 = numhelper(1020)
trigger4 = helper(1020), var(18)
trigger5 = numhelper(1305)
trigger5 = helper(1305), var(18)
trigger6 = stateno = 810 && (animelemtime(13) = [0, 1])
trigger7 = stateno = 820 && (animelemtime(5) = [0, 1])
trigger8 = stateno = 840 && (animelemtime(9) = [0, 1])
helpertype = normal
stateno = 8600
ID = 8600 + 0 * (var(23) := 900)
name = "Super Finish"
postype = left
pos = 160, -120
ownpal = 1
pausemovetime = 255
supermovetime = 255
ignorehitpause = 1

[State -3, Super Finish]
type = helper
triggerall = winKO
triggerall = roundstate = 3 && !numhelper(8600)
trigger1 = movehit = 1 && (stateno = [3000, 4999])
trigger1 = var(23) := stateno
trigger2 = stateno = 3000
trigger2 = numhelper(3010) && helper(3010),var(18)
trigger2 = var(23) := 3000
trigger3 = stateno = 3050
trigger3 = numhelper(3050) && helper(3050),var(18)
trigger3 = var(23) := 3050
trigger4 = stateno = 3105
trigger4 = numhelper(3115) && helper(3115),var(18)
trigger4 = var(23) := 3100
trigger5 = (stateno = 3300 || stateno = 3301)
trigger5 = var(18) || (numhelper(3310) && helper(3310),var(18))
trigger5 = var(23) := 3300
trigger6 = stateno = 3200
trigger6 = (numhelper(3210) && helper(3210),var(18)) || (numhelper(3211) && helper(3211),var(18))
trigger6 = var(23) := 3200
helpertype = normal
stateno = 8600
ID = 8600
name = "Super Finish"
postype = left
pos = 160, -120
ownpal = 1
pausemovetime = 255
supermovetime = 255
ignorehitpause = 1