; var(0) - winpose stateno; throw fwd/back; tech hit yes/no; extended recovery roll yes/no; screw piledriver turns; ellbow drop hit yes/no; dash jump yes/no; time var for aerial russian slam
; var(1) - p2 breakfall allowed yes/no
; var(2) - P2 attacks yes/no
; var(3) - Counter Hit yes/no
; var(4) - Original Counter Hit over yes/no
; var(5) - allow 2-in-1 cancels yes/no
; var(6) - no juggle check yes/no
; var(7) - more basic hits in corner against airborne p2 allowed yes/no
; var(8) - envshake amplitude
; var(9) - (continued) lariat hits
; var(10) - throw fwd/back for piledriver; vel y for flying piledriver; strength of screw piledriver; strength of atomic suplex/flying powerbomb; aerial russian slam strength
; var(11) - number of hits
; var(12) - number of times buttons were pressed during Kamitsuki
; var(13) - spark pos x
; var(14) - spark pos y
; var(15) - mugen throw bug
; var(16) - no walk after parry timer
; var(17) - p1 pausetime
; var(18) - could p2 have been killed with a hyper yes/no
; var(19) - random param for hitspark explods
; var(20) - juggle points of a move
; var(21) - juggle points available
; var(22) - juggled yes/no
; var(23) - juggle stateno
; var(24) - juggle points of the connected move
; var(25) - helper(id[var(25)]) has juggled
; var(26) - juggle points helper(id[var(25)]) has used
; var(27) - ticks that parry is active
; var(28) - countdown from 3 to -1 after parry input
; var(29) - 1/2/3 = s/c/a parry type
; var(30) - voice base volume
; var(31) - actual voice volume

; fvar(0) - attack multiplier based on p2life
; fvar(1) - attack multiplier based on number of hits
; fvar(2) - cummulated attack multiplier
; fvar(3) - vel y for flying piledriver
; fvar(4) - pos x for s/c parries

[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 0
liedown.time = 35
airjuggle = 2
sparkno = -1
guard.sparkno = -1
KO.echo = 0
volume = 255

[Size]
xscale = .6
yscale = .5
ground.back = 25
ground.front = 27
air.back = 20
air.front = 21
height = 50
attack.dist = 256
proj.attack.dist = 83
head.pos = 16, -98
mid.pos = -6, -64

[Velocity]
walk.fwd = 3
walk.back = -1.5
run.fwd = 3.6
run.back = -6.5, -2.75
jump.neu = 0, -9.25; 73
jump.fwd = 3.167; 95, 68
jump.back = -3; 99, 78

[Movement]
yaccel = .615
stand.friction = .85
crouch.friction = .85

[Quotes]
victory1 = Consider yourself lucky! At least you can still walk!
victory2 = Flesh! Bone! Viscera! My body of steel knows no weaknesses!
victory3 = I'll dedicate this fight to the people of Russia!
victory4 = I'm like a cyclone... If you get too close you'll be sucked in!
victory5 = If you had a stronger body, you might not have been paralyzed!
victory6 = It is not too late to build your body! Strengthen those triceps!
victory7 = Nothing can escape my deadly swirling attacks!
victory8 = Spun uncontrollably skyward... Driven brutally into the ground!

; Stand
[Statedef 0]
velset = 0, 0
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim && Anim != 5
trigger2 = Anim = 5 && !AnimTime; Turn anim over
value = 0

[State 0, 4]; Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

; Stand to Crouch
[Statedef 10]
type = C
velset = 0, 0
anim = 10

[State 10, 2]
type = ChangeState
trigger1 = !AnimTime
value = ifelse(command = "holddown", 11, 12)

; Crouching
[Statedef 11]
type = C
anim = 11
sprpriority = 0
velset = 0, 0

[State 11, 1]; Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && !AnimTime
value = 11

; Crouch to Stand
[Statedef 12]
physics = S
anim = 12

[State 12, 1]
type = ChangeState
trigger1 = !AnimTime
value = ifelse(command != "holddown", 0, 11)

; Jump Start
[Statedef 40]
anim = 40
ctrl = var(0) := 0
sprpriority = 1
facep2 = 1
velset = 0, 0

[State 40, 0]
type = Null
trigger1 = !time && prevstateno = 100
trigger1 = var(0) := 1

[State 40, 1]
type = VarSet
trigger1 = !Time
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4]
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)))
y = ifelse(!sysvar(1), const(velocity.jump.y), ifelse(sysvar(1) = 1, -8.9, -9.5))

[State 40, dash jump]
type = VelMul
trigger1 = !animtime && var(0)
x = 1.15
y = 1.15

[State 40, 6]
type = ChangeState
trigger1 = !AnimTime
value = 50
ctrl = 1

; Jump Up
[Statedef 50]
type = A
physics = A

[State 50, 1]
type = VarSet
trigger1 = !Time
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = !Time
value = ifelse(!vel x, 41, ifelse(vel x > 0, 42, 43))

[State 50, stop]
type = velSet
triggerall = !var(0)
trigger1 = anim = 41 && time = [13, 15]
trigger2 = anim = 42 && time = [13, 15]
trigger3 = anim = 43 && time = [14, 16]
y = 0

[State 50, stop2]
type = PosSet
triggerall = !var(0)
trigger1 = anim = 41 && time = [13, 15]
trigger2 = anim = 42 && time = [13, 15]
trigger3 = anim = 43 && time = [14, 16]
y = -ifelse(anim = 41, 73, ifelse(anim = 42, 68, 78))

; Jump Land
[Statedef 52]
ctrl = 0
anim = 47
velset = 0, 0

[State 52, snd]
type = PlaySnd
trigger1 = !time
value = 52

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

[State 52, 4]
type = ChangeState
trigger1 = !AnimTime
value = ifelse(command != "holddown", 0, 11)
ctrl = 1

; RUN_FWD
[Statedef 100]
anim = 100
sprpriority = 2
ctrl = 0
velset = 0, 0
movetype = a
Juggle = var(20) := 1

[State 100, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 0
channel = 0
volume = var(31)

[State 100, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 100

[State 100, 2]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
flag2 = NoAutoTurn

[State 100, 1]
type = VelSet
trigger1 = animelem = 3
x = const(velocity.run.fwd.x); 114

[State 100, dirty]
type = Explod
trigger1 = animelemno(0) = 3 && !(time % 3)
anim = f120
pos = -8
random = 2, 2
sprpriority = 2
shadow = -1, -1, -1
ownpal = 1

[State Friction]
type = VelMul 
trigger1 = vel x > 0
X = 1.0139

[State 100, mvc2]
type = Explod
trigger1 = animelem = 2
anim = 101
scale = .83, 1.005
sprpriority = 2
bindtime = -1
removeongethit = 1
id = 100
shadow = -1, -1, -1

[State 100, no ctrl]
type = CtrlSet
trigger1 = animelemno(0) = 3 && time % 2
value = 1
ignorehitpause = 1

[State 100, ctrl]
type = CtrlSet
trigger1 = animelemno(0) = 3 && !(time % 2)
value = 0

[State 100, hit]
Type = HitDef
triggerall = var(21) && !var(15) && (enemynear, stateno != [120, 155]) && !(time % 2)
Trigger1 = Animelemno(0) = 3 && var(17) := -1
Attr = S, NT
P2Facing = 1
P1Facing = 1
HitFlag = M-
Priority = 1, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 102
P2StateNo = 104
ID = 100
YAccel = .5
fall.recover = 0
fall = 1

[State 100, hit nothing]
type = HitDef
trigger1 = animelemno(0) = 3 && (enemynear, stateno = [120, 155])
trigger2 = animelemno(0) = 3 && time % 2
attr = s, nt
hitflag =

[state 100, end]
type = changestate
trigger1 = !animtime
trigger2 = animelem = 3, > 6 && p2statetype != A && p2bodydist x <= 0
value = 101

;dash end
[statedef 101]
ctrl = 0
velset = 0, 0
anim = 10001
sprpriority = 1

[State 101, remove mvc2 dash]
type = RemoveExplod
triggerall = numexplod(100)
trigger1 = !time
ID = 100

[State 101, mvc2]
type = Explod
trigger1 = animelem = 1
anim = 10002
scale = .83, 1.005
sprpriority = 1
bindtime = -1
removeongethit = 1
id = 101
shadow = -1, -1, -1

[State 101, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 1
Value = 5000
Channel = 0
volume = var(31)

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

; dash Throwing
[StateDef 102]
ctrl = 0
MoveType = A
VelSet = 0, 0
Anim = 102
SprPriority = 2

[State 102, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 184
channel = 0
volume = var(31)

[State 102, mvc2]
type = Explod
trigger1 = animelem = 1
anim = 103
scale = .83, 1.005
sprpriority = 2
bindtime = -1
id = 102
shadow = -1, -1, -1

[State 102, fat]
type = Width
trigger1 = command != "holdy" && command != "holdz"
edge = 64

[State 102, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 100
pos = 70, -54

[State 102, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 100
pos = 84, -71

[State 102, bind]
type = TargetBind
trigger1 = animelemno(0) = 3
ID = 100
pos = 75, -75

[State 102, remove mvc2 dash]
type = RemoveExplod
triggerall = numtarget(100) && animelem = 1, > 0
trigger1 = command = "holdb" || command = "holdc"
trigger2 = command = "holdy" || command = "holdz"
ID = 102

[State 102, dash kamitsuki]
type = ChangeState
triggerall = numtarget(100) && animelem = 1, > 0
trigger1 = command = "holdb" || command = "holdc"
value = 930

[State 102, dash backdrop]
type = ChangeState
triggerall = numtarget(100) && animelem = 1, > 0
trigger1 = command = "holdy" || command = "holdz"
value = 940

[State 102, bind]
type = TargetBind
trigger1 = animelem = 4
ID = 100
pos = 75, -75 - target(100), const(size.mid.pos.y)

[State 102, Fly]
Type = TargetState
triggerall = NumTarget(100)
Trigger1 = animelem = 4
Value = 106
ID = 100

[State 102, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

; Grabbed By dash
[StateDef 104]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 104, Camera Still]
Type = ScreenBound
Trigger1 = 1

; released from dash
[StateDef 106]
anim = ifelse(selfanimexist(5035), 5035, 5030)
Type = A
VelSet = -3.33, -4.33

[State 106, 0]
type = HitFallSet
trigger1 = !Time
value = 0

[State 106, End]
Type = SelfState
Trigger1 = !time
Value = 5040
anim = 5040
ctrl = 1

; STAND GUARD (guarding)
[Statedef 130]
physics = S

[State 130, stop]
type = VelSet
triggerall = prevstateno = 132 || (prevstateno = [153, 154])
trigger1 = statetype != a && !time
x = 0

[State 130, 1]
type = ChangeAnim
trigger1 = Anim != 130
value = 130

[State 130, Hi to Lo]
type = ChangeState
trigger1 = command = "holddown"
value = 131

[State 130, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback" || !inguarddist
value = 140

; AGUARDHIT2 (knocked away)
[Statedef 155]
type = A
movetype = H
anim = 152

[State 155, 1]
type = HitVelSet
trigger1 = !Time
x = 1
y = 1

[State 155, 2]
type = gravity
trigger1 = 1

[State 155, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = pos y >= 0 && vel y > 0

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 43]; Recover near ground
type = ChangeState
triggerall = Vel Y > 0 && Pos Y >= -20 && alive
trigger1 = Command = "recovery"
value = 5200; HITFALL_RECOVER

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0) && command = "holdback" && inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

; s parry
[statedef 160]
ctrl = var(27) := 0
anim = 160
velset = 0, 0
sprpriority = -2
poweradd = 83

[State 160, pos x for parries]
type = PosSet
trigger1 = !time
x = fvar(4)

[State 160, nonono]
type = AssertSpecial
trigger1 = 1
flag = nowalk

[State 160]
type = palfx
trigger1 = !time
time = 12
add = 0, 0, 255
sinadd = 70, 70, 70, 3

[State 160, voice]
type = PlaySnd
trigger1 = !time
value = 0, 1
channel = 0
volume = var(31)

[State 160, snd]
type = PlaySnd
trigger1 = !time
value = 160

[State 200, hitspark]
type = Explod
trigger1 = !time
anim = f40
pos = 27, -100
sprpriority = -1
ownpal = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 160, nono]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 160, stoooop]
type = Pause
trigger1 = !time
time = 14
movetime = 14

[State 160, end]
type = ChangeState
trigger1 = !animTime
value = 0
ctrl = var(16) := 7

; c parry
[statedef 161]
type = c
ctrl = var(27) := 0
anim = 161
velset = 0, 0
sprpriority = -2
poweradd = 83

[State 161, nonono]
type = AssertSpecial
trigger1 = 1
flag = nowalk

[State 161, pos x for parries]
type = PosSet
trigger1 = !time
x = fvar(4)

[State 161, flash]
type = PalFX
trigger1 = !time
time = 12
add = 0, 0, 255
sinadd = 70, 70, 70, 3

[State 161, voice]
type = PlaySnd
trigger1 = !time
value = 0, 1
channel = 0
volume = var(31)

[State 161, snd]
type = PlaySnd
trigger1 = !time
value = 160

[State 200, hitspark]
type = Explod
trigger1 = !time
anim = f40
pos = 32, -70
sprpriority = -1
ownpal = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 161, nono]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 161, stoooop]
type = Pause
trigger1 = !time
time = 14
movetime = 14

[State 161, end]
type = ChangeState
trigger1 = !animTime
value = 11
ctrl = var(16) := 7

; a parry
[statedef 162]
type = a
ctrl = var(27) := 0
anim = 162
velset = 0, 0
sprpriority = -2
poweradd = 83

[State 162, flash]
type = PalFX
trigger1 = !time
time = 12
add = 0, 0, 255
sinadd = 70, 70, 70, 3

[State 162, voice]
type = PlaySnd
trigger1 = !time
value = 0, 1
channel = 0
volume = var(31)

[State 162, snd]
type = PlaySnd
trigger1 = !time
value = 160

[State 200, hitspark]
type = Explod
trigger1 = !time
anim = f40
pos = 45, -107
sprpriority = -1
ownpal = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 162, nono]
type = NotHitBy
trigger1 = animelem = 4, < 0
value = sca
ignorehitpause = 1

[State 162, stoooop]
type = Pause
trigger1 = !time; && enemynear, projcontact = 1
time = 14
movetime = 14

[State 162, up]
type = VelSet
trigger1 = animelem = 4
y = -2

[State 162, ctrl]
type = CtrlSet
trigger1 = animelem = 4
value = 1

[State 162, grav]
type = StateTypeSet
trigger1 = animelem = 4
physics = a

; zero counter
[StateDef 165]
MoveType = a
Anim = 165
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 2
SprPriority = 2

[State 165, 0]
type = SuperPause
trigger1 = !time
time = 20
movetime = 20
anim = f100
sound = s165
pos = 63, -90
poweradd = -1000
unhittable = 1
darken = 0
p2defmul = 1

[State 165, voice]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 1
channel = 0
volume = var(31)

[State 165, snd]
type = PlaySnd
trigger1 = animelem = 4
value = 1, 2

[State 165, hit]
type = HitDef
triggerall = var(21)
trigger1 = animelem = 4
trigger1 = var(13) := 101 && var(17) := 12
attr = s, sa
hitflag = MAF
guardflag =
animtype = back
air.animtype = back
fall.animtype = back
damage = 21 + var(2)
priority = 5
pausetime = var(17), var(17); +1
sparkxy = -15, var(14) := -79
ground.type = low
air.type = low
yaccel = .5
ground.velocity = -5.55, -5.95; 150, 34
air.velocity = -5.55, -5.95; 150, 34
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = 166, !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 165, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

; LOSE (Time over)
[Statedef 170]
ctrl = 0
anim = 170
velset = 0, 0

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

; Win State Decider
[Statedef 180]
ctrl = var(0) := 0
velset = 0, 0

[State 180, 0]
Type = ChangeAnim
Trigger1 = Anim
Value = 0

[State 180, Assert Special]
Type = AssertSpecial
Trigger1 = 1
Flag = RoundNotOver

[State 180, Random Winpose Decider]
Type = VarRandom
Trigger1 = !Var(0) && Time = 15
v = 0
Range = 181, 186

[State 180, Switch To Win Pose]
Type = ChangeState
Trigger1 = !Var(0)
Trigger1 = Var(0) := ifelse(command = "holdx", 181, ifelse(command = "holdy", 182, ifelse(command = "holdz", 183, ifelse(command = "holda", 184, ifelse(command = "holdb", 185, ifelse(command = "holdc", 186, 0))))))
Trigger2 = Var(0)
Value = Var(0)

; arms up & grunt
[Statedef 181]
anim = 181
sprpriority = -4

[State 181, voice]
type = PlaySnd
trigger1 = animelem = 5
value = 181
channel = 0
volume = var(31)

[State 181, Assert Special]
Type = AssertSpecial
Trigger1 = Time <= 180
Flag = RoundNotOver

; arms up & talk
[Statedef 182]
anim = 182
sprpriority = -4

[State 182, voice]
type = PlaySnd
trigger1 = animelem = 5
value = 182
channel = 0
volume = var(31)

[State 182, Assert Special]
Type = AssertSpecial
Trigger1 = Time <= 180
Flag = RoundNotOver

; flex & talk
[Statedef 183]
anim = 183
sprpriority = -4

[State 183, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 183
channel = 0
volume = var(31)

[State 183, Assert Special]
Type = AssertSpecial
Trigger1 = Time <= 180
Flag = RoundNotOver

; flex & laugh
[Statedef 184]
anim = 184
sprpriority = -4

[State 184, voice]
type = PlaySnd
trigger1 = animelem = 13
value = 184, random < 500
channel = 0
volume = var(31)

[State 184, Assert Special]
Type = AssertSpecial
Trigger1 = Time <= 180
Flag = RoundNotOver

; cook fish
[Statedef 185]
anim = 185
sprpriority = -4

[State 185, voice]
type = PlaySnd
trigger1 = 0;animelem = 13
value = 195
channel = 0
volume = var(31)

[State 185, voice]
type = PlaySnd
trigger1 = animelem = 30
value = 184, 1
channel = 0
volume = var(31)

[State 185, snd]
type = PlaySnd
trigger1 = animelem = 12
value = 185

[State 185, fire]
type = Explod
trigger1 = animelem = 16, = 1
anim = 186
scale = .83, 1.005
sprpriority = -3
bindtime = -1

[State 185, blanka]
type = Explod
trigger1 = animelem = 16, = 1
anim = 188
pos = 160 + ceil(pos x)
postype = left
facing = facing
scale = .83, 1.005
sprpriority = -5
shadow = -1, -1, -1
bindtime = -1

[State 185, phew]
type = Explod
trigger1 = animelem = 30, = 3
anim = 187
scale = .83, 1.005
sprpriority = -3
bindtime = -1
shadow = -1, -1, -1

[State 185, Assert Special]
Type = AssertSpecial
Trigger1 = Time <= 240
Flag = RoundNotOver

; cook fish & Blanka
[Statedef 186]
anim = 185
sprpriority = -4

[State 186, voice]
type = PlaySnd
trigger1 = animelem = 13
value = 195
channel = 0
volume = var(31)

[State 186, snd]
type = PlaySnd
trigger1 = animelem = 12
value = 185

[State 186, fire]
type = Explod
trigger1 = animelem = 16, = 1
anim = 186
scale = .83, 1.005
sprpriority = -3
bindtime = -1

[State 186, blanka]
type = Explod
trigger1 = animelem = 16, = 1
anim = 189
pos = 160 + ceil(pos x)
postype = left
facing = facing
scale = .83, 1.005
sprpriority = -4
shadow = -1, -1, -1
bindtime = -1

[State 186, phew]
type = Explod
trigger1 = animelem = 30, = 3
anim = 187
scale = .83, 1.005
sprpriority = -3
bindtime = -1
shadow = -1, -1, -1

[State 186, Assert Special]
Type = AssertSpecial
Trigger1 = Time <= 240
Flag = RoundNotOver

; PREINTRO
[Statedef 190]
ctrl = 0
velset = 0, 0
anim = 190

[State 190, MUGEN Bug]
Type = CtrlSet
Trigger1 = !P2Life
Value = 1

[State 190, 2]; Go to intro.
type = ChangeState
trigger1 = roundstate = 1
value = 191

; INTRO (override this state to give character an intro)
[Statedef 191]
ctrl = 0
anim = 191

[State 191, snd]
type = PlaySnd
trigger1 = animelem = 10
value = 191

[State 191, MUGEN Bug]
Type = CtrlSet
Trigger1 = !P2Life
Value = 1

[State 191, Assert Special]
Type = AssertSpecial
Trigger1 = 1
Flag = Intro

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

; taunt
[StateDef 195]
Anim = 195
velset = 0, 0
Ctrl = 0
SprPriority = 2

[State 195, voice]
type = PlaySnd
trigger1 = animelem = 3
value = 195
channel = 0
volume = var(31)

[State 195, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
ctrl = 1

; jab
[StateDef 200]
MoveType = a
Anim = 200
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
sprpriority = 2

[State 200, snd]
type = PlaySnd
trigger1 = !time
value = 1

[State 200, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 2
trigger1 = var(13) := 49 && var(17) := 8
trigger2 = !var(2) && var(7) && animelem = 3 && !movecontact
trigger2 = var(13) := 84 && var(17) := 8
attr = s, na
hitflag = MAF
guardflag = m
animtype = Light
air.animtype = Light
fall.animtype = light
damage = 35
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := ifelse(animelem = 2, = 0, -115, -97)
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 9
air.hittime = 10
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 2
trigger1 = var(13) := 49 && var(17) := 8
trigger2 = var(2) && var(7) && animelem = 3 && !movecontact
trigger2 = var(13) := 84 && var(17) := 8
attr = s, na
hitflag = MAF
guardflag = m
animtype = med
air.animtype = med
fall.animtype = med
damage = 35
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := ifelse(animelem = 2, = 0, -115, -97)
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 13
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 0, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 210, 200)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 200, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
ctrl = 1

; strong
[StateDef 210]
MoveType = a
Anim = 210
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
sprpriority = 2
poweradd = 21

[State 210, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 1

[State 210, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4
trigger1 = var(13) := 78 && var(17) := 10
attr = s, na
hitflag = MAF
guardflag = m
animtype = med
air.animtype = med
fall.animtype = med
damage = 103
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -25, -40), var(14) := -79
ground.type = high
air.type = low
ground.slidetime = 12; +1
ground.hittime = 13
air.hittime = 10
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 210, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4
trigger1 = var(13) := 78 && var(17) := 10
attr = s, na
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 110
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -25, -40), var(14) := -79
ground.type = high
air.type = low
ground.slidetime = 12; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 220, 210)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 210, behind]
type = SprPriority
trigger1 = animelem = 5
value = -1

[State 210, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
ctrl = 1

; fierce
[StateDef 220]
MoveType = a
Anim = 220
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
sprpriority = 2
poweradd = 21

[State 220, voice]
type = PlaySnd
trigger1 = animelem = 3
value = 0
channel = 0
volume = var(31)

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

[State 220, move]
type = PosAdd
trigger1 = animelem = 3
x = 6

[State 220, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4, = 1
trigger1 = var(13) := ifelse(p2bodydist x < 20, 80, 118) && var(17) := 12
attr = s, na
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 145
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 70, 0, -30), var(14) := -88
ground.type = High
air.type = low
ground.slidetime = 14; +1
ground.hittime = 16
air.hittime = 10
yaccel = .5
ground.velocity = -12.95; 78
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 220, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4, = 1
trigger1 = var(13) := 118 && var(17) := 28
attr = s, na
hitflag = MAF
guardflag = m
animtype = back
air.animtype = back
fall.animtype = back
damage = 159
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 70, 0, -30), var(14) := -88
ground.type = High
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
ground.velocity = -2.5, -8.5; 90, 75
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 220), var(2) || (!p2life && roundstate > 2)
channel = 1
ignorehitpause = 1

[State 220, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
ctrl = 1

; short
[StateDef 230]
MoveType = a
Anim = 230
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
sprpriority = 2

[State 230, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1

[State 230, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 85 && var(17) := 8
attr = s, na
hitflag = MAF
guardflag = m
animtype = Light
air.animtype = Light
fall.animtype = light
damage = 55
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -20, -50), var(14) := -37
ground.type = low
air.type = low
ground.slidetime = 8; +1
ground.hittime = 9
air.hittime = 10
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 230, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 85 && var(17) := 8
attr = s, na
hitflag = MAF
guardflag = m
animtype = med
air.animtype = med
fall.animtype = med
damage = 55
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -20, -50), var(14) := -37
ground.type = low
air.type = low
ground.slidetime = 8; +1
ground.hittime = 13
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0
sprpriority = -1

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 0, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 240, 230)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 230, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
ctrl = 1

; forward
[StateDef 240]
MoveType = a
Anim = 240
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 240, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 1

[State 240, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 101 && var(17) := 10
attr = s, na
hitflag = MAF
guardflag = m
animtype = med
air.animtype = med
fall.animtype = med
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 80, -10, -40), var(14) := -79
ground.type = high
air.type = low
ground.slidetime = 12; +1
ground.hittime = 13
air.hittime = 10
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 240, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 101 && var(17) := 10
attr = s, na
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 103
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 80, -10, -40), var(14) := -79
ground.type = high
air.type = low
ground.slidetime = 12; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 250, 240)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 240, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
ctrl = 1

; roundhouse
[StateDef 250]
MoveType = a
Anim = 250
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 250, voice]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 1
channel = 0
volume = var(31)

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

[State 250, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4
trigger1 = var(13) := 69 && var(17) := 12
attr = s, na
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 138
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 20, -10, -40), var(14) := -69
ground.type = low
air.type = low
ground.slidetime = 14; +1
ground.hittime = 16
air.hittime = 10
yaccel = .5
ground.velocity = -12.95; 78
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 250, hit high]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 5 && !movecontact
trigger1 = var(13) := 65 && var(17) := 12
attr = s, na
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = diagup
fall.animtype = diagup
damage = 131
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 40, -40 + 20 * p2bodydist x > 45, -60), var(14) := -116
ground.type = high
air.type = low
ground.slidetime = 14; +1
ground.hittime = 16
air.hittime = 10
yaccel = .5
ground.velocity = -12.95; 78
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 250, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4
trigger1 = var(13) := 69 && var(17) := 28
attr = s, na
hitflag = MAF
guardflag = m
animtype = back
air.animtype = back
fall.animtype = back
damage = 152
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 20, -10, -40), var(14) := -69
ground.type = low
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
ground.velocity = -2.5, -8.5; 90, 75
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 250, counter-hit high]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 5 && !movecontact
trigger1 = var(13) := 65 && var(17) := 28
attr = s, na
hitflag = MAF
guardflag = m
animtype = diagup
air.animtype = diagup
fall.animtype = diagup
damage = 145
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 40, -40 + 20 * p2bodydist x > 45, -60), var(14) := -116
ground.type = high
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
ground.velocity = -2.5, -8.5; 90, 75
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 250, air]
type = StateTypeSet
trigger1 = animelem = 5
statetype = a

[State 5100, 10]
type = PlaySnd
trigger1 = animelem = 7
value = 52

[State 250, down]
type = StateTypeSet
trigger1 = animelem = 7
statetype = l

[State 250, crouch]
type = StateTypeSet
trigger1 = animelem = 8
statetype = c

[State 250, stand]
type = StateTypeSet
trigger1 = animelem = 10
statetype = s

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 250), var(2) || (!p2life && roundstate > 2)
channel = 1
ignorehitpause = 1

[State 250, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
ctrl = 1

; v-ism headbutt
[StateDef 310]
velset = 0, 0
type = c
MoveType = a
Anim = 310
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 310, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 1

[State 310, s]
type = StateTypeSet
trigger1 = animelem = 2
statetype = s

[State 310, a]
type = StateTypeSet
trigger1 = animelem = 4
statetype = a
physics = a

[State 310, teleport]
type = PosAdd
trigger1 = animelem = 4 && (p2statetype = a || abs(p2bodydist x) > 6)
x = 10

[State 310, y]
type = VelSet
trigger1 = animelem = 4
y = -5.67

[State 310, x]
type = VelSet
triggerall = !vel x && (p2statetype = a || abs(p2bodydist x) > 6)
trigger1 = animelem = 4, >= 1
x = 2.842

[State 310, x stop]
type = VelSet
triggerall = vel x && p2statetype != a && abs(p2bodydist x) <= 6
trigger1 = animelem = 4, >= 1
x = 0

[State 310, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 5
trigger1 = var(13) := 66 && var(17) := 3
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 83
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 10
air.hittime = 13
yaccel = .5
ground.velocity = -9.35; 54 ;-6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = 0;-9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 310, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 5
trigger1 = var(13) := 66 && var(17) := 3
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 90
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 15
yaccel = .5
ground.velocity = -9.35; 54; -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = 0;-9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 220, 210)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 310, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 52

; x-ism headbutt
[StateDef 320]
velset = 0, 0
type = c
MoveType = a
Anim = 320
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 320, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 320, s]
type = StateTypeSet
trigger1 = animelem = 2
statetype = s

[State 320, a]
type = StateTypeSet
trigger1 = animelem = 4
statetype = a
physics = a

[State 320, teleport]
type = PosAdd
trigger1 = animelem = 4 && (p2statetype = a || abs(p2bodydist x) > 6)
x = 20

[State 320, y]
type = VelSet
trigger1 = animelem = 4
y = -5.67

[State 320, x]
type = VelSet
triggerall = !vel x && (p2statetype = a || abs(p2bodydist x) > 6)
trigger1 = animelem = 4, >= 1
x = 2.67

[State 320, x stop]
type = VelSet
triggerall = vel x && p2statetype != a && abs(p2bodydist x) <= 6
trigger1 = animelem = 4, >= 1
x = 0

[State 320, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 5
trigger1 = var(13) := 66 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 138
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 11
air.hittime = 8
yaccel = .5
ground.velocity = -9.35; 54; -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = 0;-9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 320, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 5
trigger1 = var(13) := 66 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = back
air.animtype = back
fall.animtype = back
damage = 151
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -9.35; 54; -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = 0;-9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 220), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

; c jab
[StateDef 400]
type = c
MoveType = a
Anim = 400
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
facep2 = 1

[State 400, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 1

[State 400, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 2
trigger1 = var(13) := 91 && var(17) := 8
attr = c, na
hitflag = MAF
guardflag = m
animtype = Light
air.animtype = Light
fall.animtype = light
damage = 35
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -58
ground.type = low
air.type = low
ground.slidetime = 8; +1
ground.hittime = 9
air.hittime = 10
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 400, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 2
trigger1 = var(13) := 91 && var(17) := 8
attr = c, na
hitflag = MAF
guardflag = m
animtype = med
air.animtype = med
fall.animtype = med
damage = 35
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -58
ground.type = low
air.type = low
ground.slidetime = 8; +1
ground.hittime = 13
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 0, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 210, 200)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 400, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; c strong
[StateDef 410]
type = c
MoveType = a
Anim = 410
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 410, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 1

[State 410, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4
trigger1 = var(13) := 86 && var(17) := 10
attr = c, na
hitflag = MAF
guardflag = m
animtype = med
air.animtype = diagup
fall.animtype = diagup
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -103
ground.type = high
air.type = low
ground.slidetime = 12; +1
ground.hittime = 13
air.hittime = 10
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 410, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4
trigger1 = var(13) := 86 && var(17) := 10
attr = c, na
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = diagup
fall.animtype = diagup
damage = 103
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -103
ground.type = high
air.type = low
ground.slidetime = 12; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 220, 210)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 410, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; c fierce
[StateDef 420]
type = c
MoveType = a
Anim = 420
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

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

[State 420, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4, = 1
trigger1 = var(13) := ifelse(p2bodydist x < 20, 83, 121) && var(17) := 12
attr = c, na
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 124
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x < 60, -35, -10), var(14) := -68
ground.type = low
air.type = low
ground.slidetime = 14; +1
ground.hittime = 16
air.hittime = 10
yaccel = .5
ground.velocity = -12.95; 78
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 420, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4, = 1
trigger1 = var(13) := ifelse(p2bodydist x < 20, 83, 121) && var(17) := 28
attr = c, na
hitflag = MAF
guardflag = m
animtype = back
air.animtype = back
fall.animtype = back
damage = 138
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x < 60, -35, -10), var(14) := -68
ground.type = High
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
ground.velocity = -2.5, -8.5; 90, 75
air.velocity = -2.5, -8.5; 90, 75
guard.cornerpush.veloff = -24.4; 78
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 220), var(2) || (!p2life && roundstate > 2)
channel = 1
ignorehitpause = 1

[State 420, End]
Type = ChangeState
Trigger1 = !animtime
Value = 11
ctrl = 1

; c short
[StateDef 430]
type = c
MoveType = a
Anim = 430
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
sprpriority = 2

[State 430, snd]
type = PlaySnd
trigger1 = !time
value = 1

[State 430, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 83 && var(17) := 8
attr = c, na
hitflag = MAF
guardflag = l
animtype = Light
air.animtype = Light
fall.animtype = light
damage = 48
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 25, 0, -25), var(14) := 2
ground.type = low
air.type = low
ground.slidetime = 8; +1
ground.hittime = 9
air.hittime = 10
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 430, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 83 && var(17) := 8
attr = c, na
hitflag = MAF
guardflag = l
animtype = med
air.animtype = med
fall.animtype = med
damage = 48
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 25, 0, -25), var(14) := 2
ground.type = low
air.type = low
ground.slidetime = 8; +1
ground.hittime = 13
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 0, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 240, 230)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 430, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; c forward
[StateDef 440]
type = c
MoveType = a
Anim = 440
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 440, snd]
type = PlaySnd
trigger1 = animelem = 3
value = 1, 1

[State 440, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 5
trigger1 = var(13) := 103 && var(17) := 10
attr = c, na
hitflag = MAF
guardflag = l
animtype = med
air.animtype = med
fall.animtype = med
damage = 90
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := -38
ground.type = low
air.type = low
ground.slidetime = 12; +1
ground.hittime = 13
air.hittime = 10
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 440, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 5
trigger1 = var(13) := 103 && var(17) := 10
attr = c, na
hitflag = MAF
guardflag = l
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := -38
ground.type = low
air.type = low
ground.slidetime = 12; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 250, 240)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 440, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; c roundhouse
[StateDef 450]
type = c
MoveType = a
Anim = 450
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 2
SprPriority = 2
poweradd = 21

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

[State 450, hit]
type = HitDef
triggerall = var(21)
trigger1 = var(7) && animelem = 4
trigger1 = var(13) := 103 && var(17) := 12
attr = c, na
hitflag = m
guardflag = l
damage = 117 + 2 * var(2)
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := -3
ground.type = trip
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
ground.velocity = -1, -7
guard.velocity = -12.95; 78
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0
id = 450

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 250), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 450, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
ctrl = 1

; ellbow drop
[StateDef 510]
MoveType = a
Anim = 511
velset = 0, 0
Ctrl = var(0) := 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 42

[State 510, 0]
type = RemoveExplod
trigger1 = animelem = 9 || animelem = 10
ID = 510

[State 510, mvc2]
type = Explod
trigger1 = animelem = 1 || animelem = 9
anim = ifelse(animelem = 9, = 0, 512, 510)
scale = .83, 1.005
sprpriority = 2
bindtime = -1
removeongethit = 1
removetime = ifelse(animelem = 9, = 0, -2, -1)
id = 510
shadow = -1, -1, -1

[State 510, snd]
type = PlaySnd
trigger1 = animelem = 7
value = 1, 1

[State 510, voice]
type = PlaySnd
trigger1 = animelem = 7
value = 181
channel = 0
volume = var(31)

[State 510, a]
type = StateTypeSet
trigger1 = animelem = 8
statetype = a

[State 510, l]
type = StateTypeSet
trigger1 = animelem = 10
statetype = l

[State 510, c]
type = StateTypeSet
trigger1 = animelem = 11
statetype = c

[State 510, fat]
type = Width
trigger1 = animelemno(0) = 8
player = 40

[State 510, hit]
type = HitDef
triggerall = var(21) && !numtarget(510)
trigger1 = var(7) && animelem = 8
trigger1 = var(13) := 80 && var(17) := 10
trigger2 = var(7) && animelem = 9
trigger2 = var(13) := 80 && var(17) := 12
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 97 + var(2)
pausetime = var(17)+1, var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := ifelse(animelem = 9, = 0, 14, -35)
ground.type = low
air.type = low
ground.slidetime = 12; +1
ground.hittime = 13
air.hittime = 10
yaccel = .5
guard.velocity = -9.35; 54
ground.velocity = -1.25, 17.2
air.velocity = -1.25, 17.2
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 42, 0
givepower = 42, 0
fall = 1
fall.xvelocity = 0
fall.yvelocity = 0
kill = animelem = 9
fall.kill = 1
fall.damage = 7
id = 510

[State 510, hit nothing]
type = HitDef
trigger1 = animelem = 9, = 1
attr = c, na
hitflag =

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(var(0) := movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 220, 210)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 510, snd]
type = PlaySnd
trigger1 = animelem = 9
value = 5100

[State 510, ground effect]
type = Explod
trigger1 = animelem = 9
anim = f62
pos = 75, 13
ownpal = 1

[State 510, call envshake]
type = Helper
trigger1 = animelem = 9 && var(8) := 10
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 510, turn]
type = Turn
trigger1 = animelem = 10 || !animtime

[State 510, plus]
type = PosAdd
trigger1 = animelem = 10
x = -40

[State 510, 3]
type = NotHitBy
trigger1 = var(0)
value = SCA
ignorehitpause = 1

[State 510, 5]; Can't be thrown right after getting up
type = NotHitBy
trigger1 = !AnimTime && var(0)
value = , NT,ST,HT
time = 12
ignorehitpause = 1

[State 510, 6]; Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = !AnimTime && var(0)
value2 = SCA
time = 3
ignorehitpause = 1

[State 510, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; Dynamite Kick
[StateDef 540]
type = c
MoveType = a
Anim = 540
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 540, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 1, 1

[State 540, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 83 && var(17) := 10
attr = c, na
hitflag = MAF
guardflag = l
animtype = med
air.animtype = med
fall.animtype = med
damage = 90
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := 2
ground.type = low
air.type = low
ground.slidetime = 12; +1
ground.hittime = 13
air.hittime = 10
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -5.25, -6.75; 136, 44
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 540, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 83 && var(17) := 10
attr = c, na
hitflag = MAF
guardflag = l
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := 2
ground.type = low
air.type = low
ground.slidetime = 12; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -9.35; 54
air.velocity = -2.5, -8.5; 90, 75
ground.cornerpush.veloff = -17.2; 54
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 250, 240)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 540, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; russian kick
[StateDef 550]
type = c
MoveType = a
Anim = 550
velset = 0, 0
Ctrl = 0
Juggle = var(20) := 2
SprPriority = 2
poweradd = 21

[State 450, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 1, 2

[State 550, hit]
type = HitDef
triggerall = var(21)
trigger1 = var(7) && animelem = 3
trigger1 = var(13) := 83 && var(17) := 12
attr = c, na
hitflag = m
guardflag = l
damage = 117 + 2 * var(2)
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := 2
ground.type = trip
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
ground.velocity = -1, -7
guard.velocity = -12.95; 78
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0
id = 550

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 250), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 550, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
ctrl = 1

; j jab
[StateDef 600]
type = a
MoveType = a
Physics = a
Anim = 600
ctrl = 0
juggle = var(20) := 1
SprPriority = 2

[State 600, snd]
type = PlaySnd
trigger1 = !time
value = 1

[State 600, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 102 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = Light
air.animtype = Light
fall.animtype = light
damage = 55
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -93
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 9
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 600, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 102 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 55
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -93
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 14
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 0, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 210, 200)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 600, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 6
MoveType = I

; j strong
[StateDef 610]
type = a
MoveType = a
Physics = a
Anim = 610
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 610, snd]
type = PlaySnd
trigger1 = !time
value = 1, 1

[State 610, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 88 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 90
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -65
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 10
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 610, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 88 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -65
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 15
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 220, 210)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 610, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 6
MoveType = I

; air ellbow drop
[StateDef 615]
type = a
MoveType = a
Anim = 616
velset = 0, 0
Ctrl = var(0) := 0
Juggle = var(20) := 2
SprPriority = 2
poweradd = 42

[State 615, mvc2]
type = Explod
trigger1 = animelem = 1
anim = 615
scale = .83, 1.005
sprpriority = 2
bindtime = -1
removeongethit = 1
removetime = -1
id = 615
shadow = -1, -1, -1

[State 615, go]
type = VelSet
trigger1 = animelem = 3
x = 4.9
y = 10

[State 615, grav]
type = gravity
trigger1 = animelemno(0) = 5

[State 615, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 1

[State 615, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 4
channel = 0
volume = var(31)

[State 615, fat]
type = Width
trigger1 = animelemno(0) = 5
player = 40

[State 615, hit]
type = HitDef
triggerall = var(21) && !numtarget(510)
trigger1 = var(7) && animelem = 3, = 2
trigger1 = var(13) := 80 && var(17) := 10
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 97 + var(2)
pausetime = var(17)+1, var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -35
ground.type = low
air.type = low
ground.slidetime = 12; +1
ground.hittime = 13
air.hittime = 10
yaccel = .5
guard.velocity = -9.35; 54
ground.velocity = -1.25, 17.2
air.velocity = -1.25, 17.2
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 42, 0
givepower = 42, 0
fall = 1
fall.xvelocity = 0
fall.yvelocity = 0
kill = 0
fall.kill = 1
fall.damage = 7
id = 510

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(var(0) := movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 220, 210)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 615, end]
type = ChangeState
trigger1 = pos y > 0 && vel y > 0
trigger2 = movecontact = 2
value = 616

; air ellbow drop crash
[StateDef 616]
type = c
Anim = 618
velset = 0, 0
Ctrl = 0
SprPriority = 2
juggle = var(20) := 1
movetype = a

[State 616, 0]
type = RemoveExplod
trigger1 = !time || animelem = 2
ID = 615

[State 616, mvc2]
type = Explod
trigger1 = animelem = 1
anim = 617
scale = .83, 1.005
sprpriority = 2
bindtime = -1
removeongethit = 1
removetime = -2
id = 615
shadow = -1, -1, -1

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

[State 616, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 5100

[State 616, ground effect]
type = Explod
trigger1 = animelem = 1
anim = f62
pos = 75, 13
ownpal = 1

[State 616, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 7
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 616, turn]
type = Turn
trigger1 = animelem = 2 || !animtime

[State 616, plus]
type = PosAdd
trigger1 = animelem = 2
x = -40

[State 616, 3]
type = NotHitBy
trigger1 = var(0)
value = SCA
ignorehitpause = 1

[State 616, 5]; Can't be thrown right after getting up
type = NotHitBy
trigger1 = !AnimTime && var(0)
value = , NT,ST,HT
time = 12
ignorehitpause = 1

[State 616, 6]; Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = !AnimTime && var(0)
value2 = SCA
time = 3
ignorehitpause = 1

[State 616, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; j fierce
[StateDef 620]
type = a
MoveType = a
Physics = a
Anim = 620
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 620, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 620, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4
trigger1 = var(13) := 91 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 131
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -41
ground.type = high
air.type = low
ground.slidetime = 8; +1
ground.hittime = 11
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 620, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4
trigger1 = var(13) := 91 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = back
air.animtype = back
fall.animtype = back
damage = 145
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -41
ground.type = high
air.type = low
ground.slidetime = 8; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 220), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 620, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 6
MoveType = I

; j short
[StateDef 630]
type = a
MoveType = a
Physics = a
Anim = 630
ctrl = 0
juggle = var(20) := 1
SprPriority = 2

[State 630, snd]
type = PlaySnd
trigger1 = !time
value = 1

[State 630, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 92 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = Light
air.animtype = Light
fall.animtype = light
damage = 62
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -77
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 9
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 630, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 92 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 62
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -77
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 14
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 0, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 240, 230)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 630, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 5
MoveType = I

; j forward
[StateDef 640]
type = a
MoveType = a
Physics = a
Anim = 640
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 640, snd]
type = PlaySnd
trigger1 = !time
value = 1, 1

[State 640, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 72 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = diagup
fall.animtype = diagup
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -79
ground.type = High
air.type = high
ground.slidetime = 8; +1
ground.hittime = 10
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 640, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 72 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = diagup
fall.animtype = diagup
damage = 103
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -79
ground.type = High
air.type = high
ground.slidetime = 8; +1
ground.hittime = 15
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 250, 240)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 640, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 4
MoveType = I

; j roundhouse
[StateDef 650]
type = a
MoveType = a
Physics = a
Anim = 650
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 650, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 650, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3, = 2
trigger1 = var(13) := 85 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 131
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -66
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 11
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 650, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3, = 2
trigger1 = var(13) := 85 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = back
air.animtype = back
fall.animtype = back
damage = 145
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -66
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 250), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 650, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 8
MoveType = I

; Kuuchuu Headbutt y
[StateDef 710]
type = a
MoveType = a
Physics = a
Anim = 710
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 42

[State 710, snd]
type = PlaySnd
trigger1 = !time
value = 1, 1

[State 710, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 66 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 90
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 10
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 63, 21
givepower = 21, 0

[State 710, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 66 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 15
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 63, 21
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 220, 210)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 710, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 5
MoveType = I

; j fierce (moving)
[StateDef 720]
type = a
MoveType = a
Physics = a
Anim = 720
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 720, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 720, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4
trigger1 = var(13) := 96 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 131
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -57
ground.type = high
air.type = low
ground.slidetime = 8; +1
ground.hittime = 11
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 720, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4
trigger1 = var(13) := 96 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = back
air.animtype = back
fall.animtype = back
damage = 145
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -57
ground.type = high
air.type = low
ground.slidetime = 8; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 220), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 720, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 5
MoveType = I

; Kuuchuu Headbutt z
[StateDef 721]
type = a
MoveType = a
Physics = a
Anim = 710
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 42

[State 721, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 0
channel = 0
volume = var(31)

[State 721, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 721, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 66 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 110
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = high
air.type = low
ground.slidetime = 8; +1
ground.hittime = 11
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 125, 63
givepower = 21, 0

[State 721, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 66 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = back
air.animtype = back
fall.animtype = back
damage = 124
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -74
ground.type = high
air.type = low
ground.slidetime = 8; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 125, 63
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 2, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 220), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 721, Normal]
Type = StateTypeSet
Trigger1 = AnimElem = 5
MoveType = I

; Body Press
[StateDef 725]
type = a
MoveType = a
Physics = a
Anim = 725
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 42

[State 725, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 2
channel = 0
volume = var(31)

[State 725, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 725, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 3
trigger1 = var(13) := 15 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 131
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, 0, -30), var(14) := -60
sparkno = 2
guard.sparkno = 40
ground.type = high
air.type = high
ground.slidetime = 8; +1
ground.hittime = 11
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 725, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 3
trigger1 = var(13) := 15 && var(17) := 11
attr = a, na
hitflag = MAF
guardflag = ha
animtype = back
air.animtype = back
fall.animtype = back
damage = 145
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -60
sparkno = 2
guard.sparkno = 40
ground.type = high
air.type = high
ground.slidetime = 8; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 220), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

; double knee drop a
[StateDef 730]
type = a
MoveType = a
Physics = a
Anim = 730
ctrl = 0
juggle = var(20) := 1
SprPriority = 2
poweradd = 21

[State 730, snd]
type = PlaySnd
trigger1 = !time
value = 1

[State 730, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4
trigger1 = var(13) := 48 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = Light
air.animtype = Light
fall.animtype = light
damage = 62
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -43
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 9
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 730, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4
trigger1 = var(13) := 48 && var(17) := 7
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 62
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -43
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 14
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 0, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 240, 230)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

; double knee drop b
[StateDef 740]
type = a
MoveType = a
Physics = a
Anim = 730
Ctrl = 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 42

[State 740, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 4
channel = 0
volume = var(31)

[State 740, snd]
type = PlaySnd
trigger1 = !time
value = 1, 1

[State 740, hit]
type = HitDef
triggerall = var(21)
trigger1 = !var(2) && var(7) && animelem = 4
trigger1 = var(13) := 48 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = med
air.animtype = med
fall.animtype = med
damage = 97
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -43
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 10
air.hittime = 11
yaccel = .5
ground.velocity = -6; 30
air.velocity = -5.25, -6.75; 136, 44
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 740, counter-hit]
type = HitDef
triggerall = var(21)
trigger1 = var(2) && var(7) && animelem = 4
trigger1 = var(13) := 48 && var(17) := 9
attr = a, na
hitflag = MAF
guardflag = ha
animtype = hard
air.animtype = hard
fall.animtype = hard
damage = 103
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 10, -10, -30), var(14) := -43
ground.type = High
air.type = low
ground.slidetime = 8; +1
ground.hittime = 15
yaccel = .5
ground.velocity = -6; 30
air.velocity = -2.5, -8.5; 90, 75
airguard.velocity = -8, -1.25
ground.cornerpush.veloff = -9.9; 30
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 1, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, ifelse(var(2), 250, 240)), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

; back drop Attempt
[StateDef 800]
MoveType = A
Ctrl = 0
VelSet = 0, 0
Anim = 800
SprPriority = 2
PowerAdd = 21
Juggle = var(20) := 2

[State 800, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = Animelemno(0) = 2 && var(17) := -1
Attr = S, NT
P2Facing = 1
P1Facing = IfElse(Var(0), 1, -1)
HitFlag = M-
Priority = 1, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 805
P2StateNo = 810
Fall = 1
Guard.Dist = 0
ID = 800
YAccel = .5
fall.recover = 0
persistent = 0

[State 800, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 3
Value = 5000, 1
Channel = 0
volume = var(31)

[State 800, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; backdrop Throwing
[StateDef 805]
MoveType = A
VelSet = var(0) := 0
Anim = 805
SprPriority = 2

[State 805, no]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 805, tech hit yesno]
type = Null
triggerall = numtarget(800)
Trigger1 = time <= 25 && (Target(800), Command = "holdfwd" || Target(800), Command = "holdback") && (Target(800), Command = "2 P" || Target(800), Command = "2 K")
Trigger1 = Var(0) := 1 && 0

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 800
pos = 84, -71

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 800
pos = 75, -75

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 800
pos = -4, -83

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 800
pos = -44, -49

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
ID = 800
pos = -47, -41

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
ID = 800
pos = -38, -51

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
ID = 800
pos = -30, -89

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
ID = 800
pos = 77, -95

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
ID = 800
pos = 96 + !(time % 2), -21

[State 805, Voice]
Type = PlaySND
Trigger1 = AnimElem = 7
Value = 0, 1
Channel = 0
volume = var(31)

[State 805, fat]
type = Width
trigger1 = animelemno(0) = [1, 2]
edge = 64

[State 805, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 64, ifelse(backedgedist < 36, 18, 0)

[State 805, fat]
type = Width
trigger1 = animelemno(0) = [4, 6]
edge = 64, ifelse(backedgedist < 36, 40, 0)

[State 805, fat]
type = Width
trigger1 = animelemno(0) = 7
edge = 64

[State 805, fat]
type = Width
trigger1 = animelemno(0) = 8
edge = 72

[State 805, fat]
type = Width
trigger1 = animelemno(0) = 9
edge = 80

[State 805, snd]
type = PlaySnd
trigger1 = animelem = 9
value = 805

[State 805, ground effect]
type = Explod
trigger1 = animelem = 9
anim = f62
postype = p2
pos = 0, 21
ownpal = 1

[State 805, call envshake]
type = Helper
trigger1 = animelem = 9 && var(8) := 14
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 805, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 9
Value = ceil(fvar(2) * -138)
ID = 800
absolute = 1

[State 805, Fly]
Type = TargetState
triggerall = NumTarget(800)
Trigger1 = AnimElem = 10
Value = ifelse(var(0) && p2life, 818, 815)
ID = 800

[State 805, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

; Grabbed By back drop
[StateDef 810]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 810, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By back drop
[StateDef 815]
Type = A
MoveType = H
VelSet = -4.85, -6.5; 135, 67 (46 + 21)

[State 815, anim]
type = ChangeAnim2
trigger1 = !time
value = 815

[State 815, Gravity]
Type = VelAdd
Trigger1 = time
Y = .5

[State 815, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; Tech Bonus for back drop
[StateDef 818]
anim = ifelse(selfanimexist(5035), 5035, 5030)
Type = A
VelSet = -3.33, -8.67; , 76

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

[State 818, grav]
type = veladd
trigger1 = time
y = .5

[State 818, blink]
type = PalFX
trigger1 = !animTime || time > 10
time = 3
add = 128, 128, 128

[State 818, End]
Type = SelfState
Trigger1 = !AnimTime || time > 10
Value = 5040
anim = 5040

; Kamitsuki Attempt
[StateDef 820]
MoveType = A
Ctrl = 0
VelSet = 0, 0
Anim = 800
SprPriority = 2
PowerAdd = 21
Juggle = var(20) := 1

[State 820, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = Animelemno(0) = 2 && var(17) := -1
Attr = S, NT
P2Facing = 1
P1Facing = IfElse(Var(0), 1, -1)
HitFlag = M-
Priority = 1, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 825
P2StateNo = 830
Fall = 1
Guard.Dist = 0
ID = 820
YAccel = .5
fall.recover = 0
getpower = 21, 21
persistent = 0

[State 820, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 3
Value = 5000, 1
Channel = 0
volume = var(31)

[State 820, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; Kamitsuki Throwing
[StateDef 825]
MoveType = A
VelSet = var(0) := 0, var(12) := 0
Anim = 825
SprPriority = 2
ctrl = var(13) := 0

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 825, tech hit yesno]
type = Null
triggerall = numtarget(820)
Trigger1 = time <= 25 && (Target(820), Command = "holdfwd" || Target(820), Command = "holdback") && (Target(820), Command = "2 P" || Target(820), Command = "2 K")
Trigger1 = Var(0) := 1 && 0

[State 825, fat]
type = Width
trigger1 = animelem = 18, < 0
edge = 64

[State 825, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 820
pos = 78, -70

[State 825, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(18) < 0
ID = 820
pos = 66 + ifelse(animelemno(0) = 5 || animelemno(0) = 9 || animelemno(0) = 13 || animelemno(0) = 17, !(time % 2), 0), -74

[State 825, count times buttons are pressed]
type = Null
triggerall = animelem = 17, < 0
trigger1 = var(12) > 0 && !(time % 4); decrease steadily
trigger1 = var(12) := (var(12) - (1 + var(13)))
trigger2 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"; add times punch buttons are pressed
trigger2 = var(12) := var(12) + 1 + command = "a1" + command = "b1" + command = "c1" + command = "x1" + command = "y1" + command = "z1"
trigger3 = target(820), command = "a1" || target(820), command = "b1" || target(820), command = "c1" || target(820), command = "x1" || target(820), command = "y1" || target(820), command = "z1"; substract times punch p2 buttons are pressed
trigger3 = var(12) := var(12) - 1 - (target(820), command = "a1" || target(820), command = "x1") - (target(820), command = "b1" || target(820), command = "y1") - (target(820), command = "c1" - target(820), command = "z1")

[State 825, blink]
type = PalFX
triggerall = animelem = 3, >= 0 && animelem = 17, < 0
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 825, tech bonus or dead p2]
type = ChangeAnim
trigger1 = animelem = 6 && var(0)
trigger2 = animelemno(1) = animelemno(0)+1 && animelem = 18, < 0 && !p2life
value = anim
elem = 18

[State 825, frameskip]
type = ChangeAnim
triggerall = (animelemno(0) = [3, 16]) && animelemtime(animelemno(0)) > 2
trigger1 = var(12) > 4
value = anim
elem = animelemno(0) + 1

[State 825, more hits]
type = ChangeAnim
triggerall = (!var(13) && animelem = 6) || (var(13) < 2 && animelem = 10) || (var(13) < 3 && animelem = 14)
trigger1 = var(12) > 6
trigger1 = var(13) := var(13) + 1
value = anim
elem = animelemno(0) - 4

[State 825, less hits]
type = ChangeAnim
triggerall = animelem = 10 || animelem = 14
trigger1 = var(12) < -10
value = anim
elem = 18

[State 825, hold p2 up]
type = TargetState
trigger1 = animelem = 3 || animelem = 6 || animelem = 10 || animelem = 14
value = 831
ID = 820

[State 825, bite p2]
type = TargetState
trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
value = 832
ID = 820

[State 825, hitspark]
type = Explod
trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
anim = fifelse(animelem = 5, = 0, 0, 1)
pos = 60, -89
ontop = 1
ownpal = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 825, hitadd]
type = HitAdd
trigger1 = (var(13) && animelem = 5) || animelem = 9 || animelem = 13 || (!var(0) && animelem = 17)
value = 1

[State 825, Damage]
Type = TargetLifeAdd
Trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
value = ceil(fvar(2) * -ifelse(animelem = 17, = 0 && var(0), 69, ifelse(animelem = 5, = 0 && !var(13), 55, ifelse(animelem = 17, = 0, 41, 14))))
ID = 820
absolute = 1

[State 825, bite snd]
type = PlaySnd
trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
value = 825
channel = 1

[State 825, bind]
type = TargetBind
trigger1 = animelem = 18
ID = 820
pos = 66, -74 - target(820), const(size.mid.pos.y)

[State 825, Fly]
Type = TargetState
triggerall = NumTarget(820)
Trigger1 = AnimElem = 18
Value = ifelse(var(0) && p2life, 838, 835)
ID = 820

[State 825, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

; Grabbed By Kamitsuki
[StateDef 830]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 830, Camera Still]
Type = ScreenBound
Trigger1 = 1

; held up by Kamitsuki
[StateDef 831]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 831, blink]
type = PalFX
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 831, Camera Still]
Type = ScreenBound
Trigger1 = 1

; bitten by Kamitsuki
[StateDef 832]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 832, blink]
type = PalFX
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 832, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By Kamitsuki
[StateDef 835]
Type = A
MoveType = H
VelSet = -5.45, -7.5; 169, 53

[State 835, End]
Type = SelfState
Trigger1 = !time
Value = 5035

; Tech Bonus for kamitsuki
[StateDef 838]
anim = ifelse(selfanimexist(5035), 5035, 5030)
Type = A
VelSet = -3.33, -9.65; , 83

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

[State 838, grav]
type = veladd
trigger1 = time
y = .5

[State 838, blink]
type = PalFX
trigger1 = !animTime || time > 10
time = 3
add = 128, 128, 128

[State 838, End]
Type = SelfState
Trigger1 = !AnimTime || time > 10
Value = 5040
anim = 5040

; stomach claw Attempt
[StateDef 840]
type = c
MoveType = A
Ctrl = 0
VelSet = 0, 0
Anim = 840
SprPriority = 2
PowerAdd = 21
Juggle = var(20) := 1

[State 840, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = Animelemno(0) = 2 && var(17) := -1
Attr = C, NT
P2Facing = 1
P1Facing = IfElse(Var(0), 1, -1)
HitFlag = M-
Priority = 1, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 845
P2StateNo = 850
Fall = 1
Guard.Dist = 0
ID = 840
YAccel = .5
fall.recover = 0
getpower = 21, 21
persistent = 0

[State 840, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 3
Value = 5000, 1
Channel = 0
volume = var(31)

[State 840, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; stomach claw Throwing
[StateDef 845]
type = c
MoveType = A
VelSet = var(0) := 0, var(12) := 0
Anim = 845
SprPriority = 2
ctrl = var(13) := 0

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 845, tech hit yesno]
type = Null
triggerall = numtarget(840)
Trigger1 = time <= 25 && (Target(840), Command = "holdfwd" || Target(840), Command = "holdback") && (Target(840), Command = "2 P" || Target(840), Command = "2 K")
Trigger1 = Var(0) := 1 && 0

[State 845, fat]
type = Width
trigger1 = animelem = 10, < 0
edge = 64

[State 845, bind]
type = TargetBind
trigger1 = animelemtime(10) < 0
ID = 840
pos = 86 + ifelse(animelemno(0) = 2 || animelemno(0) = 4 || animelemno(0) = 6 || animelemno(0) = 8, !(time % 2), 0), -59

[State 845, count times buttons are pressed]
type = Null
triggerall = animelem = 8, < 0
trigger1 = var(12) > 0 && !(time % 4); decrease steadily
trigger1 = var(12) := (var(12) - (1 + var(13)))
trigger2 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"; add times punch buttons are pressed
trigger2 = var(12) := var(12) + 1 + command = "a1" + command = "b1" + command = "c1" + command = "x1" + command = "y1" + command = "z1"
trigger3 = target(840), command = "a1" || target(840), command = "b1" || target(840), command = "c1" || target(840), command = "x1" || target(840), command = "y1" || target(840), command = "z1"; substract times punch p2 buttons are pressed
trigger3 = var(12) := var(12) - 1 - (target(840), command = "a1" || target(840), command = "x1") - (target(840), command = "b1" || target(840), command = "y1") - (target(840), command = "c1" - target(840), command = "z1")

[State 845, blink]
type = PalFX
triggerall = animelem = 2, >= 0 && animelem = 8, < 0
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 845, tech bonus or p2 dead]
type = ChangeAnim
trigger1 = animelem = 3 && var(0)
trigger2 = animelemno(1) = animelemno(0)+1 && animelem = 10, < 0 && !p2life
value = anim
elem = 10

[State 845, frameskip]
type = ChangeAnim
triggerall = (animelemno(0) = [2, 7]) && animelemtime(animelemno(0)) > 2
trigger1 = var(12) > 4
value = anim
elem = animelemno(0) + 1

[State 845, more hits]
type = ChangeAnim
triggerall = (!var(13) && animelem = 3) || (var(13) < 2 && animelem = 5) || (var(13) < 3 && animelem = 7)
trigger1 = var(12) > 6
trigger1 = var(13) := var(13) + 1
value = anim
elem = animelemno(0) - 2

[State 845, less hits]
type = ChangeAnim
triggerall = animelem = 5 || animelem = 7
trigger1 = var(12) < -10
value = anim
elem = 10

[State 845, hold p2 up]
type = TargetState
trigger1 = animelem = 3 || animelem = 5 || animelem = 7 || animelem = 9
value = 851
ID = 840

[State 845, claw p2]
type = TargetState
trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
value = 852
ID = 840

[State 845, hitspark]
type = Explod
trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
anim = fifelse(animelem = 2, = 0, 2, 0)
pos = 85, -58
ontop = 1
ownpal = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 845, hitadd]
type = HitAdd
trigger1 = (var(13) && animelem = 2) || animelem = 4 || animelem = 6 || (!var(0) && animelem = 8)
value = 1

[State 845, Damage]
Type = TargetLifeAdd
Trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8 || (animelem = 10 && var(0)) 
value = ceil(fvar(2) * -ifelse(animelem = 10, = 0, 62, ifelse(animelem = 2, = 0, 55, ifelse(animelem = 8, = 0, 28, 14))))
ID = 840
absolute = 1

[State 845, claw snd]
type = PlaySnd
trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
value = 845
channel = 1

[State 845, bind]
type = TargetBind
trigger1 = animelem = 10
ID = 840
pos = 84, -60 - target(840), const(size.mid.pos.y)

[State 845, Fly]
Type = TargetState
triggerall = NumTarget(840)
Trigger1 = AnimElem = 10
Value = ifelse(var(0) && p2life, 858, 855)
ID = 840

[State 845, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

; Grabbed By stomach claw
[StateDef 850]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 850, Camera Still]
Type = ScreenBound
Trigger1 = 1

; held up by stomach claw
[StateDef 851]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 851, Anim]
Type = ChangeAnim2
Trigger1 = !Time
Value = 850

[State 851, blink]
type = PalFX
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 851, Camera Still]
Type = ScreenBound
Trigger1 = 1

; clawed by stomach claw
[StateDef 852]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 852, Anim]
Type = ChangeAnim2
Trigger1 = !Time
Value = 851

[State 852, blink]
type = PalFX
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 852, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By stomach claw
[StateDef 855]
Type = A
MoveType = H
VelSet = -5.2, -8.5; 169, 53

[State 855, End]
Type = SelfState
Trigger1 = !time
Value = 5035

; Tech Bonus for stomach claw
[StateDef 858]
anim = ifelse(selfanimexist(5035), 5035, 5030)
Type = A
VelSet = -3.33, -9.625; , 83

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

[State 858, grav]
type = veladd
trigger1 = time
y = .5

[State 858, blink]
type = PalFX
trigger1 = !animTime || time > 10
time = 3
add = 128, 128, 128

[State 858, End]
Type = SelfState
Trigger1 = !AnimTime || time > 10
Value = 5040
anim = 5040

; piledriver Attempt
[StateDef 860]
MoveType = A
Ctrl = 0
VelSet = 0, 0
Anim = 800
SprPriority = 2
PowerAdd = 21
Juggle = var(20) := 2

[State 860, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = Animelemno(0) = 2 && var(17) := -1
Attr = S, NT
P2Facing = 1
P1Facing = IfElse(Var(10) := var(0), 1, -1)
HitFlag = M-
Priority = 1, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 865
P2StateNo = 870
Fall = 1
Guard.Dist = 0
ID = 860
YAccel = .5
fall.recover = 0
getpower = 21, 21
persistent = 0

[State 860, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 3
Value = 5000, 1
Channel = 0
volume = var(31)

[State 860, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; piledriver Throwing
[StateDef 865]
MoveType = A
VelSet = var(0) := 0
Anim = 865
SprPriority = 2

[State 865, tech hit yesno]
type = Null
triggerall = numtarget(860)
Trigger1 = time <= 25 && (Target(860), Command = "holdfwd" || Target(860), Command = "holdback") && (Target(860), Command = "2 P" || Target(860), Command = "2 K")
Trigger1 = Var(0) := 1 && 0

[State 865, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 860
pos = 84, -71

[State 865, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 860
pos = 75, -75

[State 865, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 860
pos = 75, -49

[State 865, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 860
pos = 75, -40

[State 865, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
ID = 860
pos = 67, -50

[State 865, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0
ID = 860
pos = 61, -80

[State 865, turn p2]
type = TargetFacing
trigger1 = animelem = 4
value = 1

[State 865, Voice]
Type = PlaySND
Trigger1 = AnimElem = 1
Value = 0
Channel = 0
volume = var(31)

[State 865, a]
type = StateTypeSet
trigger1 = animelem = 6
statetype = a

[State 865, jump]
type = VelSet
trigger1 = animelem = 6
x = ifelse(var(10), 0, -3.33); 45
y = -3.025; 9

[State 865, grav]
type = Gravity
trigger1 = animelem = 6, > 0

[State 865, fat]
type = Width
trigger1 = 1
edge = 64

[State 865, End]
Type = ChangeState
Trigger1 = !animtime
Value = 866

; piledriver crash & jump away
[StateDef 866]
type = c
MoveType = A
VelSet = 0, 0
Anim = 866
SprPriority = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

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

[State 866, Voice]
Type = PlaySND
Trigger1 = AnimElem = 1
Value = 0, 1
Channel = 0
volume = var(31)

[State 866, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 860
pos = 66 + !(time % 2), -7

[State 866, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 860
pos = 59 + !(time % 2), -9

[State 866, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 860
pos = 56, -18

[State 866, bind]
type = TargetBind
trigger1 = animelemtime(4) = 0
ID = 860
pos = 56 - (abs(target(860), const(size.head.pos.x)) - abs(target(860), const(size.mid.pos.x))), -18 - (abs(target(860), const(size.head.pos.y)) - abs(target(860), const(size.mid.pos.y)))

[State 866, a]
type = StateTypeSet
trigger1 = animelem = 4
statetype = a

[State 866, go]
type = VelSet
trigger1 = animelem = 4
x = -3.79; 91
y = -5; 34

[State 866, grav]
type = veladd
trigger1 = animelem = 4, > 0
y = .4

[State 866, fat]
type = Width
trigger1 = animelemno(0) = [1, 3]
edge = 64

[State 866, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 805

[State 866, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = 66, 0
ownpal = 1
sprpriority  = 3

[State 866, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 0, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 14
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 866, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -138)
ID = 860
absolute = 1

[State 866, turn p2]
type = TargetFacing
trigger1 = animelem = 4
value = -1

[State 866, Fly]
Type = TargetState
triggerall = NumTarget(860)
Trigger1 = AnimElem = 4
Value = ifelse(var(0) && p2life, 878, 875)
ID = 860

[State 866, End]
Type = ChangeState
Trigger1 = !animtime
Value = 52

; Grabbed By piledriver
[StateDef 870]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 870, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By piledriver
[StateDef 875]
Type = A
MoveType = H
VelSet = -5.4, -6.5; 140, 92 (44 + 48)

[State 875, anim]
type = ChangeAnim2
trigger1 = !time
value = 875

[State 875, Gravity]
Type = VelAdd
Trigger1 = time
Y = .5

[State 875, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; Tech Bonus for piledriver
[StateDef 878]
anim = ifelse(selfanimexist(5035), 5035, 5030)
Type = A
VelSet = -3.33, -9.4; , 80

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

[State 878, grav]
type = veladd
trigger1 = time
y = .5

[State 878, blink]
type = PalFX
trigger1 = !animTime || time > 10
time = 3
add = 128, 128, 128

[State 878, End]
Type = SelfState
Trigger1 = !AnimTime || time > 10
Value = 5040
anim = 5040

; flying piledriver Attempt
[StateDef 900]
type = a
MoveType = A
Ctrl = 0
Anim = 900
SprPriority = 2
PowerAdd = 21
Juggle = var(20) := 1
physics = a

[State 900, hit]
Type = HitDef
triggerall = var(21)
Trigger1 = Animelem = 1 && var(17) := -1
Attr = a, NT
P2Facing = 1
P1Facing = 1
HitFlag = af
Priority = 1, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 910
P2StateNo = 920
Fall = 1
Guard.Dist = 0
ID = 900
YAccel = .5
fall.recover = 0
getpower = 21, 21

[State 900, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 2
Value = 5000, 1
Channel = 0
volume = var(31)

; flying piledriver Throwing
[StateDef 910]
type = a
MoveType = A
VelSet = var(0) := 0, fvar(3) := vel y / 2
Anim = 910
SprPriority = 2

[State 910, tech hit yesno]
type = Null
triggerall = numtarget(900)
Trigger1 = time <= 25 && (Target(900), Command = "holdfwd" || Target(900), Command = "holdback") && (Target(900), Command = "2 P" || Target(900), Command = "2 K")
Trigger1 = Var(0) := 1 && 0

[State 910, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 900
pos = 44, -87

[State 910, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 900
pos =  31, -141

[State 910, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0
ID = 900
pos = -34, -80

[State 910, Voice]
Type = PlaySND
Trigger1 = AnimElem = 1
Value = 0, 2
Channel = 0
volume = var(31)

[State 910, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 0, 30

[State 910, stop]
type = PosFreeze
trigger1 = animelem = 3, < 0

[State 910, go]
type = VelSet
trigger1 = animelem = 3
y = fvar(3)

[State 910, grav]
type = Gravity
trigger1 = animelem = 3, > 0

[State 910, End]
Type = ChangeState
Trigger1 = vel y > 0 && pos y >= 0
Value = 915

; flying piledriver crash & jump away
[StateDef 915]
type = c
MoveType = A
VelSet = 0, 0
Anim = 915
SprPriority = 2

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

[State 915, target state]
type = TargetState
trigger1 = !time
value = 921
ID = 900

[State 915, Voice]
Type = PlaySND
Trigger1 = AnimElem = 1
Value = 0, 1
Channel = 0
volume = var(31)

[State 915, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 900
pos = -30 + !(time % 2), -3

[State 915, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 900
pos = -29 + !(time % 2), -4

[State 915, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(3) < 4
id = 900
pos = -31, -12

[State 915, bind]
type = TargetBind
trigger1 = animelem = 3, = 4
ID = 900
pos = -31 - (abs(target(900), const(size.head.pos.x)) - abs(target(900), const(size.mid.pos.x))), -12 - (abs(target(900), const(size.head.pos.y)) - abs(target(900), const(size.mid.pos.y)))

[State 915, a]
type = StateTypeSet
trigger1 = animelem = 3, = 4
statetype = a

[State 915, go]
type = VelSet
trigger1 = animelem = 3, = 4
x = 2.4; 48
y = -7; 36

[State 915, grav]
type = veladd
trigger1 = animelem = 3, > 4
y = .75

[State 915, fat]
type = Width
trigger1 = animelemno(0) = [1, 2] 
edge = 0, 36

[State 915, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 0, 42

[State 915, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 805

[State 915, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = -30, 0
ownpal = 1
sprpriority  = 3

[State 915, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 24, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 8
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 915, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -138)
ID = 900
absolute = 1

[State 915, turn p2]
type = TargetFacing
trigger1 = animelem = 3, = 4
value = 1

[State 915, Fly]
Type = TargetState
triggerall = NumTarget(900)
Trigger1 = animelem = 3, = 4
Value = ifelse(var(0) && p2life, 928, 925)
ID = 900

[State 915, End]
Type = ChangeState
Trigger1 = !animtime
Value = 916

; flying piledriver land
[StateDef 916]
type = c
MoveType = A
VelSet = 0, 0
Anim = 916
SprPriority = 2

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

[State 916, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 916, turn]
type = Turn
trigger1 = !animtime

[State 916, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; Grabbed By flying piledriver
[StateDef 920]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 920, Camera Still]
Type = ScreenBound
Trigger1 = 1

; smashed By flying piledriver
[StateDef 921]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 921, Camera Still]
Type = ScreenBound
Trigger1 = 1

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

; Thrown By flying piledriver
[StateDef 925]
Type = A
MoveType = H
VelSet = -4.33, -8.5; 123, 105 (49 + 56)

[State 925, anim]
type = ChangeAnim2
trigger1 = !time
value = 925

[State 925, Gravity]
Type = VelAdd
Trigger1 = time
Y = .6

[State 925, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; Tech Bonus for flying piledriver
[StateDef 928]
anim = ifelse(selfanimexist(5035), 5035, 5030)
Type = A
VelSet = -3.33, -10.5; , 99

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

[State 928, grav]
type = veladd
trigger1 = time
y = .5

[State 928, blink]
type = PalFX
trigger1 = !animTime || time > 10
time = 3
add = 128, 128, 128

[State 928, End]
Type = SelfState
Trigger1 = !AnimTime || time > 10
Value = 5040
anim = 5040

; DASH Kamitsuki Throwing
[StateDef 930]
MoveType = A
VelSet = var(12) := 0, var(13) := 0
Anim = 930
SprPriority = 2
ctrl = 0

[State 930, p2]
type = TargetState
trigger1 = !time
value = 830
ID = 100

[State 930, skip]
type = ChangeAnim
trigger1 = !time
value = anim
elem = animelemno(0) + 2

[State 930, fat]
type = Width
trigger1 = animelem = 18, < 0
edge = 64

[State 930, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 100
pos = 78, -70

[State 930, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(18) < 0
ID = 100
pos = 66 + ifelse(animelemno(0) = 5 || animelemno(0) = 9 || animelemno(0) = 13 || animelemno(0) = 17, !(time % 2), 0), -74

[State 930, count times buttons are pressed]
type = Null
triggerall = animelem = 17, < 0
trigger1 = var(12) > 0 && !(time % 4); decrease steadily
trigger1 = var(12) := (var(12) - (1 + var(13)))
trigger2 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"; add times punch buttons are pressed
trigger2 = var(12) := var(12) + 1 + command = "a1" + command = "b1" + command = "c1" + command = "x1" + command = "y1" + command = "z1"
trigger3 = target(100), command = "a1" || target(100), command = "b1" || target(100), command = "c1" || target(100), command = "x1" || target(100), command = "y1" || target(100), command = "z1"; substract times punch p2 buttons are pressed
trigger3 = var(12) := var(12) - 1 - (target(100), command = "a1" || target(100), command = "x1") - (target(100), command = "b1" || target(100), command = "y1") - (target(100), command = "c1" - target(100), command = "z1")

[State 930, blink]
type = PalFX
triggerall = animelem = 3, >= 0 && animelem = 17, < 0
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 930, dead p2]
type = ChangeAnim
trigger1 = animelemno(1) = animelemno(0)+1 && animelem = 18, < 0 && !p2life
value = anim
elem = 18

[State 930, frameskip]
type = ChangeAnim
triggerall = (animelemno(0) = [3, 16]) && animelemtime(animelemno(0)) > 2
trigger1 = var(12) > 4
value = anim
elem = animelemno(0) + 1

[State 930, more hits]
type = ChangeAnim
triggerall = (!var(13) && animelem = 6) || (var(13) < 2 && animelem = 10) || (var(13) < 3 && animelem = 14)
trigger1 = var(12) > 6
trigger1 = var(13) := var(13) + 1
value = anim
elem = animelemno(0) - 4

[State 930, less hits]
type = ChangeAnim
triggerall = animelem = 10 || animelem = 14
trigger1 = var(12) < -10
value = anim
elem = 18

[State 930, hold p2 up]
type = TargetState
trigger1 = animelem = 3 || animelem = 6 || animelem = 10 || animelem = 14
value = 831
ID = 100

[State 930, bite p2]
type = TargetState
trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
value = 832
ID = 100

[State 930, hitspark]
type = Explod
trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
anim = fifelse(animelem = 5, = 0, 0, 1)
pos = 60, -89
ontop = 1
ownpal = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 930, hitadd]
type = HitAdd
trigger1 = (var(13) && animelem = 5) || animelem = 9 || animelem = 13 || (!var(0) && animelem = 17)
value = 1

[State 930, Damage]
Type = TargetLifeAdd
Trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
value = ceil(fvar(2) * -ifelse(animelem = 5, = 0 && !var(13), 55, ifelse(animelem = 17, = 0, 41, 14)))
ID = 100
absolute = 1

[State 930, bite snd]
type = PlaySnd
trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 17
value = 825
channel = 1

[State 930, bind]
type = TargetBind
trigger1 = animelem = 18
ID = 100
pos = 66, -74 - target(100), const(size.mid.pos.y)

[State 930, Fly]
Type = TargetState
triggerall = NumTarget(100)
Trigger1 = AnimElem = 18
Value = 835
ID = 100

[State 930, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

; DASH backdrop Throwing
[StateDef 940]
MoveType = A
VelSet = 0, 0
Anim = 940
SprPriority = 2

[State 940, 0]
type = Null
trigger1 = !time
trigger1 = var(0) := command = "holdfwd"

[State 940, turn you]
type = Turn
trigger1 = !time && !var(0)

[State 940, turn p2]
type = TargetFacing
trigger1 = !var(0) && animelem = 7
value = -1

[State 940, 0]
type = ChangeAnim
trigger1 = !time
value = anim
elem = animelemno(0) + ifelse(var(0), 1, 3)

[State 940, 1]
type = TargetState
trigger1 = !time
value = ifelse(var(0), 951, 950)
ID = 100

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 100
pos = 84, -71

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 100
pos = 75, -75

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 100
pos = -4, -83

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 100
pos = -44, -49

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
ID = 100
pos = -47, -41

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
ID = 100
pos = -38, -51

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
ID = 100
pos = -30, -89

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
ID = 100
pos = 77, -95

[State 940, bind]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
ID = 100
pos = 96, -21

[State 940, Voice]
Type = PlaySND
Trigger1 = AnimElem = 7
Value = 0, 1
Channel = 0
volume = var(31)

[State 940, fat]
type = Width
trigger1 = (animelemno(0) = [1, 2]) && var(0)
edge = 64

[State 940, fat]
type = Width
trigger1 = animelemno(0) = 3 && var(0)
edge = 64, ifelse(backedgedist < 36, 18, 0)

[State 940, fat]
type = Width
trigger1 = animelemno(0) = [4, 6]
edge = 64, ifelse(backedgedist < 36, 40, 0)

[State 940, fat]
type = Width
trigger1 = animelemno(0) = 7
edge = 64

[State 940, fat]
type = Width
trigger1 = animelemno(0) = 8
edge = 72

[State 940, fat]
type = Width
trigger1 = animelemno(0) = 9
edge = 80

[State 940, snd]
type = PlaySnd
trigger1 = animelem = 9
value = 805

[State 940, ground effect]
type = Explod
trigger1 = animelem = 9
anim = f62
postype = p2
pos = 0, 21
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 9 && var(8) := 14
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 940, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 9
Value = ceil(fvar(2) * -138)
ID = 100
absolute = 1

[State 940, Fly]
Type = TargetState
triggerall = NumTarget(100)
Trigger1 = AnimElem = 10
Value = 815
ID = 100

[State 940, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

; DASH Grabbed By back drop
[StateDef 950]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 950, Camera Still]
Type = ScreenBound
Trigger1 = 1

; DASH Grabbed By back drop with turn
[StateDef 951]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 951, Camera Still]
Type = ScreenBound
Trigger1 = 1

; banishing flat x
[StateDef 1000]
MoveType = a
Anim = 1000
velset = 0, 0
Ctrl = 0
SprPriority = -1
poweradd = 83
juggle = var(20) := 1

[State 1000, go]
type = PosAdd
trigger1 = animelem = 1
x = 14

[State 1000, fx]
type = Explod
trigger1 = animelem = 2
anim = ifelse(palno > 6, 1050, 1055)
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1
scale = ifelse(palno > 6, .5, .83), ifelse(palno > 6, .5, 1.005)
removetime = -1
id = 1000

[State 1000, remove fx]
type = RemoveExplod
trigger1 = animelemno(0) > 4
ID = 1000

[State 1000, go]
type = PosAdd
trigger1 = animelem = 2
x = 1

[State 1000, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 2
channel = 0
volume = var(31)

[State 1000, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 1000, go]
type = PosAdd
trigger1 = animelem = 3
x = 3

[State 1000, go]
type = PosAdd
trigger1 = animelem = 4
x = 22

[State 1000, anti proj helper]
type = Helper
trigger1 = animelem = 4
ID = 6020
stateno = 6020
ownpal = 1
ignorehitpause = 1

[State 1000, projs dont touch me]; NotHitBy with SCA, AP or SCA, NP, SP, HP is broken
type = HitBy
trigger1 = numhelper(6020)
value = sca, aa, at
ignorehitpause = 1

[State 1000, hit]
type = HitDef
triggerall = var(21)
trigger1 = animelem = 4
trigger1 = var(13) := 66 && var(17) := 12
attr = s, sa
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = back
fall.animtype = back
damage = 110 + 2*var(2), 14
priority = 5
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := -73
ground.type = low
air.type = low
ground.slidetime = 14; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -12.95; 78
air.velocity = -5, -6.75; 136, 44
ground.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 3, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 1000), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 1000, go]
type = PosAdd
trigger1 = animelem = 5
x = 8

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

; banishing flat y
[StateDef 1010]
MoveType = a
Anim = 1010
velset = 0, 0
Ctrl = 0
SprPriority = -1
poweradd = 83
juggle = var(20) := 1

[State 1010, go]
type = PosAdd
trigger1 = animelem = 1
x = 16

[State 1010, fx]
type = Explod
trigger1 = animelem = 2
anim = ifelse(palno > 6, 1050, 1055)
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1
scale = ifelse(palno > 6, .5, .83), ifelse(palno > 6, .5, 1.005)
removetime = -1
id = 1000

[State 1010, remove fx]
type = RemoveExplod
trigger1 = animelemno(0) > 4
ID = 1000

[State 1010, go]
type = PosAdd
trigger1 = animelem = 2
x = 3

[State 1010, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 2
channel = 0
volume = var(31)

[State 1010, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 1010, go]
type = PosAdd
trigger1 = animelem = 3
x = 5

[State 1010, go]
type = PosAdd
trigger1 = animelem = 4
x = 24

[State 1010, anti proj helper]
type = Helper
trigger1 = animelem = 4
ID = 6020
stateno = 6020
ownpal = 1
ignorehitpause = 1

[State 1010, projs dont touch me]; NotHitBy with SCA, AP or SCA, NP, SP, HP is broken
type = HitBy
trigger1 = numhelper(6020)
value = sca, aa, at
ignorehitpause = 1

[State 1010, hit]
type = HitDef
triggerall = var(21)
trigger1 = animelem = 4
trigger1 = var(13) := 66 && var(17) := 12
attr = s, sa
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = back
fall.animtype = back
damage = 117 + 2*var(2), 21
priority = 5
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := -73
ground.type = low
air.type = low
ground.slidetime = 14; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -12.95; 78
air.velocity = -5, -6.75; 136, 44
ground.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 3, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 1000), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 1010, go]
type = PosAdd
trigger1 = animelem = 5
x = 16

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

; banishing flat z
[StateDef 1020]
MoveType = a
Anim = 1020
velset = 0, 0
Ctrl = 0
SprPriority = -1
poweradd = 83
juggle = var(20) := 1

[State 1020, go]
type = PosAdd
trigger1 = animelem = 1
x = 20

[State 1020, fx]
type = Explod
trigger1 = animelem = 2
anim = ifelse(palno > 6, 1050, 1055)
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1
scale = ifelse(palno > 6, .5, .83), ifelse(palno > 6, .5, 1.005)
removetime = -1
id = 1000

[State 1020, remove fx]
type = RemoveExplod
trigger1 = animelemno(0) > 4
ID = 1000

[State 1020, go]
type = PosAdd
trigger1 = animelem = 2
x = 7

[State 1020, voice]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 2
channel = 0
volume = var(31)

[State 1020, snd]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 2

[State 1020, go]
type = PosAdd
trigger1 = animelem = 3
x = 9

[State 1020, go]
type = PosAdd
trigger1 = animelem = 4
x = 28

[State 1020, anti proj helper]
type = Helper
trigger1 = animelem = 4
ID = 6020
stateno = 6020
ownpal = 1
ignorehitpause = 1

[State 1020, projs dont touch me]; NotHitBy with SCA, AP or SCA, NP, SP, HP is broken
type = HitBy
trigger1 = numhelper(6020)
value = sca, aa, at
ignorehitpause = 1

[State 1020, hit]
type = HitDef
triggerall = var(21)
trigger1 = animelem = 4
trigger1 = var(13) := 66 && var(17) := 12
attr = s, sa
hitflag = MAF
guardflag = m
animtype = hard
air.animtype = back
fall.animtype = back
damage = 124 + 2*var(2), 21
priority = 5
pausetime = var(17), var(17); +1
sparkxy = ifelse(p2bodydist x > 30, -10, -30), var(14) := -73
ground.type = low
air.type = low
ground.slidetime = 14; +1
ground.hittime = 16
yaccel = .5
ground.velocity = -12.95; 78
air.velocity = -5, -6.75; 136, 44
ground.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 3, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 1000), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 1020, go]
type = PosAdd
trigger1 = animelem = 5
x = 24

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

; quick double lariat start
[StateDef 1100]
MoveType = a
Anim = 1100
velset = 0, 0
Ctrl = 0
SprPriority = 2
poweradd = 83
juggle = var(20) := 1

[State 1100, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 1100, 1; 0
channel = 0
volume = var(31)

[State 1100, hit fwd]
type = HitDef
triggerall = var(21)
triggerall = var(17) := 11
trigger1 = animelem = 2
trigger1 = var(13) := 35
attr = s, sa
hitflag = MAF
guardflag = ma
animtype = back
air.animtype = back
fall.animtype = back
damage = 83 + var(2), 14
priority = 5
pausetime = var(17), var(17); +1
sparkxy = -15, var(14) := ifelse(p2bodydist x > -26, -65, -113)
sparkno = 3
guard.sparkno = 40
ground.type = high
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
airguard.velocity = -8, -1.25
ground.velocity = -5, -6.75; 136, 44
air.velocity = -5, -6.75; 136, 44
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 1000), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 1100, hit by nothing]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 1100, continue]
type = ChangeState
trigger1 = !animtime
value = 1110

; quick double lariat continued
[StateDef 1110]
MoveType = a
Anim = 1110
SprPriority = -1
juggle = var(20) := 1
ctrl = var(9) := 0

[State 1110, fx]
type = Explod
trigger1 = animelem = 2
anim = 1150
bindtime = -1
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = .5, .5

[State 1110, not hit by sca projs and c attacks]
type = HitBy
trigger1 = animelemno(0) = [1, 9] 
value = sa, aa, at
value2 = c, at
ignorehitpause = 1

[State 1110, snd]
type = PlaySnd
trigger1 = animelem = 2 || animelem = 5 || animelem = 8
value = 1100

[State 1110, hit fwd]
type = HitDef
triggerall = var(21) && (var(9) < 2)
triggerall = var(17) := 11
trigger1 = animelem = 3 || animelem = 6 || animelem = 9
trigger1 = var(13) := ifelse(animelem = 3, = 0, 54, ifelse(animelem = 6, = 0, 62, 72))
attr = s, sa
hitflag = MAF
guardflag = ma
animtype = back
air.animtype = back
fall.animtype = back
damage = ifelse(animelem = 3, = 0, 69, 41) + var(2), ifelse(animelem = 9, = 0, 7, 14)
priority = 5
pausetime = var(17), var(17); +1
sparkxy = -15, var(14) := ifelse(animelem = 3, = 0, -98, ifelse(animelem = 6, = 0, -97, -96))
ground.type = high
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
airguard.velocity = -8, -1.25
ground.velocity = -5, -6.75; 136, 44
air.velocity = -5, -6.75; 136, 44
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[state 1110, count hits]
type = varadd
trigger1 = movehit = 2
var(9) = 1

[State 1110, behind]
type = SprPriority
trigger1 = animelem = 4 || animelem = 7
value = -1
ignorehitpause = 1

[State 1110, front]
type = SprPriority
trigger1 = animelem = 2 || animelem = 5 || animelem = 8
value = 2
ignorehitpause = 1

[State 1110, hit back]
type = HitDef
triggerall = var(21) && (var(9) < 2)
triggerall = var(17) := 11
trigger1 = animelem = 4 || animelem = 7
trigger1 = var(13) := ifelse(animelem = 4, = 0, -52, -60)
attr = s, sa
hitflag = MAF
guardflag = ma
animtype = back
air.animtype = back
fall.animtype = back
damage = ifelse(animelem = 4, = 0, 69, 41) + var(2), 14
priority = 5
pausetime = var(17), var(17); +1
sparkxy = -15, var(14) := ifelse(animelem = 4, = 0, -97, -99)
ground.type = high
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = 12.95; 78
airguard.velocity = 8, -1.25
ground.velocity = 5, -6.75; 136, 44
air.velocity = 5, -6.75; 136, 44
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 24.4; 78
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0
p1sprpriority = -1

[State 1110, hit nothing]
type = HitDef
triggerall = !var(21)
trigger1 = animelem = 3 || animelem = 6 || animelem = 9
trigger2 = animelem = 4 || animelem = 7
attr = s, sa
hitflag =
guardflag =

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 3, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 1000), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 1110, fwd]
type = VelSet
triggerall = vel x != 1.33 && animelemno(0) = [3, 9]
trigger1 = command = "holdfwd"
x = 1.33

[State 1110, stop]
type = VelSet
triggerall = vel x && animelemno(0) = [3, 10]
trigger1 = command != "holdfwd" && command != "holdback"
trigger2 = animelem = 10
x = 0

[State 1110, back]
type = VelSet
triggerall = vel x != -1.33 && animelemno(0) = [3, 9]
trigger1 = command = "holdback"
x = -1.33

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

; double lariat
[StateDef 1200]
MoveType = a
Anim = 1200
velset = 0, 0
Ctrl = 0
SprPriority = 2
poweradd = 83
juggle = var(20) := 1

[State 1200, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 1100, 1; 0, 1
channel = 0
volume = var(31)

[State 1200, not hit by sca projs and c attacks]
type = HitBy
trigger1 = 1
value = sa, aa, at
value2 = c, at
ignorehitpause = 1

[State 1200, hit fwd]
type = HitDef
triggerall = var(21)
triggerall = var(17) := 11
trigger1 = animelem = 2
trigger1 = var(13) := 35
attr = s, sa
hitflag = MAF
guardflag = ma
animtype = back
air.animtype = back
fall.animtype = back
damage = 97 + var(2), 14
priority = 5
pausetime = var(17), var(17); +1
sparkxy = -15, var(14) := ifelse(p2bodydist x > -26, -65, -113)
sparkno = 3
guard.sparkno = 40
ground.type = high
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
airguard.velocity = -8, -1.25
ground.velocity = -5, -6.75; 136, 44
air.velocity = -5, -6.75; 136, 44
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 1000), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 1200, continue]
type = ChangeState
trigger1 = !animtime
value = 1210

; double lariat continued
[StateDef 1210]
MoveType = a
Anim = 1210
SprPriority = -1
juggle = var(20) := 1
ctrl = var(9) := 0

[State 1210, not hit by sca projs and c attacks]
type = HitBy
trigger1 = animelemno(0) = [1, 15] 
value = sa, aa, at
value2 = c, at
ignorehitpause = 1

[State 1210, fx]
type = Explod
trigger1 = animelem = 2
anim = 1151
bindtime = -1
sprpriority = 3
ownpal = 1
removeongethit = 1
scale = .5, .5

[State 1210, snd]
type = PlaySnd
trigger1 = animelem = 2 || animelem = 5 || animelem = 8 || animelem = 11 || animelem = 14
value = 1100

[State 1210, hit fwd]
type = HitDef
triggerall = var(21) && var(9) < 2
triggerall = var(17) := 11
trigger1 = animelem = 3 || animelem = 6 || animelem = 9 || animelem = 12 || animelem = 15
trigger1 = var(13) := ifelse(animelem = 3, = 0, 54, ifelse((animelemno(0) = [6, 12]), 62, 72))
attr = s, sa
hitflag = MAF
guardflag = ma
animtype = back
air.animtype = back
fall.animtype = back
damage = ifelse(animelem = 3, = 0, 83, ifelse(animelem = 6, = 0, 55, 41)) + var(2), ifelse(animelem = 3, = 0, 14, 7)
priority = 5
pausetime = var(17), var(17); +1
sparkxy = -15, var(14) := ifelse(animelem = 3, = 0, -98, ifelse((animelemno(0) = [6, 12]), -97, -96))
ground.type = high
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = -12.95; 78
airguard.velocity = -8, -1.25
ground.velocity = -5, -6.75; 136, 44
air.velocity = -5, -6.75; 136, 44
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -24.4; 78
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0

[state 1210, count hits]
type = varadd
trigger1 = movehit = 2
var(9) = 1

[State 1210, behind]
type = SprPriority
trigger1 = animelem = 4 || animelem = 7 || animelem = 10 || animelem = 13
value = -1
ignorehitpause = 1

[State 1210, front]
type = SprPriority
trigger1 = animelem = 2 || animelem = 5 || animelem = 8 || animelem = 11 || animelem = 14
value = 2
ignorehitpause = 1

[State 1210, hit back]
type = HitDef
triggerall = var(21) && var(9) < 2
triggerall = var(17) := 11
trigger1 = animelem = 4 || animelem = 7 || animelem = 10 || animelem = 13
trigger1 = var(13) := ifelse(animelem = 4, = 0 || animelem = 10, = 0, -52, -60)
attr = s, sa
hitflag = MAF
guardflag = ma
animtype = back
air.animtype = back
fall.animtype = back
damage = ifelse(animelem = 4, = 0, 83, ifelse(animelem = 7, = 0, 55, 41)) + var(2), ifelse(animelem = 4, = 0, 14, 7)
priority = 5
pausetime = var(17), var(17); +1
sparkxy = -15, var(14) := ifelse(animelem = 4, = 0 || animelem = 10, = 0, -97, -99)
ground.type = high
air.type = low
guard.slidetime = 14; +1
guard.hittime = 16
yaccel = .5
guard.velocity = 12.95; 78
airguard.velocity = 8, -1.25
ground.velocity = 5, -6.75; 136, 44
air.velocity = 5, -6.75; 136, 44
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 24.4; 78
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 24.4; 78
fall = 1
fall.recover = 0
getpower = 0, 0
givepower = 21, 0
p1sprpriority = -1

[State 1210, hit nothing]
type = HitDef
triggerall = !var(21)
trigger1 = animelem = 3 || animelem = 6 || animelem = 9 || animelem = 12 || animelem = 15
trigger2 = animelem = 4 || animelem = 7 || animelem = 10 || animelem = 13
attr = s, sa
hitflag =
guardflag =

[State 200, hitspark]
type = Explod
triggerall = movecontact
trigger1 = hitpausetime = var(17) -1
anim = fifelse(movehit, 3, 40)
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 200, hitsnd]
type = PlaySnd
triggerall = movecontact
trigger1 = hitpausetime = var(17) -2
value = ifelse(moveguarded, 120, 1000), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State 1210, fwd]
type = VelSet
triggerall = vel x != 2 && animelemno(0) = [3, 15]
trigger1 = command = "holdfwd"
x = 2

[State 1210, stop]
type = VelSet
triggerall = vel x && animelemno(0) = [3, 16]
trigger1 = command != "holdfwd" && command != "holdback"
trigger2 = animelem = 16
x = 0

[State 1210, back]
type = VelSet
triggerall = vel x != -2 && animelemno(0) = [3, 15]
trigger1 = command = "holdback"
x = -2

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

; screw piledriver Attempt
[StateDef 1300]
MoveType = A
Ctrl = 0
VelSet = 0, 0
SprPriority = 2
PowerAdd = 63
Juggle = var(20) := 2

[State 1300, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = !time && var(17) := -1
Attr = S, ST
P2Facing = 1
P1Facing = 1
HitFlag = M-
Priority = 2, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 1400
P2StateNo = 1450
Fall = 1
Guard.Dist = 0
ID = 1300
YAccel = .5
fall.recover = 0
getpower = 313, 313

[State 1300, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 4
Value = 5000, 1
Channel = 0
volume = var(31)

[State 1300, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; screw piledriver Throwing
[StateDef 1400]
MoveType = A
Anim = 1400
SprPriority = 2

[State 1400, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 1300
pos = 84, -71

[State 1400, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1300
pos = 75, -75

[State 1400, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1300
pos = 75, -49

[State 1400, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 1300
pos = 75, -40

[State 1400, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0
ID = 1300
pos = 67, -50

[State 1400, fat]
type = Width
trigger1 = 1
edge = 64

[State 1400, turn p2]
type = TargetFacing
trigger1 = animelem = 4
value = 1

[State 1400, Voice]
Type = PlaySND
Trigger1 = AnimElem = 1
Value = 0, 2
Channel = 0
volume = var(31)

[State 1400, screw]
Type = TargetState
triggerall = NumTarget(1300)
Trigger1 = !animtime
Value = 1455
ID = 1300

[State 1400, End]
Type = ChangeState
Trigger1 = !animtime
Value = 1405

; screw piledriver flying
[StateDef 1405]
type = a
MoveType = A
Anim = 1405
SprPriority = 2
ctrl = var(0) := 0

[State 1405, leave corner]
type = VelSet
trigger1 = !time && frontedgedist <= 124
x = -3.76; 109

[State 1405, jump x]
type = VelSet
triggerall = var(10) = 1300
trigger1 = !time
y = -11.575; 95

[State 1405, jump y]
type = VelSet
triggerall = var(10) = 1310
trigger1 = !time
y = -14.875; 159

[State 1405, jump z]
type = VelSet
triggerall = var(10) = 1320
trigger1 = !time
y = -17.95; 223

[State 1405, grav]
type = veladd
trigger1 = time
y = .75

[State 1405, snd]
type = PlaySnd
trigger1 = animelem = 1 || !animtime
value = 1100

[State 1405, left]
type = TargetFacing
trigger1 = animelem = 1 || !animtime
value = 1

[State 1405, behind]
type = SprPriority
trigger1 = animelem = 2
value = -1

[State 1405, front]
type = SprPriority
trigger1 = animelem = 3
value = 2

[State 1405, right]
type = TargetFacing
trigger1 = animelem = 3
value = -1

[State 1405, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
trigger2 = !animtime
ID = 1300
pos = 61, -80

[State 1405, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
trigger2 = animelemtime(4) >= 0 && animtime < 0
ID = 1300
pos = 24, -80

[State 1405, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1300
pos = -14, -80

[State 1405, fat]
type = Width
trigger1 = 1
edge = 64

[State 1405, count screw turns]
type = Null
trigger1 = !animtime
trigger1 = var(0) := var(0)+1

[State 1405, End]
Type = ChangeState
triggerall = animelem = 1, = 2
Trigger1 = var(0) = ifelse(var(10) = 1300, 3, ifelse(var(10) = 1310, 4, 5))
Value = 1410

; screw piledriver crash & jump away
[StateDef 1410]
type = c
MoveType = A
VelSet = 0, 0
Anim = ifelse(var(10) = 1300, 1410, ifelse(var(10) = 1310, 1411, 1412))
SprPriority = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 1410, crash]
Type = TargetState
triggerall = NumTarget(1300)
Trigger1 = !time
Value = 1460
ID = 1300

[State 1410, turn p2]
type = TargetFacing
trigger1 = !time
value = 1

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

[State 1410, Voice]
Type = PlaySND
Trigger1 = AnimElem = 1
Value = 0, 1
Channel = 0
volume = var(31)

[State 1410, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 1300
pos = 66 + !(time % 2), -7

[State 1410, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1300
pos = 59 + !(time % 2), -9

[State 1410, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1300
pos = 56, -18

[State 1410, bind]
type = TargetBind
trigger1 = animelemtime(4) = 0
ID = 1300
pos = 56 - (abs(target(1300), const(size.head.pos.x)) - abs(target(1300), const(size.mid.pos.x))), -18 - (abs(target(1300), const(size.head.pos.y)) - abs(target(1300), const(size.mid.pos.y)))

[State 1410, a]
type = StateTypeSet
trigger1 = animelem = 4
statetype = a

[State 1410, go x]
type = VelSet
triggerall = var(10) = 1300
trigger1 = animelem = 4
x = -4.5; 81
y = -7.3; 39

[State 1410, go y]
type = VelSet
triggerall = var(10) = 1310
trigger1 = animelem = 4
x = -4.2; 84
y = -8.9; 51

[State 1410, go z]
type = VelSet
triggerall = var(10) = 1320
trigger1 = animelem = 4
x = -5.87; 135
y = -10.575; 64

[State 1410, grav]
type = veladd
trigger1 = animelem = 4, > 0
y = ifelse(var(10) = 1300, .75, ifelse(var(10) = 1310, .85, .95))

[State 1410, fat]
type = Width
trigger1 = animelemno(0) = [1, 3]
edge = 64

[State 1410, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 805

[State 1410, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = 66, 0
ownpal = 1
sprpriority  = 3

[State 1410, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 0, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := ifelse(var(10) = 1300, 14, ifelse(var(10) = 1310, 16, 18))
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 1410, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -ifelse(var(10) = 1300, 138, ifelse(var(10) = 1310, 166, 193)))
ID = 1300
absolute = 1

[State 1410, turn p2]
type = TargetFacing
trigger1 = animelem = 4
value = -1

[State 1410, Fly]
Type = TargetState
triggerall = NumTarget(1300)
Trigger1 = AnimElem = 4
Value = 1465
ID = 1300

[State 1410, End]
Type = ChangeState
Trigger1 = !animtime
Value = 1415

; screw piledriver land
[StateDef 1415]
type = c
MoveType = A
VelSet = 0, 0
Anim = 1415
SprPriority = 2

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

[State 1415, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 1415, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; Grabbed By screw piledriver
[StateDef 1450]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1450, Camera Still]
Type = ScreenBound
Trigger1 = 1

; screwed By screw piledriver
[StateDef 1455]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1455, Camera Still]
Type = ScreenBound
Trigger1 = 1

; crashed By screw piledriver
[StateDef 1460]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1460, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By screw piledriver
[StateDef 1465]
Type = A
MoveType = H
VelSet = -5.4, -6.5; 140, 92 (44 + 48)

[State 1465, anim]
type = ChangeAnim2
trigger1 = !time
value = 1465

[State 1465, Gravity]
Type = VelAdd
Trigger1 = time
Y = .5

[State 1465, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; atomic suplex and flying powerbomb attempt
[StateDef 1500]
MoveType = A
Ctrl = 0
VelSet = 0, 0
SprPriority = 2
PowerAdd = 63
Juggle = var(20) := 2

[State 1500, atomic suplex]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = !time && var(17) := -1
Attr = S, ST
P2Facing = 1
P1Facing = 1
HitFlag = M-
Priority = 2, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 1600
P2StateNo = 1630
Fall = 1
Guard.Dist = 0
ID = 1500
YAccel = .5
fall.recover = 0
getpower = 313, 313

[State 1500, go]
type = VelSet
trigger1 = animelem = 3
x = 4.125; 75; 87; 99

[State 1500, SND]
Type = PlaySND
Trigger1 = var(10) != 1520 && (Animelem = 3 || animelem = 8)
trigger2 = var(10) = 1520 && (Animelem = 3 || animelem = 8 || animelem = 13)
Value = 1500

[State x, call envshake]
type = Helper
triggerall = var(8) := 2
trigger1 = var(10) != 1520 && (Animelem = 3 || animelem = 8)
trigger2 = var(10) = 1520 && (Animelem = 3 || animelem = 8 || animelem = 13)
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 1500, flying powerbomb]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = var(10) = 1500 && p2bodydist x <= 0 && (animelemno(0) = [3, 9]) && var(17) := 1
trigger2 = var(10) = 1500 && animelemno(0) = 10 && var(17) := -1
Trigger3 = var(10) = 1510 && p2bodydist x <= 0 && (animelemno(0) = [3, 10]) && var(17) := 1
Trigger4 = var(10) = 1510 && animelemno(0) = 11 && var(17) := -1
Trigger5 = var(10) = 1520 && p2bodydist x <= 0 && (animelemno(0) = [3, 12]) && var(17) := 1
Trigger6 = var(10) = 1520 && animelemno(0) = 13 && var(17) := -1
Attr = S, ST
P2Facing = 1
P1Facing = 1
HitFlag = M-
Priority = 2, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 1700
P2StateNo = 1730
Fall = 1
Guard.Dist = 0
ID = 1500
YAccel = .5
fall.recover = 0
getpower = 188, 188
persistent = 0

[State 1500, stop]
type = VelSet
trigger1 = var(10) = 1500 && animelem = 11
trigger2 = var(10) = 1510 && animelem = 12
trigger3 = var(10) = 1520 && animelem = 14
x = 0

[State 1500, hit nothing]
type = HitDef
trigger1 = var(10) = 1500 && animelem = 11
trigger2 = var(10) = 1510 && animelem = 12
trigger3 = var(10) = 1520 && animelem = 14
trigger4 = time = 1
attr = s, st
hitflag =

[State 1500, Miss SND]
Type = PlaySND
Trigger1 = var(10) = 1500 && Animelem = 13
trigger2 = var(10) = 1510 && animelem = 14
trigger3 = var(10) = 1520 && animelem = 16
Value = 5000, 1
Channel = 0
volume = var(31)

[State 1500, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; atomic suplex Throwing
[StateDef 1600]
MoveType = A
Anim = 1600
SprPriority = 2
velset = 0, 0

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 1500
pos = 84, -71

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1500
pos = 75, -75

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1500
pos = -4, -83

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
trigger2 = animelemtime(13) >= 0 && animelemtime(14) < 0
ID = 1500
pos = -44, -49

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
trigger2 = animelemtime(14) >= 0 && animelemtime(15) < 0
ID = 1500
pos = -47, -41

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
trigger2 = animelemtime(15) >= 0
ID = 1500
pos = -38, -51

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
ID = 1500
pos = -30, -89

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
ID = 1500
pos = 77, -95

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(12) < 0
ID = 1500
pos = 96 + !(time % 2), -21

[State 1600, bind]
type = TargetBind
trigger1 = animelemtime(12) >= 0 && animelemtime(13) < 0
ID = 1500
pos = 64, -5

[State 1600, fat]
type = Width
trigger1 = animelemno(0) = [1, 2]
edge = 64

[State 1600, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 64, ifelse(backedgedist < 36, 18, 0)

[State 1600, fat]
type = Width
trigger1 = animelemno(0) = [4, 6]
edge = 64, ifelse(backedgedist < 36, 40, 0)

[State 1600, fat]
type = Width
trigger1 = animelemno(0) = 7
edge = 64

[State 1600, fat]
type = Width
trigger1 = animelemno(0) = 8
edge = 72

[State 1600, fat]
type = Width
trigger1 = animelemno(0) = [9, 11]
edge = 80

[State 1600, voice]
type = PlaySnd
trigger1 = animelem = 7
value = 0, 2
channel = 0
volume = var(31)

[State 1600, voice]
type = PlaySnd
trigger1 = animelem = 12
value = 0, 3
channel = 0
volume = var(31)

[State 1600, snd]
type = PlaySnd
trigger1 = animelem = 9
value = 805

[State 1600, ground effect]
type = Explod
trigger1 = animelem = 9
anim = f62
postype = p2
pos = 0, 21
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 9 && var(8) := ifelse(var(10) = 1500, 14, ifelse(var(10) = 1510, 16, 18))
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 1600, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 9
Value = -ceil(fvar(2) * ifelse(var(10) = 1500, 69, ifelse(var(10) = 1510, 90, 110)))
ID = 1500
absolute = 1
kill = 0

[State 1600, Fly]
Type = TargetState
triggerall = NumTarget(1500)
Trigger1 = !animtime
Value = ifelse(var(10) = 1500, 1635, ifelse(var(10) = 1510, 1636, 1637))
ID = 1500

[State 1600, posadd]
type = PosAdd
trigger1 = animelem = 13
x = 96

[State 1600, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 1610

; atomic suplex jumping
[StateDef 1610]
type = a
MoveType = A
Anim = ifelse(var(10) = 1500, 1610, ifelse(var(10) = 1510, 1611, 1612))
SprPriority = 2
velset = 0, 0

[State 1610, go a]
type = VelSet
trigger1 = var(10) = 1500 && !time
x = 3
y = -11.67; 85

[State 1610, go b]
type = VelSet
trigger1 = var(10) = 1510 && !time
x = 3
y = -15.35; 102

[State 1610, go c]
type = VelSet
trigger1 = var(10) = 1520 && !time
x = 3
y = -16.67; 119

[State 1610, grav]
type = VelAdd
trigger1 = time
y = ifelse(var(10) = 1500, .85, ifelse(var(10) = 1510, 1.25, 1.25))

[State 1610, cancel fat from previous state]; mugen sucks
type = Width
trigger1 = animelem = 1
edge = 0

[State 1610, fat]
type = Width
trigger1 = animelemno(0) = [2, 4]
edge = 64

[State 1610, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 1500
pos = -23, -121

[State 1610, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1500
pos = 70, -111

[State 1610, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1500
pos = 74, -54

[State 1610, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0
ID = 1500
pos = 60, -38

[State 1610, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 1620

; atomic suplex crash & jump away
[StateDef 1620]
type = c
MoveType = A
Anim = ifelse(var(10) = 1500, 1620, ifelse(var(10) = 1510, 1621, 1622))
SprPriority = 2
velset = 0, 0

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

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

[State 1620, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
ID = 1500
pos = 60 + !(time % 2), -38

[State 1620, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 805

[State 1620, ground effect]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p2
pos = 0, 26
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := ifelse(var(10) = 1500, 14, ifelse(var(10) = 1510, 16, 18))
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 1620, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = -ceil(fvar(2) * 110)
ID = 1500
absolute = 1

[State 1620, plus 1]
type = HitAdd
trigger1 = animelem = 1
value = 1

[State 1620, Fly]
Type = TargetState
triggerall = NumTarget(1500)
Trigger1 = animelem = 2
Value = 1640
ID = 1500

[State 1620, a]
type = StateTypeSet
trigger1 = animelem = 2
statetype = a

[State 1620, go a]
type = VelSet
trigger1 = var(10) = 1500 && animelem = 2
x = 3.53; 67
y = -10.5; 52 (blah...-12)

[State 1620, go b]
type = VelSet
trigger1 = var(10) = 1510 && animelem = 2
x = 3.36; 74
y = -11.75; 66 (blah...-12)

[State 1620, go c]
type = VelSet
trigger1 = var(10) = 1520 && animelem = 2
x = 3.29; 79
y = -12.67; 80 (blah...-12)

[State 1620, grav]
type = VelAdd
trigger1 = animelem = 2, > 0
y = 1

[State 1620, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 1625

; atomic suplex land
[StateDef 1625]
type = c
MoveType = A
VelSet = 0, 0
Anim = 1625
SprPriority = 2

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

[State 1625, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 1625, turn]
type = Turn
trigger1 = !animtime

[State 1625, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; Grabbed By atomic suplex
[StateDef 1630]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1630, Camera Still]
Type = ScreenBound
Trigger1 = 1

; jumped & smashed By atomic suplex a
[StateDef 1635]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1635, Camera Still]
Type = ScreenBound
Trigger1 = 1

; jumped & smashed By atomic suplex b
[StateDef 1636]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1636, Camera Still]
Type = ScreenBound
Trigger1 = 1

; jumped & smashed By atomic suplex c
[StateDef 1637]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1637, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By atomic suplex
[StateDef 1640]
Type = A
MoveType = H
VelSet = 5.92, -9.05; 148, 85 (59 + 26)

[State 1640, anim]
type = ChangeAnim2
trigger1 = !time
value = 1640

[State 1640, Gravity]
Type = VelAdd
Trigger1 = time
Y = .75

[State 1640, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; flying powerbomb Throwing
[StateDef 1700]
MoveType = A
Anim = 1700
SprPriority = 2
velset = 0, 0

[State 1700, fat]
type = Width
trigger1 = 1
edge = 64

[State 1700, Voice]
Type = PlaySND
Trigger1 = AnimElem = 1
Value = 0, 2
Channel = 0
volume = var(31)

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 1500
pos = 84, -71

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1500
pos = 75, -75

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1500
pos = 71, -49

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 1500
pos = 75, -41

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0
ID = 1500
pos = 66, -51

[State 1700, Fly]
Type = TargetState
triggerall = NumTarget(1500)
Trigger1 = !animtime
Value = 1735
ID = 1500

[State 1700, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 1710

; flying powerbomb jumping
[StateDef 1710]
type = a
MoveType = A
Anim = 1710
SprPriority = 2
velset = 0, 0

[State 1710, fat]
type = Width
trigger1 = animelemno(0) = 1
edge = 80

[State 1710, fat]
type = Width
trigger1 = animelemno(0) = 2
edge = 44

[State 1710, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 59

[State 1710, fat]
type = Width
trigger1 = animelemno(0) = 4
edge = 65

[State 1710, fat]
type = Width
trigger1 = animelemno(0) = 5
edge = 100

[State 1710, go a]
type = VelSet
trigger1 = var(10) = 1500 && !time
x = 4.48; 112
y = -12.1; 79

[State 1710, go b]
type = VelSet
trigger1 = var(10) = 1510 && !time
x = 3.96; 99
y = -14.33; 89

[State 1710, go c]
type = VelSet
trigger1 = var(10) = 1520 && !time
x = 5.96; 149
y = -15; 97

[State 1710, grav]
type = VelAdd
trigger1 = time
y = ifelse(var(10) = 1500, 1, ifelse(var(10) = 1510, 1.25, 1.25))

[State 1710, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 1500
pos = 86, -98

[State 1710, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1500
pos = -3, -134

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1500
pos = 11, -134

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 1500
pos = 87, -119

[State 1700, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0
ID = 1500
pos = 100, -81

[State 1710, behind]
type = SprPriority
trigger1 = animelem = 4
value = -1

[State 1710, front]
type = SprPriority
trigger1 = animelem = 5
value = 2

[State 1710, Voice]
Type = PlaySND
Trigger1 = AnimElem = 5
Value = 181;0, 5
Channel = 0
volume = var(31)

[State 1710, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 1720

; flying powerbomb crash & jump away
[StateDef 1720]
type = c
MoveType = A
Anim = ifelse(var(10) = 1500, 1720, ifelse(var(10) = 1510, 1721, 1722))
SprPriority = 2
velset = 0, 0

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

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

[State 1720, bind]
type = TargetBind
trigger1 = animelemtime(3) < 0
ID = 1500
pos = 82 + !(time % 2), -44 - target(1500), const(size.mid.pos.y) / 3

[State 1720, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 805

[State 1720, ground effect]
type = Explod
trigger1 = animelem = 1
anim = f62
pos = 82
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := ifelse(var(10) = 1500, 14, ifelse(var(10) = 1510, 16, 18))
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 1720, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = -ceil(fvar(2) * ifelse(var(10) = 1500, 131, ifelse(var(10) = 1510, 138, 145)))
ID = 1500
absolute = 1

[State 1720, Fly]
Type = TargetState
triggerall = NumTarget(1500)
Trigger1 = animelem = 3
Value = 1740
ID = 1500

[State 1720, a]
type = StateTypeSet
trigger1 = animelem = 3
statetype = a

[State 1720, go a]
type = VelSet
trigger1 = var(10) = 1500 && animelem = 3
x = -5.35; 91
y = -8.4; 39

[State 1720, go b]
type = VelSet
trigger1 = var(10) = 1510 && animelem = 3
x = -4.35; 87
y = -9.5; 50

[State 1720, go c]
type = VelSet
trigger1 = var(10) = 1520 && animelem = 3
x = -7.2; 144
y = -12.1; 64

[State 1720, grav]
type = VelAdd
trigger1 = animelem = 3, > 0
y = ifelse(var(10) = 1520, 1.25, 1)

[State 1720, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 1725

; flying powerbomb land
[StateDef 1725]
type = c
MoveType = A
VelSet = 0, 0
Anim = 1725
SprPriority = 2

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

[State 1725, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 1725, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; Grabbed By flying powerbomb
[StateDef 1730]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1730, Camera Still]
Type = ScreenBound
Trigger1 = 1

; jumped & smashed By flying powerbomb
[StateDef 1735]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

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

[State 1735, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By flying powerbomb
[StateDef 1740]
Type = A
MoveType = H
VelSet = -5.54, -9.05; 133, 83 (59 + 24)

[State 1740, anim]
type = ChangeAnim2
trigger1 = !time
value = 1740

[State 1740, Gravity]
Type = VelAdd
Trigger1 = time
Y = .75

[State 1740, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; aerial russian slam attempt
[statedef 1800]
MoveType = a
VelSet = 0, 0
Ctrl = var(10) := 0
Juggle = var(20) := 1
SprPriority = 2
poweradd = 83

[State 1800, strength]
type = Null
trigger1 = !time
trigger1 = var(10) := ifelse(anim = 1802, 3, ifelse(anim = 1801, 2, 1))

[State 1800, Voice]
Type = PlaySND
Trigger1 = AnimElem = 2
Value = 0, 2
Channel = 0
volume = var(31)

[State 1800, air]
type = StateTypeSet
trigger1 = animelem = 5
statetype = a

[State 1800, hit]
Type = HitDef
triggerall = var(21)
Trigger1 = animelem = 5, = 5 && var(17) := -1
Attr = a, st
P2Facing = 1
P1Facing = 1
HitFlag = af
Priority = 2, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 1810
P2StateNo = 1815
Fall = 1
Guard.Dist = 0
ID = 1800
YAccel = .5
fall.recover = 0
fall.damage = ceil(fvar(2) * 145)
persistent = 0
givepower = 56
getpower = 56

[State 1800, time var]
type = Null
trigger1 = 1
trigger1 = var(0) := time

[State InitVel a]
type = Velset
triggerall = var(10) = 1
trigger1 = animelem = 5
x = 4.0555553; 111
Y = -7.05; 65

[State y Accel a]
type = VelAdd
triggerall = var(10) = 1
trigger1 = pos y < 0
Y = .4

[State x Accel a]
type = VelAdd
triggerall = var(10) = 1
trigger1 = vel x > .0555556
x = -.0555556

[State InitVel b]
type = Velset
triggerall = var(10) = 2
trigger1 = animelem = 5
x = 5.7160273; ~161
Y = -7.125; ~71

[State y Accel b]
type = VelAdd
triggerall = var(10) = 2
trigger1 = pos y < 0
Y = .4

[State x Accel b]
type = VelAdd
triggerall = var(10) = 2
trigger1 = vel x > .0731707
x = -.0731707

[State InitVel c]
type = Velset
triggerall = var(10) = 3
trigger1 = animelem = 5
x = 6.7160273; 216
Y = -7.125; 76

[State y Accel c]
type = VelAdd
triggerall = var(10) = 3
trigger1 = pos y < 0
Y = .35

[State x Accel c]
type = VelAdd
triggerall = var(10) = 3
trigger1 = vel x > .0731707
x = -.0731707

[State 1800, turn]
type = Turn
trigger1 = animelem = 6, >= 0 && facing = enemynear, facing && p2statetype != l
persistent = 0

[State 1800, ctrl]
type = CtrlSet
trigger1 = animelem = 7
value = 1

[state 1800, no guard]
type = assertspecial
trigger1 = ctrl
flag = noairguard

[State 1800, end]
type = ChangeState
trigger1 = !animtime
value = 1805

; aerial russian slam Land
[Statedef 1805]
anim = 1805
velset = 0, 0

[State 1805, snd]
type = PlaySnd
trigger1 = !time
value = 52

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

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

; aerial russian slam throwing
[StateDef 1810]
type = a
movetype = a
Anim = 1810 + var(10) - 1
SprPriority = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 1810, time var]
type = Null
trigger1 = 1
trigger1 = var(0) := var(0) + 1

[State 1810, skip]
type = ChangeAnim
triggerall = animelemno(0) = 1
trigger1 = var(10) = 1 && var(0) >= 24
trigger2 = var(10) = 2 && var(0) >= 28
trigger3 = var(10) = 3 && var(0) >= 31
value = anim
elem = animelemno(0) + 1
persistent = 0

[State 1810, voice]
type = PlaySnd
trigger1 = var(10) = 1 && var(0) >= 12
trigger2 = var(10) = 2 && var(0) >= 16
trigger3 = var(10) = 3 && var(0) >= 19
value = 0, 3
channel = 0
persistent = 0
volume = var(31)

[State 1810, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 1800
pos = 42, -89

[State 1810, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1800
pos = 29, -142

[State 1810, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1800
pos = 23, -142

[State 1810, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 1800
pos = -13, -141

[State 1810, bind]
type = TargetBind
trigger1 = animelem = 5
ID = 1800
pos = -73, -62

[State 1810, lift target]
type = TargetState
trigger1 = animelem = 2
value = 1816
ID = 1800

[State 1810, fat]
type = Width
trigger1 = animelem = 5, < 0
edge = 50

[State 1810, fat]
type = Width
trigger1 = animelemno(0) = 5
edge = 0, 74 + target(1800), const(size.ground.back) + target(1800), const(size.ground.front)

[State 1810, stay]
type = PosFreeze
trigger1 = animelemno(0) = [2, 5]
value = 1

[State 1810, turn]
type = Turn
trigger1 = animelem = 6

[State 1810, throw target]
type = TargetState
trigger1 = animelem = 5
value = 1817
ID = 1800

[State y Accel a]
type = VelAdd
triggerall = var(10) = 1
trigger1 = pos y < 0 && (animelemno(0) != [2, 5])
Y = .4

[State x Accel a]
type = VelAdd
triggerall = var(10) = 1
trigger1 = vel x > .0555556
x = -.0555556

[State y Accel b]
type = VelAdd
triggerall = var(10) = 2
trigger1 = pos y < 0 && (animelemno(0) != [2, 5])
Y = .35

[State x Accel b]
type = VelAdd
triggerall = var(10) = 2
trigger1 = vel x > .0731707
x = -.0731707

[State y Accel c]
type = VelAdd
triggerall = var(10) = 3
trigger1 = pos y < 0 && (animelemno(0) != [2, 5])
Y = .35

[State x Accel c]
type = VelAdd
triggerall = var(10) = 3
trigger1 = vel x > .0731707
x = -.0731707

[State 1810, final vel x]
type = Velmul
trigger1 = animelem = 6
x = ifelse(backedgedist <= 62, -.5, .5)

[State 1810, crash]
type = PlaySnd
trigger1 = var(10) = 1 && var(0) = 47
trigger2 = var(10) = 2 && var(0) = 51
trigger3 = var(10) = 3 && var(0) = 54
value = 5100

[State x, call envshake]
type = Helper
trigger1 = var(10) = 1 && var(0) = 46 && var(8) := 8
trigger2 = var(10) = 2 && var(0) = 50 && var(8) := 8
trigger3 = var(10) = 3 && var(0) = 53 && var(8) := 8
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 1810, 4]
type = ChangeState
trigger1 = !AnimTime
value = 1805

; Grabbed By aerial russian slam a
[StateDef 1815]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0
sprpriority = 1

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

[State 1815, Camera Still]
Type = ScreenBound
Trigger1 = 1

; lifted up By aerial russian slam a
[StateDef 1816]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0
sprpriority = 1

[State 1816, Camera Still]
Type = ScreenBound
Trigger1 = 1

[State 1816, up]
type = SprPriority
trigger1 = animelem = 3
value = 3

[State 1816, down]
type = SprPriority
trigger1 = animelem = 4
value = 1

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

; Thrown By aerial russian slam a
[StateDef 1817]
Type = A
MoveType = H
VelSet = 6.4, .64; .6428571; 64, ?? (44 + ?)
sprpriority = 1

[State 1817, anim]
type = ChangeAnim2
trigger1 = !time
value = 1817

[State 1817, Gravity]
Type = VelAdd
Trigger1 = time
Y = 1.45

[State 1817, fat]
type = Width
trigger1 = animtime
edge = const(size.ground.back) + const(size.ground.front)

[State 1817, fix]
type = PosAdd
trigger1 = !animtime
x = const(size.ground.back) + const(size.ground.front)

[State 1817, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; dodge
[Statedef 2010]
anim = 2010
ctrl = 0
velset = 0, 0
sprpriority = -4

[State 2010, voice]
type = playsnd
trigger1 = !time
value = 0
channel = 0
volume = var(31)

[State 2010, AfterImage]
type = Afterimage
trigger1 = !time
time = 2
length = 10
FrameGap = 6
PalBright = 1, 1, 1
PalContrast = 128, 128, 128
PalAdd = 0, 0, 0
PalMul = .5, .5, .5
trans = add1

[State 2010, jo]
type = AfterImageTime
trigger1 = animelem = 7, < 0
time = 2

[State 2010, HitBy]
type = HitBy
trigger1 = 1
value = SCA, AT
ignorehitpause = 1

[State 2010, no push]
type = PlayerPush
trigger1 = 1
value = 0

[State 2010, end]
type = Changestate
trigger1 = !AnimTime
value = 0
ctrl = 1

; super aerial russian slam attempt
[statedef 3000]
MoveType = a
VelSet = 0, 0
Ctrl = var(10) := 0
Juggle = var(20) := 1
SprPriority = 2

[State 3000, 0]
type = NotHitBy
trigger1 = animelem = 5, < 0
value = sca
ignorehitpause = 1

[State 3000, strength]
type = Null
trigger1 = !time
trigger1 = var(10) := ifelse(anim = 3002, 3, ifelse(anim = 3001, 2, 1))

[State 3000, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3000, jo]
type = AfterImageTime
trigger1 = animtime < -4
time = 2

[State 3000, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 35
movetime = 35
Anim = F99 + var(10)
Sound = S3000
Pos = 28, -51
Darken = 1
UnHittAble = 1
poweradd = -var(10) * 1000
p2defmul = 1

[State 3000, Voice]
Type = PlaySND
Trigger1 = AnimElem = 4
Value = 0, 2
Channel = 0
volume = var(31)

[State 3000, air]
type = StateTypeSet
trigger1 = animelem = 5
statetype = a

[State 3000, hit a]
Type = HitDef
triggerall = var(21) && var(10) = 1
Trigger1 = Animelem = 5, = 1 && var(17) := -1
Attr = a, hT
P2Facing = 1
P1Facing = 1
HitFlag = af
Priority = 3, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 3010
P2StateNo = 3015
Fall = 1
Guard.Dist = 0
ID = 3000
YAccel = .5
fall.recover = 0
fall.damage = ceil(fvar(2) * 207)

[State 3000, hit b]
Type = HitDef
triggerall = var(21) && var(10) = 2
Trigger1 = Animelem = 5, = 1 && var(17) := -1
Attr = a, hT
P2Facing = 1
P1Facing = 1
HitFlag = af
Priority = 3, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 3020
P2StateNo = 3015
Fall = 1
Guard.Dist = 0
ID = 3000
YAccel = .5
fall.recover = 0

[State 3000, hit c]
Type = HitDef
triggerall = var(21) && var(10) = 3
Trigger1 = Animelem = 5, = 1 && var(17) := -1
Attr = a, hT
P2Facing = 1
P1Facing = 1
HitFlag = af
Priority = 3, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 3030
P2StateNo = 3015
Fall = 1
Guard.Dist = 0
ID = 3000
YAccel = .5
fall.recover = 0

[State InitVel a]
type = Velset
triggerall = var(10) = 1
trigger1 = animelem = 5
Y = -9.415; 93
x = 9.18181818; 68

[State y Accel a]
type = VelAdd
triggerall = var(10) = 1
trigger1 = pos y < 0
Y = .5

[State x Accel a]
type = VelAdd
triggerall = var(10) = 1
trigger1 = vel x > .5
x = -.5

[State 3000, time var]
type = Null
trigger1 = 1
trigger1 = var(0) := time

[State 3000, x stop a]
type = VelSet
triggerall = var(10) = 1
trigger1 = var(0) = 52
x = 0

[State InitVel b]
type = Velset
triggerall = var(10) = 2
trigger1 = animelem = 5
Y = -8.625; 87
x = 13.65; 150

[State y Accel b]
type = VelAdd
triggerall = var(10) = 2
trigger1 = pos y < 0
Y = .45

[State x Accel b]
type = VelAdd
triggerall = var(10) = 2
trigger1 = vel x > .5625
x = -.5625

[State 3000, x stop b]
type = VelSet
triggerall = var(10) = 2
trigger1 = animelemno(1) = 6
x = 0

[State InitVel c]
type = Velset
triggerall = var(10) = 3
trigger1 = animelem = 5
Y = -9.415; 93
x = 15.5263157; 200

[State y Accel c]
type = VelAdd
triggerall = var(10) = 3
trigger1 = pos y < 0
Y = .5

[State x Accel c]
type = VelAdd
triggerall = var(10) = 3
trigger1 = vel x > .5
x = -.5

[State 3000, x stop c]
type = VelSet
triggerall = var(10) = 3
trigger1 = animelem = 6
x = 0

[State 3000, end]
type = ChangeState
trigger1 = !animtime
value = 3005

; aerial russian slam Land
[Statedef 3005]
anim = 3005
velset = 0, 0

[State 3005, snd]
type = PlaySnd
trigger1 = !time
value = 52

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

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

; aerial russian slam a throwing
[StateDef 3010]
type = a
movetype = a
Anim = 3010
SprPriority = 2

[State 3010, time var]
type = Null
trigger1 = 1
trigger1 = var(0) := var(0) + 1

[State 3010, no]
type = NotHitBy
trigger1 = animelemno(0) = [6, 7]
value = sca
ignorehitpause = 1

[State 3010, jo]
type = AfterImageTime
trigger1 = animtime < -4
time = 2

[State 3010, skip]
type = ChangeAnim
trigger1 = var(0) = 60 && animelemno(0) = 1
value = anim
elem = animelemno(0) + 1

[State 3010, voice]
type = PlaySnd
trigger1 = var(0) >= 20
value = 0, 3
channel = 0
persistent = 0
volume = var(31)

[State 3010, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3000
pos = 42, -89

[State 3010, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3000
pos = 29, -142

[State 3010, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3000
pos = 23, -142

[State 805, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 3000
pos = -13, -141

[State 805, bind]
type = TargetBind
trigger1 = animelem = 5
ID = 3000
pos = -73, -62

[State 3010, lift target]
type = TargetState
trigger1 = animelem = 2
value = 3016
ID = 3000

[State 3010, fat]
type = Width
trigger1 = animelem = 5, < 0
edge = 50

[State 3010, fat]
type = Width
trigger1 = animelemno(0) = 5
edge = 0, 74 + target(3000), const(size.ground.back) + target(3000), const(size.ground.front)

[State 3010, stay]
type = PosFreeze
trigger1 = animelemno(0) = [2, 5]
value = 1

[State 3010, turn]
type = Turn
trigger1 = animelem = 6

[State 3010, throw target]
type = TargetState
trigger1 = animelem = 5
value = 3017
ID = 3000

[State y Accel a]
type = VelAdd
trigger1 = pos y < 0 && (animelemno(0) != [2, 5])
Y = .5

[State x Accel a]
type = VelAdd
trigger1 = vel x > .5
x = -.5

[State 3000, x stop a]
type = VelSet
trigger1 = var(0) = 52
x = 0

[State 3010, x end]
type = VelSet
trigger1 = animelem = 6
x = ifelse(backedgedist <= 62, 1.25, -1.25)

[State 3010, crash]
type = PlaySnd
trigger1 = var(0) = 83
value = 5100

[State x, call envshake]
type = Helper
trigger1 = var(0) = 82 && var(8) := 14
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3010, 4]
type = ChangeState
trigger1 = !AnimTime
value = 3005

; Grabbed By aerial russian slam a
[StateDef 3015]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0
sprpriority = 1

[State 3000, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3000, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3015, Camera Still]
Type = ScreenBound
Trigger1 = 1

; lifted up By aerial russian slam a
[StateDef 3016]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0
sprpriority = 1

[State 3000, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3016, Camera Still]
Type = ScreenBound
Trigger1 = 1

[State 3016, up]
type = SprPriority
trigger1 = animelem = 3
value = 3

[State 3016, down]
type = SprPriority
trigger1 = animelem = 4
value = 1

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

; Thrown By aerial russian slam a
[StateDef 3017]
Type = A
MoveType = H
VelSet = 6.4, .64; .6428571; 64, ?? (44 + ?)
sprpriority = 1

[State 3000, jo]
type = AfterImageTime
trigger1 = 1
time = 4

[State 3017, anim]
type = ChangeAnim2
trigger1 = !time
value = 3017

[State 3017, Gravity]
Type = VelAdd
Trigger1 = time
x = .75
Y = 1.45

[State 3017, fat]
type = Width
trigger1 = animtime
edge = const(size.ground.back) + const(size.ground.front)

[State 3017, fix]
type = PosAdd
trigger1 = !animtime
x = const(size.ground.back) + const(size.ground.front)

[State 3017, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; aerial russian slam b throwing
[StateDef 3020]
type = a
MoveType = A
Anim = 3020
SprPriority = 2

[State 3020, time var]
type = Null
trigger1 = 1
trigger1 = var(0) := var(0) + 1

[State 3020, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3020, skip]
type = ChangeAnim
trigger1 = var(0) = 60 && animelemno(0) = 1
value = anim
elem = animelemno(0) + 1

[State y Accel b]
type = VelAdd
trigger1 = pos y < 0 && animelem = 2, < 1
Y = .45

[state 3020, stop y]
type = velset
trigger1 = animelem = 2, = 1
y = 0

[State y Accel b]
type = VelAdd
trigger1 = pos y < 0 && animelem = 3, >= 0
Y = .45 + animelemtime(3) / 10

[State x Accel b]
type = VelAdd
trigger1 = vel x > .5625
x = -.5625

[State 3020, x stop b]
type = VelSet
trigger1 = animelemno(1) = 3
x = 0

[State 3020, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3000
pos = 42, -89

[State 3020, lift target]
type = TargetState
trigger1 = animelem = 2
value = 3025
ID = 3000

[State 3020, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3000
pos =  23, -142

[State 3020, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0
ID = 3000
pos = -34, -80

[State 3030, Voice]
Type = PlaySND
Trigger1 = !time
Value = 184
Channel = 0
volume = var(31)

[State 3030, Voice]
Type = PlaySND
Trigger1 = !animtime
Value = 181
Channel = 0
volume = var(31)

[State 3020, fat]
type = Width
trigger1 = animelem = 3, < 0
edge = 50

[State 3020, fat]
type = Width
trigger1 = animelem = 3, >= 0
edge = 0, 74

[State 3020, End]
Type = ChangeState
Trigger1 = !animtime
Value = 3021

; aerial russian slam b crash & jump away
[StateDef 3021]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3021
SprPriority = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 3020, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3021, target state]
type = TargetState
trigger1 = !time
value = 3026
ID = 3000

[State 3021, bind]
type = TargetBind
trigger1  = animelemtime(2) < 0
ID = 3000
pos = -30 + !(time % 2), -3

[State 3021, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3000
pos = -29 + !(time % 2), -4

[State 3021, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(3) < 4
id = 3000
pos = -31, -12

[State 3021, bind]
type = TargetBind
trigger1 = animelem = 3, = 4
ID = 3000
pos = -31 - (abs(target(3000), const(size.head.pos.x)) - abs(target(3000), const(size.mid.pos.x))), -12 - (abs(target(3000), const(size.head.pos.y)) - abs(target(3000), const(size.mid.pos.y)))

[State 3021, a]
type = StateTypeSet
trigger1 = animelem = 3, = 4
statetype = a

[State 3021, go]
type = VelSet
trigger1 = animelem = 3, = 4
x = 6.5416667; 157
y = -12.25; 80

[State 3021, grav]
type = veladd
trigger1 = animelem = 3, > 4
y = 1

[State 3021, fat]
type = Width
trigger1 = animelemno(0) = [1, 2] 
edge = 0, 36

[State 3021, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 0, 42

[State 3021, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 805

[State 3021, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = -30, 0
ownpal = 1
sprpriority  = 3

[State 3021, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 24, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 16
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3021, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -310)
ID = 3000
absolute = 1

[State 3021, turn p2]
type = TargetFacing
trigger1 = animelem = 3, = 4
value = 1

[State 3021, Fly]
Type = TargetState
triggerall = NumTarget(3000)
Trigger1 = animelem = 3, = 4
Value = 3027
ID = 3000

[State 3021, End]
Type = ChangeState
Trigger1 = !animtime
Value = 3022

; aerial russian slam b land
[StateDef 3022]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3022
SprPriority = 2

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

[State 3022, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 3022, turn]
type = Turn
trigger1 = !animtime

[State 3022, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; lifted By aerial russian slam b
[StateDef 3025]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3020, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3025, Camera Still]
Type = ScreenBound
Trigger1 = 1

; smashed By aerial russian slam b
[StateDef 3026]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3020, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3026, Camera Still]
Type = ScreenBound
Trigger1 = 1

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

; Thrown By aerial russian slam b
[StateDef 3027]
Type = A
MoveType = H
VelSet = -4.9, -8.5; 147, 105

[State 3027, anim]
type = ChangeAnim2
trigger1 = !time
value = 3027

[State 3027, Gravity]
Type = VelAdd
Trigger1 = time
Y = .6

[State 3027, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; aerial russian slam c throwing
[StateDef 3030]
type = a
MoveType = A
Anim = 3030
SprPriority = 2

[State 3030, time var]
type = Null
trigger1 = 1
trigger1 = var(0) := var(0) + 1

[State 3030, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3030, skip]
type = ChangeAnim
trigger1 = var(0) = 60 && animelemno(0) = 1
value = anim
elem = animelemno(0) + 1

[State 3030, fat]
type = Width
trigger1 = animelemno(0) = 1
edge = 80

[State 3030, fat]
type = Width
trigger1 = animelemno(0) = 2
edge = 44

[State 3030, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 59

[State 3030, fat]
type = Width
trigger1 = animelemno(0) = 4
edge = 65

[State 3030, fat]
type = Width
trigger1 = animelemno(0) = 5
edge = 100

[State y Accel c]
type = VelAdd
trigger1 = pos y < 0 && animelem = 5, < 0
Y = .5

[State y Accel c for going down]
type = VelAdd
trigger1 = pos y < 0 && animelem = 5, >= 0
Y = 2

[State x Accel c]
type = VelAdd
trigger1 = vel x > .5
x = -.5

[State 3030, x stop c]
type = VelSet
trigger1 = animelem = 2, = 3
x = 0

[State 3030, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3000
pos = 86, -98

[State 3030, lift target]
type = TargetState
trigger1 = animelem = 2
value = 3035
ID = 3000

[State 3030, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3000
pos = -3, -134

[State 3030, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3000
pos = 11, -134

[State 3030, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 3000
pos = 87, -119

[State 3030, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0
ID = 3000
pos = 100, -81

[State 3030, behind]
type = SprPriority
trigger1 = animelem = 4
value = -1

[State 3030, front]
type = SprPriority
trigger1 = animelem = 5
value = 2

[State 3030, Voice]
Type = PlaySND
Trigger1 = !time
Value = 184, 1
Channel = 0
volume = var(31)

[State 3030, Voice]
Type = PlaySND
Trigger1 = !animtime
Value = 0, 6
Channel = 0
volume = var(31)

[State 3030, End]
Type = ChangeState
Trigger1 = !animtime
Value = 3031

; aerial russian slam c crash & jump away
[StateDef 3031]
type = c
MoveType = A
Anim = 3031
SprPriority = 2
velset = 0, 0

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 3030, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3031, smash p2 state]
Type = TargetState
triggerall = NumTarget(3000)
Trigger1 = animelem = 1
Value = 3036
ID = 3000

[State 3031, bind]
type = TargetBind
trigger1 = animelemtime(3) < 0
ID = 3000
pos = 82 + !(time % 2), -44 - target(3000), const(size.mid.pos.y) / 3

[State 3031, snd]
type = PlaySnd
trigger1 = animelem = 1
value = 805

[State 3031, ground effect]
type = Explod
trigger1 = animelem = 1
anim = f62
pos = 82
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 18
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3031, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = -ceil(fvar(2) * 418)
ID = 3000
absolute = 1

[State 3031, Fly]
Type = TargetState
triggerall = NumTarget(3000)
Trigger1 = animelem = 3
Value = 3037
ID = 3000

[State 3031, a]
type = StateTypeSet
trigger1 = animelem = 3
statetype = a

[State 3031, go c]
type = VelSet
trigger1 = animelem = 3
x = -7.2; 144
y = -12.1; 64

[State 3031, grav]
type = VelAdd
trigger1 = animelem = 3, > 0
y = 1.2

[State 3031, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 3032

; aerial russian slam c land
[StateDef 3032]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3032
SprPriority = 2

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

[State 3032, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 3032, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; lifted By aerial russian slam c
[StateDef 3035]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3035, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3035, Camera Still]
Type = ScreenBound
Trigger1 = 1

; smashed By aerial russian slam c
[StateDef 3036]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3030, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3036, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By aerial russian slam c
[StateDef 3037]
Type = A
MoveType = H
VelSet = -5.54, -9.05; 133, 83 (59 + 24)

[State 3037, anim]
type = ChangeAnim2
trigger1 = !time
value = 3037

[State 3037, Gravity]
Type = VelAdd
Trigger1 = time
Y = .75

[State 3037, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; final atomic buster x attempt
[StateDef 3100]
MoveType = A
Ctrl = 0
VelSet = 0, 0
SprPriority = 2
Juggle = var(20) := 2
anim = 3100

[State 3100, 0]
type = NotHitBy
trigger1 = animelem = 3, < 0
value = sca
ignorehitpause = 1

[State 3100, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3100, jo]
type = AfterImageTime
trigger1 = animelem = 7, < 0
time = 2

[State 3100, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 38
movetime = 38
Anim = F100
Sound = S3000
Pos = 14, -88
Darken = 1
UnHittAble = 1
poweradd = -1000
p2defmul = 1

[State 3100, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = animelem = 2 && var(17) := -1
Attr = S, HT
P2Facing = 1
P1Facing = 1
HitFlag = M-
Priority = 3, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 3200
P2StateNo = 3230
Fall = 1
Guard.Dist = 0
ID = 3100
YAccel = .5
fall.recover = 0

[State 3100, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 5
Value = 5000, 1
Channel = 0
volume = var(31)

[State 3100, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; final atomic buster y attempt
[StateDef 3110]
MoveType = A
Ctrl = 0
VelSet = 0, 0
SprPriority = 2
Juggle = var(20) := 2
anim = 3110

[State 3110, 0]
type = NotHitBy
trigger1 = animelem = 3, < 0
value = sca
ignorehitpause = 1

[State 3110, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3110, jo]
type = AfterImageTime
trigger1 = animelem = 7, < 0
time = 2

[State 3110, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 38
movetime = 38
Anim = F101
Sound = S3000
Pos = 14, -88
Darken = 1
UnHittAble = 1
poweradd = -2000
p2defmul = 1

[State 3110, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = animelem = 2 && var(17) := -1
Attr = S, HT
P2Facing = 1
P1Facing = 1
HitFlag = M-
Priority = 3, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 3300
P2StateNo = 3330
Fall = 1
Guard.Dist = 0
ID = 3100
YAccel = .5
fall.recover = 0

[State 3110, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 5
Value = 5000, 1
Channel = 0
volume = var(31)

[State 3110, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; final atomic buster z attempt
[StateDef 3120]
MoveType = A
Ctrl = 0
VelSet = 0, 0
SprPriority = 2
Juggle = var(20) := 2
anim = 3120

[State 3120, 0]
type = NotHitBy
trigger1 = animelem = 3, < 0
value = sca
ignorehitpause = 1

[State 3120, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3120, jo]
type = AfterImageTime
trigger1 = animelem = 7, < 0
time = 2

[State 3120, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 38
movetime = 38
Anim = F102
Sound = S3000
Pos = 14, -88
Darken = 1
UnHittAble = 1
poweradd = -3000
p2defmul = 1

[State 3120, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = animelem = 2 && var(17) := -1
Attr = S, HT
P2Facing = 1
P1Facing = 1
HitFlag = M-
Priority = 3, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 3400
P2StateNo = 3430
Fall = 1
Guard.Dist = 0
ID = 3100
YAccel = .5
fall.recover = 0

[State 3120, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 5
Value = 5000, 1
Channel = 0
volume = var(31)

[State 3120, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

; final atomic buster x throwing
[StateDef 3200]
MoveType = A
Anim = 3200
SprPriority = 2
velset = 0, 0

[State 3200, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3200, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 3100; final
channel = 0
volume = var(31)

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3100
pos = 84, -71

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

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = -4, -83

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
trigger2 = animelemtime(13) >= 0 && animelemtime(14) < 0
ID = 3100
pos = -44, -49

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
trigger2 = animelemtime(14) >= 0 && animelemtime(15) < 0
ID = 3100
pos = -47, -41

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
trigger2 = animelemtime(15) >= 0
ID = 3100
pos = -38, -51

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
ID = 3100
pos = -30, -89

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
ID = 3100
pos = 77, -95

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(12) < 0
ID = 3100
pos = 96 + !(time % 2), -21

[State 3200, bind]
type = TargetBind
trigger1 = animelemtime(12) >= 0 && animelemtime(13) < 0
ID = 3100
pos = 64, -5

[State 3200, fat]
type = Width
trigger1 = animelemno(0) = [1, 2]
edge = 64

[State 3200, fat]
type = Width
trigger1 = animelemno(0) = 3
edge = 64, ifelse(backedgedist < 36, 18, 0)

[State 3200, fat]
type = Width
trigger1 = animelemno(0) = [4, 6]
edge = 64, ifelse(backedgedist < 36, 40, 0)

[State 3200, fat]
type = Width
trigger1 = animelemno(0) = 7
edge = 64

[State 3200, fat]
type = Width
trigger1 = animelemno(0) = 8
edge = 72

[State 3200, fat]
type = Width
trigger1 = animelemno(0) = [9, 11]
edge = 80

[State 3200, snd]
type = PlaySnd
trigger1 = animelem = 9
value = 805
volume = var(31)

[State 3200, ground effect]
type = Explod
trigger1 = animelem = 9
anim = f62
postype = p2
pos = 0, 21
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 9 && var(8) := 14
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3200, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 9
Value = -ceil(fvar(2) * 83)
ID = 3100
absolute = 1
kill = 0

[State 3200, Fly]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !animtime
Value = 3255
ID = 3100

[State 3200, posadd]
type = PosAdd
trigger1 = animelem = 13
x = 88

[State 3200, voice]
type = PlaySnd
trigger1 = animelem = 13
value = 3100, 1; atomic
channel = 0
volume = var(31)

[State 3200, turn]
type = Turn
trigger1 = !animtime

[State 3200, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 3205

; final atomic buster x screwing
[StateDef 3205]
type = a
MoveType = A
Anim = 3205
SprPriority = 2
ctrl = var(0) := 0

[State 3205, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3205, leave corner]
type = VelSet
trigger1 = !time && frontedgedist <= 124
x = -3.76

[State 3205, jump x]
type = VelSet
trigger1 = !time
y = -11.575; 95

[State 3205, grav]
type = veladd
trigger1 = time
y = .75

[State 3205, snd]
type = PlaySnd
trigger1 = animelem = 1 || !animtime
value = 1100
volume = var(31)

[State 3205, left]
type = TargetFacing
trigger1 = animelem = 1 || !animtime
value = 1

[State 3205, behind]
type = SprPriority
trigger1 = animelem = 2
value = -1

[State 3205, front]
type = SprPriority
trigger1 = animelem = 3
value = 2

[State 3205, right]
type = TargetFacing
trigger1 = animelem = 3
value = -1

[State 3205, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
trigger2 = !animtime
ID = 3100
pos = 61, -80

[State 3205, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
trigger2 = animelemtime(4) >= 0 && animtime < 0
ID = 3100
pos = 24, -80

[State 3205, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = -14, -80

[State 3205, fat]
type = Width
trigger1 = 1
edge = 64

[State 3205, count screw turns]
type = Null
trigger1 = !animtime
trigger1 = var(0) := var(0)+1

[State 3205, End]
Type = ChangeState
triggerall = animelem = 1, = 2
Trigger1 = var(0) = 3
Value = 3210

; final atomic buster screw crash & jump away
[StateDef 3210]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3210
SprPriority = 2

[State 3210, voice]
type = PlaySnd
trigger1 = !time
value = 3100, 2; buster
channel = 0
volume = var(31) * 2

[State 3210, snd]
type = PlaySnd
trigger1 = !time
value = 805
volume = var(31)

[State 3210, crash]
type = PlaySnd
trigger1 = !time
value = 5100
volume = var(31)

[State 3210, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 3210, crash]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !time
Value = 3260
ID = 3100

[State 3210, turn p2]
type = TargetFacing
trigger1 = !time
value = 1

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

[State 3210, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3100
pos = 66 + !(time % 2), -7

[State 3210, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3100
pos = 59 + !(time % 2), -9

[State 3210, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = 56, -18

[State 3210, bind]
type = TargetBind
trigger1 = animelemtime(4) = 0
ID = 3100
pos = 56 - (abs(target(3100), const(size.head.pos.x)) - abs(target(3100), const(size.mid.pos.x))), -18 - (abs(target(3100), const(size.head.pos.y)) - abs(target(3100), const(size.mid.pos.y)))

[State 3210, a]
type = StateTypeSet
trigger1 = animelem = 4
statetype = a

[State 3210, go x]
type = VelSet
trigger1 = animelem = 4
x = -4.5; 81
y = -7.3; 39

[State 3210, grav]
type = veladd
trigger1 = animelem = 4, > 0
y = .75

[State 3210, fat]
type = Width
trigger1 = animelemno(0) = [1, 3]
edge = 64

[State 3210, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = 66, 0
ownpal = 1
sprpriority  = 3

[State 3210, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 0, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 14
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3210, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -166)
ID = 3100
absolute = 1

[State 3210, add]
type = HitAdd
trigger1 = animelem = 1
value = 1

[State 3210, turn p2]
type = TargetFacing
trigger1 = animelem = 4
value = -1

[State 3210, Fly]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = AnimElem = 4
Value = 3265
ID = 3100

[State 3210, End]
Type = ChangeState
Trigger1 = !animtime
Value = 3215

; final atomic buster screw land
[StateDef 3215]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3215
SprPriority = 2

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

[State 3215, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 3215, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; Grabbed By final atomic buster suplex part
[StateDef 3230]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3230, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3230, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3230, Camera Still]
Type = ScreenBound
Trigger1 = 1

; screwed By final atomic buster screw part
[StateDef 3255]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3255, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3255, Camera Still]
Type = ScreenBound
Trigger1 = 1

; crashed By final atomic buster screw part
[StateDef 3260]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3260, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3260, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By final atomic buster screw part
[StateDef 3265]
Type = A
MoveType = H
VelSet = -6.22, -9.75; 168, 115 (56 + 59)

[State 3265, anim]
type = ChangeAnim2
trigger1 = !time
value = 3265

[State 3265, Gravity]
Type = VelAdd
Trigger1 = time
Y = .75

[State 3265, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; final atomic buster y throwing
[StateDef 3300]
MoveType = A
Anim = 3300
SprPriority = 2
velset = 0, 0

[State 3300, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3300, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 2; hm
channel = 0
volume = var(31)

[State 3300, voice]
type = PlaySnd
trigger1 = animelem = 5
value = 3100; final
channel = 0
volume = var(31)

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3100
pos = 84, -71

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3100
pos = 75, -75

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = -4, -83

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
trigger2 = animelemtime(13) >= 0 && animelemtime(14) < 0
trigger3 = animelemtime(22) >= 0 && animelemtime(23) < 0
ID = 3100
pos = -44, -49

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
trigger2 = animelemtime(14) >= 0 && animelemtime(15) < 0
trigger3 = animelemtime(23) >= 0 && animelemtime(24) < 0
ID = 3100
pos = -47, -41

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
trigger2 = animelemtime(15) >= 0 && animelemtime(16) < 0
trigger3 = animelemtime(24) >= 0
ID = 3100
pos = -38, -51

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
trigger2 = animelemtime(16) >= 0 && animelemtime(17) < 0
ID = 3100
pos = -30, -89

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
trigger2 = animelemtime(17) >= 0 && animelemtime(18) < 0
ID = 3100
pos = 77, -95

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(12) < 0
trigger2 = animelemtime(18) >= 0 && animelemtime(21) < 0
ID = 3100
pos = 96 + !(time % 2), -21

[State 3300, bind]
type = TargetBind
trigger1 = animelemtime(12) >= 0 && animelemtime(13) < 0
trigger2 = animelemtime(21) >= 0 && animelemtime(22) < 0
ID = 3100
pos = 64, -5

[State 3300, fat]
type = Width
trigger1 = animelemno(0) = [1, 2]
edge = 64

[State 3300, fat]
type = Width
trigger1 = animelemno(0) = 3
trigger2 = animelemno(0) = 12
edge = 64, ifelse(backedgedist < 36, 18, 0)

[State 3300, fat]
type = Width
trigger1 = animelemno(0) = [4, 6]
trigger2 = animelemno(0) = [13, 15]
edge = 64, ifelse(backedgedist < 36, 40, 0)

[State 3300, fat]
type = Width
trigger1 = animelemno(0) = 7
trigger2 = animelemno(0) = 16
edge = 64

[State 3300, fat]
type = Width
trigger1 = animelemno(0) = 8
trigger2 = animelemno(0) = 17
edge = 72

[State 3300, fat]
type = Width
trigger1 = animelemno(0) = [9, 11]
trigger2 = animelemno(0) = [18, 20]
edge = 80

[State 3300, snd]
type = PlaySnd
trigger1 = animelem = 9
trigger2 = animelem = 18
value = 805
volume = var(31)

[State 3300, ground effect]
type = Explod
trigger1 = animelem = 9
trigger2 = animelem = 18
anim = f62
postype = p2
pos = 0, 21
ownpal = 1

[State 3300, add hit]
type = HitAdd
trigger1 = animelem = 18
value = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 9 && var(8) := 16
trigger2 = animelem = 18 && var(8) := 16
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3300, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 9
trigger2 = animelem = 18
Value = -ceil(fvar(2) * 83)
ID = 3100
absolute = 1
kill = 0

[State 3300, Fly]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !animtime
Value = 3355
ID = 3100

[State 3300, posadd]
type = PosAdd
trigger1 = animelem = 13
trigger2 = animelem = 22
x = 88

[State 3300, voice]
type = PlaySnd
trigger1 = animelem = 16
value = 3100, 1; atomic
channel = 0
volume = var(31)

[State 3300, turn]
type = Turn
trigger1 = !animtime

[State 3300, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 3305

; final atomic buster y screwing
[StateDef 3305]
type = a
MoveType = A
Anim = 3305
SprPriority = 2
ctrl = var(0) := 0

[State 3305, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3305, leave corner]
type = VelSet
trigger1 = !time && frontedgedist <= 124
x = -3.76

[State 3305, jump x]
type = VelSet
trigger1 = !time
y = -14.875; 159

[State 3305, grav]
type = veladd
trigger1 = time
y = .75

[State 3305, snd]
type = PlaySnd
trigger1 = animelem = 1 || !animtime
value = 1100
volume = Var(31)

[State 3305, left]
type = TargetFacing
trigger1 = animelem = 1 || !animtime
value = 1

[State 3305, behind]
type = SprPriority
trigger1 = animelem = 2
value = -1

[State 3305, front]
type = SprPriority
trigger1 = animelem = 3
value = 2

[State 3305, right]
type = TargetFacing
trigger1 = animelem = 3
value = -1

[State 3305, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
trigger2 = !animtime
ID = 3100
pos = 61, -80

[State 3305, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
trigger2 = animelemtime(4) >= 0 && animtime < 0
ID = 3100
pos = 24, -80

[State 3305, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = -14, -80

[State 3305, fat]
type = Width
trigger1 = 1
edge = 64

[State 3305, count screw turns]
type = Null
trigger1 = !animtime
trigger1 = var(0) := var(0)+1

[State 3305, End]
Type = ChangeState
triggerall = animelem = 1, = 2
Trigger1 = var(0) = 4
Value = 3310

; final atomic buster screw crash & jump away
[StateDef 3310]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3310
SprPriority = 2

[State 3310, voice]
type = PlaySnd
trigger1 = !time
value = 3100, 2; buster
channel = 0
volume = var(31) * 2

[State 3310, snd]
type = PlaySnd
trigger1 = !time
value = 805
volume = var(31)

[State 3310, snd]
type = PlaySnd
trigger1 = !time
value = 5100
volume = var(31)

[State 3310, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 3310, crash]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !time
Value = 3360
ID = 3100

[State 3310, turn p2]
type = TargetFacing
trigger1 = !time
value = 1

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

[State 3310, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3100
pos = 66 + !(time % 2), -7

[State 3310, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3100
pos = 59 + !(time % 2), -9

[State 3310, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = 56, -18

[State 3310, bind]
type = TargetBind
trigger1 = animelemtime(4) = 0
ID = 3100
pos = 56 - (abs(target(3100), const(size.head.pos.x)) - abs(target(3100), const(size.mid.pos.x))), -18 - (abs(target(3100), const(size.head.pos.y)) - abs(target(3100), const(size.mid.pos.y)))

[State 3310, a]
type = StateTypeSet
trigger1 = animelem = 4
statetype = a

[State 3310, go y]
type = VelSet
trigger1 = animelem = 4
x = -4.2; 84
y = -8.9; 51

[State 3310, grav]
type = veladd
trigger1 = animelem = 4, > 0
y = .85

[State 3310, fat]
type = Width
trigger1 = animelemno(0) = [1, 3]
edge = 64

[State 3310, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = 66, 0
ownpal = 1
sprpriority  = 3

[State 3310, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 0, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 16
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3310, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -207)
ID = 3100
absolute = 1

[State 3310, add]
type = HitAdd
trigger1 = animelem = 1
value = 1

[State 3310, turn p2]
type = TargetFacing
trigger1 = animelem = 4
value = -1

[State 3310, Fly]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = AnimElem = 4
Value = 3365
ID = 3100

[State 3310, End]
Type = ChangeState
Trigger1 = !animtime
Value = 3315

; final atomic buster screw land
[StateDef 3315]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3315
SprPriority = 2

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

[State 3315, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 3315, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; Grabbed By final atomic buster suplex part
[StateDef 3330]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3330, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3330, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3330, Camera Still]
Type = ScreenBound
Trigger1 = 1

; screwed By final atomic buster screw part
[StateDef 3355]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3355, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3255, Camera Still]
Type = ScreenBound
Trigger1 = 1

; crashed By final atomic buster screw part
[StateDef 3360]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3360, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3360, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By final atomic buster screw part
[StateDef 3365]
Type = A
MoveType = H
VelSet = -6.22, -9.75; 168, 115 (56 + 59)

[State 3365, anim]
type = ChangeAnim2
trigger1 = !time
value = 3365

[State 3365, Gravity]
Type = VelAdd
Trigger1 = time
Y = .75

[State 3365, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; final atomic buster z throwing
[StateDef 3400]
MoveType = A
Anim = 3400
SprPriority = 2
velset = 0, 0

[State 3400, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3400, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 2; hm
channel = 0
volume = var(31)

[State 3400, voice]
type = PlaySnd
trigger1 = animelem = 5
value = 3100; final
channel = 0
volume = var(31)

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3100
pos = 84, -71

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3100
pos = 75, -75

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = -4, -83

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
trigger2 = animelemtime(13) >= 0 && animelemtime(14) < 0
trigger3 = animelemtime(22) >= 0 && animelemtime(23) < 0
ID = 3100
pos = -44, -49

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
trigger2 = animelemtime(14) >= 0 && animelemtime(15) < 0
trigger3 = animelemtime(23) >= 0 && animelemtime(24) < 0
ID = 3100
pos = -47, -41

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
trigger2 = animelemtime(15) >= 0 && animelemtime(16) < 0
trigger3 = animelemtime(24) >= 0
ID = 3100
pos = -38, -51

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
trigger2 = animelemtime(16) >= 0 && animelemtime(17) < 0
ID = 3100
pos = -30, -89

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
trigger2 = animelemtime(17) >= 0 && animelemtime(18) < 0
ID = 3100
pos = 77, -95

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(12) < 0
trigger2 = animelemtime(18) >= 0 && animelemtime(21) < 0
ID = 3100
pos = 96 + !(time % 2), -21

[State 3400, bind]
type = TargetBind
trigger1 = animelemtime(12) >= 0 && animelemtime(13) < 0
trigger2 = animelemtime(21) >= 0 && animelemtime(22) < 0
ID = 3100
pos = 64, -5

[State 3400, fat]
type = Width
trigger1 = animelemno(0) = [1, 2]
edge = 64

[State 3400, fat]
type = Width
trigger1 = animelemno(0) = 3
trigger2 = animelemno(0) = 12
edge = 64, ifelse(backedgedist < 36, 18, 0)

[State 3400, fat]
type = Width
trigger1 = animelemno(0) = [4, 6]
trigger2 = animelemno(0) = [13, 15]
edge = 64, ifelse(backedgedist < 36, 40, 0)

[State 3400, fat]
type = Width
trigger1 = animelemno(0) = 7
trigger2 = animelemno(0) = 16
edge = 64

[State 3400, fat]
type = Width
trigger1 = animelemno(0) = 8
trigger2 = animelemno(0) = 17
edge = 72

[State 3400, fat]
type = Width
trigger1 = animelemno(0) = [9, 11]
trigger2 = animelemno(0) = [18, 20]
edge = 80

[State 3400, snd]
type = PlaySnd
trigger1 = animelem = 9
trigger2 = animelem = 18
value = 805
volume = var(31)

[State 3400, ground effect]
type = Explod
trigger1 = animelem = 9
trigger2 = animelem = 18
anim = f62
postype = p2
pos = 0, 21
ownpal = 1

[State 3400, add hit]
type = HitAdd
trigger1 = animelem = 18
value = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 9 && var(8) := 18
trigger2 = animelem = 18 && var(8) := 18
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3400, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 9
trigger2 = animelem = 18
Value = -ceil(fvar(2) * ifelse(animelem = 9, = 0, 90, 83))
ID = 3100
absolute = 1
kill = 0

[State 3400, Fly]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !animtime
Value = 3455
ID = 3100

[State 3400, posadd]
type = PosAdd
trigger1 = animelem = 13
trigger2 = animelem = 22
x = 88

[State 3400, voice]
type = PlaySnd
trigger1 = animelem = 16
value = 3100, 1; atomic
channel = 0
volume = var(31)

[State 3400, turn]
type = Turn
trigger1 = !animtime

[State 3400, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 3401

; final atomic buster z screwing first
[StateDef 3401]
type = a
MoveType = A
Anim = 3405
SprPriority = 2
ctrl = var(0) := 0

[State 3402, voice]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 3
channel = 0
volume = var(31)

[State 3401, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3401, leave corner]
type = VelSet
trigger1 = !time && frontedgedist <= 124
x = -3.76

[State 3401, jump x]
type = VelSet
trigger1 = !time
y = -11.67; 95 

[State 3401, grav]
type = veladd
trigger1 = time
y = .75

[State 3401, snd]
type = PlaySnd
trigger1 = animelem = 1 || !animtime
value = 1100
volume = var(31)

[State 3401, left]
type = TargetFacing
trigger1 = animelem = 1 || !animtime
value = 1

[State 3401, behind]
type = SprPriority
trigger1 = animelem = 2
value = -1

[State 3401, front]
type = SprPriority
trigger1 = animelem = 3
value = 2

[State 3401, right]
type = TargetFacing
trigger1 = animelem = 3
value = -1

[State 3401, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
trigger2 = !animtime
ID = 3100
pos = 61, -80

[State 3401, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
trigger2 = animelemtime(4) >= 0 && animtime < 0
ID = 3100
pos = 24, -80

[State 3401, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = -14, -80

[State 3401, fat]
type = Width
trigger1 = 1
edge = 64

[State 3401, count screw turns]
type = Null
trigger1 = !animtime
trigger1 = var(0) := var(0)+1

[State 3401, End]
Type = ChangeState
triggerall = animelem = 1, = 2
Trigger1 = var(0) = 3
Value = 3402

; final atomic buster z first screw crash & jump again
[StateDef 3402]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3402
SprPriority = 2

[State 3402, snd]
type = PlaySnd
trigger1 = !time
value = 805
volume = var(31)

[State 3402, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 3402, crash]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !time
Value = 3456
ID = 3100

[State 3402, turn p2]
type = TargetFacing
trigger1 = !time
value = 1

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

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3100
pos = 66 + !(time % 2), -7

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3100
pos = 59 + !(time % 2), -9

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = 56, -18

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 3100
pos = -50, -73

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
ID = 3100
pos = -63, -102

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
ID = 3100
pos = -44, -49

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
ID = 3100
pos = -47, -41

[State 3402, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0
ID = 3100
pos = -38, -51

[State 3402, fat]
type = Width
trigger1 = animelemno(0) = [1, 3]
edge = 64

[State 3402, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = 66, 0
ownpal = 1
sprpriority  = 3

[State 3402, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 0, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 18
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3402, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -90)
ID = 3100
absolute = 1
kill = 0

[State 3402, add]
type = HitAdd
trigger1 = animelem = 1
value = 1

[State 3402, turn]
type = Turn
trigger1 = animelem = 4 || !animtime

[State 3402, Fly]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !Animtime
Value = 3455
ID = 3100

[State 3402, End]
Type = ChangeState
Trigger1 = !animtime
Value = 3405

; final atomic buster z screwing
[StateDef 3405]
type = a
MoveType = A
Anim = 3405
SprPriority = 2
ctrl = var(0) := 0

[State 3405, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3405, leave corner]
type = VelSet
trigger1 = !time && frontedgedist <= 124
x = -3.76

[State 3405, jump x]
type = VelSet
trigger1 = !time
;y = -14.875; 159
y = -17.95; 223

[State 3405, grav]
type = veladd
trigger1 = time
y = .75

[State 3405, snd]
type = PlaySnd
trigger1 = animelem = 1 || !animtime
value = 1100
volume = var(31)

[State 3405, left]
type = TargetFacing
trigger1 = animelem = 1 || !animtime
value = 1

[State 3405, behind]
type = SprPriority
trigger1 = animelem = 2
value = -1

[State 3405, front]
type = SprPriority
trigger1 = animelem = 3
value = 2

[State 3405, right]
type = TargetFacing
trigger1 = animelem = 3
value = -1

[State 3405, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
trigger2 = !animtime
ID = 3100
pos = 61, -80

[State 3405, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
trigger2 = animelemtime(4) >= 0 && animtime < 0
ID = 3100
pos = 24, -80

[State 3405, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = -14, -80

[State 3405, fat]
type = Width
trigger1 = 1
edge = 64

[State 3405, count screw turns]
type = Null
trigger1 = !animtime
trigger1 = var(0) := var(0)+1

[State 3405, End]
Type = ChangeState
triggerall = animelem = 1, = 2
Trigger1 = var(0) = 5
Value = 3410

; final atomic buster screw crash & jump away
[StateDef 3410]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3410
SprPriority = 2

[State 3410, voice]
type = PlaySnd
trigger1 = !time
value = 3100, 2; buster
channel = 0
volume = var(31) * 2

[State 3410, snd]
type = PlaySnd
trigger1 = !time
value = 805
volume = var(31)

[State 3410, snd]
type = PlaySnd
trigger1 = !time
value = 5100
volume = var(31)

[State 3410, jo]
type = AfterImageTime
trigger1 = 1
time = 2

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 3410, crash]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = !time
Value = 3460
ID = 3100

[State 3410, turn p2]
type = TargetFacing
trigger1 = !time
value = 1

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

[State 3410, bind]
type = TargetBind
trigger1 = animelemtime(2) < 0
ID = 3100
pos = 66 + !(time % 2), -7

[State 3410, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 3100
pos = 59 + !(time % 2), -9

[State 3410, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3100
pos = 56, -18

[State 3410, bind]
type = TargetBind
trigger1 = animelemtime(4) = 0
ID = 3100
pos = 56 - (abs(target(3100), const(size.head.pos.x)) - abs(target(3100), const(size.mid.pos.x))), -18 - (abs(target(3100), const(size.head.pos.y)) - abs(target(3100), const(size.mid.pos.y)))

[State 3410, a]
type = StateTypeSet
trigger1 = animelem = 4
statetype = a

[State 3410, go z]
type = VelSet
trigger1 = animelem = 4
x = -5.87; 135
y = -10.575; 64

[State 3410, grav]
type = veladd
trigger1 = animelem = 4, > 0
y = .95

[State 3410, fat]
type = Width
trigger1 = animelemno(0) = [1, 3]
edge = 64

[State 3410, ground effect p2]
type = Explod
trigger1 = animelem = 1
anim = f62
postype = p1
pos = 66, 0
ownpal = 1
sprpriority  = 3

[State 3410, ground effect p1]
type = Explod
trigger1 = animelem = 1
anim = f61
postype = p1
pos = 0, 0
ownpal = 1

[State x, call envshake]
type = Helper
trigger1 = animelem = 1 && var(8) := 18
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 3410, Damage]
Type = TargetLifeAdd
Trigger1 = AnimElem = 1
Value = ceil(fvar(2) * -213)
ID = 3100
absolute = 1

[State 3410, add]
type = HitAdd
trigger1 = animelem = 1
value = 1

[State 3410, turn p2]
type = TargetFacing
trigger1 = animelem = 4
value = -1

[State 3410, Fly]
Type = TargetState
triggerall = NumTarget(3100)
Trigger1 = AnimElem = 4
Value = 3465
ID = 3100

[State 3410, End]
Type = ChangeState
Trigger1 = !animtime
Value = 3415

; final atomic buster screw land
[StateDef 3415]
type = c
MoveType = A
VelSet = 0, 0
Anim = 3415
SprPriority = 2

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

[State 3415, snd]
type = PlaySnd
trigger1 = !time
value = 52

[State 3415, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

; Grabbed By final atomic buster suplex part
[StateDef 3430]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3430, AfterImage]
type = AfterImage
trigger1 = !Time
Time = 2

[State 3430, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3430, Camera Still]
Type = ScreenBound
Trigger1 = 1

; screwed By final atomic buster screw part
[StateDef 3455]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3455, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3455, Camera Still]
Type = ScreenBound
Trigger1 = 1

; crashed By first final atomic buster screw part
[StateDef 3456]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3456, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3456, Camera Still]
Type = ScreenBound
Trigger1 = 1

; crashed By final atomic buster screw part
[StateDef 3460]
Type = A
MoveType =  H
VelSet = 0, 0
Ctrl = 0

[State 3460, jo]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 3460, Camera Still]
Type = ScreenBound
Trigger1 = 1

; Thrown By final atomic buster screw part
[StateDef 3465]
Type = A
MoveType = H
VelSet = -6.22, -9.75; 168, 115 (56 + 59)

[State 3465, anim]
type = ChangeAnim2
trigger1 = !time
value = 3465

[State 3465, Gravity]
Type = VelAdd
Trigger1 = time
Y = .75

[State 3465, End]
Type = SelfState
Trigger1 = !animtime
Value = 5100

; HITA_FALL (knocked up, falling)
[Statedef 5050]
type = A
movetype = H

[State 5050, 1]; Change anim when done with transition
type = ChangeAnim
trigger1 = !AnimTime && Anim = 5035
trigger2 = !Time; If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090; Not if hit off ground anim
value = 5050

[State 5050, 2]; Coming down anim
type = ChangeAnim
trigger1 = anim = [5050, 5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim + 10)
value = anim + 10
persistent = 0

[State 5050, 3]; Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

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

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1 && Pos Y < -20 && alive && CanRecover
trigger1 = Command = "recovery"
value = 5210; HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = pos y >= ifelse((anim = 5060 && animelemtime(4) < 1) || (anim = 5061 && animelemtime(7) < 1) || (anim = 5062 && animelemtime(6) < 1), 18, 0)
value = 5100; HIT_BOUNCE

; HIT_TRIP2 (fall through air)
[Statedef 5071]
type = A
movetype = H

[State 5071, 1]
type = HitVelSet
trigger1 = !Time
x = 1
y = 1

[State 5071, 2]; Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3]; Hit ground
trigger1 = Vel Y > 0 && Pos Y >= 10
type = ChangeState
value = 5110

; HIT_BOUNCE (hit ground)
[Statedef 5100]
type = L
movetype = H

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

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

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

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

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

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

[State 5100, 6]; Reduce speed
type = VelMul
trigger1 = !Time
x = .75

[State 5100, 7]
type = ChangeState
trigger1 = !Time && !GetHitVar(fall.yvel)
value = 5110; HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
under = sysvar(1) <= 14

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

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = 5100, !alive

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

[State 5100, 12]
type = ChangeState
trigger1 = !AnimTime
value = 5101

; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type = L
movetype = H

[State 5101, slow down]
type = VelMul
trigger1 = abs(vel x) > 1
x = const(movement.stand.friction)
persistent = 2

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

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

[State 5101, 3]
type = HitFallVel
trigger1 = !Time

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

[State 5101, grav]
type = VelAdd
trigger1 = 1
y = const(movement.yaccel)

[State 5101, 6]; Hit ground
trigger1 = Vel Y > 0 && pos Y >= 0
type = ChangeState
value = 5110

; HIT_LIEDOWN
[Statedef 5110]
type = L
movetype = H

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = !Time

[State 5110, 1]; For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081, 5089]
value = 5110 + (anim % 10)

[State 5110, 2]; Hit ground anim (normal/trip)
type = ChangeAnim
triggerall = !time
triggerall = anim != [5110, 5119] ;Not already changed anim
trigger1 = anim != [5161, 5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = ifelse(anim = 5070, 5100, 5170)

[State 5110, 3]; Hit ground anim (for hit up)
type = ChangeAnim
triggerall = !time
triggerall = anim != [5110, 5119]; Not already changed anim
trigger1 = anim = [5161, 5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = !Time

[State 5110, 5]
type = PosSet
trigger1 = !Time
y = 0

[State 5110, Var]; Get fall velocity
type = VarSet
trigger1 = !Time && GetHitVar(fall.yvel)
sysvar(1) = floor(vel y)

[State 5110, 6]
type = PlaySnd
trigger1 = !Time && !SysVar(0)
value = 5110, !alive

[State 5110, 7]
type = GameMakeAnim
trigger1 = !Time && !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
under = sysvar(1) <= 14

[State 5110, 8]
type = VelSet
trigger1 = !Time
y = 0

[State 5110, 9]; For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171, 5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = !AnimTime
trigger2 = SysVar(0); SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10]; For normal
type = ChangeAnim
triggerall = Anim != [5111, 5119]
trigger1 = !AnimTime
trigger2 = SysVar(0); SysVar(0) = 1 avoids hit ground frame
value = 5110
persistent = 0

[State 5110, 11]; If just died
type = ChangeState
triggerall = !alive
trigger1 = !AnimTime
trigger2 = SysVar(0); SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110, 5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0) && !Time
sysvar(0) = 0

[State 5110, 13]; Friction
type = VelMul
trigger1 = 1
x = const(movement.crouch.friction)

; HIT_LIEDEAD
[Statedef 5150]
type = L
movetype = H
sprpriority = -3

[State 5150, 1]; Normal anim
type = ChangeAnim
triggerall = !Time && SelfAnimExist(5140)
trigger1 = (anim != [5111, 5119]) && (anim != [5171, 5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3]; Hit up type anim
type = ChangeAnim
trigger1 = !Time
trigger1 = (anim = [5111, 5119]) || (anim = [5171, 5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4]; Match over anim
type = ChangeAnim
persistent = 0
trigger1 = !Time && MatchOver
trigger1 = Anim = [5140, 5149]
trigger1 = SelfAnimExist(anim + 10)
value = anim + 10

[State 5150, 5]; Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = !Time
trigger1 = Anim != [5140, 5159]
trigger1 = Anim != [5110, 5119]
value = 5110

[State 5150, Collapse]
type = ChangeAnim
trigger1 = PrevStateNo = 5400 && !Time
value = 5410

[State 5150, 6]; Friction
type = VelMul
trigger1 = 1
x = const(movement.crouch.friction)

[State 5150, 7]; Friction
type = VelSet
trigger1 = abs(Vel x) < .05
persistent = 0
x = 0

[State 5150, 8]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type = c
anim = 5200
velset = var(0) := 0, 0
facep2 = 1
sprpriority = -1

[State 5201, 1]
type = posset
Trigger1 = !Var(0) && Command = "holdfwd"
Trigger1 = (Var(0) := 18) && 0
trigger2 = !Time
y = 0

[State 5201, 3]
type = VelSet
trigger1 = time = 10
x = 8

[State 5201, 4]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 5201, penetrate]
type = PlayerPush
trigger1 = 1
value = 0

[State 5201, stop]
type = VelSet
trigger1 = time = 28 + var(0)
x = 0

[State 5201, end]
type = ChangeState
trigger1 = time = 28 + var(0)
value = 11
ctrl = 1

; Opponent Breakfall 
[StateDef 5220]
Type = U
Ctrl = 0

[State 5220, End]
Type = SelfState
Trigger1 = !Time
Value = IfElse(Pos Y >= -20, 5200, 5210)
Ctrl = 0

; Cheese Kill (guarding)
[Statedef 5400]
movetype = H
vel = 0, 0
physics = s

[State 5400, Hit Velocity Set]
Type = HitVelSet
Trigger1 = !Time
X = 1

[State 5400, 1]
type = StateTypeSet
trigger1 = prevstateno = 5000 && !time
statetype = S

[State 5400, 2]
type = StateTypeSet
trigger1 = prevstateno = 5010 && !time
statetype = c

[State 5400, Stop Sliding Back]
Type = Velmul
Trigger1 = Time >= GetHitVar(SlideTime)
X = .6

[State 5400, no]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 5400, end]
type = ChangeState
trigger1 = !AnimTime
value = 5150

; Initialize (at the start of the round)
[Statedef 5900]

[State 5900, 1]; Clear all int variables
type = VarRangeSet
trigger1 = !roundsexisted
value = 0

[State 5900, 2]; Clear all float variables
type = VarRangeSet
trigger1 = !roundsexisted
fvalue = 0

[State 5900, voice volume base]
type = VarSet
trigger1 = var(30) != 100
var(30) = 100

[state 5900, start with 1 powerbar]
type = powerset
trigger1 = !roundsexisted
value = 1000

[State 5900, 3]; Intro for round 1
type = ChangeState
trigger1 = roundno = 1
value = 190

; Finish Helper
[StateDef 6000]
Anim = 6000

[State 510, call envshake]
type = Helper
trigger1 = !time && var(8) := 18
stateno = 6030
ownpal = 1
pausemovetime = 999
ignorehitpause = 1
;id = 6030

[State 6000, 0]
type = VarRandom
trigger1 = !time
v = 0
range = 0, 256
ignorehitpause = 1

[State 6000, 1]
type = VarRandom
trigger1 = !time
v = 1
range = 0, 256
ignorehitpause = 1

[State 6000, 2]
type = VarRandom
trigger1 = !time
v = 2
range = 0, 256
ignorehitpause = 1

[State 6000, 3]
type = VarRandom
trigger1 = !time
v = 3
range = 0, 256
ignorehitpause = 1

[State 6000, 4]
type = VarRandom
trigger1 = !time
v = 4
range = 0, 256
ignorehitpause = 1

[State 6000, 5]
type = VarRandom
trigger1 = !time
v = 5
range = 0, 256
ignorehitpause = 1

[State 6000, 6]
type = VarRandom
trigger1 = !time
v = 6
range = 0, 256
ignorehitpause = 1

[State 6000, 7]
type = VarRandom
trigger1 = !time
v = 7
range = 0, 256
ignorehitpause = 1

;leave var(8) alone for envshake ampl!

[State 6000, 9]
type = VarRandom
trigger1 = !time
v = 9
range = 0, 256
ignorehitpause = 1

[State 6000, 10]
type = VarRandom
trigger1 = !time
v = 10
range = 0, 256
ignorehitpause = 1

[State 6000, flash]
type = BGPalFX
trigger1 = !time
time = 15
add = var(0), var(1), var(2)
mul = var(3), var(4), var(5)
sinadd = var(6), var(7), var(10), 5
color = var(9)
invertall = gametime % 2
ignorehitpause = 1

[State 6000, Super Win SND]
Type = PlaySnd
Trigger1 = !Time
Value = 6000
ignorehitpause = 1
volume = 255

[State 6000, pause]
type = Pause
trigger1 = !time
time = 15
movetime = 15
ignorehitpause = 1

[State 6000, Heh]
Type = AssertSpecial
Trigger1 = time <= 20
Flag = NoBarDisplay
Flag2 = NoFG
flag3 = NoKOSlow
ignorehitpause = 1

[State 6000, End]
Type = DestroySelf
Trigger1 = roundstate = 4

; parry Helper
[StateDef 6005]

[State 6005, stay put]
type = BindToParent
trigger1 = 1
time = 1
facing = 1
ignorehitpause = 1

[State 6005, anim]
type = ChangeAnim
trigger1 = 1
value = ifelse(parent, var(29) = 1, 6005, ifelse(parent, var(29) = 2, 6006, 6007))
ignorehitpause = 1

[State 6005, s parry active]
type = ReversalDef
trigger1 = parent, var(29) = 1 && parent, var(27) && parent, statetype != a
reversal.attr = sa, aa
pausetime = 0, 0;14
p1stateno = 6006
ignorehitpause = 1

[State 6005, c parry active]
type = ReversalDef
trigger1 = parent, var(29) = 2 && parent, var(27) && parent, statetype != a
reversal.attr = c, aa
pausetime = 0, 0;14
p1stateno = 6006
ignorehitpause = 1

[State 6005, a parry active]
type = ReversalDef
trigger1 = parent, var(29) = 3 && parent, var(27) && parent, statetype = a
reversal.attr = sa, aa
pausetime = 0, 0;14
p1stateno = 6006
ignorehitpause = 1

[State 6005, End]
Type = DestroySelf
Trigger1 = !(parent, var(27))
ignorehitpause = 1

; parried!
[StateDef 6006]

[State 6006, End]
Type = DestroySelf
Trigger1 = !time
ignorehitpause = 1

; Counterhit effect helper
[StateDef 6010]
Anim = 6000

[State 6010, no bars]
type = AssertSpecial
triggerall = parent, var(17) > 0
trigger1 = time < 2 + !p2life
flag = nobardisplay
ignorehitpause = 1

[State 6010, flash]
type = EnvColor
triggerall = parent, var(17) > 0
trigger1 = !time
value = 240, 240, 240
time = 2
ignorehitpause = 1

[State x, call envshake]
type = Helper
trigger1 = !time && var(8) := ifelse(parent, var(17) > 14, 14, ifelse(parent, var(17) < 8, 8, parent, var(17)))
stateno = 6030
ownpal = 1
ignorehitpause = 1
id = 6030

[State 6010, End]
Type = DestroySelf
Trigger1 = parent, var(3) = 0

; banishing flat anti-projectile helper
[StateDef 6020]
Anim = 6020

[State 6020, stay]
type = BindToParent
trigger1 = 1
time = 1

[State 6020, projs only]
type = HitBy
trigger1 = !time
value = SCA, AP
time = -1
ignorehitpause = 1

[State 6020, nono]
type = HitOverride
trigger1 = !time
slot = 0
attr = SCA, AP
stateno = 6021
time = -1
ignorehitpause = 1

[State 6020, End]
Type = DestroySelf
Trigger1 = parent, animelem = 5
trigger2 = parent, movetype = h

; banishing flat anti-projectile helper end
[StateDef 6021]
Anim = 6000

[State 6021, End]
Type = DestroySelf
Trigger1 = !time

;envshake helper
[statedef 6030]
anim = 6000
ctrl = var(1) := 0

[State 6030, envshake vars]
type = Null
trigger1 = !time
trigger1 = var(0) := parent, var(8); start-up amplitude
trigger2 = (var(0) - var(1)/3) > 1; for as long as amplitude > 1
trigger2 = var(1) := var(1)+1
ignorehitpause = 1

[State x, debug display]
type = DisplayToClipboard
trigger1 = 1
text = "Var(0): %i  Var(1): %i  ampl: %i   yes: %i"
params = var(0), var(1), var(0) - var(1)/3, ((var(0) - var(1)/3) > 1) && !(var(1) % 3)
IgnoreHitPause = 1

[State 6030, shake it]
Type = EnvShake
triggerall = (var(0) - var(1)/3) > 1; for as long as amplitude > 1
Trigger1 = !(var(1) % 3); apply amplitude every third tick
Time = 3
freq = 60
ampl = var(0) - var(1)/3
phase = 0
ignorehitpause = 1

[state 6030, go away]
type = destroyself
trigger1 = (var(0) - var(1)/3) <= 1; destroy self as soon as amplitude <= 1
trigger2 = parent, numhelper(6030) > 1 && time; if there's two of you and you're the oldest
ignorehitpause = 1

[Statedef -2]

[State -2, p2 attacks]
type = VarSet
triggerall = !var(2)
trigger1 = p2movetype = A
var(2) = 7
ignorehitpause = 1

[State -2, p2 is counter hit]
type = VarSet
triggerall = !var(3) && var(2)
trigger1 = movehit
trigger2 = movetype = h && p2movetype = h
var(3) = 1
ignorehitpause = 1

[State -2, original counter hit over]
type = VarSet
triggerall = var(3) && !var(4)
trigger1 = !movehit
var(4) = 1
ignorehitpause = 1

[State -2, reset counter hit var]
type = VarSet
triggerall = var(3)
trigger1 = var(4) && movehit
trigger2 = p2movetype != H
var(3) = 0

[State -2, reset]
type = VarSet
triggerall = var(4)
trigger1 = !var(3)
var(4) = 0
ignorehitpause = 1

[State -2, p2 does no longer attack]
type = VarSet
triggerall = var(2)
trigger1 = p2movetype != a
var(2) = 0

[State -2, spawn counterhit effect helper]
type = Helper
triggerall = !numhelper(6010)
trigger1 = var(3)
ID = 6010
stateno = 6010
ownpal = 1
ignorehitpause = 1

[State -2, p2 ko for finish check]
type = Null
trigger1 = var(18) != 1 && p2life 
trigger1 = var(18) := 1
trigger2 = var(18) && !p2life
trigger2 = var(18) := 0

[State -2, remove mvc2 dash]
type = RemoveExplod
trigger1 = numexplod(100) && stateno != 100
ID = 100
ignorehitpause = 1

[State -2, remove mvc2 dash]
type = RemoveExplod
trigger1 = numexplod(102) && stateno != 102
ID = 102
ignorehitpause = 1

[State -2, Display]
type = DisplayToClipboard
trigger1 = roundstate = 2 && alive && p2life
text = "X: %f  Y: %f  P2BDx: %f  P2Dy: %f"
params = Pos X, pos y, p2bodydist x, p2dist y
IgnoreHitPause = 1

[State -2, Debug]
Type = appendtoClipBoard
Trigger1 = RoundState = 2 && Alive && P2Life
Text = "\n %i  %i  v(0): %i  v(31): %i  v(9): %i"
Params = p2life, life, var(0), var(31), var(9)
IgnoreHitPause = 1

[Statedef -3]

[State -3, voice volume]
type = Null
trigger1 = (stateno != [1000, 5000)) && var(31) != var(30)
trigger1 = var(31) := var(30)
trigger2 = (stateno = [1000, 3000)) && var(31) != ceil(var(30) * 1.5)
trigger2 = var(31) := ceil(var(30) * 1.5)
trigger3 = (stateno = [3000, 5000)) && var(31) != (var(30) * 2)
trigger3 = var(31) := (var(30) * 2)

[State -3, Hurt SND]
Type = PlaySND
TriggerAll = StateNo = 5000 || StateNo = 5010 || StateNo = 5020 || StateNo = 5070 || StateNo = 5080 || stateno = 5100
Trigger1 = RoundState = 2 && Alive && Random < 250 + GetHitVar(HitCount) * 8 && !GetHitVar(Guarded) && (GetHitVar(HitTime) > -1 || stateno = 5100) && Time = 1
Value = 5000, IfElse(GetHitVar(HitCount) < 6, 0, IfElse(GetHitVar(HitCount) < 12, 1, IfElse(GetHitVar(HitCount) < 18, 2, IfElse(GetHitVar(HitCount) < 24, 3, IfElse(GetHitVar(HitCount) < 30, 4, 5)))))
Channel = 0
LowPriority = 0
IgnoreHitPause = 1
volume = var(31) + gethitvar(hitcount) * 2

[State -3, breakfall voice]
type = PlaySnd
trigger1 = stateno = 5210 && time = 1
value = 0, 1
channel = 0
volume = var(31)

[State -3, P2 Allow Flipping]
Type = VarSet
TriggerAll = !Var(1) && P2Life && NumTarget && RoundState = 2 && Alive && (Ctrl || MoveType = H)
Trigger1 = (Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050)
var(1) = 1

[State -3, P2 Disallow Flipping]
Type = VarSet
TriggerAll = Var(1) && P2Life && RoundState = 2 && Alive
Trigger1 = p2moveType != H || p2StateType != A || movehit = 1
var(1) = 0

[State -3, P2 Disallow Flipping If Flipped]
Type = VarSet
TriggerAll = Var(1) && P2Life && NumTarget && RoundState = 2 && Alive
Trigger1 = Target, StateNo = 5200 || Target, StateNo = 5201 || Target, StateNo = 5210
var(1) = 0

[State -3, P2 Breakfall]
Type = TargetState
TriggerAll = Var(1) && P2Life && NumTarget && RoundState = 2 && Alive
Trigger1 = Target, Command = "recovery"
Value = 5220

[State -3, attack multiplier based on p2life]
type = null
triggerall = roundstate = 2 && alive && p2life
trigger1 = p2life > EnemyNear, lifemax / 3 && fvar(0) != 1
trigger1 = fvar(0) := 1 
trigger2 = (p2life = (EnemyNear, lifemax * .08, EnemyNear, lifemax / 3]) && fvar(0) != .725
trigger2 = fvar(0) := .725
Trigger3 = (p2life <= EnemyNear, lifemax * .08) && fvar(0) != .6
Trigger3 = FVar(0) := .6

[State -3, attack multiplier based on number of hits]
type = null
triggerall = roundstate = 2 && alive && p2life
Trigger1 = P2MoveType != H && var(11)
Trigger1 = Var(11) := 0
Trigger2 = HitPauseTime = 1 && P2MoveType = H && MoveHit
Trigger2 = Var(11) := Var(11) + 1
Trigger3 = !Var(11)
Trigger3 = FVar(1) := 1
Trigger4 = (Var(11) = [1, 2])
Trigger4 = FVar(1) := .95
Trigger5 = (Var(11) = [3, 4])
Trigger5 = FVar(1) := .9
Trigger6 = (Var(11) = [5, 6])
Trigger6 = FVar(1) := .85
Trigger7 = (Var(11) = [7, 9])
Trigger7 = FVar(1) := .8
Trigger8 = (Var(11) = 9)
Trigger8 = FVar(1) := .75
Trigger9 = (Var(11) = [10, 11])
Trigger9 = FVar(1) := .7
Trigger10 = (Var(11) = [12, 13])
Trigger10 = FVar(1) := .65
Trigger11 = (Var(11) = [14, 15])
Trigger11 = FVar(1) := .6
Trigger12 = (Var(11) = 16)
Trigger12 = FVar(1) := .55
Trigger13 = (Var(11) = [17, 18])
Trigger13 = FVar(1) := .5
Trigger14 = (Var(11) = [19, 20])
Trigger14 = FVar(1) := .45
Trigger15 = (Var(11) = [21, 22])
Trigger15 = FVar(1) := .4
Trigger16 = (Var(11) = [23, 24])
Trigger16 = FVar(1) := .35
Trigger17 = (Var(11) = 25)
Trigger17 = FVar(1) := .3
Trigger18 = (Var(11) = [26, 27])
Trigger18 = FVar(1) := .25
Trigger19 = (Var(11) = [28, 29])
Trigger19 = FVar(1) := .2
Trigger20 = (Var(11) = [30, 31])
Trigger20 = FVar(1) := .15
Trigger21 = (Var(11) = 32)
Trigger21 = FVar(1) := .1
Trigger22 = (Var(11) >= 33)
Trigger22 = FVar(1) := .05
ignorehitpause = 1

[State -3, multiply attack multipliers]
type = null
triggerall = roundstate = 2 && alive && p2life
Trigger1 = fvar(2) := fvar(1) * fvar(0)

[State -3, Attack Strength]
Type = AttackMulSet
Trigger1 = RoundState = 2 && alive && p2life
Value = FVar(2)

[State -3, engine juggle check active yesno]
type = AssertSpecial
triggerall = roundstate = 2 && alive && p2life
trigger1 = Var(6) := IfElse((p2statetype = a && (EnemyNear, BackEdgeBodyDist <= 10 || EnemyNear, FrontEdgeBodyDist <= 10 || numtarget(450) || numtarget(550))) || p2statetype = l, 0, 1) && p2movetype = h
flag = nojugglecheck

[State -3, custom juggle system]
type = Null
triggerall = !var(6) && p2movetype = h && roundstate = 2 && alive && p2life
trigger1 = !var(22) && movehit
trigger1 = var(22) := 1; juggled
trigger2 = var(22) && var(23) = -1
trigger2 = var(23) := stateno && var(24) := var(20); juggle state and juggle points of move
trigger3 = var(21) > 0 && var(23) != -1 && (stateno != var(23) || stateno = 1110 || stateno = 1210)
trigger3 = var(21) := var(21) - var(24) && var(22) := 0 && var(23) := -1; subtract and reset
ignorehitpause = 1

; zangief has no helpers that can juggle:
[State -3, custom juggle system for helpers]
type = Null
triggerall = 0;!var(6) && p2movetype = h && roundstate = 2 && alive && p2life
trigger1 = !numhelper(var(25)) && var(26)
trigger1 = var(21) := var(21) - var(26) && var(26) := 0; subtract and reset
ignorehitpause = 1

[State -3, reset custom juggle system]
type = Null
triggerall = p2movetype != h && roundstate = 2 && alive && p2life
trigger1 = var(21) != 2
trigger1 = var(21) := 2
trigger2 = var(22)
trigger2 = var(22) := 0
trigger3 = var(23) != -1
trigger3 = var(23) := -1
trigger4 = var(24)
trigger4 = var(24) := 0

[State -3, more basic hits in corner against airborne p2 allowed yesno]
type = Null
triggerall = roundstate = 2 && alive && p2life
Trigger1 = Var(6) || HitDefAttr = SCA, SA, HA || var(3) || var(4)
Trigger1 = Var(7) := 1
Trigger2 = !Var(6) && p2statetype = a && HitDefAttr = SCA, NA && MoveContact
Trigger2 = Var(7) := 0

[State -3, allow 2-in-1 cancels yesno]
type = varset
trigger1 = var(5) := 0
trigger2 = stateno = 200 && animelem = 4, < 0
trigger3 = stateno = 230 && animelem = 4, < 0
trigger4 = stateno = 400 && animelem = 3, < 0
trigger5 = stateno = 430 && animelem = 4, < 0
trigger6 = stateno = 540 && animelem = 4, < 0
var(5) = 1
IgnoreHitPause = 1

[State -3, hyper finish]
Type = Helper
TriggerAll = ((!P2Life && NumEnemy <= 1) || WinKo) && !NumHelper(6000) && var(18)
Trigger1 = NumTarget(3000) || numtarget(3100)
ID = 6000
StateNo = 6000
OwnPal = 1
IgnoreHitPause = 1

[State -3, hitsnd s except strongest]
type = PlaySnd
triggerall = (prevstateno = [200, 210]) || (prevstateno = [230, 240]) || prevstateno = 310
trigger1 = movetype = h && !time && p2movetype = h
value = ifelse(var(2), prevstateno + 10, prevstateno) - 100 * (prevstateno > 300), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State -3, hitsnd s strongest]
type = PlaySnd
triggerall = prevstateno = 220 || prevstateno = 250 || prevstateno = 320
trigger1 = movetype = h && !time && p2movetype = h
value = prevstateno - 100 * (prevstateno > 300), var(2) || (!p2life && roundstate > 2)
channel = 1
ignorehitpause = 1

[State -3, hitsnd c except strongest]
type = PlaySnd
triggerall = (prevstateno = [400, 410]) || (prevstateno = [430, 440]) || prevstateno = 510 || prevstateno = 540
trigger1 = movetype = h && !time && p2movetype = h
value = ifelse(var(2), prevstateno - 190, prevstateno - 200) - 100 * (prevstateno > 500), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State -3, hitsnd c strongest]
type = PlaySnd
triggerall = prevstateno = 420 || prevstateno = 450 || prevstateno = 550
trigger1 = movetype = h && !time && p2movetype = h
value = prevstateno - 200  - 100 * (prevstateno > 500), ifelse(prevstateno = 450 || prevstateno = 550, !p2life && roundstate > 2, (!p2life && roundstate > 2) || var(2))
channel = 1
ignorehitpause = 1

[State -3, hitsnd a except strongest]
type = PlaySnd
triggerall = (prevstateno = [600, 610]) || prevstateno = 615 || (prevstateno = [630, 640]) || (prevstateno = 710) || (prevstateno = [730, 740])
trigger1 = movetype = h && !time && p2movetype = h
value = ifelse(var(2), prevstateno - 390, prevstateno - 400) - 100 * (prevstateno = 615) - 100 * (prevstateno > 700), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State -3, hitsnd a strongest except weird state numbers]
type = PlaySnd
triggerall = prevstateno = 620 || prevstateno = 650 || prevstateno = 720
trigger1 = movetype = h && !time && p2movetype = h
value = prevstateno - 400 - 100 * (prevstateno > 700), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State -3, hitsnd a strongest with weird state numbers]
type = PlaySnd
triggerall = prevstateno = 721 || prevstateno = 725
trigger1 = movetype = h && !time && p2movetype = h
value = prevstateno - 501 - 1 * (prevstateno > 721), !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State -3, hitsnd special punch]
type = PlaySnd
triggerall = prevstateno = [1000, 1210]
trigger1 = movetype = h && !time && p2movetype = h
value = 1000, !p2life && roundstate > 2
channel = 1
ignorehitpause = 1

[State -3, hitspark light]
type = Explod
triggerall = prevstateno = 200 || prevstateno = 230 || prevstateno = 400 || prevstateno = 430 || prevstateno = 600 || prevstateno = 630 || prevstateno = 730
trigger1 = movetype = h && !time && p2movetype = h
anim = f0
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State -3, hitspark med]
type = Explod
triggerall=prevstateno=210||prevstateno=240||prevstateno=310||prevstateno=410||prevstateno=440||prevstateno=510||prevstateno=540||prevstateno=610||prevstateno=615||prevstateno=640||prevstateno=710||prevstateno=740
trigger1 = movetype = h && !time && p2movetype = h
anim = f1
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State -3, hitspark hard]
type = Explod
triggerall = prevstateno = 220 || prevstateno = 250 || prevstateno = 320 || prevstateno = 420 || prevstateno = 450 || prevstateno = 550 || prevstateno = 620 || prevstateno = 650 || (prevstateno = [720, 725])
trigger1 = movetype = h && !time && p2movetype = h
anim = f2
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State -3, hitspark heavy]
type = Explod
triggerall = (prevstateno = [1000, 1210])
trigger1 = movetype = h && !time && p2movetype = h
anim = f3
pos = var(13), var(14)
ontop = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State -3, hitspark offset range]
type = VarSet
trigger1 = roundstate = 1 && !var(19)
var(19) = 11

[state -3, p2 cannot be thrown after getting hit]
type = varset
triggerall = numenemy
trigger1 = enemynear, movetype = h && (enemynear, stateno != [120, 155])
var(15) = 1

[state -3, p2 can be thrown again after a hit]
type = varset
triggerall = numenemy && var(15)
trigger1 = enemynear, movetype != h && enemynear, time
var(15) = 0

[State -3, cheese killed anim]
type = changeanim
trigger1 = (PrevStateNo = [120, 140]) && !alive && (stateno = 5000 || stateno = 5010) && anim != 5400
value = 5400

[State -3, cheese killed state]
type = changestate
trigger1 = (PrevStateNo = [120, 140]) && !alive && (stateno = 5000 || stateno = 5010) && anim = 5400 && hitshakeover
value = 5400

[State -3, pos x for parries]
type = Varset
trigger1 = (stateno != 20 || time > 7) && (stateno != [160, 161])
trigger2 = (stateno = [160, 161]) && time
fvar(4) = pos x

[State -3, no walk after parry short time]
type = AssertSpecial
triggerall = var(16)
trigger1 = var(16) := var(16) - 1
flag = nowalk

[State -3, countdown from 3 to -1 after parry input]
type = varadd
triggerall = var(27) > 0
trigger1 = var(28) >= 0
var(28) = -1

[State -3, countdown time parry is active]; countdown from 8/7 to 0; if any direction is held at 3 ticks after parry input (var(9) reaches 0), countdown happens in 4 ticks, else in the full 8/7
type = VarAdd
trigger1 = var(27) > 0
var(27) = ifelse(!var(28) && (command = "holdfwd" || command = "holddown" || command = "holdup" || command = "holdback"), -5 + statetype = a, -1)

[State -3, input parry command]
type = varset
triggerall = roundstate = 2 && stateno != 100 && alive && ((command = "F" && command != "holddown" && command != "release D") ^^ (statetype != a && command = "D" && command != "holdfwd" && command != "release F"))
trigger1 = ctrl || (stateno = [160, 162])
trigger1 = var(28) := 3 && var(29) := ifelse(command = "F" && statetype != a, 1, ifelse(command = "F", 3, 2))
var(27) = ifelse(statetype = a, 7, 8)
ignorehitpause = 1

[State -3, parry conditions over]
type = varset
triggerall = var(27)
trigger1 = (var(29) = [1, 2]) && statetype = a; s/c parry and left ground
trigger2 = var(29) = 3 && statetype != a; a parry and left air
trigger3 = (stateno != [150, 162]) && !ctrl; no more ctrl
var(27) = 0
ignorehitpause = 1

[State -3, create parry helper]
type = Helper
triggerall = !numhelper(6005)
trigger1 = var(27)
ID = 6005
stateno = 6005
ownpal = 1
pausemovetime = 999

[State -3, s parry active]
type = HitOverride
trigger1 = var(29) = 1 && var(27) && statetype != a
slot = 0
attr = sa, ap
stateno = 160
ignorehitpause = 1

[State -3, c parry active]
type = HitOverride
trigger1 = var(29) = 2 && var(27) && statetype != a
slot = 0
attr = c, ap
stateno = 161
ignorehitpause = 1

[State -3, a parry active]
type = HitOverride
trigger1 = var(29) = 3 && var(27) && statetype = a
slot = 0
attr = sa, ap
stateno = 162
ignorehitpause = 1

[State -3, parried]
type = ChangeState
trigger1 = numhelper(6005)
trigger1 = helper(6005), stateno = 6006
value = ifelse(var(29) = 1, 160, ifelse(var(29) = 2, 161, 162))
ignorehitpause = 1

[state -3, turn after cancelled jump landing]
type = turn
triggerall = prevstateno = 52 && (stateno = (190, 5000))
trigger1 = facing = enemynear, facing