;Thin Nen's CNS  ver 1.29
;
;   Patched(most suitable in both DOSMUGEN & WINMUGEN)
;
;var 1-24,27-38,51-59
;helper var 25,26
;
;1 - 2st jump         2 - F,B command        3,7,11,24 - pause
;4,12,21 - common     5 - jump attack        6 - blood common
;8,9 - dizzy          10 - dizzy common      13 - Jubak contact
;14,15 - yeon contact 16,17 - Jubak nothit   18 - Jubak nothit air
;19 - jubak1 bind y   20 - Jubak1 sound      22,23 - command
;h25,h26 - sshoot     27 - life              28 - key input
;30 - key input for winmugen when in pause   31 - air recover nothit
;32 - Can yeon        33 - Can air yeon      34 - Can jubak
;36 - st shot state    37,38 - prevmovetype

;35 - First life ! (Can distinguish DOSMUGEN and WINMUGEN)

;51 - stress point    52 - st gage point     53 - sshoot available
;54 - stress gage state
;
;29,55 - AI           57 - Pose        58 - AI ON/OFF
;56,59 - stress gage location

[Data]
life = 1000          ;Amount of life to start with
attack = 100         ;100% attack power (more is stronger)
defence = 100        ;100% defensive power (more is stronger)
fall.defence_up = 50 ;Def goes up by 50% everytime player is hit on ground
liedown.time = 60    ;Time player takes before getting up from HIT_LIEDOWN
airjuggle = 15       ;Can do 15 points of juggling
sparkno = 2        ;Default spark number
guard.sparkno = 40 ;Default guard spark number
KO.echo = 0           ;1 to enable echo on KO
;volume = 255           ;Volume offset (negative for softer)
IntPersistIndex = 51

[Size]
xscale = 1         ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
height = 60
ground.back = 21     ;Player width (back, ground)
ground.front = 18    ;Player width (front, ground)
air.back = 21        ;Player width (back, air)
air.front = 18      ;Player width (front, air)
z.width = 3          ;Player width (into and out)
attack.width = 4,4   ;Default attack width: back, front
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
head.pos = -4,-84
mid.pos = -4,-49

[Velocity]
walk.fwd  = 2.6      ;Walk forward
walk.back = -2.3     ;Walk backward
run.fwd  = 6.8, 0    ;Run forward (x, y)  - if y<0, player will hop
run.back = -5.2,0    ;Run backward (x, y) - if y=0, player will run
jump.neu = 0,-10.5    ;Neutral jumping velocity (x, y)
jump.back = -2.6,-10.5;Jump back Speed (x, y)
jump.fwd = 2.6,-10.5  ;Jump forward Speed (x, y)
runjump.fwd = 2.6,-10.5 ;(not use)
airjump.neu = 0      ;.
airjump.back = 0 ;Air jump speeds (opt)
airjump.fwd = 0    ;.

[Movement]
airjump.num = 0  ;Number of air jumps allowed (opt)
airjump.height = 0  ;Minimum distance from ground before you can air jump (opt)
yaccel = .5         ;Vertical acceleration
stand.friction = .82  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching
;---------------------------------------------------------------------------
; Stand
[Statedef 00]
type = S
physics = S
sprpriority = 0

[State 5210, 1]
type = varset
trigger1 = Time = 0
var(31) = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0+ifelse(var(57)=0,0,2) && Anim != 5
trigger1 = (time = 0 && prevstateno != 0) || animtime = 0
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0+ifelse(var(57)=0,0,2)

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 1]
type = posset
trigger1 = pos y > 0 || time = 0
y = 0

[State 10, 2]
type = ChangeState
trigger1 = var(52) >= 1000 && ctrl
value = 3100
;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
anim = 10
velset = 0,0
sprpriority = 0

[State 10, 2]
type = ChangeState
trigger1 = var(52) >= 1000 && ctrl
value = 3100
[State 10, 2]
type = Changeanim
trigger1 = time = 0 && prevstateno = 52
value = 10
elem = 2

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

[State 10, 2]
type = ChangeState
trigger1 = var(52) >= 1000 && ctrl
value = 3100
[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11
;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type    = S
physics = S
anim = 12

[State 10, 2]
type = ChangeState
trigger1 = var(52) >= 1000 && ctrl
value = 3100
[State 12, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 10, 2]
type = ChangeState
trigger1 = var(52) >= 1000 && ctrl
value = 3100

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20+ifelse(var(57)=1,2,0) && Anim != 5
trigger1 = (anim != 20 && anim != 22) || animtime = 0
trigger2 = Anim = 5 && AnimTime = 0
value = 20+ifelse(var(57)=1,2,0)

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21+ifelse(var(57)=1,2,0) && Anim != 5
trigger1 = (anim != 21 && anim != 23) || animtime = 0
trigger2 = Anim = 5 && AnimTime = 0
value = 21+ifelse(var(57)=1,2,0)
;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 5]
type = Varset
trigger1 = time = 0 && p2dist x >= 0
var(4) = 0
[State 40, 5]
type = Varset
trigger1 = time = 0 && p2dist x < 0
var(4) = 1
[State 40, 5]
type = turn
trigger1 = time = 0 && p2dist x < 0

[State 10, 2]
type = ChangeState
trigger1 = var(52) >= 1000
value = 3100
[State 40, 5]
type = Varset
trigger1 = time = 0
var(1) = 0
[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "x" && time > 0 && var(55) = 0
var(5) = 1
[State 40, 2]
type = VarSet
trigger1 = command = "a" && time > 0 && var(55) = 0
var(5) = 2
[State 40, 2]
type = VarSet
trigger1 = command = "y" && time > 0 && var(55) = 0
var(5) = 3
[State 40, 2]
type = VarSet
trigger1 = command = "b" && time > 0 && var(55) = 0
var(5) = 4

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

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd" && var(55) = 0
trigger2 = time = 0 && var(55) = 1 && p2dist x > 100
sysvar(1) = 1*ifelse(var(4)=1&&var(55)=0&&var(57)=1,-1,1)

[State 40, 3]
type = VarSet
trigger1 = command = "holdback" && var(55) = 0
trigger2 = time = 0 && var(55) = 1
trigger2 = p2dist x < 50 || (p2dist x <= 100 && backedgedist > 20 && random < 500)
sysvar(1) = -1*ifelse(var(4)=1&&var(55)=0&&var(57)=1,-1,1)

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0 && var(57) = 0
trigger2 = var(57) != 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0 && var(57) = 0
trigger2 = var(57) != 0
value = 50
;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A
[State 52, 2]
type = ctrlset
trigger1 = pos y >= -25
value = 0
[State 52, 2]
type = ctrlset
trigger1 = pos y < -25
value = 1

[State 52, 2]
type = Playsnd
trigger1 = Time = 0
value = s0,0+ifelse(var(57)=1,10,0)

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

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(28) = 0
[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41+ifelse(var(57)=1,20,0), ifelse((vel x)>0, 42+ifelse(var(57)=1,20,0), 43+ifelse(var(57)=1,20,0)))

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -1
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 50, 2]
type = Changestate
triggerall = var(1) = 0
trigger1 = var(4) = 1 && command = "holdup" && var(55) = 0
trigger2 = var(55) = 1 && roundstate < 3 && pos y <= -50
trigger2 = (p2stateno != 1406 && p2stateno != 1506) || p2movetype != H
trigger2 = p2dist x < 0 || (vel y > 7 && p2dist x > 130 && random < 300+ifelse(p2dist y < 0,300,ifelse(p2movetype = A,200,0)))
value = 54

[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 1 && vel x != 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 600
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 2 && vel x != 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 610
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 3 && vel x != 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 620
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 4 && vel x != 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 630
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 1 && vel x = 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 640
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 2 && vel x = 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 650
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 3 && vel x = 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 660
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 4 && vel x = 0
trigger1 = command != "holdfwd" || command = "holdup"
value = 670
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 1
trigger1 = command = "holdfwd" && command != "holdup"
value = 700
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 2
trigger1 = command = "holdfwd" && command != "holdup"
value = 710
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 3
trigger1 = command = "holdfwd" && command != "holdup"
value = 720
[State 50, 2]
type = Changestate
trigger1 = time = 0 && var(5) = 4
trigger1 = command = "holdfwd" && command != "holdup"
value = 730
;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type    = A
physics = A

[State 52, 2]
type = statetypeset
triggerall = var(55) = 1
trigger1 = prevstateno = 140 && time = 0
physics = N
[State 52, 2]
type = statetypeset
triggerall = var(55) = 1
trigger1 = prevstateno = 140 && time = 1
physics = A

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A
[State 52, 2]
type = ctrlset
trigger1 = pos y >= -25
value = 0
[State 52, 2]
type = ctrlset
trigger1 = pos y < -25
value = 1

[State 50, 2]
type = Changestate
trigger1 = var(1) = 0 && command = "holdup" && var(55) = 0
value = 54
;---------------------------------------------------------------------------
; 2st Jump Up
[Statedef 54]
type    = A
physics = A
anim = 54+ifelse(var(57)=1,20,0)

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A
[State 52, 2]
type = ctrlset
trigger1 = pos y >= -25
value = 0
[State 52, 2]
type = ctrlset
trigger1 = pos y < -25
value = 1

[State 52, 2]
type = Playsnd
trigger1 = Time = 0
value = s0,0+ifelse(var(57)=1,10,0)

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

[State 50, 1]
type = velset
trigger1 = Time = 0 && command != "holdfwd" && command != "holdback" && var(55) = 0
x = 0
y = -10.5
[State 50, 1]
type = velset
trigger1 = Time = 0 && command = "holdback" && var(55) = 0
x = -2.6
y = -10.5
[State 50, 1]
type = velset
triggerall = Time = 0
trigger1 = command = "holdfwd" && var(55) = 0
trigger2 = var(55) = 1
x = 2.6
y = -10.5

[State 50, 1]
type = turn
trigger1 = Time = 0 && p2dist x < 0

[State 50, 1]
type = changeanim
trigger1 = Time = 0 && vel x > 0 && var(57) = 1
value = 75
[State 50, 1]
type = changeanim
trigger1 = Time = 0 && vel x < 0
value = 55+ifelse(var(57)=1,21,0)
;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 1
anim = 47+ifelse(var(57)=1,3,0)
velset = 0,0

[State 5210, 1]
type = varset
trigger1 = Time = 0
var(31) = 0

[State 52, 2]
type = Playsnd
trigger1 = Time = 0
value = s0,1+ifelse(var(57)=1,10,0)

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

[State 1300, 5]
type = helper
trigger1 = time = 0
stateno = 102-ifelse(var(57)=1,1,0)
name = "dust"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 52, 3]
type = assertspecial
triggerall = prevstateno != 5040 && var(28) != 0
trigger1 = AnimTime < 0 && anim != 50
trigger2 = time < 5 && anim = 50
flag = nowalk
[State 52, 3]
type = assertspecial
triggerall = prevstateno != 5040 && var(28) = 0
trigger1 = AnimTime < -1 && anim != 50
trigger2 = time < 4 && anim = 50
flag = nowalk

[State 10, 2]
type = ChangeState
trigger1 = var(52) >= 1000
value = 3100
[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0 && anim != 50
trigger2 = time >= 5 && anim = 50
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; INTRO
[Statedef 191]
type = S
physics = N
ctrl = 0
anim = 190

[State 193, 1]
type = AssertSpecial
trigger1 = Time < 36
flag = Intro

[State 191, 1]
type = velset
trigger1 = animelem = 12
y = -4.9
[State 191, 1]
type = veladd
trigger1 = animelem = 12,>0 && animelem = 16,<4
y = 0.5

[State 191, 1]
type = velset
trigger1 = animelem = 16,4
y = 0
[State 191, 1]
type = posset
trigger1 = animelem = 16,4
y = 0

[State 52, 2]
type = Playsnd
trigger1 = animelem = 17
value = s0,1
[State 1300, 5]
type = helper
trigger1 = animelem = 17
stateno = 102
name = "dust"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 6 || animelem = 7 || animelem = 8 || animelem = 9
value = s2,4

[State 191, 1]
type = ChangeState
trigger1 = animTime = 0
value = 0
;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 1
ctrl = 0
velset = 0,0

[State 100, 4]
type = changestate
trigger1 = time = 0 && var(55) = 0
trigger1 = (facing = 1 && var(2) < 0) || (facing = -1 && var(2) > 0)
value = 105

[State 100, 4]
type = velset
trigger1 = time = 1
x = const(velocity.run.fwd.x)

[State 100, 4]
type = width
trigger1 = animtime < 0
value = 2

[State -2, 0]
type = posadd
trigger1 = pos y < 0 && animelem = 2,<0
y = ifelse(pos y + 2 <= 0,2,-pos y)

[State 100, 4]
type = velset
trigger1 = animelem = 2
y = -3

[State 100, 4]
type = velset
triggerall = time > 1
trigger1 = command = "holdback" && var(55) = 0
trigger2 = var(55) = 1 && p2dist x < 0 && random < 500 && time = 11
x = const(velocity.run.back.x)*1.1

[State 100, 4]
type = veladd
trigger1 = animelem = 2,>0
y = .5

[State 100, 4]
type = ChangeState
trigger1 = command = "holddown" && var(55) = 0
trigger2 = p2movetype = A && var(55) = 1
value = 10
ctrl = 1

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 4
range = 1
[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 12
range = 3

[State -1]
type = ChangeState
triggerall = p2statetype != L && p2dist y > -70
triggerall = var(55) = 1 && p2dist x < 131 && p2dist x > 0
triggerall = (p2stateno != 1406 && p2stateno != 1506) || p2movetype != H
trigger1 = p2movetype != A && var(4) = 1
value = 300+ifelse(var(12)=1,90,var(12))+ifelse(var(12)=3,9,0)
[State -1]
type = ChangeState
triggerall = p2statetype != L && p2dist y > -70
triggerall = var(55) = 1
trigger1 = p2dist x < 103 && p2dist x > 0
trigger1 = (p2stateno = 1406 || p2stateno = 1506) && p2movetype = H
trigger1 = p2movetype != A && var(4) = 1
trigger2 = p2bodydist x < 5 && p2dist x > 0
trigger2 = p2movetype != A && p2dist y > -1
value = 300

[State 100, 4]
type = ChangeState
trigger1 = animtime = 0
value = 52
;---------------------------------------------------------------------------
; dust helper1
[Statedef 101]
type    = S
physics = N
anim = 12342
ctrl = 0
velset = 0,0

[State 100, 4]
type = posset
trigger1 = time = 0
y = 0

[State 3000]
type = projectile
trigger1 = time = 0
projanim = 101+ifelse(facing=-1,2,0)
offset = -31,-5
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 0
projanim = 101+ifelse(facing=-1,2,0)
offset = 46,-5
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 4
projanim = 101+ifelse(facing=-1,2,0)
offset = -7,3
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 6
projanim = 101+ifelse(facing=-1,2,0)
offset = 25,3
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 100, 4]
type = destroyself
trigger1 = time = 27
;---------------------------------------------------------------------------
; dust helper
[Statedef 102]
type    = S
physics = N
anim = 12342
ctrl = 0
velset = 0,0

[State 100, 4]
type = posset
trigger1 = time = 0
y = 0

[State 3000]
type = projectile
trigger1 = time = 0
projanim = 102+ifelse(facing=-1,2,0)
offset = -25,-4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 0
projanim = 102+ifelse(facing=-1,2,0)
offset = 23,-4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 4
projanim = 102+ifelse(facing=-1,2,0)
offset = -1,4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 100, 4]
type = destroyself
trigger1 = time = 27
;---------------------------------------------------------------------------
; dust helper
[Statedef 103]
type    = S
physics = N
anim = 12342
ctrl = 0
velset = 0,0

[State 100, 4]
type = posset
trigger1 = time = 0
y = 0

[State 3000]
type = projectile
trigger1 = time = 0
projanim = 102+ifelse(facing=-1,2,0)
offset = -25,-4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 0
projanim = 102+ifelse(facing=-1,2,0)
offset = 23,-4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 2
projanim = 102+ifelse(facing=-1,2,0)
offset = -31,-2
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 4
projanim = 102+ifelse(facing=-1,2,0)
offset = -1,4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 4
projanim = 102+ifelse(facing=-1,2,0)
offset = 33,4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 6
projanim = 102+ifelse(facing=-1,2,0)
offset = -9,4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 10
projanim = 102+ifelse(facing=-1,2,0)
offset = 49,0
projremovetime = 23
projsprpriority = 4
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 100, 4]
type = destroyself
trigger1 = time = 33
;---------------------------------------------------------------------------
; dust helper
[Statedef 104]
type    = S
physics = N
anim = 12342
ctrl = 0
velset = 0,0

[State 100, 4]
type = posset
trigger1 = time = 0
y = 0

[State 3000]
type = projectile
trigger1 = time = 0
projanim = 101+ifelse(facing=-1,2,0)
offset = -31,-5
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 0
projanim = 101+ifelse(facing=-1,2,0)
offset = 46,-5
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 4
projanim = 101+ifelse(facing=-1,2,0)
offset = -7,3
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 6
projanim = 101+ifelse(facing=-1,2,0)
offset = 25,3
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 3000]
type = projectile
trigger1 = time = 1
projanim = 106+ifelse(facing=-1,1,0)
offset = 37,-2
projremovetime = 21
projsprpriority = 4
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 3
projanim = 106+ifelse(facing=-1,1,0)
offset = -24,4
projremovetime = 21
projsprpriority = 4
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 5
projanim = 106+ifelse(facing=-1,1,0)
offset = 15,4
projremovetime = 21
projsprpriority = 4
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 9
projanim = 106+ifelse(facing=-1,1,0)
offset = -40,0
projremovetime = 21
projsprpriority = 4
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 100, 4]
type = destroyself
trigger1 = time = 30
;---------------------------------------------------------------------------
; dust helper
[Statedef 106]
type    = S
physics = N
anim = 12342
ctrl = 0
velset = 0,0

[State 100, 4]
type = posset
trigger1 = time = 0
y = 0

[State 3000]
type = projectile
trigger1 = time = 0
projanim = 101+ifelse(facing=-1,2,0)
offset = -32,3
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 8
projanim = 106+ifelse(facing=-1,1,0)
offset = 1,-4
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 16
projanim = 101+ifelse(facing=-1,2,0)
offset = 24,-3
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 24
projanim = 106+ifelse(facing=-1,1,0)
offset = 49,4
projremovetime = 21
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 100, 4]
type = destroyself
trigger1 = time = 45
;---------------------------------------------------------------------------
; dust helper
[Statedef 107]
type    = S
physics = N
anim = 12342
ctrl = 0
velset = 0,0

[State 100, 4]
type = posset
trigger1 = time = 0
y = 0

[State 3000]
type = projectile
trigger1 = time = 0
projanim = 108+ifelse(facing=-1,1,0)
offset = -40,-3
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 8
projanim = 108+ifelse(facing=-1,1,0)
offset = -16,-11
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 16
projanim = 108+ifelse(facing=-1,1,0)
offset = 8,-9
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 24
projanim = 108+ifelse(facing=-1,1,0)
offset = 32,-3
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 100, 4]
type = destroyself
trigger1 = time = 47
;---------------------------------------------------------------------------
; dust helper
[Statedef 108]
type    = S
physics = N
anim = 12342
ctrl = 0
velset = 0,0

[State 100, 4]
type = posset
trigger1 = time = 0
y = 0

[State 3000]
type = projectile
trigger1 = time = 0
projanim = 108+ifelse(facing=-1,1,0)
offset = -9,-4
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210
[State 3000]
type = projectile
trigger1 = time = 8
projanim = 108+ifelse(facing=-1,1,0)
offset = 27,-12
projremovetime = 23
projsprpriority = 3
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 100, 4]
type = destroyself
trigger1 = time = 31
;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 105]
type    = S
physics = N
anim = 105
sprpriority = 0
ctrl = 0
velset = 0,0

[State 100, 4]
type = changestate
trigger1 = time = 0 && var(55) = 0
trigger1 = (facing = 1 && var(2) > 0) || (facing = -1 && var(2) < 0)
value = 100

[State 100, 4]
type = velset
trigger1 = time = 1
x = const(velocity.run.back.x)

[State -2, 0]
type = posadd
trigger1 = pos y < 0 && animelem = 2,<0
y = ifelse(pos y + 2 <= 0,2,-pos y)

[State 260, 1]
type = HitBy
trigger1 = 1
value = SCA, AT

[State 100, 4]
type = velset
trigger1 = animelem = 2
y = -3

[State 100, 4]
type = veladd
trigger1 = animelem = 2,>0
y = .5

[State 100, 4]
type = ChangeState
trigger1 = command = "holddown" && var(55) = 0
value = 10
ctrl = 1

[State 100, 4]
type = ChangeState
trigger1 = animtime = 0
value = 52
;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type    = A
physics = N

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

[State 132, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

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

[State 132, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 132, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

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

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

[State 132, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
;trigger2 = !inguarddist
value = 140

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State 50, 2]
type = Changestate
triggerall = var(1) = 0
trigger1 = var(4) = 1 && command = "holdup" && var(55) = 0
trigger2 = var(55) = 1 && roundstate < 3 && pos y <= -50
trigger2 = p2dist y < 80 && vel y > 0 && random < 333
trigger2 = enemynear,numproj > 0 || (p2movetype = A && p2dist x > 100)
value = 54
;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3
;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

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

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = var(35) != 1000 && var(35) != 500 && var(35) != 750 && var(35) != 667
trigger2 = Time >= GetHitVar(hittime)
trigger3 = var(35) = 1000 || var(35) = 500 || var(35) = 750 || var(35) = 667
trigger3 = hitover
x = 0

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

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = var(35) != 1000 && var(35) != 500 && var(35) != 750 && var(35) != 667
trigger1 = Time >= GetHitVar(hittime)
trigger2 = var(35) = 1000 || var(35) = 500 || var(35) = 750 || var(35) = 667
trigger2 = hitover
value = 130
ctrl = 1
;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4
;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

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

[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = var(35) != 1000 && var(35) != 500 && var(35) != 750 && var(35) != 667
trigger2 = Time >= GetHitVar(hittime)
trigger3 = var(35) = 1000 || var(35) = 500 || var(35) = 750 || var(35) = 667
trigger3 = hitover
x = 0

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

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = var(35) != 1000 && var(35) != 500 && var(35) != 750 && var(35) != 667
trigger1 = Time >= GetHitVar(hittime)
trigger2 = var(35) = 1000 || var(35) = 500 || var(35) = 750 || var(35) = 667
trigger2 = hitover
value = 131
ctrl = 1
;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4
;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 170+ifelse(random<500,1,0)
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;--------------------------------------
; WIN
[Statedef 180]
type = S
ctrl = 0
sprpriority = 0

[State 180, 3]
type = ChangeState
trigger1 = time = 0 && roundstate = 0
value = 5600

[State 180, 3]
type = changestate
trigger1 = time = 0 && matchover
trigger1 = (random < 500 && command != "hold_a") || command = "hold_x"
value = 181

[State 180, 3]
type = changeanim
trigger1 = time = 0 && !matchover
value = 180

[State 180, 3]
type = changeanim
trigger1 = time = 0 && !matchover
trigger1 = (random < 500 && command != "hold_a") || command = "hold_x"
value = 181
[State 180, 3]
type = changeanim
trigger1 = time = 0 && matchover
value = 182

[State 183, 1]
type = AssertSpecial
trigger1 = anim = 180 && Time < 133
trigger2 = anim = 181 && Time < 100
trigger3 = anim = 182 && Time < 194
flag = RoundNotOver

[State 183, 1]
type = width
trigger1 = anim = 180 || anim = 182
value = 0,25

[State 52, 2]
type = Playsnd
trigger1 = anim = 180 && animelem = 3
value = s1,2
channel = 4

[State 52, 2]
type = Playsnd
trigger1 = anim = 182 && animelem = 3
value = s1,3
[State 52, 2]
type = Playsnd
trigger1 = anim = 182 && animelem = 12
value = s1,4
channel = 4
;--------------------------------------
; WIN1
[Statedef 181]
type = S
ctrl = 0

[State 1300, 5]
type = helper
trigger1 = time = 0 && frontedgedist > backedgedist
stateno = 182
id = 182
name = "kuroko"
pos = -backedgedist-50,0
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = time = 0 && frontedgedist < backedgedist
stateno = 182
id = 182
name = "kuroko"
pos = frontedgedist+50,0
ownpal = 1

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = Varadd
trigger1 = Time > 0 && anim = 186
var(4) = 1

[State 183, 1]
type = changeanim
trigger1 = numhelper(182) > 0
trigger1 = helper(182),anim = 185 && anim != 186
value = 186

[State 52, 2]
type = Playsnd
trigger1 = anim = 186
trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
value = s8,1

[State 52, 2]
type = Playsnd
trigger1 = anim = 186
trigger1 = animelem = 10
value = s8,2

[State 183, 1]
type = AssertSpecial
trigger1 = var(4) <= 200
flag = RoundNotOver
;--------------------------------------
; Kuroko
[Statedef 182]
type = S
ctrl = 0
anim = 183
sprpriority = -4

[State 183, 1]
type = turn
triggerall = time = 0
trigger1 = pos x > parent,pos x && facing = 1
trigger2 = pos x < parent,pos x && facing = -1

[State 183, 1]
type = posset
trigger1 = time = 0
y = -16
[State 183, 1]
type = velset
trigger1 = time = 0
x = 4

[State 183, 1]
type = changeanim
triggerall = time > 0 && anim != 184 && anim != 185
trigger1 = facing = 1 && pos x >= parent,pos x+(61*parent,facing)
trigger2 = facing = -1 && pos x <= parent,pos x+(61*parent,facing)
value = 184
[State 183, 1]
type = velset
trigger1 = anim = 184 && animelem = 18,<0
x = 0
y = 0.4
[State 183, 1]
type = posset
trigger1 = anim = 184 && animelem = 1
x = parent,pos x+(61*parent,facing)

[State 183, 1]
type = changeanim
trigger1 = anim = 184 && animtime = 0
value = 185
[State 183, 1]
type = velset
trigger1 = anim = 184 && animelem = 18
y = 0

[State 183, 1]
type = sprpriority
trigger1 = anim = 185 && animelem = 1
value = 1
[State 183, 1]
type = posset
trigger1 = anim = 185 && animelem = 1
y = 0
[State 183, 1]
type = turn
trigger1 = anim = 185 && animelem = 1 && facing != parent,facing

[State 52, 2]
type = Playsnd
trigger1 = anim = 185
trigger1 = animelem = 9
value = s8,3
;-------------------------------------------
;AI HELPER & for command input when in pause & stress
[Statedef 1234]
anim = 12342
ctrl = 0

[State 111, 1]
type = Turn
trigger1 = facing != 1;parent, facing

[State 111, 0]
type = parentvaradd
trigger1 = command = "s" && parent,var(55) = 0
trigger2 = parent,var(55) = 1 && parent,ctrl
trigger2 = gametime%600 = 0 && random < 500
var(57) = 1

[State 111, 0]
type = parentvarset
trigger1 = parent,var(30) != 0
var(30) = 0
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "FF" && parent,var(55) = 0
var(30) = 19
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "BB" && parent,var(55) = 0
var(30) = 20
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "x" && parent,var(55) = 0
var(30) = 1
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "y" && parent,var(55) = 0
var(30) = 2
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "sshoot" && parent,var(55) = 0
var(30) = 3
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "a" && parent,var(55) = 0
var(30) = 4
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "b" && parent,var(55) = 0
var(30) = 5
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "recovery" && parent,var(55) = 0
var(30) = 6
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "yun_x" && parent,var(55) = 0
var(30) = 7
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "yun_y" && parent,var(55) = 0
var(30) = 8
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "jubak_x" && parent,var(55) = 0
var(30) = 9
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "jubak_y" && parent,var(55) = 0
var(30) = 10
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "rekkoken_x" && parent,var(55) = 0
var(30) = 11
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "rekkoken_y" && parent,var(55) = 0
var(30) = 12
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "rekkoken_a" && parent,var(55) = 0
var(30) = 13
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "rekkoken_b" && parent,var(55) = 0
var(30) = 14
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "yul_a1" && parent,var(55) = 0
var(30) = 17
[State 111, 0]
type = parentvarset
trigger1 = parent,command = "yul_b1" && parent,var(55) = 0
var(30) = 18
[State 111, 0]
type = parentvarset
trigger1 = parent,var(55) = 0
trigger1 = parent,command = "yul_a" || parent,command = "yul_a2"
var(30) = 15
[State 111, 0]
type = parentvarset
trigger1 = parent,var(55) = 0
trigger1 = parent,command = "yul_b" || parent,command = "yul_b2"
var(30) = 16

[State 111, 0]
type = parentvarset
trigger1 = command = "yun_x" && parent,var(55) = 0
var(22) = 1
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yun_y" && parent,var(55) = 0
var(22) = 2
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "jubak_x" && parent,var(55) = 0
var(22) = 3
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "jubak_y" && parent,var(55) = 0
var(22) = 4
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "rekkoken_x" && parent,var(55) = 0
var(22) = 5
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "rekkoken_y" && parent,var(55) = 0
var(22) = 6
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "rekkoken_a" && parent,var(55) = 0
var(22) = 7
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "rekkoken_b" && parent,var(55) = 0
var(22) = 8
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_a" && parent,var(55) = 0
var(22) = 9
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_b" && parent,var(55) = 0
var(22) = 10
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_a1" && parent,var(55) = 0
var(22) = 11
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_b1" && parent,var(55) = 0
var(22) = 12
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_a2" && parent,var(55) = 0
var(22) = 13
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_b2" && parent,var(55) = 0
var(22) = 14
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_a3" && parent,var(55) = 0
var(22) = 15
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "yul_b3" && parent,var(55) = 0
var(22) = 16
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = command = "sshoot" && parent,var(55) = 0
var(22) = 17
ignorehitpause = 1

[State 111, 0]
type = parentvaradd
trigger1 = parent,var(23) > 0
var(23) = -1
ignorehitpause = 1
[State 111, 0]
type = parentvarset
trigger1 = parent,var(22) != 0
trigger1 = parent,var(23) = 0
var(22) = 0
ignorehitpause = 1

[State -2, 0]
type = parentvarset
trigger1 = roundstate > 1
trigger1 = parent,var(2) < -1
var(2) = -1
[State -2, 0]
type = parentvarset
trigger1 = roundstate > 1
trigger1 = parent,var(2) > 1
var(2) = 1
[State -2, 0]
type = parentvarset
triggerall = roundstate > 1 && parent,var(55) = 0
triggerall = parent,var(2) <= -1
trigger1 = command = "B" && facing = 1
trigger2 = command = "F" && facing = -1
var(2) = -2
[State -2, 0]
type = parentvarset
triggerall = roundstate > 1 && parent,var(55) = 0
triggerall = parent,var(2) > -1
trigger1 = command = "B" && facing = 1
trigger2 = command = "F" && facing = -1
var(2) = -1
[State -2, 0]
type = parentvarset
triggerall = roundstate > 1 && parent,var(55) = 0
triggerall = parent,var(2) >= 1
trigger1 = command = "F" && facing = 1
trigger2 = command = "B" && facing = -1
var(2) = 2
[State -2, 0]
type = parentvarset
triggerall = roundstate > 1 && parent,var(55) = 0
triggerall = parent,var(2) < 1
trigger1 = command = "F" && facing = 1
trigger2 = command = "B" && facing = -1
var(2) = 1

[State -2, 1] ;stress system
type = parentvaradd
trigger1 = parent,prevstateno != 3000
trigger1 = roundstate > 1 && parent,stateno != [150,155]
trigger1 = parent,var(27)-parent,life > 0 && parent,var(27)-parent,life < 20
trigger1 = parent,gethitvar(animtype) < 2 || parent,time != 1 || parent,gethitvar(hitcount) >= 2
var(51) = ceil(10*(2.5-parent,var(51)/500.0)*ifelse((parent,gethitvar(hitcount))>1&&(parent,gethitvar(hitcount))<23,0.8,1))
[State -2, 1]
type = parentvaradd
trigger1 = parent,prevstateno != 3000
trigger1 = roundstate > 1 && parent,stateno != [150,155]
trigger1 = parent,var(27)-parent,life > 20 && parent,var(27)-parent,life < 30
trigger1 = parent,gethitvar(animtype) < 2 || parent,time != 1 || parent,gethitvar(hitcount) >= 2
var(51) = ceil(20*(3-parent,var(51)/450.0)*ifelse((parent,gethitvar(hitcount))>1,0.9,1))
[State -2, 1]
type = parentvaradd
trigger1 = parent,prevstateno != 3000
trigger1 = roundstate > 1 && parent,stateno != [150,155]
trigger1 = parent,var(27)-parent,life >= 30 && parent,var(27)-parent,life < 50
trigger1 = parent,gethitvar(animtype) < 2 || parent,time != 1 || parent,gethitvar(hitcount) >= 2
var(51) = ceil(33*(4-parent,var(51)/350.0)*ifelse((parent,gethitvar(hitcount))>2,0.9,1)*ifelse((enemynear,hitcount)=2,0.1,1))
[State -2, 1]
type = parentvaradd
trigger1 = parent,prevstateno != 3000
trigger1 = roundstate > 1 && parent,stateno != [150,155]
trigger1 = parent,var(27)-parent,life >= 50 && parent,var(27)-parent,life < 100
trigger1 = parent,gethitvar(animtype) < 2 || parent,time != 1 || parent,gethitvar(hitcount) >= 2
var(51) = ceil(68*(3-parent,var(51)/500.0)*ifelse((parent,gethitvar(hitcount))>1&&(parent,gethitvar(hitcount))<5,1.2-(parent,gethitvar(hitcount)*0.2),ifelse((parent,gethitvar(hitcount))>4,0.2,1)))
[State -2, 1]
type = parentvaradd
triggerall = parent,prevstateno != 3000
triggerall = roundstate > 1 && parent,stateno != [150,155]
trigger1 = parent,var(27)-parent,life >= 100 && parent,var(27)-parent,life < 160
trigger2 = parent,var(27)-parent,life > 0 && parent,gethitvar(animtype) >= 2 && parent,time = 1 && parent,gethitvar(hitcount) < 2
var(51) = ceil(103*(3-parent,var(51)/450.0)*ifelse((parent,gethitvar(hitcount))>1,0.9,1)+(parent,var(27)-parent,life-100)/4)
[State -2, 1]
type = parentvaradd
trigger1 = parent,prevstateno != 3000
trigger1 = roundstate > 1 && parent,stateno != [150,155]
trigger1 = parent,var(27)-parent,life >= 160
trigger1 = parent,gethitvar(animtype) < 2 || parent,time != 1 || parent,gethitvar(hitcount) >= 2
var(51) = ceil(103*(3-parent,var(51)/450.0)*ifelse((parent,gethitvar(hitcount))>1,0.9,1)+(parent,var(27)-parent,life-100)/2)

[State -2, 1]
type = parentvarset
trigger1 = parent,var(27) != parent,life
var(27) = parent,life
[State -2, 1]
type = parentvaradd
trigger1 = parent,var(52) < parent,var(51)
var(52) = 10-ifelse((parent,var(52))>250,ceil(parent,var(52)/150),0)

[State -2, 1]
type = parentvarset
trigger1 = parent,var(51) > 1000
var(51) = 1000
[State -2, 1]
type = parentvarset
trigger1 = parent,var(52) > parent,var(51)
var(52) = parent,var(51)

[State -2, 1]
type = parentvarset
trigger1 = parent,var(54) = 0 && parent,stateno = 3100
var(54) = 1
[State 1300, 5]
type = explod
trigger1 = parent,var(54) = 1 && parent,stateno != 3100 && parent,stateno != 5600
anim = 12342
id = 3205
pos = 0,0
ignorehitpause = 1
removetime = 10
[State -2, 1]
type = parentvarset
trigger1 = parent,var(54) = 1 && parent,stateno != 3100
var(54) = 2
[State -2, 1]
type = parentvarset
trigger1 = parent,var(54) = 2 && numexplod(3205) = 0
var(54) = 3
[State -2, 1]
type = parentvarset
trigger1 = parent,var(54) = 3 && parent,var(53) = 0 && parent,stateno != 3000
var(54) = 4
[State -2, 1]
type = parentvarset
trigger1 = parent,var(54) = 4 && numexplod(3209) > 0
var(54) = 5
[State -2, 1]
type = parentvarset
trigger1 = parent,var(54) = 5 && numexplod(3211) = 0
var(54) = 0

[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3200) = 0 && numexplod(3210) = 0
trigger1 = time > 0 && parent,var(54) = 0 && parent,stateno != 5600
anim = 3200
id = 3200
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3201) = 0
trigger1 = time > 0 && parent,var(54) = 0 && parent,stateno != 5600
anim = 3201
id = 3201
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 97
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3202) = 0
trigger1 = time > 0 && parent,var(54) = 0 && parent,stateno != 5600
anim = 3202
id = 3202
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 98
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3200) = 0 && numexplod(3210) = 0
trigger1 = time > 0 && parent,var(54) = 0 && parent,stateno != 5600
anim = 3200
id = 3200
postype = right
pos = -139-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3201) = 0
trigger1 = time > 0 && parent,var(54) = 0 && parent,stateno != 5600
anim = 3201
id = 3201
postype = right
pos = -139-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 97
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3202) = 0
trigger1 = time > 0 && parent,var(54) = 0 && parent,stateno != 5600
anim = 3203
id = 3202
postype = right
pos = -76-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 98
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(32022) = 0
trigger1 = parent,var(51) > 0
trigger1 = time > 0 && parent,var(54) = 0 && parent,stateno != 5600
anim = 3203
id = 32022
postype = right
pos = -75-parent,var(56),30+parent,var(59)
scale = 0.02
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 98
ownpal = 1
removetime = -1
bindtime = -1

[State 1300, 5]
type = removeexplod
trigger1 = parent,var(54) > 0 && numexplod(3201) > 0
id = 3201
[State 1300, 5]
type = removeexplod
trigger1 = parent,var(54) > 0 && numexplod(3202) > 0
id = 3202
[State 1300, 5]
type = removeexplod
trigger1 = parent,var(54) > 0 && numexplod(32022) > 0
id = 32022

[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3204) = 0
trigger1 = time > 0 && parent,var(54) = 1 && parent,stateno != 5600
anim = 3204
id = 3204
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 98
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3204) = 0
trigger1 = time > 0 && parent,var(54) = 1 && parent,stateno != 5600
anim = 3205
id = 3204
postype = right
pos = -76-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 98
ownpal = 1
removetime = -1
bindtime = -1

[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3206) = 0
trigger1 = time > 0 && parent,var(54) = 2 && parent,stateno != 5600
anim = 3206
id = 3206
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3206) = 0
trigger1 = time > 0 && parent,var(54) = 2 && parent,stateno != 5600
anim = 3206
id = 3206
postype = right
pos = -139-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = numexplod(3203) = 0
trigger1 = time > 0 && parent,var(54) = 2 && parent,stateno != 5600
anim = 12342
id = 3203
pos = 0,0
ignorehitpause = 1
removetime = 117

[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3203) = 0 && numexplod(3207) = 0
trigger1 = time > 0 && parent,var(54) = 3 && parent,stateno != 5600
anim = 3207
id = 3207
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3203) = 0 && numexplod(3207) = 0
trigger1 = time > 0 && parent,var(54) = 3 && parent,stateno != 5600
anim = 3207
id = 3207
postype = right
pos = -139-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
removetime = -1
bindtime = -1

[State 1300, 5]
type = removeexplod
trigger1 = parent,var(54) > 1 && numexplod(3200) > 0
id = 3200
[State 1300, 5]
type = removeexplod
trigger1 = parent,var(54) > 1 && numexplod(3204) > 0
trigger1 = numexplod(3205) = 0
id = 3204
[State 1300, 5]
type = removeexplod
trigger1 = parent,var(54) > 3 && numexplod(3207) > 0
id = 3207

[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3203) = 0 && numexplod(3208) = 0
trigger1 = time > 0 && parent,var(54) = 4 && parent,stateno != 5600
anim = 3208
id = 3208
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3203) = 0 && numexplod(3208) = 0
trigger1 = time > 0 && parent,var(54) = 4 && parent,stateno != 5600
anim = 3208
id = 3208
postype = right
pos = -139-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 99
ownpal = 1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 1 && numexplod(3203) = 0 && numexplod(3209) = 0
trigger1 = time > 0 && parent,var(54) = 4 && parent,stateno != 5600
anim = 3209
id = 3209
postype = left
pos = 75+parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 97
ownpal = 1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = parent,teamside = 2 && numexplod(3203) = 0 && numexplod(3209) = 0
trigger1 = time > 0 && parent,var(54) = 4 && parent,stateno != 5600
anim = 3209
id = 3209
postype = right
pos = -139-parent,var(56),30+parent,var(59)
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 97
ownpal = 1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = numexplod(3203) = 0 && numexplod(3210) = 0
trigger1 = time > 0 && parent,var(54) = 4 && parent,stateno != 5600
anim = 12342
id = 3210
pos = 0,0
shadow = 0,0,0
removetime = 65
ignorehitpause = 1
[State 1300, 5]
type = explod
trigger1 = numexplod(3203) = 0 && numexplod(3211) = 0
trigger1 = time > 0 && parent,var(54) = 4 && parent,stateno != 5600
anim = 12342
id = 3211
pos = 0,0
shadow = 0,0,0
removetime = 58
ignorehitpause = 1

[State -4, 1]
type = modifyexplod
trigger1 = numexplod(3202) > 0 && parent,teamside = 1
trigger1 = parent,var(52) < 1000
id = 3202
scale = parent,var(52)/1007.0,1
ignorehitpause = 1
[State -4, 1]
type = modifyexplod
trigger1 = numexplod(3202) > 0 && parent,teamside = 1
trigger1 = parent,var(52) >= 1000
id = 3202
scale = parent,var(52)/1000.0,1
ignorehitpause = 1
[State -4, 1] 
type = modifyexplod
trigger1 = numexplod(3202) > 0 && parent,teamside = 2
id = 3202
scale = parent,var(52)/1000.0,1
ignorehitpause = 1

[State 112, 2]
type = ParentVarSet
triggerall = time > 0
triggerall = parent,var(58) < 0 || parent,var(58) > 0
triggerall = parent,var(29) = 0
triggerall = parent, movetype != H
triggerall = parent, RoundState = 2
trigger1 = parent, command = "x"
trigger2 = parent, command = "y"
trigger3 = parent, command = "z"
trigger4 = parent, command = "a"
trigger5 = parent, command = "b"
trigger6 = parent, command = "c"
trigger7 = parent, command = "s"
trigger8 = parent, command = "holdfwd"
trigger9 = parent, command = "holdback"
trigger10 = parent, command = "holdup"
trigger11 = parent, command = "holddown"
var(55) = 1

[State 113, 3]
type = ParentVarSet
triggerall = parent, var(55) = 1 && parent,var(29) = 0
triggerall = parent, RoundState = 2
trigger1 = command = "x" && parent, command = "x"
trigger2 = command = "y" && parent, command = "y"
trigger3 = command = "z" && parent, command = "z"
trigger4 = command = "a" && parent, command = "a"
trigger5 = command = "b" && parent, command = "b"
trigger6 = command = "c" && parent, command = "c"
trigger7 = command = "s" && parent, command = "s"
trigger8 = (parent,facing = facing && command = "holdfwd" && parent, command = "holdfwd") || (parent,facing != facing && command = "holdback" && parent, command = "holdfwd")
trigger9 = (parent,facing = facing && command = "holdback" && parent, command = "holdback") || (parent,facing != facing && command = "holdfwd" && parent, command = "holdback")
trigger10 = command = "holdup" && parent, command = "holdup"
trigger11 = command = "holddown" && parent, command = "holddown"
var(55) = 0

[State 112, 2]
type = ParentVarSet
triggerall = time > 0
triggerall = parent, RoundState = 2
trigger1 = parent, command = "x"
trigger2 = parent, command = "y"
trigger3 = parent, command = "z"
trigger4 = parent, command = "a"
trigger5 = parent, command = "b"
trigger6 = parent, command = "c"
trigger7 = parent, command = "s"
trigger8 = parent, command = "holdfwd"
trigger9 = parent, command = "holdback"
trigger10 = parent, command = "holdup"
trigger11 = parent, command = "holddown"
var(29) = 1
;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

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

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) != 1
value = 5030

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) = 1
value = 5050
[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
;trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(yvel) != 0
trigger1 = gethitvar(fall) = 0
value = 5050+ifelse(gethitvar(groundtype) !=1,5,0)

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

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

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

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

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

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

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5001]
type    = S
movetype= H
physics = S

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

[State -2, 0]
type = posadd
trigger1 = pos y < 0
y = ifelse(pos y + 10 <= 0,10,-pos y)

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

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

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

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

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

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

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) != 1
value = 5030

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) = 1
value = 5050
[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
;trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(yvel) != 0
trigger1 = gethitvar(fall) = 0
value = 5050+ifelse(gethitvar(groundtype) !=1,5,0)

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

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

[State 5010, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5011 ;HITC_SLIDE

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

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

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= H
physics = C

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

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

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

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

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

[State 5011, 6]
type = ChangeState
trigger1 = HitOver
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = gethitvar(yvel) != 0
trigger1 = gethitvar(fall) = 0
value = 5050

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
triggerall = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5041+ifelse(var(57)=1,1,0)

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) != 1
value = 5030+ifelse(gethitvar(yvel) !=0&&gethitvar(fall)=0,25,0)

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) = 1
value = 5050

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

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

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

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

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

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 0  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = (anim = 5041 || anim = 5042) && time = 8
trigger3 = (anim = 5050 || anim = 5055) && time > 7 && vel y >= 0
value = 5035 ;HITA_UP (transition)

[State 5040, 1]
type = nothitby
trigger1 = (anim = 5041 || anim = 5042) && time > 7
value = SCA
;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = time > 0
y = GetHitVar(yaccel)

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 0  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 0  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL
;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0 && anim = 5035
trigger1 = Anim != 5040 && anim != 5045
trigger2 = Time = 0
trigger2 = Anim != 5035 && Anim != 5040 && anim != 5045 && Anim != 5041 && anim != 5042
value = 5040+ifelse(var(57)=1,5,0)

[State 5040, 2]
type = ChangeAnim
trigger1 = anim = 5041 && animtime = 0
value = 5040
[State 5040, 2]
type = ChangeAnim
trigger1 = anim = 5042 && animtime = 0
value = 5045

[State 5040, 1]
type = assertspecial
trigger1 = 1
flag = noairguard
ignorehitpause = 1

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State 50, 2]
type = Changestate
triggerall = var(1) = 0 && command = "holdup" && var(55) = 0 && var(4) = 1
trigger1 = anim = 5040 && animelem = 2,>=0
trigger2 = anim = 5045 && animelem = 3,>=0
value = 54
;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = Time = 0     ;If no transition anim
trigger1 = Anim != 5035 && anim != 5030 && anim != 5050
trigger1 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 1]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim = 5030
value = 5055

[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
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;HIT_BOUNCE
;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

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

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
type = ChangeState
value = 5110
;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5080, 1] ;Set default anim
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 3] ;If 5090 doesn't exist, default to 5030
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] ;Freeze
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5081 ;HITL_SLIDE

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 5030 ;HITA_UP
;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N
ctrl = 0

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

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

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

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

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

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

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

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0-ifelse(var(57)=1,10,0), 0
under = sysvar(1) <= 14

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

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
;value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)
value = s1,1-ifelse(var(57)=1,1,0)

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

[State 5100, 12]
type = ChangeState
trigger1 = var(57) != 1 && time >= 4
trigger2 = var(57) = 1 && time >= 7
value = 5101

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

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= H
physics = N

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

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

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

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

[State 5050, 3] 
type = VelAdd
trigger1 = gethitvar(yaccel) >= 0.4
y = GetHitVar(yaccel)

[State 5050, 3] 
type = VelAdd
trigger1 = gethitvar(yaccel) < 0.4
y = .4

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15;12
type = ChangeState
value = 5110
;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N
ctrl = 0

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

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0 && (vel y != 0 || prevstateno = 5100)
value = s1,1-ifelse(var(57)=1,1,0)
[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0 && (vel y != 0 || prevstateno = 5100)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0 && alive
trigger1 = prevstateno = 5101 || prevstateno = 5081 || anim = 5160 || anim = 5165
sysvar(0) = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

[State 5110, 0]
type = changestate
trigger1 = Time = 0 && alive
trigger1 = prevstateno = 5101 || prevstateno = 5081 || anim = 5160 || anim = 5165
value = 5120
[State 5110, 0]
type = changestate
trigger1 = (anim = 5170 || anim = 6170) && animtime = 0 && alive
value = 5120

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5110,5119]
trigger1 = prevstateno != 5101 && prevstateno != 5081 && anim != 5160 && anim != 5165
trigger2 = vel y != 0 || prevstateno = 5100
value = 5170+ifelse(var(57)=1,1000,0)
[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
trigger1 = time = 0 && anim != 5170 && anim != 6170
trigger1 = prevstateno = 5101 || prevstateno = 5081 || anim = 5160 || anim = 5165
trigger1 = anim != [5110,5119]
value = 5110

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
trigger1 = AnimTime = 0
trigger2 = SysVar(0) && prevstateno != 5071 && prevstateno != 5100
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) && prevstateno != 5071
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
triggerall = SysVar(0)
triggerall = Time = 0
trigger1 = !alive
trigger2 = prevstateno != 5101 && prevstateno != 5081 && anim != 5160 && anim != 5165
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85
;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N
velset = 0,0

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120+ifelse(var(57)=1,5,0)

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

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

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

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

[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 73 && p2dist y > -100 && p2dist x > -72
triggerall = var(52) < 1000
trigger1 = p2life <= 44 && random < 500
trigger2 = backedgedist < 23 && random < 200
value = 1800
[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 73 && p2dist y > -100 && p2dist x > -72
triggerall = var(52) < 1000
trigger1 = p2life <= 44 && random < 100
trigger2 = random < 50
value = 1810
[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 120 && p2dist y > -120 && p2dist x > -77
triggerall = p2statetype != C && var(52) < 1000
trigger1 = p2life <= 44 && random < 100
trigger2 = random < 50
value = 1900
[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 77 && p2dist y > -80 && p2dist x > -77
triggerall = p2statetype != C && var(52) < 1000
trigger1 = p2life <= 44 && random < 100
trigger2 = random < 50
value = 1910
[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 80 && p2dist y > -80
triggerall = var(52) < 1000 && backedgedist > 80 && p2dist x > 0
trigger1 = random < 150
value = 105
[State 5120, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
[Statedef 5200]
type    = A
movetype= H
physics = N

[State 5200, 1] ;Change anim if done with transition
type = ChangeAnim
trigger1 = Anim = 5035
trigger1 = AnimTime = 0
value = 5050

[State 5200, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5200, 3]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5201
;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S
movetype= I
physics = S
anim = 5200

[State 5210, 2]
type = Turn
trigger1 = Time = 0
trigger1 = vel X > 0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
value = s3,0
channel = 4

[State 5210, 1]
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0

[State 5201, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5201, 2]
type = VelSet
trigger1 = Time >= 0
trigger1 = Time < 7
x = -5.5

[State 5201, 3]
type = PosSet
trigger1 = Time = 0
y = 0

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

;[State 5201, 6]
;type = GameMakeAnim
;trigger1 = Time = 1
;value = 60
;pos = 0, 0
;under = 1

[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 73 && p2dist y > -100 && p2dist x > -72
triggerall = var(52) < 1000
trigger1 = p2life <= 44 && random < 500
trigger2 = backedgedist < 23 && random < 200
value = 1800
[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 73 && p2dist y > -100 && p2dist x > -72
triggerall = var(52) < 1000
trigger1 = p2life <= 44 && random < 100
trigger2 = random < 50
value = 1810
[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 120 && p2dist y > -120 && p2dist x > -77
triggerall = p2statetype != C && var(52) < 1000
trigger1 = p2life <= 44 && random < 100
trigger2 = random < 50
value = 1900
[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1 && p2movetype = A && p2dist x < 77 && p2dist y > -80 && p2dist x > -77
triggerall = p2statetype != C && var(52) < 1000
trigger1 = p2life <= 44 && random < 100
trigger2 = random < 50
value = 1910
[State 5201, 6]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 5210, 1]
type = varadd
trigger1 = Time = 0 && var(31) < 2
var(31) = 1

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[State 5210, 1] 
type = VelMul
trigger1 = Time = 0
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = Time = 0
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = Time = 0
trigger1 = Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = Time = 0
trigger1 = Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = Time = 0
trigger1 = Vel Y > -2
y = -1

[State 5210, 2] ;Go up
type = VelAdd
trigger1 = Time = 0
trigger1 = Command = "holdup"
y = -2

[State 5210, 2] ;Go down
type = VelAdd
trigger1 = Time = 0
trigger1 = Command = "holddown"
y = 1.5

[State 5210, 2] ;Go fwd
type = VelMul
trigger1 = Time = 0
trigger1 = Command = "holdfwd"
x = 1

[State 5210, 2] ;Go back
type = VelAdd
trigger1 = Time = 0
trigger1 = Command = "holdback"
x = -1

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0 && var(31) < 2
value = SCA
time = 20

[State 5210, 3]
type = NotHitBy
trigger1 = var(31) >= 2
value = SCA

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 0
y = .35

[State 5210, 1]
type = varset
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
var(31) = 0

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1
;---------------------------------------
; turn
[Statedef 249]
type = S
physics = S
sprpriority = 0
ctrl = 1

[State 0, 1]
type = turn
trigger1 = time = 0

[State 0, 1]
type = Changestate
trigger1 = time = 1
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; roll fwd
[Statedef 1300]
type = S
ctrl = 0
anim = 1300
velset = 3.5,0
sprpriority = -2

[State 250, 4] 
type = Afterimage
trigger1 = Time = 3
time = 2
length = 7
PalBright   =   0,  0,  0
PalContrast = 255,255,255
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 2

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time > 2 && time < 10
time = 2

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s3,0
channel = 4

[State 260, 1]
type = HitBy
trigger1 = animtime < -6
value = SCA , AT

[State 260, 5]
type = PlayerPush
trigger1 = animtime < -2
value = 0

[State 260, 7]
type = ChangeState
trigger1 = var(55) = 1 && facing != enemynear,facing
trigger1 = AnimTime = 0
trigger1 = p2statetype != L
trigger1 = p2movetype = A
trigger1 = p2dist X < 0
trigger1 = p2bodydist X >= -61
trigger1 = random <= 900
value = 350

[State 0, 1]
type = velset
trigger1 = animtime = 0
x = 0
[State 0, 1]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; roll back
[Statedef 1310]
type = S
ctrl = 0
anim = 1310
velset = -3.5,0
sprpriority = -2

[State 250, 4] 
type = Afterimage
trigger1 = Time = 3
time = 2
length = 7
PalBright   =   0,  0,  0
PalContrast = 255,255,255
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 2

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time > 2 && time < 10
time = 2

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s3,0
channel = 4

[State 260, 1]
type = HitBy
trigger1 = animtime < -6
value = SCA , AT

[State 260, 5]
type = PlayerPush
trigger1 = animtime < -2
value = 0

[State 0, 1]
type = velset
trigger1 = animtime = 0
x = 0
[State 0, 1]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]
type = S
ctrl = 0
anim = 5500
velset = 0,0

[State 9001, 1]
type = posset
trigger1 = teamside = 2
x = -4
;---------------------------------------------------------------------------
[Statedef 5600];ENDING
type = S
ctrl = 0
anim = 12342
velset = 0,0

[State 1300, 5]
type = explod
trigger1 = time = 0
anim = 5530
postype = left
pos = 102,75
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 0
ownpal = 1
removetime = -1

[State 1300, 5]
type = explod
trigger1 = time = 57
anim = 5531
postype = left
pos = 102,75
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 1
ownpal = 1
removetime = -1
;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 1] ;Clear all int variables
type = VarRangeSet
trigger1 = roundno = 1
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = roundno = 1
fvalue = 0

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0+ifelse(var(57)=0,0,2) && Anim != 5
trigger1 = time = 0 || animtime = 0
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0+ifelse(var(57)=0,0,2)
;------------------------------------
; STAND_x close
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(210) > 0 && movehit > 0
trigger1 = target(210),alive = 0 && target(210),stateno != [8300,8307]
trigger1 = target(210),stateno != 5101 && target(210),stateno != 5110
trigger1 = target(210),stateno != 5100 && target(210),stateno != 5150
value = 8300
id = 210
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(210) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s2,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 31
id = 210
pausetime = 10,10
animtype = L
guardflag = MA
sparkno = s7010+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7051+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-62+ifelse(p2dist y < 0,ceil(p2dist y/3),0)+ifelse(p2statetype=C,2,0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 10
ground.hittime  = 10
guard.slidetime = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.3
ground.velocity = -4.1
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(20*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
triggerall = p2statetype != A
triggerall = var(55) = 1 && time > 3 && movehit > 0
triggerall = p2bodydist X <= 20 && P2dist X > 0
trigger1 = random < 900
value = 210+ifelse(random<500,20,0)
[State 200, 4]
type = ChangeState
triggerall = p2statetype != A
triggerall = var(55) = 1 && time > 3 && movehit > 0
triggerall = p2bodydist X > 20
trigger1 = random < 900
value = 220

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_x
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(220) > 0 && movehit > 0
trigger1 = target(220),alive = 0 && target(220),stateno != [8300,8307]
trigger1 = target(220),stateno != 5101 && target(220),stateno != 5110
trigger1 = target(220),stateno != 5100 && target(220),stateno != 5150
value = 8300
id = 220
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(220) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s2,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 31
id = 220
pausetime = 10,10
animtype = L
guardflag = MA
sparkno = s7010+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7051+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-62+ifelse(p2dist y < 0,ceil(p2dist y/3),0)+ifelse(p2statetype=C,2,0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 10
ground.hittime  = 10
guard.slidetime = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.3
ground.velocity = -4.1
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(20*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
triggerall = p2statetype != A
triggerall = var(55) = 1 && time > 3 && movehit > 0
trigger1 = random < 500
value = 220
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_a close
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(230) > 0 && movehit > 0
trigger1 = target(230),alive = 0 && target(230),stateno != [8300,8307]
trigger1 = target(230),stateno != 5101 && target(230),stateno != 5110
trigger1 = target(230),stateno != 5100 && target(230),stateno != 5150
value = 8300
id = 230
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(230) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,0
channel = 4

[State 230, 1]
type = width
trigger1 = animelem = 2,>= 0 && animelem = 3,<0
trigger2 = animelem = 4,>= 0 && animelem = 5,<0
value = 15
[State 230, 1]
type = width
trigger1 = animelem = 3,>= 0 && animelem = 4,<0
value = 30

[State 200, 3]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage    = 84
id = 230
pausetime = 11,11
animtype = M
guardflag = MA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7060+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = -20+ifelse(p2bodydist x>25,ceil(ifelse(p2bodydist x>60,35,p2bodydist x-25)),0),-12+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,1
guardsound = s3,6
ground.type = low
air.type = high
givepower = 0,0
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.velocity = -7.5
ground.velocity = -7.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -12
guard.cornerpush.veloff = -11
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = time = 5 && p2dist x > 0
trigger1 = p2statetype = S && random < 800 && p2dist x < 57 && p2dist y > -1
value = 1810

[State 10, 2]
type = ChangeState
triggerall = time = 5 && var(55) = 1 && movehit > 0
triggerall = p2dist y > -50 && p2dist x < 100
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
triggerall = p2movetype = H
trigger1 = random < 500
value = 1400+ifelse(random<500,100,0)

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(54*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_a
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(240) > 0 && movehit > 0
trigger1 = target(240),alive = 0 && target(240),stateno != [8300,8307]
trigger1 = target(240),stateno != 5101 && target(240),stateno != 5110
trigger1 = target(240),stateno != 5100 && target(240),stateno != 5150
value = 8300
id = 240
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(240) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = posadd
trigger1 = time = 1
x = 16

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 84
id = 240
pausetime = 11,11
animtype = M
guardflag = MA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-60+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.velocity = -7.5
ground.velocity = -7.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -12
guard.cornerpush.veloff = -11
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(54*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 10, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0 && p2dist y > -1
triggerall = time = 5 && p2dist x > 0 && random < 800
trigger1 = p2statetype = S && p2dist x < 99
trigger2 = p2statetype = C && p2dist x < 78
value = 1810

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_y close
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 200
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(200) > 0 && movehit > 0
trigger1 = target(200),alive = 0 && target(200),stateno != [8300,8307]
trigger1 = target(200),stateno != 5101 && target(200),stateno != 5110
trigger1 = target(200),stateno != 5100 && target(200),stateno != 5150
value = 8300
id = 200
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(200) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s2,1

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 230, 1]
type = width
trigger1 = animelem = 2,>= 0 && animelem = 3,<0
trigger2 = animelem = 6,>= 0 && animelem = 7,<0
value = 5
[State 230, 1]
type = width
trigger1 = animelem = 3,>= 0 && animelem = 4,<0
trigger2 = animelem = 5,>= 0 && animelem = 6,<0
value = 10
[State 230, 1]
type = width
trigger1 = animelem = 4,>= 0 && animelem = 5,<0
value = 20

[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 6
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(13) != 1 || (p2stateno != 1406 && p2stateno != 1506) || var(34) = 1
trigger1 = command != "hold_s" && (command = "holdfwd" || command = "holdback") && var(55) = 0
trigger2 = var(55) = 1
trigger2 = facing != enemynear,facing || (facing = enemynear,facing && random < 500)
attr = S, NT
ID = 800+ifelse(var(57)=1,10,0)
hitflag = M-
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 801+ifelse(var(57)=1,10,0)
p2stateno = 805+ifelse(var(57)=1,10,0)
p2facing = 1
[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 6
triggerall = (numhelper(1400) > 0 || numhelper(1500) > 0) && var(13) = 1 && (p2stateno = 1406||p2stateno = 1506) && var(34) = 0
trigger1 = command != "hold_s" && (command = "holdfwd" || command = "holdback") && var(55) = 0
trigger2 = var(55) = 1
trigger2 = facing != enemynear,facing || (facing = enemynear,facing && random < 500)
attr = S, NT
ID = 800+ifelse(var(57)=1,10,0)
hitflag = M
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 801+ifelse(var(57)=1,10,0)
p2stateno = 805+ifelse(var(57)=1,10,0)
p2facing = 1
[State 850, 1]
type = HitDef
trigger1 = time = 1

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

[State 200, 3]
type = movehitreset
trigger1 = animelem = 3 || animelem = 4
[State 200, 3]
type = HitDef
trigger1 = animelem = 3 || animelem = 4
attr = S, NA
damage    = ifelse((animelem=3),71,44)
id = 200
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7060+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = -10+ifelse(p2bodydist x>25,ceil(ifelse(p2bodydist x>50,25,p2bodydist x-25)),0),-52-ifelse((animelem=4),26,0)+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,2
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9-ifelse((animelem=4),2,0)
ground.velocity = -13
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -20.5+ifelse((animelem=4),6.5,0)
guard.cornerpush.veloff = -12.1-ifelse((animelem=4),1.7,0)
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && hitpausetime = 15
var(51) = ceil(46*(2-var(51)/690.0))
ignorehitpause = 1

[State 10, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0 && p2dist x > 0
triggerall = time = 9 || time = 11
trigger1 = p2statetype = S && random < 800 && p2dist x < 55 && p2dist y > -1
value = 1810

[State 10, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = time = 9 || time = 11
trigger1 = p2statetype = A && random < 100
value = 1900
[State 10, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = time = 9 || time = 11
trigger1 = p2life <= 44 && p2statetype = S && random < 900 && p2dist x < 73 && p2dist y > -1
trigger2 = p2statetype = A && random < 100
value = 1800
[State 10, 2]
type = ChangeState
triggerall = time = 11 && var(55) = 1 && movehit > 0
triggerall = p2dist y > -50 && p2dist x < 100
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
triggerall = p2movetype = H
trigger1 = random < 500
value = 1400+ifelse(random<500,100,0)
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_y
[Statedef 260]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 260
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(260) > 0 && movehit > 0
trigger1 = target(260),alive = 0 && target(260),stateno != [8300,8307]
trigger1 = target(260),stateno != 5101 && target(260),stateno != 5110
trigger1 = target(260),stateno != 5100 && target(260),stateno != 5150
value = 8300
id = 260
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(260) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 230, 1]
type = width
trigger1 = animelem = 3,>=0 && animelem = 4,<0
value = 0,20
[State 230, 1]
type = posadd
trigger1 = animelem = 3
x = 20
[State 230, 1]
type = posadd
trigger1 = animelem = 4
x = -20

[State 200, 3]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage    = 101
ID = 260
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-59+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,2
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -9.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -15
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
triggerall = var(55) = 1 && movehit > 0
trigger1 = random < 900 && p2dist x < 51
trigger2 = random < 500 && p2dist x < 46
value = 1600

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(40*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_b close
[Statedef 270]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 270
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(270) > 0 && movehit > 0
trigger1 = target(270),alive = 0 && target(270),stateno != [8300,8307]
trigger1 = target(270),stateno != 5101 && target(270),stateno != 5110
trigger1 = target(270),stateno != 5100 && target(270),stateno != 5150
value = 8300
id = 270
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(270) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = posadd
trigger1 = time = 1
x = 16

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 200, 3]
type = movehitreset
trigger1 = animelem = 4
[State 200, 3]
type = HitDef
trigger1 = animelem = 3 || animelem = 4
attr = S, NA
damage    = 117
ID = 270
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s(7020+ifelse(animelem=3&&random<500,1,0))+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2dist y < 0,ceil(p2dist y/2.7),0)+ifelse(p2statetype=C,16,0)
hitsound = s4,3
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -14.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -23.5
guard.cornerpush.veloff = -19.3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && hitpausetime = 15
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 4
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 15
trigger1 = numtarget(270) > 0
projanim = 8020+var(6)*10
postype = p2
offset = -(target(270),const(size.head.pos.x))+15,-99-ifelse((target(270),name != "thin nen"),-99-(target(270),const(size.head.pos.y)),0)+ifelse((target(270),const(size.head.pos.y))<-50&&(target(270),statetype=C),20,0)
projremovetime = 18
projsprpriority = 2
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_b
[Statedef 280]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 280
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(280) > 0 && movehit > 0
trigger1 = target(280),alive = 0 && target(280),stateno != [8300,8307]
trigger1 = target(280),stateno != 5101 && target(280),stateno != 5110
trigger1 = target(280),stateno != 5100 && target(280),stateno != 5150
value = 8300
id = 280
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(280) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = posadd
trigger1 = animelem = 1 || animelem = 2 || animelem = 3
x = 10

[State 230, 1]
type = posadd
trigger1 = animelem = 4
x = 15
[State 230, 1]
type = posadd
trigger1 = animelem = 5
x = 17
[State 230, 1]
type = posadd
trigger1 = animelem = 6
x = 18
[State 230, 1]
type = posadd
trigger1 = animelem = 7
x = 15
[State 230, 1]
type = posadd
trigger1 = animelem = 8
x = 16

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2,2 || animelem = 6,2
value = s2,3

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 200, 3]
type = movehitreset
trigger1 = animelem = 4
[State 200, 3]
type = HitDef
trigger1 = animelem = 3 || animelem = 7
attr = S, NA
id = 280
damage    = 117
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s(7020+ifelse(animelem=7&&random<500,1,0))+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-60+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,3
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -14.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -23.5
guard.cornerpush.veloff = -19.3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
triggerall = time = 25 && var(55) = 1 && movehit > 0
triggerall = p2dist y > -50 && p2dist x < 100
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
triggerall = p2movetype = H
trigger1 = random < 500
value = 1400+ifelse(random<500,100,0)

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && hitpausetime = 15
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1

[State 230, 1]
type = varrandom
trigger1 = time = 0 || animelem = 4
v = 6
range = 4
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 15
trigger1 = numtarget(280) > 0
projanim = 8020+var(6)*10
postype = p2
offset = -(target(280),const(size.head.pos.x))+15,-99-ifelse((target(280),name != "thin nen"),-99-(target(280),const(size.head.pos.y)),0)+ifelse((target(280),const(size.head.pos.y))<-50&&(target(280),statetype=C),20,0)
projremovetime = 18
projsprpriority = 2
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_x close1
[Statedef 310]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 310
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(310) > 0 && movehit > 0
trigger1 = target(310),alive = 0 && target(310),stateno != [8300,8307]
trigger1 = target(310),stateno != 5101 && target(310),stateno != 5110
trigger1 = target(310),stateno != 5100 && target(310),stateno != 5150
value = 8304
id = 310
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(310) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s2,4

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,2
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 31
id = 310
pausetime = 10,10
animtype = L
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2statetype=C,16,0)+ifelse(p2dist y < 0,ceil(p2dist y/6),0)
hitsound = s4,4
guardsound = s3,8
ground.type = high
givepower = 0,0
ground.slidetime = 9
ground.hittime  = 9
guard.slidetime = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.6
ground.velocity = -4.6
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -7
guard.cornerpush.veloff = -6.8
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(20*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
triggerall = p2statetype != A
triggerall = var(55) = 1 && time > 3 && movehit > 0
triggerall = p2bodydist X <= 20 && P2dist X > 0
trigger1 = random < 900
value = 310+ifelse(random<500,20,0)
[State 200, 4]
type = ChangeState
triggerall = p2statetype != A
triggerall = var(55) = 1 && time > 3 && movehit > 0
triggerall = p2bodydist X > 20
trigger1 = random < 900
value = 320
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_x1
[Statedef 320]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 320
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(320) > 0 && movehit > 0
trigger1 = target(320),alive = 0 && target(320),stateno != [8300,8307]
trigger1 = target(320),stateno != 5101 && target(320),stateno != 5110
trigger1 = target(320),stateno != 5100 && target(320),stateno != 5150
value = 8304
id = 320
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(320) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s2,5

[State 230, 1]
type = width
trigger1 = animtime < 0
value = 25

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,2
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 31
id = 320
pausetime = 10,10
animtype = L
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2statetype=C,16,0)
hitsound = s4,4
guardsound = s3,8
ground.type = high
givepower = 0,0
ground.slidetime = 9
ground.hittime  = 9
guard.slidetime = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.6
ground.velocity = -5.2
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -8.2
guard.cornerpush.veloff = -6.8
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(20*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
triggerall = p2statetype != A
triggerall = var(55) = 1 && time > 3 && movehit > 0
trigger1 = random < 500
value = 320
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_a close1
[Statedef 330]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 330
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(330) > 0 && movehit > 0
trigger1 = target(330),alive = 0 && target(330),stateno != [8300,8307]
trigger1 = target(330),stateno != 5101 && target(330),stateno != 5110
trigger1 = target(330),stateno != 5100 && target(330),stateno != 5150
value = 8304
id = 330
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(330) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s2,6

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
trigger1 = Random < 900
value = s3,2
channel = 4

[State 230, 1]
type = width
trigger1 = animelem = 3,>= 0 && animelem = 4,<0
trigger2 = animelem = 5,>= 0 && animelem = 6,<0
value = 15
[State 230, 1]
type = width
trigger1 = animelem = 4,>= 0 && animelem = 5,<0
value = 30

[State 200, 3]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage    = 84
id = 330
pausetime = 11,11
animtype = M
guardflag = L
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7040+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = -20+ifelse(p2bodydist x>25,ceil(ifelse(p2bodydist x>60,35,p2bodydist x-25)),0),-12+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,6
guardsound = s3,8
ground.type = low
air.type = high
givepower = 0,0
ground.slidetime = 21
ground.hittime  = 21
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
ground.velocity = -9.9
guard.velocity = -8.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -12.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
triggerall = time = 8 && var(55) = 1 && movehit > 0
triggerall = p2dist y > -50 && p2dist x < 100
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
triggerall = p2movetype = H
trigger1 = random < 500
value = 1400+ifelse(random<500,100,0)

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(54*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_a1
[Statedef 340]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 340
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(340) > 0 && movehit > 0
trigger1 = target(340),alive = 0 && target(340),stateno != [8300,8307]
trigger1 = target(340),stateno != 5101 && target(340),stateno != 5110
trigger1 = target(340),stateno != 5100 && target(340),stateno != 5150
value = 8304
id = 340
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(340) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = posadd
trigger1 = time = 0
x = 3
[State 230, 1]
type = posadd
trigger1 = time = 1
x = 16

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s2,6

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,2
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 84
id = 340
pausetime = 11,11
animtype = M
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2statetype=C,16,0)+ifelse(p2dist y < 0,ceil(p2dist y/6),0)
hitsound = s4,6
guardsound = s3,8
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
ground.velocity = -9.9
guard.velocity = -8.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -12.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(340) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(340) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(54*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_y close1
[Statedef 350]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 350
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(350) > 0 && movehit > 0
trigger1 = target(350),alive = 0 && target(350),stateno != [8300,8307]
trigger1 = target(350),stateno != 5101 && target(350),stateno != 5110
trigger1 = target(350),stateno != 5100 && target(350),stateno != 5150
value = 8304
id = 350
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(350) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s2,5

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,3
channel = 4

[State 230, 1]
type = width
trigger1 = animelem = 2,>= 0 && animelem = 3,<0
trigger2 = animelem = 5,>= 0 && animelem = 6,<0
value = 5
[State 230, 1]
type = width
trigger1 = animelem = 3,>= 0 && animelem = 4,<0
value = 10
[State 230, 1]
type = width
trigger1 = animelem = 4,>= 0 && animelem = 5,<0
value = 20

[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 6
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(13) != 1 || (p2stateno != 1406 && p2stateno != 1506) || var(34) = 1
trigger1 = command != "hold_s" && (command = "holdfwd" || command = "holdback") && var(55) = 0
trigger2 = var(55) = 1
trigger2 = facing != enemynear,facing || (facing = enemynear,facing && random < 500)
attr = S, NT
ID = 800+ifelse(var(57)=1,10,0)
hitflag = M-
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 801+ifelse(var(57)=1,10,0)
p2stateno = 805+ifelse(var(57)=1,10,0)
p2facing = 1
[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 6
triggerall = (numhelper(1400) > 0 || numhelper(1500) > 0) && var(13) = 1 && (p2stateno = 1406||p2stateno = 1506) && var(34) = 0
trigger1 = command != "hold_s" && (command = "holdfwd" || command = "holdback") && var(55) = 0
trigger2 = var(55) = 1
trigger2 = facing != enemynear,facing || (facing = enemynear,facing && random < 500)
attr = S, NT
ID = 800+ifelse(var(57)=1,10,0)
hitflag = M
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 801+ifelse(var(57)=1,10,0)
p2stateno = 805+ifelse(var(57)=1,10,0)
p2facing = 1
[State 850, 1]
type = HitDef
trigger1 = time = 1

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

[State 200, 3]
type = HitDef
trigger1 = animelem = 4
attr = S, NA
damage    = 101
id = 350
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7040+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = -10+ifelse(p2bodydist x>25,ceil(ifelse(p2bodydist x>50,25,p2bodydist x-25)),0),-76+ifelse(p2statetype=C,16,0)+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,5
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -15
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
trigger1 = animelem = 4,>=0 && var(55) = 1 && movehit > 0 && p2bodydist x < 23
trigger1 = random < 900 && p2statetype != A && p2movetype = H
value = 1700
[State 10, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = animelem = 4,>=0
trigger1 = p2statetype = A && random < 100
value = 1900
[State 10, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = animelem = 4,>=0 && p2dist y > -1 && p2dist x < 73
trigger1 = p2bodydist x < 30
trigger1 = p2life <= 44 && random < 900 && p2statetype = S && p2movetype = H
trigger2 = p2statetype = A && random < 100
value = 1800
[State 10, 2]
type = ChangeState
triggerall = time = 9 && var(55) = 1 && movehit > 0
triggerall = p2dist y > -50 && p2dist x < 100
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
triggerall = p2movetype = H
trigger1 = random < 500
value = 1400+ifelse(random<500,100,0)

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(350) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(350) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(40*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_y1
[Statedef 360]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 360
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(360) > 0 && movehit > 0
trigger1 = target(360),alive = 0 && target(360),stateno != [8300,8307]
trigger1 = target(360),stateno != 5101 && target(360),stateno != 5110
trigger1 = target(360),stateno != 5100 && target(360),stateno != 5150
value = 8304
id = 360
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(360) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = posadd
trigger1 = animelem = 1
x = 9
[State 230, 1]
type = posadd
trigger1 = animelem = 3
x = 15

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,3
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage    = 101
id = 360
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2statetype=C,16,0)+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,5
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
triggerall = var(55) = 1 && movehit > 0
trigger1 = random < 900 && p2dist x < 57
trigger2 = random < 500 && p2dist x < 52
value = 1700

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(360) > 0
var(3) = 4+ifelse(random<500,1,0)
ignorehitpause = 1
persistent = 0
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(360) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(40*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_b close1
[Statedef 370]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 370
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(370) > 0 && movehit > 0
trigger1 = target(370),alive = 0 && target(370),stateno != [8300,8307]
trigger1 = target(370),stateno != 5101 && target(370),stateno != 5110
trigger1 = target(370),stateno != 5100 && target(370),stateno != 5150
value = 8304
id = 370
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(370) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = posadd
trigger1 = time = 0
x = -33

[State 230, 1]
type = posadd
trigger1 = time = 1
x = 16
[State 230, 1]
type = posadd
trigger1 = animelem = 5
x = 10
[State 230, 1]
type = posadd
trigger1 = animelem = 6
x = 21

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,3
channel = 4

[State 200, 3]
type = movehitreset
trigger1 = animelem = 4
[State 200, 3]
type = HitDef
trigger1 = animelem = 3 || animelem = 4
attr = S, NA
damage    = 71
ID = 370
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2dist y < 0,ceil(p2dist y/2.5),0)+ifelse(p2statetype=C,16,0)
hitsound = s4,7
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -14.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -23.5
guard.cornerpush.veloff = -19.3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(370) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(370) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && hitpausetime = 15
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 1
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 15
trigger1 = numtarget(370) > 0
projanim = 8000+var(6)*10
postype = p2
offset = -(target(370),const(size.head.pos.x))+15,-99-ifelse((target(370),name != "thin nen"),-99-(target(370),const(size.head.pos.y)),0)+ifelse((target(370),const(size.head.pos.y))<-50&&(target(370),statetype=C),20,0)
projremovetime = 23
projsprpriority = 2
ignorehitpause = 1
projedgebound = 210
projstagebound = 210

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_b1
[Statedef 380]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 380
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(380) > 0 && movehit > 0
trigger1 = target(380),alive = 0 && target(380),stateno != [8300,8307]
trigger1 = target(380),stateno != 5101 && target(380),stateno != 5110
trigger1 = target(380),stateno != 5100 && target(380),stateno != 5150
value = 8304
id = 380
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(380) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = posadd
trigger1 = animelem = 2
x = 20
[State 230, 1]
type = posadd
trigger1 = animelem = 3
x = 20
[State 230, 1]
type = posadd
trigger1 = animelem = 4
x = -20
[State 230, 1]
type = posadd
trigger1 = animelem = 5
x = -20

[State 230, 1]
type = width
trigger1 = animelem = 2,>=0 && animelem = 3,<0
trigger2 = animelem = 4,>=0 && animelem = 5,<0
value = 10,20
[State 230, 1]
type = width
trigger1 = animelem = 3,>=0 && animelem = 4,<0
value = 20,40

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2,3
value = s2,7

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,3
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage    = 117
id = 380
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2dist y < 0,ceil(p2dist y/6),0)+ifelse(p2statetype=C,16,0)
hitsound = s4,7
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -14.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -23.5
guard.cornerpush.veloff = -19.3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(380) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(380) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 1
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
trigger1 = numtarget(380) > 0
projanim = 8000+var(6)*10
postype = p2
offset = -(target(380),const(size.head.pos.x))+15,-99-ifelse((target(380),name != "thin nen"),-99-(target(380),const(size.head.pos.y)),0)+ifelse((target(380),const(size.head.pos.y))<-50&&(target(380),statetype=C),20,0)
projremovetime = 23
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210
projstagebound = 210

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Dash_y
[Statedef 300]
type    = S
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 5.5*ifelse(vel x<0,-1,1),0
anim = 300
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(300) > 0 && movehit > 0
trigger1 = target(300),alive = 0 && target(300),stateno != [8300,8307]
trigger1 = target(300),stateno != 5101 && target(300),stateno != 5110
trigger1 = target(300),stateno != 5100 && target(300),stateno != 5150
value = 8300
id = 300
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(300) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 0 && numhelper(301) < 1
stateno = 301
id = 301
name = "fguard"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 1300, 5]
type = helper
trigger1 = pos y < 0 && pos y + 2 >= 0
stateno = 102
name = "dust"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State -2, 0]
type = posadd
trigger1 = pos y < 0
y = ifelse(pos y + 2 <= 0,2,-pos y)

[State 230, 1]
type = veladd
trigger1 = time > 0
x = -0.15*ifelse(vel x<0,-1,1)

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3,3
value = s2,1

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
value = s3,1
channel = 4

[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 6
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(13) != 1 || (p2stateno != 1406 && p2stateno != 1506) || var(34) = 1
trigger1 = command != "hold_s" && (command = "holdfwd" || command = "holdback") && var(55) = 0
trigger2 = var(55) = 1
attr = S, NT
ID = 800+ifelse(var(57)=1,10,0)
hitflag = M-
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 801+ifelse(var(57)=1,10,0)
p2stateno = 805+ifelse(var(57)=1,10,0)
p2facing = 1
[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 6
triggerall = (numhelper(1400) > 0 || numhelper(1500) > 0) && var(13) = 1 && (p2stateno = 1406||p2stateno = 1506) && var(34) = 0
trigger1 = command != "hold_s" && (command = "holdfwd" || command = "holdback") && var(55) = 0
trigger2 = var(55) = 1
attr = S, NT
ID = 800+ifelse(var(57)=1,10,0)
hitflag = M
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 801+ifelse(var(57)=1,10,0)
p2stateno = 805+ifelse(var(57)=1,10,0)
p2facing = 1
[State 850, 1]
type = HitDef
trigger1 = time = 1

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

[State 2, 0]
type = posadd
trigger1 = animelem = 4
x = 10
[State 2, 0]
type = posadd
trigger1 = animelem = 5
x = -10

[State 100, 4]
type = width
trigger1 = animelem = 4,>=0 && animelem = 5,<0
value = 2,10

[State 100, 4]
type = width
trigger1 = animelem = 4,<0
trigger2 = animelem = 5,>=0 && animtime < 0
value = 2

[State 200, 3]
type = HitDef
trigger1 = animelem = 4
attr = S, NA
damage    = 161
id = 300
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s(7020+ifelse(random<500,1,0))+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-49+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,2
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -7;13.3
ground.velocity = -10;13.1
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -15.5;22.5
guard.cornerpush.veloff = -18;22.8
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
trigger1 = animelem = 4,>=0 && var(55) = 1 && movehit > 0 && p2dist x < 50
trigger1 = random < 900
value = 1600

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(90*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 4
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
trigger1 = numtarget(300) > 0
projanim = 8020+var(6)*10
postype = p2
offset = -(target(300),const(size.head.pos.x))+15,-99-ifelse((target(300),name != "thin nen"),-99-(target(300),const(size.head.pos.y)),0)+ifelse((target(300),const(size.head.pos.y))<-50&&(target(300),statetype=C),20,0)
projremovetime = 18
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210
projstagebound = 210

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; force guard dash
[Statedef 301]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 300 && parent,stateno != 390
trigger2 = parent,movetype != A
;------------------------------------
; Dash_b
[Statedef 390]
type    = S
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 5.5*ifelse(vel x<0,-1,1),0
anim = 390
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(390) > 0 && movehit > 0
trigger1 = target(390),alive = 0 && target(390),stateno != [8300,8307]
trigger1 = target(390),stateno != 5101 && target(390),stateno != 5110
trigger1 = target(390),stateno != 5100 && target(390),stateno != 5150
value = 8300
id = 390
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(390) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 0 && numhelper(301) < 1
stateno = 301
id = 301
name = "fguard"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 100, 4]
type = width
trigger1 = animtime < 0
value = 2

[State -2, 0]
type = posadd
trigger1 = pos y < 0
y = ifelse(pos y + 2 <= 0,2,-pos y)
[State 1300, 5]
type = helper
trigger1 = pos y >= 0
stateno = 102
name = "dust"
pos = 0,0
pausemovetime = 9999
persistent = 0
ownpal = 1

[State 230, 1]
type = veladd
trigger1 = time > 0 && animelem = 6,<0
x = -0.15*ifelse(vel x<0,-1,1)
[State 230, 1]
type = velset
trigger1 = animelem = 6
x = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
value = s3,1
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 4
attr = S, NA
damage    = 179
id = 390
pausetime = 18,18
guard.pausetime = 17,17
animtype = h
guardflag = MA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-54+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,3
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.velocity = -13.3
ground.velocity = -12,-2.5
air.velocity = -12,-2.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -22.8
p2facing = 1
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
fall.yvelocity = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(390) > 0
value = 395
id = 390
ignorehitpause = 1
persistent = 0

[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(390) > 0
var(7) = 14
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(390) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(103*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Hit by dash_b
[Statedef 395]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 152 || prevstateno = 153 || prevstateno = 131
value = 152
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 154 || prevstateno = 155 || prevstateno = 132
value = 154

[State 200, 4]
type = Changeanim2
trigger1 = time < 18
value = 395

[State 200, 4]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 200, 4]
type = velset
trigger1 = time = 18
x = -15
y = -2.5

[State 200, 4]
type = veladd
trigger1 = time > 18
y = .5

[State 200, 4]
type = changestate
trigger1 = pos y >= 0 && vel y > 0 && time > 18
value = 396
;------------------------------------
; Hit by dash_b-2
[Statedef 396]
type    = A
movetype= H
physics = N
ctrl = 0

[State 200, 4]
type = velset
trigger1 = time = 0
y = 0
[State 200, 4]
type = posset
trigger1 = time = 0
y = 0

[State 200, 4]
type = velmul
trigger1 = 1
x = .9

[State 200, 4]
type = Changeanim2
trigger1 = time = 0
value = 396

[State 200, 4]
type = turn
trigger1 = animelem = 2 && anim = 396

[State 200, 4]
type = Changeanim
trigger1 = anim = 396 && animtime = 0
value = 5110

[State 200, 4]
type = nothitby
trigger1 = anim != 5110
value = SCA
ignorehitpause = 1

[State 200, 4]
type = selfstate
trigger1 = time = 26 && alive
value = 5120
[State 200, 4]
type = selfstate
trigger1 = time = 26 && !alive
value = 5110
;------------------------------------
; ground wave
[Statedef 397]
type    = A
movetype= I
physics = N
anim = 397
ctrl = 0
sprpriority = 1

[State 200, 4]
type = posadd
trigger1 = 1
x = p2dist x

[State 200, 4]
type = destroyself
trigger1 = p2stateno != 396 || p2movetype != H

[State 200, 4]
type = turn
trigger1 = facing = enemynear,facing

[State 1300, 5]
type = helper
trigger1 = time = 0
stateno = 103
name = "dust"
pos = 0,0
pausemovetime = 9999
ownpal = 1
;------------------------------------
; Dash_x
[Statedef 302]
type    = S
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 6*ifelse(vel x<0,-1,1),0
anim = 302
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(302) > 0 && movehit > 0
trigger1 = target(302),alive = 0 && target(302),stateno != [8300,8307]
trigger1 = target(302),stateno != 5101 && target(302),stateno != 5110
trigger1 = target(302),stateno != 5100 && target(302),stateno != 5150
value = 8304
id = 302
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(302) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = pos y < 0 && pos y + 2 >= 0
stateno = 101
name = "dust"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State -2, 0]
type = posadd
trigger1 = pos y < 0
y = ifelse(pos y + 2 <= 0,2,-pos y)

[State 230, 1]
type = width
trigger1 = animtime < 0
value = 25

[State 230, 1]
type = velset
trigger1 = time = 1
x = 5*ifelse(vel x<0,-1,1)
[State 230, 1]
type = velset
trigger1 = time = 5
x = 4*ifelse(vel x<0,-1,1)
[State 230, 1]
type = velset
trigger1 = animelem = 2,10
x = 3*ifelse(vel x<0,-1,1)
[State 230, 1]
type = velset
trigger1 = animtime = -1
x = 0
[State 230, 1]
type = posadd
trigger1 = animtime = -1
x = 3*ifelse(vel x<0,-1,1)

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1,1
value = s2,5

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s3,3
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 161
id = 302
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2statetype=C,16,0)
hitsound = s4,5
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 16
ground.hittime  = 16
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -13
ground.velocity = -16.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -29
guard.cornerpush.veloff = -21.7
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(90*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 1
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
trigger1 = numtarget(302) > 0
projanim = 8000+var(6)*10
postype = p2
offset = -(target(302),const(size.head.pos.x))+15,-99-ifelse((target(302),name != "thin nen"),-99-(target(302),const(size.head.pos.y)),0)+ifelse((target(302),const(size.head.pos.y))<-50&&(target(302),statetype=C),20,0)
projremovetime = 23
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210
projstagebound = 210

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(302) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(302) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Dash_a
[Statedef 312]
type    = S
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 5.5*ifelse(vel x<0,-1,1),0
anim = 312
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(312) > 0 && movehit > 0
trigger1 = target(312),alive = 0 && target(312),stateno != [8300,8307]
trigger1 = target(312),stateno != 5101 && target(312),stateno != 5110
trigger1 = target(312),stateno != 5100 && target(312),stateno != 5150
value = 8304
id = 312
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(312) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State -2, 0]
type = posadd
trigger1 = pos y < 0
y = ifelse(pos y + 2 <= 0,2,-pos y)
[State 1300, 5]
type = helper
trigger1 = pos y >= 0
stateno = 101
name = "dust"
pos = 0,0
pausemovetime = 9999
persistent = 0
ownpal = 1

[State 230, 1]
type = veladd
trigger1 = time > 0 && animelem = 4,<0
x = -0.2*ifelse(vel x<0,-1,1)
[State 230, 1]
type = velset
trigger1 = animelem = 4
x = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s3,3
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 179
id = 312
pausetime = 22,22
guard.pausetime = 21,21
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2statetype=C,16,0)+ifelse(p2dist y < 0,ceil(p2dist y/6),0)
hitsound = s4,7
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 36-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,17,0)
guard.hittime  = 36-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,17,0)
guard.velocity = -10
ground.velocity = -5.5,-7.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -17.8
p2facing = 1
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
fall.yvelocity = 0

[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(312) > 0
var(7) = 14
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(312) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(90*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Crouch_x
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 400
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(400) > 0 && movehit > 0
trigger1 = target(400),alive = 0 && target(400),stateno != [8300,8307]
trigger1 = target(400),stateno != 5101 && target(400),stateno != 5110
trigger1 = target(400),stateno != 5100 && target(400),stateno != 5150
value = 8300
id = 400
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(400) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s2,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 31
id = 400
pausetime = 10,10
animtype = L
guardflag = MA
sparkno = s7010+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7051+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-39+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 10
ground.hittime  = 10
guard.slidetime = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.3
ground.velocity = -4.05
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(20*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; Crouch_a
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 410
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(410) > 0 && movehit > 0
trigger1 = target(410),alive = 0 && target(410),stateno != [8300,8307]
trigger1 = target(410),stateno != 5101 && target(410),stateno != 5110
trigger1 = target(410),stateno != 5100 && target(410),stateno != 5150
value = 8300
id = 410
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(410) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = varset
trigger1 = time = 0
var(4) = 0

[State 230, 1]
type = varset
trigger1 = time > 3 && command = "a" && command = "holddown" && command != "holdfwd" && var(55) = 0
var(4) = 1
[State 230, 1]
type = varset
trigger1 = time > 4 && command = "b" && command = "holddown" && command != "holdfwd" && var(55) = 0
var(4) = 2
[State 230, 1]
type = varset
trigger1 = time > 4 && command = "x" && command = "holddown" && command != "holdfwd" && var(55) = 0
var(4) = 3
[State 230, 1]
type = varset
trigger1 = time > 4 && command = "y" && command = "holddown" && command != "holdfwd" && var(55) = 0
var(4) = 4

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 84
id = 410
pausetime = 11,11
animtype = M
guardflag = L
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7060+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 10,0+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,1
guardsound = s3,6
ground.type = low
givepower = 0,0
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.velocity = -7.5
ground.velocity = -7.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -12
guard.cornerpush.veloff = -11
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(54*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0 && var(4) = 1
value = 410
[State 200, 4]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = var(4) = 2
trigger2 = var(55) = 1 && movehit > 0 && random < 990
value = 430
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0 && var(4) = 3
value = 400
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0 && var(4) = 4
value = 420
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; Crouch_y
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 420
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(420) > 0 && movehit > 0
trigger1 = target(420),alive = 0 && target(420),stateno != [8300,8307]
trigger1 = target(420),stateno != 5101 && target(420),stateno != 5110
trigger1 = target(420),stateno != 5100 && target(420),stateno != 5150
value = 8300
id = 420
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(420) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 3
attr = C, NA
damage    = 98
id = 420
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-53+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,2
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -15.5
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 10, 2]
type = ChangeState
trigger1 = var(55) = 1 && movehit > 0 && p2dist x < 48
trigger1 = random < 900 && p2movetype = H
value = 1600

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(34*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; Crouch_b
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 430
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(430) > 0 && movehit > 0
trigger1 = target(430),alive = 0 && target(430),stateno != [8300,8307]
trigger1 = target(430),stateno != 5101 && target(430),stateno != 5110
trigger1 = target(430),stateno != 5100 && target(430),stateno != 5150
value = 8300
id = 430
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(430) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3,1
value = s2,3

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
trigger1 = Random < 900
value = s3,1
channel = 4

[State 230, 1]
type = width
trigger1 = animelem = 2,>= 0 && animelem = 3,<0
trigger2 = animelem = 6,>= 0 && animelem = 7,<0
value = 10
[State 230, 1]
type = width
trigger1 = animelem = 3,>= 0 && animelem = 4,<0
trigger2 = animelem = 5,>= 0 && animelem = 6,<0
value = 20
[State 230, 1]
type = width
trigger1 = animelem = 4,>= 0 && animelem = 5,<0
value = 30

[State 200, 3]
type = HitDef
trigger1 = animelem = 4
attr = C, NA
damage    = 117
id = 430
pausetime = 16,16
animtype = H
guardflag = L
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 20,0+ifelse(p2dist y < 0,ceil(p2dist y/6),0)
hitsound = s4,3
guardsound = s3,6
ground.type = T
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -2.8,-10
air.velocity = -2.8,-10
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -19.3
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .7

[State 230, 2]
type = varset
trigger1 = movehit > 0
var(3) = ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; Crouch_x1
[Statedef 500]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 500
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(500) > 0 && movehit > 0
trigger1 = target(500),alive = 0 && target(500),stateno != [8300,8307]
trigger1 = target(500),stateno != 5101 && target(500),stateno != 5110
trigger1 = target(500),stateno != 5100 && target(500),stateno != 5150
value = 8304
id = 500
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(500) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s2,4

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,2
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 31
id = 500
pausetime = 10,10
animtype = L
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-44+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,4
guardsound = s3,8
ground.type = low
givepower = 0,0
ground.slidetime = 9
ground.hittime  = 9
guard.slidetime = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.6
ground.velocity = -4.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -6.8
guard.cornerpush.veloff = -6.8
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(20*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; Crouch_a1
[Statedef 510]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 510
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(510) > 0 && movehit > 0
trigger1 = target(510),alive = 0 && target(510),stateno != [8300,8307]
trigger1 = target(510),stateno != 5101 && target(510),stateno != 5110
trigger1 = target(510),stateno != 5100 && target(510),stateno != 5150
value = 8304
id = 510
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(510) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = varset
trigger1 = time = 0
var(4) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1,1
value = s2,6

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,2
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 84
id = 510
pausetime = 11,11
animtype = M
guardflag = L
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7040+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 10,-7+ifelse(p2dist y < 0,ceil(p2dist y/6),0)
hitsound = s4,6
guardsound = s3,8
ground.type = low
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
ground.velocity = -9.9
guard.velocity = -8.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -12.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(54*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(510) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(510) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 200, 4]
type = ChangeState
trigger1 = time = 8 && movehit > 0 && random < 990 && var(55) = 1
value = 530

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; Crouch_y1
[Statedef 520]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 520
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(520) > 0 && movehit > 0
trigger1 = target(520),alive = 0 && target(520),stateno != [8300,8307]
trigger1 = target(520),stateno != 5101 && target(520),stateno != 5110
trigger1 = target(520),stateno != 5100 && target(520),stateno != 5150
value = 8304
id = 520
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(520) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s2,5

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
trigger1 = Random < 900
value = s3,3
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 4
attr = C, NA
damage    = 101
id = 520
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2dist y < 0,ceil(p2dist y/6),0)+ifelse(p2statetype=C,16,0)
hitsound = s4,5
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16.7
guard.cornerpush.veloff = -14.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(520) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(520) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 230, 1]
type = varset
trigger1 = movehit = 0
var(16) = 0
[State 230, 1]
type = varset
trigger1 = movehit > 0 && var(16) != 1
var(16) = 1
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(34*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; Crouch_b1
[Statedef 530]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 530
sprpriority = 1
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(530) > 0 && movehit > 0
trigger1 = target(530),alive = 0 && target(530),stateno != [8300,8307]
trigger1 = target(530),stateno != 5101 && target(530),stateno != 5110
trigger1 = target(530),stateno != 5100 && target(530),stateno != 5150
value = 8304
id = 530
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(530) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3,1
value = s2,7

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
trigger1 = Random < 900
value = s3,3
channel = 4

[State 230, 1]
type = width
trigger1 = animelem = 4,>= 0 && animelem = 5,<0
value = 35

[State 200, 3]
type = HitDef
trigger1 = animelem = 4
attr = C, NA
damage    = 117
id = 530
pausetime = 16,16
animtype = H
guardflag = L
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 20,-12+ifelse(p2dist y < 0,ceil(p2dist y/6),0)
hitsound = s4,7
guardsound = s3,9
ground.type = T
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -2.6,-10.8
air.velocity = -2.6,-10.8
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -19.3
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .75

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(530) > 0
var(3) = 2
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(530) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------
; jump_xf
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 600
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(600) > 0 && movehit > 0
trigger1 = target(600),alive = 0 && target(600),stateno != [8300,8307]
trigger1 = target(600),stateno != 5101 && target(600),stateno != 5110
trigger1 = target(600),stateno != 5100 && target(600),stateno != 5150
value = 8300
id = 600
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(600) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>= 0 && movecontact = 0
attr = A, NA
damage    = 84
id = 600
pausetime = 10,10
animtype = L
guardflag = HA
sparkno = s7010+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7051+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-10+ifelse(p2dist y < 20,ceil((p2dist y-20)/2),0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 10
ground.hittime  = 10
guard.slidetime = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.3
ground.velocity = -4.1
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(54*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0
;------------------------------------
; jump_af
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 610
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(610) > 0 && movehit > 0
trigger1 = target(610),alive = 0 && target(610),stateno != [8300,8307]
trigger1 = target(610),stateno != 5101 && target(610),stateno != 5110
trigger1 = target(610),stateno != 5100 && target(610),stateno != 5150
value = 8300
id = 610
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(610) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>= 0 && movecontact = 0
attr = A, NA
damage    = 91
id = 610
pausetime = 11,11
animtype = M
guardflag = HA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-1+ifelse(p2dist y < 20,ceil((p2dist y-20)/2),0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.velocity = -7.5
ground.velocity = -7.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -12
guard.cornerpush.veloff = -11
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 6
ignorehitpause = 1
persistent = 0
;------------------------------------
; jump_yf
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 620
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(620) > 0 && movehit > 0
trigger1 = target(620),alive = 0 && target(620),stateno != [8300,8307]
trigger1 = target(620),stateno != 5101 && target(620),stateno != 5110
trigger1 = target(620),stateno != 5100 && target(620),stateno != 5150
value = 8300
id = 620
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(620) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 3,>=0 && animelem = 4,<0
trigger1 = movecontact = 0
attr = A, NA
damage    = 112
id = 620
pausetime = 16,16
animtype = h
guardflag = HA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-25+ifelse(p2dist y < 20,ceil((p2dist y-20)/2),0)
hitsound = s4,2
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 4
ignorehitpause = 1
persistent = 0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 50, 2]
type = Changestate
trigger1 = animelem = 5,>=0
trigger1 = var(1) = 0 && var(4) = 1 && command = "holdup" && var(55) = 0
value = 54
;------------------------------------
; jump_bf
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 630
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(630) > 0 && movehit > 0
trigger1 = target(630),alive = 0 && target(630),stateno != [8300,8307]
trigger1 = target(630),stateno != 5101 && target(630),stateno != 5110
trigger1 = target(630),stateno != 5100 && target(630),stateno != 5150
value = 8300
id = 630
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(630) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 3,>=0 && animelem = 4,<0
trigger1 = movecontact = 0
attr = A, NA
damage    = 142
id = 630
pausetime = 16,16
animtype = h
guardflag = HA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-1+ifelse(p2dist y < 20,ceil((p2dist y-20)/2),0)
hitsound = s4,3
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -14.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -23.5
guard.cornerpush.veloff = -19.3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 4
ignorehitpause = 1
persistent = 0

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(103*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 4
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
trigger1 = numtarget(630) > 0
projanim = 8020+var(6)*10
postype = p2
offset = -(target(630),const(size.head.pos.x))+15,-99-ifelse((target(630),name != "thin nen"),-99-(target(630),const(size.head.pos.y)),0)+ifelse((target(630),const(size.head.pos.y))<-50&&(target(630),statetype=C),20,0)
projremovetime = 18
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210
projstagebound = 210

[State 50, 2]
type = Changestate
trigger1 = animelem = 5,>=0
trigger1 = var(1) = 0 && var(4) = 1 && command = "holdup" && var(55) = 0
value = 54
;------------------------------------
; jump_xn
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 640
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(640) > 0 && movehit > 0
trigger1 = target(640),alive = 0 && target(640),stateno != [8300,8307]
trigger1 = target(640),stateno != 5101 && target(640),stateno != 5110
trigger1 = target(640),stateno != 5100 && target(640),stateno != 5150
value = 8300
id = 640
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(640) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>= 0 && movecontact = 0
attr = A, NA
damage    = 89
id = 640
pausetime = 10,10
animtype = L
guardflag = HA
sparkno = s7010+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7051+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-50+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 10
ground.hittime  = 10
guard.slidetime = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 16-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.3
ground.velocity = -4.1
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(60*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0
;------------------------------------
; jump_an
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 650
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(650) > 0 && movehit > 0
trigger1 = target(650),alive = 0 && target(650),stateno != [8300,8307]
trigger1 = target(650),stateno != 5101 && target(650),stateno != 5110
trigger1 = target(650),stateno != 5100 && target(650),stateno != 5150
value = 8300
id = 650
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(650) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,0
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>= 0 && movecontact = 0
attr = A, NA
damage    = 98
id = 650
pausetime = 11,11
animtype = M
guardflag = HA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-31+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,1
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.velocity = -7.5
ground.velocity = -7.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -12
guard.cornerpush.veloff = -11
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 6
ignorehitpause = 1
persistent = 0
;------------------------------------
; jump_yn
[Statedef 660]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 660
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(660) > 0 && movehit > 0
trigger1 = target(660),alive = 0 && target(660),stateno != [8300,8307]
trigger1 = target(660),stateno != 5101 && target(660),stateno != 5110
trigger1 = target(660),stateno != 5100 && target(660),stateno != 5150
value = 8300
id = 660
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(660) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 16
trigger1 = (command = "holdfwd" || command = "holdback") && command != "hold_s" && var(55) = 0
trigger2 = var(55) = 1
attr = A, NT
ID = 820
hitflag = A-
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 821
p2stateno = 825
p2facing = 1
[State 850, 1]
type = HitDef
trigger1 = time = 1

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

[State 850, 1]
type = movehitreset
trigger1 = animelem = 3
[State 200, 3]
type = HitDef
trigger1 = animelem = 3,>=0 && animelem = 4,<0
trigger1 = movecontact = 0
attr = A, NA
damage    = 112
id = 660
pausetime = 16,16
animtype = h
guardflag = HA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-55+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,2
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 4
ignorehitpause = 1
persistent = 0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(72*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 50, 2]
type = Changestate
trigger1 = animelem = 5,>=0
trigger1 = var(1) = 0 && var(4) = 1 && command = "holdup" && var(55) = 0
value = 54
;------------------------------------
; jump_bn
[Statedef 670]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 670
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(670) > 0 && movehit > 0
trigger1 = target(670),alive = 0 && target(670),stateno != [8300,8307]
trigger1 = target(670),stateno != 5101 && target(670),stateno != 5110
trigger1 = target(670),stateno != 5100 && target(670),stateno != 5150
value = 8300
id = 670
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(670) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,1
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 3,>=0 && animelem = 4,<0
trigger1 = movecontact = 0
attr = A, NA
damage    = 143
id = 670
pausetime = 16,16
animtype = h
guardflag = HA
sparkno = s7020+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-45+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,3
guardsound = s3,6
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -14.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -23.5
guard.cornerpush.veloff = -19.3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 4
ignorehitpause = 1
persistent = 0

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(90*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 4
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
trigger1 = numtarget(670) > 0
projanim = 8020+var(6)*10
postype = p2
offset = -(target(670),const(size.head.pos.x))+15,-99-ifelse((target(670),name != "thin nen"),-99-(target(670),const(size.head.pos.y)),0)+ifelse((target(670),const(size.head.pos.y))<-50&&(target(670),statetype=C),20,0)
projremovetime = 18
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210
projstagebound = 210

[State 50, 2]
type = Changestate
trigger1 = animelem = 5,>=0
trigger1 = var(1) = 0 && var(4) = 1 && command = "holdup" && var(55) = 0
value = 54
;------------------------------------
; jump_x1
[Statedef 700]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 700
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(700) > 0 && movehit > 0
trigger1 = target(700),alive = 0 && target(700),stateno != [8300,8307]
trigger1 = target(700),stateno != 5101 && target(700),stateno != 5110
trigger1 = target(700),stateno != 5100 && target(700),stateno != 5150
value = 8304
id = 700
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(700) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1,4
value = s2,4

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,2
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>= 0 && movecontact = 0
attr = A, NA
damage    = 84
id = 700
pausetime = 10,10
animtype = L
guardflag = HA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-60+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,4
guardsound = s3,8
ground.type = high
givepower = 0,0
ground.slidetime = 9
ground.hittime  = 9
guard.slidetime = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.hittime  = 15-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,7,0)
guard.velocity = -4.6
ground.velocity = -4.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -6.8
guard.cornerpush.veloff = -6.8
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(60*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0
;------------------------------------
; jump_a1
[Statedef 710]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 710
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(710) > 0 && movehit > 0
trigger1 = target(710),alive = 0 && target(710),stateno != [8300,8307]
trigger1 = target(710),stateno != 5101 && target(710),stateno != 5110
trigger1 = target(710),stateno != 5100 && target(710),stateno != 5150
value = 8304
id = 710
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(710) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1,4
value = s2,6

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s3,2
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>= 0 && movecontact = 0
attr = A, NA
damage    = 91
id = 710
pausetime = 11,11
animtype = M
guardflag = HA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-41+ifelse(p2dist y < 0,ceil(p2dist y/2),0)
hitsound = s4,6
guardsound = s3,8
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
guard.hittime  = 18-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,8,0)
ground.velocity = -9.9
guard.velocity = -8.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -12.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 4
ignorehitpause = 1
persistent = 0

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(710) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(710) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0
;------------------------------------
; jump_y1
[Statedef 720]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 720
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(720) > 0 && movehit > 0
trigger1 = target(720),alive = 0 && target(720),stateno != [8300,8307]
trigger1 = target(720),stateno != 5101 && target(720),stateno != 5110
trigger1 = target(720),stateno != 5100 && target(720),stateno != 5150
value = 8304
id = 720
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(720) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,3
channel = 4

[State 850, 1]
type = HitDef
triggerall = animelem = 1 && p2bodydist x < 16
trigger1 = (command = "holdfwd" || command = "holdback") && command != "hold_s" && var(55) = 0
trigger2 = var(55) = 1
attr = A, NT
ID = 820
hitflag = A-
priority = 4, miss
sparkno = -1
snap = 30,0
hitonce = 1
p1stateno = 821
p2stateno = 825
p2facing = 1
[State 850, 1]
type = HitDef
trigger1 = time = 1

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

[State 850, 1]
type = movehitreset
trigger1 = animelem = 3
[State 200, 3]
type = HitDef
trigger1 = animelem = 3,>=0 && animelem = 4,<0
trigger1 = movecontact = 0
attr = A, NA
damage    = 112
id = 720
pausetime = 16,16
animtype = h
guardflag = HA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-65+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,5
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 2]
type = movehitreset
trigger1 = time = 1

[State 230, 2]
type = varset
trigger1 = animelem = 3,>=0
trigger1 = movehit > 0 && numtarget(720) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = animelem = 3,>=0
trigger1 = movehit > 0 && numtarget(720) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 4
ignorehitpause = 1
persistent = 0

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(72*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State 50, 2]
type = Changestate
trigger1 = animelem = 5,>=0
trigger1 = var(1) = 0 && var(4) = 1 && command = "holdup" && var(55) = 0
value = 54
;------------------------------------
; jump_b1
[Statedef 730]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 730
sprpriority = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(730) > 0 && movehit > 0
trigger1 = target(730),alive = 0 && target(730),stateno != [8300,8307]
trigger1 = target(730),stateno != 5101 && target(730),stateno != 5110
trigger1 = target(730),stateno != 5100 && target(730),stateno != 5150
value = 8304
id = 730
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(730) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 40, 5]
type = Varset
trigger1 = time = 0
var(5) = 0

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

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = Random < 900
value = s3,3
channel = 4

[State 200, 3]
type = HitDef
trigger1 = animelem = 3,>=0 && animelem = 4,<0
trigger1 = movecontact = 0
attr = A, NA
damage    = 142
id = 730
pausetime = 16,16
animtype = h
guardflag = HA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-55+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,7
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -12.6
ground.velocity = -14.4
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -23.5
guard.cornerpush.veloff = -19.3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 230, 1]
type = varset
trigger1 = movehit > 0
var(18) = 4
ignorehitpause = 1
persistent = 0

[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(730) > 0
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = movehit > 0 && numtarget(730) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0
var(51) = ceil(90*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(4) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(4) = 1

[State 230, 1]
type = varrandom
trigger1 = time = 0
v = 6
range = 1
[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
trigger1 = numtarget(730) > 0
projanim = 8000+var(6)*10
postype = p2
offset = -(target(730),const(size.head.pos.x))+15,-99-ifelse((target(730),name != "thin nen"),-99-(target(730),const(size.head.pos.y)),0)+ifelse((target(730),const(size.head.pos.y))<-50&&(target(730),statetype=C),20,0)
projremovetime = 23
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210
projstagebound = 210

[State 50, 2]
type = Changestate
trigger1 = animelem = 5,>=0
trigger1 = var(1) = 0 && var(4) = 1 && command = "holdup" && var(55) = 0
value = 54
;-----------------------------------
; Throw ground
[Statedef 800]
type = S
movetype = A
physics = S
anim = 800
velset = 0,0
ctrl = 0

[State 5040, 1]
type = nothitby
trigger1 = time = 0
value = SCA

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = p2bodydist X <= 25 && p2bodydist X >= -65
value = 350-ifelse(prevstateno=100,50,0)

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = p2bodydist X > 25 || p2bodydist X < -65
value = 360-ifelse(prevstateno=100,60,0)
;------------------------------------
; Throw ground sucess
[Statedef 801]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 801
sprpriority = 1

[State 230, 1]
type = turn
trigger1 = time = 0

[State 230, 1]
type = targetbind
trigger1 = animelem = 2,<0
pos = -30,0
id = 800
[State 230, 1]
type = targetbind
trigger1 = animelem = 2,>=0 && animelem = 3,<0
pos = -35,-55
id = 800
[State 230, 1]
type = targetbind
trigger1 = animelem = 3,>=0 && animelem = 3,<5
pos = -10,-60
id = 800

[State 100, 4]
type = width
trigger1 = animelem = 4
value = 5

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s5,0
channel = 4

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3,5
value = s5,1

[State 230, 1]
type = targetlifeadd
trigger1 = animelem = 3,1
value = -186
id = 800
kill = 0
[State 230, 1]
type = targetlifeadd
trigger1 = animelem = 3,8
value = -1
id = 800
[State 260, 0]
type = assertspecial
trigger1 = numtarget(800) > 0 && animelem = 3,8
flag = nokoslow
ignorehitpause = 1

[State 7102, 1]
type = selfState
triggerall = time = 2
trigger1 = numtarget(800) > 0
trigger1 = target(800),stateno != 805
trigger2 = numtarget(800) = 0
value = 0
ctrl = 1

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Throw ground sucess1
[Statedef 811]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 811
sprpriority = 1

[State 230, 1]
type = turn
trigger1 = time = 0

[State 230, 1]
type = targetbind
trigger1 = animelem = 2,<0
pos = -25,0
id = 810
[State 230, 1]
type = targetbind
trigger1 = animelem = 2,>=0 && animelem = 3,<0
pos = -28,-57
id = 810
[State 230, 1]
type = targetbind
trigger1 = animelem = 3,>=0 && animelem = 4,<0
pos = -27,-62
id = 810

[State 100, 4]
type = width
trigger1 = animelem = 4
value = 50

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s5,3
channel = 4

[State 230, 1]
type = posadd
trigger1 = animelem = 7
x = -11

[State 230, 1]
type = targetlifeadd
trigger1 = animelem = 3,7
value = -187;original 1's damage is 147
id = 810
[State 260, 0]
type = assertspecial
trigger1 = numtarget(810) > 0 && animelem = 3,7
flag = nokoslow
ignorehitpause = 1

[State 7102, 1]
type = selfState
triggerall = time = 2
trigger1 = numtarget(810) > 0
trigger1 = target(810),stateno != 815
trigger2 = numtarget(810) = 0
value = 0
ctrl = 1

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Throw air sucess
[Statedef 821]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 820
sprpriority = 1

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && animelem = 6,>0
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && animelem = 6,>0
statetype = A

[State 230, 1]
type = turn
trigger1 = anim = 820 && animelem = 6

[State 230, 1]
type = targetbind
trigger1 = anim = 820 && animelem = 2,<0
pos = 54,-66
id = 820
[State 230, 1]
type = targetbind
trigger1 = anim = 820 && animelem = 2,>=0 && animelem = 3,<0
pos = 48,-85
id = 820
[State 230, 1]
type = targetbind
trigger1 = anim = 820 && animelem = 3,>=0 && animelem = 4,<0
pos = 29,-124
id = 820
[State 230, 1]
type = targetbind
trigger1 = anim = 820 && animelem = 4,>=0 && animelem = 5,<0
pos = -20,-118
id = 820
[State 230, 1]
type = targetbind
trigger1 = anim = 820 && animelem = 5
pos = -69,-107
id = 820

[State 100, 4]
type = width
trigger1 = anim = 820 && animelem = 5
value = 0,69

[State 230, 1]
type = velset
trigger1 = anim = 820 && animelem = 5,2
y = .5
[State 230, 1]
type = veladd
trigger1 = anim = 820 && animelem = 5,>2 && animelem = 6,<0
y = .5
[State 230, 1]
type = statetypeset
trigger1 = anim = 820 && animelem = 6
physics = A

[State 230, 1]
type = PlaySnd
trigger1 = anim = 820 && animelem = 2,4
value = s5,4
channel = 4

[State 230, 1]
type = PlaySnd
trigger1 = anim = 820 && animelem = 5
value = s5,1

[State 230, 1]
type = targetlifeadd
trigger1 = anim = 820 && animelem = 5
value = -186
id = 820
kill = 0
[State 230, 1]
type = targetlifeadd
trigger1 = anim = 820 && animelem = 5,2
value = -1
id = 820
[State 260, 0]
type = assertspecial
trigger1 = numtarget(820) > 0 && animelem = 5,2
flag = nokoslow
ignorehitpause = 1

[State 7102, 1]
type = selfState
triggerall = time = 2
trigger1 = numtarget(820) > 0
trigger1 = target(820),stateno != 825
trigger2 = numtarget(820) = 0
value = 50
ctrl = 1
;------------------------------------
; Hit by throw ground-into air
[Statedef 805]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 200, 4]
type = posset
trigger1 = time = 1
trigger1 = p2stateno != 801
y = 0
[State 7102, 1]
type = SelfState
trigger1 = time = 1
trigger1 = p2stateno != 801
value = 0
ctrl = 1

[State 200, 4]
type = Changeanim2
trigger1 = time = 0
value = 805

[State 200, 4]
type = nothitby
trigger1 = 1
value = SCA

[State 200, 4]
type = posadd
trigger1 = time = 19
y = 30
[State 200, 4]
type = velset
trigger1 = time = 19
x = 5.5
y = -13.5

[State 200, 4]
type = veladd
trigger1 = time > 19
y = .5

[State 200, 4]
type = Changestate
trigger1 = anim = 805 && animtime = 0 && !alive
value = 8303
[State 200, 4]
type = Changeanim
trigger1 = anim = 805 && animtime = 0
value = 5050
elem = 2

[State 5050, 2]
type = ChangeAnim
trigger1 = anim = 5050
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 200, 4]
type = changestate
trigger1 = vel y > 0 && time > 19 && pos y >= -5;time = 76
value = 806
;------------------------------------
; Hit by throw ground-bound
[Statedef 806]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 200, 4]
type = posset
trigger1 = time = 0 || time = 42
y = 0

[State 200, 4]
type = changeanim
trigger1 = time >= 4 && time < 20
value = 5100

[State 200, 4]
type = velset
trigger1 = time = 9
x = 3.5
y = -8
[State 200, 4]
type = veladd
trigger1 = time > 9 && time < 42
y = .5
[State 200, 4]
type = velset
trigger1 = time = 42
x = 0
y = 0

[State 200, 4]
type = changeanim
trigger1 = time >= 20 && time < 32
value = 5170
[State 200, 4]
type = changeanim
trigger1 = time = 32
value = 5110

[State 200, 4]
type = nothitby
trigger1 = time < 42
value = SCA

[State 200, 4]
type = statetypeset
trigger1 = time = 42
value = L

[State 200, 4]
type = selfstate
trigger1 = time = 43 && alive
value = 5120
[State 200, 4]
type = selfstate
trigger1 = time = 43 && !alive
value = 5110
;------------------------------------
; Hit by throw ground-into air1
[Statedef 815]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 200, 4]
type = posset
trigger1 = time = 1
trigger1 = p2stateno != 811
y = 0
[State 7102, 1]
type = SelfState
trigger1 = time = 1
trigger1 = p2stateno != 811
value = 0
ctrl = 1

[State 200, 4]
type = Changeanim2
trigger1 = time = 0
value = 815

[state 20, 1]
type = angleset
trigger1 = anim = 815 && animelem = 3,>= 0 && animtime < 0
value = -90
[state 20, 1]
type = angledraw
trigger1 = anim = 815 && animelem = 3,>= 0 && animtime < 0

[State 200, 4]
type = nothitby
trigger1 = 1
value = SCA

[State 200, 4]
type = posadd
trigger1 = time = 24
x = 60
y = -23
[State 200, 4]
type = velset
trigger1 = time = 24
x = 5
y = -8.5

[State 200, 4]
type = veladd
trigger1 = time > 24
y = .5

[State 200, 4]
type = Changestate
trigger1 = anim = 815 && animtime = 0 && !alive
value = 8307
[State 200, 4]
type = Changeanim
trigger1 = anim = 815 && animtime = 0
value = 5050
elem = 3
[State 200, 4]
type = Changeanim
trigger1 = anim = 5050 && animelem = 1
value = 5050
elem = 2

[State 5050, 2]
type = ChangeAnim
trigger1 = anim = 5050
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 200, 4]
type = changestate
trigger1 = time > 24 && pos y >= -5 && vel y > 0
value = 816
;------------------------------------
; Hit by throw ground-bound1
[Statedef 816]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 200, 4]
type = posset
trigger1 = time = 0 || time = 32
y = 0

[State 200, 4]
type = changeanim
trigger1 = time >= 0 && time < 9
value = 5100
[State 200, 4]
type = changeanim
trigger1 = time = 9
value = 5160

[State 200, 4]
type = posadd
trigger1 = time = 9
y = 20
[State 200, 4]
type = velset
trigger1 = time = 9
x = 3.5
y = -5.5
[State 200, 4]
type = veladd
trigger1 = time > 9 && time < 32
y = .5
[State 200, 4]
type = velset
trigger1 = time = 32
x = 0
y = 0

[State 200, 4]
type = nothitby
trigger1 = time < 32
value = SCA

[State 200, 4]
type = selfstate
trigger1 = time = 32 && alive
value = 5120
[State 200, 4]
type = selfstate
trigger1 = time = 32 && !alive
value = 5110
;------------------------------------
; Hit by throw air1
[Statedef 825]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 7102, 1]
type = SelfState
trigger1 = time = 1
trigger1 = p2stateno != 821
value = 50
ctrl = 1

[State 200, 4]
type = Changeanim2
trigger1 = time = 0
value = 825

[state 20, 1]
type = angleset
trigger1 = anim = 825 && animelem = 4,>= 0 && animtime < 0
value = -90
[state 20, 1]
type = angledraw
trigger1 = anim = 825 && animelem = 4,>= 0 && animtime < 0

[State 200, 4]
type = nothitby
trigger1 = 1
value = SCA

[State 200, 4]
type = posadd
trigger1 = time = 26
x = -30
y = 65
[State 200, 4]
type = velset
trigger1 = time = 26
x = 5.5
y = -13.5

[State 200, 4]
type = veladd
trigger1 = time > 26
y = .5

[State 200, 4]
type = Changestate
trigger1 = anim = 825 && animtime = 0 && !alive
value = 8303
[State 200, 4]
type = Changeanim
trigger1 = anim = 825 && animtime = 0
value = 5050
elem = 2

[State 5050, 2]
type = ChangeAnim
trigger1 = anim = 5050
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 200, 4]
type = changestate
trigger1 = time > 26 && pos y >= -5 && vel y > 0
value = 806
;------------------------------------
; Yeon oc yung pa
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1000
sprpriority = 0
facep2 = 1
poweradd = 50

[State 260, 0]
type = targetstate
trigger1 = numtarget(1000) > 0 && movehit > 0
trigger1 = target(1000),alive = 0 && target(1000),stateno != [8300,8307]
trigger1 = target(1000),stateno != 5101 && target(1000),stateno != 5110
trigger1 = target(1000),stateno != 5100 && target(1000),stateno != 5150
value = 8300
id = 1000
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1000) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 2
stateno = 1001
id = 1000
name = "orb"
pos = 47,-68
ownpal = 1
[State 1000, 4]
type = Projectile
trigger1 = animelem = 3,>=2 && animelem = 14,<0
attr = S,SP
projanim = 1002
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210
[State 1000, 4]
type = Projectile
trigger1 = animelem = 4,>=0 && animelem = 15,<0
attr = S,SP
projanim = 1005
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210

[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(1002) < 2
stateno = 1002
id = 1002
name = "fguard"
pos = 100,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(1002) < 2
stateno = 1002
id = 1002
name = "fguard"
pos = 200,0
pausemovetime = 9999
ownpal = 1

[State 1300, 5]
type = helper
trigger1 = animelem = 14,3
stateno = 1004
id = 1000
name = "orb"
pos = 66,-68
ownpal = 1

[State 230, 2]
type = PlaySnd
trigger1 = time = 2
value = s5,5
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 14
value = s5,7
channel = 4

[State 200, 3]
type = varset
trigger1 = time = 0
var(32) = 0
[State 200, 3]
type = varset
trigger1 = time = 0
var(4) = 0
[State 200, 3]
type = varset
trigger1 = movecontact > 0
var(4) = 1
[State 200, 3]
type = varadd
trigger1 = movecontact = 0
var(4) = -1

[State 200, 3]
type = movehitreset
trigger1 = movecontact > 0

[State 200, 3]
type = HitDef
trigger1 = animelem = 3,>=2 && var(4) <= 0 && p2statetype != A
trigger2 = animelem = 3,>=2 && var(4) < 0 && p2statetype = A
attr = S, SP
damage    = 71,18
ID = 1000
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-59+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && hitpausetime = 15
var(51) = ceil(27*(2-var(51)/690.0))
ignorehitpause = 1

[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1
triggerall = var(52) < 1000 && p2dist y > -120 && p2dist x > 50
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
triggerall = p2movetype != A || p2dist x > 150
trigger1 = random < 100
value = 1400+ifelse(random<500,100,0)
[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; orb
[Statedef 1001]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1001
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1300, 5]
type = bindtoparent
trigger1 = animtime < 0
pos = 47,-68
ignorehitpause = 1

[State 5000, 1]
type = changeanim
trigger1 = parent,hitpausetime != 0
value = anim
elem = animelemno(-1)

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 1000
trigger2 = animtime = 0
;------------------------------------
; force guard ground
[Statedef 1002]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 200, 4]
type = destroyself
trigger1 = parent,numhelper(1000) = 0 && parent,numhelper(1100) = 0
;------------------------------------
; force guard air
[Statedef 1003]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 200, 4]
type = destroyself
trigger1 = parent,numhelper(1200) = 0
;------------------------------------
; wave
[Statedef 1004]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 3.143,0
anim = 1003
sprpriority = 3

[State 230, 2]
type = sprpriority
trigger1 = 1
value = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 230, 2]
type = PlaySnd
trigger1 = time = 0
value = s5,6

[State 2, 0]
type = parentvarset
trigger1 = movecontact = 0
var(14) = 0
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(14) = 1
[State 2, 0]
type = parentvarset
trigger1 = moveguarded > 0
var(14) = 2
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(11) = 16
[State 200, 3]
type = parentvarset
trigger1 = movecontact > 0
trigger2 = parent,numprojid(1000) = 0 && time > 0
trigger3 = frontedgedist < -80
var(32) = 1
[State 1300, 5]
type = changestate
trigger1 = movecontact > 0
value = 1006
[State 1300, 5]
type = helper
trigger1 = parent,numprojid(1000) = 0 && time > 0
stateno = 1005
name = "remove"
pos = 0,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = destroyself
trigger1 = parent,numprojid(1000) = 0 && time > 0
trigger2 = frontedgedist < -80
[State 1000, 4]
type = Projectile
trigger1 = movecontact = 0
attr = S,SP
projanim = 1006
projid = 1000
offset = 0,0
projremovetime = 1
projedgebound = 210
projstagebound = 210
[State 1020, 4]
type = hitdef
trigger1 = movecontact = 0
attr = S, SP
damage    = 85,18
ID = 1001
pausetime = 0,2
animtype = h
guardflag = M
sparkno = s7030+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
guard.sparkno = s7061+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
sparkxy = 5+ifelse(p2dist x < 0,ceil(p2dist x/2),0),10+ifelse(p2dist y<68,ceil((p2dist y-68)/2),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.hittime  = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
air.juggle = 8
guard.velocity = -11.5
ground.velocity = -12.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
;------------------------------------
; remove
[Statedef 1005]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1004
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, 4]
type = destroyself
trigger1 = time >= 3
;------------------------------------
; remove hit
[Statedef 1006]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = numtarget(1001) > 0
trigger1 = target(1001),alive = 0 && target(1001),stateno != [8300,8307]
trigger1 = target(1001),stateno != 5101 && target(1001),stateno != 5110
trigger1 = target(1001),stateno != 5100 && target(1001),stateno != 5150
value = s3,4
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = targetstate
trigger1 = numtarget(1001) > 0
trigger1 = target(1001),alive = 0 && target(1001),stateno != [8300,8307]
trigger1 = target(1001),stateno != 5101 && target(1001),stateno != 5110
trigger1 = target(1001),stateno != 5100 && target(1001),stateno != 5150
value = 8300
id = 1001
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1001) > 0
flag = nokoslow
ignorehitpause = 1

[State 111, 0]
type = parentvarset
trigger1 = parent,var(14) != 0 && time = 1
trigger1 = numtarget(1001) > 0
trigger1 = target(1001),stateno != 5300
var(23) = 17-ifelse(parent,var(14)=2,1,0)
ignorehitpause = 1

[State -2, 1]
type = parentvaradd
trigger1 = parent,var(14) = 2 && time = 1
var(51) = ceil(40*(2-parent,var(51)/690.0))

[State 2, 0]
type = pause
trigger1 = parent,var(14) = 1 && time = 1
trigger1 = numtarget(1001) > 0
trigger1 = target(1001),stateno != 5300
time = 15
[State 2, 0]
type = pause
trigger1 = parent,var(14) = 2 && time = 1
trigger1 = numtarget(1001) > 0
trigger1 = target(1001),stateno != 5300
time = 14

[State 1300, 5]
type = helper
trigger1 = time = 0
stateno = 1005
name = "remove"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 200, 4]
type = destroyself
triggerall = time >= 14
trigger1 = numtarget(1001) = 0
trigger2 = numtarget(1001) > 0
trigger2 = target(1001),alive = 1
trigger3 = numtarget(1001) > 0
trigger3 = target(1001),stateno != [8300,8303]

[State 1300, 5]
type = helper
triggerall = numtarget(1001) > 0
triggerall = target(1001),stateno = 8302
trigger1 = target,time = 1
trigger2 = target(1001),time = 26
stateno = 103
name = "dust"
pos = ceil(target(1001),pos x-pos x)*facing,0
facing = -1
pausemovetime = 9999
ownpal = 1

[State 2, 0]
type = playsnd
trigger1 = numtarget(1001) > 0
trigger1 = target(1001),stateno = 8302
trigger1 = target(1001),time = 1
value = s1,1
ignorehitpause = 1
;------------------------------------
; Yeon oc yung pa1
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1100
sprpriority = 0
facep2 = 1
poweradd = 50

[State 260, 0]
type = targetstate
trigger1 = numtarget(1100) > 0 && movehit > 0
trigger1 = target(1100),alive = 0 && target(1100),stateno != [8300,8307]
trigger1 = target(1100),stateno != 5101 && target(1100),stateno != 5110
trigger1 = target(1100),stateno != 5100 && target(1100),stateno != 5150
value = 8304
id = 1100
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1100) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 2
stateno = 1101
id = 1100
name = "orb"
pos = 51,-68
ownpal = 1

[State 1000, 4]
type = pause
trigger1 = animelem = 2,>2 && animelem = 13,<0 && numprojid(1102)=0
trigger1 = movecontact = 0 && var(21) = 0
time = 5
[State 200, 3]
type = varset
trigger1 = animelem = 2,>2 && animelem = 13,<0 && numprojid(1102)>0
trigger1 = movecontact = 0
var(21) = 0
[State 200, 3]
type = varadd
trigger1 = animelem = 2,>2 && animelem = 13,<0 && numprojid(1102)=0
trigger1 = movecontact = 0
var(21) = 1
[State 200, 3]
type = varset
trigger1 = var(21) > 1
var(21) = 0
[State 1000, 4]
type = Projectile
trigger1 = animelem = 2,>=2 && animelem = 10,<0
attr = S,SP
projanim = 1102
projid = 1102
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210
[State 1000, 4]
type = Projectile
trigger1 = animelem = 10,>=0 && animelem = 12,<0
attr = S,SP
projanim = 1103
projid = 1102
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210
[State 1000, 4]
type = Projectile
trigger1 = animelem = 12,>=0 && animelem = 13,<0
attr = S,SP
projanim = 1104
projid = 1102
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210

[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(1002) < 2
stateno = 1002
id = 1002
name = "fguard"
pos = 100,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(1002) < 2
stateno = 1002
id = 1002
name = "fguard"
pos = 200,0
pausemovetime = 9999
ownpal = 1

[State 230, 2]
type = PlaySnd
trigger1 = time = 2
value = s5,8
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 10
value = s6,0
channel = 4

[State 200, 3]
type = varset
trigger1 = time = 0
var(32) = 0
[State 200, 3]
type = varset
trigger1 = time = 0
var(4) = 0
[State 200, 3]
type = varset
trigger1 = movecontact > 0
var(4) = 1
[State 200, 3]
type = varadd
trigger1 = movecontact = 0
var(4) = -1

[State 200, 3]
type = varset
trigger1 = movehit = 0 && hitpausetime = 0
var(12) = 0
[State 200, 3]
type = varset
trigger1 = movehit > 0
var(12) = 1

[State 1300, 5]
type = explod
trigger1 = movehit > 0 && numtarget(1100) > 0 && numexplod(1107) = 0
trigger1 = p2movetype = H && hitpausetime = 15
trigger1 = target(1100),stateno = p2stateno
anim = 1107
id = 1107
postype = p2
pos = 0,0
shadow = 0,0,0
bindtime = -1
pausemovetime = 99
ignorehitpause = 1
sprpriority = 2
ownpal = 1

[State 200, 3]
type = movehitreset
trigger1 = movecontact > 0

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>=2 && var(4) <= 0 && p2statetype != A
trigger2 = animelem = 2,>=2 && var(4) < 0 && p2statetype = A
attr = S, SP
damage    = 66,10
ID = 1100
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-76+ifelse(p2dist y < 0,ceil(p2dist y/10),0)+ifelse(p2statetype=C,16,0)
hitsound = s4,9
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && hitpausetime = 15
var(51) = ceil(27*(2-var(51)/690.0))
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = animelem = 13
stateno = 1102
id = 1100
name = "orb"
pos = 59,-72
ownpal = 1

[State 230, 2]
type = varset
trigger1 = var(12) = 1 && numtarget(1100) > 0
var(3) = 4+ifelse(random<500,1,0)
ignorehitpause = 1
[State 230, 2]
type = varset
trigger1 = var(12) = 1 && numtarget(1100) > 0
var(24) = 1
ignorehitpause = 1

[State 10, 2]
type = ChangeState
triggerall = animtime = 0 && var(55) = 1
triggerall = var(52) < 1000 && p2dist y > -120 && p2dist x > 50
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
triggerall = p2movetype != A || p2dist x > 150
trigger1 = random < 100
value = 1400+ifelse(random<500,100,0)
[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; orb1
[Statedef 1101]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1101
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1300, 5]
type = bindtoparent
trigger1 = animtime < 0
pos = 51,-68
ignorehitpause = 1

[State 5000, 1]
type = changeanim
trigger1 = parent,hitpausetime != 0
value = anim
elem = animelemno(-1)

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 1100 || animtime = 0
;------------------------------------
; wave1
[Statedef 1102]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 3.143,0
anim = 1105
sprpriority = 3

[State 230, 2]
type = sprpriority
trigger1 = 1
value = 3
[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 230, 2]
type = PlaySnd
trigger1 = time = 0
value = s5,9

[State 1300, 5]
type = explod
trigger1 = movehit > 0
trigger1 = numtarget(1101) > 0 && numexplod(1107) = 0
trigger1 = p2movetype = H
trigger1 = target(1101),stateno = p2stateno
anim = 1107
id = 1107
postype = p2
pos = 0,0
shadow = 0,0,0
bindtime = -1
pausemovetime = 99
ignorehitpause = 1
sprpriority = 2
ownpal = 1
[State 2, 0]
type = parentvarset
trigger1 = movecontact = 0
var(14) = 0
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(14) = 1
[State 2, 0]
type = parentvarset
trigger1 = moveguarded > 0
var(14) = 2
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(11) = 16
[State 200, 3]
type = parentvarset
trigger1 = movecontact > 0
trigger2 = parent,numprojid(1000) = 0 && time > 0
trigger3 = frontedgedist < -80
var(32) = 1
[State 1300, 5]
type = changestate
trigger1 = movecontact > 0
value = 1104
[State 1300, 5]
type = helper
trigger1 = parent,numprojid(1000) = 0 && time > 0
stateno = 1103
name = "remove"
pos = 0,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = destroyself
trigger1 = parent,numprojid(1000) = 0 && time > 0
trigger2 = frontedgedist < -80
[State 1000, 4]
type = Projectile
trigger1 = movecontact = 0
attr = S,SP
projanim = 1108
projid = 1000
offset = 0,0
projremovetime = 1
projedgebound = 210
projstagebound = 210
[State 1020, 4]
type = hitdef
trigger1 = movecontact = 0
attr = S, SP
damage    = 85,18
ID = 1101
pausetime = 0,2
animtype = h
guardflag = M
sparkno = s7000+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
guard.sparkno = s7041+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
sparkxy = 5+ifelse(p2dist x < 0,ceil(p2dist x/2),0),ifelse(p2dist y<72,ceil((p2dist y-72)/4),0)+ifelse(p2statetype=C,16,0)
hitsound = s6,1
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.hittime  = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
air.juggle = 8
guard.velocity = -11.5
ground.velocity = -12.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
;------------------------------------
; remove
[Statedef 1103]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1106
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, 4]
type = destroyself
trigger1 = time >= 19
;------------------------------------
; remove hit
[Statedef 1104]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = numtarget(1101) > 0
trigger1 = target(1101),alive = 0 && target(1101),stateno != [8300,8307]
trigger1 = target(1101),stateno != 5101 && target(1101),stateno != 5110
trigger1 = target(1101),stateno != 5100 && target(1101),stateno != 5150
value = s3,5
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = targetstate
trigger1 = numtarget(1101) > 0
trigger1 = target(1101),alive = 0 && target(1101),stateno != [8300,8307]
trigger1 = target(1101),stateno != 5101 && target(1101),stateno != 5110
trigger1 = target(1101),stateno != 5100 && target(1101),stateno != 5150
value = 8304
id = 1101
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1101) > 0
flag = nokoslow
ignorehitpause = 1

[State 111, 0]
type = parentvarset
trigger1 = parent,var(14) != 0 && time = 1
trigger1 = numtarget(1101) > 0
trigger1 = target(1101),stateno != 5300
var(23) = 17-ifelse(parent,var(14)=2,1,0)
ignorehitpause = 1

[State -2, 1]
type = parentvaradd
trigger1 = parent,var(14) = 2 && time = 1
var(51) = ceil(40*(2-parent,var(51)/690.0))

[State 2, 0]
type = pause
trigger1 = parent,var(14) = 1 && time = 1
trigger1 = numtarget(1101) > 0
trigger1 = target(1101),stateno != 5300
time = 15
[State 2, 0]
type = pause
trigger1 = parent,var(14) = 2 && time = 1
trigger1 = numtarget(1101) > 0
trigger1 = target(1101),stateno != 5300
time = 14

[State 1300, 5]
type = helper
trigger1 = time = 0
stateno = 1103
name = "remove"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 200, 4]
type = destroyself
triggerall = time >= 10
trigger1 = numtarget(1101) = 0
trigger2 = numtarget(1101) > 0
trigger2 = target(1101),alive = 1
trigger3 = numtarget(1101) > 0
trigger3 = target(1101),stateno != [8304,8307]

[State 1300, 5]
type = helper
triggerall = numtarget(1101) > 0
triggerall = target(1101),stateno = 8306
trigger1 = target,time = 1
trigger2 = target(1101),time = 26
stateno = 104
name = "dust"
pos = ceil(target(1101),pos x-pos x)*facing,0
pausemovetime = 9999
ownpal = 1

[State 2, 0]
type = playsnd
trigger1 = numtarget(1101) > 0
trigger1 = target(1101),stateno = 8306
trigger1 = target(1101),time = 1
value = s1,0
ignorehitpause = 1
;------------------------------------
; Air yeon oc yung pa
[Statedef 1200]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
anim = 1200
sprpriority = 0
facep2 = 1
poweradd = 50

[State 260, 0]
type = targetstate
trigger1 = numtarget(1200) > 0 && movehit > 0
trigger1 = target(1200),alive = 0 && target(1200),stateno != [8300,8307]
trigger1 = target(1200),stateno != 5101 && target(1200),stateno != 5110
trigger1 = target(1200),stateno != 5100 && target(1200),stateno != 5150
value = 8300
id = 1200
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1200) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 2
stateno = 1201
id = 1200
name = "orb"
pos = 47,-69
ownpal = 1
[State 1000, 4]
type = Projectile
trigger1 = animelem = 1,>=2 && anim = 1200 && animelem = 6,<1
attr = S,SP
projanim = 1204
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210

[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(1003) < 3
stateno = 1003
id = 1003
name = "fguard"
pos = 0,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(1003) < 3
stateno = 1003
id = 1003
name = "fguard"
pos = 100,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(1003) < 3
stateno = 1003
id = 1003
name = "fguard"
pos = 200,0
pausemovetime = 9999
ownpal = 1

[State 230, 2]
type = PlaySnd
trigger1 = time = 2
value = s5,5
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1,2
value = s5,7
channel = 4

[State 200, 3]
type = varset
trigger1 = time = 0
var(33) = 0
[State 200, 3]
type = varset
trigger1 = time = 0
var(4) = 0
[State 200, 3]
type = varset
trigger1 = movecontact > 0
var(4) = 1
[State 200, 3]
type = varadd
trigger1 = movecontact = 0
var(4) = -1

[State 200, 3]
type = movehitreset
trigger1 = movecontact > 0

[State 200, 3]
type = HitDef
trigger1 = animelem = 1,>=2 && var(4) <= 0 && animelem = 6,<1 && p2statetype != A
trigger2 = animelem = 1,>=2 && var(4) < 0 && animelem = 6,<1 && p2statetype = A
attr = A, SP
damage    = 71,18
ID = 1200
pausetime = 16,16
animtype = h
guardflag = MA
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-60+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 6,1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && hitpausetime = 15
var(51) = ceil(27*(2-var(51)/690.0))
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = animelem = 6,1
stateno = 1202
id = 1200
name = "orb"
pos = 47,-69
ownpal = 1

[State 200, 4]
type = statetypeset
trigger1 = anim = 1200 && animtime = 0
movetype = I
physics = A

[State 200, 4]
type = changeanim
trigger1 = anim = 1200 && animtime = 0
trigger2 = anim = 41
trigger2 = time < 28 || vel y <= 1
value = 41
elem = 3
[State 200, 4]
type = changeanim
trigger1 = anim = 41 && time >= 28 && vel y > 1 && animelem = 4,<0
value = 41
elem = 4

[State 200, 4]
type = posfreeze
trigger1 = anim = 1200

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(12) = 0
[State 50, 1]
type = VarSet
trigger1 = Time > 0 && command != "holdup"
var(12) = 1

[State 50, 2]
type = Changestate
trigger1 = anim = 41
trigger1 = var(1) = 0 && var(12) = 1 && command = "holdup" && var(55) = 0
value = 54
;------------------------------------
; orb air
[Statedef 1201]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1201
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1300, 5]
type = bindtoparent
trigger1 = animtime < 0
pos = 47,-69
ignorehitpause = 1

[State 5000, 1]
type = changeanim
trigger1 = parent,hitpausetime != 0
value = anim
elem = animelemno(-1)

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 1200 || animtime = 0
;------------------------------------
; orb air after
[Statedef 1202]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1202
sprpriority = 3

[State 230, 2]
type = sprpriority
trigger1 = 1
value = 3
[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2, 0]
type = parentvarset
trigger1 = movecontact = 0
var(15) = 0
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(15) = 1
[State 2, 0]
type = parentvarset
trigger1 = moveguarded > 0
var(15) = 2
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(11) = 16
[State 200, 3]
type = parentvarset
trigger1 = movecontact > 0
trigger2 = parent,numprojid(1205) = 0 || animtime = 0
trigger2 = time > 0
var(33) = 1
[State 1300, 5]
type = changestate
trigger1 = movecontact > 0
value = 1204
[State 1300, 5]
type = helper
trigger1 = parent,numprojid(1205) = 0 || animtime = 0
trigger1 = time > 0
stateno = 1203
name = "remove"
pos = 0,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = destroyself
trigger1 = parent,numprojid(1205) = 0 || animtime = 0
trigger1 = time > 0
[State 1000, 4]
type = Projectile
trigger1 = movecontact = 0
attr = S,SP
projanim = 1205
projid = 1205
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210
[State 1020, 4]
type = hitdef
trigger1 = movecontact = 0
attr = A, SP
damage    = 71,18
ID = 1201
pausetime = 0,2
animtype = h
guardflag = M
sparkno = s7030+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
guard.sparkno = s7061+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
sparkxy = 5+ifelse(p2dist x < 0,ceil(p2dist x/2),0),8+ifelse(p2dist y<68,ceil((p2dist y-68)/2),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.hittime  = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
air.juggle = 8
guard.velocity = -11.5;*ifelse((enemynear,facing)=facing,-1,1)
ground.velocity = -12.5;*ifelse((enemynear,facing)=facing,-1,1)
air.velocity = -5.6,-7.5  ;-5.6*ifelse((enemynear,facing)=facing,-1,1),-7.5
airguard.velocity = -6,-1 ;-6*ifelse((enemynear,facing)=facing,-1,1),-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
;------------------------------------
; remove
[Statedef 1203]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1203
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, 4]
type = destroyself
trigger1 = time >= 3
;------------------------------------
; remove hit
[Statedef 1204]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = numtarget(1201) > 0
trigger1 = target(1201),alive = 0 && target(1201),stateno != [8300,8307]
trigger1 = target(1201),stateno != 5101 && target(1201),stateno != 5110
trigger1 = target(1201),stateno != 5100 && target(1201),stateno != 5150
value = s3,4
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = targetstate
trigger1 = numtarget(1201) > 0
trigger1 = target(1201),alive = 0 && target(1201),stateno != [8300,8307]
trigger1 = target(1201),stateno != 5101 && target(1201),stateno != 5110
trigger1 = target(1201),stateno != 5100 && target(1201),stateno != 5150
value = 8300
id = 1201
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1201) > 0
flag = nokoslow
ignorehitpause = 1

[State 111, 0]
type = parentvarset
trigger1 = parent,var(15) != 0 && time = 1
trigger1 = numtarget(1201) > 0
trigger1 = target(1201),stateno != 5300
var(23) = 17-ifelse(parent,var(15)=2,1,0)
ignorehitpause = 1

[State -2, 1]
type = parentvaradd
trigger1 = parent,var(15) = 2 && time = 1
var(51) = ceil(40*(2-parent,var(51)/690.0))

[State 2, 0]
type = pause
trigger1 = parent,var(15) = 1 && time = 1
trigger1 = numtarget(1201) > 0
trigger1 = target(1201),stateno != 5300
time = 15
[State 2, 0]
type = pause
trigger1 = parent,var(15) = 2 && time = 1
trigger1 = numtarget(1201) > 0
trigger1 = target(1201),stateno != 5300
time = 14

[State 1300, 5]
type = helper
trigger1 = time = 0
stateno = 1203
name = "remove"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 200, 4]
type = destroyself
triggerall = time >= 14
trigger1 = numtarget(1201) = 0
trigger2 = numtarget(1201) > 0
trigger2 = target(1201),alive = 1
trigger3 = numtarget(1201) > 0
trigger3 = target(1201),stateno != [8300,8303]

[State 1300, 5]
type = helper
triggerall = numtarget(1201) > 0
triggerall = target(1201),stateno = 8302
trigger1 = target,time = 1
trigger2 = target(1201),time = 26
stateno = 103
name = "dust"
pos = ceil(target(1201),pos x-pos x)*facing,0
facing = -1
pausemovetime = 9999
ownpal = 1

[State 2, 0]
type = playsnd
trigger1 = numtarget(1201) > 0
trigger1 = target(1201),stateno = 8302
trigger1 = target(1201),time = 1
value = s1,1
ignorehitpause = 1
;------------------------------------
; Ju bak bu
[Statedef 1400]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 0
facep2 = 1
poweradd = 50

[State 200, 3]
type = varset
trigger1 = time = 0
var(34) = 0
[State 230, 1]
type = varset
trigger1 = time = 0
var(17) = 0

[State 230, 1]
type = varset
trigger1 = var(17) != 1 && var(16) = 1
trigger1 = (prevstateno = [200,380]) && prevstateno != 312 && prevstateno != 210 && prevstateno != 220 && prevstateno != 310 && prevstateno != 320
trigger2 = var(17) != 1 && var(16) = 1
trigger2 = (prevstateno = [410,520]) && prevstateno != 430 && prevstateno != 500
trigger3 = var(17) != 1 && var(18) > 0
var(17) = 1

[State 52, 2]
type = Playsnd
trigger1 = animelem = 5
value = s6,4
channel = 3
[State 52, 2]
type = Playsnd
trigger1 = animelem = 7
value = s6,2
[State 1300, 5]
type = helper
trigger1 = animelem = 7
stateno = 1401
id = 1400
name = "talisman"
pos = 56,-68
ownpal = 1

[State 1300, 5]
type = helper
trigger1 = animelem = 1 && numhelper(1405) < 2
stateno = 1405
id = 1405
name = "fguard"
pos = 100,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = animelem = 1 && numhelper(1405) < 2
stateno = 1405
id = 1405
name = "fguard"
pos = 200,0
pausemovetime = 9999
ownpal = 1

[State 230, 1]
type = width
trigger1 = animelem = 8,>=0 && animelem = 9,<0
value = 0,15
[State 230, 1]
type = posadd
trigger1 = animelem = 8
x = 15
[State 230, 1]
type = posadd
trigger1 = animelem = 9
x = -15

[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; talisman
[Statedef 1401]
type    = A
movetype= A
physics = N
juggle  = 16
ctrl = 0
velset = 4,0
anim = 1401
sprpriority = 3

[State 230, 2]
type = sprpriority
trigger1 = 1
value = 3
[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2, 0]
type = parentvarset
trigger1 = movecontact = 0
var(13) = 0
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(13) = 1
[State 2, 0]
type = parentvarset
trigger1 = moveguarded > 0
var(13) = 2
[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(1401) > 0
value = 1406
id = 1401
ignorehitpause = 1
[State 1300, 5]
type = changestate
trigger1 = movecontact > 0
value = 1404
[State 1300, 5]
type = helper
trigger1 = parent,numprojid(1400) = 0 && time > 0
stateno = 1402
name = "tremove"
pos = 0,0
pausemovetime = 9999
ownpal = 1
[State 200, 3]
type = parentvarset
trigger1 = parent,numprojid(1400) = 0 && time > 0
trigger2 = frontedgedist < -64
var(34) = 1
[State 200, 4]
type = destroyself
trigger1 = parent,numprojid(1400) = 0 && time > 0
trigger2 = frontedgedist < -64
[State 1000, 4]
type = Projectile
trigger1 = movecontact = 0
attr = S,SP
projanim = 1402
projid = 1400
offset = 0,0
projremovetime = 1
projedgebound = 210
projstagebound = 210
[State 1020, 4]
type = hitdef
triggerall = movecontact = 0
trigger1 = parent,var(17) = 0
trigger2 = parent,var(17) = 1 && p2movetype != H && parent,stateno = 1400
attr = S, SP
damage    = 21,8
ID = 1401
pausetime = 0,2
animtype = h
hitflag = MA
guardflag = M
sparkno = s7030+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
guard.sparkno = s7061+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
sparkxy = 5+ifelse(p2dist x < 0,ceil(p2dist x/2),0),8+ifelse(p2dist y<68,ceil((p2dist y-68)/4),0)
hitsound = s4,8
guardsound = s3,7
ground.type = low
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.hittime  = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
air.juggle = 16
guard.velocity = -5.2
ground.velocity = 0
p2facing = 1
hitonce = 1
air.velocity = 0,0
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
;------------------------------------
; t remove
[Statedef 1402]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1403
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, 4]
type = destroyself
trigger1 = time >= 3
;------------------------------------
; t remove hit
[Statedef 1403]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1403
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, 4]
type = destroyself
trigger1 = time >= 11
;------------------------------------
; t remove hit
[Statedef 1404]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, 1]
type = playsnd
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),alive = 0 && target(1401),stateno != [8300,8307]
trigger1 = target(1401),stateno != 5101 && target(1401),stateno != 5110
trigger1 = target(1401),stateno != 5100 && target(1401),stateno != 5150
value = s3,4
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = targetstate
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),alive = 0 && target(1401),stateno != [8300,8307]
trigger1 = target(1401),stateno != 5101 && target(1401),stateno != 5110
trigger1 = target(1401),stateno != 5100 && target(1401),stateno != 5150
value = 8300
id = 1401
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1401) > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = Playsnd
trigger1 = parent,var(13) = 1 && time = 0
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 1406 && target(1401),movetype = H
value = s6,3

[State 111, 0]
type = parentvarset
trigger1 = parent,var(13) != 0 && time = 1
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno != 5300
var(23) = 11-ifelse(parent,var(13)=2,1,0)
ignorehitpause = 1

[State -2, 1]
type = parentvaradd
trigger1 = parent,var(13) = 2 && time = 1
var(51) = ceil(40*(2-parent,var(51)/690.0))

[State 200, 3]
type = parentvarset
trigger1 = time = 0
trigger1 = parent,var(13) != 1 || numtarget(1401) = 0
var(34) = 1
[State 2, 0]
type = pause
trigger1 = parent,var(13) = 1 && time = 1
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno != 5300
time = 9
[State 2, 0]
type = pause
trigger1 = parent,var(13) = 2 && time = 1
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno != 5300
time = 8

[State 1300, 5]
type = changeanim
trigger1 = time = 2
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 1406 && target(1401),movetype = H
value = 1404+ifelse((target(1401),const(size.head.pos.y))>-50,2,0)
[State 1300, 5]
type = helper
trigger1 = time = 0
stateno = 1403
name = "t remove"
pos = 21,0
pausemovetime = 9999
ownpal = 1

[State 1300, 5]
type = pause
trigger1 = roundstate < 3
trigger1 = time >= 6 && time%3 < 2
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 1406 && target(1401),movetype = H
time = 1
[State 1300, 5]
type = explod
trigger1 = time >= 2 && numexplod(1405) < 3
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 1406 && target(1401),movetype = H
trigger1 = p2stateno = 1406 && p2movetype = H
anim = 1405
id = 1405
postype = p2
pos = -33,-73+ifelse((target(1401),const(size.head.pos.y))>-50,15,0)
shadow = 0,0,0
ignorehitpause = 1
pausemovetime = 999
sprpriority = 4
ownpal = 1
facing = -1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time >= 2 && numexplod(1405) < 3
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 1406 && target(1401),movetype = H
trigger1 = p2stateno = 1406 && p2movetype = H
anim = 1405
id = 1405
postype = p2
pos = -1,-105+ifelse((target(1401),const(size.head.pos.y))>-50,15,0)
shadow = 0,0,0
ignorehitpause = 1
pausemovetime = 999
sprpriority = 4
ownpal = 1
facing = -1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time >= 2 && numexplod(1405) < 3
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 1406 && target(1401),movetype = H
trigger1 = p2stateno = 1406 && p2movetype = H
anim = 1405
id = 1405
postype = p2
pos = 47,-41+ifelse((target(1401),const(size.head.pos.y))>-50,15,0)
shadow = 0,0,0
ignorehitpause = 1
pausemovetime = 999
sprpriority = 4
ownpal = 1
facing = -1
removetime = -1
bindtime = -1
[State 1300, 5]
type = removeexplod
triggerall = time >= 2
trigger1 = numtarget(1401) = 0
trigger2 = numtarget(1401) > 0
trigger2 = target(1401),stateno != 1406 || target(1401),movetype != H

[State 200, 4]
type = destroyself
triggerall = time >= 14
trigger1 = numtarget(1401) = 0
trigger2 = numtarget(1401) > 0
trigger2 = target(1401),alive = 1
trigger2 = target(1401),stateno != 1406 || target(1401),movetype != H
trigger3 = numtarget(1401) > 0
trigger3 = target(1401),stateno != [8300,8303]
trigger3 = target(1401),stateno != 1406 || target(1401),movetype != H

[State 1300, 5]
type = posadd
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 1406 && target(1401),movetype = H
trigger1 = target(1401),pos x != pos x
x = (target(1401),pos x - pos x)*facing

[State 1300, 5]
type = helper
triggerall = numtarget(1401) > 0
triggerall = target(1401),stateno = 8302
trigger1 = target,time = 1
trigger2 = target(1401),time = 26
stateno = 103
name = "dust"
pos = ceil(target(1401),pos x-pos x)*facing,0
facing = -1
pausemovetime = 9999
ownpal = 1

[State 2, 0]
type = playsnd
trigger1 = numtarget(1401) > 0
trigger1 = target(1401),stateno = 8302
trigger1 = target(1401),time = 1
value = s1,1
ignorehitpause = 1
;------------------------------------
; force guard ground j
[Statedef 1405]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 200, 4]
type = destroyself
trigger1 = parent,numhelper(1400) = 0 && parent,stateno != 1400
trigger1 = parent,numhelper(1500) = 0 && parent,stateno != 1500
;------------------------------------
; hit by jubak
[Statedef 1406]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
anim = 5010

[State 5000, 1]
type = defencemulset
trigger1 = 1
value = 1
[State 1531, 5]
type = varset
trigger1 = time = 0
sysvar(3) = 0

[State 1531, 5]
type = varadd
trigger1 = command = "struggle"
sysvar(3) = 1

[State 1531, 5]
type = varset
trigger1 = time = 1
sysvar(4) = ifelse(matchno>1&&matchno<13,(matchno-1)*4,ifelse(matchno>12,48,0))

[State 1531, 5]
type = varset
triggerall = time = 2
trigger1 = authorname="ihoo1836"&&(name="kurokishi"||name="thin nen")&&var(55)=1
trigger2 = authorname="ihoo1836"&&name="D'raven"&&fvar(35)=1
trigger3 = authorname="[yagami+ihoo1836]"&&name="Iori yagami"&&var(55)=1
sysvar(4) = 44+ifelse(matchno>12,4,0)

[State 200, 4]
type = changestate
trigger1 = !alive
value = 8300
ignorehitpause = 1

[State 200, 4]
type = statetypeset
trigger1 = statetype != S && pos y >= 0
statetype = S
physics = S

[State -2, 0]
type = posadd
trigger1 = pos y < 0 && time > 1
y = ifelse(pos y + 10 <= 0,10,-pos y)

[State 200, 4]
type = changeanim
trigger1 = 1
value = 5010

[State 200, 4]
type = statetypeset
trigger1 = pos y >= 0
trigger1 = time >= 88-sysvar(3)*2-sysvar(4)
movetype = I
[State 200, 4]
type = selfstate
trigger1 = pos y >= 0
trigger1 = time > 88-sysvar(3)*2-sysvar(4)
value = 0
ctrl = 1
;------------------------------------
; Ju bak bu1
[Statedef 1500]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1500
sprpriority = 0
facep2 = 1
poweradd = 50

[State 200, 3]
type = varset
trigger1 = time = 0
var(34) = 0
[State 230, 1]
type = varset
trigger1 = time = 0
var(17) = 0

[State 230, 1]
type = varset
trigger1 = var(17) != 1 && var(16) = 1
trigger1 = (prevstateno = [200,380]) && prevstateno != 312 && prevstateno != 210 && prevstateno != 220 && prevstateno != 310 && prevstateno != 320
trigger2 = var(17) != 1 && var(16) = 1
trigger2 = (prevstateno = [410,520]) && prevstateno != 430 && prevstateno != 500
trigger3 = var(17) != 1 && var(18) > 0
var(17) = 1

[State 1000, 4]
type = Projectile
trigger1 = animelem = 7,0
projanim = 1506
offset = 0,0
projremovetime = 1
projedgebound = 210
projstagebound = 210
[State 1000, 4]
type = Projectile
trigger1 = animelem = 7,1
projanim = 1506
offset = -3,0
projremovetime = 1
projedgebound = 210
projstagebound = 210

[State 52, 2]
type = Playsnd
trigger1 = animelem = 5
value = s6,7
channel = 3
[State 52, 2]
type = varset
trigger1 = animelem = 8
var(20) = 7
[State 1300, 5]
type = helper
trigger1 = animelem = 8
stateno = 1501
id = 1500
name = "talisman"
pos = 12,-60
ownpal = 1

[State 1300, 5]
type = helper
trigger1 = animelem = 1 && numhelper(1405) < 2
stateno = 1405
id = 1405
name = "fguard"
pos = 100,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = animelem = 1 && numhelper(1405) < 2
stateno = 1405
id = 1405
name = "fguard"
pos = 200,0
pausemovetime = 9999
ownpal = 1

[State 230, 1]
type = width
trigger1 = animelem = 8,>=0 && animelem = 9,<0
value = 0,15
[State 230, 1]
type = posadd
trigger1 = animelem = 8
x = 15
[State 230, 1]
type = posadd
trigger1 = animelem = 9
x = -15

[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; talisman1
[Statedef 1501]
type    = A
movetype= A
physics = N
juggle  = 16
ctrl = 0
velset = 4,0
anim = 1501
sprpriority = 3

[State 230, 2]
type = sprpriority
trigger1 = 1
value = 3
[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2, 0]
type = parentvarset
trigger1 = movecontact = 0
var(13) = 0
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0
var(13) = 1
[State 2, 0]
type = parentvarset
trigger1 = moveguarded > 0
var(13) = 2
[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(1501) > 0
value = 1506
id = 1501
ignorehitpause = 1
[State 2, 0]
type = parentvarset
trigger1 = movehit > 0 && numtarget(1501) > 0
var(19) = ceil(pos y - target(1501),pos y)
[State 1300, 5]
type = changestate
trigger1 = movecontact > 0
value = 1504
[State 1300, 5]
type = helper
trigger1 = parent,numprojid(1500) = 0 && time > 0
stateno = 1502
name = "tremove"
pos = 0,0
pausemovetime = 9999
ownpal = 1
[State 200, 3]
type = parentvarset
trigger1 = parent,numprojid(1500) = 0 && time > 0
trigger2 = frontedgedist < -64
var(34) = 1
[State 200, 4]
type = destroyself
trigger1 = parent,numprojid(1500) = 0 && time > 0
trigger2 = frontedgedist < -64
[State 1000, 4]
type = Projectile
trigger1 = movecontact = 0
attr = S,SP
projanim = 1502
projid = 1500
offset = 0,0
projremovetime = 1
projedgebound = 210
projstagebound = 210
[State 1020, 4]
type = hitdef
triggerall = movecontact = 0
trigger1 = parent,var(17) = 0
trigger2 = parent,var(17) = 1 && p2movetype != H && parent,stateno = 1500
attr = S, SP
damage    = 21
ID = 1501
pausetime = 0,2
animtype = h
hitflag = MA
guardflag = M
sparkno = s7000+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
guard.sparkno = s7041+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
sparkxy = 5+ifelse(p2dist x < 0,ceil(p2dist x/2),0),ifelse(p2dist y<60,ceil((p2dist y-60)/4),0)+ifelse(p2statetype=C,16,0)
hitsound = -1
guardsound = s3,9
ground.type = low
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.hittime  = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
air.juggle = 16
guard.velocity = -5.2
ground.velocity = 0
p2facing = 1
hitonce = 1
air.velocity = 0,0
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
;------------------------------------
; t remove1
[Statedef 1502]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1503
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 200, 4]
type = destroyself
trigger1 = time >= 12
;------------------------------------
; t remove hit
[Statedef 1504]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, 1]
type = playsnd
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),alive = 0 && target(1501),stateno != [8300,8307]
trigger1 = target(1501),stateno != 5101 && target(1501),stateno != 5110
trigger1 = target(1501),stateno != 5100 && target(1501),stateno != 5150
value = s3,5
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = targetstate
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),alive = 0 && target(1501),stateno != [8300,8307]
trigger1 = target(1501),stateno != 5101 && target(1501),stateno != 5110
trigger1 = target(1501),stateno != 5100 && target(1501),stateno != 5150
value = 8304
id = 1501
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1501) > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = Playsnd
trigger1 = parent,var(13) = 1 && time = 1
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 1506 && target(1501),movetype = H
value = s6,6

[State -2, 1]
type = parentvaradd
trigger1 = parent,var(13) = 2 && time = 1
var(51) = ceil(40*(2-parent,var(51)/690.0))
[State 52, 2]
type = Playsnd
trigger1 = parent,var(13) > 0 && time = 1
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno != 5300
trigger1 = parent,var(20) > 1
value = s6,5
ignorehitpause = 1
[State 2, 0]
type = parentvarset
trigger1 = parent,var(13) > 0 && time = 1
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno != 5300
trigger1 = parent,var(20) > 1
var(20) = 0
[State 111, 0]
type = parentvarset
trigger1 = parent,var(13) != 0 && time = 1
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno != 5300
var(23) = 12-ifelse(parent,var(13)=2,2,0)
ignorehitpause = 1
[State 200, 3]
type = parentvarset
trigger1 = time = 0
trigger1 = parent,var(13) != 1 || numtarget(1501) = 0
var(34) = 1
[State 2, 0]
type = pause
trigger1 = parent,var(13) = 1 && time = 1
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno != 5300
time = 10
[State 2, 0]
type = pause
trigger1 = parent,var(13) = 2 && time = 1
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno != 5300
time = 8

[State 1300, 5]
type = changeanim
trigger1 = time = 2
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 1506 && target(1501),movetype = H
value = 1504+ifelse((target(1501),const(size.head.pos.y))>-50,3,0)
[State 1300, 5]
type = helper
trigger1 = time = 0
stateno = 1502
name = "t remove"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 1300, 5]
type = pause
triggerall = roundstate < 3
triggerall = numtarget(1501) > 0
triggerall = target(1501),stateno = 1506 && target(1501),movetype = H
trigger1 = time >= 2 && time <= 15
trigger2 = time > 15 && time%3 != 1
time = 1
[State 1300, 5]
type = explod
trigger1 = time >= 2 && numexplod(1505) < 3
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 1506 && target(1501),movetype = H
trigger1 = p2stateno = 1506 && p2movetype = H
anim = 1505
id = 1505
postype = p2
pos = -33,-73+ifelse((target(1501),const(size.head.pos.y))>-50,10,0)
shadow = 0,0,0
ignorehitpause = 1
pausemovetime = 999
sprpriority = 4
ownpal = 1
facing = -1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time >= 2 && numexplod(1505) < 3
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 1506 && target(1501),movetype = H
trigger1 = p2stateno = 1506 && p2movetype = H
anim = 1505
id = 1505
postype = p2
pos = -1,-105+ifelse((target(1501),const(size.head.pos.y))>-50,10,0)
shadow = 0,0,0
ignorehitpause = 1
pausemovetime = 999
sprpriority = 4
ownpal = 1
facing = -1
removetime = -1
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time >= 2 && numexplod(1505) < 3
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 1506 && target(1501),movetype = H
trigger1 = p2stateno = 1506 && p2movetype = H
anim = 1505
id = 1505
postype = p2
pos = 47,-41+ifelse((target(1501),const(size.head.pos.y))>-50,10,0)
shadow = 0,0,0
ignorehitpause = 1
pausemovetime = 999
sprpriority = 4
ownpal = 1
facing = -1
removetime = -1
bindtime = -1
[State 1300, 5]
type = removeexplod
triggerall = time >= 2
trigger1 = numtarget(1501) = 0
trigger2 = numtarget(1501) > 0
trigger2 = target(1501),stateno != 1506 || target(1501),movetype != H

[State 200, 4]
type = destroyself
triggerall = time >= 14
trigger1 = numtarget(1501) = 0
trigger2 = numtarget(1501) > 0
trigger2 = target(1501),alive = 1
trigger2 = target(1501),stateno != 1506 || target(1501),movetype != H
trigger3 = numtarget(1501) > 0
trigger3 = target(1501),stateno != [8304,8307]
trigger3 = target(1501),stateno != 1506 || target(1501),movetype != H

[State 1300, 5]
type = posadd
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 1506 && target(1501),movetype = H
trigger1 = target(1501),pos x != pos x
x = (target(1501),pos x - pos x)*facing
[State 1300, 5]
type = posset
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 1506 && target(1501),movetype = H
trigger1 = (pos y - target(1501),pos y) != parent,var(19)+ifelse((target(1501),pos y + 10) <= 0,10,-(target(1501),pos y))
trigger1 = target(1501),pos y < 0
y = target(1501),pos y+parent,var(19)+ifelse((target(1501),pos y + 10) <= 0,10,-(target(1501),pos y))

[State 1300, 5]
type = helper
triggerall = numtarget(1501) > 0
triggerall = target(1501),stateno = 8306
trigger1 = target,time = 1
trigger2 = target(1501),time = 26
stateno = 104
name = "dust"
pos = ceil(target(1501),pos x-pos x)*facing,0
pausemovetime = 9999
ownpal = 1

[State 2, 0]
type = playsnd
trigger1 = numtarget(1501) > 0
trigger1 = target(1501),stateno = 8306
trigger1 = target(1501),time = 1
value = s1,0
ignorehitpause = 1
;------------------------------------
; hit by jubak1
[Statedef 1506]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
anim = 5010

[State 5000, 1]
type = defencemulset
trigger1 = 1
value = 1
[State 1531, 5]
type = varset
trigger1 = time = 0
sysvar(3) = 0

[State 1531, 5]
type = varadd
trigger1 = command = "struggle"
sysvar(3) = 1

[State 1531, 5]
type = varset
trigger1 = time = 1
sysvar(4) = ifelse(matchno>1&&matchno<13,(matchno-1)*4-1,ifelse(matchno>12,47,0))

[State 1531, 5]
type = varset
triggerall = time = 2
trigger1 = authorname="ihoo1836"&&(name="kurokishi"||name="thin nen")&&var(55)=1
trigger2 = authorname="ihoo1836"&&name="D'raven"&&fvar(35)=1
trigger3 = authorname="[yagami+ihoo1836]"&&name="Iori yagami"&&var(55)=1
sysvar(4) = 43+ifelse(matchno>12,4,0)

[State 200, 4]
type = changestate
trigger1 = !alive
value = 8300
ignorehitpause = 1

[State 200, 4]
type = statetypeset
trigger1 = statetype != S && pos y >= 0
statetype = S
physics = S

[State -2, 0]
type = posadd
trigger1 = pos y < 0 && time > 1
y = ifelse(pos y + 10 <= 0,10,-pos y)

[State 200, 4]
type = changeanim
trigger1 = time < 4 || time >= 87-sysvar(3)*2-sysvar(4)
value = 5010
[State 200, 4]
type = changeanim
trigger1 = time >= 4 && time < 87-sysvar(3)*2-sysvar(4)
value = 5000

[State 200, 4]
type = statetypeset
trigger1 = pos y >= 0
trigger1 = time >= 87-sysvar(3)*2-sysvar(4)
movetype = I
[State 200, 4]
type = selfstate
trigger1 = pos y >= 0
trigger1 = time > 87-sysvar(3)*2-sysvar(4)
value = 0
ctrl = 1
;------------------------------------
; Yul gyang gyun y
[Statedef 1600]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1600
sprpriority = 1
facep2 = 1
poweradd = 50

[State 260, 0]
type = targetstate
trigger1 = numtarget(1600) > 0 && movehit > 0
trigger1 = target(1600),alive = 0 && target(1600),stateno != [8300,8307]
trigger1 = target(1600),stateno != 5101 && target(1600),stateno != 5110
trigger1 = target(1600),stateno != 5100 && target(1600),stateno != 5150
value = 8300
id = 1600
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1600) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 0 && numhelper(1601) < 1
stateno = 1601
id = 1601
name = "fguard"
pos = 20,0
pausemovetime = 9999
ownpal = 1

[State 40, 5]
type = Varset
trigger1 = time = 0
var(12) = 0
[State 40, 5]
type = Varadd
trigger1 = movecontact > 0 && hitpausetime = 5
var(12) = 1
ignorehitpause = 1
[State 52, 2]
type = Playsnd
triggerall = var(12) < 2
trigger1 = animelem = 5 || animelem = 7 || animelem = 9
trigger2 = animelem = 11 || animelem = 13 || animelem = 15
trigger3 = animelem = 17 || animelem = 19 || animelem = 21
value = s6,9
channel = 5
[State 52, 2]
type = Playsnd
trigger1 = animelem = 24 && var(12) < 2
value = s6,9
channel = 5
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 5
value = s7,1
channel = 4

[State 230, 2]
type = PlaySnd
trigger1 = movehit > 0 && var(4) > 8
trigger1 = animelem = 24,<0 && hitpausetime = 5
value = s4,8
channel = 6
ignorehitpause = 1
[State 230, 2]
type = StopSnd
trigger1 = movehit > 0
trigger1 = animelem = 24,>=0
channel = 6
ignorehitpause = 1

[State 40, 5]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 40, 5]
type = Varadd
trigger1 = time > 0
var(4) = 1

[State 200, 3]
type = movehitreset
trigger1 = animelem = 24,<0
[State 200, 3]
type = HitDef
trigger1 = animelem = 23,<0
trigger1 = (var(4)%6 = 2 || var(4)%6 > 3) && p2dist y >= -50
attr = S, SA
damage    = 4,2-ifelse(var(4)%3<2,1,0)
ID = 1600
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5+ifelse(var(4)%6=3,5,0),-55+ifelse(var(4)%6=3,41,0)-ifelse(var(4)%6=4,22,0)-ifelse(var(4)%6=5,10,0)-ifelse(var(4)%6=0,7,0)+ifelse(var(4)%6=1,10,0)+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,ifelse((animelem=5),8,99)
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 23,<0
trigger1 = var(4)%6 = 3 || p2dist y < -50
attr = S, SA
damage    = 4,2-ifelse(var(4)%3<2,1,0)
ID = 1600
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5+ifelse(var(4)%6=3,5,0),-55+ifelse(var(4)%6=3,41,0)-ifelse(var(4)%6=4,22,0)-ifelse(var(4)%6=5,10,0)-ifelse(var(4)%6=0,7,0)+ifelse(var(4)%6=1,10,0)+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,ifelse((animelem=5),8,99)
guardsound = s3,7
ground.type = low
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 23,<0
trigger1 = var(4)%6 < 2 && p2dist y >= -50
attr = S, SA
damage    = 4,2-ifelse(var(4)%3<2,1,0)
ID = 1600
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5+ifelse(var(4)%6=3,5,0),-55+ifelse(var(4)%6=3,41,0)-ifelse(var(4)%6=4,22,0)-ifelse(var(4)%6=5,10,0)-ifelse(var(4)%6=0,7,0)+ifelse(var(4)%6=1,10,0)+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,ifelse((animelem=5),8,99)
guardsound = s3,7
ground.type = low
air.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 24
attr = S, SA
damage    = 152,20
ID = 1600
pausetime = 22,22
guard.pausetime = 21,21
animtype = H
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 0,-57+ifelse(p2dist y < 0,ceil(p2dist y/8),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
p2facing = 1
guard.velocity = -11.5
ground.velocity = -7.3,-4
air.velocity = -7.3,-4
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -18.5
fall.xvelocity = -3
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 24,7

[State 1300, 5]
type = helper
triggerall = numtarget(1600) > 0 && movecontact > 0
trigger1 = target(1600),pos y > -9
trigger1 = hitpausetime = 5 && animelem = 24,<0
trigger2 = hitpausetime = 21-ifelse(moveguarded>0,1,0) && animelem = 24,>=0
trigger2 = target(1600),pos y > -1
stateno = 107+ifelse(moveguarded>0,1,0)
name = "dust"
pos = ceil(target(1600),pos x-pos x)*facing,0
ignorehitpause = 1
pausemovetime = 9999
ownpal = 1

[State 1002, 4]
type = Targetstate
trigger1 = animelem = 24,<0
trigger1 = movehit > 0 && numtarget(1600) > 0
trigger1 = target(1600),stateno != 1605 && target(1600),alive
trigger1 = target(1600),statetype != C && target(1600),prevstateno != 1608 && target(1600),prevstateno != 1609
value = 1605
id = 1600
ignorehitpause = 1
[State 1002, 4]
type = Targetstate
trigger1 = animelem = 24,<0
trigger1 = movehit > 0 && numtarget(1600) > 0
trigger1 = target(1600),stateno != 1608 && target(1600),alive
trigger1 = target(1600),statetype = C || target(1600),prevstateno = 1608 || target(1600),prevstateno = 1609
value = 1608
id = 1600
ignorehitpause = 1

[State -2, 0]
type = varset
trigger1 = animelem = 24,>=0 && animelem = 24,<=7
trigger1 = movehit > 0 && numtarget(1600) > 0
var(7) = 14+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = animelem = 24,>=0 && animelem = 24,<=7
trigger1 = movehit > 0 && numtarget(1600) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 24,>= 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; force guard rekkoken
[Statedef 1601]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 200, 4]
type = turn
trigger1 = facing != parent,facing

[State 200, 4]
type = bindtoparent
trigger1 = 1
pos = 20,0

[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 8 && parent,var(4) < 9
trigger2 = parent,var(4) >= 14 && parent,var(4) < 15
trigger3 = parent,var(4) >= 20 && parent,var(4) < 21 && parent,stateno = 1600
anim = 1601
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 9 && parent,var(4) < 10
trigger2 = parent,var(4) >= 15 && parent,var(4) < 16
trigger3 = parent,var(4) >= 21 && parent,var(4) < 22 && parent,stateno = 1600
anim = 1602
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 10 && parent,var(4) < 11
trigger2 = parent,var(4) >= 16 && parent,var(4) < 17
trigger3 = parent,var(4) >= 22 && parent,var(4) < 23 && parent,stateno = 1600
anim = 1603
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 11 && parent,var(4) < 12
trigger2 = parent,var(4) >= 17 && parent,var(4) < 18
trigger3 = parent,var(4) >= 23 && parent,var(4) < 24 && parent,stateno = 1600
anim = 1604
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 12 && parent,var(4) < 13
trigger2 = parent,var(4) >= 18 && parent,var(4) < 19
trigger3 = parent,var(4) >= 24 && parent,var(4) < 25 && parent,stateno = 1600
anim = 1605
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 13 && parent,var(4) < 14
trigger2 = parent,var(4) >= 19 && parent,var(4) < 20
trigger3 = parent,var(4) >= 25 && parent,var(4) < 26 && parent,stateno = 1600
anim = 1606
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 26 && parent,var(4) < 27 && parent,stateno = 1600
trigger2 = parent,var(4) >= 20 && parent,var(4) < 21 && parent,stateno = 1620
anim = 1607
pos = ceil(parent,pos x - pos x)*facing-47,10
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1

[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 27 && parent,var(4) < 34 && parent,stateno = 1600
trigger2 = parent,var(4) >= 21 && parent,var(4) < 28 && parent,stateno = 1620
anim = 1607
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 34 && parent,var(4) < 38 && parent,stateno = 1600
trigger2 = parent,var(4) >= 28 && parent,var(4) < 32 && parent,stateno = 1620
anim = 1608
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 38 && parent,var(4) < 42 && parent,stateno = 1600
trigger2 = parent,var(4) >= 32 && parent,var(4) < 36 && parent,stateno = 1620
anim = 1609
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1
[State 3000]
type = explod
triggerall = gametime%2 = 0
trigger1 = parent,var(4) >= 42 && parent,var(4) < 46 && parent,stateno = 1600
trigger2 = parent,var(4) >= 36 && parent,var(4) < 40 && parent,stateno = 1620
anim = 1610
pos = ceil(parent,pos x - pos x)*facing,0
shadow = 0,0,0
pausemovetime = 99
sprpriority = 2
ownpal = 1
removetime = 1

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 1600 && parent,stateno != 1620
trigger2 = parent,movetype != A
;------------------------------------
; Yul spark1
[Statedef 1602]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 1607
sprpriority = 2

[State 200, 4]
type = destroyself
trigger1 = animtime = 0
;------------------------------------
; Yul spark2
[Statedef 1603]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 1608
sprpriority = 2

[State 200, 4]
type = destroyself
trigger1 = animtime = 0
;------------------------------------
; Yul spark3
[Statedef 1604]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 1609
sprpriority = 2

[State 200, 4]
type = destroyself
trigger1 = animtime = 0
;------------------------------------
; Yul spark4
[Statedef 1607]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 1610
sprpriority = 2

[State 200, 4]
type = destroyself
trigger1 = animtime = 0
;------------------------------------
; hit by Yul gyang gyun
[Statedef 1605]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5000, 1]
type = defencemulset
trigger1 = 1
value = 1
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 152 || prevstateno = 153 || prevstateno = 131
value = 152

[State 200, 4]
type = changestate
trigger1 = !alive
value = 8300
ignorehitpause = 1

[State 5000, 1]
type = ChangeAnim
trigger1 = Time = 0 && pos y >= 0
value = ifelse((GetHitVar(groundtype) = 1),5001,5011)
[State 5000, 1]
type = ChangeAnim
trigger1 = Time = 0 && pos y < 0
value = ifelse((GetHitVar(airtype) = 1),5001,5011)

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

[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,1,0)
y = -1.5
[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,2,1)
y = 0

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 1606

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

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

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 1606]
type    = A
movetype= H
physics = N

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

[State 200, 4]
type = veladd
trigger1 = pos y < 0
y = .45

[State 200, 4]
type = velset
trigger1 = pos y >= 0 && vel y != 0
y = 0
[State 200, 4]
type = posset
trigger1 = pos y > 0
y = 0

[State 200, 4]
type = statetypeset
trigger1 = statetype != S && pos y >= 0
statetype = S

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim = 5001 || anim = 5011
value = anim + 5

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

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

[State 5001, 6]
type = selfState
trigger1 = HitOver && pos y >= 0
value = 0
ctrl = 1
;------------------------------------
; hit by Yul gyang gyun C
[Statedef 1608]
type    = C
movetype= H
physics = N
velset = 0,0

[State 5000, 1]
type = defencemulset
trigger1 = 1
value = 1
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 152 || prevstateno = 153 || prevstateno = 131
value = 152

[State 200, 4]
type = changestate
trigger1 = !alive
value = 8300
ignorehitpause = 1

[State 5000, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 5021

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

[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,1,0)
y = -1.5
[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,2,1)
y = 0

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 1609

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

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

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

[State 9401, 6]
type = HitOverride
trigger1 = pos y < 0
attr = SCA,AA,AT,AP
stateno = 5020
ignorehitpause = 1
;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 1609]
type    = C
movetype= H
physics = N

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

[State 200, 4]
type = veladd
trigger1 = pos y < 0
y = .45

[State 200, 4]
type = velset
trigger1 = pos y >= 0 && vel y != 0
y = 0
[State 200, 4]
type = posset
trigger1 = pos y > 0
y = 0

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim = 5021
value = 5026

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

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

[State 5001, 6]
type = selfState
trigger1 = HitOver && pos y >= 0
value = 11
ctrl = 1

[State 9401, 6]
type = HitOverride
trigger1 = pos y < 0
attr = SCA,AA,AT,AP
stateno = 5020
ignorehitpause = 1
;------------------------------------
; Yul gyang gyun x
[Statedef 1620]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1620
sprpriority = 1
facep2 = 1
poweradd = 50

[State 260, 0]
type = targetstate
trigger1 = numtarget(1620) > 0 && movehit > 0
trigger1 = target(1620),alive = 0 && target(1620),stateno != [8300,8307]
trigger1 = target(1620),stateno != 5101 && target(1620),stateno != 5110
trigger1 = target(1620),stateno != 5100 && target(1620),stateno != 5150
value = 8300
id = 1620
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1620) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 0 && numhelper(1601) < 1
stateno = 1601
id = 1601
name = "fguard"
pos = 20,0
pausemovetime = 9999
ownpal = 1

[State 40, 5]
type = Varset
trigger1 = time = 0
var(12) = 0
[State 40, 5]
type = Varadd
trigger1 = movecontact > 0 && hitpausetime = 5
var(12) = 1
ignorehitpause = 1
[State 52, 2]
type = Playsnd
triggerall = var(12) < 2
trigger1 = animelem = 5 || animelem = 7 || animelem = 9
trigger2 = animelem = 11 || animelem = 13 || animelem = 15
value = s6,9
channel = 5
[State 52, 2]
type = Playsnd
trigger1 = animelem = 18 && var(12) < 2
value = s6,9
channel = 5
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 5
value = s7,1
channel = 4

[State 230, 2]
type = PlaySnd
trigger1 = movehit > 0 && var(4) > 8
trigger1 = animelem = 18,<0 && hitpausetime = 5
value = s4,8
channel = 6
ignorehitpause = 1
[State 230, 2]
type = StopSnd
trigger1 = movehit > 0
trigger1 = animelem = 18,>=0
channel = 6
ignorehitpause = 1

[State 40, 5]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 40, 5]
type = Varadd
trigger1 = time > 0
var(4) = 1

[State 200, 3]
type = movehitreset
trigger1 = animelem = 18,<0
[State 200, 3]
type = HitDef
trigger1 = animelem = 17,<0
trigger1 = (var(4)%6 = 2 || var(4)%6 > 3) && p2dist y >= -50
attr = S, SA
damage    = 4,1
ID = 1620
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5+ifelse(var(4)%6=3,5,0),-55+ifelse(var(4)%6=3,41,0)-ifelse(var(4)%6=4,22,0)-ifelse(var(4)%6=5,10,0)-ifelse(var(4)%6=0,7,0)+ifelse(var(4)%6=1,10,0)+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,ifelse((animelem=5),8,99)
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 17,<0
trigger1 = var(4)%6 = 3 || p2dist y < -50
attr = S, SA
damage    = 4,1
ID = 1620
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5+ifelse(var(4)%6=3,5,0),-55+ifelse(var(4)%6=3,41,0)-ifelse(var(4)%6=4,22,0)-ifelse(var(4)%6=5,10,0)-ifelse(var(4)%6=0,7,0)+ifelse(var(4)%6=1,10,0)+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,ifelse((animelem=5),8,99)
guardsound = s3,7
ground.type = low
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 17,<0
trigger1 = var(4)%6 < 2 && p2dist y >= -50
attr = S, SA
damage    = 4,1
ID = 1620
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5+ifelse(var(4)%6=3,5,0),-55+ifelse(var(4)%6=3,41,0)-ifelse(var(4)%6=4,22,0)-ifelse(var(4)%6=5,10,0)-ifelse(var(4)%6=0,7,0)+ifelse(var(4)%6=1,10,0)+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,ifelse((animelem=5),8,99)
guardsound = s3,7
ground.type = low
air.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 18
attr = S, SA
damage    = 122,19
ID = 1620
pausetime = 22,22
guard.pausetime = 21,21
animtype = H
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 0,-57+ifelse(p2dist y < 0,ceil(p2dist y/8),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
p2facing = 1
guard.velocity = -11.5
ground.velocity = -7.3,-4
air.velocity = -7.3,-4
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -18.5
fall.xvelocity = -3
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 18,7

[State 1300, 5]
type = helper
triggerall = numtarget(1620) > 0 && movecontact > 0
trigger1 = target(1620),pos y > -9
trigger1 = hitpausetime = 5 && animelem = 18,<0
trigger2 = hitpausetime = 21-ifelse(moveguarded>0,1,0) && animelem = 18,>=0
trigger2 = target(1620),pos y > -1
stateno = 107+ifelse(moveguarded>0,1,0)
name = "dust"
pos = ceil(target(1620),pos x-pos x)*facing,0
ignorehitpause = 1
pausemovetime = 9999
ownpal = 1

[State 1002, 4]
type = Targetstate
trigger1 = animelem = 18,<0
trigger1 = movehit > 0 && numtarget(1620) > 0
trigger1 = target(1620),stateno != 1605 && target(1620),alive
trigger1 = target(1620),statetype != C && target(1620),prevstateno != 1608 && target(1620),prevstateno != 1609
value = 1605
id = 1620
ignorehitpause = 1
[State 1002, 4]
type = Targetstate
trigger1 = animelem = 18,<0
trigger1 = movehit > 0 && numtarget(1620) > 0
trigger1 = target(1620),stateno != 1608 && target(1620),alive
trigger1 = target(1620),statetype = C || target(1620),prevstateno = 1608 || target(1620),prevstateno = 1609
value = 1608
id = 1620
ignorehitpause = 1

[State -2, 0]
type = varset
trigger1 = animelem = 18,>=0 && animelem = 18,<=7
trigger1 = movehit > 0 && numtarget(1620) > 0
var(7) = 14+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = animelem = 18,>=0 && animelem = 18,<=7
trigger1 = movehit > 0 && numtarget(1620) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 18,>= 0
var(51) = ceil(47*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; Yul gyang gyun b
[Statedef 1700]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1700
sprpriority = 1
facep2 = 1
poweradd = 50

[State 260, 0]
type = targetstate
trigger1 = numtarget(1700) > 0 && movehit > 0
trigger1 = target(1700),alive = 0 && target(1700),stateno != [8300,8307]
trigger1 = target(1700),stateno != 5101 && target(1700),stateno != 5110
trigger1 = target(1700),stateno != 5100 && target(1700),stateno != 5150
value = 8304
id = 1700
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1700) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 0 && numhelper(1701) < 1
stateno = 1701
id = 1701
name = "fguard"
pos = 20,0
pausemovetime = 9999
ownpal = 1

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 5
value = s7,2
channel = 4
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 9 || animelem = 13 || animelem = 17 || animelem = 21 || animelem = 25
value = s7,0
channel = 5

[State 200, 4]
type = posadd
trigger1 = time = 0
x = 20
[State 200, 4]
type = posadd
trigger1 = animelem = 30
x = -20
[State 100, 4]
type = width
trigger1 = animelem = 30,<0
value = 0,20

[State 40, 5]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 40, 5]
type = Varadd
trigger1 = time > 0
var(4) = 1

[State 230, 2]
type = PlaySnd
trigger1 = moveguarded > 0 && var(4) > 8
trigger1 = animelem = 28,<0 && hitpausetime = 5
value = s3,9
channel = 7
ignorehitpause = 1
[State 230, 2]
type = StopSnd
trigger1 = moveguarded > 0
trigger1 = animelem = 28,>=0
channel = 7
ignorehitpause = 1
[State 230, 2]
type = PlaySnd
trigger1 = movehit > 0 && var(4) > 8
trigger1 = animelem = 28,<0 && hitpausetime = 5
value = s4,9
channel = 6
ignorehitpause = 1
[State 230, 2]
type = StopSnd
trigger1 = movehit > 0
trigger1 = animelem = 28,>=0
channel = 6
ignorehitpause = 1

[State 40, 5]
type = Varrandom
trigger1 = time = 0
v = 12
range = 1

[State 40, 5]
type = Varset
trigger1 = animelem = 27,<0
var(21) = -ifelse(var(4)%2=1,33-ifelse(p2statetype=C,21,0),0)+ifelse(p2dist y < 0,ceil(p2dist y/(1+ifelse(p2dist y<-30,-ceil(p2dist y/20)*0.5,0))),0)+ifelse(p2dist y<=-20,10,0)+ifelse(var(4)%2=0&&p2dist y<=-55,ceil((p2dist y+55)*1.5),0)

[State 200, 3]
type = movehitreset
trigger1 = animelem = 28,<0
[State 200, 3]
type = HitDef
trigger1 = animelem = 27,<0
trigger1 = var(4)%2 = 0 || p2dist y < -50
attr = S, SA
damage    = 5,2-ifelse(var(4)%3<2,1,0)
ID = 1700
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 0+ifelse(p2dist x<70,ceil((p2dist x-70)/2),0),-44+var(21)+ifelse(var(4)%2=1&&p2dist y>-20&&(enemynear,const(size.head.pos.y)>-50),10,0)
hitsound = s4,ifelse((animelem=9),9,99)
guardsound = s3,ifelse((animelem=9),9,99)
ground.type = low
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 27,<0
trigger1 = var(4)%2 = 1 && p2dist y >= -50
attr = S, SA
damage    = 5,2-ifelse(var(4)%3<2,1,0)
ID = 1700
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = ifelse(var(12)=1,5,-5)+ifelse(p2dist x<70,ceil((p2dist x-70)/2),0),-44+var(21)+ifelse(var(4)%2=1&&p2dist y>-20&&(enemynear,const(size.head.pos.y)>-50),10,0)
hitsound = s4,ifelse((animelem=9),9,99)
guardsound = s3,ifelse((animelem=9),9,99)
ground.type = high
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 29
attr = S, SA
damage    = 134,20
ID = 1700
pausetime = 22,22
guard.pausetime = 21,21
animtype = H
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 0+ifelse(p2dist x<70,ceil((p2dist x-70)/2),0),-56+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,9
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
p2facing = 1
guard.velocity = -20
ground.velocity = -5,-7.5
air.velocity = -5,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -33
fall.xvelocity = -3
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 1300, 5]
type = helper
triggerall = numtarget(1700) > 0 && movecontact > 0
trigger1 = target(1700),pos y > -10
trigger1 = hitpausetime = 5 && animelem = 29,<0
trigger2 = hitpausetime = 21-ifelse(moveguarded>0,1,0) && animelem = 29,>=0
trigger2 = target(1700),pos y > -1
stateno = 106
name = "dust"
pos = ceil(target(1700),pos x-pos x)*facing,0
ignorehitpause = 1
pausemovetime = 9999
ownpal = 1

[State 1002, 4]
type = Targetstate
trigger1 = animelem = 28,<0
trigger1 = movehit > 0 && numtarget(1700) > 0
trigger1 = target(1700),stateno != 1705 && target(1700),alive
trigger1 = target(1700),statetype != C && target(1700),prevstateno != 1708 && target(1700),prevstateno != 1609
value = 1705
id = 1700
ignorehitpause = 1
[State 1002, 4]
type = Targetstate
trigger1 = animelem = 28,<0
trigger1 = movehit > 0 && numtarget(1700) > 0
trigger1 = target(1700),stateno != 1708 && target(1700),alive
trigger1 = target(1700),statetype = C || target(1700),prevstateno = 1708 || target(1700),prevstateno = 1609
value = 1708
id = 1700
ignorehitpause = 1

[State -2, 0]
type = varset
trigger1 = animelem = 29,>=0 && animelem = 30,<=0
trigger1 = movehit > 0 && numtarget(1700) > 0
var(7) = 14
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = animelem = 29,>=0 && animelem = 30,<=0
trigger1 = movehit > 0 && numtarget(1700) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 29,>= 0
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; force guard rekkoken1
[Statedef 1701]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 200, 4]
type = bindtoparent
trigger1 = 1
pos = 20,0

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 1700 && parent,stateno != 1710
trigger2 = parent,movetype != A
;------------------------------------
; Yul gyang gyun a
[Statedef 1710]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1710
sprpriority = 1
facep2 = 1
poweradd = 50

[State 260, 0]
type = targetstate
trigger1 = numtarget(1710) > 0 && movehit > 0
trigger1 = target(1710),alive = 0 && target(1710),stateno != [8300,8307]
trigger1 = target(1710),stateno != 5101 && target(1710),stateno != 5110
trigger1 = target(1710),stateno != 5100 && target(1710),stateno != 5150
value = 8304
id = 1710
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1710) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = time = 0 && numhelper(1701) < 1
stateno = 1701
id = 1701
name = "fguard"
pos = 20,0
pausemovetime = 9999
ownpal = 1

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 5
value = s7,2
channel = 4
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 9 || animelem = 13 || animelem = 17
value = s7,0
channel = 5

[State 200, 4]
type = posadd
trigger1 = time = 0
x = 20
[State 200, 4]
type = posadd
trigger1 = animelem = 24
x = -20
[State 100, 4]
type = width
trigger1 = animelem = 24,<0
value = 0,20

[State 40, 5]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 40, 5]
type = Varadd
trigger1 = time > 0
var(4) = 1

[State 230, 2]
type = PlaySnd
trigger1 = moveguarded > 0 && var(4) > 8
trigger1 = animelem = 22,<0 && hitpausetime = 5
value = s3,9
channel = 7
ignorehitpause = 1
[State 230, 2]
type = StopSnd
trigger1 = moveguarded > 0
trigger1 = animelem = 22,>=0
channel = 7
ignorehitpause = 1
[State 230, 2]
type = PlaySnd
trigger1 = movehit > 0 && var(4) > 8
trigger1 = animelem = 22,<0 && hitpausetime = 5
value = s4,9
channel = 6
ignorehitpause = 1
[State 230, 2]
type = StopSnd
trigger1 = movehit > 0
trigger1 = animelem = 22,>=0
channel = 6
ignorehitpause = 1

[State 40, 5]
type = Varrandom
trigger1 = time = 0
v = 12
range = 1

[State 40, 5]
type = Varset
trigger1 = animelem = 21,<0
var(21) = -ifelse(var(4)%2=1,33-ifelse(p2statetype=C,21,0),0)+ifelse(p2dist y < 0,ceil(p2dist y/(1+ifelse(p2dist y<-30,-ceil(p2dist y/20)*0.5,0))),0)+ifelse(p2dist y<=-20,10,0)+ifelse(var(4)%2=0&&p2dist y<=-55,ceil((p2dist y+55)*1.5),0)

[State 200, 3]
type = movehitreset
trigger1 = animelem = 22,<0
[State 200, 3]
type = HitDef
trigger1 = animelem = 21,<0
trigger1 = var(4)%2 = 0 || p2dist y < -50
attr = S, SA
damage    = 5,1
ID = 1710
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 0+ifelse(p2dist x<70,ceil((p2dist x-70)/2),0),-44+var(21)+ifelse(var(4)%2=1&&p2dist y>-20&&(enemynear,const(size.head.pos.y)>-50),10,0)
hitsound = s4,ifelse((animelem=9),9,99)
guardsound = s3,ifelse((animelem=9),9,99)
ground.type = low
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 21,<0
trigger1 = var(4)%2 = 1 && p2dist y >= -50
attr = S, SA
damage    = 5,1
ID = 1710
pausetime = 6,6
animtype = M
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = ifelse(var(12)=1,5,-5)+ifelse(p2dist x<70,ceil((p2dist x-70)/2),0),-44+var(21)+ifelse(var(4)%2=1&&p2dist y>-20&&(enemynear,const(size.head.pos.y)>-50),10,0)
hitsound = s4,ifelse((animelem=9),9,99)
guardsound = s3,ifelse((animelem=9),9,99)
ground.type = high
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
guard.hittime  = 32-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,15,0)
p2facing = 1
guard.velocity = 0
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 23
attr = S, SA
damage    = 110,19
ID = 1710
pausetime = 22,22
guard.pausetime = 21,21
animtype = H
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 0+ifelse(p2dist x<70,ceil((p2dist x-70)/2),0),-56+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,9
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
p2facing = 1
guard.velocity = -20
ground.velocity = -5,-7.5
air.velocity = -5,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -33
fall.xvelocity = -3
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 1300, 5]
type = helper
triggerall = numtarget(1710) > 0 && movecontact > 0
trigger1 = target(1710),pos y > -10
trigger1 = hitpausetime = 5 && animelem = 23,<0
trigger2 = hitpausetime = 21-ifelse(moveguarded>0,1,0) && animelem = 23,>=0
trigger2 = target(1710),pos y > -1
stateno = 106
name = "dust"
pos = ceil(target(1710),pos x-pos x)*facing,0
ignorehitpause = 1
pausemovetime = 9999
ownpal = 1

[State 1002, 4]
type = Targetstate
trigger1 = animelem = 22,<0
trigger1 = movehit > 0 && numtarget(1710) > 0
trigger1 = target(1710),stateno != 1705 && target(1710),alive
trigger1 = target(1710),statetype != C && target(1710),prevstateno != 1708 && target(1710),prevstateno != 1609
value = 1705
id = 1710
ignorehitpause = 1
[State 1002, 4]
type = Targetstate
trigger1 = animelem = 22,<0
trigger1 = movehit > 0 && numtarget(1710) > 0
trigger1 = target(1710),stateno != 1708 && target(1710),alive
trigger1 = target(1710),statetype = C || target(1710),prevstateno = 1708 || target(1710),prevstateno = 1609
value = 1708
id = 1710
ignorehitpause = 1

[State -2, 0]
type = varset
trigger1 = animelem = 23,>=0 && animelem = 24,<=0
trigger1 = movehit > 0 && numtarget(1710) > 0
var(7) = 14
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = animelem = 23,>=0 && animelem = 24,<=0
trigger1 = movehit > 0 && numtarget(1710) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 23,>= 0
var(51) = ceil(47*(2-var(51)/690.0))
ignorehitpause = 1
persistent = 0

[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; hit by Yul gyang gyun1
[Statedef 1705]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5000, 1]
type = defencemulset
trigger1 = 1
value = 1
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 152 || prevstateno = 153 || prevstateno = 131
value = 152

[State 200, 4]
type = changestate
trigger1 = !alive
value = 8304
ignorehitpause = 1

[State 5000, 1]
type = ChangeAnim
trigger1 = Time = 0 && pos y >= 0
value = ifelse((GetHitVar(groundtype) = 1),5001,5011)
[State 5000, 1]
type = ChangeAnim
trigger1 = Time = 0 && pos y < 0
value = ifelse((GetHitVar(airtype) = 1),5001,5011)

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

[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,1,0)
y = -1.5
[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,2,1)
y = 0

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 1606

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

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

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;------------------------------------
; hit by Yul gyang gyun C1
[Statedef 1708]
type    = C
movetype= H
physics = N
velset = 0,0

[State 5000, 1]
type = defencemulset
trigger1 = 1
value = 1
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150
[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 152 || prevstateno = 153 || prevstateno = 131
value = 152

[State 200, 4]
type = changestate
trigger1 = !alive
value = 8304
ignorehitpause = 1

[State 5000, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 5021

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

[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,1,0)
y = -1.5
[State 5001, 1]
type = velset
trigger1 = time = ifelse(numpartner>0,2,1)
y = 0

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 1609

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

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

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

[State 9401, 6]
type = HitOverride
trigger1 = pos y < 0
attr = SCA,AA,AT,AP
stateno = 5020
ignorehitpause = 1
;------------------------------------
;Sum gyang yul gak b
[Statedef 1800]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1800
sprpriority = 1
facep2 = 1
poweradd = 50

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 260, 0]
type = targetstate
trigger1 = numtarget(1800) > 0 && movehit > 0
trigger1 = target(1800),alive = 0 && target(1800),stateno != [8300,8307]
trigger1 = target(1800),stateno != 5101 && target(1800),stateno != 5110
trigger1 = target(1800),stateno != 5100 && target(1800),stateno != 5150
value = 8300
id = 1800
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1800) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = Playsnd
trigger1 = animelem = 4
value = s7,3
channel = 4
[State 52, 2]
type = Playsnd
trigger1 = animelem = 4
value = s6,8
[State 52, 2]
type = Playsnd
trigger1 = animelem = 9 || animelem = 13 || animelem = 17 || animelem = 20
value = s6,8
channel = 5

[State 260, 1]
type = HitBy
trigger1 = animelem = 4,<0
value = SCA,AT
[State 260, 1]
type = HitBy
trigger1 = animelem = 4,>=0 && animelem = 5,<0 && movecontact = 0
value = SCA,AT
ignorehitpause = 1
[State 260, 1]
type = HitBy
trigger1 = animelem = 4,>=0 && animelem = 5,<0 && movecontact > 0
value = SCA,AA,AP,AT
ignorehitpause = 1

[State 200, 4]
type = velset
trigger1 = animelem = 7
x = 11
y = -12
[State 200, 4]
type = veladd
trigger1 = animelem = 7,>0 && animelem = 20,<1
y = .603
[State 200, 4]
type = veladd
trigger1 = animelem = 7,>0 && animelem = 19,<1
x = -0.3

[State 200, 4]
type = velset
trigger1 = animelem = 20
x = 8
[State 200, 4]
type = velset
trigger1 = animelem = 20,1
x = 11
y = 5
[State 200, 4]
type = veladd
trigger1 = animelem = 20,>1 && animelem = 23,<1
y = .45

[State 200, 4]
type = velset
trigger1 = animelem = 24,1
x = 9
[State 200, 4]
type = velset
trigger1 = animelem = 24,2
x = 4
[State 200, 4]
type = veladd
trigger1 = animelem = 24,>2 && animelem = 27,<4
x = -0.2
[State 200, 4]
type = velset
trigger1 = animelem = 19,1 || animelem = 27,4
x = 0

[State 200, 4]
type = statetypeset
trigger1 = animelem = 7
physics = N

[State 200, 4]
type = posset
trigger1 = time = 0 || animelem = 23,1
y = 0
[State 200, 4]
type = velset
trigger1 = animelem = 23,1
y = 0

[State 52, 2]
type = varset
trigger1 = time = 0
var(4) = 0
[State 52, 2]
type = varadd
trigger1 = animelem = 5 || animelem = 11 || animelem = 15
trigger1 = movehit > 0
var(4) = 1

[State 230, 1]
type = movehitreset
trigger1 = animelem = 5 || animelem = 11 || animelem = 15 || animelem = 20
[State 200, 3]
type = HitDef
trigger1 = animelem = 4 || animelem = 10 || animelem = 14
trigger2 = animelem = 17,>=0 && animelem = 18,<=0 && movecontact = 0
attr = A, SA
damage    = 44,4
ID = 1800
pausetime = 17,17
animtype = h
hitflag = MA
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-62+ifelse(animelem=4&&p2dist y<0,ceil(p2dist y/2),0)+ifelse((animelem=4),0,35)+ifelse(animelem=4||p2dist y>=30,0,ceil((p2dist y-30)/2.5))
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 36-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,17,0)
guard.hittime  = 36-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,17,0)
guard.velocity = -16
ground.velocity = -25
air.velocity = -5.6+ifelse((animelem=14,>=0)&&var(4)>1,0.5,0),-7.5+ifelse((animelem=14,>=0)&&var(4)>1,3,0)
airguard.velocity = -6,-1
ground.cornerpush.veloff = -30
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -23
air.fall = ifelse((animelem=14,>=0)&&var(4)>1,1,0)
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 14,1 || animelem = 18,1

[State 200, 3]
type = HitDef
trigger1 = animelem = 20,>=0 && animelem = 25,<0 && movecontact = 0
attr = A, SA
damage    = 117,12
ID = 1800
pausetime = 18,18
guard.pausetime = 17,17
animtype = H
hitflag = MA
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-23+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.velocity = -16
ground.velocity = -5.1,-4.5
air.velocity = -5.1,-4.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -23
fall.yvelocity = 0
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(1800) > 0
trigger1 = animelem = 14,>=0 && animelem = 18,<=0 && var(4) > 1
var(7) = 2
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(1800) > 0
trigger1 = animelem = 14,>=0 && animelem = 18,<=0 && var(4) > 1
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 0]
type = varset
trigger1 = animelem = 20,>=0 && animelem = 26,<0
trigger1 = movehit > 0 && numtarget(1800) > 0
var(7) = 14+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(1800) > 0
trigger1 = animelem = 20,>=0 && animelem = 26,<0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 100, 4]
type = width
trigger1 = animelem = 27,>=0 && animelem = 28,<0
value = 15

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 20,<0 && hitpausetime = 16
var(51) = ceil(40*(2-var(51)/690.0))
ignorehitpause = 1
[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 20,>=0 && hitpausetime = 16
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1

[State 200, 4]
type = changestate
trigger1 = animtime = 0 && var(55) = 0 && command = "holdup"
value = 40
[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
;Sum gyang yul gak a
[Statedef 1810]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1810
sprpriority = 1
facep2 = 1
poweradd = 50

[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A
statetype = A

[State 260, 0]
type = targetstate
trigger1 = numtarget(1810) > 0 && movehit > 0
trigger1 = target(1810),alive = 0 && target(1810),stateno != [8300,8307]
trigger1 = target(1810),stateno != 5101 && target(1810),stateno != 5110
trigger1 = target(1810),stateno != 5100 && target(1810),stateno != 5150
value = 8300
id = 1810
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1810) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = Playsnd
trigger1 = animelem = 4
value = s7,3
channel = 4
[State 52, 2]
type = Playsnd
trigger1 = animelem = 4
value = s6,8
[State 52, 2]
type = Playsnd
trigger1 = animelem = 9 || animelem = 12
value = s6,8
channel = 5

[State 260, 1]
type = HitBy
trigger1 = animelem = 4,<0
value = SCA,AT

[State 200, 4]
type = statetypeset
trigger1 = animelem = 7
physics = N

[State 200, 4]
type = velset
trigger1 = animelem = 7
x = 7
y = -6
[State 200, 4]
type = veladd
trigger1 = animelem = 7,>0 && animelem = 12,<=0
y = .36

[State 200, 4]
type = velset
trigger1 = animelem = 10,1
x = 6
[State 200, 4]
type = velset
trigger1 = animelem = 11,1
x = 5
[State 200, 4]
type = velset
trigger1 = animelem = 11,4
x = 4
[State 200, 4]
type = velset
trigger1 = animelem = 12
x = 12

[State 200, 4]
type = velset
trigger1 = animelem = 13
x = 7
y = 10
[State 200, 4]
type = velset
trigger1 = animelem = 16
y = 11

[State 200, 4]
type = posset
trigger1 = time = 0 || animelem = 18
y = 0
[State 200, 4]
type = velset
trigger1 = animelem = 18
y = 0

[State 200, 4]
type = velset
trigger1 = animelem = 20
x = 5
[State 200, 4]
type = veladd
trigger1 = animelem = 20,>0 && animelem = 21,<5
x = -0.55

[State 200, 4]
type = velset
trigger1 = animelem = 21,5
x = 0

[State 230, 1]
type = movehitreset
trigger1 = animelem = 9 || animelem = 12
[State 200, 3]
type = HitDef
trigger1 = animelem = 4
trigger2 = animelem = 9,>=0 && animelem = 10,<=0 && movecontact = 0
attr = A, SA
damage    = 44,4
ID = 1810
pausetime = 6+ifelse((animelem=4),0,9),11+ifelse((animelem=4),0,5)
animtype = h
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-62+ifelse(animelem=4&&p2dist y<0,ceil(p2dist y/2),0)+ifelse((animelem=4),0,19)+ifelse(animelem=4||p2dist y>=0,0,ceil(p2dist y/2.5))
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 36-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,17,0)
guard.hittime  = 36-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,17,0)
guard.velocity = -12
ground.velocity = -9
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -16
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 10,1

[State 200, 3]
type = HitDef
trigger1 = animelem = 12,>=0 && animelem = 19,<0 && movecontact = 0
attr = A, SA
damage    = 117,12
ID = 1810
pausetime = 18,18
guard.pausetime = 17,17
animtype = H
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-17+ifelse(p2dist y < 0,ceil(p2dist y/4),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.velocity = -13
ground.velocity = -5.1,-4.5
air.velocity = -5.1,-4.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -17
fall.yvelocity = 0
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 0]
type = varset
trigger1 = animelem = 12,>=0 && animelem = 20,<0
trigger1 = movehit > 0 && numtarget(1810) > 0
var(7) = 14+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = animelem = 12,>=0 && animelem = 20,<0
trigger1 = movehit > 0 && numtarget(1810) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 100, 4]
type = width
trigger1 = animelem = 21,>=0 && animelem = 22,<0
value = 15

[State -2, 1]
type = varadd
triggerall = moveguarded > 0
trigger1 = animelem = 6,< 0 && hitpausetime = 5
trigger2 = animelem = 6,>= 0 && animelem = 12,<0 && hitpausetime = 14
var(51) = ceil(40*(2-var(51)/690.0))
ignorehitpause = 1
[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 12,>=0 && hitpausetime = 16
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1

[State 200, 4]
type = changestate
trigger1 = animtime = 0 && var(55) = 0 && command = "holdup"
value = 40
[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
;Sum gyang yul gak b1
[Statedef 1900]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1900
sprpriority = 1
facep2 = 1
poweradd = 50

[State 52, 2]
type = statetypeset
trigger1 = animelem = 7
statetype = A
[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S && animelem = 7,>0
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A && animelem = 7,>0
statetype = A

[State 260, 0]
type = targetstate
trigger1 = numtarget(1900) > 0 && movehit > 0
trigger1 = target(1900),alive = 0 && target(1900),stateno != [8300,8307]
trigger1 = target(1900),stateno != 5101 && target(1900),stateno != 5110
trigger1 = target(1900),stateno != 5100 && target(1900),stateno != 5150
value = 8304
id = 1900
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1900) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 260, 1]
type = HitBy
trigger1 = animelem = 6,<0
value = SCA,AT

[State 52, 2]
type = Playsnd
trigger1 = animelem = 5
value = s7,4
channel = 4
[State 52, 2]
type = Playsnd
trigger1 = animelem = 5 || animelem = 9 || animelem = 13 || animelem = 15
value = s7,5
channel = 5

[State 200, 4]
type = statetypeset
trigger1 = animelem = 2,1
physics = N
[State 200, 4]
type = velset
trigger1 = animelem = 2,1
x = 9.5
y = -8.15

[State 200, 4]
type = veladd
trigger1 = animelem = 2,>=1 && animelem = 11,<0
x = -0.2
[State 200, 4]
type = veladd
trigger1 = animelem = 11,>=0 && animelem = 14,<5
x = -0.4
[State 200, 4]
type = velset
trigger1 = animelem = 11,>=0 && animelem = 15
x = 3

[State 200, 4]
type = veladd
trigger1 = animelem = 2,>=1 && animelem = 16,<1
y = 0.351
[State 200, 4]
type = velset
trigger1 = animelem = 16,1
x = 9
y = 10
[State 200, 4]
type = velset
trigger1 = animelem = 17,1
y = 11
[State 200, 4]
type = velset
trigger1 = animelem = 18
y = 12

[State 200, 4]
type = posset
trigger1 = animelem = 18,1
y = 0
[State 200, 4]
type = velset
trigger1 = animelem = 18,1
x = 8
y = 0

[State 200, 4]
type = velset
trigger1 = animelem = 19
x = 9
[State 200, 4]
type = velset
trigger1 = animelem = 19,1
x = 7
[State 200, 4]
type = velset
trigger1 = animelem = 19,2
x = 5
[State 200, 4]
type = velset
trigger1 = animelem = 20
x = 4
[State 200, 4]
type = velset
trigger1 = animelem = 20,2
x = 2
[State 200, 4]
type = velset
trigger1 = animelem = 21
x = 1
[State 200, 4]
type = velset
trigger1 = animelem = 21,1 || animelem = 14,5 || animelem = 15,1
x = 0

[State 230, 1]
type = movehitreset
trigger1 = animelem = 10 || animelem = 13 || animelem = 15
[State 200, 3]
type = HitDef
trigger1 = animelem = 6 || animelem = 10
trigger2 = animelem = 13,>=0 && animelem = 14,<=0 && movecontact = 0
attr = A, SA
damage    = 44,12
ID = 1900
pausetime = 16,16
animtype = h
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-32+ifelse(p2dist y<45,ceil((p2dist y-45)/2.5),0)
hitsound = s4,9
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -11
ground.velocity = -14.7
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -20.3
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -16.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 10,1 || animelem = 14,1

[State 200, 3]
type = HitDef
trigger1 = animelem = 15,>= 0 && animelem = 19,<0 && movecontact = 0
attr = A, SA
damage    = 117,12
ID = 1900
pausetime = 18,18
guard.pausetime = 17,17
animtype = H
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,4+ifelse(p2dist y<70,ceil((p2dist y-70)/2.5),0)
hitsound = s4,9
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.velocity = -14
ground.velocity = -6,-7.4
air.velocity = -6,-7.4
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -21
fall.yvelocity = 0
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 100, 4]
type = width
trigger1 = animelem = 19,>=0 && animelem = 22,<0
value = 2

[State 230, 2]
type = varset
triggerall = movehit > 0 && numtarget(1900) > 0
trigger1 = animelem = 6,>=0 && animelem = 7,<=0
trigger2 = animelem = 10,>=0 && animelem = 11,<=0
trigger3 = animelem = 13,>=0 && animelem = 14,<=1
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
triggerall = movehit > 0 && numtarget(1900) > 0
trigger1 = animelem = 6,>=0 && animelem = 7,<=0
trigger2 = animelem = 10,>=0 && animelem = 11,<=0
trigger3 = animelem = 13,>=0 && animelem = 14,<=1
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 0]
type = varset
trigger1 = animelem = 15,>=0 && animelem = 19,<=0
trigger1 = movehit > 0 && numtarget(1900) > 0
var(7) = 14+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = animelem = 15,>=0 && animelem = 19,<=0
trigger1 = movehit > 0 && numtarget(1900) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 15,<0 && hitpausetime = 15
var(51) = ceil(40*(2-var(51)/690.0))
ignorehitpause = 1
[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 15,>=0 && hitpausetime = 16
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1

[State 200, 4]
type = changestate
trigger1 = animtime = 0 && var(55) = 0 && command = "holdup"
value = 40
[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
;Sum gyang yul gak b1
[Statedef 1910]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 1910
sprpriority = 1
facep2 = 1
poweradd = 50

[State 52, 2]
type = statetypeset
trigger1 = animelem = 6,1
statetype = A
[State 52, 2]
type = statetypeset
trigger1 = pos y >= -25 && statetype != S && animelem = 6,>=1
statetype = S
[State 52, 2]
type = statetypeset
trigger1 = pos y < -25 && statetype != A && animelem = 6,>=1
statetype = A

[State 260, 0]
type = targetstate
trigger1 = numtarget(1910) > 0 && movehit > 0
trigger1 = target(1910),alive = 0 && target(1910),stateno != [8300,8307]
trigger1 = target(1910),stateno != 5101 && target(1910),stateno != 5110
trigger1 = target(1910),stateno != 5100 && target(1910),stateno != 5150
value = 8304
id = 1910
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(1910) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 260, 1]
type = HitBy
trigger1 = animelem = 6,<0
value = SCA,AT

[State 52, 2]
type = Playsnd
trigger1 = animelem = 5
value = s7,4
channel = 4
[State 52, 2]
type = Playsnd
trigger1 = animelem = 5 || animelem = 9 || animelem = 11
value = s7,5
channel = 5

[State 200, 4]
type = statetypeset
trigger1 = animelem = 2,1
physics = N

[State 200, 4]
type = velset
trigger1 = animelem = 2,1
x = 6
y = -8.5
[State 200, 4]
type = veladd
trigger1 = animelem = 2,>=1 && animelem = 12,<1
y = 0.377

[State 200, 4]
type = velset
trigger1 = animelem = 6,1
x = 5
[State 200, 4]
type = velset
trigger1 = animelem = 8,2 || animelem = 15,1
x = 4
[State 200, 4]
type = velset
trigger1 = animelem = 9,2 || animelem = 11 || animelem = 15,3
x = 3
[State 200, 4]
type = velset
trigger1 = animelem = 9,3 || animelem = 16
x = 2
[State 200, 4]
type = velset
trigger1 = animelem = 10,1 || animelem = 16,1
x = 1
[State 200, 4]
type = velset
trigger1 = animelem = 10,3 || animelem = 11,1 || animelem = 16,2
x = 0

[State 200, 4]
type = velset
trigger1 = animelem = 12,1
x = 6
y = 9
[State 200, 4]
type = velset
trigger1 = animelem = 12,2
y = 10
[State 200, 4]
type = velset
trigger1 = animelem = 13,1
y = 11
[State 200, 4]
type = velset
trigger1 = animelem = 14
y = 12

[State 200, 4]
type = velset
trigger1 = animelem = 14,2
y = 0
[State 200, 4]
type = posset
trigger1 = animelem = 14,2
y = 0

[State 230, 1]
type = movehitreset
trigger1 = animelem = 9 || animelem = 11
[State 200, 3]
type = HitDef
trigger1 = animelem = 6
trigger2 = animelem = 9,>=0 && animelem = 10,<=0 && movecontact = 0
attr = A, SA
damage    = 44,12
ID = 1910
pausetime = 16,16
animtype = h
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-32+ifelse(p2dist y<45,ceil((p2dist y-45)/2.5),0)
hitsound = s4,9
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -14.3
ground.velocity = -17
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -28.6
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -26
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = animelem = 6,1 || animelem = 10,1

[State 200, 3]
type = HitDef
trigger1 = animelem = 11,>= 0 && animelem = 15,<0 && movecontact = 0
attr = A, SA
damage    = 117,12
ID = 1910
pausetime = 18,18
guard.pausetime = 17,17
animtype = H
guardflag = M
sparkno = s7000+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7041+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,4+ifelse(p2dist y<70,ceil((p2dist y-70)/2.5),0)
hitsound = s4,9
guardsound = s3,9
ground.type = high
givepower = 0,0
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.velocity = -14
ground.velocity = -5.5,-7.5
air.velocity = -5.5,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -21
fall.yvelocity = 0
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 100, 4]
type = width
trigger1 = animelem = 15,>=0 && animelem = 18,<0
value = 2

[State 230, 2]
type = varset
triggerall = movehit > 0 && numtarget(1910) > 0
trigger1 = animelem = 6,>=0 && animelem = 7,<=0
trigger2 = animelem = 9,>=0 && animelem = 10,<=1
var(3) = 4+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State 230, 2]
type = varset
triggerall = movehit > 0 && numtarget(1910) > 0
trigger1 = animelem = 6,>=0 && animelem = 7,<=0
trigger2 = animelem = 9,>=0 && animelem = 10,<=1
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 0]
type = varset
trigger1 = animelem = 11,>=0 && animelem = 15,<=0
trigger1 = movehit > 0 && numtarget(1910) > 0
var(7) = 14+ifelse(random<500,1,0)
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = animelem = 11,>=0 && animelem = 15,<=0
trigger1 = movehit > 0 && numtarget(1910) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 11,<0 && hitpausetime = 15
var(51) = ceil(40*(2-var(51)/690.0))
ignorehitpause = 1
[State -2, 1]
type = varadd
trigger1 = moveguarded > 0 && animelem = 11,>=0 && hitpausetime = 16
var(51) = ceil(65*(2-var(51)/690.0))
ignorehitpause = 1

[State 200, 4]
type = changestate
trigger1 = animtime = 0 && var(55) = 0 && command = "holdup"
value = 40
[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; Heating ghost advent
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 3000
sprpriority = 0
facep2 = 1

[State 40, 5]
type = Varset
trigger1 = time = 0
var(36) = 1
[State 40, 5]
type = Varset
trigger1 = animelem = 15
var(36) = 0

[State 40, 5]
type = Varset
trigger1 = time = 1
var(12) = var(53)

[State 40, 5]
type = Varset
trigger1 = time = 1 && var(53) = 1
var(53) = 0

[State 260, 0]
type = targetstate
trigger1 = numtarget(3000) > 0 && movehit > 0
trigger1 = target(3000),alive = 0 && target(3000),stateno != [8300,8307]
trigger1 = target(3000),stateno != 5101 && target(3000),stateno != 5110
trigger1 = target(3000),stateno != 5100 && target(3000),stateno != 5150
value = 8300
id = 3000
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(3000) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 260, 0]
type = poweradd
trigger1 = time > 0 && time < 31 && var(12) = 0
value = -100

[State 1300, 5]
type = helper
trigger1 = time = 1
stateno = 3001
id = 3000
name = "orb"
pos = 47,-68
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = animelem = 15
stateno = 3003
id = 3000
name = "skel"
pos = 47,0
ownpal = 1

[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(3002) < 2
stateno = 3002
id = 3002
name = "fguard"
pos = 100,0
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = time = 2 && numhelper(3002) < 2
stateno = 3002
id = 3002
name = "fguard"
pos = 200,0
pausemovetime = 9999
ownpal = 1

[State 230, 2]
type = PlaySnd
trigger1 = time = 1
value = s5,5
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s8,0
channel = 4

[State 200, 3]
type = varset
trigger1 = time = 0
var(4) = 0
[State 200, 3]
type = varset
trigger1 = movecontact > 0
var(4) = 1
[State 200, 3]
type = varadd
trigger1 = movecontact = 0
var(4) = -1

[State 200, 3]
type = movehitreset
trigger1 = movecontact > 0

[State 200, 3]
type = HitDef
trigger1 = animelem = 2,>=2 && var(4) <= 0 && p2statetype != A
trigger2 = animelem = 2,>=2 && var(4) < 0 && p2statetype = A
attr = S, HP
damage    = 72,8
ID = 3000
pausetime = 16,16
animtype = h
hitflag = MAFP
guardflag = MA
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-59+ifelse(p2dist y < 0,ceil(p2dist y/3),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.hittime  = 22-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -13.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; orb sshoot
[Statedef 3001]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 3001
sprpriority = 3

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1300, 5]
type = bindtoparent
trigger1 = animtime < 0
pos = 47,-68
ignorehitpause = 1

[State 5000, 1]
type = changeanim
trigger1 = parent,hitpausetime != 0
value = anim
elem = animelemno(-1)

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 3000
trigger2 = animtime = 0
;------------------------------------
; force guard ground
[Statedef 3002]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 200, 4]
type = destroyself
trigger1 = parent,stateno != 3000
trigger2 = parent,movetype != A
;------------------------------------
; skeleton
[Statedef 3003]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 3002
sprpriority = 3

[State 1300, 5]
type = varset
trigger1 = time = 0
var(26) = 0

[State 230, 2]
type = sprpriority
trigger1 = 1
value = 3

[State 230, 2]
type = PlaySnd
trigger1 = time >= 25 && animelem = 2,1 && frontedgedist >= -250
value = s7,8
channel = 8
[State 230, 2]
type = PlaySnd
trigger1 = time >= 25 && animelem = 4,1 && frontedgedist >= -250
value = s7,9
channel = 8

[State 230, 2]
type = PlaySnd
trigger1 = time = 0
value = s7,7

[State 4, 1]
type = velset
trigger1 = time = 1
x = 6.334

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = movecontact > 0
stateno = 3004
id = 3004
name = "skel2"
pos = 0,0
ownpal = 1
ignorehitpause = 1
pausemovetime = 9999
[State 1300, 5]
type = changestate
trigger1 = movecontact > 0 && time > 0
value = 3005
[State 1300, 5]
type = destroyself
trigger1 = frontedgedist < -70 && time > 0

[State 200, 3]
type = HitDef
trigger1 = time = 0
attr = S, HP
damage    = 78,18
ID = 3003
pausetime = 0,2
animtype = h
hitflag = P
guardflag = M
sparkno = s7030+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
guard.sparkno = s7061+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
sparkxy = 5,-34+ifelse(p2dist y < 0,ceil(p2dist y/2.5),0)
hitsound = s4,8
guardsound = s3,7
ground.type = low
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.hittime  = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = movehitreset
trigger1 = time = 1
[State 200, 3]
type = HitDef
trigger1 = time > 0 && movecontact = 0
attr = S, HP
damage    = 78,18
ID = 3003
pausetime = 0,2
animtype = h
hitflag = MAFP
guardflag = M
sparkno = s7030+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
guard.sparkno = s7061+ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,2,0)
sparkxy = 5,-34+ifelse(p2dist y < 0,ceil(p2dist y/2.5),0)
hitsound = s4,8
guardsound = s3,7
ground.type = low
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.hittime  = 22-ifelse((parent,var(35))=1000||(parent,var(35))=500||(parent,var(35))=750||(parent,var(35))=667,10,0)
guard.velocity = -9.4
ground.velocity = -10.5
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
;------------------------------------
; skeleton2
[Statedef 3004]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 3003
sprpriority = 3

[State 230, 2]
type = sprpriority
trigger1 = 1
value = 3

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1,1 && frontedgedist >= -250
trigger1 = time >= 16 && anim = 3003
trigger1 = parent,var(25) = 0
trigger1 = numtarget(3004) = 0 || roundstate > 2
value = s7,8
channel = 8
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3,1 && frontedgedist >= -250
trigger1 = time >= 16 && anim = 3003
trigger1 = parent,var(25) = 0
trigger1 = numtarget(3004) = 0 || roundstate > 2
value = s7,9
channel = 8

[State 230, 2]
type = PlaySnd
trigger1 = anim = 3004 && animelem = 2
value = s7,6

[State 4, 1]
type = velset
trigger1 = time = 16
x = 6.334

[State 4, 1]
type = posfreeze
triggerall = time >= 16 && anim = 3003
trigger1 = parent,var(25) > 0
trigger2 = numtarget(3004) > 0
trigger2 = target(3004),gethitvar(hitshaketime) > 0
ignorehitpause = 1

[State 4, 1]
type = velset
trigger1 = vel x != 0 && anim != 3003
x = 0

[State 4, 1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 1300, 5]
type = changeanim
triggerall = anim = 3003 && movecontact > 0
trigger1 = hitcount > 2 && p2dist y > -70 && p2dist x < 35
trigger2 = hitcount > 3
trigger3 = parent,var(26) > 2
value = 3004
[State 1300, 5]
type = changeanim
trigger1 = anim = 3004 && animtime = 0
value = 12342
[State 1300, 5]
type = destroyself
triggerall = time > 0 && (frontedgedist < -70 || anim = 12342)
trigger1 = numtarget(3004) = 0
trigger2 = numtarget(3004) > 0
trigger2 = target(3004),alive = 1
trigger3 = numtarget(3004) > 0
trigger3 = target(3004),stateno != [8300,8303]

[State 200, 3]
type = movehitreset
trigger1 = movecontact > 0 && parent,var(25) > 0
[State 200, 3]
type = HitDef
triggerall = time >= 16
triggerall = movecontact = 0 && parent,var(25) = 0
triggerall = hitcount < 4 && parent,var(26) < 4
trigger1 = numtarget(3004) = 0
trigger2 = numtarget(3004) > 0
trigger2 = target(3004),gethitvar(hitshaketime) = 0
attr = S, HP
damage    = 78,18
ID = 3004
pausetime = 0,3
animtype = h
hitflag = MAFP
guardflag = M
sparkno = s7030+ifelse((root,var(35))=1000||(root,var(35))=500||(root,var(35))=750||(root,var(35))=667,2,0)
guard.sparkno = s7061+ifelse((root,var(35))=1000||(root,var(35))=500||(root,var(35))=750||(root,var(35))=667,2,0)
sparkxy = 5,-34+ifelse(p2dist y < 0,ceil(p2dist y/2.5),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse((root,var(35))=1000||(root,var(35))=500||(root,var(35))=750||(root,var(35))=667,10,0)
guard.hittime  = 22-ifelse((root,var(35))=1000||(root,var(35))=500||(root,var(35))=750||(root,var(35))=667,10,0)
guard.velocity = -6-ifelse(hitcount=3||(parent,var(26)>2),3.4,0)
ground.velocity = -6-ifelse(hitcount=3||(parent,var(26)>2),4.5,0)
air.velocity = -5.6,-7.5
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State 1300, 5]
type = parentvaradd
trigger1 = numhelper(3004) > 0
trigger1 = helper(3004),movecontact > 0
var(26) = 1
[State 2, 0]
type = parentvarset
trigger1 = numhelper(3004) > 0
trigger1 = helper(3004),movecontact > 0
var(25) = 16
[State 2, 0]
type = parentvaradd
trigger1 = parent,var(25) > 0
var(25) = -1

[State 2, 0]
type = pause
trigger1 = parent,var(25) = 14
time = 13
movetime = 13

[State 0, 1]
type = playsnd
trigger1 = parent,numtarget(3003) = 0
trigger1 = numtarget(3004) > 0
trigger1 = target(3004),alive = 0 && target(3004),stateno != [8300,8307]
trigger1 = target(3004),stateno != 5101 && target(3004),stateno != 5110
trigger1 = target(3004),stateno != 5100 && target(3004),stateno != 5150
value = s3,4
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = targetstate
trigger1 = parent,numtarget(3003) = 0
trigger1 = numtarget(3004) > 0
trigger1 = target(3004),alive = 0 && target(3004),stateno != [8300,8307]
trigger1 = target(3004),stateno != 5101 && target(3004),stateno != 5110
trigger1 = target(3004),stateno != 5100 && target(3004),stateno != 5150
value = 8300
id = 3004
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = assertspecial
trigger1 = numtarget(3004) > 0
flag = nokoslow
ignorehitpause = 1

[State 1300, 5]
type = helper
triggerall = parent,numtarget(3003) = 0
triggerall = numtarget(3004) > 0
triggerall = target(3004),stateno = 8302
trigger1 = target,time = 1
trigger2 = target(3004),time = 26
stateno = 103
name = "dust"
pos = ceil(target(3004),pos x-pos x)*facing,0
facing = -1
pausemovetime = 9999
ownpal = 1

[State 2, 0]
type = playsnd
trigger1 = parent,numtarget(3003) = 0
trigger1 = numtarget(3004) > 0
trigger1 = target(3004),stateno = 8302
trigger1 = target(3004),time = 1
value = s1,1
ignorehitpause = 1
persistent = 0
;------------------------------------
; remove hit skel
[Statedef 3005]
type    = A
movetype= A
physics = N
juggle  = 8
ctrl = 0
velset = 0,0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = numtarget(3003) > 0
trigger1 = target(3003),alive = 0 && target(3003),stateno != [8300,8307]
trigger1 = target(3003),stateno != 5101 && target(3003),stateno != 5110
trigger1 = target(3003),stateno != 5100 && target(3003),stateno != 5150
value = s3,4
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = targetstate
trigger1 = numtarget(3003) > 0
trigger1 = target(3003),alive = 0 && target(3003),stateno != [8300,8307]
trigger1 = target(3003),stateno != 5101 && target(3003),stateno != 5110
trigger1 = target(3003),stateno != 5100 && target(3003),stateno != 5150
value = 8300
id = 3003
ignorehitpause = 1
persistent = 0
[State 260, 0]
type = assertspecial
trigger1 = numtarget(3003) > 0
flag = nokoslow
ignorehitpause = 1

[State 111, 0]
type = parentvarset
trigger1 = time = 1
trigger1 = numtarget(3003) > 0
trigger1 = target(3003),stateno != 5300
var(23) = 16
ignorehitpause = 1
[State 2, 0]
type = pause
trigger1 = time = 1
trigger1 = numtarget(3003) > 0
trigger1 = target(3003),stateno != 5300
time = 14
movetime = 14
[State 111, 0]
type = parentvarset
trigger1 = numhelper(3004) > 0 && var(25) = 14
var(23) = 15
ignorehitpause = 1

[State 200, 4]
type = destroyself
triggerall = time >= 14 && numhelper(3004) = 0
trigger1 = numtarget(3003) = 0
trigger2 = numtarget(3003) > 0
trigger2 = target(3003),alive = 1
trigger3 = numtarget(3003) > 0
trigger3 = target(3003),stateno != [8300,8303]

[State 1300, 5]
type = helper
triggerall = numtarget(3003) > 0
triggerall = target(3003),stateno = 8302
trigger1 = target,time = 1
trigger2 = target(3003),time = 26
stateno = 103
name = "dust"
pos = ceil(target(3003),pos x-pos x)*facing,0
facing = -1
pausemovetime = 9999
ownpal = 1

[State 2, 0]
type = playsnd
trigger1 = numtarget(3003) > 0
trigger1 = target(3003),stateno = 8302
trigger1 = target(3003),time = 1
value = s1,1
ignorehitpause = 1
persistent = 0
;------------------------------------
; Stress explosion
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 3100
sprpriority = 0
facep2 = 1

[State 260, 0]
type = targetstate
trigger1 = numtarget(3100) > 0 && movehit > 0
trigger1 = target(3100),alive = 0 && target(3100),stateno != [8300,8307]
trigger1 = target(3100),stateno != 5101 && target(3100),stateno != 5110
trigger1 = target(3100),stateno != 5100 && target(3100),stateno != 5150
value = 8300
id = 3100
ignorehitpause = 1
[State 260, 0]
type = assertspecial
trigger1 = numtarget(3100) > 0 && movehit > 0
flag = nokoslow
ignorehitpause = 1

[State 52, 2]
type = Playsnd
trigger1 = Time = 0
value = s8,4

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

[State 1000, 4]
type = Projectile
trigger1 = animtime < 0
attr = S,SP
projanim = 3101
projRemoveTime = 1
offset = 0,0
projedgebound = 210
projstagebound = 210

[State 40, 5]
type = Varset
trigger1 = time = 0
var(53) = 1
[State 40, 5]
type = Varset
trigger1 = time = 0
var(51) = 0
[State 40, 5]
type = Varset
trigger1 = time = 0
var(52) = 0
[State -2, 1]
type = varset
trigger1 = time = 0
var(54) = 1

[State 1300, 5]
type = explod
trigger1 = time = 0
anim = 3210
id = 3100
pos = ifelse(facing=1,15,0),0
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 2
ownpal = 1
removetime = -1
facing = -facing
pausemovetime = 9999
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time = 0
anim = 3211
id = 3100
pos = ifelse(facing=-1,-1,0),0
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 2
ownpal = 1
removetime = -1
facing = facing
pausemovetime = 9999
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time = 0
anim = 3212
id = 3100
pos = ifelse(facing=-1,-1,0),0
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 2
ownpal = 1
removetime = -1
facing = facing
pausemovetime = 9999
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time = 0
anim = 3213
id = 3100
pos = ifelse(facing=-1,-1,0),0
shadow = 0,0,0
ignorehitpause = 1
sprpriority = -1
ownpal = 1
removetime = -1
facing = facing
pausemovetime = 9999
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time = 0
anim = 3214
id = 3100
pos = ifelse(facing=-1,-1,0),0
shadow = 0,0,0
ignorehitpause = 1
sprpriority = -2
ownpal = 1
removetime = -1
facing = facing
pausemovetime = 9999
bindtime = -1
[State 1300, 5]
type = explod
trigger1 = time = 0
anim = 3215+ifelse(random<500,1,0)
id = 3100
pos = ifelse(facing=-1,-1,0),0
shadow = 0,0,0
ignorehitpause = 1
sprpriority = 1
ownpal = 1
removetime = -1
facing = facing
pausemovetime = 9999
bindtime = -1

[State 191, 4]
type = EnvShake
Trigger1 = time = 8
time = 57
ampl = -4
freq = 255
ignorehitpause = 1

[State 200, 3]
type = HitDef
trigger1 = movecontact = 0 && time > 0 && time%2 = 1
attr = S, HT
damage    = 45
ID = 3100
pausetime = 18,18
guard.pausetime = 17,17
animtype = H
hitflag = MAF
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-52+ifelse(p2dist y < 0,ceil(p2dist y/2),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.velocity = -12.6*ifelse(p2dist x<0,-1,1)
ground.velocity = -6.5*ifelse(p2dist x<0,-1,1),-4.4
air.velocity = -6.5*ifelse(p2dist x<0,-1,1),-4.4
airguard.velocity = -6*ifelse(p2dist x<0,-1,1),-1
hitonce = 0
p2facing = 1*ifelse(p2dist x<0,-1,1)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5
[State 200, 3]
type = HitDef
trigger1 = movecontact = 0 && time > 0 && time%2 = 0
attr = S, HP
damage    = 45
ID = 3100
pausetime = 18,18
guard.pausetime = 17,17
animtype = H
hitflag = MAF
guardflag = M
sparkno = s7030+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
guard.sparkno = s7061+ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,2,0)
sparkxy = 5,-52+ifelse(p2dist y < 0,ceil(p2dist y/2),0)
hitsound = s4,8
guardsound = s3,7
ground.type = high
givepower = 0,0
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.hittime  = 34-ifelse(var(35)=1000||var(35)=500||var(35)=750||var(35)=667,16,0)
guard.velocity = -12.6*ifelse(p2dist x<0,-1,1)
ground.velocity = -6.5*ifelse(p2dist x<0,-1,1),-4.4
air.velocity = -6.5*ifelse(p2dist x<0,-1,1),-4.4
airguard.velocity = -6*ifelse(p2dist x<0,-1,1),-1
hitonce = 0
p2facing = 1*ifelse(p2dist x<0,-1,1)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
yaccel = .5

[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(3100) > 0
var(7) = 14
persistent = 0
ignorehitpause = 1
[State -2, 0]
type = varset
trigger1 = movehit > 0 && numtarget(3100) > 0
var(24) = 1
persistent = 0
ignorehitpause = 1

[State 2, 0]
type = pause
trigger1 = var(7) = 0 && random < 30
time = 1

[State 1300, 5]
type = removeexplod
trigger1 = animtime = 0
id = 3100
[State 200, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;--------------------
; Dizzy(shaking)
[Statedef 5300]
type    = A
movetype= H
physics = N
anim = 5050
facep2 = 1
velset = 0,0

[State 5305, 1]
type = varrandom
trigger1 = time = 0
v = 10
range = 3

[State 5305, 1]
type = varset
trigger1 = time = 0
var(8) = 990

[State 5305, 1]
type = statetypeset
trigger1 = time = 1
movetype = I
[State 1300, 5]
type = helper
trigger1 = time = 1 && numhelper(5304) = 0 && alive
stateno = 5304
id = 5304
name = "dizzy"
pos = 0,0
pausemovetime = 9999
ownpal = 1

[State 5300, 1]
type = changeanim
trigger1 = time < 16
value = 5050

[State 5300, 1]
type = velset
trigger1 = time = 16
x = -8+ifelse(var(10)<2,2,0)
y = -4.5-ifelse(var(10)<2,3,0)

[State 5300, 1]
type = pause
trigger1 = var(10) > 1
trigger1 = time = 17 || time = 16
time = 1

[State 5300, 1]
type = veladd
trigger1 = time > 16
y = 0.5

[State 5300, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5300, 1]
type = changestate
trigger1 = time > 16 && pos y >= 0 && vel y > 0
value = 5301
;--------------------
; Dizzy(bound)
[Statedef 5301]
type    = L
movetype= H
physics = N
anim = 5100+ifelse(var(57)=1,1070,0)

[State 5305, 1]
type = varset
trigger1 = time = 0
var(4) = 0
[State 5305, 1]
type = varset
trigger1 = time = 0
var(8) = 0
[State 5300, 1]
type = Varset
trigger1 = time = 0
var(9) = 0

[State 5300, 4]
type = velmul
trigger1 = time = 0
x = 0.6

[State 5100, 11]
type = PosFreeze
trigger1 = anim = 5100 || anim = 6170
trigger1 = animtime < 0

[State 5101, 1]
type = posset
trigger1 = anim = 5100 || anim = 6170
trigger1 = animtime = 0
y = 20

[State 5300, 4]
type = velset
trigger1 = anim = 5100 || anim = 6170
trigger1 = animtime = 0
y = -4

[State 5101, 1]
type = ChangeAnim
trigger1 = anim = 5100 || anim = 6170
trigger1 = animtime = 0
value = 5160+ifelse(var(57)=1,5,0)

[State 5300, 4]
type = veladd
trigger1 = anim = 5160 || anim = 5165
y = 0.5

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 0
value = s1,1-ifelse(var(10)<2,1,0)

[State 1300, 5]
type = helper
trigger1 = time = 0
trigger2 = anim = 5160 || anim = 5165
trigger2 = pos y > 15 && vel y > 0
stateno = 103+ifelse(var(10)<2,1,0)
name = "dust"
pos = 0,0
facing = ifelse(var(10)<2,-1,1)
pausemovetime = 9999
ownpal = 1

[State 200, 4]
type = selfstate
trigger1 = anim = 5160 || anim = 5165
trigger1 = pos y > 15 && vel y > 0 && alive
value = 5302
[State 200, 4]
type = selfstate
trigger1 = anim = 5160 || anim = 5165
trigger1 = pos y > 15 && vel y > 0 && !alive
value = 5110

[State 5304, 1]
type = NotHitBy
trigger1 = 1
value = SCA
;------------------
; Dizzy(getup)
[Statedef 5302]
type    = L
movetype= I
physics = N
anim = 5120+ifelse(var(57)=1,5,0)
velset = 0,0

[State 5100, 10]
type = posset
trigger1 = Time = 0
y = 0

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 0
value = s1,1-ifelse(var(57)=1,1,0)

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

[State 5304, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 5305
ctrl = 0
;--------------------
; Dizzy helper
[Statedef 5304]
type    = A
movetype= H
physics = N
anim = 5304+parent,var(10)
sprpriority = 1

[State 5304, 2]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 5304, 2]
type = turn
trigger1 = facing != parent,facing

[State 5304, 2]
type = bindtoparent
trigger1 = parent,anim != 5160 && parent,anim != 5165
pos = 0,0
ignorehitpause = 1
[State 5304, 2]
type = bindtoparent
trigger1 = parent,anim = 5160 || parent,anim = 5165
pos = 0,-20
ignorehitpause = 1

[State 5304, 2]
type = playsnd
trigger1 = time = 0 && parent,var(10) > 0
value = s1,5+ifelse((parent,var(10))=2,1,0)+ifelse((parent,var(10))=1,3,0)
loop = 1
channel = 2
[State 5304, 2]
type = playsnd
trigger1 = time%53 = 0 && parent,var(10) = 0
value = s1,7

[State 5304, 2]
type = stopsnd
trigger1 = parent,stateno != [5300,5308]
trigger2 = parent,alive != 1
trigger3 = parent,movetype != I && parent,movetype != H
channel = 2
ignorehitpause = 1
[State 5304, 2]
type = destroyself
trigger1 = parent,stateno != [5300,5308]
trigger2 = parent,alive != 1
trigger3 = parent,movetype != I && parent,movetype != H
ignorehitpause = 1
;------------------------------------
; Dizzy 
[Statedef 5305]
type    = S
movetype= I
physics = S
anim = 5301
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = time > 0
var(4) = 1
[State 5305, 1]
type = varadd
trigger1 = command = "F"
trigger2 = command = "B"
var(9) = 1

[State 5305, 1]
type = varset
trigger1 = time = 0
var(12) = 0
[State 5305, 1]
type = varset
trigger1 = time > 0
trigger1 = command = "F" || command = "B"
var(12) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = time > 5 && var(12) = 1
trigger3 = var(55) = 1
trigger3 = time > 5
value = 5306

[State 5305, 1]
type = ChangeState
trigger1 = var(10) = 0 || var(10) = 2
trigger1 = var(4) > 110-var(9)*3-ifelse(var(55)=1,55,0)
trigger2 = var(10) = 1 || var(10) >= 3
trigger2 = var(4) > 250-var(9)*3-ifelse(var(55)=1,125,0)
value = 0
ctrl = 1

[Statedef 5306]
type    = S
movetype= I
physics = S
anim = 5302
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = time > 0
var(4) = 1
[State 5305, 1]
type = varadd
trigger1 = command = "F"
trigger2 = command = "B"
var(9) = 1

[State 5305, 1]
type = varset
trigger1 = time = 0
var(12) = 0
[State 5305, 1]
type = varset
trigger1 = time > 0
trigger1 = command = "F" || command = "B"
var(12) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = time > 3 && var(12) = 1
trigger3 = var(55) = 1
trigger3 = time > 3
value = 5307

[State 5305, 1]
type = ChangeState
trigger1 = var(10) = 0 || var(10) = 2
trigger1 = var(4) > 110-var(9)*3-ifelse(var(55)=1,55,0)
trigger2 = var(10) = 1 || var(10) >= 3
trigger2 = var(4) > 250-var(9)*3-ifelse(var(55)=1,125,0)
value = 0
ctrl = 1

[Statedef 5307]
type    = S
movetype= I
physics = S
anim = 5303
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = time > 0
var(4) = 1
[State 5305, 1]
type = varadd
trigger1 = command = "F"
trigger2 = command = "B"
var(9) = 1

[State 5305, 1]
type = varset
trigger1 = time = 0
var(12) = 0
[State 5305, 1]
type = varset
trigger1 = time > 0
trigger1 = command = "F" || command = "B"
var(12) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = time > 5 && var(12) = 1
trigger3 = var(55) = 1
trigger3 = time > 5
value = 5308

[State 5305, 1]
type = ChangeState
trigger1 = var(10) = 0 || var(10) = 2
trigger1 = var(4) > 110-var(9)*3-ifelse(var(55)=1,55,0)
trigger2 = var(10) = 1 || var(10) >= 3
trigger2 = var(4) > 250-var(9)*3-ifelse(var(55)=1,125,0)
value = 0
ctrl = 1

[Statedef 5308]
type    = S
movetype= I
physics = S
anim = 5302
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = time > 0
var(4) = 1
[State 5305, 1]
type = varadd
trigger1 = command = "F"
trigger2 = command = "B"
var(9) = 1

[State 5305, 1]
type = varset
trigger1 = time = 0
var(12) = 0
[State 5305, 1]
type = varset
trigger1 = time > 0
trigger1 = command = "F" || command = "B"
var(12) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = time > 3 && var(12) = 1
trigger3 = var(55) = 1
trigger3 = time > 3
value = 5305

[State 5305, 1]
type = ChangeState
trigger1 = var(10) = 0 || var(10) = 2
trigger1 = var(4) > 110-var(9)*3-ifelse(var(55)=1,55,0)
trigger2 = var(10) = 1 || var(10) >= 3
trigger2 = var(4) > 250-var(9)*3-ifelse(var(55)=1,125,0)
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; DIE(shaking)
[Statedef 8300]
type    = A
movetype= H
physics = N
ctrl = 0
facep2 = 1

[State 5000, 1]
type = velset
trigger1 = time = 0
y = 0

[State 5000, 1]
type = posfreeze
trigger1 = 1

[State 5101, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(5035)
value = 5035
[State 5101, 1]
type = ChangeAnim
trigger1 = !SelfAnimExist(5035)
value = 5050

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 8301

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 0
persistent = 0
time = 6
waveform = square
[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 1 || gethitvar(animtype) = 3
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3
[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 2 || gethitvar(animtype) = 4 || gethitvar(animtype) = 5
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; DIE(into air)
[Statedef 8301]
type    = A
movetype= H
physics = N
velset = -2.3*ifelse(vel x>0,-1,1),-11.2

[State 5101, 1]
type = ChangeAnim
trigger1 = time < 4 && SelfAnimExist(5035)
value = 5035
[State 5300, 4]
type = changeanim
trigger1 = time < 4
trigger1 = !SelfAnimExist(5035)
value = 5050
elem = 1
[State 5300, 4]
type = changeanim
trigger1 = time >= 4 && time < 10
value = 5050
elem = 2
[State 5300, 4]
type = changeanim
trigger1 = time = 10
value = 5050
elem = 3
[State 5300, 4]
type = changeanim
trigger1 = time = 10 && anim = 5050 && animelem = 1
value = 5050
elem = 2

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5050 && time > 10
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5300, 4]
type = veladd
trigger1 = time > 0
y = 0.5

[State 5300, 4]
type = Changestate
trigger1 = pos y >= -5 && vel y > 0
value = 8302

[State 5000, 1]
type = pause
trigger1 = roundstate > 2
time = 2
;---------------------------------------------------------------------------
; DIE(bound)
[Statedef 8302]
type    = L
movetype= H
physics = N

[State 5000, 1]
type = posset
trigger1 = time = 0
y = 0
[State 5000, 1]
type = velset
trigger1 = time = 0
y = 0

[State 5300, 4]
type = changeanim
trigger1 = time < 4
value = 5100

[State 5300, 4]
type = posadd
trigger1 = time = 1 || time = 3
x = -1*ifelse(vel x>0,-1,1)

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5300, 4]
type = varset
trigger1 = time = 0
sysvar(0) = 0

[State 5300, 4]
type = posfreeze
trigger1 = time < 4
[State 5300, 4]
type = changeanim
trigger1 = time = 4
value = 5160
[State 5300, 4]
type = posset
trigger1 = time = 4
y = 20
[State 5300, 4]
type = velset
trigger1 = time = 4
x = -2.7*ifelse(vel x>0,-1,1)
y = -5.7
[State 5300, 4]
type = veladd
trigger1 = time > 4
y = 0.5

[State 5000, 1]
type = pause
trigger1 = time <= 3 && time > 0 && roundstate > 2
time = 2
[State 5000, 1]
type = pause
trigger1 = time = 0 && roundstate > 2
time = 1
[State 5000, 1]
type = pause
trigger1 = time > 3 && (time-4)%3 < 2 && roundstate > 2
time = 1

[State 5300, 4]
type = selfstate
trigger1 = time >= 27
value = 5110
;---------------------------------------------------------------------------
; DIE(shaking)
[Statedef 8303]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5000, 1]
type = velset
trigger1 = time = 0
y = 0

[State 5000, 1]
type = posfreeze
trigger1 = 1

[State 5101, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(5035)
value = 5035
[State 5101, 1]
type = ChangeAnim
trigger1 = !SelfAnimExist(5035)
value = 5050

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 8301

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 0
persistent = 0
time = 6
waveform = square
[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 1 || gethitvar(animtype) = 3
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3
[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 2 || gethitvar(animtype) = 4 || gethitvar(animtype) = 5
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; DIE(shaking)1
[Statedef 8304]
type    = A
movetype= H
physics = N
ctrl = 0
facep2 = 1

[State 5000, 1]
type = velset
trigger1 = time = 0
y = 0

[State 5000, 1]
type = posfreeze
trigger1 = 1

[State 5000, 1]
type = ChangeAnim2
trigger1 = 1
value = 8300

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 8305

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 0
persistent = 0
time = 6
waveform = square
[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 1 || gethitvar(animtype) = 3
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3
[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 2 || gethitvar(animtype) = 4 || gethitvar(animtype) = 5
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; DIE(into air)1
[Statedef 8305]
type    = A
movetype= H
physics = N
velset = -6*ifelse(vel x>0,-1,1),-4

[State 5101, 1]
type = ChangeAnim
trigger1 = time >= 8 && time < 10
trigger1 = SelfAnimExist(5035)
value = 5035
[State 5101, 1]
type = ChangeAnim
trigger1 = anim = 5035 && animtime = 0
value = 5050
[State 5101, 1]
type = ChangeAnim
trigger1 = time >= 8 && time < 10
trigger1 = !SelfAnimExist(5035)
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5050 && time >= 10
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5300, 4]
type = velset
trigger1 = time = 8
x = -2.5*ifelse(vel x>0,-1,1)
y = -10
[State 5300, 4]
type = veladd
trigger1 = time > 8
y = 0.45

[State 5300, 4]
type = Changestate
trigger1 = pos y >= -5 && vel y > 0
value = 8306

[State 5000, 1]
type = pause
trigger1 = roundstate > 2
time = 2
;---------------------------------------------------------------------------
; DIE(bound)1
[Statedef 8306]
type    = L
movetype= H
physics = N

[State 5000, 1]
type = posset
trigger1 = time = 0
y = 0
[State 5000, 1]
type = velset
trigger1 = time = 0
y = 0

[State 5300, 4]
type = changeanim
trigger1 = time < 7
trigger1 = name != "thin nen" || authorname != "ihoo1836" || !selfanimexist(6170)
value = 5100
[State 5300, 4]
type = changeanim
trigger1 = time < 7
trigger1 = name = "thin nen" && authorname = "ihoo1836" && selfanimexist(6170)
value = 6170

[State 5300, 4]
type = posadd
trigger1 = time = 2 || time = 3 || time = 5 || time = 6
x = -1*ifelse(vel x>0,-1,1)

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5300, 4]
type = varset
trigger1 = time = 0
sysvar(0) = 0

[State 5300, 4]
type = posfreeze
trigger1 = time < 7
[State 5300, 4]
type = changeanim
trigger1 = time = 7
trigger1 = name != "thin nen" || authorname != "ihoo1836" || !selfanimexist(5165)
value = 5160
[State 5300, 4]
type = changeanim
trigger1 = time = 7
trigger1 = name = "thin nen" && authorname = "ihoo1836" && selfanimexist(5165)
value = 5165
[State 5300, 4]
type = posset
trigger1 = time = 7
y = 20
[State 5300, 4]
type = velset
trigger1 = time = 7
x = -2.5*ifelse(vel x>0,-1,1)
y = -5.7
[State 5300, 4]
type = veladd
trigger1 = time > 7
y = 0.5

[State 5000, 1]
type = pause
trigger1 = (time = 4 || time = 1) && roundstate > 2
time = 2
[State 5000, 1]
type = pause
trigger1 = time < 7 && time != 4 && time != 1 && roundstate > 2
time = 1
[State 5000, 1]
type = pause
trigger1 = (time = 7 || time = 8) && roundstate > 2
time = 1

[State 5300, 4]
type = selfstate
trigger1 = time >= 30
value = 5110
;---------------------------------------------------------------------------
; DIE(shaking)1
[Statedef 8307]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5000, 1]
type = velset
trigger1 = time = 0
y = 0

[State 5000, 1]
type = posfreeze
trigger1 = 1

[State 5000, 1]
type = ChangeAnim2
trigger1 = 1
value = 8300

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 8305

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 0
persistent = 0
time = 6
waveform = square
[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 1 || gethitvar(animtype) = 3
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3
[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = gethitvar(animtype) = 2 || gethitvar(animtype) = 4 || gethitvar(animtype) = 5
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;------------------win sound helper x-----------------------------------
[Statedef 9887]
type = S
physics = S
sprpriority = 0
anim = 12342

[State 0, 1]
type = destroyself
trigger1 = time = 9999
[Statedef 9888];---------- win sound helper
type = S
physics = S
sprpriority = 0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = time = 0
value = s3,4
[Statedef 9889];---------- win sound helper1
type = S
physics = S
sprpriority = 0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = time = 0
value = s3,5
;----------------------------------------------------------------
[statedef -2]

[State -2, 0];ai start
type = Helper
trigger1 = NumHelper(1234) = 0
;trigger1 = RoundState = 2
name = "AI HELPER"
id = 1234
pos = 0,1000
stateno = 1234
keyctrl = 1
pausemovetime = 99999
ownpal = 1

[State -2, 1]
type = varset
trigger1 = roundstate = 0
var(35) = life

[State -2, 1]
type = varset
trigger1 = movetype = I && var(37) != 1
trigger2 = movetype = A && var(37) != 2
trigger3 = movetype = H && var(37) != 3
var(38) = var(37)

[State -2, 1]
type = varset
trigger1 = movetype = I && var(37) != 1
trigger2 = movetype = A && var(37) != 2
trigger3 = movetype = H && var(37) != 3
var(37) = ifelse(movetype=A,2,ifelse(movetype=H,3,1))

[State -2, 1]
type = poweradd
triggerall = movetype = A && time = 1
trigger1 = (stateno = [210,240]) || stateno = [320,340]
trigger2 = (stateno = [400,410]) || stateno = [500,510]
trigger3 = (stateno = [600,610]) || stateno = [640,650]
trigger4 = (stateno = [700,710]) || stateno = 310
value = 10
[State -2, 1]
type = poweradd
triggerall = movetype = A && time = 1
trigger1 = (stateno = [260,280]) || stateno = [350,380]
trigger2 = (stateno = [420,430]) || stateno = [520,530]
trigger3 = (stateno = [620,630]) || stateno = [660,670]
trigger4 = (stateno = [720,730]) || stateno = 200 || stateno = 300
trigger5 = stateno = 302 || stateno = 312 || stateno = 390
value = 30-ifelse(stateno=302||stateno=312,10,0)

[State -2, 1]
type = varset
trigger1 = var(51) > 0
trigger1 = var(53) = 1
var(51) = 0
[State -2, 1]
type = varset
trigger1 = var(53) = 1 && var(52) > 0
var(52) = 0
[State -2, 1]
type = varset
trigger1 = var(36) != 0 && prevstateno != 3000
trigger1 = stateno != 3000 || movetype != A || Anim != 3000
var(36) = 0

[State -2, 1]
type = StopSnd
trigger1 = movetype = H && time = 1 && stateno != [150,155]
channel = 3
[State -2, 1]
type = StopSnd
trigger1 = movetype = H && time = 1 && stateno != [150,155]
channel = 4

[State 1300, 5]
type = explod
trigger1 = numexplod(998) < 2
trigger1 = !alive
anim = 12342
pos = 0,0
id = 998
ignorehitpause = 1
bindtime = -1
removetime = -1

[State -3, 1];lose
type = PlaySnd
triggerall = numexplod(998) = 1
trigger1 = (stateno != [8300,8307]) && stateno != 815
trigger1 = anim = 5030 || anim = 5055 || anim = [5010,5012]
trigger2 = (stateno = [8304,8307]) || stateno = 815
value = s0,2
channel = 1
persistent = 0
ignorehitpause = 1
[State -3, 1]
type = PlaySnd
triggerall = numexplod(998) = 1
trigger1 = stateno != 815 && (stateno != [8300,8307])
trigger1 = anim != 5030 && anim != 5055 && anim != [5010,5012]
trigger2 = (stateno = [8300,8303])
value = s0,3
channel = 1
persistent = 0
ignorehitpause = 1
           
[State 1300, 5]
type = removeexplod
trigger1 = numexplod(3100) > 0
trigger1 = stateno != 3100 || movetype != A
id = 3100

[State -3, 1]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) < 28
trigger1 = gethitvar(fall) = 0 && gethitvar(hitshaketime) != 0
trigger1 = anim = 5000 || anim = 5010 || anim = 5020
trigger2 = gethitvar(animtype) = 0
trigger2 = stateno = 5020 && anim = 5040 && prevstateno != 5030 && prevstateno != 5020
value = s0,4*ifelse(random<500,1,2)
channel = 1

[State -3, 1]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) < 28
trigger1 = gethitvar(fall) = 0 && gethitvar(hitshaketime) != 0
trigger1 = anim = 5001 || anim = 5011 || anim = 5021
trigger2 = gethitvar(animtype) = 1 || gethitvar(animtype) = 3
trigger2 = stateno = 5020 && anim = 5040 && prevstateno != 5030 && prevstateno != 5020
value = s0,4*ifelse(random<500,1,2)
channel = 1

[State -3, 1.4]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) < 28
trigger1 = gethitvar(fall) = 0 && gethitvar(hitshaketime) != 0
trigger1 = anim = 5002 || anim = 5012 || anim = 5022
trigger2 = gethitvar(animtype) = 2 || gethitvar(animtype) = 4 || gethitvar(animtype) = 5
trigger2 = stateno = 5020 && anim = 5040 && prevstateno != 5030 && prevstateno != 5020
value = s0,5+ifelse(random<500,0,4)
channel = 1

[State -3, 1.4]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) <= 1
trigger1 = stateno = 5070
value = s0,5+ifelse(random<500,0,4)
channel = 1

[State -3, 1.4]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) <= 3
trigger1 = gethitvar(fall) = 1 && gethitvar(hitshaketime) != 0
trigger1 = prevstateno != 5035 && prevstateno != 5030
value = s0,6+ifelse(random<500,0,2)
channel = 1
[State -3, 1.4]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) > 3 && GetHitVar(hitcount) <= 22
trigger1 = gethitvar(fall) = 1 && gethitvar(hitshaketime) != 0
trigger1 = prevstateno != 5035 && prevstateno != 5030 && prevstateno != 5020
value = s0,7+ifelse(random<500,0,1)
channel = 1

[State 111, 0]
type = varadd
trigger1 = command = "s" && var(55) = 0 && numhelper(1234) = 0
var(57) = 1
[State -2, 0]
type = varset
trigger1 = var(57) >= 2
var(57) = 0

[State -2, 0]
type = pause
triggerall = roundstate < 3
trigger1 = var(3) > 0 && gametime%4 = 0 && hitpausetime = 0 && numtarget > 0 && var(24) = 0
trigger1 = target,statetype != A || target,stateno = [5070,5071]
trigger1 = target,statetype != L && target,movetype = H
trigger2 = var(7) > 0 && hitpausetime = 0 && numtarget > 0 && var(24) = 0
trigger2 = target,movetype = H
trigger3 = var(11) > 0 && var(11) < 15 && p2movetype = H
time = 1
[State -2, 0]
type = varadd
trigger1 = var(3) > 0 && gametime%4 = 0 && hitpausetime = 0 && var(24) = 0
var(3) = -1
[State -2, 0]
type = varadd
trigger1 = var(7) > 0 && hitpausetime = 0 && var(24) = 0
var(7) = -1
[State -2, 0]
type = varadd
trigger1 = var(11) > 0
var(11) = -1
[State -2, 0]
type = varadd
trigger1 = var(18) > 0
var(18) = -1
[State -2, 0]
type = varadd
trigger1 = var(24) > 0
var(24) = -1

[State 52, 2]
type = Playsnd
trigger1 = var(20) = 1
value = s6,5
ignorehitpause = 1
[State -2, 0]
type = varadd
trigger1 = var(20) > 0
var(20) = -1
ignorehitpause = 1

[State 1300, 5]
type = helper
triggerall = statetype != A && pos y < 0
triggerall = stateno != 100 && stateno != 105 && stateno != 300 && stateno != 51
triggerall = stateno != 52 && stateno != 50 && stateno != 54 && stateno != 390
triggerall = stateno != 302 && stateno != 312 && stateno != 191 && stateno != 1900
triggerall = stateno != 1910 && stateno != 1800 && stateno != 1810
triggerall = stateno != [600,730]
trigger1 = movetype != H || stateno = [150,153]
trigger1 = pos y + ceil(0.5+0.5*(time+1)) >= 0
stateno = 102-ifelse(var(57)=1,1,0)
name = "dust"
pos = 0,0
pausemovetime = 9999
ownpal = 1
[State -2, 0]
type = posadd
triggerall = statetype != A && pos y < 0
triggerall = stateno != 100 && stateno != 105 && stateno != 300 && stateno != 51
triggerall = stateno != 52 && stateno != 50 && stateno != 54 && stateno != 390
triggerall = stateno != 302 && stateno != 312 && stateno != 191 && stateno != 1900
triggerall = stateno != 1910 && stateno != 1800 && stateno != 1810
triggerall = stateno != [600,730]
trigger1 = movetype != H || stateno = [150,153]
y = ifelse(pos y + ceil(0.5+0.5*(time+1)) <= 0,ceil(0.5+0.5*(time+1)),-pos y)

[State -2, 0]
type = playsnd
trigger1 = numtarget(390) > 0
trigger1 = target(390),stateno = 396 && target(390),time = 1+ifelse(teamside=2,1,0)
trigger2 = numtarget(800) > 0
trigger2 = target(800),stateno = 806 && target(800),time = 42+ifelse(teamside=2,1,0)
trigger3 = numtarget(820) > 0
trigger3 = target(820),stateno = 806 && target(820),time = 42+ifelse(teamside=2,1,0)
trigger4 = numtarget > 0
trigger4 = target,stateno = 8302
trigger4 = target,time = 1+ifelse(teamside=2,1,0)
value = s1,1
ignorehitpause = 1
[State -2, 0]
type = playsnd
trigger1 = numtarget(800) > 0
trigger1 = target(800),stateno = 806 && target(800),time = 1+ifelse(teamside=2,1,0)
trigger2 = numtarget(820) > 0
trigger2 = target(820),stateno = 806 && target(820),time = 1+ifelse(teamside=2,1,0)
value = s5,2
ignorehitpause = 1
[State -2, 0]
type = playsnd
trigger1 = numtarget(810) > 0
trigger1 = target(810),stateno = 816
trigger1 = target(810),time = 1+ifelse(teamside=2,1,0) || target(810),time = 31+ifelse(teamside=2,1,0)
trigger2 = numtarget > 0
trigger2 = target,stateno = 8306
trigger2 = target,time = 1+ifelse(teamside=2,1,0)
value = s1,0
ignorehitpause = 1
[State 1300, 5]
type = helper
trigger1 = numtarget(810) > 0
trigger1 = target(810),stateno = 816
trigger1 = target(810),time = 1+ifelse(teamside=2,1,0) || target(810),time = 31+ifelse(teamside=2,1,0)
stateno = 104
name = "dust"
pos = ceil(target(810),pos x-pos x)*facing,-pos y
facing = -1
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = numtarget(800) > 0
trigger1 = target(800),stateno = 806
trigger1 = target(800),time = 1+ifelse(teamside=2,1,0) || target(800),time = 42+ifelse(teamside=2,1,0)
stateno = 103
name = "dust"
pos = ceil(target(800),pos x-pos x)*facing,-pos y
facing = -1
pausemovetime = 9999
ownpal = 1
[State 1300, 5]
type = helper
trigger1 = numtarget(820) > 0
trigger1 = target(820),stateno = 806
trigger1 = target(820),time = 1+ifelse(teamside=2,1,0) || target(820),time = 42+ifelse(teamside=2,1,0)
stateno = 103
name = "dust"
pos = ceil(target(820),pos x-pos x)*facing,-pos y
facing = -1
pausemovetime = 9999
ownpal = 1
[State 1203, 5]
type = Envshake
triggerall = numtarget(800) > 0
triggerall = target(800),stateno = 806
trigger1 = target(800),time = 1+ifelse(teamside=2,1,0) || target(800),time = 6+ifelse(teamside=2,1,0) || target(800),time = 11+ifelse(teamside=2,1,0)
trigger2 = target(800),time = 16+ifelse(teamside=2,1,0) || target(800),time = 21+ifelse(teamside=2,1,0) || target(800),time = 26+ifelse(teamside=2,1,0)
trigger3 = target(800),time = 31+ifelse(teamside=2,1,0)
time = 5
freq = 255
ampl = -8+((target(800),time)-1+ifelse(teamside=2,1,0))/5
ignorehitpause = 1
[State 1203, 5]
type = Envshake
triggerall = numtarget(820) > 0
triggerall = target(820),stateno = 806
trigger1 = target(820),time = 1+ifelse(teamside=2,1,0) || target(820),time = 6+ifelse(teamside=2,1,0) || target(820),time = 11+ifelse(teamside=2,1,0)
trigger2 = target(820),time = 16+ifelse(teamside=2,1,0) || target(820),time = 21+ifelse(teamside=2,1,0) || target(820),time = 26+ifelse(teamside=2,1,0)
trigger3 = target(820),time = 31+ifelse(teamside=2,1,0)
time = 5
freq = 255
ampl = -8+((target(820),time)-1+ifelse(teamside=2,1,0))/5
ignorehitpause = 1
[State 1203, 5]
type = Envshake
triggerall = numtarget(810) > 0
triggerall = target(810),stateno = 816
trigger1 = target(810),time = 1+ifelse(teamside=2,1,0) || target(810),time = 11+ifelse(teamside=2,1,0)
trigger2 = target(810),time = 21+ifelse(teamside=2,1,0) || target(810),time = 31+ifelse(teamside=2,1,0)
time = 10-ifelse((target(810),time)= 31+ifelse(teamside=2,1,0),2,0)
freq = 255
ampl = -8+((target(810),time)-1+ifelse(teamside=2,1,0))/5
ignorehitpause = 1

[State 1300, 5]
type = helper
trigger1 = numtarget(390) > 0
trigger1 = target(390),stateno = 396 && target(390),time = 1+ifelse(teamside=2,1,0) && target(390),movetype = H
stateno = 397
name = "ground wave"
pos = ceil(target(390),pos x-pos x)*facing,-pos y
facing = -1
bindtime = -1
ignorehitpause = 1
sprpriority = 1
pausemovetime = 9999
ownpal = 1

[State 1300, 5]
type = helper
triggerall = numtarget > 0
triggerall = target,stateno = 8302 || target,stateno = 8306
trigger1 = target,time = 1+ifelse(teamside=2,1,0)
trigger2 = (target,stateno = 8302 && target,time = 26+ifelse(teamside=2,1,0)) || (target,stateno = 8306 && target,time = 29+ifelse(teamside=2,1,0))
stateno = 103+ifelse((target,stateno)=8306,1,0)
name = "dust"
pos = ceil(target,pos x-pos x)*facing,-pos y
facing = -1*ifelse((target,stateno)=8306,-1,1)
pausemovetime = 9999
ownpal = 1

; dizzy mode  --------------
[State -2, 2]
type = Varadd
trigger1 = var(8) > 0
trigger1 = movetype != H || stateno != [5000,5150]
var(8) = -1

[State -2, 2]
type = Varadd
triggerall = Time = 0
triggerall = gethitvar(fall) = 0 || (statetype != A && gethitvar(groundtype) = 3) || (statetype = A && gethitvar(airtype) = 3)
triggerall = GetHitVar(hitcount) <= 5
triggerall = prevstateno != [5300,5308]
triggerall = gethitvar(damage) < 20
trigger1 = stateno = 5000
;trigger1 = anim = 5000
trigger2 = stateno = 5000
;trigger2 = anim = 5010
trigger3 = stateno = 5010
;trigger3 = anim = 5020 
;trigger4 = gethitvar(animtype) = 0
trigger4 = stateno = 5020
trigger5 = stateno = 5070;
var(8) = 45
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 0
triggerall = gethitvar(fall) = 0 || (statetype != A && gethitvar(groundtype) = 3) || (statetype = A && gethitvar(airtype) = 3)
triggerall = GetHitVar(hitcount) <= 5
triggerall = prevstateno != [5300,5308]
triggerall = gethitvar(damage) >= 20 && gethitvar(damage) < 50
trigger1 = stateno = 5000
;trigger1 = anim = 5000
trigger2 = stateno = 5000
;trigger2 = anim = 5010
trigger3 = stateno = 5010
;trigger3 = anim = 5020 
;trigger4 = gethitvar(animtype) = 0
trigger4 = stateno = 5020
trigger5 = stateno = 5070;
var(8) = 90
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 0
triggerall = gethitvar(fall) = 0 || (statetype != A && gethitvar(groundtype) = 3) || (statetype = A && gethitvar(airtype) = 3)
triggerall = GetHitVar(hitcount) <= 5
triggerall = prevstateno != [5300,5308]
triggerall = gethitvar(damage) >= 50 && gethitvar(damage) < 100
trigger1 = stateno = 5000
;trigger1 = anim = 5001
trigger2 = stateno = 5000
;trigger2 = anim = 5011
trigger3 = stateno = 5010
;trigger3 = anim = 5021
;trigger4 = gethitvar(animtype) = 1 || gethitvar(animtype) = 3
trigger4 = stateno = 5020
trigger5 = stateno = 5070;
var(8) = 140
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 0
triggerall = gethitvar(fall) = 0 || (statetype != A && gethitvar(groundtype) = 3) || (statetype = A && gethitvar(airtype) = 3)
triggerall = GetHitVar(hitcount) <= 5
triggerall = prevstateno != [5300,5308]
triggerall = gethitvar(damage) >= 100
trigger1 = stateno = 5000
;trigger1 = anim = 5002
trigger2 = stateno = 5000
;trigger2 = anim = 5012
trigger3 = stateno = 5010
;trigger3 = anim = 5022 
;trigger4 = gethitvar(animtype) = 2 || gethitvar(animtype) = 4 || gethitvar(animtype) = 5
trigger4 = stateno = 5020
trigger5 = stateno = 5070
var(8) = 280
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = ChangeState
trigger1 = var(8) >= 1000 && alive
value = 5300
ctrl = 0
ignorehitpause = 1
;-----------------------------------------
[State -3, 1]
type = helper
triggerall = winko = 1 && numhelper(9888) < 1
trigger1 = ((stateno = [200,280]) || (stateno = [400,430]) || (stateno = [600,670])) && movehit > 0
trigger2 = (stateno = 300 || stateno = 390 || stateno = 1000) && movehit > 0
trigger3 = (stateno = 1600 || stateno = 1620 || stateno = 1200) && movehit > 0
trigger4 = (stateno = 1800 || stateno = 1810 || stateno = 3000|| stateno = 3100) && movehit > 0
stateno = 9888
id = 9888
ignorehitpause = 1
[State -3, 1]
type = helper
triggerall = winko = 1 && numhelper(9888) < 1
trigger1 = ((stateno = [302,380]) || (stateno = [500,530]) || (stateno = [700,730])) && movehit > 0
trigger2 = (stateno = 1100 || stateno = 1700 || stateno = 1710) && movehit > 0
trigger3 = (stateno = 1900 || stateno = 1910) && movehit > 0
stateno = 9889
id = 9888
ignorehitpause = 1
[State -2, 1]
type = helper
trigger1 = winko = 1 && numhelper(9888) < 1
stateno = 9887
id = 9888
ignorehitpause = 1

[State 260, 0]
type = assertspecial
trigger1 = enemy,stateno = [8300,8307]
flag = nokoslow
ignorehitpause = 1

[State -4, 1]
type = DisplayToClipboard
trigger1 = 1
text="fedist = %d  p2bodydist X = %d  p2bodydist Y = %d  v36 =%d  pr =%d"
params = floor(frontedgedist),floor(p2bodydist X),floor(p2bodydist Y),floor(var(36)),floor(prevstateno)
ignorehitpause = 1

[State -4, 1]
type = appendToClipboard
trigger1 = 1
text="\nbedist = %d  p2dist X = %d  p2dist Y = %d  AI = %d  power = %d"
params = floor(backedgedist),floor(p2dist X),floor(p2dist Y),floor(var(55)),floor(power)
ignorehitpause = 1

[State -4, 1]    ;input -8
type = varset
triggerall = animtime = -8
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = A && vel y > 0 && var(28) != 0
var(28) = 0

[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "yun_x"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 1
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "yun_y"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 2
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "jubak_x"
triggerall = command != "holdfwd"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 3
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "jubak_y"
triggerall = command != "holdfwd"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 4
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "rekkoken_x"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 5
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "rekkoken_y"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 6
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "rekkoken_a"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 7
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "rekkoken_b"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 8
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "yul_a" || command = "yul_a2"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 9
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "yul_b" || command = "yul_b2"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 10
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "yul_a1"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 11
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "yul_b1"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 12
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "recovery"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 13
[State -4, 1]
type = varset
triggerall = var(55) = 0
triggerall = command = "sshoot"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=530 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=100 || stateno=105 || stateno=210 || stateno=220
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
trigger13 = statetype = S && vel y > 0 && pos y < 0
var(28) = 14

[State -4, 1]
type = changestate
triggerall = var(28) = 1
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
triggerall = (numhelper(1000) = 0 && numhelper(1100) = 0) || var(32) = 1
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1100
[State -4, 1]
type = changestate
triggerall = var(28) = 2
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
triggerall = (numhelper(1000) = 0 && numhelper(1100) = 0) || var(32) = 1
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1000
[State -4, 1]
type = changestate
triggerall = var(28) = 3
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1500
[State -4, 1]
type = changestate
triggerall = var(28) = 4
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
triggerall = (numhelper(1400) = 0 && numhelper(1500) = 0) || var(34) = 1
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1400
[State -4, 1]
type = changestate
triggerall = var(28) = 5
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1620
[State -4, 1]
type = changestate
triggerall = var(28) = 6
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1600
[State -4, 1]
type = changestate
triggerall = var(28) = 7
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1710
[State -4, 1]
type = changestate
triggerall = var(28) = 8
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1700
[State -4, 1]
type = changestate
triggerall = var(28) = 9
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1810
[State -4, 1]
type = changestate
triggerall = var(28) = 10
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1800
[State -4, 1]
type = changestate
triggerall = var(28) = 11
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1910
[State -4, 1]
type = changestate
triggerall = var(28) = 12
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1900
[State -4, 1]
type = changestate
triggerall = var(28) = 14
triggerall = var(55) = 0 && var(52) < 1000 && numhelper(3000) = 0
triggerall = animtime = 0 && movetype != H
triggerall = power >= 3000 || var(53) = 1
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 3000
[State -4, 1]
type = changestate
triggerall = var(28) = 13 && command = "holdback"
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1310
[State -4, 1]
type = changestate
triggerall = var(28) = 13 && command != "holdback"
triggerall = var(55) = 0 && var(52) < 1000
triggerall = animtime = 0 && movetype != H
trigger1 = stateno=1000 || stateno=1100 || stateno=1300
trigger2 = stateno=1310 || stateno=1400 || stateno=1500 || stateno=1600
trigger3 = stateno=1620 || stateno=1700 || stateno=1710 || stateno=1800
trigger4 = stateno=1810 || stateno=1900 || stateno=1910 || stateno=3000
trigger5 = stateno=3100 || stateno=5120 || stateno=5201 || stateno=200
trigger6 = stateno=52 || stateno=210 || stateno=220 || stateno=530
trigger7 = stateno=230 || stateno=240 || stateno=260 || stateno=270
trigger8 = stateno=280 || stateno=310 || stateno=320 || stateno=330
trigger9 = stateno=340 || stateno=350 || stateno=360 || stateno=370
trigger10 = stateno=380 || stateno=300 || stateno=302 || stateno=312
trigger11 = stateno=390 || stateno=400 || stateno=410 || stateno=420
trigger12 = stateno=430 || stateno=500 || stateno=510 || stateno=520
value = 1300
